From c6e6fa47e91fcbdce7f66388c5dd51d1b6d8cdd5 Mon Sep 17 00:00:00 2001 From: Thibaut Sardan Date: Fri, 6 Dec 2024 17:14:13 +0100 Subject: [PATCH] put westedn back at 18.. --- squid/assets/envs/.env.westend | 2 +- squid/src/types/calls.ts | 2 + squid/src/types/events.ts | 1 + squid/src/types/index.ts | 49 + squid/src/types/multisig/calls.ts | 2088 ++++ squid/src/types/proxy/calls.ts | 1228 +++ squid/src/types/proxy/events.ts | 227 + squid/src/types/support.ts | 142 + squid/src/types/v1000000.ts | 10405 ++++++++++++++++++++ squid/src/types/v1001000.ts | 10535 ++++++++++++++++++++ squid/src/types/v1002000.ts | 12183 +++++++++++++++++++++++ squid/src/types/v1002004.ts | 12253 +++++++++++++++++++++++ squid/src/types/v1002005.ts | 12264 +++++++++++++++++++++++ squid/src/types/v1002006.ts | 11634 ++++++++++++++++++++++ squid/src/types/v1003000.ts | 14532 ++++++++++++++++++++++++++++ squid/src/types/v2005.ts | 6572 +++++++++++++ squid/src/types/v2007.ts | 6615 +++++++++++++ squid/src/types/v2011.ts | 6725 +++++++++++++ squid/src/types/v2013.ts | 6748 +++++++++++++ squid/src/types/v2015.ts | 6938 +++++++++++++ squid/src/types/v2022.ts | 6938 +++++++++++++ squid/src/types/v2023.ts | 6515 +++++++++++++ squid/src/types/v2024.ts | 6511 +++++++++++++ squid/src/types/v2025.ts | 6552 +++++++++++++ squid/src/types/v2026.ts | 6542 +++++++++++++ squid/src/types/v2028.ts | 6553 +++++++++++++ squid/src/types/v2029.ts | 6664 +++++++++++++ squid/src/types/v2030.ts | 6594 +++++++++++++ squid/src/types/v9010.ts | 9370 ++++++++++++++++++ squid/src/types/v9030.ts | 9398 ++++++++++++++++++ squid/src/types/v9040.ts | 9413 ++++++++++++++++++ squid/src/types/v9050.ts | 9586 ++++++++++++++++++ squid/src/types/v9080.ts | 9584 ++++++++++++++++++ squid/src/types/v9090.ts | 9433 ++++++++++++++++++ squid/src/types/v9100.ts | 10463 ++++++++++++++++++++ squid/src/types/v9111.ts | 10976 +++++++++++++++++++++ squid/src/types/v9122.ts | 11049 +++++++++++++++++++++ squid/src/types/v9130.ts | 11119 +++++++++++++++++++++ squid/src/types/v9160.ts | 11362 ++++++++++++++++++++++ squid/src/types/v9170.ts | 11387 ++++++++++++++++++++++ squid/src/types/v9180.ts | 11492 ++++++++++++++++++++++ squid/src/types/v9190.ts | 11747 ++++++++++++++++++++++ squid/src/types/v9220.ts | 12075 +++++++++++++++++++++++ squid/src/types/v9230.ts | 12100 +++++++++++++++++++++++ squid/src/types/v9250.ts | 12163 +++++++++++++++++++++++ squid/src/types/v9271.ts | 12182 +++++++++++++++++++++++ squid/src/types/v9291.ts | 12192 +++++++++++++++++++++++ squid/src/types/v9300.ts | 12183 +++++++++++++++++++++++ squid/src/types/v9320.ts | 13133 +++++++++++++++++++++++++ squid/src/types/v9340.ts | 13333 +++++++++++++++++++++++++ squid/src/types/v9350.ts | 13369 +++++++++++++++++++++++++ squid/src/types/v9370.ts | 13390 +++++++++++++++++++++++++ squid/src/types/v9381.ts | 13856 ++++++++++++++++++++++++++ squid/src/types/v9420.ts | 12401 ++++++++++++++++++++++++ squid/src/types/v9430.ts | 12414 ++++++++++++++++++++++++ 55 files changed, 485181 insertions(+), 1 deletion(-) create mode 100644 squid/src/types/calls.ts create mode 100644 squid/src/types/events.ts create mode 100644 squid/src/types/index.ts create mode 100644 squid/src/types/multisig/calls.ts create mode 100644 squid/src/types/proxy/calls.ts create mode 100644 squid/src/types/proxy/events.ts create mode 100644 squid/src/types/support.ts create mode 100644 squid/src/types/v1000000.ts create mode 100644 squid/src/types/v1001000.ts create mode 100644 squid/src/types/v1002000.ts create mode 100644 squid/src/types/v1002004.ts create mode 100644 squid/src/types/v1002005.ts create mode 100644 squid/src/types/v1002006.ts create mode 100644 squid/src/types/v1003000.ts create mode 100644 squid/src/types/v2005.ts create mode 100644 squid/src/types/v2007.ts create mode 100644 squid/src/types/v2011.ts create mode 100644 squid/src/types/v2013.ts create mode 100644 squid/src/types/v2015.ts create mode 100644 squid/src/types/v2022.ts create mode 100644 squid/src/types/v2023.ts create mode 100644 squid/src/types/v2024.ts create mode 100644 squid/src/types/v2025.ts create mode 100644 squid/src/types/v2026.ts create mode 100644 squid/src/types/v2028.ts create mode 100644 squid/src/types/v2029.ts create mode 100644 squid/src/types/v2030.ts create mode 100644 squid/src/types/v9010.ts create mode 100644 squid/src/types/v9030.ts create mode 100644 squid/src/types/v9040.ts create mode 100644 squid/src/types/v9050.ts create mode 100644 squid/src/types/v9080.ts create mode 100644 squid/src/types/v9090.ts create mode 100644 squid/src/types/v9100.ts create mode 100644 squid/src/types/v9111.ts create mode 100644 squid/src/types/v9122.ts create mode 100644 squid/src/types/v9130.ts create mode 100644 squid/src/types/v9160.ts create mode 100644 squid/src/types/v9170.ts create mode 100644 squid/src/types/v9180.ts create mode 100644 squid/src/types/v9190.ts create mode 100644 squid/src/types/v9220.ts create mode 100644 squid/src/types/v9230.ts create mode 100644 squid/src/types/v9250.ts create mode 100644 squid/src/types/v9271.ts create mode 100644 squid/src/types/v9291.ts create mode 100644 squid/src/types/v9300.ts create mode 100644 squid/src/types/v9320.ts create mode 100644 squid/src/types/v9340.ts create mode 100644 squid/src/types/v9350.ts create mode 100644 squid/src/types/v9370.ts create mode 100644 squid/src/types/v9381.ts create mode 100644 squid/src/types/v9420.ts create mode 100644 squid/src/types/v9430.ts diff --git a/squid/assets/envs/.env.westend b/squid/assets/envs/.env.westend index d8b3b3db..2e2c8b23 100644 --- a/squid/assets/envs/.env.westend +++ b/squid/assets/envs/.env.westend @@ -1,4 +1,4 @@ -BLOCK_START=23544570 +BLOCK_START=18000000 PREFIX=42 RPC_WS="wss://westend-rpc.polkadot.io" CHAIN_ID='westend' \ No newline at end of file diff --git a/squid/src/types/calls.ts b/squid/src/types/calls.ts new file mode 100644 index 00000000..9391abf6 --- /dev/null +++ b/squid/src/types/calls.ts @@ -0,0 +1,2 @@ +export * as proxy from './proxy/calls' +export * as multisig from './multisig/calls' diff --git a/squid/src/types/events.ts b/squid/src/types/events.ts new file mode 100644 index 00000000..74adc76a --- /dev/null +++ b/squid/src/types/events.ts @@ -0,0 +1 @@ +export * as proxy from './proxy/events' diff --git a/squid/src/types/index.ts b/squid/src/types/index.ts new file mode 100644 index 00000000..4f497db6 --- /dev/null +++ b/squid/src/types/index.ts @@ -0,0 +1,49 @@ +export * as v2005 from './v2005' +export * as v9130 from './v9130' +export * as v9180 from './v9180' +export * as v9111 from './v9111' +export * as v9420 from './v9420' +export * as v1002006 from './v1002006' +export * as v1003000 from './v1003000' +export * as v9190 from './v9190' +export * as v9300 from './v9300' +export * as v2007 from './v2007' +export * as v2011 from './v2011' +export * as v2013 from './v2013' +export * as v2015 from './v2015' +export * as v2022 from './v2022' +export * as v2023 from './v2023' +export * as v2024 from './v2024' +export * as v2025 from './v2025' +export * as v2026 from './v2026' +export * as v2028 from './v2028' +export * as v2029 from './v2029' +export * as v2030 from './v2030' +export * as v9010 from './v9010' +export * as v9030 from './v9030' +export * as v9040 from './v9040' +export * as v9050 from './v9050' +export * as v9080 from './v9080' +export * as v9090 from './v9090' +export * as v9100 from './v9100' +export * as v9122 from './v9122' +export * as v9160 from './v9160' +export * as v9170 from './v9170' +export * as v9220 from './v9220' +export * as v9230 from './v9230' +export * as v9250 from './v9250' +export * as v9271 from './v9271' +export * as v9291 from './v9291' +export * as v9320 from './v9320' +export * as v9340 from './v9340' +export * as v9350 from './v9350' +export * as v9370 from './v9370' +export * as v9381 from './v9381' +export * as v9430 from './v9430' +export * as v1000000 from './v1000000' +export * as v1001000 from './v1001000' +export * as v1002000 from './v1002000' +export * as v1002004 from './v1002004' +export * as v1002005 from './v1002005' +export * as events from './events' +export * as calls from './calls' diff --git a/squid/src/types/multisig/calls.ts b/squid/src/types/multisig/calls.ts new file mode 100644 index 00000000..e463d771 --- /dev/null +++ b/squid/src/types/multisig/calls.ts @@ -0,0 +1,2088 @@ +import {sts, Block, Bytes, Option, Result, CallType, RuntimeCtx} from '../support' +import * as v2005 from '../v2005' +import * as v2007 from '../v2007' +import * as v2011 from '../v2011' +import * as v2013 from '../v2013' +import * as v2015 from '../v2015' +import * as v2022 from '../v2022' +import * as v2023 from '../v2023' +import * as v2024 from '../v2024' +import * as v2025 from '../v2025' +import * as v2026 from '../v2026' +import * as v2028 from '../v2028' +import * as v2029 from '../v2029' +import * as v2030 from '../v2030' +import * as v9010 from '../v9010' +import * as v9030 from '../v9030' +import * as v9040 from '../v9040' +import * as v9050 from '../v9050' +import * as v9080 from '../v9080' +import * as v9090 from '../v9090' +import * as v9100 from '../v9100' +import * as v9111 from '../v9111' +import * as v9122 from '../v9122' +import * as v9130 from '../v9130' +import * as v9160 from '../v9160' +import * as v9170 from '../v9170' +import * as v9180 from '../v9180' +import * as v9190 from '../v9190' +import * as v9220 from '../v9220' +import * as v9230 from '../v9230' +import * as v9250 from '../v9250' +import * as v9271 from '../v9271' +import * as v9291 from '../v9291' +import * as v9300 from '../v9300' +import * as v9320 from '../v9320' +import * as v9340 from '../v9340' +import * as v9350 from '../v9350' +import * as v9370 from '../v9370' +import * as v9381 from '../v9381' +import * as v9420 from '../v9420' +import * as v9430 from '../v9430' +import * as v1000000 from '../v1000000' +import * as v1001000 from '../v1001000' +import * as v1002000 from '../v1002000' +import * as v1002004 from '../v1002004' +import * as v1002005 from '../v1002005' +import * as v1002006 from '../v1002006' +import * as v1003000 from '../v1003000' + +export const asMulti = { + name: 'Multisig.as_multi', + /** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. Calls must each fulfil the `IsCallable` + * filter. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - Base Weight: + * - Create: 46.55 + 0.089 * S µs + * - Approve: 34.03 + .112 * S µs + * - Complete: 40.36 + .225 * S µs + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account] + * - Writes: Multisig Storage, [Caller Account] + * - Plus Call Weight + * # + */ + v2005: new CallType( + 'Multisig.as_multi', + sts.struct({ + threshold: sts.number(), + otherSignatories: sts.array(() => v2005.AccountId), + maybeTimepoint: sts.option(() => v2005.Timepoint), + call: v2005.Type_188, + }) + ), + /** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. Calls must each fulfil the `IsCallable` + * filter. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - Base Weight: + * - Create: 46.55 + 0.089 * S µs + * - Approve: 34.03 + .112 * S µs + * - Complete: 40.36 + .225 * S µs + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account] + * - Writes: Multisig Storage, [Caller Account] + * - Plus Call Weight + * # + */ + v2007: new CallType( + 'Multisig.as_multi', + sts.struct({ + threshold: sts.number(), + otherSignatories: sts.array(() => v2007.AccountId), + maybeTimepoint: sts.option(() => v2007.Timepoint), + call: v2007.Type_189, + }) + ), + /** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - Base Weight: + * - Create: 41.89 + 0.118 * S + .002 * Z µs + * - Create w/ Store: 53.57 + 0.119 * S + .003 * Z µs + * - Approve: 31.39 + 0.136 * S + .002 * Z µs + * - Complete: 39.94 + 0.26 * S + .002 * Z µs + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ + v2011: new CallType( + 'Multisig.as_multi', + sts.struct({ + threshold: sts.number(), + otherSignatories: sts.array(() => v2011.AccountId), + maybeTimepoint: sts.option(() => v2011.Timepoint), + call: sts.bytes(), + storeCall: sts.boolean(), + maxWeight: v2011.Weight, + }) + ), + /** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ + v9291: new CallType( + 'Multisig.as_multi', + sts.struct({ + threshold: sts.number(), + otherSignatories: sts.array(() => v9291.AccountId32), + maybeTimepoint: sts.option(() => v9291.Timepoint), + call: sts.bytes(), + storeCall: sts.boolean(), + maxWeight: v9291.Weight, + }) + ), + /** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account] + * - Writes: Multisig Storage, [Caller Account] + * - Plus Call Weight + * # + */ + v9320: new CallType( + 'Multisig.as_multi', + sts.struct({ + threshold: sts.number(), + otherSignatories: sts.array(() => v9320.AccountId32), + maybeTimepoint: sts.option(() => v9320.Timepoint), + call: v9320.Call, + maxWeight: v9320.Weight, + }) + ), + /** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account] + * - Writes: Multisig Storage, [Caller Account] + * - Plus Call Weight + * # + */ + v9340: new CallType( + 'Multisig.as_multi', + sts.struct({ + threshold: sts.number(), + otherSignatories: sts.array(() => v9340.AccountId32), + maybeTimepoint: sts.option(() => v9340.Timepoint), + call: v9340.Call, + maxWeight: v9340.Weight, + }) + ), + /** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account] + * - Writes: Multisig Storage, [Caller Account] + * - Plus Call Weight + * # + */ + v9350: new CallType( + 'Multisig.as_multi', + sts.struct({ + threshold: sts.number(), + otherSignatories: sts.array(() => v9350.AccountId32), + maybeTimepoint: sts.option(() => v9350.Timepoint), + call: v9350.Call, + maxWeight: v9350.Weight, + }) + ), + /** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account] + * - Writes: Multisig Storage, [Caller Account] + * - Plus Call Weight + * # + */ + v9370: new CallType( + 'Multisig.as_multi', + sts.struct({ + threshold: sts.number(), + otherSignatories: sts.array(() => v9370.AccountId32), + maybeTimepoint: sts.option(() => v9370.Timepoint), + call: v9370.Call, + maxWeight: v9370.Weight, + }) + ), + /** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account] + * - Writes: Multisig Storage, [Caller Account] + * - Plus Call Weight + * # + */ + v9381: new CallType( + 'Multisig.as_multi', + sts.struct({ + threshold: sts.number(), + otherSignatories: sts.array(() => v9381.AccountId32), + maybeTimepoint: sts.option(() => v9381.Timepoint), + call: v9381.Call, + maxWeight: v9381.Weight, + }) + ), + /** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * ## Complexity + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + */ + v9420: new CallType( + 'Multisig.as_multi', + sts.struct({ + threshold: sts.number(), + otherSignatories: sts.array(() => v9420.AccountId32), + maybeTimepoint: sts.option(() => v9420.Timepoint), + call: v9420.Call, + maxWeight: v9420.Weight, + }) + ), + /** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * ## Complexity + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + */ + v9430: new CallType( + 'Multisig.as_multi', + sts.struct({ + threshold: sts.number(), + otherSignatories: sts.array(() => v9430.AccountId32), + maybeTimepoint: sts.option(() => v9430.Timepoint), + call: v9430.Call, + maxWeight: v9430.Weight, + }) + ), + /** + * See [`Pallet::as_multi`]. + */ + v1000000: new CallType( + 'Multisig.as_multi', + sts.struct({ + threshold: sts.number(), + otherSignatories: sts.array(() => v1000000.AccountId32), + maybeTimepoint: sts.option(() => v1000000.Timepoint), + call: v1000000.Call, + maxWeight: v1000000.Weight, + }) + ), + /** + * See [`Pallet::as_multi`]. + */ + v1001000: new CallType( + 'Multisig.as_multi', + sts.struct({ + threshold: sts.number(), + otherSignatories: sts.array(() => v1001000.AccountId32), + maybeTimepoint: sts.option(() => v1001000.Timepoint), + call: v1001000.Call, + maxWeight: v1001000.Weight, + }) + ), + /** + * See [`Pallet::as_multi`]. + */ + v1002000: new CallType( + 'Multisig.as_multi', + sts.struct({ + threshold: sts.number(), + otherSignatories: sts.array(() => v1002000.AccountId32), + maybeTimepoint: sts.option(() => v1002000.Timepoint), + call: v1002000.Call, + maxWeight: v1002000.Weight, + }) + ), + /** + * See [`Pallet::as_multi`]. + */ + v1002004: new CallType( + 'Multisig.as_multi', + sts.struct({ + threshold: sts.number(), + otherSignatories: sts.array(() => v1002004.AccountId32), + maybeTimepoint: sts.option(() => v1002004.Timepoint), + call: v1002004.Call, + maxWeight: v1002004.Weight, + }) + ), + /** + * See [`Pallet::as_multi`]. + */ + v1002005: new CallType( + 'Multisig.as_multi', + sts.struct({ + threshold: sts.number(), + otherSignatories: sts.array(() => v1002005.AccountId32), + maybeTimepoint: sts.option(() => v1002005.Timepoint), + call: v1002005.Call, + maxWeight: v1002005.Weight, + }) + ), + /** + * See [`Pallet::as_multi`]. + */ + v1002006: new CallType( + 'Multisig.as_multi', + sts.struct({ + threshold: sts.number(), + otherSignatories: sts.array(() => v1002006.AccountId32), + maybeTimepoint: sts.option(() => v1002006.Timepoint), + call: v1002006.Call, + maxWeight: v1002006.Weight, + }) + ), + /** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * ## Complexity + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + */ + v1003000: new CallType( + 'Multisig.as_multi', + sts.struct({ + threshold: sts.number(), + otherSignatories: sts.array(() => v1003000.AccountId32), + maybeTimepoint: sts.option(() => v1003000.Timepoint), + call: v1003000.Call, + maxWeight: v1003000.Weight, + }) + ), +} + +export const approveAsMulti = { + name: 'Multisig.approve_as_multi', + /** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - Base Weight: + * - Create: 44.71 + 0.088 * S + * - Approve: 31.48 + 0.116 * S + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ + v2005: new CallType( + 'Multisig.approve_as_multi', + sts.struct({ + threshold: sts.number(), + otherSignatories: sts.array(() => v2005.AccountId), + maybeTimepoint: sts.option(() => v2005.Timepoint), + callHash: sts.bytes(), + }) + ), + /** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - Base Weight: + * - Create: 44.71 + 0.088 * S + * - Approve: 31.48 + 0.116 * S + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ + v2011: new CallType( + 'Multisig.approve_as_multi', + sts.struct({ + threshold: sts.number(), + otherSignatories: sts.array(() => v2011.AccountId), + maybeTimepoint: sts.option(() => v2011.Timepoint), + callHash: sts.bytes(), + maxWeight: v2011.Weight, + }) + ), + /** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ + v9291: new CallType( + 'Multisig.approve_as_multi', + sts.struct({ + threshold: sts.number(), + otherSignatories: sts.array(() => v9291.AccountId32), + maybeTimepoint: sts.option(() => v9291.Timepoint), + callHash: sts.bytes(), + maxWeight: v9291.Weight, + }) + ), + /** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ + v9320: new CallType( + 'Multisig.approve_as_multi', + sts.struct({ + threshold: sts.number(), + otherSignatories: sts.array(() => v9320.AccountId32), + maybeTimepoint: sts.option(() => v9320.Timepoint), + callHash: sts.bytes(), + maxWeight: v9320.Weight, + }) + ), +} + +export const cancelAsMulti = { + name: 'Multisig.cancel_as_multi', + /** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - Base Weight: 37.6 + 0.084 * S + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ + v2005: new CallType( + 'Multisig.cancel_as_multi', + sts.struct({ + threshold: sts.number(), + otherSignatories: sts.array(() => v2005.AccountId), + timepoint: v2005.Timepoint, + callHash: sts.bytes(), + }) + ), +} + +export const asMultiThreshold1 = { + name: 'Multisig.as_multi_threshold_1', + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - Base Weight: 33.72 + 0.002 * Z µs + * - DB Weight: None + * - Plus Call Weight + * # + */ + v2011: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v2011.AccountId), + call: v2011.Type_190, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - Base Weight: 33.72 + 0.002 * Z µs + * - DB Weight: None + * - Plus Call Weight + * # + */ + v2013: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v2013.AccountId), + call: v2013.Type_190, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - Base Weight: 33.72 + 0.002 * Z µs + * - DB Weight: None + * - Plus Call Weight + * # + */ + v2015: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v2015.AccountId), + call: v2015.Type_192, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - Base Weight: 33.72 + 0.002 * Z µs + * - DB Weight: None + * - Plus Call Weight + * # + */ + v2022: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v2022.AccountId), + call: v2022.Type_192, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - Base Weight: 33.72 + 0.002 * Z µs + * - DB Weight: None + * - Plus Call Weight + * # + */ + v2023: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v2023.AccountId), + call: v2023.Type_194, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - Base Weight: 33.72 + 0.002 * Z µs + * - DB Weight: None + * - Plus Call Weight + * # + */ + v2024: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v2024.AccountId), + call: v2024.Type_194, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ + v2025: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v2025.AccountId), + call: v2025.Type_195, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ + v2026: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v2026.AccountId), + call: v2026.Type_194, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ + v2028: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v2028.AccountId), + call: v2028.Type_199, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ + v2029: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v2029.AccountId), + call: v2029.Type_199, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ + v2030: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v2030.AccountId), + call: v2030.Type_138, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ + v9010: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v9010.AccountId), + call: v9010.Type_138, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ + v9030: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v9030.AccountId), + call: v9030.Type_138, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ + v9040: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v9040.AccountId), + call: v9040.Type_138, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ + v9050: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v9050.AccountId), + call: v9050.Type_139, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ + v9080: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v9080.AccountId), + call: v9080.Type_138, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ + v9090: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v9090.AccountId), + call: v9090.Type_138, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ + v9100: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v9100.AccountId), + call: v9100.Type_138, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ + v9111: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v9111.AccountId32), + call: v9111.Call, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ + v9122: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v9122.AccountId32), + call: v9122.Call, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ + v9130: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v9130.AccountId32), + call: v9130.Call, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ + v9160: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v9160.AccountId32), + call: v9160.Call, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ + v9170: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v9170.AccountId32), + call: v9170.Call, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ + v9180: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v9180.AccountId32), + call: v9180.Call, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ + v9190: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v9190.AccountId32), + call: v9190.Call, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ + v9220: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v9220.AccountId32), + call: v9220.Call, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ + v9230: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v9230.AccountId32), + call: v9230.Call, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ + v9250: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v9250.AccountId32), + call: v9250.Call, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ + v9271: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v9271.AccountId32), + call: v9271.Call, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ + v9291: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v9291.AccountId32), + call: v9291.Call, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ + v9300: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v9300.AccountId32), + call: v9300.Call, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ + v9320: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v9320.AccountId32), + call: v9320.Call, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ + v9340: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v9340.AccountId32), + call: v9340.Call, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ + v9350: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v9350.AccountId32), + call: v9350.Call, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ + v9370: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v9370.AccountId32), + call: v9370.Call, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ + v9381: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v9381.AccountId32), + call: v9381.Call, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * ## Complexity + * O(Z + C) where Z is the length of the call and C its execution weight. + */ + v9420: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v9420.AccountId32), + call: v9420.Call, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * ## Complexity + * O(Z + C) where Z is the length of the call and C its execution weight. + */ + v9430: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v9430.AccountId32), + call: v9430.Call, + }) + ), + /** + * See [`Pallet::as_multi_threshold_1`]. + */ + v1000000: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v1000000.AccountId32), + call: v1000000.Call, + }) + ), + /** + * See [`Pallet::as_multi_threshold_1`]. + */ + v1001000: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v1001000.AccountId32), + call: v1001000.Call, + }) + ), + /** + * See [`Pallet::as_multi_threshold_1`]. + */ + v1002000: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v1002000.AccountId32), + call: v1002000.Call, + }) + ), + /** + * See [`Pallet::as_multi_threshold_1`]. + */ + v1002004: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v1002004.AccountId32), + call: v1002004.Call, + }) + ), + /** + * See [`Pallet::as_multi_threshold_1`]. + */ + v1002005: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v1002005.AccountId32), + call: v1002005.Call, + }) + ), + /** + * See [`Pallet::as_multi_threshold_1`]. + */ + v1002006: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v1002006.AccountId32), + call: v1002006.Call, + }) + ), + /** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * ## Complexity + * O(Z + C) where Z is the length of the call and C its execution weight. + */ + v1003000: new CallType( + 'Multisig.as_multi_threshold_1', + sts.struct({ + otherSignatories: sts.array(() => v1003000.AccountId32), + call: v1003000.Call, + }) + ), +} diff --git a/squid/src/types/proxy/calls.ts b/squid/src/types/proxy/calls.ts new file mode 100644 index 00000000..d260fa3b --- /dev/null +++ b/squid/src/types/proxy/calls.ts @@ -0,0 +1,1228 @@ +import {sts, Block, Bytes, Option, Result, CallType, RuntimeCtx} from '../support' +import * as v2005 from '../v2005' +import * as v2007 from '../v2007' +import * as v2011 from '../v2011' +import * as v2013 from '../v2013' +import * as v2015 from '../v2015' +import * as v2022 from '../v2022' +import * as v2023 from '../v2023' +import * as v2024 from '../v2024' +import * as v2025 from '../v2025' +import * as v2026 from '../v2026' +import * as v2028 from '../v2028' +import * as v2029 from '../v2029' +import * as v2030 from '../v2030' +import * as v9010 from '../v9010' +import * as v9030 from '../v9030' +import * as v9040 from '../v9040' +import * as v9050 from '../v9050' +import * as v9080 from '../v9080' +import * as v9090 from '../v9090' +import * as v9100 from '../v9100' +import * as v9111 from '../v9111' +import * as v9122 from '../v9122' +import * as v9130 from '../v9130' +import * as v9160 from '../v9160' +import * as v9170 from '../v9170' +import * as v9180 from '../v9180' +import * as v9190 from '../v9190' +import * as v9220 from '../v9220' +import * as v9230 from '../v9230' +import * as v9250 from '../v9250' +import * as v9271 from '../v9271' +import * as v9291 from '../v9291' +import * as v9300 from '../v9300' +import * as v9320 from '../v9320' +import * as v9340 from '../v9340' +import * as v9350 from '../v9350' +import * as v9370 from '../v9370' +import * as v9381 from '../v9381' +import * as v9420 from '../v9420' +import * as v9430 from '../v9430' +import * as v1000000 from '../v1000000' +import * as v1001000 from '../v1001000' +import * as v1002000 from '../v1002000' +import * as v1002004 from '../v1002004' +import * as v1002005 from '../v1002005' +import * as v1002006 from '../v1002006' +import * as v1003000 from '../v1003000' + +export const proxy = { + name: 'Proxy.proxy', + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * P is the number of proxies the user has + * - Base weight: 19.87 + .141 * P µs + * - DB weight: 1 storage read. + * - Plus the weight of the `call` + * # + */ + v2005: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v2005.AccountId, + forceProxyType: sts.option(() => v2005.ProxyType), + call: v2005.Type_188, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * P is the number of proxies the user has + * - Base weight: 19.87 + .141 * P µs + * - DB weight: 1 storage read. + * - Plus the weight of the `call` + * # + */ + v2007: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v2007.AccountId, + forceProxyType: sts.option(() => v2007.ProxyType), + call: v2007.Type_189, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * P is the number of proxies the user has + * - Base weight: 19.87 + .141 * P µs + * - DB weight: 1 storage read. + * - Plus the weight of the `call` + * # + */ + v2011: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v2011.AccountId, + forceProxyType: sts.option(() => v2011.ProxyType), + call: v2011.Type_190, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * P is the number of proxies the user has + * - Base weight: 19.87 + .141 * P µs + * - DB weight: 1 storage read. + * - Plus the weight of the `call` + * # + */ + v2013: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v2013.AccountId, + forceProxyType: sts.option(() => v2013.ProxyType), + call: v2013.Type_190, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * P is the number of proxies the user has + * - Base weight: 19.87 + .141 * P µs + * - DB weight: 1 storage read. + * - Plus the weight of the `call` + * # + */ + v2015: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v2015.AccountId, + forceProxyType: sts.option(() => v2015.ProxyType), + call: v2015.Type_192, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * P is the number of proxies the user has + * - Base weight: 19.87 + .141 * P µs + * - DB weight: 1 storage read. + * - Plus the weight of the `call` + * # + */ + v2022: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v2022.AccountId, + forceProxyType: sts.option(() => v2022.ProxyType), + call: v2022.Type_192, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ + v2023: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v2023.AccountId, + forceProxyType: sts.option(() => v2023.ProxyType), + call: v2023.Type_194, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ + v2024: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v2024.AccountId, + forceProxyType: sts.option(() => v2024.ProxyType), + call: v2024.Type_194, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ + v2025: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v2025.AccountId, + forceProxyType: sts.option(() => v2025.ProxyType), + call: v2025.Type_195, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ + v2026: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v2026.AccountId, + forceProxyType: sts.option(() => v2026.ProxyType), + call: v2026.Type_194, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ + v2028: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v2028.AccountId, + forceProxyType: sts.option(() => v2028.ProxyType), + call: v2028.Type_199, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ + v2029: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v2029.AccountId, + forceProxyType: sts.option(() => v2029.ProxyType), + call: v2029.Type_199, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ + v2030: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v2030.AccountId, + forceProxyType: sts.option(() => v2030.ProxyType), + call: v2030.Type_138, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ + v9010: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v9010.AccountId, + forceProxyType: sts.option(() => v9010.ProxyType), + call: v9010.Type_138, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ + v9030: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v9030.AccountId, + forceProxyType: sts.option(() => v9030.ProxyType), + call: v9030.Type_138, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ + v9040: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v9040.AccountId, + forceProxyType: sts.option(() => v9040.ProxyType), + call: v9040.Type_138, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ + v9050: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v9050.AccountId, + forceProxyType: sts.option(() => v9050.ProxyType), + call: v9050.Type_139, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ + v9080: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v9080.AccountId, + forceProxyType: sts.option(() => v9080.ProxyType), + call: v9080.Type_138, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ + v9090: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v9090.AccountId, + forceProxyType: sts.option(() => v9090.ProxyType), + call: v9090.Type_138, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ + v9100: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v9100.AccountId, + forceProxyType: sts.option(() => v9100.ProxyType), + call: v9100.Type_138, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ + v9111: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v9111.AccountId32, + forceProxyType: sts.option(() => v9111.ProxyType), + call: v9111.Call, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ + v9122: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v9122.AccountId32, + forceProxyType: sts.option(() => v9122.ProxyType), + call: v9122.Call, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ + v9130: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v9130.AccountId32, + forceProxyType: sts.option(() => v9130.ProxyType), + call: v9130.Call, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ + v9160: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v9160.AccountId32, + forceProxyType: sts.option(() => v9160.ProxyType), + call: v9160.Call, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ + v9170: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v9170.AccountId32, + forceProxyType: sts.option(() => v9170.ProxyType), + call: v9170.Call, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ + v9180: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v9180.AccountId32, + forceProxyType: sts.option(() => v9180.ProxyType), + call: v9180.Call, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ + v9190: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v9190.AccountId32, + forceProxyType: sts.option(() => v9190.ProxyType), + call: v9190.Call, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ + v9220: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v9220.AccountId32, + forceProxyType: sts.option(() => v9220.ProxyType), + call: v9220.Call, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ + v9230: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v9230.AccountId32, + forceProxyType: sts.option(() => v9230.ProxyType), + call: v9230.Call, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ + v9250: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v9250.AccountId32, + forceProxyType: sts.option(() => v9250.ProxyType), + call: v9250.Call, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ + v9271: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v9271.AccountId32, + forceProxyType: sts.option(() => v9271.ProxyType), + call: v9271.Call, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ + v9291: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v9291.MultiAddress, + forceProxyType: sts.option(() => v9291.ProxyType), + call: v9291.Call, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + */ + v9300: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v9300.MultiAddress, + forceProxyType: sts.option(() => v9300.ProxyType), + call: v9300.Call, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + */ + v9320: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v9320.MultiAddress, + forceProxyType: sts.option(() => v9320.ProxyType), + call: v9320.Call, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + */ + v9340: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v9340.MultiAddress, + forceProxyType: sts.option(() => v9340.ProxyType), + call: v9340.Call, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + */ + v9350: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v9350.MultiAddress, + forceProxyType: sts.option(() => v9350.ProxyType), + call: v9350.Call, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + */ + v9370: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v9370.MultiAddress, + forceProxyType: sts.option(() => v9370.ProxyType), + call: v9370.Call, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + */ + v9381: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v9381.MultiAddress, + forceProxyType: sts.option(() => v9381.ProxyType), + call: v9381.Call, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + */ + v9420: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v9420.MultiAddress, + forceProxyType: sts.option(() => v9420.ProxyType), + call: v9420.Call, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + */ + v9430: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v9430.MultiAddress, + forceProxyType: sts.option(() => v9430.ProxyType), + call: v9430.Call, + }) + ), + /** + * See [`Pallet::proxy`]. + */ + v1000000: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v1000000.MultiAddress, + forceProxyType: sts.option(() => v1000000.ProxyType), + call: v1000000.Call, + }) + ), + /** + * See [`Pallet::proxy`]. + */ + v1001000: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v1001000.MultiAddress, + forceProxyType: sts.option(() => v1001000.ProxyType), + call: v1001000.Call, + }) + ), + /** + * See [`Pallet::proxy`]. + */ + v1002000: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v1002000.MultiAddress, + forceProxyType: sts.option(() => v1002000.ProxyType), + call: v1002000.Call, + }) + ), + /** + * See [`Pallet::proxy`]. + */ + v1002004: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v1002004.MultiAddress, + forceProxyType: sts.option(() => v1002004.ProxyType), + call: v1002004.Call, + }) + ), + /** + * See [`Pallet::proxy`]. + */ + v1002005: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v1002005.MultiAddress, + forceProxyType: sts.option(() => v1002005.ProxyType), + call: v1002005.Call, + }) + ), + /** + * See [`Pallet::proxy`]. + */ + v1002006: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v1002006.MultiAddress, + forceProxyType: sts.option(() => v1002006.ProxyType), + call: v1002006.Call, + }) + ), + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + */ + v1003000: new CallType( + 'Proxy.proxy', + sts.struct({ + real: v1003000.MultiAddress, + forceProxyType: sts.option(() => v1003000.ProxyType), + call: v1003000.Call, + }) + ), +} + +export const removeProxies = { + name: 'Proxy.remove_proxies', + /** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * P is the number of proxies the user has + * - Base weight: 13.73 + .129 * P µs + * - DB weight: 1 storage read and write. + * # + */ + v2005: new CallType( + 'Proxy.remove_proxies', + sts.unit() + ), +} + +export const killPure = { + name: 'Proxy.kill_pure', + /** + * Removes a previously spawned pure proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `pure` with corresponding parameters. + * + * - `spawner`: The account that originally called `pure` to create this account. + * - `index`: The disambiguation index originally passed to `pure`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `pure`. + * - `height`: The height of the chain when the call to `pure` was processed. + * - `ext_index`: The extrinsic index in which the call to `pure` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created pure + * account whose `pure` call has corresponding parameters. + */ + v9300: new CallType( + 'Proxy.kill_pure', + sts.struct({ + spawner: v9300.MultiAddress, + proxyType: v9300.ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }) + ), + /** + * Removes a previously spawned pure proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `pure` with corresponding parameters. + * + * - `spawner`: The account that originally called `pure` to create this account. + * - `index`: The disambiguation index originally passed to `pure`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `pure`. + * - `height`: The height of the chain when the call to `pure` was processed. + * - `ext_index`: The extrinsic index in which the call to `pure` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created pure + * account whose `pure` call has corresponding parameters. + */ + v9420: new CallType( + 'Proxy.kill_pure', + sts.struct({ + spawner: v9420.MultiAddress, + proxyType: v9420.ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }) + ), + /** + * See [`Pallet::kill_pure`]. + */ + v1002006: new CallType( + 'Proxy.kill_pure', + sts.struct({ + spawner: v1002006.MultiAddress, + proxyType: v1002006.ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }) + ), + /** + * Removes a previously spawned pure proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `pure` with corresponding parameters. + * + * - `spawner`: The account that originally called `pure` to create this account. + * - `index`: The disambiguation index originally passed to `pure`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `pure`. + * - `height`: The height of the chain when the call to `pure` was processed. + * - `ext_index`: The extrinsic index in which the call to `pure` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created pure + * account whose `pure` call has corresponding parameters. + */ + v1003000: new CallType( + 'Proxy.kill_pure', + sts.struct({ + spawner: v1003000.MultiAddress, + proxyType: v1003000.ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }) + ), +} diff --git a/squid/src/types/proxy/events.ts b/squid/src/types/proxy/events.ts new file mode 100644 index 00000000..2c773c7a --- /dev/null +++ b/squid/src/types/proxy/events.ts @@ -0,0 +1,227 @@ +import {sts, Block, Bytes, Option, Result, EventType, RuntimeCtx} from '../support' +import * as v2005 from '../v2005' +import * as v9111 from '../v9111' +import * as v9130 from '../v9130' +import * as v9180 from '../v9180' +import * as v9190 from '../v9190' +import * as v9300 from '../v9300' +import * as v9420 from '../v9420' +import * as v1002006 from '../v1002006' +import * as v1003000 from '../v1003000' + +export const anonymousCreated = { + name: 'Proxy.AnonymousCreated', + /** + * Anonymous account (first parameter) has been created by new proxy (second) with given + * disambiguation index and proxy type. + */ + v2005: new EventType( + 'Proxy.AnonymousCreated', + sts.tuple([v2005.AccountId, v2005.AccountId, v2005.ProxyType, sts.number()]) + ), + /** + * Anonymous account has been created by new proxy with given + * disambiguation index and proxy type. + */ + v9130: new EventType( + 'Proxy.AnonymousCreated', + sts.struct({ + anonymous: v9130.AccountId32, + who: v9130.AccountId32, + proxyType: v9130.ProxyType, + disambiguationIndex: sts.number(), + }) + ), + /** + * Anonymous account has been created by new proxy with given + * disambiguation index and proxy type. + */ + v9180: new EventType( + 'Proxy.AnonymousCreated', + sts.struct({ + anonymous: v9180.AccountId32, + who: v9180.AccountId32, + proxyType: v9180.ProxyType, + disambiguationIndex: sts.number(), + }) + ), +} + +export const proxyAdded = { + name: 'Proxy.ProxyAdded', + /** + * A proxy was added. \[delegator, delegatee, proxy_type, delay\] + */ + v9111: new EventType( + 'Proxy.ProxyAdded', + sts.tuple([v9111.AccountId32, v9111.AccountId32, v9111.ProxyType, sts.number()]) + ), + /** + * A proxy was added. + */ + v9130: new EventType( + 'Proxy.ProxyAdded', + sts.struct({ + delegator: v9130.AccountId32, + delegatee: v9130.AccountId32, + proxyType: v9130.ProxyType, + delay: sts.number(), + }) + ), + /** + * A proxy was added. + */ + v9180: new EventType( + 'Proxy.ProxyAdded', + sts.struct({ + delegator: v9180.AccountId32, + delegatee: v9180.AccountId32, + proxyType: v9180.ProxyType, + delay: sts.number(), + }) + ), + /** + * A proxy was added. + */ + v9420: new EventType( + 'Proxy.ProxyAdded', + sts.struct({ + delegator: v9420.AccountId32, + delegatee: v9420.AccountId32, + proxyType: v9420.ProxyType, + delay: sts.number(), + }) + ), + /** + * A proxy was added. + */ + v1002006: new EventType( + 'Proxy.ProxyAdded', + sts.struct({ + delegator: v1002006.AccountId32, + delegatee: v1002006.AccountId32, + proxyType: v1002006.ProxyType, + delay: sts.number(), + }) + ), + /** + * A proxy was added. + */ + v1003000: new EventType( + 'Proxy.ProxyAdded', + sts.struct({ + delegator: v1003000.AccountId32, + delegatee: v1003000.AccountId32, + proxyType: v1003000.ProxyType, + delay: sts.number(), + }) + ), +} + +export const proxyRemoved = { + name: 'Proxy.ProxyRemoved', + /** + * A proxy was removed. + */ + v9190: new EventType( + 'Proxy.ProxyRemoved', + sts.struct({ + delegator: v9190.AccountId32, + delegatee: v9190.AccountId32, + proxyType: v9190.ProxyType, + delay: sts.number(), + }) + ), + /** + * A proxy was removed. + */ + v9420: new EventType( + 'Proxy.ProxyRemoved', + sts.struct({ + delegator: v9420.AccountId32, + delegatee: v9420.AccountId32, + proxyType: v9420.ProxyType, + delay: sts.number(), + }) + ), + /** + * A proxy was removed. + */ + v1002006: new EventType( + 'Proxy.ProxyRemoved', + sts.struct({ + delegator: v1002006.AccountId32, + delegatee: v1002006.AccountId32, + proxyType: v1002006.ProxyType, + delay: sts.number(), + }) + ), + /** + * A proxy was removed. + */ + v1003000: new EventType( + 'Proxy.ProxyRemoved', + sts.struct({ + delegator: v1003000.AccountId32, + delegatee: v1003000.AccountId32, + proxyType: v1003000.ProxyType, + delay: sts.number(), + }) + ), +} + +export const pureCreated = { + name: 'Proxy.PureCreated', + /** + * A pure account has been created by new proxy with given + * disambiguation index and proxy type. + */ + v9300: new EventType( + 'Proxy.PureCreated', + sts.struct({ + pure: v9300.AccountId32, + who: v9300.AccountId32, + proxyType: v9300.ProxyType, + disambiguationIndex: sts.number(), + }) + ), + /** + * A pure account has been created by new proxy with given + * disambiguation index and proxy type. + */ + v9420: new EventType( + 'Proxy.PureCreated', + sts.struct({ + pure: v9420.AccountId32, + who: v9420.AccountId32, + proxyType: v9420.ProxyType, + disambiguationIndex: sts.number(), + }) + ), + /** + * A pure account has been created by new proxy with given + * disambiguation index and proxy type. + */ + v1002006: new EventType( + 'Proxy.PureCreated', + sts.struct({ + pure: v1002006.AccountId32, + who: v1002006.AccountId32, + proxyType: v1002006.ProxyType, + disambiguationIndex: sts.number(), + }) + ), + /** + * A pure account has been created by new proxy with given + * disambiguation index and proxy type. + */ + v1003000: new EventType( + 'Proxy.PureCreated', + sts.struct({ + pure: v1003000.AccountId32, + who: v1003000.AccountId32, + proxyType: v1003000.ProxyType, + disambiguationIndex: sts.number(), + }) + ), +} diff --git a/squid/src/types/support.ts b/squid/src/types/support.ts new file mode 100644 index 00000000..456dfc2f --- /dev/null +++ b/squid/src/types/support.ts @@ -0,0 +1,142 @@ +import type {BitSequence, Bytes, QualifiedName, Runtime} from '@subsquid/substrate-runtime' +import * as sts from '@subsquid/substrate-runtime/lib/sts' +import {Option, Result} from '@subsquid/substrate-runtime/lib/sts' +import assert from 'assert' + + +export {sts, Bytes, BitSequence, Option, Result} + + +export interface RuntimeCtx { + _runtime: Runtime +} + + +export interface Block extends RuntimeCtx { + hash: Bytes + height: number +} + + +interface Event { + block: RuntimeCtx + name: QualifiedName + args: unknown +} + + +interface Call { + block: RuntimeCtx + name: QualifiedName + args: unknown +} + + +export class EventType { + constructor(public readonly name: QualifiedName, private type: T) {} + + matches(block: RuntimeCtx): boolean { + return block._runtime.events.checkType(this.name, this.type) + } + + is(event: Event): boolean { + return this.name == event.name && this.matches(event.block) + } + + decode(event: Event): sts.GetType { + assert(this.is(event)) + return event.block._runtime.decodeJsonEventRecordArguments(event) + } +} + + +export class CallType { + constructor(public readonly name: QualifiedName, private type: T) {} + + matches(block: RuntimeCtx): boolean { + return block._runtime.calls.checkType(this.name, this.type) + } + + is(call: Call): boolean { + return this.name == call.name && this.matches(call.block) + } + + decode(call: Call): sts.GetType { + assert(this.is(call)) + return call.block._runtime.decodeJsonCallRecordArguments(call) + } +} + + +export class ConstantType { + constructor(private name: QualifiedName, private type: T) {} + + is(block: RuntimeCtx): boolean { + return block._runtime.checkConstantType(this.name, this.type) + } + + get(block: RuntimeCtx): sts.GetType { + assert(this.is(block)) + return block._runtime.getConstant(this.name) + } +} + + +export class StorageType { + constructor( + private name: QualifiedName, + private modifier: 'Required' | 'Optional' | 'Default', + private key: sts.Type[], + private value: sts.Type + ) {} + + is(block: RuntimeCtx): boolean { + return block._runtime.checkStorageType(this.name, this.modifier, this.key, this.value) + } + + async get(block: Block, ...key: any[]): Promise { + assert(this.is(block)) + return block._runtime.getStorage(block.hash, this.name, ...key) + } + + async getAll(block: Block): Promise { + assert(this.is(block)) + return block._runtime.queryStorage(block.hash, this.name) + } + + async getMany(block: Block, keys: any[]): Promise { + assert(this.is(block)) + return block._runtime.queryStorage(block.hash, this.name, keys) + } + + async getKeys(block: Block, ...args: any[]): Promise { + assert(this.is(block)) + return block._runtime.getStorageKeys(block.hash, this.name, ...args) + } + + async getRawKeys(block: Block, ...args: any[]): Promise { + assert(this.is(block)) + return block._runtime.getStorageRawKeys(block.hash, this.name, ...args) + } + + getKeysPaged(pageSize: number, block: Block, ...args: any[]): AsyncIterable { + assert(this.is(block)) + return block._runtime.getStorageKeysPaged(pageSize, block.hash, this.name, ...args) + } + + async getPairs(block: Block, ...args: any[]): Promise<[key: any, value: any][]> { + assert(this.is(block)) + return block._runtime.getStoragePairs(block.hash, this.name, ...args) + } + + getPairsPaged(pageSize: number, block: Block, ...args: any[]): AsyncIterable<[key: any, value: any][]> { + assert(this.is(block)) + return block._runtime.getStoragePairsPaged(pageSize, block.hash, this.name, ...args) + } + + getDefault(block: Block): any { + assert(this.modifier == 'Default') + assert(this.is(block)) + return block._runtime.getStorageFallback(this.name) + } +} diff --git a/squid/src/types/v1000000.ts b/squid/src/types/v1000000.ts new file mode 100644 index 00000000..249b64eb --- /dev/null +++ b/squid/src/types/v1000000.ts @@ -0,0 +1,10405 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Weight: sts.Type = sts.struct(() => { + return { + refTime: sts.bigint(), + proofSize: sts.bigint(), + } +}) + +export interface Weight { + refTime: bigint + proofSize: bigint +} + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: sts.number(), + index: sts.number(), + } +}) + +export interface Timepoint { + height: number + index: number +} + +export const AccountId32 = sts.bytes() + +export const Call: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + Babe: BabeCall, + Balances: BalancesCall, + Beefy: BeefyCall, + Bounties: BountiesCall, + ChildBounties: ChildBountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + ConvictionVoting: ConvictionVotingCall, + Crowdloan: CrowdloanCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + FastUnstake: FastUnstakeCall, + FellowshipCollective: FellowshipCollectiveCall, + FellowshipReferenda: FellowshipReferendaCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Initializer: InitializerCall, + MessageQueue: MessageQueueCall, + Multisig: MultisigCall, + Nis: NisCall, + NisCounterpartBalances: NisCounterpartBalancesCall, + NominationPools: NominationPoolsCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Paras: ParasCall, + ParasDisputes: ParasDisputesCall, + ParasShared: ParasSharedCall, + ParasSlashing: ParasSlashingCall, + Preimage: PreimageCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Referenda: ReferendaCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + StateTrieMigration: StateTrieMigrationCall, + System: SystemCall, + Timestamp: TimestampCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + VoterList: VoterListCall, + Whitelist: WhitelistCall, + XcmPallet: XcmPalletCall, + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + execute: sts.enumStruct({ + message: Type_447, + maxWeight: Weight, + }), + force_default_xcm_version: sts.enumStruct({ + maybeXcmVersion: sts.option(() => sts.number()), + }), + force_subscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_suspension: sts.enumStruct({ + suspended: sts.boolean(), + }), + force_unsubscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_xcm_version: sts.enumStruct({ + location: V3MultiLocation, + version: sts.number(), + }), + limited_reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V3WeightLimit, + }), + limited_teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V3WeightLimit, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + send: sts.enumStruct({ + dest: VersionedMultiLocation, + message: VersionedXcm, + }), + teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + } +}) + +export const VersionedXcm: sts.Type = sts.closedEnum(() => { + return { + V2: sts.array(() => V2Instruction), + V3: sts.array(() => V3Instruction), + } +}) + +export const V3Instruction: sts.Type = sts.closedEnum(() => { + return { + AliasOrigin: V3MultiLocation, + BurnAsset: sts.array(() => V3MultiAsset), + BuyExecution: sts.enumStruct({ + fees: V3MultiAsset, + weightLimit: V3WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + ticket: V3MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + ClearTopic: sts.unit(), + ClearTransactStatus: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + beneficiary: V3MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + DescendOrigin: V3Junctions, + ExchangeAsset: sts.enumStruct({ + give: V3MultiAssetFilter, + want: sts.array(() => V3MultiAsset), + maximal: sts.boolean(), + }), + ExpectAsset: sts.array(() => V3MultiAsset), + ExpectError: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + ExpectOrigin: sts.option(() => V3MultiLocation), + ExpectPallet: sts.enumStruct({ + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + crateMajor: sts.number(), + minCrateMinor: sts.number(), + }), + ExpectTransactStatus: V3MaybeErrorCode, + ExportMessage: sts.enumStruct({ + network: V3NetworkId, + destination: V3Junctions, + xcm: sts.array(() => V3Instruction), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V3MultiAssetFilter, + reserve: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + LockAsset: sts.enumStruct({ + asset: V3MultiAsset, + unlocker: V3MultiLocation, + }), + NoteUnlockable: sts.enumStruct({ + asset: V3MultiAsset, + owner: V3MultiLocation, + }), + QueryPallet: sts.enumStruct({ + moduleName: sts.bytes(), + responseInfo: V3QueryResponseInfo, + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V3Response, + maxWeight: Weight, + querier: sts.option(() => V3MultiLocation), + }), + ReceiveTeleportedAsset: sts.array(() => V3MultiAsset), + RefundSurplus: sts.unit(), + ReportError: V3QueryResponseInfo, + ReportHolding: sts.enumStruct({ + responseInfo: V3QueryResponseInfo, + assets: V3MultiAssetFilter, + }), + ReportTransactStatus: V3QueryResponseInfo, + RequestUnlock: sts.enumStruct({ + asset: V3MultiAsset, + locker: V3MultiLocation, + }), + ReserveAssetDeposited: sts.array(() => V3MultiAsset), + SetAppendix: sts.array(() => V3Instruction), + SetErrorHandler: sts.array(() => V3Instruction), + SetFeesMode: sts.enumStruct({ + jitWithdraw: sts.boolean(), + }), + SetTopic: sts.bytes(), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: Weight, + }), + Transact: sts.enumStruct({ + originKind: V2OriginKind, + requireWeightAtMost: Weight, + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + beneficiary: V3MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + Trap: sts.bigint(), + UniversalOrigin: V3Junction, + UnlockAsset: sts.enumStruct({ + asset: V3MultiAsset, + target: V3MultiLocation, + }), + UnpaidExecution: sts.enumStruct({ + weightLimit: V3WeightLimit, + checkOrigin: sts.option(() => V3MultiLocation), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V3MultiAsset), + } +}) + +export const V3Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: sts.option(() => V3NetworkId), + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: sts.option(() => V3NetworkId), + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: sts.option(() => V3NetworkId), + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.enumStruct({ + length: sts.number(), + data: sts.bytes(), + }), + GlobalConsensus: V3NetworkId, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V3BodyId, + part: V3BodyPart, + }), + } +}) + +export const V3BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export type V3BodyPart = V3BodyPart_AtLeastProportion | V3BodyPart_Fraction | V3BodyPart_Members | V3BodyPart_MoreThanProportion | V3BodyPart_Voice + +export interface V3BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V3BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V3BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V3BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V3BodyPart_Voice { + __kind: 'Voice' +} + +export const V3BodyId: sts.Type = sts.closedEnum(() => { + return { + Administration: sts.unit(), + Defense: sts.unit(), + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Moniker: sts.bytes(), + Technical: sts.unit(), + Treasury: sts.unit(), + Unit: sts.unit(), + } +}) + +export type V3BodyId = V3BodyId_Administration | V3BodyId_Defense | V3BodyId_Executive | V3BodyId_Index | V3BodyId_Judicial | V3BodyId_Legislative | V3BodyId_Moniker | V3BodyId_Technical | V3BodyId_Treasury | V3BodyId_Unit + +export interface V3BodyId_Administration { + __kind: 'Administration' +} + +export interface V3BodyId_Defense { + __kind: 'Defense' +} + +export interface V3BodyId_Executive { + __kind: 'Executive' +} + +export interface V3BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V3BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V3BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V3BodyId_Moniker { + __kind: 'Moniker' + value: Bytes +} + +export interface V3BodyId_Technical { + __kind: 'Technical' +} + +export interface V3BodyId_Treasury { + __kind: 'Treasury' +} + +export interface V3BodyId_Unit { + __kind: 'Unit' +} + +export type V3Junction = V3Junction_AccountId32 | V3Junction_AccountIndex64 | V3Junction_AccountKey20 | V3Junction_GeneralIndex | V3Junction_GeneralKey | V3Junction_GlobalConsensus | V3Junction_OnlyChild | V3Junction_PalletInstance | V3Junction_Parachain | V3Junction_Plurality + +export interface V3Junction_AccountId32 { + __kind: 'AccountId32' + network?: (V3NetworkId | undefined) + id: Bytes +} + +export interface V3Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network?: (V3NetworkId | undefined) + index: bigint +} + +export interface V3Junction_AccountKey20 { + __kind: 'AccountKey20' + network?: (V3NetworkId | undefined) + key: Bytes +} + +export interface V3Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V3Junction_GeneralKey { + __kind: 'GeneralKey' + length: number + data: Bytes +} + +export interface V3Junction_GlobalConsensus { + __kind: 'GlobalConsensus' + value: V3NetworkId +} + +export interface V3Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V3Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V3Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V3Junction_Plurality { + __kind: 'Plurality' + id: V3BodyId + part: V3BodyPart +} + +export type V3NetworkId = V3NetworkId_BitcoinCash | V3NetworkId_BitcoinCore | V3NetworkId_ByFork | V3NetworkId_ByGenesis | V3NetworkId_Ethereum | V3NetworkId_Kusama | V3NetworkId_Polkadot | V3NetworkId_Rococo | V3NetworkId_Westend | V3NetworkId_Wococo + +export interface V3NetworkId_BitcoinCash { + __kind: 'BitcoinCash' +} + +export interface V3NetworkId_BitcoinCore { + __kind: 'BitcoinCore' +} + +export interface V3NetworkId_ByFork { + __kind: 'ByFork' + blockNumber: bigint + blockHash: Bytes +} + +export interface V3NetworkId_ByGenesis { + __kind: 'ByGenesis' + value: Bytes +} + +export interface V3NetworkId_Ethereum { + __kind: 'Ethereum' + chainId: bigint +} + +export interface V3NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V3NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export interface V3NetworkId_Rococo { + __kind: 'Rococo' +} + +export interface V3NetworkId_Westend { + __kind: 'Westend' +} + +export interface V3NetworkId_Wococo { + __kind: 'Wococo' +} + +export const DoubleEncoded: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncoded { + encoded: Bytes +} + +export const V2OriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type V2OriginKind = V2OriginKind_Native | V2OriginKind_SovereignAccount | V2OriginKind_Superuser | V2OriginKind_Xcm + +export interface V2OriginKind_Native { + __kind: 'Native' +} + +export interface V2OriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface V2OriginKind_Superuser { + __kind: 'Superuser' +} + +export interface V2OriginKind_Xcm { + __kind: 'Xcm' +} + +export const V3Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V3MultiAsset), + DispatchResult: V3MaybeErrorCode, + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + Null: sts.unit(), + PalletsInfo: sts.array(() => V3PalletInfo), + Version: sts.number(), + } +}) + +export const V3PalletInfo: sts.Type = sts.struct(() => { + return { + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + major: sts.number(), + minor: sts.number(), + patch: sts.number(), + } +}) + +export interface V3PalletInfo { + index: number + name: Bytes + moduleName: Bytes + major: number + minor: number + patch: number +} + +export type V3Response = V3Response_Assets | V3Response_DispatchResult | V3Response_ExecutionResult | V3Response_Null | V3Response_PalletsInfo | V3Response_Version + +export interface V3Response_Assets { + __kind: 'Assets' + value: V3MultiAsset[] +} + +export interface V3Response_DispatchResult { + __kind: 'DispatchResult' + value: V3MaybeErrorCode +} + +export interface V3Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V3Error] | undefined) +} + +export interface V3Response_Null { + __kind: 'Null' +} + +export interface V3Response_PalletsInfo { + __kind: 'PalletsInfo' + value: V3PalletInfo[] +} + +export interface V3Response_Version { + __kind: 'Version' + value: number +} + +export type V3Error = V3Error_AssetNotFound | V3Error_BadOrigin | V3Error_Barrier | V3Error_DestinationUnsupported | V3Error_ExceedsMaxMessageSize | V3Error_ExceedsStackLimit | V3Error_ExpectationFalse | V3Error_ExportError | V3Error_FailedToDecode | V3Error_FailedToTransactAsset | V3Error_FeesNotMet | V3Error_HoldingWouldOverflow | V3Error_InvalidLocation | V3Error_LocationCannotHold | V3Error_LocationFull | V3Error_LocationNotInvertible | V3Error_LockError | V3Error_MaxWeightInvalid | V3Error_NameMismatch | V3Error_NoDeal | V3Error_NoPermission | V3Error_NotDepositable | V3Error_NotHoldingFees | V3Error_NotWithdrawable | V3Error_Overflow | V3Error_PalletNotFound | V3Error_ReanchorFailed | V3Error_TooExpensive | V3Error_Transport | V3Error_Trap | V3Error_Unanchored | V3Error_UnhandledXcmVersion | V3Error_Unimplemented | V3Error_UnknownClaim | V3Error_Unroutable | V3Error_UntrustedReserveLocation | V3Error_UntrustedTeleportLocation | V3Error_VersionIncompatible | V3Error_WeightLimitReached | V3Error_WeightNotComputable + +export interface V3Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V3Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V3Error_Barrier { + __kind: 'Barrier' +} + +export interface V3Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V3Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V3Error_ExceedsStackLimit { + __kind: 'ExceedsStackLimit' +} + +export interface V3Error_ExpectationFalse { + __kind: 'ExpectationFalse' +} + +export interface V3Error_ExportError { + __kind: 'ExportError' +} + +export interface V3Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V3Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V3Error_FeesNotMet { + __kind: 'FeesNotMet' +} + +export interface V3Error_HoldingWouldOverflow { + __kind: 'HoldingWouldOverflow' +} + +export interface V3Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V3Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V3Error_LocationFull { + __kind: 'LocationFull' +} + +export interface V3Error_LocationNotInvertible { + __kind: 'LocationNotInvertible' +} + +export interface V3Error_LockError { + __kind: 'LockError' +} + +export interface V3Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V3Error_NameMismatch { + __kind: 'NameMismatch' +} + +export interface V3Error_NoDeal { + __kind: 'NoDeal' +} + +export interface V3Error_NoPermission { + __kind: 'NoPermission' +} + +export interface V3Error_NotDepositable { + __kind: 'NotDepositable' +} + +export interface V3Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V3Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V3Error_Overflow { + __kind: 'Overflow' +} + +export interface V3Error_PalletNotFound { + __kind: 'PalletNotFound' +} + +export interface V3Error_ReanchorFailed { + __kind: 'ReanchorFailed' +} + +export interface V3Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V3Error_Transport { + __kind: 'Transport' +} + +export interface V3Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V3Error_Unanchored { + __kind: 'Unanchored' +} + +export interface V3Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V3Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V3Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V3Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V3Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V3Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V3Error_VersionIncompatible { + __kind: 'VersionIncompatible' +} + +export interface V3Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: Weight +} + +export interface V3Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V3MaybeErrorCode = V3MaybeErrorCode_Error | V3MaybeErrorCode_Success | V3MaybeErrorCode_TruncatedError + +export interface V3MaybeErrorCode_Error { + __kind: 'Error' + value: Bytes +} + +export interface V3MaybeErrorCode_Success { + __kind: 'Success' +} + +export interface V3MaybeErrorCode_TruncatedError { + __kind: 'TruncatedError' + value: Bytes +} + +export interface V3MultiAsset { + id: V3AssetId + fun: V3Fungibility +} + +export type V3Fungibility = V3Fungibility_Fungible | V3Fungibility_NonFungible + +export interface V3Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V3Fungibility_NonFungible { + __kind: 'NonFungible' + value: V3AssetInstance +} + +export type V3AssetInstance = V3AssetInstance_Array16 | V3AssetInstance_Array32 | V3AssetInstance_Array4 | V3AssetInstance_Array8 | V3AssetInstance_Index | V3AssetInstance_Undefined + +export interface V3AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V3AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V3AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V3AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V3AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V3AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V3AssetId = V3AssetId_Abstract | V3AssetId_Concrete + +export interface V3AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V3AssetId_Concrete { + __kind: 'Concrete' + value: V3MultiLocation +} + +export interface V3MultiLocation { + parents: number + interior: V3Junctions +} + +export type V3Junctions = V3Junctions_Here | V3Junctions_X1 | V3Junctions_X2 | V3Junctions_X3 | V3Junctions_X4 | V3Junctions_X5 | V3Junctions_X6 | V3Junctions_X7 | V3Junctions_X8 + +export interface V3Junctions_Here { + __kind: 'Here' +} + +export interface V3Junctions_X1 { + __kind: 'X1' + value: V3Junction +} + +export interface V3Junctions_X2 { + __kind: 'X2' + value: [V3Junction, V3Junction] +} + +export interface V3Junctions_X3 { + __kind: 'X3' + value: [V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X4 { + __kind: 'X4' + value: [V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X5 { + __kind: 'X5' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X6 { + __kind: 'X6' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X7 { + __kind: 'X7' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X8 { + __kind: 'X8' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export const V3QueryResponseInfo: sts.Type = sts.struct(() => { + return { + destination: V3MultiLocation, + queryId: sts.bigint(), + maxWeight: Weight, + } +}) + +export interface V3QueryResponseInfo { + destination: V3MultiLocation + queryId: bigint + maxWeight: Weight +} + +export const V3NetworkId: sts.Type = sts.closedEnum(() => { + return { + BitcoinCash: sts.unit(), + BitcoinCore: sts.unit(), + ByFork: sts.enumStruct({ + blockNumber: sts.bigint(), + blockHash: sts.bytes(), + }), + ByGenesis: sts.bytes(), + Ethereum: sts.enumStruct({ + chainId: sts.bigint(), + }), + Kusama: sts.unit(), + Polkadot: sts.unit(), + Rococo: sts.unit(), + Westend: sts.unit(), + Wococo: sts.unit(), + } +}) + +export const V3MaybeErrorCode: sts.Type = sts.closedEnum(() => { + return { + Error: sts.bytes(), + Success: sts.unit(), + TruncatedError: sts.bytes(), + } +}) + +export const V3Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + ExceedsStackLimit: sts.unit(), + ExpectationFalse: sts.unit(), + ExportError: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + FeesNotMet: sts.unit(), + HoldingWouldOverflow: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + LocationFull: sts.unit(), + LocationNotInvertible: sts.unit(), + LockError: sts.unit(), + MaxWeightInvalid: sts.unit(), + NameMismatch: sts.unit(), + NoDeal: sts.unit(), + NoPermission: sts.unit(), + NotDepositable: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + PalletNotFound: sts.unit(), + ReanchorFailed: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + Unanchored: sts.unit(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + VersionIncompatible: sts.unit(), + WeightLimitReached: Weight, + WeightNotComputable: sts.unit(), + } +}) + +export const V3Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V3Junction, + X2: sts.tuple(() => [V3Junction, V3Junction]), + X3: sts.tuple(() => [V3Junction, V3Junction, V3Junction]), + X4: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction]), + X5: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + X6: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + X7: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + X8: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + } +}) + +export const V3MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V3MultiAsset), + Wild: V3WildMultiAsset, + } +}) + +export const V3WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllCounted: sts.number(), + AllOf: sts.enumStruct({ + id: V3AssetId, + fun: V3WildFungibility, + }), + AllOfCounted: sts.enumStruct({ + id: V3AssetId, + fun: V3WildFungibility, + count: sts.number(), + }), + } +}) + +export const V3WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V3WildFungibility = V3WildFungibility_Fungible | V3WildFungibility_NonFungible + +export interface V3WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V3WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V3AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V3MultiLocation, + } +}) + +export type V3WildMultiAsset = V3WildMultiAsset_All | V3WildMultiAsset_AllCounted | V3WildMultiAsset_AllOf | V3WildMultiAsset_AllOfCounted + +export interface V3WildMultiAsset_All { + __kind: 'All' +} + +export interface V3WildMultiAsset_AllCounted { + __kind: 'AllCounted' + value: number +} + +export interface V3WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V3AssetId + fun: V3WildFungibility +} + +export interface V3WildMultiAsset_AllOfCounted { + __kind: 'AllOfCounted' + id: V3AssetId + fun: V3WildFungibility + count: number +} + +export type V3MultiAssetFilter = V3MultiAssetFilter_Definite | V3MultiAssetFilter_Wild + +export interface V3MultiAssetFilter_Definite { + __kind: 'Definite' + value: V3MultiAsset[] +} + +export interface V3MultiAssetFilter_Wild { + __kind: 'Wild' + value: V3WildMultiAsset +} + +export const V3MultiAsset: sts.Type = sts.struct(() => { + return { + id: V3AssetId, + fun: V3Fungibility, + } +}) + +export const V3Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V3AssetInstance, + } +}) + +export const V3AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V3Instruction = V3Instruction_AliasOrigin | V3Instruction_BurnAsset | V3Instruction_BuyExecution | V3Instruction_ClaimAsset | V3Instruction_ClearError | V3Instruction_ClearOrigin | V3Instruction_ClearTopic | V3Instruction_ClearTransactStatus | V3Instruction_DepositAsset | V3Instruction_DepositReserveAsset | V3Instruction_DescendOrigin | V3Instruction_ExchangeAsset | V3Instruction_ExpectAsset | V3Instruction_ExpectError | V3Instruction_ExpectOrigin | V3Instruction_ExpectPallet | V3Instruction_ExpectTransactStatus | V3Instruction_ExportMessage | V3Instruction_HrmpChannelAccepted | V3Instruction_HrmpChannelClosing | V3Instruction_HrmpNewChannelOpenRequest | V3Instruction_InitiateReserveWithdraw | V3Instruction_InitiateTeleport | V3Instruction_LockAsset | V3Instruction_NoteUnlockable | V3Instruction_QueryPallet | V3Instruction_QueryResponse | V3Instruction_ReceiveTeleportedAsset | V3Instruction_RefundSurplus | V3Instruction_ReportError | V3Instruction_ReportHolding | V3Instruction_ReportTransactStatus | V3Instruction_RequestUnlock | V3Instruction_ReserveAssetDeposited | V3Instruction_SetAppendix | V3Instruction_SetErrorHandler | V3Instruction_SetFeesMode | V3Instruction_SetTopic | V3Instruction_SubscribeVersion | V3Instruction_Transact | V3Instruction_TransferAsset | V3Instruction_TransferReserveAsset | V3Instruction_Trap | V3Instruction_UniversalOrigin | V3Instruction_UnlockAsset | V3Instruction_UnpaidExecution | V3Instruction_UnsubscribeVersion | V3Instruction_WithdrawAsset + +export interface V3Instruction_AliasOrigin { + __kind: 'AliasOrigin' + value: V3MultiLocation +} + +export interface V3Instruction_BurnAsset { + __kind: 'BurnAsset' + value: V3MultiAsset[] +} + +export interface V3Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V3MultiAsset + weightLimit: V3WeightLimit +} + +export interface V3Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V3MultiAsset[] + ticket: V3MultiLocation +} + +export interface V3Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V3Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V3Instruction_ClearTopic { + __kind: 'ClearTopic' +} + +export interface V3Instruction_ClearTransactStatus { + __kind: 'ClearTransactStatus' +} + +export interface V3Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V3MultiAssetFilter + beneficiary: V3MultiLocation +} + +export interface V3Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V3Junctions +} + +export interface V3Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V3MultiAssetFilter + want: V3MultiAsset[] + maximal: boolean +} + +export interface V3Instruction_ExpectAsset { + __kind: 'ExpectAsset' + value: V3MultiAsset[] +} + +export interface V3Instruction_ExpectError { + __kind: 'ExpectError' + value?: ([number, V3Error] | undefined) +} + +export interface V3Instruction_ExpectOrigin { + __kind: 'ExpectOrigin' + value?: (V3MultiLocation | undefined) +} + +export interface V3Instruction_ExpectPallet { + __kind: 'ExpectPallet' + index: number + name: Bytes + moduleName: Bytes + crateMajor: number + minCrateMinor: number +} + +export interface V3Instruction_ExpectTransactStatus { + __kind: 'ExpectTransactStatus' + value: V3MaybeErrorCode +} + +export interface V3Instruction_ExportMessage { + __kind: 'ExportMessage' + network: V3NetworkId + destination: V3Junctions + xcm: V3Instruction[] +} + +export interface V3Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V3Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V3Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V3Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V3MultiAssetFilter + reserve: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_LockAsset { + __kind: 'LockAsset' + asset: V3MultiAsset + unlocker: V3MultiLocation +} + +export interface V3Instruction_NoteUnlockable { + __kind: 'NoteUnlockable' + asset: V3MultiAsset + owner: V3MultiLocation +} + +export interface V3Instruction_QueryPallet { + __kind: 'QueryPallet' + moduleName: Bytes + responseInfo: V3QueryResponseInfo +} + +export interface V3Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V3Response + maxWeight: Weight + querier?: (V3MultiLocation | undefined) +} + +export interface V3Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V3MultiAsset[] +} + +export interface V3Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V3Instruction_ReportError { + __kind: 'ReportError' + value: V3QueryResponseInfo +} + +export interface V3Instruction_ReportHolding { + __kind: 'ReportHolding' + responseInfo: V3QueryResponseInfo + assets: V3MultiAssetFilter +} + +export interface V3Instruction_ReportTransactStatus { + __kind: 'ReportTransactStatus' + value: V3QueryResponseInfo +} + +export interface V3Instruction_RequestUnlock { + __kind: 'RequestUnlock' + asset: V3MultiAsset + locker: V3MultiLocation +} + +export interface V3Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V3MultiAsset[] +} + +export interface V3Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V3Instruction[] +} + +export interface V3Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V3Instruction[] +} + +export interface V3Instruction_SetFeesMode { + __kind: 'SetFeesMode' + jitWithdraw: boolean +} + +export interface V3Instruction_SetTopic { + __kind: 'SetTopic' + value: Bytes +} + +export interface V3Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: Weight +} + +export interface V3Instruction_Transact { + __kind: 'Transact' + originKind: V2OriginKind + requireWeightAtMost: Weight + call: DoubleEncoded +} + +export interface V3Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V3MultiAsset[] + beneficiary: V3MultiLocation +} + +export interface V3Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V3MultiAsset[] + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V3Instruction_UniversalOrigin { + __kind: 'UniversalOrigin' + value: V3Junction +} + +export interface V3Instruction_UnlockAsset { + __kind: 'UnlockAsset' + asset: V3MultiAsset + target: V3MultiLocation +} + +export interface V3Instruction_UnpaidExecution { + __kind: 'UnpaidExecution' + weightLimit: V3WeightLimit + checkOrigin?: (V3MultiLocation | undefined) +} + +export interface V3Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V3Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V3MultiAsset[] +} + +export type V3WeightLimit = V3WeightLimit_Limited | V3WeightLimit_Unlimited + +export interface V3WeightLimit_Limited { + __kind: 'Limited' + value: Weight +} + +export interface V3WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V2Instruction: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V2MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + ticket: V2MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V2MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V2Junctions, + ExchangeAsset: sts.enumStruct({ + give: V2MultiAssetFilter, + receive: sts.array(() => V2MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V2MultiAssetFilter, + reserve: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V2MultiAssetFilter, + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + assets: V2MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V2MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V2MultiAsset), + SetAppendix: sts.array(() => V2Instruction), + SetErrorHandler: sts.array(() => V2Instruction), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V2OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + beneficiary: V2MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V2MultiAsset), + } +}) + +export const V2Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V2MultiAsset), + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V2Error])), + Null: sts.unit(), + Version: sts.number(), + } +}) + +export const V2Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + MaxWeightInvalid: sts.unit(), + MultiLocationFull: sts.unit(), + MultiLocationNotInvertible: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + WeightLimitReached: sts.bigint(), + WeightNotComputable: sts.unit(), + } +}) + +export type V2Error = V2Error_AssetNotFound | V2Error_BadOrigin | V2Error_Barrier | V2Error_DestinationUnsupported | V2Error_ExceedsMaxMessageSize | V2Error_FailedToDecode | V2Error_FailedToTransactAsset | V2Error_InvalidLocation | V2Error_LocationCannotHold | V2Error_MaxWeightInvalid | V2Error_MultiLocationFull | V2Error_MultiLocationNotInvertible | V2Error_NotHoldingFees | V2Error_NotWithdrawable | V2Error_Overflow | V2Error_TooExpensive | V2Error_Transport | V2Error_Trap | V2Error_UnhandledXcmVersion | V2Error_Unimplemented | V2Error_UnknownClaim | V2Error_Unroutable | V2Error_UntrustedReserveLocation | V2Error_UntrustedTeleportLocation | V2Error_WeightLimitReached | V2Error_WeightNotComputable + +export interface V2Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V2Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V2Error_Barrier { + __kind: 'Barrier' +} + +export interface V2Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V2Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V2Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V2Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V2Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V2Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V2Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V2Error_MultiLocationFull { + __kind: 'MultiLocationFull' +} + +export interface V2Error_MultiLocationNotInvertible { + __kind: 'MultiLocationNotInvertible' +} + +export interface V2Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V2Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V2Error_Overflow { + __kind: 'Overflow' +} + +export interface V2Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V2Error_Transport { + __kind: 'Transport' +} + +export interface V2Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V2Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V2Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V2Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V2Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V2Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V2Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: bigint +} + +export interface V2Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V2Response = V2Response_Assets | V2Response_ExecutionResult | V2Response_Null | V2Response_Version + +export interface V2Response_Assets { + __kind: 'Assets' + value: V2MultiAsset[] +} + +export interface V2Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V2Error] | undefined) +} + +export interface V2Response_Null { + __kind: 'Null' +} + +export interface V2Response_Version { + __kind: 'Version' + value: number +} + +export interface V2MultiAsset { + id: V2AssetId + fun: V2Fungibility +} + +export type V2Fungibility = V2Fungibility_Fungible | V2Fungibility_NonFungible + +export interface V2Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V2Fungibility_NonFungible { + __kind: 'NonFungible' + value: V2AssetInstance +} + +export type V2AssetInstance = V2AssetInstance_Array16 | V2AssetInstance_Array32 | V2AssetInstance_Array4 | V2AssetInstance_Array8 | V2AssetInstance_Blob | V2AssetInstance_Index | V2AssetInstance_Undefined + +export interface V2AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V2AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V2AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V2AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V2AssetInstance_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface V2AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V2AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V2AssetId = V2AssetId_Abstract | V2AssetId_Concrete + +export interface V2AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V2AssetId_Concrete { + __kind: 'Concrete' + value: V2MultiLocation +} + +export interface V2MultiLocation { + parents: number + interior: V2Junctions +} + +export type V2Junctions = V2Junctions_Here | V2Junctions_X1 | V2Junctions_X2 | V2Junctions_X3 | V2Junctions_X4 | V2Junctions_X5 | V2Junctions_X6 | V2Junctions_X7 | V2Junctions_X8 + +export interface V2Junctions_Here { + __kind: 'Here' +} + +export interface V2Junctions_X1 { + __kind: 'X1' + value: V2Junction +} + +export interface V2Junctions_X2 { + __kind: 'X2' + value: [V2Junction, V2Junction] +} + +export interface V2Junctions_X3 { + __kind: 'X3' + value: [V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X4 { + __kind: 'X4' + value: [V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X5 { + __kind: 'X5' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X6 { + __kind: 'X6' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X7 { + __kind: 'X7' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X8 { + __kind: 'X8' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export type V2Junction = V2Junction_AccountId32 | V2Junction_AccountIndex64 | V2Junction_AccountKey20 | V2Junction_GeneralIndex | V2Junction_GeneralKey | V2Junction_OnlyChild | V2Junction_PalletInstance | V2Junction_Parachain | V2Junction_Plurality + +export interface V2Junction_AccountId32 { + __kind: 'AccountId32' + network: V2NetworkId + id: Bytes +} + +export interface V2Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V2NetworkId + index: bigint +} + +export interface V2Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V2NetworkId + key: Bytes +} + +export interface V2Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V2Junction_GeneralKey { + __kind: 'GeneralKey' + value: WeakBoundedVec +} + +export interface V2Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V2Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V2Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V2Junction_Plurality { + __kind: 'Plurality' + id: V2BodyId + part: V2BodyPart +} + +export type V2BodyPart = V2BodyPart_AtLeastProportion | V2BodyPart_Fraction | V2BodyPart_Members | V2BodyPart_MoreThanProportion | V2BodyPart_Voice + +export interface V2BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V2BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V2BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V2BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V2BodyPart_Voice { + __kind: 'Voice' +} + +export type V2BodyId = V2BodyId_Administration | V2BodyId_Defense | V2BodyId_Executive | V2BodyId_Index | V2BodyId_Judicial | V2BodyId_Legislative | V2BodyId_Named | V2BodyId_Technical | V2BodyId_Treasury | V2BodyId_Unit + +export interface V2BodyId_Administration { + __kind: 'Administration' +} + +export interface V2BodyId_Defense { + __kind: 'Defense' +} + +export interface V2BodyId_Executive { + __kind: 'Executive' +} + +export interface V2BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V2BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V2BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V2BodyId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V2BodyId_Technical { + __kind: 'Technical' +} + +export interface V2BodyId_Treasury { + __kind: 'Treasury' +} + +export interface V2BodyId_Unit { + __kind: 'Unit' +} + +export type WeakBoundedVec = Bytes + +export type V2NetworkId = V2NetworkId_Any | V2NetworkId_Kusama | V2NetworkId_Named | V2NetworkId_Polkadot + +export interface V2NetworkId_Any { + __kind: 'Any' +} + +export interface V2NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V2NetworkId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V2NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export const V2Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V2Junction, + X2: sts.tuple(() => [V2Junction, V2Junction]), + X3: sts.tuple(() => [V2Junction, V2Junction, V2Junction]), + X4: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction]), + X5: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + X6: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + X7: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + X8: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + } +}) + +export const V2Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V2NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V2NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V2NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: WeakBoundedVec, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V2BodyId, + part: V2BodyPart, + }), + } +}) + +export const V2BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export const V2BodyId: sts.Type = sts.closedEnum(() => { + return { + Administration: sts.unit(), + Defense: sts.unit(), + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: WeakBoundedVec, + Technical: sts.unit(), + Treasury: sts.unit(), + Unit: sts.unit(), + } +}) + +export const WeakBoundedVec = sts.bytes() + +export const V2NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: WeakBoundedVec, + Polkadot: sts.unit(), + } +}) + +export const V2MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V2MultiAsset), + Wild: V2WildMultiAsset, + } +}) + +export const V2WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllOf: sts.enumStruct({ + id: V2AssetId, + fun: V2WildFungibility, + }), + } +}) + +export const V2WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V2WildFungibility = V2WildFungibility_Fungible | V2WildFungibility_NonFungible + +export interface V2WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V2WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V2AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V2MultiLocation, + } +}) + +export type V2WildMultiAsset = V2WildMultiAsset_All | V2WildMultiAsset_AllOf + +export interface V2WildMultiAsset_All { + __kind: 'All' +} + +export interface V2WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V2AssetId + fun: V2WildFungibility +} + +export type V2MultiAssetFilter = V2MultiAssetFilter_Definite | V2MultiAssetFilter_Wild + +export interface V2MultiAssetFilter_Definite { + __kind: 'Definite' + value: V2MultiAsset[] +} + +export interface V2MultiAssetFilter_Wild { + __kind: 'Wild' + value: V2WildMultiAsset +} + +export const V2MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V2Junctions, + } +}) + +export const V2WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: sts.bigint(), + Unlimited: sts.unit(), + } +}) + +export type V2WeightLimit = V2WeightLimit_Limited | V2WeightLimit_Unlimited + +export interface V2WeightLimit_Limited { + __kind: 'Limited' + value: bigint +} + +export interface V2WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V2MultiAsset: sts.Type = sts.struct(() => { + return { + id: V2AssetId, + fun: V2Fungibility, + } +}) + +export const V2Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V2AssetInstance, + } +}) + +export const V2AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V2Instruction = V2Instruction_BuyExecution | V2Instruction_ClaimAsset | V2Instruction_ClearError | V2Instruction_ClearOrigin | V2Instruction_DepositAsset | V2Instruction_DepositReserveAsset | V2Instruction_DescendOrigin | V2Instruction_ExchangeAsset | V2Instruction_HrmpChannelAccepted | V2Instruction_HrmpChannelClosing | V2Instruction_HrmpNewChannelOpenRequest | V2Instruction_InitiateReserveWithdraw | V2Instruction_InitiateTeleport | V2Instruction_QueryHolding | V2Instruction_QueryResponse | V2Instruction_ReceiveTeleportedAsset | V2Instruction_RefundSurplus | V2Instruction_ReportError | V2Instruction_ReserveAssetDeposited | V2Instruction_SetAppendix | V2Instruction_SetErrorHandler | V2Instruction_SubscribeVersion | V2Instruction_Transact | V2Instruction_TransferAsset | V2Instruction_TransferReserveAsset | V2Instruction_Trap | V2Instruction_UnsubscribeVersion | V2Instruction_WithdrawAsset + +export interface V2Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V2MultiAsset + weightLimit: V2WeightLimit +} + +export interface V2Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V2MultiAsset[] + ticket: V2MultiLocation +} + +export interface V2Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V2Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V2Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V2MultiAssetFilter + maxAssets: number + beneficiary: V2MultiLocation +} + +export interface V2Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V2MultiAssetFilter + maxAssets: number + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V2Junctions +} + +export interface V2Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V2MultiAssetFilter + receive: V2MultiAsset[] +} + +export interface V2Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V2Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V2Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V2Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V2MultiAssetFilter + reserve: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V2MultiAssetFilter + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V2MultiLocation + assets: V2MultiAssetFilter + maxResponseWeight: bigint +} + +export interface V2Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface V2Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V2MultiAsset[] +} + +export interface V2Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V2Instruction_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V2MultiLocation + maxResponseWeight: bigint +} + +export interface V2Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V2MultiAsset[] +} + +export interface V2Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V2Instruction[] +} + +export interface V2Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V2Instruction[] +} + +export interface V2Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V2Instruction_Transact { + __kind: 'Transact' + originType: V2OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V2Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V2MultiAsset[] + beneficiary: V2MultiLocation +} + +export interface V2Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V2MultiAsset[] + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V2Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V2MultiAsset[] +} + +export type VersionedXcm = VersionedXcm_V2 | VersionedXcm_V3 + +export interface VersionedXcm_V2 { + __kind: 'V2' + value: V2Instruction[] +} + +export interface VersionedXcm_V3 { + __kind: 'V3' + value: V3Instruction[] +} + +export const V3WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: Weight, + Unlimited: sts.unit(), + } +}) + +export const VersionedMultiAssets: sts.Type = sts.closedEnum(() => { + return { + V2: sts.array(() => V2MultiAsset), + V3: sts.array(() => V3MultiAsset), + } +}) + +export type VersionedMultiAssets = VersionedMultiAssets_V2 | VersionedMultiAssets_V3 + +export interface VersionedMultiAssets_V2 { + __kind: 'V2' + value: V2MultiAsset[] +} + +export interface VersionedMultiAssets_V3 { + __kind: 'V3' + value: V3MultiAsset[] +} + +export const V3MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V3Junctions, + } +}) + +export const VersionedMultiLocation: sts.Type = sts.closedEnum(() => { + return { + V2: V2MultiLocation, + V3: V3MultiLocation, + } +}) + +export type VersionedMultiLocation = VersionedMultiLocation_V2 | VersionedMultiLocation_V3 + +export interface VersionedMultiLocation_V2 { + __kind: 'V2' + value: V2MultiLocation +} + +export interface VersionedMultiLocation_V3 { + __kind: 'V3' + value: V3MultiLocation +} + +export const Type_447: sts.Type = sts.closedEnum(() => { + return { + V2: sts.array(() => Type_450), + V3: sts.array(() => Type_454), + } +}) + +export const Type_454: sts.Type = sts.closedEnum(() => { + return { + AliasOrigin: V3MultiLocation, + BurnAsset: sts.array(() => V3MultiAsset), + BuyExecution: sts.enumStruct({ + fees: V3MultiAsset, + weightLimit: V3WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + ticket: V3MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + ClearTopic: sts.unit(), + ClearTransactStatus: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + beneficiary: V3MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + DescendOrigin: V3Junctions, + ExchangeAsset: sts.enumStruct({ + give: V3MultiAssetFilter, + want: sts.array(() => V3MultiAsset), + maximal: sts.boolean(), + }), + ExpectAsset: sts.array(() => V3MultiAsset), + ExpectError: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + ExpectOrigin: sts.option(() => V3MultiLocation), + ExpectPallet: sts.enumStruct({ + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + crateMajor: sts.number(), + minCrateMinor: sts.number(), + }), + ExpectTransactStatus: V3MaybeErrorCode, + ExportMessage: sts.enumStruct({ + network: V3NetworkId, + destination: V3Junctions, + xcm: sts.array(() => V3Instruction), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V3MultiAssetFilter, + reserve: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + LockAsset: sts.enumStruct({ + asset: V3MultiAsset, + unlocker: V3MultiLocation, + }), + NoteUnlockable: sts.enumStruct({ + asset: V3MultiAsset, + owner: V3MultiLocation, + }), + QueryPallet: sts.enumStruct({ + moduleName: sts.bytes(), + responseInfo: V3QueryResponseInfo, + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V3Response, + maxWeight: Weight, + querier: sts.option(() => V3MultiLocation), + }), + ReceiveTeleportedAsset: sts.array(() => V3MultiAsset), + RefundSurplus: sts.unit(), + ReportError: V3QueryResponseInfo, + ReportHolding: sts.enumStruct({ + responseInfo: V3QueryResponseInfo, + assets: V3MultiAssetFilter, + }), + ReportTransactStatus: V3QueryResponseInfo, + RequestUnlock: sts.enumStruct({ + asset: V3MultiAsset, + locker: V3MultiLocation, + }), + ReserveAssetDeposited: sts.array(() => V3MultiAsset), + SetAppendix: sts.array(() => Type_454), + SetErrorHandler: sts.array(() => Type_454), + SetFeesMode: sts.enumStruct({ + jitWithdraw: sts.boolean(), + }), + SetTopic: sts.bytes(), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: Weight, + }), + Transact: sts.enumStruct({ + originKind: V2OriginKind, + requireWeightAtMost: Weight, + call: Type_451, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + beneficiary: V3MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + Trap: sts.bigint(), + UniversalOrigin: V3Junction, + UnlockAsset: sts.enumStruct({ + asset: V3MultiAsset, + target: V3MultiLocation, + }), + UnpaidExecution: sts.enumStruct({ + weightLimit: V3WeightLimit, + checkOrigin: sts.option(() => V3MultiLocation), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V3MultiAsset), + } +}) + +export const Type_451: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface Type_451 { + encoded: Bytes +} + +export type Type_454 = Type_454_AliasOrigin | Type_454_BurnAsset | Type_454_BuyExecution | Type_454_ClaimAsset | Type_454_ClearError | Type_454_ClearOrigin | Type_454_ClearTopic | Type_454_ClearTransactStatus | Type_454_DepositAsset | Type_454_DepositReserveAsset | Type_454_DescendOrigin | Type_454_ExchangeAsset | Type_454_ExpectAsset | Type_454_ExpectError | Type_454_ExpectOrigin | Type_454_ExpectPallet | Type_454_ExpectTransactStatus | Type_454_ExportMessage | Type_454_HrmpChannelAccepted | Type_454_HrmpChannelClosing | Type_454_HrmpNewChannelOpenRequest | Type_454_InitiateReserveWithdraw | Type_454_InitiateTeleport | Type_454_LockAsset | Type_454_NoteUnlockable | Type_454_QueryPallet | Type_454_QueryResponse | Type_454_ReceiveTeleportedAsset | Type_454_RefundSurplus | Type_454_ReportError | Type_454_ReportHolding | Type_454_ReportTransactStatus | Type_454_RequestUnlock | Type_454_ReserveAssetDeposited | Type_454_SetAppendix | Type_454_SetErrorHandler | Type_454_SetFeesMode | Type_454_SetTopic | Type_454_SubscribeVersion | Type_454_Transact | Type_454_TransferAsset | Type_454_TransferReserveAsset | Type_454_Trap | Type_454_UniversalOrigin | Type_454_UnlockAsset | Type_454_UnpaidExecution | Type_454_UnsubscribeVersion | Type_454_WithdrawAsset + +export interface Type_454_AliasOrigin { + __kind: 'AliasOrigin' + value: V3MultiLocation +} + +export interface Type_454_BurnAsset { + __kind: 'BurnAsset' + value: V3MultiAsset[] +} + +export interface Type_454_BuyExecution { + __kind: 'BuyExecution' + fees: V3MultiAsset + weightLimit: V3WeightLimit +} + +export interface Type_454_ClaimAsset { + __kind: 'ClaimAsset' + assets: V3MultiAsset[] + ticket: V3MultiLocation +} + +export interface Type_454_ClearError { + __kind: 'ClearError' +} + +export interface Type_454_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_454_ClearTopic { + __kind: 'ClearTopic' +} + +export interface Type_454_ClearTransactStatus { + __kind: 'ClearTransactStatus' +} + +export interface Type_454_DepositAsset { + __kind: 'DepositAsset' + assets: V3MultiAssetFilter + beneficiary: V3MultiLocation +} + +export interface Type_454_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_454_DescendOrigin { + __kind: 'DescendOrigin' + value: V3Junctions +} + +export interface Type_454_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V3MultiAssetFilter + want: V3MultiAsset[] + maximal: boolean +} + +export interface Type_454_ExpectAsset { + __kind: 'ExpectAsset' + value: V3MultiAsset[] +} + +export interface Type_454_ExpectError { + __kind: 'ExpectError' + value?: ([number, V3Error] | undefined) +} + +export interface Type_454_ExpectOrigin { + __kind: 'ExpectOrigin' + value?: (V3MultiLocation | undefined) +} + +export interface Type_454_ExpectPallet { + __kind: 'ExpectPallet' + index: number + name: Bytes + moduleName: Bytes + crateMajor: number + minCrateMinor: number +} + +export interface Type_454_ExpectTransactStatus { + __kind: 'ExpectTransactStatus' + value: V3MaybeErrorCode +} + +export interface Type_454_ExportMessage { + __kind: 'ExportMessage' + network: V3NetworkId + destination: V3Junctions + xcm: V3Instruction[] +} + +export interface Type_454_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_454_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_454_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_454_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V3MultiAssetFilter + reserve: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_454_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_454_LockAsset { + __kind: 'LockAsset' + asset: V3MultiAsset + unlocker: V3MultiLocation +} + +export interface Type_454_NoteUnlockable { + __kind: 'NoteUnlockable' + asset: V3MultiAsset + owner: V3MultiLocation +} + +export interface Type_454_QueryPallet { + __kind: 'QueryPallet' + moduleName: Bytes + responseInfo: V3QueryResponseInfo +} + +export interface Type_454_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V3Response + maxWeight: Weight + querier?: (V3MultiLocation | undefined) +} + +export interface Type_454_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V3MultiAsset[] +} + +export interface Type_454_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_454_ReportError { + __kind: 'ReportError' + value: V3QueryResponseInfo +} + +export interface Type_454_ReportHolding { + __kind: 'ReportHolding' + responseInfo: V3QueryResponseInfo + assets: V3MultiAssetFilter +} + +export interface Type_454_ReportTransactStatus { + __kind: 'ReportTransactStatus' + value: V3QueryResponseInfo +} + +export interface Type_454_RequestUnlock { + __kind: 'RequestUnlock' + asset: V3MultiAsset + locker: V3MultiLocation +} + +export interface Type_454_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V3MultiAsset[] +} + +export interface Type_454_SetAppendix { + __kind: 'SetAppendix' + value: Type_454[] +} + +export interface Type_454_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_454[] +} + +export interface Type_454_SetFeesMode { + __kind: 'SetFeesMode' + jitWithdraw: boolean +} + +export interface Type_454_SetTopic { + __kind: 'SetTopic' + value: Bytes +} + +export interface Type_454_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: Weight +} + +export interface Type_454_Transact { + __kind: 'Transact' + originKind: V2OriginKind + requireWeightAtMost: Weight + call: Type_451 +} + +export interface Type_454_TransferAsset { + __kind: 'TransferAsset' + assets: V3MultiAsset[] + beneficiary: V3MultiLocation +} + +export interface Type_454_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V3MultiAsset[] + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_454_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_454_UniversalOrigin { + __kind: 'UniversalOrigin' + value: V3Junction +} + +export interface Type_454_UnlockAsset { + __kind: 'UnlockAsset' + asset: V3MultiAsset + target: V3MultiLocation +} + +export interface Type_454_UnpaidExecution { + __kind: 'UnpaidExecution' + weightLimit: V3WeightLimit + checkOrigin?: (V3MultiLocation | undefined) +} + +export interface Type_454_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_454_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V3MultiAsset[] +} + +export const Type_450: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V2MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + ticket: V2MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V2MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V2Junctions, + ExchangeAsset: sts.enumStruct({ + give: V2MultiAssetFilter, + receive: sts.array(() => V2MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V2MultiAssetFilter, + reserve: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V2MultiAssetFilter, + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + assets: V2MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V2MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V2MultiAsset), + SetAppendix: sts.array(() => Type_450), + SetErrorHandler: sts.array(() => Type_450), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V2OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_451, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + beneficiary: V2MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V2MultiAsset), + } +}) + +export type Type_450 = Type_450_BuyExecution | Type_450_ClaimAsset | Type_450_ClearError | Type_450_ClearOrigin | Type_450_DepositAsset | Type_450_DepositReserveAsset | Type_450_DescendOrigin | Type_450_ExchangeAsset | Type_450_HrmpChannelAccepted | Type_450_HrmpChannelClosing | Type_450_HrmpNewChannelOpenRequest | Type_450_InitiateReserveWithdraw | Type_450_InitiateTeleport | Type_450_QueryHolding | Type_450_QueryResponse | Type_450_ReceiveTeleportedAsset | Type_450_RefundSurplus | Type_450_ReportError | Type_450_ReserveAssetDeposited | Type_450_SetAppendix | Type_450_SetErrorHandler | Type_450_SubscribeVersion | Type_450_Transact | Type_450_TransferAsset | Type_450_TransferReserveAsset | Type_450_Trap | Type_450_UnsubscribeVersion | Type_450_WithdrawAsset + +export interface Type_450_BuyExecution { + __kind: 'BuyExecution' + fees: V2MultiAsset + weightLimit: V2WeightLimit +} + +export interface Type_450_ClaimAsset { + __kind: 'ClaimAsset' + assets: V2MultiAsset[] + ticket: V2MultiLocation +} + +export interface Type_450_ClearError { + __kind: 'ClearError' +} + +export interface Type_450_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_450_DepositAsset { + __kind: 'DepositAsset' + assets: V2MultiAssetFilter + maxAssets: number + beneficiary: V2MultiLocation +} + +export interface Type_450_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V2MultiAssetFilter + maxAssets: number + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_450_DescendOrigin { + __kind: 'DescendOrigin' + value: V2Junctions +} + +export interface Type_450_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V2MultiAssetFilter + receive: V2MultiAsset[] +} + +export interface Type_450_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_450_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_450_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_450_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V2MultiAssetFilter + reserve: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_450_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V2MultiAssetFilter + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_450_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V2MultiLocation + assets: V2MultiAssetFilter + maxResponseWeight: bigint +} + +export interface Type_450_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface Type_450_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V2MultiAsset[] +} + +export interface Type_450_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_450_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V2MultiLocation + maxResponseWeight: bigint +} + +export interface Type_450_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V2MultiAsset[] +} + +export interface Type_450_SetAppendix { + __kind: 'SetAppendix' + value: Type_450[] +} + +export interface Type_450_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_450[] +} + +export interface Type_450_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_450_Transact { + __kind: 'Transact' + originType: V2OriginKind + requireWeightAtMost: bigint + call: Type_451 +} + +export interface Type_450_TransferAsset { + __kind: 'TransferAsset' + assets: V2MultiAsset[] + beneficiary: V2MultiLocation +} + +export interface Type_450_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V2MultiAsset[] + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_450_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_450_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_450_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V2MultiAsset[] +} + +export type Type_447 = Type_447_V2 | Type_447_V3 + +export interface Type_447_V2 { + __kind: 'V2' + value: Type_450[] +} + +export interface Type_447_V3 { + __kind: 'V3' + value: Type_454[] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type XcmPalletCall = XcmPalletCall_execute | XcmPalletCall_force_default_xcm_version | XcmPalletCall_force_subscribe_version_notify | XcmPalletCall_force_suspension | XcmPalletCall_force_unsubscribe_version_notify | XcmPalletCall_force_xcm_version | XcmPalletCall_limited_reserve_transfer_assets | XcmPalletCall_limited_teleport_assets | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets + +/** + * See [`Pallet::execute`]. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Type_447 + maxWeight: Weight +} + +/** + * See [`Pallet::force_default_xcm_version`]. + */ +export interface XcmPalletCall_force_default_xcm_version { + __kind: 'force_default_xcm_version' + maybeXcmVersion?: (number | undefined) +} + +/** + * See [`Pallet::force_subscribe_version_notify`]. + */ +export interface XcmPalletCall_force_subscribe_version_notify { + __kind: 'force_subscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * See [`Pallet::force_suspension`]. + */ +export interface XcmPalletCall_force_suspension { + __kind: 'force_suspension' + suspended: boolean +} + +/** + * See [`Pallet::force_unsubscribe_version_notify`]. + */ +export interface XcmPalletCall_force_unsubscribe_version_notify { + __kind: 'force_unsubscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * See [`Pallet::force_xcm_version`]. + */ +export interface XcmPalletCall_force_xcm_version { + __kind: 'force_xcm_version' + location: V3MultiLocation + version: number +} + +/** + * See [`Pallet::limited_reserve_transfer_assets`]. + */ +export interface XcmPalletCall_limited_reserve_transfer_assets { + __kind: 'limited_reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V3WeightLimit +} + +/** + * See [`Pallet::limited_teleport_assets`]. + */ +export interface XcmPalletCall_limited_teleport_assets { + __kind: 'limited_teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V3WeightLimit +} + +/** + * See [`Pallet::reserve_transfer_assets`]. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +/** + * See [`Pallet::send`]. + */ +export interface XcmPalletCall_send { + __kind: 'send' + dest: VersionedMultiLocation + message: VersionedXcm +} + +/** + * See [`Pallet::teleport_assets`]. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const WhitelistCall: sts.Type = sts.closedEnum(() => { + return { + dispatch_whitelisted_call: sts.enumStruct({ + callHash: H256, + callEncodedLen: sts.number(), + callWeightWitness: Weight, + }), + dispatch_whitelisted_call_with_preimage: sts.enumStruct({ + call: Call, + }), + remove_whitelisted_call: sts.enumStruct({ + callHash: H256, + }), + whitelist_call: sts.enumStruct({ + callHash: H256, + }), + } +}) + +export const H256 = sts.bytes() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type WhitelistCall = WhitelistCall_dispatch_whitelisted_call | WhitelistCall_dispatch_whitelisted_call_with_preimage | WhitelistCall_remove_whitelisted_call | WhitelistCall_whitelist_call + +/** + * See [`Pallet::dispatch_whitelisted_call`]. + */ +export interface WhitelistCall_dispatch_whitelisted_call { + __kind: 'dispatch_whitelisted_call' + callHash: H256 + callEncodedLen: number + callWeightWitness: Weight +} + +/** + * See [`Pallet::dispatch_whitelisted_call_with_preimage`]. + */ +export interface WhitelistCall_dispatch_whitelisted_call_with_preimage { + __kind: 'dispatch_whitelisted_call_with_preimage' + call: Call +} + +/** + * See [`Pallet::remove_whitelisted_call`]. + */ +export interface WhitelistCall_remove_whitelisted_call { + __kind: 'remove_whitelisted_call' + callHash: H256 +} + +/** + * See [`Pallet::whitelist_call`]. + */ +export interface WhitelistCall_whitelist_call { + __kind: 'whitelist_call' + callHash: H256 +} + +export type H256 = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const VoterListCall: sts.Type = sts.closedEnum(() => { + return { + put_in_front_of: sts.enumStruct({ + lighter: MultiAddress, + }), + put_in_front_of_other: sts.enumStruct({ + heavier: MultiAddress, + lighter: MultiAddress, + }), + rebag: sts.enumStruct({ + dislocated: MultiAddress, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type VoterListCall = VoterListCall_put_in_front_of | VoterListCall_put_in_front_of_other | VoterListCall_rebag + +/** + * See [`Pallet::put_in_front_of`]. + */ +export interface VoterListCall_put_in_front_of { + __kind: 'put_in_front_of' + lighter: MultiAddress +} + +/** + * See [`Pallet::put_in_front_of_other`]. + */ +export interface VoterListCall_put_in_front_of_other { + __kind: 'put_in_front_of_other' + heavier: MultiAddress + lighter: MultiAddress +} + +/** + * See [`Pallet::rebag`]. + */ +export interface VoterListCall_rebag { + __kind: 'rebag' + dislocated: MultiAddress +} + +export type MultiAddress = MultiAddress_Address20 | MultiAddress_Address32 | MultiAddress_Id | MultiAddress_Index | MultiAddress_Raw + +export interface MultiAddress_Address20 { + __kind: 'Address20' + value: Bytes +} + +export interface MultiAddress_Address32 { + __kind: 'Address32' + value: Bytes +} + +export interface MultiAddress_Id { + __kind: 'Id' + value: AccountId32 +} + +export interface MultiAddress_Index { + __kind: 'Index' +} + +export interface MultiAddress_Raw { + __kind: 'Raw' + value: Bytes +} + +export type AccountId32 = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: MultiAddress, + target: MultiAddress, + schedule: VestingInfo, + }), + merge_schedules: sts.enumStruct({ + schedule1Index: sts.number(), + schedule2Index: sts.number(), + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: MultiAddress, + }), + vested_transfer: sts.enumStruct({ + target: MultiAddress, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: sts.bigint(), + perBlock: sts.bigint(), + startingBlock: sts.number(), + } +}) + +export interface VestingInfo { + locked: bigint + perBlock: bigint + startingBlock: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_merge_schedules | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * See [`Pallet::force_vested_transfer`]. + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: MultiAddress + target: MultiAddress + schedule: VestingInfo +} + +/** + * See [`Pallet::merge_schedules`]. + */ +export interface VestingCall_merge_schedules { + __kind: 'merge_schedules' + schedule1Index: number + schedule2Index: number +} + +/** + * See [`Pallet::vest`]. + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * See [`Pallet::vest_other`]. + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: MultiAddress +} + +/** + * See [`Pallet::vested_transfer`]. + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: MultiAddress + schedule: VestingInfo +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Call, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Call), + }), + dispatch_as: sts.enumStruct({ + asOrigin: OriginCaller, + call: Call, + }), + force_batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + with_weight: sts.enumStruct({ + call: Call, + weight: Weight, + }), + } +}) + +export const OriginCaller: sts.Type = sts.closedEnum(() => { + return { + Origins: Origin, + ParachainsOrigin: Type_139, + Void: Void, + XcmPallet: Type_141, + system: RawOrigin, + } +}) + +export const RawOrigin: sts.Type = sts.closedEnum(() => { + return { + None: sts.unit(), + Root: sts.unit(), + Signed: AccountId32, + } +}) + +export type RawOrigin = RawOrigin_None | RawOrigin_Root | RawOrigin_Signed + +export interface RawOrigin_None { + __kind: 'None' +} + +export interface RawOrigin_Root { + __kind: 'Root' +} + +export interface RawOrigin_Signed { + __kind: 'Signed' + value: AccountId32 +} + +export const Type_141: sts.Type = sts.closedEnum(() => { + return { + Response: V3MultiLocation, + Xcm: V3MultiLocation, + } +}) + +export type Type_141 = Type_141_Response | Type_141_Xcm + +export interface Type_141_Response { + __kind: 'Response' + value: V3MultiLocation +} + +export interface Type_141_Xcm { + __kind: 'Xcm' + value: V3MultiLocation +} + +export const Void: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Void = never + +export const Type_139: sts.Type = sts.closedEnum(() => { + return { + Parachain: Id, + } +}) + +export const Id = sts.number() + +export type Type_139 = Type_139_Parachain + +export interface Type_139_Parachain { + __kind: 'Parachain' + value: Id +} + +export type Id = number + +export const Origin: sts.Type = sts.closedEnum(() => { + return { + AuctionAdmin: sts.unit(), + BigSpender: sts.unit(), + BigTipper: sts.unit(), + Fellows: sts.unit(), + Fellowship1Dan: sts.unit(), + Fellowship2Dan: sts.unit(), + Fellowship3Dan: sts.unit(), + Fellowship4Dan: sts.unit(), + Fellowship5Dan: sts.unit(), + Fellowship6Dan: sts.unit(), + Fellowship7Dan: sts.unit(), + Fellowship8Dan: sts.unit(), + Fellowship9Dan: sts.unit(), + FellowshipAdmin: sts.unit(), + FellowshipExperts: sts.unit(), + FellowshipInitiates: sts.unit(), + FellowshipMasters: sts.unit(), + GeneralAdmin: sts.unit(), + LeaseAdmin: sts.unit(), + MediumSpender: sts.unit(), + ReferendumCanceller: sts.unit(), + ReferendumKiller: sts.unit(), + SmallSpender: sts.unit(), + SmallTipper: sts.unit(), + StakingAdmin: sts.unit(), + Treasurer: sts.unit(), + WhitelistedCaller: sts.unit(), + } +}) + +export type Origin = Origin_AuctionAdmin | Origin_BigSpender | Origin_BigTipper | Origin_Fellows | Origin_Fellowship1Dan | Origin_Fellowship2Dan | Origin_Fellowship3Dan | Origin_Fellowship4Dan | Origin_Fellowship5Dan | Origin_Fellowship6Dan | Origin_Fellowship7Dan | Origin_Fellowship8Dan | Origin_Fellowship9Dan | Origin_FellowshipAdmin | Origin_FellowshipExperts | Origin_FellowshipInitiates | Origin_FellowshipMasters | Origin_GeneralAdmin | Origin_LeaseAdmin | Origin_MediumSpender | Origin_ReferendumCanceller | Origin_ReferendumKiller | Origin_SmallSpender | Origin_SmallTipper | Origin_StakingAdmin | Origin_Treasurer | Origin_WhitelistedCaller + +export interface Origin_AuctionAdmin { + __kind: 'AuctionAdmin' +} + +export interface Origin_BigSpender { + __kind: 'BigSpender' +} + +export interface Origin_BigTipper { + __kind: 'BigTipper' +} + +export interface Origin_Fellows { + __kind: 'Fellows' +} + +export interface Origin_Fellowship1Dan { + __kind: 'Fellowship1Dan' +} + +export interface Origin_Fellowship2Dan { + __kind: 'Fellowship2Dan' +} + +export interface Origin_Fellowship3Dan { + __kind: 'Fellowship3Dan' +} + +export interface Origin_Fellowship4Dan { + __kind: 'Fellowship4Dan' +} + +export interface Origin_Fellowship5Dan { + __kind: 'Fellowship5Dan' +} + +export interface Origin_Fellowship6Dan { + __kind: 'Fellowship6Dan' +} + +export interface Origin_Fellowship7Dan { + __kind: 'Fellowship7Dan' +} + +export interface Origin_Fellowship8Dan { + __kind: 'Fellowship8Dan' +} + +export interface Origin_Fellowship9Dan { + __kind: 'Fellowship9Dan' +} + +export interface Origin_FellowshipAdmin { + __kind: 'FellowshipAdmin' +} + +export interface Origin_FellowshipExperts { + __kind: 'FellowshipExperts' +} + +export interface Origin_FellowshipInitiates { + __kind: 'FellowshipInitiates' +} + +export interface Origin_FellowshipMasters { + __kind: 'FellowshipMasters' +} + +export interface Origin_GeneralAdmin { + __kind: 'GeneralAdmin' +} + +export interface Origin_LeaseAdmin { + __kind: 'LeaseAdmin' +} + +export interface Origin_MediumSpender { + __kind: 'MediumSpender' +} + +export interface Origin_ReferendumCanceller { + __kind: 'ReferendumCanceller' +} + +export interface Origin_ReferendumKiller { + __kind: 'ReferendumKiller' +} + +export interface Origin_SmallSpender { + __kind: 'SmallSpender' +} + +export interface Origin_SmallTipper { + __kind: 'SmallTipper' +} + +export interface Origin_StakingAdmin { + __kind: 'StakingAdmin' +} + +export interface Origin_Treasurer { + __kind: 'Treasurer' +} + +export interface Origin_WhitelistedCaller { + __kind: 'WhitelistedCaller' +} + +export type OriginCaller = OriginCaller_Origins | OriginCaller_ParachainsOrigin | OriginCaller_Void | OriginCaller_XcmPallet | OriginCaller_system + +export interface OriginCaller_Origins { + __kind: 'Origins' + value: Origin +} + +export interface OriginCaller_ParachainsOrigin { + __kind: 'ParachainsOrigin' + value: Type_139 +} + +export interface OriginCaller_Void { + __kind: 'Void' + value: Void +} + +export interface OriginCaller_XcmPallet { + __kind: 'XcmPallet' + value: Type_141 +} + +export interface OriginCaller_system { + __kind: 'system' + value: RawOrigin +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all | UtilityCall_dispatch_as | UtilityCall_force_batch | UtilityCall_with_weight + +/** + * See [`Pallet::as_derivative`]. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Call +} + +/** + * See [`Pallet::batch`]. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Call[] +} + +/** + * See [`Pallet::batch_all`]. + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Call[] +} + +/** + * See [`Pallet::dispatch_as`]. + */ +export interface UtilityCall_dispatch_as { + __kind: 'dispatch_as' + asOrigin: OriginCaller + call: Call +} + +/** + * See [`Pallet::force_batch`]. + */ +export interface UtilityCall_force_batch { + __kind: 'force_batch' + calls: Call[] +} + +/** + * See [`Pallet::with_weight`]. + */ +export interface UtilityCall_with_weight { + __kind: 'with_weight' + call: Call + weight: Weight +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: MultiAddress, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + remove_approval: sts.enumStruct({ + proposalId: sts.number(), + }), + spend: sts.enumStruct({ + amount: sts.bigint(), + beneficiary: MultiAddress, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_remove_approval | TreasuryCall_spend + +/** + * See [`Pallet::approve_proposal`]. + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * See [`Pallet::propose_spend`]. + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: MultiAddress +} + +/** + * See [`Pallet::reject_proposal`]. + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * See [`Pallet::remove_approval`]. + */ +export interface TreasuryCall_remove_approval { + __kind: 'remove_approval' + proposalId: number +} + +/** + * See [`Pallet::spend`]. + */ +export interface TreasuryCall_spend { + __kind: 'spend' + amount: bigint + beneficiary: MultiAddress +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type TimestampCall = TimestampCall_set + +/** + * See [`Pallet::set`]. + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + kill_prefix: sts.enumStruct({ + prefix: sts.bytes(), + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => sts.bytes()), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SystemCall = SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * See [`Pallet::kill_prefix`]. + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Bytes + subkeys: number +} + +/** + * See [`Pallet::kill_storage`]. + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Bytes[] +} + +/** + * See [`Pallet::remark`]. + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * See [`Pallet::remark_with_event`]. + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * See [`Pallet::set_code`]. + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * See [`Pallet::set_code_without_checks`]. + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * See [`Pallet::set_heap_pages`]. + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * See [`Pallet::set_storage`]. + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: [Bytes, Bytes][] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const StateTrieMigrationCall: sts.Type = sts.closedEnum(() => { + return { + continue_migrate: sts.enumStruct({ + limits: MigrationLimits, + realSizeUpper: sts.number(), + witnessTask: MigrationTask, + }), + control_auto_migration: sts.enumStruct({ + maybeConfig: sts.option(() => MigrationLimits), + }), + force_set_progress: sts.enumStruct({ + progressTop: Progress, + progressChild: Progress, + }), + migrate_custom_child: sts.enumStruct({ + root: sts.bytes(), + childKeys: sts.array(() => sts.bytes()), + totalSize: sts.number(), + }), + migrate_custom_top: sts.enumStruct({ + keys: sts.array(() => sts.bytes()), + witnessSize: sts.number(), + }), + set_signed_max_limits: sts.enumStruct({ + limits: MigrationLimits, + }), + } +}) + +export const Progress: sts.Type = sts.closedEnum(() => { + return { + Complete: sts.unit(), + LastKey: BoundedVec, + ToStart: sts.unit(), + } +}) + +export const BoundedVec = sts.bytes() + +export type Progress = Progress_Complete | Progress_LastKey | Progress_ToStart + +export interface Progress_Complete { + __kind: 'Complete' +} + +export interface Progress_LastKey { + __kind: 'LastKey' + value: BoundedVec +} + +export interface Progress_ToStart { + __kind: 'ToStart' +} + +export type BoundedVec = Bytes + +export const MigrationTask: sts.Type = sts.struct(() => { + return { + progressTop: Progress, + progressChild: Progress, + size: sts.number(), + topItems: sts.number(), + childItems: sts.number(), + } +}) + +export interface MigrationTask { + progressTop: Progress + progressChild: Progress + size: number + topItems: number + childItems: number +} + +export const MigrationLimits: sts.Type = sts.struct(() => { + return { + size: sts.number(), + item: sts.number(), + } +}) + +export interface MigrationLimits { + size: number + item: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type StateTrieMigrationCall = StateTrieMigrationCall_continue_migrate | StateTrieMigrationCall_control_auto_migration | StateTrieMigrationCall_force_set_progress | StateTrieMigrationCall_migrate_custom_child | StateTrieMigrationCall_migrate_custom_top | StateTrieMigrationCall_set_signed_max_limits + +/** + * See [`Pallet::continue_migrate`]. + */ +export interface StateTrieMigrationCall_continue_migrate { + __kind: 'continue_migrate' + limits: MigrationLimits + realSizeUpper: number + witnessTask: MigrationTask +} + +/** + * See [`Pallet::control_auto_migration`]. + */ +export interface StateTrieMigrationCall_control_auto_migration { + __kind: 'control_auto_migration' + maybeConfig?: (MigrationLimits | undefined) +} + +/** + * See [`Pallet::force_set_progress`]. + */ +export interface StateTrieMigrationCall_force_set_progress { + __kind: 'force_set_progress' + progressTop: Progress + progressChild: Progress +} + +/** + * See [`Pallet::migrate_custom_child`]. + */ +export interface StateTrieMigrationCall_migrate_custom_child { + __kind: 'migrate_custom_child' + root: Bytes + childKeys: Bytes[] + totalSize: number +} + +/** + * See [`Pallet::migrate_custom_top`]. + */ +export interface StateTrieMigrationCall_migrate_custom_top { + __kind: 'migrate_custom_top' + keys: Bytes[] + witnessSize: number +} + +/** + * See [`Pallet::set_signed_max_limits`]. + */ +export interface StateTrieMigrationCall_set_signed_max_limits { + __kind: 'set_signed_max_limits' + limits: MigrationLimits +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: sts.number(), + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + controller: AccountId32, + }), + force_apply_min_commission: sts.enumStruct({ + validatorStash: AccountId32, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => MultiAddress), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => MultiAddress), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + }), + reap_stash: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.unit(), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId32), + }), + set_min_commission: sts.enumStruct({ + new: Perbill, + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_staking_configs: sts.enumStruct({ + minNominatorBond: ConfigOp, + minValidatorBond: ConfigOp, + maxNominatorCount: Type_91, + maxValidatorCount: Type_91, + chillThreshold: Type_92, + minCommission: Type_93, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export const Type_93: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export type Type_93 = Type_93_Noop | Type_93_Remove | Type_93_Set + +export interface Type_93_Noop { + __kind: 'Noop' +} + +export interface Type_93_Remove { + __kind: 'Remove' +} + +export interface Type_93_Set { + __kind: 'Set' + value: Perbill +} + +export type Perbill = number + +export const Type_92: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Percent, + } +}) + +export type Type_92 = Type_92_Noop | Type_92_Remove | Type_92_Set + +export interface Type_92_Noop { + __kind: 'Noop' +} + +export interface Type_92_Remove { + __kind: 'Remove' +} + +export interface Type_92_Set { + __kind: 'Set' + value: Percent +} + +export type Percent = number + +export const Type_91: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_91 = Type_91_Noop | Type_91_Remove | Type_91_Set + +export interface Type_91_Noop { + __kind: 'Noop' +} + +export interface Type_91_Remove { + __kind: 'Remove' +} + +export interface Type_91_Set { + __kind: 'Set' + value: number +} + +export const ConfigOp: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type ConfigOp = ConfigOp_Noop | ConfigOp_Remove | ConfigOp_Set + +export interface ConfigOp_Noop { + __kind: 'Noop' +} + +export interface ConfigOp_Remove { + __kind: 'Remove' +} + +export interface ConfigOp_Set { + __kind: 'Set' + value: bigint +} + +export const Perbill = sts.number() + +export const Percent = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_force_apply_min_commission | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_invulnerables | StakingCall_set_min_commission | StakingCall_set_payee | StakingCall_set_staking_configs | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * See [`Pallet::bond`]. + */ +export interface StakingCall_bond { + __kind: 'bond' + value: bigint + payee: RewardDestination +} + +/** + * See [`Pallet::bond_extra`]. + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * See [`Pallet::cancel_deferred_slash`]. + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: number + slashIndices: number[] +} + +/** + * See [`Pallet::chill`]. + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * See [`Pallet::chill_other`]. + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + controller: AccountId32 +} + +/** + * See [`Pallet::force_apply_min_commission`]. + */ +export interface StakingCall_force_apply_min_commission { + __kind: 'force_apply_min_commission' + validatorStash: AccountId32 +} + +/** + * See [`Pallet::force_new_era`]. + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * See [`Pallet::force_new_era_always`]. + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * See [`Pallet::force_no_eras`]. + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * See [`Pallet::force_unstake`]. + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * See [`Pallet::increase_validator_count`]. + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * See [`Pallet::kick`]. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: MultiAddress[] +} + +/** + * See [`Pallet::nominate`]. + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: MultiAddress[] +} + +/** + * See [`Pallet::payout_stakers`]. + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId32 + era: number +} + +/** + * See [`Pallet::reap_stash`]. + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * See [`Pallet::rebond`]. + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * See [`Pallet::scale_validator_count`]. + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * See [`Pallet::set_controller`]. + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' +} + +/** + * See [`Pallet::set_invulnerables`]. + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId32[] +} + +/** + * See [`Pallet::set_min_commission`]. + */ +export interface StakingCall_set_min_commission { + __kind: 'set_min_commission' + new: Perbill +} + +/** + * See [`Pallet::set_payee`]. + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * See [`Pallet::set_staking_configs`]. + */ +export interface StakingCall_set_staking_configs { + __kind: 'set_staking_configs' + minNominatorBond: ConfigOp + minValidatorBond: ConfigOp + maxNominatorCount: Type_91 + maxValidatorCount: Type_91 + chillThreshold: Type_92 + minCommission: Type_93 +} + +/** + * See [`Pallet::set_validator_count`]. + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * See [`Pallet::unbond`]. + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * See [`Pallet::validate`]. + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * See [`Pallet::withdraw_unbonded`]. + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bestow_membership: sts.enumStruct({ + candidate: AccountId32, + }), + bid: sts.enumStruct({ + value: sts.bigint(), + }), + claim_membership: sts.unit(), + cleanup_candidacy: sts.enumStruct({ + candidate: AccountId32, + max: sts.number(), + }), + cleanup_challenge: sts.enumStruct({ + challengeRound: sts.number(), + max: sts.number(), + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + dissolve: sts.unit(), + drop_candidate: sts.enumStruct({ + candidate: AccountId32, + }), + found_society: sts.enumStruct({ + founder: MultiAddress, + maxMembers: sts.number(), + maxIntake: sts.number(), + maxStrikes: sts.number(), + candidateDeposit: sts.bigint(), + rules: sts.bytes(), + }), + judge_suspended_member: sts.enumStruct({ + who: MultiAddress, + forgive: sts.boolean(), + }), + kick_candidate: sts.enumStruct({ + candidate: AccountId32, + }), + payout: sts.unit(), + punish_skeptic: sts.unit(), + resign_candidacy: sts.unit(), + set_parameters: sts.enumStruct({ + maxMembers: sts.number(), + maxIntake: sts.number(), + maxStrikes: sts.number(), + candidateDeposit: sts.bigint(), + }), + unbid: sts.unit(), + unvouch: sts.unit(), + vote: sts.enumStruct({ + candidate: MultiAddress, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: MultiAddress, + value: sts.bigint(), + tip: sts.bigint(), + }), + waive_repay: sts.enumStruct({ + amount: sts.bigint(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SocietyCall = SocietyCall_bestow_membership | SocietyCall_bid | SocietyCall_claim_membership | SocietyCall_cleanup_candidacy | SocietyCall_cleanup_challenge | SocietyCall_defender_vote | SocietyCall_dissolve | SocietyCall_drop_candidate | SocietyCall_found_society | SocietyCall_judge_suspended_member | SocietyCall_kick_candidate | SocietyCall_payout | SocietyCall_punish_skeptic | SocietyCall_resign_candidacy | SocietyCall_set_parameters | SocietyCall_unbid | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch | SocietyCall_waive_repay + +/** + * See [`Pallet::bestow_membership`]. + */ +export interface SocietyCall_bestow_membership { + __kind: 'bestow_membership' + candidate: AccountId32 +} + +/** + * See [`Pallet::bid`]. + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: bigint +} + +/** + * See [`Pallet::claim_membership`]. + */ +export interface SocietyCall_claim_membership { + __kind: 'claim_membership' +} + +/** + * See [`Pallet::cleanup_candidacy`]. + */ +export interface SocietyCall_cleanup_candidacy { + __kind: 'cleanup_candidacy' + candidate: AccountId32 + max: number +} + +/** + * See [`Pallet::cleanup_challenge`]. + */ +export interface SocietyCall_cleanup_challenge { + __kind: 'cleanup_challenge' + challengeRound: number + max: number +} + +/** + * See [`Pallet::defender_vote`]. + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * See [`Pallet::dissolve`]. + */ +export interface SocietyCall_dissolve { + __kind: 'dissolve' +} + +/** + * See [`Pallet::drop_candidate`]. + */ +export interface SocietyCall_drop_candidate { + __kind: 'drop_candidate' + candidate: AccountId32 +} + +/** + * See [`Pallet::found_society`]. + */ +export interface SocietyCall_found_society { + __kind: 'found_society' + founder: MultiAddress + maxMembers: number + maxIntake: number + maxStrikes: number + candidateDeposit: bigint + rules: Bytes +} + +/** + * See [`Pallet::judge_suspended_member`]. + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: MultiAddress + forgive: boolean +} + +/** + * See [`Pallet::kick_candidate`]. + */ +export interface SocietyCall_kick_candidate { + __kind: 'kick_candidate' + candidate: AccountId32 +} + +/** + * See [`Pallet::payout`]. + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * See [`Pallet::punish_skeptic`]. + */ +export interface SocietyCall_punish_skeptic { + __kind: 'punish_skeptic' +} + +/** + * See [`Pallet::resign_candidacy`]. + */ +export interface SocietyCall_resign_candidacy { + __kind: 'resign_candidacy' +} + +/** + * See [`Pallet::set_parameters`]. + */ +export interface SocietyCall_set_parameters { + __kind: 'set_parameters' + maxMembers: number + maxIntake: number + maxStrikes: number + candidateDeposit: bigint +} + +/** + * See [`Pallet::unbid`]. + */ +export interface SocietyCall_unbid { + __kind: 'unbid' +} + +/** + * See [`Pallet::unvouch`]. + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' +} + +/** + * See [`Pallet::vote`]. + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: MultiAddress + approve: boolean +} + +/** + * See [`Pallet::vouch`]. + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: MultiAddress + value: bigint + tip: bigint +} + +/** + * See [`Pallet::waive_repay`]. + */ +export interface SocietyCall_waive_repay { + __kind: 'waive_repay' + amount: bigint +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: Id, + }), + force_lease: sts.enumStruct({ + para: Id, + leaser: AccountId32, + amount: sts.bigint(), + periodBegin: sts.number(), + periodCount: sts.number(), + }), + trigger_onboard: sts.enumStruct({ + para: Id, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * See [`Pallet::clear_all_leases`]. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: Id +} + +/** + * See [`Pallet::force_lease`]. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: Id + leaser: AccountId32 + amount: bigint + periodBegin: number + periodCount: number +} + +/** + * See [`Pallet::trigger_onboard`]. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: Id +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: SessionKeys, + proof: sts.bytes(), + }), + } +}) + +export const SessionKeys: sts.Type = sts.struct(() => { + return { + grandpa: Public, + babe: sts.bytes(), + imOnline: sts.bytes(), + paraValidator: V5Public, + paraAssignment: sts.bytes(), + authorityDiscovery: sts.bytes(), + beefy: sts.bytes(), + } +}) + +export const V5Public = sts.bytes() + +export const Public = sts.bytes() + +export interface SessionKeys { + grandpa: Public + babe: Bytes + imOnline: Bytes + paraValidator: V5Public + paraAssignment: Bytes + authorityDiscovery: Bytes + beefy: Bytes +} + +export type V5Public = Bytes + +export type Public = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * See [`Pallet::purge_keys`]. + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * See [`Pallet::set_keys`]. + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: SessionKeys + proof: Bytes +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: sts.number(), + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_after: sts.enumStruct({ + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * See [`Pallet::cancel`]. + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: number + index: number +} + +/** + * See [`Pallet::cancel_named`]. + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * See [`Pallet::schedule`]. + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * See [`Pallet::schedule_after`]. + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * See [`Pallet::schedule_named`]. + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * See [`Pallet::schedule_named_after`]. + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + add_lock: sts.enumStruct({ + para: Id, + }), + deregister: sts.enumStruct({ + id: Id, + }), + force_register: sts.enumStruct({ + who: AccountId32, + deposit: sts.bigint(), + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + register: sts.enumStruct({ + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + remove_lock: sts.enumStruct({ + para: Id, + }), + reserve: sts.unit(), + schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + swap: sts.enumStruct({ + id: Id, + other: Id, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type RegistrarCall = RegistrarCall_add_lock | RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_register | RegistrarCall_remove_lock | RegistrarCall_reserve | RegistrarCall_schedule_code_upgrade | RegistrarCall_set_current_head | RegistrarCall_swap + +/** + * See [`Pallet::add_lock`]. + */ +export interface RegistrarCall_add_lock { + __kind: 'add_lock' + para: Id +} + +/** + * See [`Pallet::deregister`]. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: Id +} + +/** + * See [`Pallet::force_register`]. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId32 + deposit: bigint + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * See [`Pallet::register`]. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * See [`Pallet::remove_lock`]. + */ +export interface RegistrarCall_remove_lock { + __kind: 'remove_lock' + para: Id +} + +/** + * See [`Pallet::reserve`]. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * See [`Pallet::schedule_code_upgrade`]. + */ +export interface RegistrarCall_schedule_code_upgrade { + __kind: 'schedule_code_upgrade' + para: Id + newCode: ValidationCode +} + +/** + * See [`Pallet::set_current_head`]. + */ +export interface RegistrarCall_set_current_head { + __kind: 'set_current_head' + para: Id + newHead: HeadData +} + +/** + * See [`Pallet::swap`]. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: Id + other: Id +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ReferendaCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + index: sts.number(), + }), + kill: sts.enumStruct({ + index: sts.number(), + }), + nudge_referendum: sts.enumStruct({ + index: sts.number(), + }), + one_fewer_deciding: sts.enumStruct({ + track: sts.number(), + }), + place_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_submission_deposit: sts.enumStruct({ + index: sts.number(), + }), + set_metadata: sts.enumStruct({ + index: sts.number(), + maybeHash: sts.option(() => H256), + }), + submit: sts.enumStruct({ + proposalOrigin: OriginCaller, + proposal: Bounded, + enactmentMoment: DispatchTime, + }), + } +}) + +export const DispatchTime: sts.Type = sts.closedEnum(() => { + return { + After: sts.number(), + At: sts.number(), + } +}) + +export type DispatchTime = DispatchTime_After | DispatchTime_At + +export interface DispatchTime_After { + __kind: 'After' + value: number +} + +export interface DispatchTime_At { + __kind: 'At' + value: number +} + +export const Bounded: sts.Type = sts.closedEnum(() => { + return { + Inline: sts.bytes(), + Legacy: sts.enumStruct({ + hash: H256, + }), + Lookup: sts.enumStruct({ + hash: H256, + len: sts.number(), + }), + } +}) + +export type Bounded = Bounded_Inline | Bounded_Legacy | Bounded_Lookup + +export interface Bounded_Inline { + __kind: 'Inline' + value: Bytes +} + +export interface Bounded_Legacy { + __kind: 'Legacy' + hash: H256 +} + +export interface Bounded_Lookup { + __kind: 'Lookup' + hash: H256 + len: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ReferendaCall = ReferendaCall_cancel | ReferendaCall_kill | ReferendaCall_nudge_referendum | ReferendaCall_one_fewer_deciding | ReferendaCall_place_decision_deposit | ReferendaCall_refund_decision_deposit | ReferendaCall_refund_submission_deposit | ReferendaCall_set_metadata | ReferendaCall_submit + +/** + * See [`Pallet::cancel`]. + */ +export interface ReferendaCall_cancel { + __kind: 'cancel' + index: number +} + +/** + * See [`Pallet::kill`]. + */ +export interface ReferendaCall_kill { + __kind: 'kill' + index: number +} + +/** + * See [`Pallet::nudge_referendum`]. + */ +export interface ReferendaCall_nudge_referendum { + __kind: 'nudge_referendum' + index: number +} + +/** + * See [`Pallet::one_fewer_deciding`]. + */ +export interface ReferendaCall_one_fewer_deciding { + __kind: 'one_fewer_deciding' + track: number +} + +/** + * See [`Pallet::place_decision_deposit`]. + */ +export interface ReferendaCall_place_decision_deposit { + __kind: 'place_decision_deposit' + index: number +} + +/** + * See [`Pallet::refund_decision_deposit`]. + */ +export interface ReferendaCall_refund_decision_deposit { + __kind: 'refund_decision_deposit' + index: number +} + +/** + * See [`Pallet::refund_submission_deposit`]. + */ +export interface ReferendaCall_refund_submission_deposit { + __kind: 'refund_submission_deposit' + index: number +} + +/** + * See [`Pallet::set_metadata`]. + */ +export interface ReferendaCall_set_metadata { + __kind: 'set_metadata' + index: number + maybeHash?: (H256 | undefined) +} + +/** + * See [`Pallet::submit`]. + */ +export interface ReferendaCall_submit { + __kind: 'submit' + proposalOrigin: OriginCaller + proposal: Bounded + enactmentMoment: DispatchTime +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: MultiAddress, + call: Call, + }), + cancel_recovered: sts.enumStruct({ + account: MultiAddress, + }), + claim_recovery: sts.enumStruct({ + account: MultiAddress, + }), + close_recovery: sts.enumStruct({ + rescuer: MultiAddress, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId32), + threshold: sts.number(), + delayPeriod: sts.number(), + }), + initiate_recovery: sts.enumStruct({ + account: MultiAddress, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + vouch_recovery: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * See [`Pallet::as_recovered`]. + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: MultiAddress + call: Call +} + +/** + * See [`Pallet::cancel_recovered`]. + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: MultiAddress +} + +/** + * See [`Pallet::claim_recovery`]. + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: MultiAddress +} + +/** + * See [`Pallet::close_recovery`]. + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: MultiAddress +} + +/** + * See [`Pallet::create_recovery`]. + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId32[] + threshold: number + delayPeriod: number +} + +/** + * See [`Pallet::initiate_recovery`]. + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: MultiAddress +} + +/** + * See [`Pallet::remove_recovery`]. + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * See [`Pallet::set_recovered`]. + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * See [`Pallet::vouch_recovery`]. + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + announce: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + create_pure: sts.enumStruct({ + proxyType: ProxyType, + delay: sts.number(), + index: sts.number(), + }), + kill_pure: sts.enumStruct({ + spawner: MultiAddress, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + proxy_announced: sts.enumStruct({ + delegate: MultiAddress, + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + reject_announcement: sts.enumStruct({ + delegate: MultiAddress, + callHash: H256, + }), + remove_announcement: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_create_pure | ProxyCall_kill_pure | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * See [`Pallet::add_proxy`]. + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +/** + * See [`Pallet::announce`]. + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: MultiAddress + callHash: H256 +} + +/** + * See [`Pallet::create_pure`]. + */ +export interface ProxyCall_create_pure { + __kind: 'create_pure' + proxyType: ProxyType + delay: number + index: number +} + +/** + * See [`Pallet::kill_pure`]. + */ +export interface ProxyCall_kill_pure { + __kind: 'kill_pure' + spawner: MultiAddress + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * See [`Pallet::proxy`]. + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * See [`Pallet::proxy_announced`]. + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: MultiAddress + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * See [`Pallet::reject_announcement`]. + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: MultiAddress + callHash: H256 +} + +/** + * See [`Pallet::remove_announcement`]. + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: MultiAddress + callHash: H256 +} + +/** + * See [`Pallet::remove_proxies`]. + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * See [`Pallet::remove_proxy`]. + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NominationPools | ProxyType_NonTransfer | ProxyType_Society | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NominationPools { + __kind: 'NominationPools' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Society { + __kind: 'Society' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const PreimageCall: sts.Type = sts.closedEnum(() => { + return { + note_preimage: sts.enumStruct({ + bytes: sts.bytes(), + }), + request_preimage: sts.enumStruct({ + hash: H256, + }), + unnote_preimage: sts.enumStruct({ + hash: H256, + }), + unrequest_preimage: sts.enumStruct({ + hash: H256, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type PreimageCall = PreimageCall_note_preimage | PreimageCall_request_preimage | PreimageCall_unnote_preimage | PreimageCall_unrequest_preimage + +/** + * See [`Pallet::note_preimage`]. + */ +export interface PreimageCall_note_preimage { + __kind: 'note_preimage' + bytes: Bytes +} + +/** + * See [`Pallet::request_preimage`]. + */ +export interface PreimageCall_request_preimage { + __kind: 'request_preimage' + hash: H256 +} + +/** + * See [`Pallet::unnote_preimage`]. + */ +export interface PreimageCall_unnote_preimage { + __kind: 'unnote_preimage' + hash: H256 +} + +/** + * See [`Pallet::unrequest_preimage`]. + */ +export interface PreimageCall_unrequest_preimage { + __kind: 'unrequest_preimage' + hash: H256 +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParasSlashingCall: sts.Type = sts.closedEnum(() => { + return { + report_dispute_lost_unsigned: sts.enumStruct({ + disputeProof: V5DisputeProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: sts.number(), + trieNodes: sts.array(() => sts.bytes()), + validatorCount: sts.number(), + } +}) + +export interface MembershipProof { + session: number + trieNodes: Bytes[] + validatorCount: number +} + +export const V5DisputeProof: sts.Type = sts.struct(() => { + return { + timeSlot: V5DisputesTimeSlot, + kind: V5SlashingOffenceKind, + validatorIndex: V5ValidatorIndex, + validatorId: V5Public, + } +}) + +export const V5ValidatorIndex = sts.number() + +export const V5SlashingOffenceKind: sts.Type = sts.closedEnum(() => { + return { + AgainstValid: sts.unit(), + ForInvalid: sts.unit(), + } +}) + +export type V5SlashingOffenceKind = V5SlashingOffenceKind_AgainstValid | V5SlashingOffenceKind_ForInvalid + +export interface V5SlashingOffenceKind_AgainstValid { + __kind: 'AgainstValid' +} + +export interface V5SlashingOffenceKind_ForInvalid { + __kind: 'ForInvalid' +} + +export const V5DisputesTimeSlot: sts.Type = sts.struct(() => { + return { + sessionIndex: sts.number(), + candidateHash: CandidateHash, + } +}) + +export const CandidateHash = sts.bytes() + +export interface V5DisputesTimeSlot { + sessionIndex: number + candidateHash: CandidateHash +} + +export type CandidateHash = Bytes + +export interface V5DisputeProof { + timeSlot: V5DisputesTimeSlot + kind: V5SlashingOffenceKind + validatorIndex: V5ValidatorIndex + validatorId: V5Public +} + +export type V5ValidatorIndex = number + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParasSlashingCall = ParasSlashingCall_report_dispute_lost_unsigned + +/** + * See [`Pallet::report_dispute_lost_unsigned`]. + */ +export interface ParasSlashingCall_report_dispute_lost_unsigned { + __kind: 'report_dispute_lost_unsigned' + disputeProof: V5DisputeProof + keyOwnerProof: MembershipProof +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParasSharedCall = never + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParasDisputesCall: sts.Type = sts.closedEnum(() => { + return { + force_unfreeze: sts.unit(), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParasDisputesCall = ParasDisputesCall_force_unfreeze + +/** + * See [`Pallet::force_unfreeze`]. + */ +export interface ParasDisputesCall_force_unfreeze { + __kind: 'force_unfreeze' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + add_trusted_validation_code: sts.enumStruct({ + validationCode: ValidationCode, + }), + force_note_new_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: Id, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + relayParentNumber: sts.number(), + }), + force_set_current_code: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_set_most_recent_context: sts.enumStruct({ + para: Id, + context: sts.number(), + }), + include_pvf_check_statement: sts.enumStruct({ + stmt: V5PvfCheckStatement, + signature: V5Signature, + }), + poke_unused_validation_code: sts.enumStruct({ + validationCodeHash: ValidationCodeHash, + }), + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const V5Signature = sts.bytes() + +export const V5PvfCheckStatement: sts.Type = sts.struct(() => { + return { + accept: sts.boolean(), + subject: ValidationCodeHash, + sessionIndex: sts.number(), + validatorIndex: V5ValidatorIndex, + } +}) + +export interface V5PvfCheckStatement { + accept: boolean + subject: ValidationCodeHash + sessionIndex: number + validatorIndex: V5ValidatorIndex +} + +export type ValidationCodeHash = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParasCall = ParasCall_add_trusted_validation_code | ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head | ParasCall_force_set_most_recent_context | ParasCall_include_pvf_check_statement | ParasCall_poke_unused_validation_code + +/** + * See [`Pallet::add_trusted_validation_code`]. + */ +export interface ParasCall_add_trusted_validation_code { + __kind: 'add_trusted_validation_code' + validationCode: ValidationCode +} + +/** + * See [`Pallet::force_note_new_head`]. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: Id + newHead: HeadData +} + +/** + * See [`Pallet::force_queue_action`]. + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: Id +} + +/** + * See [`Pallet::force_schedule_code_upgrade`]. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: Id + newCode: ValidationCode + relayParentNumber: number +} + +/** + * See [`Pallet::force_set_current_code`]. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: Id + newCode: ValidationCode +} + +/** + * See [`Pallet::force_set_current_head`]. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: Id + newHead: HeadData +} + +/** + * See [`Pallet::force_set_most_recent_context`]. + */ +export interface ParasCall_force_set_most_recent_context { + __kind: 'force_set_most_recent_context' + para: Id + context: number +} + +/** + * See [`Pallet::include_pvf_check_statement`]. + */ +export interface ParasCall_include_pvf_check_statement { + __kind: 'include_pvf_check_statement' + stmt: V5PvfCheckStatement + signature: V5Signature +} + +/** + * See [`Pallet::poke_unused_validation_code`]. + */ +export interface ParasCall_poke_unused_validation_code { + __kind: 'poke_unused_validation_code' + validationCodeHash: ValidationCodeHash +} + +export type V5Signature = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParaInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: V5InherentData, + }), + } +}) + +export const V5InherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => V5UncheckedSigned), + backedCandidates: sts.array(() => V5BackedCandidate), + disputes: sts.array(() => V5DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: H256, + number: sts.number(), + stateRoot: H256, + extrinsicsRoot: H256, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + Consensus: sts.tuple(() => [sts.bytes(), sts.bytes()]), + Other: sts.bytes(), + PreRuntime: sts.tuple(() => [sts.bytes(), sts.bytes()]), + RuntimeEnvironmentUpdated: sts.unit(), + Seal: sts.tuple(() => [sts.bytes(), sts.bytes()]), + } +}) + +export type DigestItem = DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: [Bytes, Bytes] +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: [Bytes, Bytes] +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: [Bytes, Bytes] +} + +export interface Digest { + logs: DigestItem[] +} + +export interface Header { + parentHash: H256 + number: number + stateRoot: H256 + extrinsicsRoot: H256 + digest: Digest +} + +export const V5DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: sts.number(), + statements: sts.array(() => sts.tuple(() => [V5DisputeStatement, V5ValidatorIndex, V5Signature])), + } +}) + +export const V5DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: V5InvalidDisputeStatementKind, + Valid: V5ValidDisputeStatementKind, + } +}) + +export const V5ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + BackingSeconded: H256, + BackingValid: H256, + Explicit: sts.unit(), + } +}) + +export type V5ValidDisputeStatementKind = V5ValidDisputeStatementKind_ApprovalChecking | V5ValidDisputeStatementKind_BackingSeconded | V5ValidDisputeStatementKind_BackingValid | V5ValidDisputeStatementKind_Explicit + +export interface V5ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface V5ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: H256 +} + +export interface V5ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: H256 +} + +export interface V5ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export const V5InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export type V5InvalidDisputeStatementKind = V5InvalidDisputeStatementKind_Explicit + +export interface V5InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type V5DisputeStatement = V5DisputeStatement_Invalid | V5DisputeStatement_Valid + +export interface V5DisputeStatement_Invalid { + __kind: 'Invalid' + value: V5InvalidDisputeStatementKind +} + +export interface V5DisputeStatement_Valid { + __kind: 'Valid' + value: V5ValidDisputeStatementKind +} + +export interface V5DisputeStatementSet { + candidateHash: CandidateHash + session: number + statements: [V5DisputeStatement, V5ValidatorIndex, V5Signature][] +} + +export const V5BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: V5CommittedCandidateReceipt, + validityVotes: sts.array(() => V5ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const V5ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: V5Signature, + Implicit: V5Signature, + } +}) + +export type V5ValidityAttestation = V5ValidityAttestation_Explicit | V5ValidityAttestation_Implicit + +export interface V5ValidityAttestation_Explicit { + __kind: 'Explicit' + value: V5Signature +} + +export interface V5ValidityAttestation_Implicit { + __kind: 'Implicit' + value: V5Signature +} + +export const V5CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: V5CandidateDescriptor, + commitments: V5CandidateCommitments, + } +}) + +export const V5CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => sts.bytes()), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: sts.number(), + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: Id, + data: sts.bytes(), + } +}) + +export interface OutboundHrmpMessage { + recipient: Id + data: Bytes +} + +export interface V5CandidateCommitments { + upwardMessages: Bytes[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: number +} + +export const V5CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: Id, + relayParent: H256, + collator: sts.bytes(), + persistedValidationDataHash: H256, + povHash: H256, + erasureRoot: H256, + signature: sts.bytes(), + paraHead: H256, + validationCodeHash: ValidationCodeHash, + } +}) + +export interface V5CandidateDescriptor { + paraId: Id + relayParent: H256 + collator: Bytes + persistedValidationDataHash: H256 + povHash: H256 + erasureRoot: H256 + signature: Bytes + paraHead: H256 + validationCodeHash: ValidationCodeHash +} + +export interface V5CommittedCandidateReceipt { + descriptor: V5CandidateDescriptor + commitments: V5CandidateCommitments +} + +export interface V5BackedCandidate { + candidate: V5CommittedCandidateReceipt + validityVotes: V5ValidityAttestation[] + validatorIndices: BitSequence +} + +export const V5UncheckedSigned: sts.Type = sts.struct(() => { + return { + payload: V5AvailabilityBitfield, + validatorIndex: V5ValidatorIndex, + signature: V5Signature, + } +}) + +export const V5AvailabilityBitfield = sts.bitseq() + +export interface V5UncheckedSigned { + payload: V5AvailabilityBitfield + validatorIndex: V5ValidatorIndex + signature: V5Signature +} + +export type V5AvailabilityBitfield = BitSequence + +export interface V5InherentData { + bitfields: V5UncheckedSigned[] + backedCandidates: V5BackedCandidate[] + disputes: V5DisputeStatementSet[] + parentHeader: Header +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParaInherentCall = ParaInherentCall_enter + +/** + * See [`Pallet::enter`]. + */ +export interface ParaInherentCall_enter { + __kind: 'enter' + data: V5InherentData +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParaInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParaInclusionCall = never + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const NominationPoolsCall: sts.Type = sts.closedEnum(() => { + return { + bond_extra: sts.enumStruct({ + extra: BondExtra, + }), + bond_extra_other: sts.enumStruct({ + member: MultiAddress, + extra: BondExtra, + }), + chill: sts.enumStruct({ + poolId: sts.number(), + }), + claim_commission: sts.enumStruct({ + poolId: sts.number(), + }), + claim_payout: sts.unit(), + claim_payout_other: sts.enumStruct({ + other: AccountId32, + }), + create: sts.enumStruct({ + amount: sts.bigint(), + root: MultiAddress, + nominator: MultiAddress, + bouncer: MultiAddress, + }), + create_with_pool_id: sts.enumStruct({ + amount: sts.bigint(), + root: MultiAddress, + nominator: MultiAddress, + bouncer: MultiAddress, + poolId: sts.number(), + }), + join: sts.enumStruct({ + amount: sts.bigint(), + poolId: sts.number(), + }), + nominate: sts.enumStruct({ + poolId: sts.number(), + validators: sts.array(() => AccountId32), + }), + pool_withdraw_unbonded: sts.enumStruct({ + poolId: sts.number(), + numSlashingSpans: sts.number(), + }), + set_claim_permission: sts.enumStruct({ + permission: ClaimPermission, + }), + set_commission: sts.enumStruct({ + poolId: sts.number(), + newCommission: sts.option(() => sts.tuple(() => [Perbill, AccountId32])), + }), + set_commission_change_rate: sts.enumStruct({ + poolId: sts.number(), + changeRate: CommissionChangeRate, + }), + set_commission_max: sts.enumStruct({ + poolId: sts.number(), + maxCommission: Perbill, + }), + set_configs: sts.enumStruct({ + minJoinBond: Type_315, + minCreateBond: Type_315, + maxPools: Type_316, + maxMembers: Type_316, + maxMembersPerPool: Type_316, + globalMaxCommission: Type_317, + }), + set_metadata: sts.enumStruct({ + poolId: sts.number(), + metadata: sts.bytes(), + }), + set_state: sts.enumStruct({ + poolId: sts.number(), + state: PoolState, + }), + unbond: sts.enumStruct({ + memberAccount: MultiAddress, + unbondingPoints: sts.bigint(), + }), + update_roles: sts.enumStruct({ + poolId: sts.number(), + newRoot: Type_318, + newNominator: Type_318, + newBouncer: Type_318, + }), + withdraw_unbonded: sts.enumStruct({ + memberAccount: MultiAddress, + numSlashingSpans: sts.number(), + }), + } +}) + +export const Type_318: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: AccountId32, + } +}) + +export type Type_318 = Type_318_Noop | Type_318_Remove | Type_318_Set + +export interface Type_318_Noop { + __kind: 'Noop' +} + +export interface Type_318_Remove { + __kind: 'Remove' +} + +export interface Type_318_Set { + __kind: 'Set' + value: AccountId32 +} + +export const PoolState: sts.Type = sts.closedEnum(() => { + return { + Blocked: sts.unit(), + Destroying: sts.unit(), + Open: sts.unit(), + } +}) + +export type PoolState = PoolState_Blocked | PoolState_Destroying | PoolState_Open + +export interface PoolState_Blocked { + __kind: 'Blocked' +} + +export interface PoolState_Destroying { + __kind: 'Destroying' +} + +export interface PoolState_Open { + __kind: 'Open' +} + +export const Type_317: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export type Type_317 = Type_317_Noop | Type_317_Remove | Type_317_Set + +export interface Type_317_Noop { + __kind: 'Noop' +} + +export interface Type_317_Remove { + __kind: 'Remove' +} + +export interface Type_317_Set { + __kind: 'Set' + value: Perbill +} + +export const Type_316: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_316 = Type_316_Noop | Type_316_Remove | Type_316_Set + +export interface Type_316_Noop { + __kind: 'Noop' +} + +export interface Type_316_Remove { + __kind: 'Remove' +} + +export interface Type_316_Set { + __kind: 'Set' + value: number +} + +export const Type_315: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type Type_315 = Type_315_Noop | Type_315_Remove | Type_315_Set + +export interface Type_315_Noop { + __kind: 'Noop' +} + +export interface Type_315_Remove { + __kind: 'Remove' +} + +export interface Type_315_Set { + __kind: 'Set' + value: bigint +} + +export const CommissionChangeRate: sts.Type = sts.struct(() => { + return { + maxIncrease: Perbill, + minDelay: sts.number(), + } +}) + +export interface CommissionChangeRate { + maxIncrease: Perbill + minDelay: number +} + +export const ClaimPermission: sts.Type = sts.closedEnum(() => { + return { + Permissioned: sts.unit(), + PermissionlessAll: sts.unit(), + PermissionlessCompound: sts.unit(), + PermissionlessWithdraw: sts.unit(), + } +}) + +export type ClaimPermission = ClaimPermission_Permissioned | ClaimPermission_PermissionlessAll | ClaimPermission_PermissionlessCompound | ClaimPermission_PermissionlessWithdraw + +export interface ClaimPermission_Permissioned { + __kind: 'Permissioned' +} + +export interface ClaimPermission_PermissionlessAll { + __kind: 'PermissionlessAll' +} + +export interface ClaimPermission_PermissionlessCompound { + __kind: 'PermissionlessCompound' +} + +export interface ClaimPermission_PermissionlessWithdraw { + __kind: 'PermissionlessWithdraw' +} + +export const BondExtra: sts.Type = sts.closedEnum(() => { + return { + FreeBalance: sts.bigint(), + Rewards: sts.unit(), + } +}) + +export type BondExtra = BondExtra_FreeBalance | BondExtra_Rewards + +export interface BondExtra_FreeBalance { + __kind: 'FreeBalance' + value: bigint +} + +export interface BondExtra_Rewards { + __kind: 'Rewards' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type NominationPoolsCall = NominationPoolsCall_bond_extra | NominationPoolsCall_bond_extra_other | NominationPoolsCall_chill | NominationPoolsCall_claim_commission | NominationPoolsCall_claim_payout | NominationPoolsCall_claim_payout_other | NominationPoolsCall_create | NominationPoolsCall_create_with_pool_id | NominationPoolsCall_join | NominationPoolsCall_nominate | NominationPoolsCall_pool_withdraw_unbonded | NominationPoolsCall_set_claim_permission | NominationPoolsCall_set_commission | NominationPoolsCall_set_commission_change_rate | NominationPoolsCall_set_commission_max | NominationPoolsCall_set_configs | NominationPoolsCall_set_metadata | NominationPoolsCall_set_state | NominationPoolsCall_unbond | NominationPoolsCall_update_roles | NominationPoolsCall_withdraw_unbonded + +/** + * See [`Pallet::bond_extra`]. + */ +export interface NominationPoolsCall_bond_extra { + __kind: 'bond_extra' + extra: BondExtra +} + +/** + * See [`Pallet::bond_extra_other`]. + */ +export interface NominationPoolsCall_bond_extra_other { + __kind: 'bond_extra_other' + member: MultiAddress + extra: BondExtra +} + +/** + * See [`Pallet::chill`]. + */ +export interface NominationPoolsCall_chill { + __kind: 'chill' + poolId: number +} + +/** + * See [`Pallet::claim_commission`]. + */ +export interface NominationPoolsCall_claim_commission { + __kind: 'claim_commission' + poolId: number +} + +/** + * See [`Pallet::claim_payout`]. + */ +export interface NominationPoolsCall_claim_payout { + __kind: 'claim_payout' +} + +/** + * See [`Pallet::claim_payout_other`]. + */ +export interface NominationPoolsCall_claim_payout_other { + __kind: 'claim_payout_other' + other: AccountId32 +} + +/** + * See [`Pallet::create`]. + */ +export interface NominationPoolsCall_create { + __kind: 'create' + amount: bigint + root: MultiAddress + nominator: MultiAddress + bouncer: MultiAddress +} + +/** + * See [`Pallet::create_with_pool_id`]. + */ +export interface NominationPoolsCall_create_with_pool_id { + __kind: 'create_with_pool_id' + amount: bigint + root: MultiAddress + nominator: MultiAddress + bouncer: MultiAddress + poolId: number +} + +/** + * See [`Pallet::join`]. + */ +export interface NominationPoolsCall_join { + __kind: 'join' + amount: bigint + poolId: number +} + +/** + * See [`Pallet::nominate`]. + */ +export interface NominationPoolsCall_nominate { + __kind: 'nominate' + poolId: number + validators: AccountId32[] +} + +/** + * See [`Pallet::pool_withdraw_unbonded`]. + */ +export interface NominationPoolsCall_pool_withdraw_unbonded { + __kind: 'pool_withdraw_unbonded' + poolId: number + numSlashingSpans: number +} + +/** + * See [`Pallet::set_claim_permission`]. + */ +export interface NominationPoolsCall_set_claim_permission { + __kind: 'set_claim_permission' + permission: ClaimPermission +} + +/** + * See [`Pallet::set_commission`]. + */ +export interface NominationPoolsCall_set_commission { + __kind: 'set_commission' + poolId: number + newCommission?: ([Perbill, AccountId32] | undefined) +} + +/** + * See [`Pallet::set_commission_change_rate`]. + */ +export interface NominationPoolsCall_set_commission_change_rate { + __kind: 'set_commission_change_rate' + poolId: number + changeRate: CommissionChangeRate +} + +/** + * See [`Pallet::set_commission_max`]. + */ +export interface NominationPoolsCall_set_commission_max { + __kind: 'set_commission_max' + poolId: number + maxCommission: Perbill +} + +/** + * See [`Pallet::set_configs`]. + */ +export interface NominationPoolsCall_set_configs { + __kind: 'set_configs' + minJoinBond: Type_315 + minCreateBond: Type_315 + maxPools: Type_316 + maxMembers: Type_316 + maxMembersPerPool: Type_316 + globalMaxCommission: Type_317 +} + +/** + * See [`Pallet::set_metadata`]. + */ +export interface NominationPoolsCall_set_metadata { + __kind: 'set_metadata' + poolId: number + metadata: Bytes +} + +/** + * See [`Pallet::set_state`]. + */ +export interface NominationPoolsCall_set_state { + __kind: 'set_state' + poolId: number + state: PoolState +} + +/** + * See [`Pallet::unbond`]. + */ +export interface NominationPoolsCall_unbond { + __kind: 'unbond' + memberAccount: MultiAddress + unbondingPoints: bigint +} + +/** + * See [`Pallet::update_roles`]. + */ +export interface NominationPoolsCall_update_roles { + __kind: 'update_roles' + poolId: number + newRoot: Type_318 + newNominator: Type_318 + newBouncer: Type_318 +} + +/** + * See [`Pallet::withdraw_unbonded`]. + */ +export interface NominationPoolsCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + memberAccount: MultiAddress + numSlashingSpans: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const NisCounterpartBalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + }), + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + set_balance_deprecated: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + oldReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_allow_death: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + upgrade_accounts: sts.enumStruct({ + who: sts.array(() => AccountId32), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type NisCounterpartBalancesCall = NisCounterpartBalancesCall_force_set_balance | NisCounterpartBalancesCall_force_transfer | NisCounterpartBalancesCall_force_unreserve | NisCounterpartBalancesCall_set_balance_deprecated | NisCounterpartBalancesCall_transfer | NisCounterpartBalancesCall_transfer_all | NisCounterpartBalancesCall_transfer_allow_death | NisCounterpartBalancesCall_transfer_keep_alive | NisCounterpartBalancesCall_upgrade_accounts + +/** + * See [`Pallet::force_set_balance`]. + */ +export interface NisCounterpartBalancesCall_force_set_balance { + __kind: 'force_set_balance' + who: MultiAddress + newFree: bigint +} + +/** + * See [`Pallet::force_transfer`]. + */ +export interface NisCounterpartBalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::force_unreserve`]. + */ +export interface NisCounterpartBalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * See [`Pallet::set_balance_deprecated`]. + */ +export interface NisCounterpartBalancesCall_set_balance_deprecated { + __kind: 'set_balance_deprecated' + who: MultiAddress + newFree: bigint + oldReserved: bigint +} + +/** + * See [`Pallet::transfer`]. + */ +export interface NisCounterpartBalancesCall_transfer { + __kind: 'transfer' + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::transfer_all`]. + */ +export interface NisCounterpartBalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * See [`Pallet::transfer_allow_death`]. + */ +export interface NisCounterpartBalancesCall_transfer_allow_death { + __kind: 'transfer_allow_death' + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::transfer_keep_alive`]. + */ +export interface NisCounterpartBalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::upgrade_accounts`]. + */ +export interface NisCounterpartBalancesCall_upgrade_accounts { + __kind: 'upgrade_accounts' + who: AccountId32[] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const NisCall: sts.Type = sts.closedEnum(() => { + return { + communify: sts.enumStruct({ + index: sts.number(), + }), + fund_deficit: sts.unit(), + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + privatize: sts.enumStruct({ + index: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + thaw_communal: sts.enumStruct({ + index: sts.number(), + }), + thaw_private: sts.enumStruct({ + index: sts.number(), + maybeProportion: sts.option(() => Perquintill), + }), + } +}) + +export const Perquintill = sts.bigint() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type NisCall = NisCall_communify | NisCall_fund_deficit | NisCall_place_bid | NisCall_privatize | NisCall_retract_bid | NisCall_thaw_communal | NisCall_thaw_private + +/** + * See [`Pallet::communify`]. + */ +export interface NisCall_communify { + __kind: 'communify' + index: number +} + +/** + * See [`Pallet::fund_deficit`]. + */ +export interface NisCall_fund_deficit { + __kind: 'fund_deficit' +} + +/** + * See [`Pallet::place_bid`]. + */ +export interface NisCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * See [`Pallet::privatize`]. + */ +export interface NisCall_privatize { + __kind: 'privatize' + index: number +} + +/** + * See [`Pallet::retract_bid`]. + */ +export interface NisCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * See [`Pallet::thaw_communal`]. + */ +export interface NisCall_thaw_communal { + __kind: 'thaw_communal' + index: number +} + +/** + * See [`Pallet::thaw_private`]. + */ +export interface NisCall_thaw_private { + __kind: 'thaw_private' + index: number + maybeProportion?: (Perquintill | undefined) +} + +export type Perquintill = bigint + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + call: Call, + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId32), + call: Call, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * See [`Pallet::approve_as_multi`]. + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * See [`Pallet::as_multi`]. + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + call: Call + maxWeight: Weight +} + +/** + * See [`Pallet::as_multi_threshold_1`]. + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId32[] + call: Call +} + +/** + * See [`Pallet::cancel_as_multi`]. + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId32[] + timepoint: Timepoint + callHash: Bytes +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const MessageQueueCall: sts.Type = sts.closedEnum(() => { + return { + execute_overweight: sts.enumStruct({ + messageOrigin: AggregateMessageOrigin, + page: sts.number(), + index: sts.number(), + weightLimit: Weight, + }), + reap_page: sts.enumStruct({ + messageOrigin: AggregateMessageOrigin, + pageIndex: sts.number(), + }), + } +}) + +export const AggregateMessageOrigin: sts.Type = sts.closedEnum(() => { + return { + Ump: UmpQueueId, + } +}) + +export const UmpQueueId: sts.Type = sts.closedEnum(() => { + return { + Para: Id, + } +}) + +export type UmpQueueId = UmpQueueId_Para + +export interface UmpQueueId_Para { + __kind: 'Para' + value: Id +} + +export type AggregateMessageOrigin = AggregateMessageOrigin_Ump + +export interface AggregateMessageOrigin_Ump { + __kind: 'Ump' + value: UmpQueueId +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type MessageQueueCall = MessageQueueCall_execute_overweight | MessageQueueCall_reap_page + +/** + * See [`Pallet::execute_overweight`]. + */ +export interface MessageQueueCall_execute_overweight { + __kind: 'execute_overweight' + messageOrigin: AggregateMessageOrigin + page: number + index: number + weightLimit: Weight +} + +/** + * See [`Pallet::reap_page`]. + */ +export interface MessageQueueCall_reap_page { + __kind: 'reap_page' + messageOrigin: AggregateMessageOrigin + pageIndex: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const InitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type InitializerCall = InitializerCall_force_approve + +/** + * See [`Pallet::force_approve`]. + */ +export interface InitializerCall_force_approve { + __kind: 'force_approve' + upTo: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: sts.number(), + }), + force_transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: sts.number(), + }), + freeze: sts.enumStruct({ + index: sts.number(), + }), + transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * See [`Pallet::claim`]. + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: number +} + +/** + * See [`Pallet::force_transfer`]. + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: MultiAddress + index: number + freeze: boolean +} + +/** + * See [`Pallet::free`]. + */ +export interface IndicesCall_free { + __kind: 'free' + index: number +} + +/** + * See [`Pallet::freeze`]. + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: number +} + +/** + * See [`Pallet::transfer`]. + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: MultiAddress + index: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: sts.bytes(), + }), + } +}) + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: sts.number(), + sessionIndex: sts.number(), + authorityIndex: sts.number(), + validatorsLen: sts.number(), + } +}) + +export interface Heartbeat { + blockNumber: number + sessionIndex: number + authorityIndex: number + validatorsLen: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * See [`Pallet::heartbeat`]. + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Bytes +} + +/** + * Identity pallet declaration. + */ +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: MultiAddress, + }), + add_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: sts.number(), + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: MultiAddress, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: MultiAddress, + judgement: Judgement, + identity: H256, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: MultiAddress, + }), + rename_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: MultiAddress, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: BitFlags, + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId32, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => sts.tuple(() => [Data, Data])), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => sts.bytes()), + image: Data, + twitter: Data, + } +}) + +export interface IdentityInfo { + additional: [Data, Data][] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (Bytes | undefined) + image: Data + twitter: Data +} + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: Bytes +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: Bytes +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: Bytes +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: Bytes +} + +export const BitFlags = sts.bigint() + +export const Judgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: sts.bigint(), + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export type Judgement = Judgement_Erroneous | Judgement_FeePaid | Judgement_KnownGood | Judgement_LowQuality | Judgement_OutOfDate | Judgement_Reasonable | Judgement_Unknown + +export interface Judgement_Erroneous { + __kind: 'Erroneous' +} + +export interface Judgement_FeePaid { + __kind: 'FeePaid' + value: bigint +} + +export interface Judgement_KnownGood { + __kind: 'KnownGood' +} + +export interface Judgement_LowQuality { + __kind: 'LowQuality' +} + +export interface Judgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface Judgement_Reasonable { + __kind: 'Reasonable' +} + +export interface Judgement_Unknown { + __kind: 'Unknown' +} + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: sts.bytes(), + Keccak256: sts.bytes(), + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: sts.bytes(), + ShaThree256: sts.bytes(), + } +}) + +/** + * Identity pallet declaration. + */ +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * See [`Pallet::add_registrar`]. + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: MultiAddress +} + +/** + * See [`Pallet::add_sub`]. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: MultiAddress + data: Data +} + +/** + * See [`Pallet::cancel_request`]. + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: number +} + +/** + * See [`Pallet::clear_identity`]. + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * See [`Pallet::kill_identity`]. + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: MultiAddress +} + +/** + * See [`Pallet::provide_judgement`]. + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: MultiAddress + judgement: Judgement + identity: H256 +} + +/** + * See [`Pallet::quit_sub`]. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * See [`Pallet::remove_sub`]. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: MultiAddress +} + +/** + * See [`Pallet::rename_sub`]. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: MultiAddress + data: Data +} + +/** + * See [`Pallet::request_judgement`]. + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * See [`Pallet::set_account_id`]. + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: MultiAddress +} + +/** + * See [`Pallet::set_fee`]. + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * See [`Pallet::set_fields`]. + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: BitFlags +} + +/** + * See [`Pallet::set_identity`]. + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * See [`Pallet::set_subs`]. + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId32, Data][] +} + +export type BitFlags = bigint + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const HrmpCall: sts.Type = sts.closedEnum(() => { + return { + force_clean_hrmp: sts.enumStruct({ + para: Id, + inbound: sts.number(), + outbound: sts.number(), + }), + force_open_hrmp_channel: sts.enumStruct({ + sender: Id, + recipient: Id, + maxCapacity: sts.number(), + maxMessageSize: sts.number(), + }), + force_process_hrmp_close: sts.enumStruct({ + channels: sts.number(), + }), + force_process_hrmp_open: sts.enumStruct({ + channels: sts.number(), + }), + hrmp_accept_open_channel: sts.enumStruct({ + sender: Id, + }), + hrmp_cancel_open_request: sts.enumStruct({ + channelId: HrmpChannelId, + openRequests: sts.number(), + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: Id, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: Id, + recipient: Id, + } +}) + +export interface HrmpChannelId { + sender: Id + recipient: Id +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type HrmpCall = HrmpCall_force_clean_hrmp | HrmpCall_force_open_hrmp_channel | HrmpCall_force_process_hrmp_close | HrmpCall_force_process_hrmp_open | HrmpCall_hrmp_accept_open_channel | HrmpCall_hrmp_cancel_open_request | HrmpCall_hrmp_close_channel | HrmpCall_hrmp_init_open_channel + +/** + * See [`Pallet::force_clean_hrmp`]. + */ +export interface HrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: Id + inbound: number + outbound: number +} + +/** + * See [`Pallet::force_open_hrmp_channel`]. + */ +export interface HrmpCall_force_open_hrmp_channel { + __kind: 'force_open_hrmp_channel' + sender: Id + recipient: Id + maxCapacity: number + maxMessageSize: number +} + +/** + * See [`Pallet::force_process_hrmp_close`]. + */ +export interface HrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' + channels: number +} + +/** + * See [`Pallet::force_process_hrmp_open`]. + */ +export interface HrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' + channels: number +} + +/** + * See [`Pallet::hrmp_accept_open_channel`]. + */ +export interface HrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: Id +} + +/** + * See [`Pallet::hrmp_cancel_open_request`]. + */ +export interface HrmpCall_hrmp_cancel_open_request { + __kind: 'hrmp_cancel_open_request' + channelId: HrmpChannelId + openRequests: number +} + +/** + * See [`Pallet::hrmp_close_channel`]. + */ +export interface HrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * See [`Pallet::hrmp_init_open_channel`]. + */ +export interface HrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: Id + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: sts.number(), + bestFinalizedBlockNumber: sts.number(), + }), + report_equivocation: sts.enumStruct({ + equivocationProof: Type_114, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_114, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const Type_114: sts.Type = sts.struct(() => { + return { + setId: sts.bigint(), + equivocation: Equivocation, + } +}) + +export const Equivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: Type_122, + Prevote: Type_116, + } +}) + +export const Type_116: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Prevote, sts.bytes()]), + second: sts.tuple(() => [Prevote, sts.bytes()]), + } +}) + +export const Prevote: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Prevote { + targetHash: H256 + targetNumber: number +} + +export interface Type_116 { + roundNumber: bigint + identity: Public + first: [Prevote, Bytes] + second: [Prevote, Bytes] +} + +export const Type_122: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Precommit, sts.bytes()]), + second: sts.tuple(() => [Precommit, sts.bytes()]), + } +}) + +export const Precommit: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Precommit { + targetHash: H256 + targetNumber: number +} + +export interface Type_122 { + roundNumber: bigint + identity: Public + first: [Precommit, Bytes] + second: [Precommit, Bytes] +} + +export type Equivocation = Equivocation_Precommit | Equivocation_Prevote + +export interface Equivocation_Precommit { + __kind: 'Precommit' + value: Type_122 +} + +export interface Equivocation_Prevote { + __kind: 'Prevote' + value: Type_116 +} + +export interface Type_114 { + setId: bigint + equivocation: Equivocation +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * See [`Pallet::note_stalled`]. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: number + bestFinalizedBlockNumber: number +} + +/** + * See [`Pallet::report_equivocation`]. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_114 + keyOwnerProof: MembershipProof +} + +/** + * See [`Pallet::report_equivocation_unsigned`]. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_114 + keyOwnerProof: MembershipProof +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const FellowshipReferendaCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + index: sts.number(), + }), + kill: sts.enumStruct({ + index: sts.number(), + }), + nudge_referendum: sts.enumStruct({ + index: sts.number(), + }), + one_fewer_deciding: sts.enumStruct({ + track: sts.number(), + }), + place_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_submission_deposit: sts.enumStruct({ + index: sts.number(), + }), + set_metadata: sts.enumStruct({ + index: sts.number(), + maybeHash: sts.option(() => H256), + }), + submit: sts.enumStruct({ + proposalOrigin: OriginCaller, + proposal: Bounded, + enactmentMoment: DispatchTime, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type FellowshipReferendaCall = FellowshipReferendaCall_cancel | FellowshipReferendaCall_kill | FellowshipReferendaCall_nudge_referendum | FellowshipReferendaCall_one_fewer_deciding | FellowshipReferendaCall_place_decision_deposit | FellowshipReferendaCall_refund_decision_deposit | FellowshipReferendaCall_refund_submission_deposit | FellowshipReferendaCall_set_metadata | FellowshipReferendaCall_submit + +/** + * See [`Pallet::cancel`]. + */ +export interface FellowshipReferendaCall_cancel { + __kind: 'cancel' + index: number +} + +/** + * See [`Pallet::kill`]. + */ +export interface FellowshipReferendaCall_kill { + __kind: 'kill' + index: number +} + +/** + * See [`Pallet::nudge_referendum`]. + */ +export interface FellowshipReferendaCall_nudge_referendum { + __kind: 'nudge_referendum' + index: number +} + +/** + * See [`Pallet::one_fewer_deciding`]. + */ +export interface FellowshipReferendaCall_one_fewer_deciding { + __kind: 'one_fewer_deciding' + track: number +} + +/** + * See [`Pallet::place_decision_deposit`]. + */ +export interface FellowshipReferendaCall_place_decision_deposit { + __kind: 'place_decision_deposit' + index: number +} + +/** + * See [`Pallet::refund_decision_deposit`]. + */ +export interface FellowshipReferendaCall_refund_decision_deposit { + __kind: 'refund_decision_deposit' + index: number +} + +/** + * See [`Pallet::refund_submission_deposit`]. + */ +export interface FellowshipReferendaCall_refund_submission_deposit { + __kind: 'refund_submission_deposit' + index: number +} + +/** + * See [`Pallet::set_metadata`]. + */ +export interface FellowshipReferendaCall_set_metadata { + __kind: 'set_metadata' + index: number + maybeHash?: (H256 | undefined) +} + +/** + * See [`Pallet::submit`]. + */ +export interface FellowshipReferendaCall_submit { + __kind: 'submit' + proposalOrigin: OriginCaller + proposal: Bounded + enactmentMoment: DispatchTime +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const FellowshipCollectiveCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: MultiAddress, + }), + cleanup_poll: sts.enumStruct({ + pollIndex: sts.number(), + max: sts.number(), + }), + demote_member: sts.enumStruct({ + who: MultiAddress, + }), + promote_member: sts.enumStruct({ + who: MultiAddress, + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + minRank: sts.number(), + }), + vote: sts.enumStruct({ + poll: sts.number(), + aye: sts.boolean(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type FellowshipCollectiveCall = FellowshipCollectiveCall_add_member | FellowshipCollectiveCall_cleanup_poll | FellowshipCollectiveCall_demote_member | FellowshipCollectiveCall_promote_member | FellowshipCollectiveCall_remove_member | FellowshipCollectiveCall_vote + +/** + * See [`Pallet::add_member`]. + */ +export interface FellowshipCollectiveCall_add_member { + __kind: 'add_member' + who: MultiAddress +} + +/** + * See [`Pallet::cleanup_poll`]. + */ +export interface FellowshipCollectiveCall_cleanup_poll { + __kind: 'cleanup_poll' + pollIndex: number + max: number +} + +/** + * See [`Pallet::demote_member`]. + */ +export interface FellowshipCollectiveCall_demote_member { + __kind: 'demote_member' + who: MultiAddress +} + +/** + * See [`Pallet::promote_member`]. + */ +export interface FellowshipCollectiveCall_promote_member { + __kind: 'promote_member' + who: MultiAddress +} + +/** + * See [`Pallet::remove_member`]. + */ +export interface FellowshipCollectiveCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + minRank: number +} + +/** + * See [`Pallet::vote`]. + */ +export interface FellowshipCollectiveCall_vote { + __kind: 'vote' + poll: number + aye: boolean +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const FastUnstakeCall: sts.Type = sts.closedEnum(() => { + return { + control: sts.enumStruct({ + erasToCheck: sts.number(), + }), + deregister: sts.unit(), + register_fast_unstake: sts.unit(), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type FastUnstakeCall = FastUnstakeCall_control | FastUnstakeCall_deregister | FastUnstakeCall_register_fast_unstake + +/** + * See [`Pallet::control`]. + */ +export interface FastUnstakeCall_control { + __kind: 'control' + erasToCheck: number +} + +/** + * See [`Pallet::deregister`]. + */ +export interface FastUnstakeCall_deregister { + __kind: 'deregister' +} + +/** + * See [`Pallet::register_fast_unstake`]. + */ +export interface FastUnstakeCall_register_fast_unstake { + __kind: 'register_fast_unstake' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + governance_fallback: sts.enumStruct({ + maybeMaxVoters: sts.option(() => sts.number()), + maybeMaxTargets: sts.option(() => sts.number()), + }), + set_emergency_election_result: sts.enumStruct({ + supports: sts.array(() => sts.tuple(() => [AccountId32, Support])), + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => ElectionScore), + }), + submit: sts.enumStruct({ + rawSolution: RawSolution, + }), + submit_unsigned: sts.enumStruct({ + rawSolution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export const RawSolution: sts.Type = sts.struct(() => { + return { + solution: NposCompactSolution24, + score: ElectionScore, + round: sts.number(), + } +}) + +export const NposCompactSolution24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), + votes2: sts.array(() => sts.tuple(() => [sts.number(), sts.tuple(() => [sts.number(), sts.number()]), sts.number()])), + votes3: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes4: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes5: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes6: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes7: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes8: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes9: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes10: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes11: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes12: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes13: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes14: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes15: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes16: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes17: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes18: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes19: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes20: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes21: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes22: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes23: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes24: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + } +}) + +export interface NposCompactSolution24 { + votes1: [number, number][] + votes2: [number, [number, number], number][] + votes3: [number, [number, number][], number][] + votes4: [number, [number, number][], number][] + votes5: [number, [number, number][], number][] + votes6: [number, [number, number][], number][] + votes7: [number, [number, number][], number][] + votes8: [number, [number, number][], number][] + votes9: [number, [number, number][], number][] + votes10: [number, [number, number][], number][] + votes11: [number, [number, number][], number][] + votes12: [number, [number, number][], number][] + votes13: [number, [number, number][], number][] + votes14: [number, [number, number][], number][] + votes15: [number, [number, number][], number][] + votes16: [number, [number, number][], number][] + votes17: [number, [number, number][], number][] + votes18: [number, [number, number][], number][] + votes19: [number, [number, number][], number][] + votes20: [number, [number, number][], number][] + votes21: [number, [number, number][], number][] + votes22: [number, [number, number][], number][] + votes23: [number, [number, number][], number][] + votes24: [number, [number, number][], number][] +} + +export interface RawSolution { + solution: NposCompactSolution24 + score: ElectionScore + round: number +} + +export interface ElectionScore { + minimalStake: bigint + sumStake: bigint + sumStakeSquared: bigint +} + +export const ElectionScore: sts.Type = sts.struct(() => { + return { + minimalStake: sts.bigint(), + sumStake: sts.bigint(), + sumStakeSquared: sts.bigint(), + } +}) + +export const Support: sts.Type = sts.struct(() => { + return { + total: sts.bigint(), + voters: sts.array(() => sts.tuple(() => [AccountId32, sts.bigint()])), + } +}) + +export interface Support { + total: bigint + voters: [AccountId32, bigint][] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_governance_fallback | ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * See [`Pallet::governance_fallback`]. + */ +export interface ElectionProviderMultiPhaseCall_governance_fallback { + __kind: 'governance_fallback' + maybeMaxVoters?: (number | undefined) + maybeMaxTargets?: (number | undefined) +} + +/** + * See [`Pallet::set_emergency_election_result`]. + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + supports: [AccountId32, Support][] +} + +/** + * See [`Pallet::set_minimum_untrusted_score`]. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (ElectionScore | undefined) +} + +/** + * See [`Pallet::submit`]. + */ +export interface ElectionProviderMultiPhaseCall_submit { + __kind: 'submit' + rawSolution: RawSolution +} + +/** + * See [`Pallet::submit_unsigned`]. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + rawSolution: RawSolution + witness: SolutionOrSnapshotSize +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: Id, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + contribute_all: sts.enumStruct({ + index: sts.number(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: Id, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId32, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_contribute_all | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * See [`Pallet::add_memo`]. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: Id + memo: Bytes +} + +/** + * See [`Pallet::contribute`]. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * See [`Pallet::contribute_all`]. + */ +export interface CrowdloanCall_contribute_all { + __kind: 'contribute_all' + index: number + signature?: (MultiSignature | undefined) +} + +/** + * See [`Pallet::create`]. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * See [`Pallet::dissolve`]. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * See [`Pallet::edit`]. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * See [`Pallet::poke`]. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: Id +} + +/** + * See [`Pallet::refund`]. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * See [`Pallet::withdraw`]. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId32 + index: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ConvictionVotingCall: sts.Type = sts.closedEnum(() => { + return { + delegate: sts.enumStruct({ + class: sts.number(), + to: MultiAddress, + conviction: Conviction, + balance: sts.bigint(), + }), + remove_other_vote: sts.enumStruct({ + target: MultiAddress, + class: sts.number(), + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + class: sts.option(() => sts.number()), + index: sts.number(), + }), + undelegate: sts.enumStruct({ + class: sts.number(), + }), + unlock: sts.enumStruct({ + class: sts.number(), + target: MultiAddress, + }), + vote: sts.enumStruct({ + pollIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + SplitAbstain: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + abstain: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type AccountVote = AccountVote_Split | AccountVote_SplitAbstain | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface AccountVote_SplitAbstain { + __kind: 'SplitAbstain' + aye: bigint + nay: bigint + abstain: bigint +} + +export interface AccountVote_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ConvictionVotingCall = ConvictionVotingCall_delegate | ConvictionVotingCall_remove_other_vote | ConvictionVotingCall_remove_vote | ConvictionVotingCall_undelegate | ConvictionVotingCall_unlock | ConvictionVotingCall_vote + +/** + * See [`Pallet::delegate`]. + */ +export interface ConvictionVotingCall_delegate { + __kind: 'delegate' + class: number + to: MultiAddress + conviction: Conviction + balance: bigint +} + +/** + * See [`Pallet::remove_other_vote`]. + */ +export interface ConvictionVotingCall_remove_other_vote { + __kind: 'remove_other_vote' + target: MultiAddress + class: number + index: number +} + +/** + * See [`Pallet::remove_vote`]. + */ +export interface ConvictionVotingCall_remove_vote { + __kind: 'remove_vote' + class?: (number | undefined) + index: number +} + +/** + * See [`Pallet::undelegate`]. + */ +export interface ConvictionVotingCall_undelegate { + __kind: 'undelegate' + class: number +} + +/** + * See [`Pallet::unlock`]. + */ +export interface ConvictionVotingCall_unlock { + __kind: 'unlock' + class: number + target: MultiAddress +} + +/** + * See [`Pallet::vote`]. + */ +export interface ConvictionVotingCall_vote { + __kind: 'vote' + pollIndex: number + vote: AccountVote +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_async_backing_params: sts.enumStruct({ + new: AsyncBackingParams, + }), + set_bypass_consistency_check: sts.enumStruct({ + new: sts.boolean(), + }), + set_code_retention_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: sts.number(), + }), + set_executor_params: sts.enumStruct({ + new: sts.array(() => V5ExecutorParam), + }), + set_group_rotation_frequency: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_minimum_backing_votes: sts.enumStruct({ + new: sts.number(), + }), + set_minimum_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_on_demand_base_fee: sts.enumStruct({ + new: sts.bigint(), + }), + set_on_demand_cores: sts.enumStruct({ + new: sts.number(), + }), + set_on_demand_fee_variability: sts.enumStruct({ + new: Perbill, + }), + set_on_demand_queue_max_size: sts.enumStruct({ + new: sts.number(), + }), + set_on_demand_retries: sts.enumStruct({ + new: sts.number(), + }), + set_on_demand_target_queue_utilization: sts.enumStruct({ + new: Perbill, + }), + set_on_demand_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_paras_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_pvf_voting_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_cooldown: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +export const V5ExecutorParam: sts.Type = sts.closedEnum(() => { + return { + MaxMemoryPages: sts.number(), + PrecheckingMaxMemory: sts.bigint(), + PvfExecTimeout: sts.tuple(() => [V5PvfExecTimeoutKind, sts.bigint()]), + PvfPrepTimeout: sts.tuple(() => [V5PvfPrepTimeoutKind, sts.bigint()]), + StackLogicalMax: sts.number(), + StackNativeMax: sts.number(), + WasmExtBulkMemory: sts.unit(), + } +}) + +export const V5PvfPrepTimeoutKind: sts.Type = sts.closedEnum(() => { + return { + Lenient: sts.unit(), + Precheck: sts.unit(), + } +}) + +export type V5PvfPrepTimeoutKind = V5PvfPrepTimeoutKind_Lenient | V5PvfPrepTimeoutKind_Precheck + +export interface V5PvfPrepTimeoutKind_Lenient { + __kind: 'Lenient' +} + +export interface V5PvfPrepTimeoutKind_Precheck { + __kind: 'Precheck' +} + +export const V5PvfExecTimeoutKind: sts.Type = sts.closedEnum(() => { + return { + Approval: sts.unit(), + Backing: sts.unit(), + } +}) + +export type V5PvfExecTimeoutKind = V5PvfExecTimeoutKind_Approval | V5PvfExecTimeoutKind_Backing + +export interface V5PvfExecTimeoutKind_Approval { + __kind: 'Approval' +} + +export interface V5PvfExecTimeoutKind_Backing { + __kind: 'Backing' +} + +export type V5ExecutorParam = V5ExecutorParam_MaxMemoryPages | V5ExecutorParam_PrecheckingMaxMemory | V5ExecutorParam_PvfExecTimeout | V5ExecutorParam_PvfPrepTimeout | V5ExecutorParam_StackLogicalMax | V5ExecutorParam_StackNativeMax | V5ExecutorParam_WasmExtBulkMemory + +export interface V5ExecutorParam_MaxMemoryPages { + __kind: 'MaxMemoryPages' + value: number +} + +export interface V5ExecutorParam_PrecheckingMaxMemory { + __kind: 'PrecheckingMaxMemory' + value: bigint +} + +export interface V5ExecutorParam_PvfExecTimeout { + __kind: 'PvfExecTimeout' + value: [V5PvfExecTimeoutKind, bigint] +} + +export interface V5ExecutorParam_PvfPrepTimeout { + __kind: 'PvfPrepTimeout' + value: [V5PvfPrepTimeoutKind, bigint] +} + +export interface V5ExecutorParam_StackLogicalMax { + __kind: 'StackLogicalMax' + value: number +} + +export interface V5ExecutorParam_StackNativeMax { + __kind: 'StackNativeMax' + value: number +} + +export interface V5ExecutorParam_WasmExtBulkMemory { + __kind: 'WasmExtBulkMemory' +} + +export const AsyncBackingParams: sts.Type = sts.struct(() => { + return { + maxCandidateDepth: sts.number(), + allowedAncestryLen: sts.number(), + } +}) + +export interface AsyncBackingParams { + maxCandidateDepth: number + allowedAncestryLen: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ConfigurationCall = ConfigurationCall_set_async_backing_params | ConfigurationCall_set_bypass_consistency_check | ConfigurationCall_set_code_retention_period | ConfigurationCall_set_dispute_period | ConfigurationCall_set_dispute_post_conclusion_acceptance_period | ConfigurationCall_set_executor_params | ConfigurationCall_set_group_rotation_frequency | ConfigurationCall_set_hrmp_channel_max_capacity | ConfigurationCall_set_hrmp_channel_max_message_size | ConfigurationCall_set_hrmp_channel_max_total_size | ConfigurationCall_set_hrmp_max_message_num_per_candidate | ConfigurationCall_set_hrmp_max_parachain_inbound_channels | ConfigurationCall_set_hrmp_max_parachain_outbound_channels | ConfigurationCall_set_hrmp_open_request_ttl | ConfigurationCall_set_hrmp_recipient_deposit | ConfigurationCall_set_hrmp_sender_deposit | ConfigurationCall_set_max_code_size | ConfigurationCall_set_max_downward_message_size | ConfigurationCall_set_max_head_data_size | ConfigurationCall_set_max_pov_size | ConfigurationCall_set_max_upward_message_num_per_candidate | ConfigurationCall_set_max_upward_message_size | ConfigurationCall_set_max_upward_queue_count | ConfigurationCall_set_max_upward_queue_size | ConfigurationCall_set_max_validators | ConfigurationCall_set_max_validators_per_core | ConfigurationCall_set_minimum_backing_votes | ConfigurationCall_set_minimum_validation_upgrade_delay | ConfigurationCall_set_n_delay_tranches | ConfigurationCall_set_needed_approvals | ConfigurationCall_set_no_show_slots | ConfigurationCall_set_on_demand_base_fee | ConfigurationCall_set_on_demand_cores | ConfigurationCall_set_on_demand_fee_variability | ConfigurationCall_set_on_demand_queue_max_size | ConfigurationCall_set_on_demand_retries | ConfigurationCall_set_on_demand_target_queue_utilization | ConfigurationCall_set_on_demand_ttl | ConfigurationCall_set_paras_availability_period | ConfigurationCall_set_pvf_voting_ttl | ConfigurationCall_set_relay_vrf_modulo_samples | ConfigurationCall_set_scheduling_lookahead | ConfigurationCall_set_validation_upgrade_cooldown | ConfigurationCall_set_validation_upgrade_delay | ConfigurationCall_set_zeroth_delay_tranche_width + +/** + * See [`Pallet::set_async_backing_params`]. + */ +export interface ConfigurationCall_set_async_backing_params { + __kind: 'set_async_backing_params' + new: AsyncBackingParams +} + +/** + * See [`Pallet::set_bypass_consistency_check`]. + */ +export interface ConfigurationCall_set_bypass_consistency_check { + __kind: 'set_bypass_consistency_check' + new: boolean +} + +/** + * See [`Pallet::set_code_retention_period`]. + */ +export interface ConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: number +} + +/** + * See [`Pallet::set_dispute_period`]. + */ +export interface ConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: number +} + +/** + * See [`Pallet::set_dispute_post_conclusion_acceptance_period`]. + */ +export interface ConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: number +} + +/** + * See [`Pallet::set_executor_params`]. + */ +export interface ConfigurationCall_set_executor_params { + __kind: 'set_executor_params' + new: V5ExecutorParam[] +} + +/** + * See [`Pallet::set_group_rotation_frequency`]. + */ +export interface ConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: number +} + +/** + * See [`Pallet::set_hrmp_channel_max_capacity`]. + */ +export interface ConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * See [`Pallet::set_hrmp_channel_max_message_size`]. + */ +export interface ConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * See [`Pallet::set_hrmp_channel_max_total_size`]. + */ +export interface ConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * See [`Pallet::set_hrmp_max_message_num_per_candidate`]. + */ +export interface ConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * See [`Pallet::set_hrmp_max_parachain_inbound_channels`]. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * See [`Pallet::set_hrmp_max_parachain_outbound_channels`]. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * See [`Pallet::set_hrmp_open_request_ttl`]. + */ +export interface ConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * See [`Pallet::set_hrmp_recipient_deposit`]. + */ +export interface ConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: bigint +} + +/** + * See [`Pallet::set_hrmp_sender_deposit`]. + */ +export interface ConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: bigint +} + +/** + * See [`Pallet::set_max_code_size`]. + */ +export interface ConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * See [`Pallet::set_max_downward_message_size`]. + */ +export interface ConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * See [`Pallet::set_max_head_data_size`]. + */ +export interface ConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * See [`Pallet::set_max_pov_size`]. + */ +export interface ConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * See [`Pallet::set_max_upward_message_num_per_candidate`]. + */ +export interface ConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * See [`Pallet::set_max_upward_message_size`]. + */ +export interface ConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * See [`Pallet::set_max_upward_queue_count`]. + */ +export interface ConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * See [`Pallet::set_max_upward_queue_size`]. + */ +export interface ConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * See [`Pallet::set_max_validators`]. + */ +export interface ConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * See [`Pallet::set_max_validators_per_core`]. + */ +export interface ConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * See [`Pallet::set_minimum_backing_votes`]. + */ +export interface ConfigurationCall_set_minimum_backing_votes { + __kind: 'set_minimum_backing_votes' + new: number +} + +/** + * See [`Pallet::set_minimum_validation_upgrade_delay`]. + */ +export interface ConfigurationCall_set_minimum_validation_upgrade_delay { + __kind: 'set_minimum_validation_upgrade_delay' + new: number +} + +/** + * See [`Pallet::set_n_delay_tranches`]. + */ +export interface ConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * See [`Pallet::set_needed_approvals`]. + */ +export interface ConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * See [`Pallet::set_no_show_slots`]. + */ +export interface ConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * See [`Pallet::set_on_demand_base_fee`]. + */ +export interface ConfigurationCall_set_on_demand_base_fee { + __kind: 'set_on_demand_base_fee' + new: bigint +} + +/** + * See [`Pallet::set_on_demand_cores`]. + */ +export interface ConfigurationCall_set_on_demand_cores { + __kind: 'set_on_demand_cores' + new: number +} + +/** + * See [`Pallet::set_on_demand_fee_variability`]. + */ +export interface ConfigurationCall_set_on_demand_fee_variability { + __kind: 'set_on_demand_fee_variability' + new: Perbill +} + +/** + * See [`Pallet::set_on_demand_queue_max_size`]. + */ +export interface ConfigurationCall_set_on_demand_queue_max_size { + __kind: 'set_on_demand_queue_max_size' + new: number +} + +/** + * See [`Pallet::set_on_demand_retries`]. + */ +export interface ConfigurationCall_set_on_demand_retries { + __kind: 'set_on_demand_retries' + new: number +} + +/** + * See [`Pallet::set_on_demand_target_queue_utilization`]. + */ +export interface ConfigurationCall_set_on_demand_target_queue_utilization { + __kind: 'set_on_demand_target_queue_utilization' + new: Perbill +} + +/** + * See [`Pallet::set_on_demand_ttl`]. + */ +export interface ConfigurationCall_set_on_demand_ttl { + __kind: 'set_on_demand_ttl' + new: number +} + +/** + * See [`Pallet::set_paras_availability_period`]. + */ +export interface ConfigurationCall_set_paras_availability_period { + __kind: 'set_paras_availability_period' + new: number +} + +/** + * See [`Pallet::set_pvf_voting_ttl`]. + */ +export interface ConfigurationCall_set_pvf_voting_ttl { + __kind: 'set_pvf_voting_ttl' + new: number +} + +/** + * See [`Pallet::set_relay_vrf_modulo_samples`]. + */ +export interface ConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * See [`Pallet::set_scheduling_lookahead`]. + */ +export interface ConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * See [`Pallet::set_validation_upgrade_cooldown`]. + */ +export interface ConfigurationCall_set_validation_upgrade_cooldown { + __kind: 'set_validation_upgrade_cooldown' + new: number +} + +/** + * See [`Pallet::set_validation_upgrade_delay`]. + */ +export interface ConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: number +} + +/** + * See [`Pallet::set_zeroth_delay_tranche_width`]. + */ +export interface ConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: sts.bigint(), + vestingSchedule: sts.option(() => sts.tuple(() => [sts.bigint(), sts.bigint(), sts.number()])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId32), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * See [`Pallet::attest`]. + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * See [`Pallet::claim`]. + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId32 + ethereumSignature: EcdsaSignature +} + +/** + * See [`Pallet::claim_attest`]. + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId32 + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * See [`Pallet::mint_claim`]. + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: bigint + vestingSchedule?: ([bigint, bigint, number] | undefined) + statement?: (StatementKind | undefined) +} + +/** + * See [`Pallet::move_claim`]. + */ +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId32 | undefined) +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ChildBountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + add_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + value: sts.bigint(), + description: sts.bytes(), + }), + award_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + close_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + propose_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ChildBountiesCall = ChildBountiesCall_accept_curator | ChildBountiesCall_add_child_bounty | ChildBountiesCall_award_child_bounty | ChildBountiesCall_claim_child_bounty | ChildBountiesCall_close_child_bounty | ChildBountiesCall_propose_curator | ChildBountiesCall_unassign_curator + +/** + * See [`Pallet::accept_curator`]. + */ +export interface ChildBountiesCall_accept_curator { + __kind: 'accept_curator' + parentBountyId: number + childBountyId: number +} + +/** + * See [`Pallet::add_child_bounty`]. + */ +export interface ChildBountiesCall_add_child_bounty { + __kind: 'add_child_bounty' + parentBountyId: number + value: bigint + description: Bytes +} + +/** + * See [`Pallet::award_child_bounty`]. + */ +export interface ChildBountiesCall_award_child_bounty { + __kind: 'award_child_bounty' + parentBountyId: number + childBountyId: number + beneficiary: MultiAddress +} + +/** + * See [`Pallet::claim_child_bounty`]. + */ +export interface ChildBountiesCall_claim_child_bounty { + __kind: 'claim_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * See [`Pallet::close_child_bounty`]. + */ +export interface ChildBountiesCall_close_child_bounty { + __kind: 'close_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * See [`Pallet::propose_curator`]. + */ +export interface ChildBountiesCall_propose_curator { + __kind: 'propose_curator' + parentBountyId: number + childBountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * See [`Pallet::unassign_curator`]. + */ +export interface ChildBountiesCall_unassign_curator { + __kind: 'unassign_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * See [`Pallet::accept_curator`]. + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * See [`Pallet::approve_bounty`]. + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * See [`Pallet::award_bounty`]. + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: MultiAddress +} + +/** + * See [`Pallet::claim_bounty`]. + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * See [`Pallet::close_bounty`]. + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * See [`Pallet::extend_bounty_expiry`]. + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * See [`Pallet::propose_bounty`]. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * See [`Pallet::propose_curator`]. + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * See [`Pallet::unassign_curator`]. + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const BeefyCall: sts.Type = sts.closedEnum(() => { + return { + report_equivocation: sts.enumStruct({ + equivocationProof: Type_95, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_95, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const Type_95: sts.Type = sts.struct(() => { + return { + first: VoteMessage, + second: VoteMessage, + } +}) + +export const VoteMessage: sts.Type = sts.struct(() => { + return { + commitment: Commitment, + id: sts.bytes(), + signature: Signature, + } +}) + +export const Signature = sts.bytes() + +export const Commitment: sts.Type = sts.struct(() => { + return { + payload: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + blockNumber: sts.number(), + validatorSetId: sts.bigint(), + } +}) + +export interface Commitment { + payload: [Bytes, Bytes][] + blockNumber: number + validatorSetId: bigint +} + +export interface VoteMessage { + commitment: Commitment + id: Bytes + signature: Signature +} + +export type Signature = Bytes + +export interface Type_95 { + first: VoteMessage + second: VoteMessage +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type BeefyCall = BeefyCall_report_equivocation | BeefyCall_report_equivocation_unsigned + +/** + * See [`Pallet::report_equivocation`]. + */ +export interface BeefyCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_95 + keyOwnerProof: MembershipProof +} + +/** + * See [`Pallet::report_equivocation_unsigned`]. + */ +export interface BeefyCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_95 + keyOwnerProof: MembershipProof +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + }), + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + set_balance_deprecated: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + oldReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_allow_death: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + upgrade_accounts: sts.enumStruct({ + who: sts.array(() => AccountId32), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type BalancesCall = BalancesCall_force_set_balance | BalancesCall_force_transfer | BalancesCall_force_unreserve | BalancesCall_set_balance_deprecated | BalancesCall_transfer | BalancesCall_transfer_all | BalancesCall_transfer_allow_death | BalancesCall_transfer_keep_alive | BalancesCall_upgrade_accounts + +/** + * See [`Pallet::force_set_balance`]. + */ +export interface BalancesCall_force_set_balance { + __kind: 'force_set_balance' + who: MultiAddress + newFree: bigint +} + +/** + * See [`Pallet::force_transfer`]. + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::force_unreserve`]. + */ +export interface BalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * See [`Pallet::set_balance_deprecated`]. + */ +export interface BalancesCall_set_balance_deprecated { + __kind: 'set_balance_deprecated' + who: MultiAddress + newFree: bigint + oldReserved: bigint +} + +/** + * See [`Pallet::transfer`]. + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::transfer_all`]. + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * See [`Pallet::transfer_allow_death`]. + */ +export interface BalancesCall_transfer_allow_death { + __kind: 'transfer_allow_death' + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::transfer_keep_alive`]. + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::upgrade_accounts`]. + */ +export interface BalancesCall_upgrade_accounts { + __kind: 'upgrade_accounts' + who: AccountId32[] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const EquivocationProof: sts.Type = sts.struct(() => { + return { + offender: sts.bytes(), + slot: Slot, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Slot = sts.bigint() + +export interface EquivocationProof { + offender: Bytes + slot: Slot + firstHeader: Header + secondHeader: Header +} + +export type Slot = bigint + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V1: sts.enumStruct({ + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + }), + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type NextConfigDescriptor = NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * See [`Pallet::plan_config_change`]. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * See [`Pallet::report_equivocation`]. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * See [`Pallet::report_equivocation_unsigned`]. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * See [`Pallet::bid`]. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * See [`Pallet::cancel_auction`]. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * See [`Pallet::new_auction`]. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +export type Call = Call_Auctions | Call_Babe | Call_Balances | Call_Beefy | Call_Bounties | Call_ChildBounties | Call_Claims | Call_Configuration | Call_ConvictionVoting | Call_Crowdloan | Call_ElectionProviderMultiPhase | Call_FastUnstake | Call_FellowshipCollective | Call_FellowshipReferenda | Call_Grandpa | Call_Hrmp | Call_Identity | Call_ImOnline | Call_Indices | Call_Initializer | Call_MessageQueue | Call_Multisig | Call_Nis | Call_NisCounterpartBalances | Call_NominationPools | Call_ParaInclusion | Call_ParaInherent | Call_Paras | Call_ParasDisputes | Call_ParasShared | Call_ParasSlashing | Call_Preimage | Call_Proxy | Call_Recovery | Call_Referenda | Call_Registrar | Call_Scheduler | Call_Session | Call_Slots | Call_Society | Call_Staking | Call_StateTrieMigration | Call_System | Call_Timestamp | Call_Treasury | Call_Utility | Call_Vesting | Call_VoterList | Call_Whitelist | Call_XcmPallet + +export interface Call_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Call_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Call_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Call_Beefy { + __kind: 'Beefy' + value: BeefyCall +} + +export interface Call_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Call_ChildBounties { + __kind: 'ChildBounties' + value: ChildBountiesCall +} + +export interface Call_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Call_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Call_ConvictionVoting { + __kind: 'ConvictionVoting' + value: ConvictionVotingCall +} + +export interface Call_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Call_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Call_FastUnstake { + __kind: 'FastUnstake' + value: FastUnstakeCall +} + +export interface Call_FellowshipCollective { + __kind: 'FellowshipCollective' + value: FellowshipCollectiveCall +} + +export interface Call_FellowshipReferenda { + __kind: 'FellowshipReferenda' + value: FellowshipReferendaCall +} + +export interface Call_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Call_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Call_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Call_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Call_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Call_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Call_MessageQueue { + __kind: 'MessageQueue' + value: MessageQueueCall +} + +export interface Call_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Call_Nis { + __kind: 'Nis' + value: NisCall +} + +export interface Call_NisCounterpartBalances { + __kind: 'NisCounterpartBalances' + value: NisCounterpartBalancesCall +} + +export interface Call_NominationPools { + __kind: 'NominationPools' + value: NominationPoolsCall +} + +export interface Call_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Call_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Call_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Call_ParasDisputes { + __kind: 'ParasDisputes' + value: ParasDisputesCall +} + +export interface Call_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Call_ParasSlashing { + __kind: 'ParasSlashing' + value: ParasSlashingCall +} + +export interface Call_Preimage { + __kind: 'Preimage' + value: PreimageCall +} + +export interface Call_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Call_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Call_Referenda { + __kind: 'Referenda' + value: ReferendaCall +} + +export interface Call_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Call_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Call_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Call_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Call_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Call_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Call_StateTrieMigration { + __kind: 'StateTrieMigration' + value: StateTrieMigrationCall +} + +export interface Call_System { + __kind: 'System' + value: SystemCall +} + +export interface Call_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Call_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Call_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Call_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Call_VoterList { + __kind: 'VoterList' + value: VoterListCall +} + +export interface Call_Whitelist { + __kind: 'Whitelist' + value: WhitelistCall +} + +export interface Call_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NominationPools: sts.unit(), + NonTransfer: sts.unit(), + Society: sts.unit(), + Staking: sts.unit(), + } +}) + +export const MultiAddress: sts.Type = sts.closedEnum(() => { + return { + Address20: sts.bytes(), + Address32: sts.bytes(), + Id: AccountId32, + Index: sts.unit(), + Raw: sts.bytes(), + } +}) diff --git a/squid/src/types/v1001000.ts b/squid/src/types/v1001000.ts new file mode 100644 index 00000000..0b825786 --- /dev/null +++ b/squid/src/types/v1001000.ts @@ -0,0 +1,10535 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Weight: sts.Type = sts.struct(() => { + return { + refTime: sts.bigint(), + proofSize: sts.bigint(), + } +}) + +export interface Weight { + refTime: bigint + proofSize: bigint +} + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: sts.number(), + index: sts.number(), + } +}) + +export interface Timepoint { + height: number + index: number +} + +export const AccountId32 = sts.bytes() + +export const Call: sts.Type = sts.closedEnum(() => { + return { + AssetRate: AssetRateCall, + Auctions: AuctionsCall, + Babe: BabeCall, + Balances: BalancesCall, + Beefy: BeefyCall, + Bounties: BountiesCall, + ChildBounties: ChildBountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + ConvictionVoting: ConvictionVotingCall, + Crowdloan: CrowdloanCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + FastUnstake: FastUnstakeCall, + FellowshipCollective: FellowshipCollectiveCall, + FellowshipReferenda: FellowshipReferendaCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Initializer: InitializerCall, + MessageQueue: MessageQueueCall, + Multisig: MultisigCall, + Nis: NisCall, + NisCounterpartBalances: NisCounterpartBalancesCall, + NominationPools: NominationPoolsCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Paras: ParasCall, + ParasDisputes: ParasDisputesCall, + ParasShared: ParasSharedCall, + ParasSlashing: ParasSlashingCall, + Preimage: PreimageCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Referenda: ReferendaCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + StateTrieMigration: StateTrieMigrationCall, + System: SystemCall, + Timestamp: TimestampCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + VoterList: VoterListCall, + Whitelist: WhitelistCall, + XcmPallet: XcmPalletCall, + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + execute: sts.enumStruct({ + message: Type_449, + maxWeight: Weight, + }), + force_default_xcm_version: sts.enumStruct({ + maybeXcmVersion: sts.option(() => sts.number()), + }), + force_subscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_suspension: sts.enumStruct({ + suspended: sts.boolean(), + }), + force_unsubscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_xcm_version: sts.enumStruct({ + location: V3MultiLocation, + version: sts.number(), + }), + limited_reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V3WeightLimit, + }), + limited_teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V3WeightLimit, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + send: sts.enumStruct({ + dest: VersionedMultiLocation, + message: VersionedXcm, + }), + teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + } +}) + +export const VersionedXcm: sts.Type = sts.closedEnum(() => { + return { + V2: sts.array(() => V2Instruction), + V3: sts.array(() => V3Instruction), + } +}) + +export const V3Instruction: sts.Type = sts.closedEnum(() => { + return { + AliasOrigin: V3MultiLocation, + BurnAsset: sts.array(() => V3MultiAsset), + BuyExecution: sts.enumStruct({ + fees: V3MultiAsset, + weightLimit: V3WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + ticket: V3MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + ClearTopic: sts.unit(), + ClearTransactStatus: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + beneficiary: V3MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + DescendOrigin: V3Junctions, + ExchangeAsset: sts.enumStruct({ + give: V3MultiAssetFilter, + want: sts.array(() => V3MultiAsset), + maximal: sts.boolean(), + }), + ExpectAsset: sts.array(() => V3MultiAsset), + ExpectError: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + ExpectOrigin: sts.option(() => V3MultiLocation), + ExpectPallet: sts.enumStruct({ + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + crateMajor: sts.number(), + minCrateMinor: sts.number(), + }), + ExpectTransactStatus: V3MaybeErrorCode, + ExportMessage: sts.enumStruct({ + network: V3NetworkId, + destination: V3Junctions, + xcm: sts.array(() => V3Instruction), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V3MultiAssetFilter, + reserve: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + LockAsset: sts.enumStruct({ + asset: V3MultiAsset, + unlocker: V3MultiLocation, + }), + NoteUnlockable: sts.enumStruct({ + asset: V3MultiAsset, + owner: V3MultiLocation, + }), + QueryPallet: sts.enumStruct({ + moduleName: sts.bytes(), + responseInfo: V3QueryResponseInfo, + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V3Response, + maxWeight: Weight, + querier: sts.option(() => V3MultiLocation), + }), + ReceiveTeleportedAsset: sts.array(() => V3MultiAsset), + RefundSurplus: sts.unit(), + ReportError: V3QueryResponseInfo, + ReportHolding: sts.enumStruct({ + responseInfo: V3QueryResponseInfo, + assets: V3MultiAssetFilter, + }), + ReportTransactStatus: V3QueryResponseInfo, + RequestUnlock: sts.enumStruct({ + asset: V3MultiAsset, + locker: V3MultiLocation, + }), + ReserveAssetDeposited: sts.array(() => V3MultiAsset), + SetAppendix: sts.array(() => V3Instruction), + SetErrorHandler: sts.array(() => V3Instruction), + SetFeesMode: sts.enumStruct({ + jitWithdraw: sts.boolean(), + }), + SetTopic: sts.bytes(), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: Weight, + }), + Transact: sts.enumStruct({ + originKind: V2OriginKind, + requireWeightAtMost: Weight, + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + beneficiary: V3MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + Trap: sts.bigint(), + UniversalOrigin: V3Junction, + UnlockAsset: sts.enumStruct({ + asset: V3MultiAsset, + target: V3MultiLocation, + }), + UnpaidExecution: sts.enumStruct({ + weightLimit: V3WeightLimit, + checkOrigin: sts.option(() => V3MultiLocation), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V3MultiAsset), + } +}) + +export const V3Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: sts.option(() => V3NetworkId), + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: sts.option(() => V3NetworkId), + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: sts.option(() => V3NetworkId), + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.enumStruct({ + length: sts.number(), + data: sts.bytes(), + }), + GlobalConsensus: V3NetworkId, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V3BodyId, + part: V3BodyPart, + }), + } +}) + +export const V3BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export type V3BodyPart = V3BodyPart_AtLeastProportion | V3BodyPart_Fraction | V3BodyPart_Members | V3BodyPart_MoreThanProportion | V3BodyPart_Voice + +export interface V3BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V3BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V3BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V3BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V3BodyPart_Voice { + __kind: 'Voice' +} + +export const V3BodyId: sts.Type = sts.closedEnum(() => { + return { + Administration: sts.unit(), + Defense: sts.unit(), + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Moniker: sts.bytes(), + Technical: sts.unit(), + Treasury: sts.unit(), + Unit: sts.unit(), + } +}) + +export type V3BodyId = V3BodyId_Administration | V3BodyId_Defense | V3BodyId_Executive | V3BodyId_Index | V3BodyId_Judicial | V3BodyId_Legislative | V3BodyId_Moniker | V3BodyId_Technical | V3BodyId_Treasury | V3BodyId_Unit + +export interface V3BodyId_Administration { + __kind: 'Administration' +} + +export interface V3BodyId_Defense { + __kind: 'Defense' +} + +export interface V3BodyId_Executive { + __kind: 'Executive' +} + +export interface V3BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V3BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V3BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V3BodyId_Moniker { + __kind: 'Moniker' + value: Bytes +} + +export interface V3BodyId_Technical { + __kind: 'Technical' +} + +export interface V3BodyId_Treasury { + __kind: 'Treasury' +} + +export interface V3BodyId_Unit { + __kind: 'Unit' +} + +export type V3Junction = V3Junction_AccountId32 | V3Junction_AccountIndex64 | V3Junction_AccountKey20 | V3Junction_GeneralIndex | V3Junction_GeneralKey | V3Junction_GlobalConsensus | V3Junction_OnlyChild | V3Junction_PalletInstance | V3Junction_Parachain | V3Junction_Plurality + +export interface V3Junction_AccountId32 { + __kind: 'AccountId32' + network?: (V3NetworkId | undefined) + id: Bytes +} + +export interface V3Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network?: (V3NetworkId | undefined) + index: bigint +} + +export interface V3Junction_AccountKey20 { + __kind: 'AccountKey20' + network?: (V3NetworkId | undefined) + key: Bytes +} + +export interface V3Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V3Junction_GeneralKey { + __kind: 'GeneralKey' + length: number + data: Bytes +} + +export interface V3Junction_GlobalConsensus { + __kind: 'GlobalConsensus' + value: V3NetworkId +} + +export interface V3Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V3Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V3Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V3Junction_Plurality { + __kind: 'Plurality' + id: V3BodyId + part: V3BodyPart +} + +export type V3NetworkId = V3NetworkId_BitcoinCash | V3NetworkId_BitcoinCore | V3NetworkId_ByFork | V3NetworkId_ByGenesis | V3NetworkId_Ethereum | V3NetworkId_Kusama | V3NetworkId_Polkadot | V3NetworkId_Rococo | V3NetworkId_Westend | V3NetworkId_Wococo + +export interface V3NetworkId_BitcoinCash { + __kind: 'BitcoinCash' +} + +export interface V3NetworkId_BitcoinCore { + __kind: 'BitcoinCore' +} + +export interface V3NetworkId_ByFork { + __kind: 'ByFork' + blockNumber: bigint + blockHash: Bytes +} + +export interface V3NetworkId_ByGenesis { + __kind: 'ByGenesis' + value: Bytes +} + +export interface V3NetworkId_Ethereum { + __kind: 'Ethereum' + chainId: bigint +} + +export interface V3NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V3NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export interface V3NetworkId_Rococo { + __kind: 'Rococo' +} + +export interface V3NetworkId_Westend { + __kind: 'Westend' +} + +export interface V3NetworkId_Wococo { + __kind: 'Wococo' +} + +export const DoubleEncoded: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncoded { + encoded: Bytes +} + +export const V2OriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type V2OriginKind = V2OriginKind_Native | V2OriginKind_SovereignAccount | V2OriginKind_Superuser | V2OriginKind_Xcm + +export interface V2OriginKind_Native { + __kind: 'Native' +} + +export interface V2OriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface V2OriginKind_Superuser { + __kind: 'Superuser' +} + +export interface V2OriginKind_Xcm { + __kind: 'Xcm' +} + +export const V3Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V3MultiAsset), + DispatchResult: V3MaybeErrorCode, + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + Null: sts.unit(), + PalletsInfo: sts.array(() => V3PalletInfo), + Version: sts.number(), + } +}) + +export const V3PalletInfo: sts.Type = sts.struct(() => { + return { + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + major: sts.number(), + minor: sts.number(), + patch: sts.number(), + } +}) + +export interface V3PalletInfo { + index: number + name: Bytes + moduleName: Bytes + major: number + minor: number + patch: number +} + +export type V3Response = V3Response_Assets | V3Response_DispatchResult | V3Response_ExecutionResult | V3Response_Null | V3Response_PalletsInfo | V3Response_Version + +export interface V3Response_Assets { + __kind: 'Assets' + value: V3MultiAsset[] +} + +export interface V3Response_DispatchResult { + __kind: 'DispatchResult' + value: V3MaybeErrorCode +} + +export interface V3Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V3Error] | undefined) +} + +export interface V3Response_Null { + __kind: 'Null' +} + +export interface V3Response_PalletsInfo { + __kind: 'PalletsInfo' + value: V3PalletInfo[] +} + +export interface V3Response_Version { + __kind: 'Version' + value: number +} + +export type V3Error = V3Error_AssetNotFound | V3Error_BadOrigin | V3Error_Barrier | V3Error_DestinationUnsupported | V3Error_ExceedsMaxMessageSize | V3Error_ExceedsStackLimit | V3Error_ExpectationFalse | V3Error_ExportError | V3Error_FailedToDecode | V3Error_FailedToTransactAsset | V3Error_FeesNotMet | V3Error_HoldingWouldOverflow | V3Error_InvalidLocation | V3Error_LocationCannotHold | V3Error_LocationFull | V3Error_LocationNotInvertible | V3Error_LockError | V3Error_MaxWeightInvalid | V3Error_NameMismatch | V3Error_NoDeal | V3Error_NoPermission | V3Error_NotDepositable | V3Error_NotHoldingFees | V3Error_NotWithdrawable | V3Error_Overflow | V3Error_PalletNotFound | V3Error_ReanchorFailed | V3Error_TooExpensive | V3Error_Transport | V3Error_Trap | V3Error_Unanchored | V3Error_UnhandledXcmVersion | V3Error_Unimplemented | V3Error_UnknownClaim | V3Error_Unroutable | V3Error_UntrustedReserveLocation | V3Error_UntrustedTeleportLocation | V3Error_VersionIncompatible | V3Error_WeightLimitReached | V3Error_WeightNotComputable + +export interface V3Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V3Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V3Error_Barrier { + __kind: 'Barrier' +} + +export interface V3Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V3Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V3Error_ExceedsStackLimit { + __kind: 'ExceedsStackLimit' +} + +export interface V3Error_ExpectationFalse { + __kind: 'ExpectationFalse' +} + +export interface V3Error_ExportError { + __kind: 'ExportError' +} + +export interface V3Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V3Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V3Error_FeesNotMet { + __kind: 'FeesNotMet' +} + +export interface V3Error_HoldingWouldOverflow { + __kind: 'HoldingWouldOverflow' +} + +export interface V3Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V3Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V3Error_LocationFull { + __kind: 'LocationFull' +} + +export interface V3Error_LocationNotInvertible { + __kind: 'LocationNotInvertible' +} + +export interface V3Error_LockError { + __kind: 'LockError' +} + +export interface V3Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V3Error_NameMismatch { + __kind: 'NameMismatch' +} + +export interface V3Error_NoDeal { + __kind: 'NoDeal' +} + +export interface V3Error_NoPermission { + __kind: 'NoPermission' +} + +export interface V3Error_NotDepositable { + __kind: 'NotDepositable' +} + +export interface V3Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V3Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V3Error_Overflow { + __kind: 'Overflow' +} + +export interface V3Error_PalletNotFound { + __kind: 'PalletNotFound' +} + +export interface V3Error_ReanchorFailed { + __kind: 'ReanchorFailed' +} + +export interface V3Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V3Error_Transport { + __kind: 'Transport' +} + +export interface V3Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V3Error_Unanchored { + __kind: 'Unanchored' +} + +export interface V3Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V3Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V3Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V3Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V3Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V3Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V3Error_VersionIncompatible { + __kind: 'VersionIncompatible' +} + +export interface V3Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: Weight +} + +export interface V3Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V3MaybeErrorCode = V3MaybeErrorCode_Error | V3MaybeErrorCode_Success | V3MaybeErrorCode_TruncatedError + +export interface V3MaybeErrorCode_Error { + __kind: 'Error' + value: Bytes +} + +export interface V3MaybeErrorCode_Success { + __kind: 'Success' +} + +export interface V3MaybeErrorCode_TruncatedError { + __kind: 'TruncatedError' + value: Bytes +} + +export interface V3MultiAsset { + id: V3AssetId + fun: V3Fungibility +} + +export type V3Fungibility = V3Fungibility_Fungible | V3Fungibility_NonFungible + +export interface V3Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V3Fungibility_NonFungible { + __kind: 'NonFungible' + value: V3AssetInstance +} + +export type V3AssetInstance = V3AssetInstance_Array16 | V3AssetInstance_Array32 | V3AssetInstance_Array4 | V3AssetInstance_Array8 | V3AssetInstance_Index | V3AssetInstance_Undefined + +export interface V3AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V3AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V3AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V3AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V3AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V3AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V3AssetId = V3AssetId_Abstract | V3AssetId_Concrete + +export interface V3AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V3AssetId_Concrete { + __kind: 'Concrete' + value: V3MultiLocation +} + +export interface V3MultiLocation { + parents: number + interior: V3Junctions +} + +export type V3Junctions = V3Junctions_Here | V3Junctions_X1 | V3Junctions_X2 | V3Junctions_X3 | V3Junctions_X4 | V3Junctions_X5 | V3Junctions_X6 | V3Junctions_X7 | V3Junctions_X8 + +export interface V3Junctions_Here { + __kind: 'Here' +} + +export interface V3Junctions_X1 { + __kind: 'X1' + value: V3Junction +} + +export interface V3Junctions_X2 { + __kind: 'X2' + value: [V3Junction, V3Junction] +} + +export interface V3Junctions_X3 { + __kind: 'X3' + value: [V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X4 { + __kind: 'X4' + value: [V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X5 { + __kind: 'X5' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X6 { + __kind: 'X6' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X7 { + __kind: 'X7' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X8 { + __kind: 'X8' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export const V3QueryResponseInfo: sts.Type = sts.struct(() => { + return { + destination: V3MultiLocation, + queryId: sts.bigint(), + maxWeight: Weight, + } +}) + +export interface V3QueryResponseInfo { + destination: V3MultiLocation + queryId: bigint + maxWeight: Weight +} + +export const V3NetworkId: sts.Type = sts.closedEnum(() => { + return { + BitcoinCash: sts.unit(), + BitcoinCore: sts.unit(), + ByFork: sts.enumStruct({ + blockNumber: sts.bigint(), + blockHash: sts.bytes(), + }), + ByGenesis: sts.bytes(), + Ethereum: sts.enumStruct({ + chainId: sts.bigint(), + }), + Kusama: sts.unit(), + Polkadot: sts.unit(), + Rococo: sts.unit(), + Westend: sts.unit(), + Wococo: sts.unit(), + } +}) + +export const V3MaybeErrorCode: sts.Type = sts.closedEnum(() => { + return { + Error: sts.bytes(), + Success: sts.unit(), + TruncatedError: sts.bytes(), + } +}) + +export const V3Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + ExceedsStackLimit: sts.unit(), + ExpectationFalse: sts.unit(), + ExportError: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + FeesNotMet: sts.unit(), + HoldingWouldOverflow: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + LocationFull: sts.unit(), + LocationNotInvertible: sts.unit(), + LockError: sts.unit(), + MaxWeightInvalid: sts.unit(), + NameMismatch: sts.unit(), + NoDeal: sts.unit(), + NoPermission: sts.unit(), + NotDepositable: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + PalletNotFound: sts.unit(), + ReanchorFailed: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + Unanchored: sts.unit(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + VersionIncompatible: sts.unit(), + WeightLimitReached: Weight, + WeightNotComputable: sts.unit(), + } +}) + +export const V3Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V3Junction, + X2: sts.tuple(() => [V3Junction, V3Junction]), + X3: sts.tuple(() => [V3Junction, V3Junction, V3Junction]), + X4: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction]), + X5: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + X6: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + X7: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + X8: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + } +}) + +export const V3MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V3MultiAsset), + Wild: V3WildMultiAsset, + } +}) + +export const V3WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllCounted: sts.number(), + AllOf: sts.enumStruct({ + id: V3AssetId, + fun: V3WildFungibility, + }), + AllOfCounted: sts.enumStruct({ + id: V3AssetId, + fun: V3WildFungibility, + count: sts.number(), + }), + } +}) + +export const V3WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V3WildFungibility = V3WildFungibility_Fungible | V3WildFungibility_NonFungible + +export interface V3WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V3WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V3AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V3MultiLocation, + } +}) + +export type V3WildMultiAsset = V3WildMultiAsset_All | V3WildMultiAsset_AllCounted | V3WildMultiAsset_AllOf | V3WildMultiAsset_AllOfCounted + +export interface V3WildMultiAsset_All { + __kind: 'All' +} + +export interface V3WildMultiAsset_AllCounted { + __kind: 'AllCounted' + value: number +} + +export interface V3WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V3AssetId + fun: V3WildFungibility +} + +export interface V3WildMultiAsset_AllOfCounted { + __kind: 'AllOfCounted' + id: V3AssetId + fun: V3WildFungibility + count: number +} + +export type V3MultiAssetFilter = V3MultiAssetFilter_Definite | V3MultiAssetFilter_Wild + +export interface V3MultiAssetFilter_Definite { + __kind: 'Definite' + value: V3MultiAsset[] +} + +export interface V3MultiAssetFilter_Wild { + __kind: 'Wild' + value: V3WildMultiAsset +} + +export const V3MultiAsset: sts.Type = sts.struct(() => { + return { + id: V3AssetId, + fun: V3Fungibility, + } +}) + +export const V3Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V3AssetInstance, + } +}) + +export const V3AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V3Instruction = V3Instruction_AliasOrigin | V3Instruction_BurnAsset | V3Instruction_BuyExecution | V3Instruction_ClaimAsset | V3Instruction_ClearError | V3Instruction_ClearOrigin | V3Instruction_ClearTopic | V3Instruction_ClearTransactStatus | V3Instruction_DepositAsset | V3Instruction_DepositReserveAsset | V3Instruction_DescendOrigin | V3Instruction_ExchangeAsset | V3Instruction_ExpectAsset | V3Instruction_ExpectError | V3Instruction_ExpectOrigin | V3Instruction_ExpectPallet | V3Instruction_ExpectTransactStatus | V3Instruction_ExportMessage | V3Instruction_HrmpChannelAccepted | V3Instruction_HrmpChannelClosing | V3Instruction_HrmpNewChannelOpenRequest | V3Instruction_InitiateReserveWithdraw | V3Instruction_InitiateTeleport | V3Instruction_LockAsset | V3Instruction_NoteUnlockable | V3Instruction_QueryPallet | V3Instruction_QueryResponse | V3Instruction_ReceiveTeleportedAsset | V3Instruction_RefundSurplus | V3Instruction_ReportError | V3Instruction_ReportHolding | V3Instruction_ReportTransactStatus | V3Instruction_RequestUnlock | V3Instruction_ReserveAssetDeposited | V3Instruction_SetAppendix | V3Instruction_SetErrorHandler | V3Instruction_SetFeesMode | V3Instruction_SetTopic | V3Instruction_SubscribeVersion | V3Instruction_Transact | V3Instruction_TransferAsset | V3Instruction_TransferReserveAsset | V3Instruction_Trap | V3Instruction_UniversalOrigin | V3Instruction_UnlockAsset | V3Instruction_UnpaidExecution | V3Instruction_UnsubscribeVersion | V3Instruction_WithdrawAsset + +export interface V3Instruction_AliasOrigin { + __kind: 'AliasOrigin' + value: V3MultiLocation +} + +export interface V3Instruction_BurnAsset { + __kind: 'BurnAsset' + value: V3MultiAsset[] +} + +export interface V3Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V3MultiAsset + weightLimit: V3WeightLimit +} + +export interface V3Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V3MultiAsset[] + ticket: V3MultiLocation +} + +export interface V3Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V3Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V3Instruction_ClearTopic { + __kind: 'ClearTopic' +} + +export interface V3Instruction_ClearTransactStatus { + __kind: 'ClearTransactStatus' +} + +export interface V3Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V3MultiAssetFilter + beneficiary: V3MultiLocation +} + +export interface V3Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V3Junctions +} + +export interface V3Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V3MultiAssetFilter + want: V3MultiAsset[] + maximal: boolean +} + +export interface V3Instruction_ExpectAsset { + __kind: 'ExpectAsset' + value: V3MultiAsset[] +} + +export interface V3Instruction_ExpectError { + __kind: 'ExpectError' + value?: ([number, V3Error] | undefined) +} + +export interface V3Instruction_ExpectOrigin { + __kind: 'ExpectOrigin' + value?: (V3MultiLocation | undefined) +} + +export interface V3Instruction_ExpectPallet { + __kind: 'ExpectPallet' + index: number + name: Bytes + moduleName: Bytes + crateMajor: number + minCrateMinor: number +} + +export interface V3Instruction_ExpectTransactStatus { + __kind: 'ExpectTransactStatus' + value: V3MaybeErrorCode +} + +export interface V3Instruction_ExportMessage { + __kind: 'ExportMessage' + network: V3NetworkId + destination: V3Junctions + xcm: V3Instruction[] +} + +export interface V3Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V3Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V3Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V3Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V3MultiAssetFilter + reserve: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_LockAsset { + __kind: 'LockAsset' + asset: V3MultiAsset + unlocker: V3MultiLocation +} + +export interface V3Instruction_NoteUnlockable { + __kind: 'NoteUnlockable' + asset: V3MultiAsset + owner: V3MultiLocation +} + +export interface V3Instruction_QueryPallet { + __kind: 'QueryPallet' + moduleName: Bytes + responseInfo: V3QueryResponseInfo +} + +export interface V3Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V3Response + maxWeight: Weight + querier?: (V3MultiLocation | undefined) +} + +export interface V3Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V3MultiAsset[] +} + +export interface V3Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V3Instruction_ReportError { + __kind: 'ReportError' + value: V3QueryResponseInfo +} + +export interface V3Instruction_ReportHolding { + __kind: 'ReportHolding' + responseInfo: V3QueryResponseInfo + assets: V3MultiAssetFilter +} + +export interface V3Instruction_ReportTransactStatus { + __kind: 'ReportTransactStatus' + value: V3QueryResponseInfo +} + +export interface V3Instruction_RequestUnlock { + __kind: 'RequestUnlock' + asset: V3MultiAsset + locker: V3MultiLocation +} + +export interface V3Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V3MultiAsset[] +} + +export interface V3Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V3Instruction[] +} + +export interface V3Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V3Instruction[] +} + +export interface V3Instruction_SetFeesMode { + __kind: 'SetFeesMode' + jitWithdraw: boolean +} + +export interface V3Instruction_SetTopic { + __kind: 'SetTopic' + value: Bytes +} + +export interface V3Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: Weight +} + +export interface V3Instruction_Transact { + __kind: 'Transact' + originKind: V2OriginKind + requireWeightAtMost: Weight + call: DoubleEncoded +} + +export interface V3Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V3MultiAsset[] + beneficiary: V3MultiLocation +} + +export interface V3Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V3MultiAsset[] + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V3Instruction_UniversalOrigin { + __kind: 'UniversalOrigin' + value: V3Junction +} + +export interface V3Instruction_UnlockAsset { + __kind: 'UnlockAsset' + asset: V3MultiAsset + target: V3MultiLocation +} + +export interface V3Instruction_UnpaidExecution { + __kind: 'UnpaidExecution' + weightLimit: V3WeightLimit + checkOrigin?: (V3MultiLocation | undefined) +} + +export interface V3Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V3Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V3MultiAsset[] +} + +export type V3WeightLimit = V3WeightLimit_Limited | V3WeightLimit_Unlimited + +export interface V3WeightLimit_Limited { + __kind: 'Limited' + value: Weight +} + +export interface V3WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V2Instruction: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V2MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + ticket: V2MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V2MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V2Junctions, + ExchangeAsset: sts.enumStruct({ + give: V2MultiAssetFilter, + receive: sts.array(() => V2MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V2MultiAssetFilter, + reserve: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V2MultiAssetFilter, + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + assets: V2MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V2MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V2MultiAsset), + SetAppendix: sts.array(() => V2Instruction), + SetErrorHandler: sts.array(() => V2Instruction), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V2OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + beneficiary: V2MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V2MultiAsset), + } +}) + +export const V2Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V2MultiAsset), + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V2Error])), + Null: sts.unit(), + Version: sts.number(), + } +}) + +export const V2Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + MaxWeightInvalid: sts.unit(), + MultiLocationFull: sts.unit(), + MultiLocationNotInvertible: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + WeightLimitReached: sts.bigint(), + WeightNotComputable: sts.unit(), + } +}) + +export type V2Error = V2Error_AssetNotFound | V2Error_BadOrigin | V2Error_Barrier | V2Error_DestinationUnsupported | V2Error_ExceedsMaxMessageSize | V2Error_FailedToDecode | V2Error_FailedToTransactAsset | V2Error_InvalidLocation | V2Error_LocationCannotHold | V2Error_MaxWeightInvalid | V2Error_MultiLocationFull | V2Error_MultiLocationNotInvertible | V2Error_NotHoldingFees | V2Error_NotWithdrawable | V2Error_Overflow | V2Error_TooExpensive | V2Error_Transport | V2Error_Trap | V2Error_UnhandledXcmVersion | V2Error_Unimplemented | V2Error_UnknownClaim | V2Error_Unroutable | V2Error_UntrustedReserveLocation | V2Error_UntrustedTeleportLocation | V2Error_WeightLimitReached | V2Error_WeightNotComputable + +export interface V2Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V2Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V2Error_Barrier { + __kind: 'Barrier' +} + +export interface V2Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V2Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V2Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V2Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V2Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V2Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V2Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V2Error_MultiLocationFull { + __kind: 'MultiLocationFull' +} + +export interface V2Error_MultiLocationNotInvertible { + __kind: 'MultiLocationNotInvertible' +} + +export interface V2Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V2Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V2Error_Overflow { + __kind: 'Overflow' +} + +export interface V2Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V2Error_Transport { + __kind: 'Transport' +} + +export interface V2Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V2Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V2Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V2Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V2Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V2Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V2Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: bigint +} + +export interface V2Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V2Response = V2Response_Assets | V2Response_ExecutionResult | V2Response_Null | V2Response_Version + +export interface V2Response_Assets { + __kind: 'Assets' + value: V2MultiAsset[] +} + +export interface V2Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V2Error] | undefined) +} + +export interface V2Response_Null { + __kind: 'Null' +} + +export interface V2Response_Version { + __kind: 'Version' + value: number +} + +export interface V2MultiAsset { + id: V2AssetId + fun: V2Fungibility +} + +export type V2Fungibility = V2Fungibility_Fungible | V2Fungibility_NonFungible + +export interface V2Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V2Fungibility_NonFungible { + __kind: 'NonFungible' + value: V2AssetInstance +} + +export type V2AssetInstance = V2AssetInstance_Array16 | V2AssetInstance_Array32 | V2AssetInstance_Array4 | V2AssetInstance_Array8 | V2AssetInstance_Blob | V2AssetInstance_Index | V2AssetInstance_Undefined + +export interface V2AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V2AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V2AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V2AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V2AssetInstance_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface V2AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V2AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V2AssetId = V2AssetId_Abstract | V2AssetId_Concrete + +export interface V2AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V2AssetId_Concrete { + __kind: 'Concrete' + value: V2MultiLocation +} + +export interface V2MultiLocation { + parents: number + interior: V2Junctions +} + +export type V2Junctions = V2Junctions_Here | V2Junctions_X1 | V2Junctions_X2 | V2Junctions_X3 | V2Junctions_X4 | V2Junctions_X5 | V2Junctions_X6 | V2Junctions_X7 | V2Junctions_X8 + +export interface V2Junctions_Here { + __kind: 'Here' +} + +export interface V2Junctions_X1 { + __kind: 'X1' + value: V2Junction +} + +export interface V2Junctions_X2 { + __kind: 'X2' + value: [V2Junction, V2Junction] +} + +export interface V2Junctions_X3 { + __kind: 'X3' + value: [V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X4 { + __kind: 'X4' + value: [V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X5 { + __kind: 'X5' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X6 { + __kind: 'X6' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X7 { + __kind: 'X7' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X8 { + __kind: 'X8' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export type V2Junction = V2Junction_AccountId32 | V2Junction_AccountIndex64 | V2Junction_AccountKey20 | V2Junction_GeneralIndex | V2Junction_GeneralKey | V2Junction_OnlyChild | V2Junction_PalletInstance | V2Junction_Parachain | V2Junction_Plurality + +export interface V2Junction_AccountId32 { + __kind: 'AccountId32' + network: V2NetworkId + id: Bytes +} + +export interface V2Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V2NetworkId + index: bigint +} + +export interface V2Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V2NetworkId + key: Bytes +} + +export interface V2Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V2Junction_GeneralKey { + __kind: 'GeneralKey' + value: WeakBoundedVec +} + +export interface V2Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V2Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V2Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V2Junction_Plurality { + __kind: 'Plurality' + id: V2BodyId + part: V2BodyPart +} + +export type V2BodyPart = V2BodyPart_AtLeastProportion | V2BodyPart_Fraction | V2BodyPart_Members | V2BodyPart_MoreThanProportion | V2BodyPart_Voice + +export interface V2BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V2BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V2BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V2BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V2BodyPart_Voice { + __kind: 'Voice' +} + +export type V2BodyId = V2BodyId_Administration | V2BodyId_Defense | V2BodyId_Executive | V2BodyId_Index | V2BodyId_Judicial | V2BodyId_Legislative | V2BodyId_Named | V2BodyId_Technical | V2BodyId_Treasury | V2BodyId_Unit + +export interface V2BodyId_Administration { + __kind: 'Administration' +} + +export interface V2BodyId_Defense { + __kind: 'Defense' +} + +export interface V2BodyId_Executive { + __kind: 'Executive' +} + +export interface V2BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V2BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V2BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V2BodyId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V2BodyId_Technical { + __kind: 'Technical' +} + +export interface V2BodyId_Treasury { + __kind: 'Treasury' +} + +export interface V2BodyId_Unit { + __kind: 'Unit' +} + +export type WeakBoundedVec = Bytes + +export type V2NetworkId = V2NetworkId_Any | V2NetworkId_Kusama | V2NetworkId_Named | V2NetworkId_Polkadot + +export interface V2NetworkId_Any { + __kind: 'Any' +} + +export interface V2NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V2NetworkId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V2NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export const V2Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V2Junction, + X2: sts.tuple(() => [V2Junction, V2Junction]), + X3: sts.tuple(() => [V2Junction, V2Junction, V2Junction]), + X4: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction]), + X5: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + X6: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + X7: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + X8: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + } +}) + +export const V2Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V2NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V2NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V2NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: WeakBoundedVec, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V2BodyId, + part: V2BodyPart, + }), + } +}) + +export const V2BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export const V2BodyId: sts.Type = sts.closedEnum(() => { + return { + Administration: sts.unit(), + Defense: sts.unit(), + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: WeakBoundedVec, + Technical: sts.unit(), + Treasury: sts.unit(), + Unit: sts.unit(), + } +}) + +export const WeakBoundedVec = sts.bytes() + +export const V2NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: WeakBoundedVec, + Polkadot: sts.unit(), + } +}) + +export const V2MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V2MultiAsset), + Wild: V2WildMultiAsset, + } +}) + +export const V2WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllOf: sts.enumStruct({ + id: V2AssetId, + fun: V2WildFungibility, + }), + } +}) + +export const V2WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V2WildFungibility = V2WildFungibility_Fungible | V2WildFungibility_NonFungible + +export interface V2WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V2WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V2AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V2MultiLocation, + } +}) + +export type V2WildMultiAsset = V2WildMultiAsset_All | V2WildMultiAsset_AllOf + +export interface V2WildMultiAsset_All { + __kind: 'All' +} + +export interface V2WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V2AssetId + fun: V2WildFungibility +} + +export type V2MultiAssetFilter = V2MultiAssetFilter_Definite | V2MultiAssetFilter_Wild + +export interface V2MultiAssetFilter_Definite { + __kind: 'Definite' + value: V2MultiAsset[] +} + +export interface V2MultiAssetFilter_Wild { + __kind: 'Wild' + value: V2WildMultiAsset +} + +export const V2MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V2Junctions, + } +}) + +export const V2WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: sts.bigint(), + Unlimited: sts.unit(), + } +}) + +export type V2WeightLimit = V2WeightLimit_Limited | V2WeightLimit_Unlimited + +export interface V2WeightLimit_Limited { + __kind: 'Limited' + value: bigint +} + +export interface V2WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V2MultiAsset: sts.Type = sts.struct(() => { + return { + id: V2AssetId, + fun: V2Fungibility, + } +}) + +export const V2Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V2AssetInstance, + } +}) + +export const V2AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V2Instruction = V2Instruction_BuyExecution | V2Instruction_ClaimAsset | V2Instruction_ClearError | V2Instruction_ClearOrigin | V2Instruction_DepositAsset | V2Instruction_DepositReserveAsset | V2Instruction_DescendOrigin | V2Instruction_ExchangeAsset | V2Instruction_HrmpChannelAccepted | V2Instruction_HrmpChannelClosing | V2Instruction_HrmpNewChannelOpenRequest | V2Instruction_InitiateReserveWithdraw | V2Instruction_InitiateTeleport | V2Instruction_QueryHolding | V2Instruction_QueryResponse | V2Instruction_ReceiveTeleportedAsset | V2Instruction_RefundSurplus | V2Instruction_ReportError | V2Instruction_ReserveAssetDeposited | V2Instruction_SetAppendix | V2Instruction_SetErrorHandler | V2Instruction_SubscribeVersion | V2Instruction_Transact | V2Instruction_TransferAsset | V2Instruction_TransferReserveAsset | V2Instruction_Trap | V2Instruction_UnsubscribeVersion | V2Instruction_WithdrawAsset + +export interface V2Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V2MultiAsset + weightLimit: V2WeightLimit +} + +export interface V2Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V2MultiAsset[] + ticket: V2MultiLocation +} + +export interface V2Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V2Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V2Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V2MultiAssetFilter + maxAssets: number + beneficiary: V2MultiLocation +} + +export interface V2Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V2MultiAssetFilter + maxAssets: number + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V2Junctions +} + +export interface V2Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V2MultiAssetFilter + receive: V2MultiAsset[] +} + +export interface V2Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V2Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V2Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V2Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V2MultiAssetFilter + reserve: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V2MultiAssetFilter + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V2MultiLocation + assets: V2MultiAssetFilter + maxResponseWeight: bigint +} + +export interface V2Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface V2Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V2MultiAsset[] +} + +export interface V2Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V2Instruction_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V2MultiLocation + maxResponseWeight: bigint +} + +export interface V2Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V2MultiAsset[] +} + +export interface V2Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V2Instruction[] +} + +export interface V2Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V2Instruction[] +} + +export interface V2Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V2Instruction_Transact { + __kind: 'Transact' + originType: V2OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V2Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V2MultiAsset[] + beneficiary: V2MultiLocation +} + +export interface V2Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V2MultiAsset[] + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V2Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V2MultiAsset[] +} + +export type VersionedXcm = VersionedXcm_V2 | VersionedXcm_V3 + +export interface VersionedXcm_V2 { + __kind: 'V2' + value: V2Instruction[] +} + +export interface VersionedXcm_V3 { + __kind: 'V3' + value: V3Instruction[] +} + +export const V3WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: Weight, + Unlimited: sts.unit(), + } +}) + +export const VersionedMultiAssets: sts.Type = sts.closedEnum(() => { + return { + V2: sts.array(() => V2MultiAsset), + V3: sts.array(() => V3MultiAsset), + } +}) + +export type VersionedMultiAssets = VersionedMultiAssets_V2 | VersionedMultiAssets_V3 + +export interface VersionedMultiAssets_V2 { + __kind: 'V2' + value: V2MultiAsset[] +} + +export interface VersionedMultiAssets_V3 { + __kind: 'V3' + value: V3MultiAsset[] +} + +export const V3MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V3Junctions, + } +}) + +export const VersionedMultiLocation: sts.Type = sts.closedEnum(() => { + return { + V2: V2MultiLocation, + V3: V3MultiLocation, + } +}) + +export type VersionedMultiLocation = VersionedMultiLocation_V2 | VersionedMultiLocation_V3 + +export interface VersionedMultiLocation_V2 { + __kind: 'V2' + value: V2MultiLocation +} + +export interface VersionedMultiLocation_V3 { + __kind: 'V3' + value: V3MultiLocation +} + +export const Type_449: sts.Type = sts.closedEnum(() => { + return { + V2: sts.array(() => Type_452), + V3: sts.array(() => Type_456), + } +}) + +export const Type_456: sts.Type = sts.closedEnum(() => { + return { + AliasOrigin: V3MultiLocation, + BurnAsset: sts.array(() => V3MultiAsset), + BuyExecution: sts.enumStruct({ + fees: V3MultiAsset, + weightLimit: V3WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + ticket: V3MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + ClearTopic: sts.unit(), + ClearTransactStatus: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + beneficiary: V3MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + DescendOrigin: V3Junctions, + ExchangeAsset: sts.enumStruct({ + give: V3MultiAssetFilter, + want: sts.array(() => V3MultiAsset), + maximal: sts.boolean(), + }), + ExpectAsset: sts.array(() => V3MultiAsset), + ExpectError: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + ExpectOrigin: sts.option(() => V3MultiLocation), + ExpectPallet: sts.enumStruct({ + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + crateMajor: sts.number(), + minCrateMinor: sts.number(), + }), + ExpectTransactStatus: V3MaybeErrorCode, + ExportMessage: sts.enumStruct({ + network: V3NetworkId, + destination: V3Junctions, + xcm: sts.array(() => V3Instruction), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V3MultiAssetFilter, + reserve: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + LockAsset: sts.enumStruct({ + asset: V3MultiAsset, + unlocker: V3MultiLocation, + }), + NoteUnlockable: sts.enumStruct({ + asset: V3MultiAsset, + owner: V3MultiLocation, + }), + QueryPallet: sts.enumStruct({ + moduleName: sts.bytes(), + responseInfo: V3QueryResponseInfo, + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V3Response, + maxWeight: Weight, + querier: sts.option(() => V3MultiLocation), + }), + ReceiveTeleportedAsset: sts.array(() => V3MultiAsset), + RefundSurplus: sts.unit(), + ReportError: V3QueryResponseInfo, + ReportHolding: sts.enumStruct({ + responseInfo: V3QueryResponseInfo, + assets: V3MultiAssetFilter, + }), + ReportTransactStatus: V3QueryResponseInfo, + RequestUnlock: sts.enumStruct({ + asset: V3MultiAsset, + locker: V3MultiLocation, + }), + ReserveAssetDeposited: sts.array(() => V3MultiAsset), + SetAppendix: sts.array(() => Type_456), + SetErrorHandler: sts.array(() => Type_456), + SetFeesMode: sts.enumStruct({ + jitWithdraw: sts.boolean(), + }), + SetTopic: sts.bytes(), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: Weight, + }), + Transact: sts.enumStruct({ + originKind: V2OriginKind, + requireWeightAtMost: Weight, + call: Type_453, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + beneficiary: V3MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + Trap: sts.bigint(), + UniversalOrigin: V3Junction, + UnlockAsset: sts.enumStruct({ + asset: V3MultiAsset, + target: V3MultiLocation, + }), + UnpaidExecution: sts.enumStruct({ + weightLimit: V3WeightLimit, + checkOrigin: sts.option(() => V3MultiLocation), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V3MultiAsset), + } +}) + +export const Type_453: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface Type_453 { + encoded: Bytes +} + +export type Type_456 = Type_456_AliasOrigin | Type_456_BurnAsset | Type_456_BuyExecution | Type_456_ClaimAsset | Type_456_ClearError | Type_456_ClearOrigin | Type_456_ClearTopic | Type_456_ClearTransactStatus | Type_456_DepositAsset | Type_456_DepositReserveAsset | Type_456_DescendOrigin | Type_456_ExchangeAsset | Type_456_ExpectAsset | Type_456_ExpectError | Type_456_ExpectOrigin | Type_456_ExpectPallet | Type_456_ExpectTransactStatus | Type_456_ExportMessage | Type_456_HrmpChannelAccepted | Type_456_HrmpChannelClosing | Type_456_HrmpNewChannelOpenRequest | Type_456_InitiateReserveWithdraw | Type_456_InitiateTeleport | Type_456_LockAsset | Type_456_NoteUnlockable | Type_456_QueryPallet | Type_456_QueryResponse | Type_456_ReceiveTeleportedAsset | Type_456_RefundSurplus | Type_456_ReportError | Type_456_ReportHolding | Type_456_ReportTransactStatus | Type_456_RequestUnlock | Type_456_ReserveAssetDeposited | Type_456_SetAppendix | Type_456_SetErrorHandler | Type_456_SetFeesMode | Type_456_SetTopic | Type_456_SubscribeVersion | Type_456_Transact | Type_456_TransferAsset | Type_456_TransferReserveAsset | Type_456_Trap | Type_456_UniversalOrigin | Type_456_UnlockAsset | Type_456_UnpaidExecution | Type_456_UnsubscribeVersion | Type_456_WithdrawAsset + +export interface Type_456_AliasOrigin { + __kind: 'AliasOrigin' + value: V3MultiLocation +} + +export interface Type_456_BurnAsset { + __kind: 'BurnAsset' + value: V3MultiAsset[] +} + +export interface Type_456_BuyExecution { + __kind: 'BuyExecution' + fees: V3MultiAsset + weightLimit: V3WeightLimit +} + +export interface Type_456_ClaimAsset { + __kind: 'ClaimAsset' + assets: V3MultiAsset[] + ticket: V3MultiLocation +} + +export interface Type_456_ClearError { + __kind: 'ClearError' +} + +export interface Type_456_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_456_ClearTopic { + __kind: 'ClearTopic' +} + +export interface Type_456_ClearTransactStatus { + __kind: 'ClearTransactStatus' +} + +export interface Type_456_DepositAsset { + __kind: 'DepositAsset' + assets: V3MultiAssetFilter + beneficiary: V3MultiLocation +} + +export interface Type_456_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_456_DescendOrigin { + __kind: 'DescendOrigin' + value: V3Junctions +} + +export interface Type_456_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V3MultiAssetFilter + want: V3MultiAsset[] + maximal: boolean +} + +export interface Type_456_ExpectAsset { + __kind: 'ExpectAsset' + value: V3MultiAsset[] +} + +export interface Type_456_ExpectError { + __kind: 'ExpectError' + value?: ([number, V3Error] | undefined) +} + +export interface Type_456_ExpectOrigin { + __kind: 'ExpectOrigin' + value?: (V3MultiLocation | undefined) +} + +export interface Type_456_ExpectPallet { + __kind: 'ExpectPallet' + index: number + name: Bytes + moduleName: Bytes + crateMajor: number + minCrateMinor: number +} + +export interface Type_456_ExpectTransactStatus { + __kind: 'ExpectTransactStatus' + value: V3MaybeErrorCode +} + +export interface Type_456_ExportMessage { + __kind: 'ExportMessage' + network: V3NetworkId + destination: V3Junctions + xcm: V3Instruction[] +} + +export interface Type_456_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_456_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_456_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_456_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V3MultiAssetFilter + reserve: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_456_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_456_LockAsset { + __kind: 'LockAsset' + asset: V3MultiAsset + unlocker: V3MultiLocation +} + +export interface Type_456_NoteUnlockable { + __kind: 'NoteUnlockable' + asset: V3MultiAsset + owner: V3MultiLocation +} + +export interface Type_456_QueryPallet { + __kind: 'QueryPallet' + moduleName: Bytes + responseInfo: V3QueryResponseInfo +} + +export interface Type_456_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V3Response + maxWeight: Weight + querier?: (V3MultiLocation | undefined) +} + +export interface Type_456_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V3MultiAsset[] +} + +export interface Type_456_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_456_ReportError { + __kind: 'ReportError' + value: V3QueryResponseInfo +} + +export interface Type_456_ReportHolding { + __kind: 'ReportHolding' + responseInfo: V3QueryResponseInfo + assets: V3MultiAssetFilter +} + +export interface Type_456_ReportTransactStatus { + __kind: 'ReportTransactStatus' + value: V3QueryResponseInfo +} + +export interface Type_456_RequestUnlock { + __kind: 'RequestUnlock' + asset: V3MultiAsset + locker: V3MultiLocation +} + +export interface Type_456_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V3MultiAsset[] +} + +export interface Type_456_SetAppendix { + __kind: 'SetAppendix' + value: Type_456[] +} + +export interface Type_456_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_456[] +} + +export interface Type_456_SetFeesMode { + __kind: 'SetFeesMode' + jitWithdraw: boolean +} + +export interface Type_456_SetTopic { + __kind: 'SetTopic' + value: Bytes +} + +export interface Type_456_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: Weight +} + +export interface Type_456_Transact { + __kind: 'Transact' + originKind: V2OriginKind + requireWeightAtMost: Weight + call: Type_453 +} + +export interface Type_456_TransferAsset { + __kind: 'TransferAsset' + assets: V3MultiAsset[] + beneficiary: V3MultiLocation +} + +export interface Type_456_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V3MultiAsset[] + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_456_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_456_UniversalOrigin { + __kind: 'UniversalOrigin' + value: V3Junction +} + +export interface Type_456_UnlockAsset { + __kind: 'UnlockAsset' + asset: V3MultiAsset + target: V3MultiLocation +} + +export interface Type_456_UnpaidExecution { + __kind: 'UnpaidExecution' + weightLimit: V3WeightLimit + checkOrigin?: (V3MultiLocation | undefined) +} + +export interface Type_456_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_456_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V3MultiAsset[] +} + +export const Type_452: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V2MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + ticket: V2MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V2MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V2Junctions, + ExchangeAsset: sts.enumStruct({ + give: V2MultiAssetFilter, + receive: sts.array(() => V2MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V2MultiAssetFilter, + reserve: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V2MultiAssetFilter, + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + assets: V2MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V2MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V2MultiAsset), + SetAppendix: sts.array(() => Type_452), + SetErrorHandler: sts.array(() => Type_452), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V2OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_453, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + beneficiary: V2MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V2MultiAsset), + } +}) + +export type Type_452 = Type_452_BuyExecution | Type_452_ClaimAsset | Type_452_ClearError | Type_452_ClearOrigin | Type_452_DepositAsset | Type_452_DepositReserveAsset | Type_452_DescendOrigin | Type_452_ExchangeAsset | Type_452_HrmpChannelAccepted | Type_452_HrmpChannelClosing | Type_452_HrmpNewChannelOpenRequest | Type_452_InitiateReserveWithdraw | Type_452_InitiateTeleport | Type_452_QueryHolding | Type_452_QueryResponse | Type_452_ReceiveTeleportedAsset | Type_452_RefundSurplus | Type_452_ReportError | Type_452_ReserveAssetDeposited | Type_452_SetAppendix | Type_452_SetErrorHandler | Type_452_SubscribeVersion | Type_452_Transact | Type_452_TransferAsset | Type_452_TransferReserveAsset | Type_452_Trap | Type_452_UnsubscribeVersion | Type_452_WithdrawAsset + +export interface Type_452_BuyExecution { + __kind: 'BuyExecution' + fees: V2MultiAsset + weightLimit: V2WeightLimit +} + +export interface Type_452_ClaimAsset { + __kind: 'ClaimAsset' + assets: V2MultiAsset[] + ticket: V2MultiLocation +} + +export interface Type_452_ClearError { + __kind: 'ClearError' +} + +export interface Type_452_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_452_DepositAsset { + __kind: 'DepositAsset' + assets: V2MultiAssetFilter + maxAssets: number + beneficiary: V2MultiLocation +} + +export interface Type_452_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V2MultiAssetFilter + maxAssets: number + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_452_DescendOrigin { + __kind: 'DescendOrigin' + value: V2Junctions +} + +export interface Type_452_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V2MultiAssetFilter + receive: V2MultiAsset[] +} + +export interface Type_452_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_452_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_452_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_452_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V2MultiAssetFilter + reserve: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_452_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V2MultiAssetFilter + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_452_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V2MultiLocation + assets: V2MultiAssetFilter + maxResponseWeight: bigint +} + +export interface Type_452_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface Type_452_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V2MultiAsset[] +} + +export interface Type_452_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_452_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V2MultiLocation + maxResponseWeight: bigint +} + +export interface Type_452_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V2MultiAsset[] +} + +export interface Type_452_SetAppendix { + __kind: 'SetAppendix' + value: Type_452[] +} + +export interface Type_452_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_452[] +} + +export interface Type_452_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_452_Transact { + __kind: 'Transact' + originType: V2OriginKind + requireWeightAtMost: bigint + call: Type_453 +} + +export interface Type_452_TransferAsset { + __kind: 'TransferAsset' + assets: V2MultiAsset[] + beneficiary: V2MultiLocation +} + +export interface Type_452_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V2MultiAsset[] + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_452_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_452_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_452_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V2MultiAsset[] +} + +export type Type_449 = Type_449_V2 | Type_449_V3 + +export interface Type_449_V2 { + __kind: 'V2' + value: Type_452[] +} + +export interface Type_449_V3 { + __kind: 'V3' + value: Type_456[] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type XcmPalletCall = XcmPalletCall_execute | XcmPalletCall_force_default_xcm_version | XcmPalletCall_force_subscribe_version_notify | XcmPalletCall_force_suspension | XcmPalletCall_force_unsubscribe_version_notify | XcmPalletCall_force_xcm_version | XcmPalletCall_limited_reserve_transfer_assets | XcmPalletCall_limited_teleport_assets | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets + +/** + * See [`Pallet::execute`]. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Type_449 + maxWeight: Weight +} + +/** + * See [`Pallet::force_default_xcm_version`]. + */ +export interface XcmPalletCall_force_default_xcm_version { + __kind: 'force_default_xcm_version' + maybeXcmVersion?: (number | undefined) +} + +/** + * See [`Pallet::force_subscribe_version_notify`]. + */ +export interface XcmPalletCall_force_subscribe_version_notify { + __kind: 'force_subscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * See [`Pallet::force_suspension`]. + */ +export interface XcmPalletCall_force_suspension { + __kind: 'force_suspension' + suspended: boolean +} + +/** + * See [`Pallet::force_unsubscribe_version_notify`]. + */ +export interface XcmPalletCall_force_unsubscribe_version_notify { + __kind: 'force_unsubscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * See [`Pallet::force_xcm_version`]. + */ +export interface XcmPalletCall_force_xcm_version { + __kind: 'force_xcm_version' + location: V3MultiLocation + version: number +} + +/** + * See [`Pallet::limited_reserve_transfer_assets`]. + */ +export interface XcmPalletCall_limited_reserve_transfer_assets { + __kind: 'limited_reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V3WeightLimit +} + +/** + * See [`Pallet::limited_teleport_assets`]. + */ +export interface XcmPalletCall_limited_teleport_assets { + __kind: 'limited_teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V3WeightLimit +} + +/** + * See [`Pallet::reserve_transfer_assets`]. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +/** + * See [`Pallet::send`]. + */ +export interface XcmPalletCall_send { + __kind: 'send' + dest: VersionedMultiLocation + message: VersionedXcm +} + +/** + * See [`Pallet::teleport_assets`]. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const WhitelistCall: sts.Type = sts.closedEnum(() => { + return { + dispatch_whitelisted_call: sts.enumStruct({ + callHash: H256, + callEncodedLen: sts.number(), + callWeightWitness: Weight, + }), + dispatch_whitelisted_call_with_preimage: sts.enumStruct({ + call: Call, + }), + remove_whitelisted_call: sts.enumStruct({ + callHash: H256, + }), + whitelist_call: sts.enumStruct({ + callHash: H256, + }), + } +}) + +export const H256 = sts.bytes() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type WhitelistCall = WhitelistCall_dispatch_whitelisted_call | WhitelistCall_dispatch_whitelisted_call_with_preimage | WhitelistCall_remove_whitelisted_call | WhitelistCall_whitelist_call + +/** + * See [`Pallet::dispatch_whitelisted_call`]. + */ +export interface WhitelistCall_dispatch_whitelisted_call { + __kind: 'dispatch_whitelisted_call' + callHash: H256 + callEncodedLen: number + callWeightWitness: Weight +} + +/** + * See [`Pallet::dispatch_whitelisted_call_with_preimage`]. + */ +export interface WhitelistCall_dispatch_whitelisted_call_with_preimage { + __kind: 'dispatch_whitelisted_call_with_preimage' + call: Call +} + +/** + * See [`Pallet::remove_whitelisted_call`]. + */ +export interface WhitelistCall_remove_whitelisted_call { + __kind: 'remove_whitelisted_call' + callHash: H256 +} + +/** + * See [`Pallet::whitelist_call`]. + */ +export interface WhitelistCall_whitelist_call { + __kind: 'whitelist_call' + callHash: H256 +} + +export type H256 = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const VoterListCall: sts.Type = sts.closedEnum(() => { + return { + put_in_front_of: sts.enumStruct({ + lighter: MultiAddress, + }), + put_in_front_of_other: sts.enumStruct({ + heavier: MultiAddress, + lighter: MultiAddress, + }), + rebag: sts.enumStruct({ + dislocated: MultiAddress, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type VoterListCall = VoterListCall_put_in_front_of | VoterListCall_put_in_front_of_other | VoterListCall_rebag + +/** + * See [`Pallet::put_in_front_of`]. + */ +export interface VoterListCall_put_in_front_of { + __kind: 'put_in_front_of' + lighter: MultiAddress +} + +/** + * See [`Pallet::put_in_front_of_other`]. + */ +export interface VoterListCall_put_in_front_of_other { + __kind: 'put_in_front_of_other' + heavier: MultiAddress + lighter: MultiAddress +} + +/** + * See [`Pallet::rebag`]. + */ +export interface VoterListCall_rebag { + __kind: 'rebag' + dislocated: MultiAddress +} + +export type MultiAddress = MultiAddress_Address20 | MultiAddress_Address32 | MultiAddress_Id | MultiAddress_Index | MultiAddress_Raw + +export interface MultiAddress_Address20 { + __kind: 'Address20' + value: Bytes +} + +export interface MultiAddress_Address32 { + __kind: 'Address32' + value: Bytes +} + +export interface MultiAddress_Id { + __kind: 'Id' + value: AccountId32 +} + +export interface MultiAddress_Index { + __kind: 'Index' +} + +export interface MultiAddress_Raw { + __kind: 'Raw' + value: Bytes +} + +export type AccountId32 = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: MultiAddress, + target: MultiAddress, + schedule: VestingInfo, + }), + merge_schedules: sts.enumStruct({ + schedule1Index: sts.number(), + schedule2Index: sts.number(), + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: MultiAddress, + }), + vested_transfer: sts.enumStruct({ + target: MultiAddress, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: sts.bigint(), + perBlock: sts.bigint(), + startingBlock: sts.number(), + } +}) + +export interface VestingInfo { + locked: bigint + perBlock: bigint + startingBlock: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_merge_schedules | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * See [`Pallet::force_vested_transfer`]. + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: MultiAddress + target: MultiAddress + schedule: VestingInfo +} + +/** + * See [`Pallet::merge_schedules`]. + */ +export interface VestingCall_merge_schedules { + __kind: 'merge_schedules' + schedule1Index: number + schedule2Index: number +} + +/** + * See [`Pallet::vest`]. + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * See [`Pallet::vest_other`]. + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: MultiAddress +} + +/** + * See [`Pallet::vested_transfer`]. + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: MultiAddress + schedule: VestingInfo +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Call, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Call), + }), + dispatch_as: sts.enumStruct({ + asOrigin: OriginCaller, + call: Call, + }), + force_batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + with_weight: sts.enumStruct({ + call: Call, + weight: Weight, + }), + } +}) + +export const OriginCaller: sts.Type = sts.closedEnum(() => { + return { + Origins: Origin, + ParachainsOrigin: Type_157, + Void: Void, + XcmPallet: Type_159, + system: RawOrigin, + } +}) + +export const RawOrigin: sts.Type = sts.closedEnum(() => { + return { + None: sts.unit(), + Root: sts.unit(), + Signed: AccountId32, + } +}) + +export type RawOrigin = RawOrigin_None | RawOrigin_Root | RawOrigin_Signed + +export interface RawOrigin_None { + __kind: 'None' +} + +export interface RawOrigin_Root { + __kind: 'Root' +} + +export interface RawOrigin_Signed { + __kind: 'Signed' + value: AccountId32 +} + +export const Type_159: sts.Type = sts.closedEnum(() => { + return { + Response: V3MultiLocation, + Xcm: V3MultiLocation, + } +}) + +export type Type_159 = Type_159_Response | Type_159_Xcm + +export interface Type_159_Response { + __kind: 'Response' + value: V3MultiLocation +} + +export interface Type_159_Xcm { + __kind: 'Xcm' + value: V3MultiLocation +} + +export const Void: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Void = never + +export const Type_157: sts.Type = sts.closedEnum(() => { + return { + Parachain: Id, + } +}) + +export const Id = sts.number() + +export type Type_157 = Type_157_Parachain + +export interface Type_157_Parachain { + __kind: 'Parachain' + value: Id +} + +export type Id = number + +export const Origin: sts.Type = sts.closedEnum(() => { + return { + AuctionAdmin: sts.unit(), + BigSpender: sts.unit(), + BigTipper: sts.unit(), + Fellows: sts.unit(), + Fellowship1Dan: sts.unit(), + Fellowship2Dan: sts.unit(), + Fellowship3Dan: sts.unit(), + Fellowship4Dan: sts.unit(), + Fellowship5Dan: sts.unit(), + Fellowship6Dan: sts.unit(), + Fellowship7Dan: sts.unit(), + Fellowship8Dan: sts.unit(), + Fellowship9Dan: sts.unit(), + FellowshipAdmin: sts.unit(), + FellowshipExperts: sts.unit(), + FellowshipInitiates: sts.unit(), + FellowshipMasters: sts.unit(), + GeneralAdmin: sts.unit(), + LeaseAdmin: sts.unit(), + MediumSpender: sts.unit(), + ReferendumCanceller: sts.unit(), + ReferendumKiller: sts.unit(), + SmallSpender: sts.unit(), + SmallTipper: sts.unit(), + StakingAdmin: sts.unit(), + Treasurer: sts.unit(), + WhitelistedCaller: sts.unit(), + } +}) + +export type Origin = Origin_AuctionAdmin | Origin_BigSpender | Origin_BigTipper | Origin_Fellows | Origin_Fellowship1Dan | Origin_Fellowship2Dan | Origin_Fellowship3Dan | Origin_Fellowship4Dan | Origin_Fellowship5Dan | Origin_Fellowship6Dan | Origin_Fellowship7Dan | Origin_Fellowship8Dan | Origin_Fellowship9Dan | Origin_FellowshipAdmin | Origin_FellowshipExperts | Origin_FellowshipInitiates | Origin_FellowshipMasters | Origin_GeneralAdmin | Origin_LeaseAdmin | Origin_MediumSpender | Origin_ReferendumCanceller | Origin_ReferendumKiller | Origin_SmallSpender | Origin_SmallTipper | Origin_StakingAdmin | Origin_Treasurer | Origin_WhitelistedCaller + +export interface Origin_AuctionAdmin { + __kind: 'AuctionAdmin' +} + +export interface Origin_BigSpender { + __kind: 'BigSpender' +} + +export interface Origin_BigTipper { + __kind: 'BigTipper' +} + +export interface Origin_Fellows { + __kind: 'Fellows' +} + +export interface Origin_Fellowship1Dan { + __kind: 'Fellowship1Dan' +} + +export interface Origin_Fellowship2Dan { + __kind: 'Fellowship2Dan' +} + +export interface Origin_Fellowship3Dan { + __kind: 'Fellowship3Dan' +} + +export interface Origin_Fellowship4Dan { + __kind: 'Fellowship4Dan' +} + +export interface Origin_Fellowship5Dan { + __kind: 'Fellowship5Dan' +} + +export interface Origin_Fellowship6Dan { + __kind: 'Fellowship6Dan' +} + +export interface Origin_Fellowship7Dan { + __kind: 'Fellowship7Dan' +} + +export interface Origin_Fellowship8Dan { + __kind: 'Fellowship8Dan' +} + +export interface Origin_Fellowship9Dan { + __kind: 'Fellowship9Dan' +} + +export interface Origin_FellowshipAdmin { + __kind: 'FellowshipAdmin' +} + +export interface Origin_FellowshipExperts { + __kind: 'FellowshipExperts' +} + +export interface Origin_FellowshipInitiates { + __kind: 'FellowshipInitiates' +} + +export interface Origin_FellowshipMasters { + __kind: 'FellowshipMasters' +} + +export interface Origin_GeneralAdmin { + __kind: 'GeneralAdmin' +} + +export interface Origin_LeaseAdmin { + __kind: 'LeaseAdmin' +} + +export interface Origin_MediumSpender { + __kind: 'MediumSpender' +} + +export interface Origin_ReferendumCanceller { + __kind: 'ReferendumCanceller' +} + +export interface Origin_ReferendumKiller { + __kind: 'ReferendumKiller' +} + +export interface Origin_SmallSpender { + __kind: 'SmallSpender' +} + +export interface Origin_SmallTipper { + __kind: 'SmallTipper' +} + +export interface Origin_StakingAdmin { + __kind: 'StakingAdmin' +} + +export interface Origin_Treasurer { + __kind: 'Treasurer' +} + +export interface Origin_WhitelistedCaller { + __kind: 'WhitelistedCaller' +} + +export type OriginCaller = OriginCaller_Origins | OriginCaller_ParachainsOrigin | OriginCaller_Void | OriginCaller_XcmPallet | OriginCaller_system + +export interface OriginCaller_Origins { + __kind: 'Origins' + value: Origin +} + +export interface OriginCaller_ParachainsOrigin { + __kind: 'ParachainsOrigin' + value: Type_157 +} + +export interface OriginCaller_Void { + __kind: 'Void' + value: Void +} + +export interface OriginCaller_XcmPallet { + __kind: 'XcmPallet' + value: Type_159 +} + +export interface OriginCaller_system { + __kind: 'system' + value: RawOrigin +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all | UtilityCall_dispatch_as | UtilityCall_force_batch | UtilityCall_with_weight + +/** + * See [`Pallet::as_derivative`]. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Call +} + +/** + * See [`Pallet::batch`]. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Call[] +} + +/** + * See [`Pallet::batch_all`]. + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Call[] +} + +/** + * See [`Pallet::dispatch_as`]. + */ +export interface UtilityCall_dispatch_as { + __kind: 'dispatch_as' + asOrigin: OriginCaller + call: Call +} + +/** + * See [`Pallet::force_batch`]. + */ +export interface UtilityCall_force_batch { + __kind: 'force_batch' + calls: Call[] +} + +/** + * See [`Pallet::with_weight`]. + */ +export interface UtilityCall_with_weight { + __kind: 'with_weight' + call: Call + weight: Weight +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + check_status: sts.enumStruct({ + index: sts.number(), + }), + payout: sts.enumStruct({ + index: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: MultiAddress, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + remove_approval: sts.enumStruct({ + proposalId: sts.number(), + }), + spend: sts.enumStruct({ + assetKind: VersionedLocatableAsset, + amount: sts.bigint(), + beneficiary: VersionedMultiLocation, + validFrom: sts.option(() => sts.number()), + }), + spend_local: sts.enumStruct({ + amount: sts.bigint(), + beneficiary: MultiAddress, + }), + void_spend: sts.enumStruct({ + index: sts.number(), + }), + } +}) + +export const VersionedLocatableAsset: sts.Type = sts.closedEnum(() => { + return { + V3: sts.enumStruct({ + location: V3MultiLocation, + assetId: V3AssetId, + }), + } +}) + +export type VersionedLocatableAsset = VersionedLocatableAsset_V3 + +export interface VersionedLocatableAsset_V3 { + __kind: 'V3' + location: V3MultiLocation + assetId: V3AssetId +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_check_status | TreasuryCall_payout | TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_remove_approval | TreasuryCall_spend | TreasuryCall_spend_local | TreasuryCall_void_spend + +/** + * See [`Pallet::approve_proposal`]. + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * See [`Pallet::check_status`]. + */ +export interface TreasuryCall_check_status { + __kind: 'check_status' + index: number +} + +/** + * See [`Pallet::payout`]. + */ +export interface TreasuryCall_payout { + __kind: 'payout' + index: number +} + +/** + * See [`Pallet::propose_spend`]. + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: MultiAddress +} + +/** + * See [`Pallet::reject_proposal`]. + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * See [`Pallet::remove_approval`]. + */ +export interface TreasuryCall_remove_approval { + __kind: 'remove_approval' + proposalId: number +} + +/** + * See [`Pallet::spend`]. + */ +export interface TreasuryCall_spend { + __kind: 'spend' + assetKind: VersionedLocatableAsset + amount: bigint + beneficiary: VersionedMultiLocation + validFrom?: (number | undefined) +} + +/** + * See [`Pallet::spend_local`]. + */ +export interface TreasuryCall_spend_local { + __kind: 'spend_local' + amount: bigint + beneficiary: MultiAddress +} + +/** + * See [`Pallet::void_spend`]. + */ +export interface TreasuryCall_void_spend { + __kind: 'void_spend' + index: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type TimestampCall = TimestampCall_set + +/** + * See [`Pallet::set`]. + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + kill_prefix: sts.enumStruct({ + prefix: sts.bytes(), + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => sts.bytes()), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SystemCall = SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * See [`Pallet::kill_prefix`]. + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Bytes + subkeys: number +} + +/** + * See [`Pallet::kill_storage`]. + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Bytes[] +} + +/** + * See [`Pallet::remark`]. + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * See [`Pallet::remark_with_event`]. + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * See [`Pallet::set_code`]. + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * See [`Pallet::set_code_without_checks`]. + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * See [`Pallet::set_heap_pages`]. + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * See [`Pallet::set_storage`]. + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: [Bytes, Bytes][] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const StateTrieMigrationCall: sts.Type = sts.closedEnum(() => { + return { + continue_migrate: sts.enumStruct({ + limits: MigrationLimits, + realSizeUpper: sts.number(), + witnessTask: MigrationTask, + }), + control_auto_migration: sts.enumStruct({ + maybeConfig: sts.option(() => MigrationLimits), + }), + force_set_progress: sts.enumStruct({ + progressTop: Progress, + progressChild: Progress, + }), + migrate_custom_child: sts.enumStruct({ + root: sts.bytes(), + childKeys: sts.array(() => sts.bytes()), + totalSize: sts.number(), + }), + migrate_custom_top: sts.enumStruct({ + keys: sts.array(() => sts.bytes()), + witnessSize: sts.number(), + }), + set_signed_max_limits: sts.enumStruct({ + limits: MigrationLimits, + }), + } +}) + +export const Progress: sts.Type = sts.closedEnum(() => { + return { + Complete: sts.unit(), + LastKey: BoundedVec, + ToStart: sts.unit(), + } +}) + +export const BoundedVec = sts.bytes() + +export type Progress = Progress_Complete | Progress_LastKey | Progress_ToStart + +export interface Progress_Complete { + __kind: 'Complete' +} + +export interface Progress_LastKey { + __kind: 'LastKey' + value: BoundedVec +} + +export interface Progress_ToStart { + __kind: 'ToStart' +} + +export type BoundedVec = Bytes + +export const MigrationTask: sts.Type = sts.struct(() => { + return { + progressTop: Progress, + progressChild: Progress, + size: sts.number(), + topItems: sts.number(), + childItems: sts.number(), + } +}) + +export interface MigrationTask { + progressTop: Progress + progressChild: Progress + size: number + topItems: number + childItems: number +} + +export const MigrationLimits: sts.Type = sts.struct(() => { + return { + size: sts.number(), + item: sts.number(), + } +}) + +export interface MigrationLimits { + size: number + item: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type StateTrieMigrationCall = StateTrieMigrationCall_continue_migrate | StateTrieMigrationCall_control_auto_migration | StateTrieMigrationCall_force_set_progress | StateTrieMigrationCall_migrate_custom_child | StateTrieMigrationCall_migrate_custom_top | StateTrieMigrationCall_set_signed_max_limits + +/** + * See [`Pallet::continue_migrate`]. + */ +export interface StateTrieMigrationCall_continue_migrate { + __kind: 'continue_migrate' + limits: MigrationLimits + realSizeUpper: number + witnessTask: MigrationTask +} + +/** + * See [`Pallet::control_auto_migration`]. + */ +export interface StateTrieMigrationCall_control_auto_migration { + __kind: 'control_auto_migration' + maybeConfig?: (MigrationLimits | undefined) +} + +/** + * See [`Pallet::force_set_progress`]. + */ +export interface StateTrieMigrationCall_force_set_progress { + __kind: 'force_set_progress' + progressTop: Progress + progressChild: Progress +} + +/** + * See [`Pallet::migrate_custom_child`]. + */ +export interface StateTrieMigrationCall_migrate_custom_child { + __kind: 'migrate_custom_child' + root: Bytes + childKeys: Bytes[] + totalSize: number +} + +/** + * See [`Pallet::migrate_custom_top`]. + */ +export interface StateTrieMigrationCall_migrate_custom_top { + __kind: 'migrate_custom_top' + keys: Bytes[] + witnessSize: number +} + +/** + * See [`Pallet::set_signed_max_limits`]. + */ +export interface StateTrieMigrationCall_set_signed_max_limits { + __kind: 'set_signed_max_limits' + limits: MigrationLimits +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: sts.number(), + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + controller: AccountId32, + }), + force_apply_min_commission: sts.enumStruct({ + validatorStash: AccountId32, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => MultiAddress), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => MultiAddress), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + }), + reap_stash: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.unit(), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId32), + }), + set_min_commission: sts.enumStruct({ + new: Perbill, + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_staking_configs: sts.enumStruct({ + minNominatorBond: ConfigOp, + minValidatorBond: ConfigOp, + maxNominatorCount: Type_108, + maxValidatorCount: Type_108, + chillThreshold: Type_109, + minCommission: Type_110, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export const Type_110: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export type Type_110 = Type_110_Noop | Type_110_Remove | Type_110_Set + +export interface Type_110_Noop { + __kind: 'Noop' +} + +export interface Type_110_Remove { + __kind: 'Remove' +} + +export interface Type_110_Set { + __kind: 'Set' + value: Perbill +} + +export type Perbill = number + +export const Type_109: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Percent, + } +}) + +export type Type_109 = Type_109_Noop | Type_109_Remove | Type_109_Set + +export interface Type_109_Noop { + __kind: 'Noop' +} + +export interface Type_109_Remove { + __kind: 'Remove' +} + +export interface Type_109_Set { + __kind: 'Set' + value: Percent +} + +export type Percent = number + +export const Type_108: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_108 = Type_108_Noop | Type_108_Remove | Type_108_Set + +export interface Type_108_Noop { + __kind: 'Noop' +} + +export interface Type_108_Remove { + __kind: 'Remove' +} + +export interface Type_108_Set { + __kind: 'Set' + value: number +} + +export const ConfigOp: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type ConfigOp = ConfigOp_Noop | ConfigOp_Remove | ConfigOp_Set + +export interface ConfigOp_Noop { + __kind: 'Noop' +} + +export interface ConfigOp_Remove { + __kind: 'Remove' +} + +export interface ConfigOp_Set { + __kind: 'Set' + value: bigint +} + +export const Perbill = sts.number() + +export const Percent = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_force_apply_min_commission | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_invulnerables | StakingCall_set_min_commission | StakingCall_set_payee | StakingCall_set_staking_configs | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * See [`Pallet::bond`]. + */ +export interface StakingCall_bond { + __kind: 'bond' + value: bigint + payee: RewardDestination +} + +/** + * See [`Pallet::bond_extra`]. + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * See [`Pallet::cancel_deferred_slash`]. + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: number + slashIndices: number[] +} + +/** + * See [`Pallet::chill`]. + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * See [`Pallet::chill_other`]. + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + controller: AccountId32 +} + +/** + * See [`Pallet::force_apply_min_commission`]. + */ +export interface StakingCall_force_apply_min_commission { + __kind: 'force_apply_min_commission' + validatorStash: AccountId32 +} + +/** + * See [`Pallet::force_new_era`]. + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * See [`Pallet::force_new_era_always`]. + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * See [`Pallet::force_no_eras`]. + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * See [`Pallet::force_unstake`]. + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * See [`Pallet::increase_validator_count`]. + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * See [`Pallet::kick`]. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: MultiAddress[] +} + +/** + * See [`Pallet::nominate`]. + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: MultiAddress[] +} + +/** + * See [`Pallet::payout_stakers`]. + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId32 + era: number +} + +/** + * See [`Pallet::reap_stash`]. + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * See [`Pallet::rebond`]. + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * See [`Pallet::scale_validator_count`]. + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * See [`Pallet::set_controller`]. + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' +} + +/** + * See [`Pallet::set_invulnerables`]. + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId32[] +} + +/** + * See [`Pallet::set_min_commission`]. + */ +export interface StakingCall_set_min_commission { + __kind: 'set_min_commission' + new: Perbill +} + +/** + * See [`Pallet::set_payee`]. + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * See [`Pallet::set_staking_configs`]. + */ +export interface StakingCall_set_staking_configs { + __kind: 'set_staking_configs' + minNominatorBond: ConfigOp + minValidatorBond: ConfigOp + maxNominatorCount: Type_108 + maxValidatorCount: Type_108 + chillThreshold: Type_109 + minCommission: Type_110 +} + +/** + * See [`Pallet::set_validator_count`]. + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * See [`Pallet::unbond`]. + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * See [`Pallet::validate`]. + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * See [`Pallet::withdraw_unbonded`]. + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bestow_membership: sts.enumStruct({ + candidate: AccountId32, + }), + bid: sts.enumStruct({ + value: sts.bigint(), + }), + claim_membership: sts.unit(), + cleanup_candidacy: sts.enumStruct({ + candidate: AccountId32, + max: sts.number(), + }), + cleanup_challenge: sts.enumStruct({ + challengeRound: sts.number(), + max: sts.number(), + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + dissolve: sts.unit(), + drop_candidate: sts.enumStruct({ + candidate: AccountId32, + }), + found_society: sts.enumStruct({ + founder: MultiAddress, + maxMembers: sts.number(), + maxIntake: sts.number(), + maxStrikes: sts.number(), + candidateDeposit: sts.bigint(), + rules: sts.bytes(), + }), + judge_suspended_member: sts.enumStruct({ + who: MultiAddress, + forgive: sts.boolean(), + }), + kick_candidate: sts.enumStruct({ + candidate: AccountId32, + }), + payout: sts.unit(), + punish_skeptic: sts.unit(), + resign_candidacy: sts.unit(), + set_parameters: sts.enumStruct({ + maxMembers: sts.number(), + maxIntake: sts.number(), + maxStrikes: sts.number(), + candidateDeposit: sts.bigint(), + }), + unbid: sts.unit(), + unvouch: sts.unit(), + vote: sts.enumStruct({ + candidate: MultiAddress, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: MultiAddress, + value: sts.bigint(), + tip: sts.bigint(), + }), + waive_repay: sts.enumStruct({ + amount: sts.bigint(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SocietyCall = SocietyCall_bestow_membership | SocietyCall_bid | SocietyCall_claim_membership | SocietyCall_cleanup_candidacy | SocietyCall_cleanup_challenge | SocietyCall_defender_vote | SocietyCall_dissolve | SocietyCall_drop_candidate | SocietyCall_found_society | SocietyCall_judge_suspended_member | SocietyCall_kick_candidate | SocietyCall_payout | SocietyCall_punish_skeptic | SocietyCall_resign_candidacy | SocietyCall_set_parameters | SocietyCall_unbid | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch | SocietyCall_waive_repay + +/** + * See [`Pallet::bestow_membership`]. + */ +export interface SocietyCall_bestow_membership { + __kind: 'bestow_membership' + candidate: AccountId32 +} + +/** + * See [`Pallet::bid`]. + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: bigint +} + +/** + * See [`Pallet::claim_membership`]. + */ +export interface SocietyCall_claim_membership { + __kind: 'claim_membership' +} + +/** + * See [`Pallet::cleanup_candidacy`]. + */ +export interface SocietyCall_cleanup_candidacy { + __kind: 'cleanup_candidacy' + candidate: AccountId32 + max: number +} + +/** + * See [`Pallet::cleanup_challenge`]. + */ +export interface SocietyCall_cleanup_challenge { + __kind: 'cleanup_challenge' + challengeRound: number + max: number +} + +/** + * See [`Pallet::defender_vote`]. + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * See [`Pallet::dissolve`]. + */ +export interface SocietyCall_dissolve { + __kind: 'dissolve' +} + +/** + * See [`Pallet::drop_candidate`]. + */ +export interface SocietyCall_drop_candidate { + __kind: 'drop_candidate' + candidate: AccountId32 +} + +/** + * See [`Pallet::found_society`]. + */ +export interface SocietyCall_found_society { + __kind: 'found_society' + founder: MultiAddress + maxMembers: number + maxIntake: number + maxStrikes: number + candidateDeposit: bigint + rules: Bytes +} + +/** + * See [`Pallet::judge_suspended_member`]. + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: MultiAddress + forgive: boolean +} + +/** + * See [`Pallet::kick_candidate`]. + */ +export interface SocietyCall_kick_candidate { + __kind: 'kick_candidate' + candidate: AccountId32 +} + +/** + * See [`Pallet::payout`]. + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * See [`Pallet::punish_skeptic`]. + */ +export interface SocietyCall_punish_skeptic { + __kind: 'punish_skeptic' +} + +/** + * See [`Pallet::resign_candidacy`]. + */ +export interface SocietyCall_resign_candidacy { + __kind: 'resign_candidacy' +} + +/** + * See [`Pallet::set_parameters`]. + */ +export interface SocietyCall_set_parameters { + __kind: 'set_parameters' + maxMembers: number + maxIntake: number + maxStrikes: number + candidateDeposit: bigint +} + +/** + * See [`Pallet::unbid`]. + */ +export interface SocietyCall_unbid { + __kind: 'unbid' +} + +/** + * See [`Pallet::unvouch`]. + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' +} + +/** + * See [`Pallet::vote`]. + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: MultiAddress + approve: boolean +} + +/** + * See [`Pallet::vouch`]. + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: MultiAddress + value: bigint + tip: bigint +} + +/** + * See [`Pallet::waive_repay`]. + */ +export interface SocietyCall_waive_repay { + __kind: 'waive_repay' + amount: bigint +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: Id, + }), + force_lease: sts.enumStruct({ + para: Id, + leaser: AccountId32, + amount: sts.bigint(), + periodBegin: sts.number(), + periodCount: sts.number(), + }), + trigger_onboard: sts.enumStruct({ + para: Id, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * See [`Pallet::clear_all_leases`]. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: Id +} + +/** + * See [`Pallet::force_lease`]. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: Id + leaser: AccountId32 + amount: bigint + periodBegin: number + periodCount: number +} + +/** + * See [`Pallet::trigger_onboard`]. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: Id +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: SessionKeys, + proof: sts.bytes(), + }), + } +}) + +export const SessionKeys: sts.Type = sts.struct(() => { + return { + grandpa: Public, + babe: sts.bytes(), + imOnline: sts.bytes(), + paraValidator: V6Public, + paraAssignment: sts.bytes(), + authorityDiscovery: sts.bytes(), + beefy: sts.bytes(), + } +}) + +export const V6Public = sts.bytes() + +export const Public = sts.bytes() + +export interface SessionKeys { + grandpa: Public + babe: Bytes + imOnline: Bytes + paraValidator: V6Public + paraAssignment: Bytes + authorityDiscovery: Bytes + beefy: Bytes +} + +export type V6Public = Bytes + +export type Public = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * See [`Pallet::purge_keys`]. + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * See [`Pallet::set_keys`]. + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: SessionKeys + proof: Bytes +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: sts.number(), + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_after: sts.enumStruct({ + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * See [`Pallet::cancel`]. + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: number + index: number +} + +/** + * See [`Pallet::cancel_named`]. + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * See [`Pallet::schedule`]. + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * See [`Pallet::schedule_after`]. + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * See [`Pallet::schedule_named`]. + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * See [`Pallet::schedule_named_after`]. + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + add_lock: sts.enumStruct({ + para: Id, + }), + deregister: sts.enumStruct({ + id: Id, + }), + force_register: sts.enumStruct({ + who: AccountId32, + deposit: sts.bigint(), + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + register: sts.enumStruct({ + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + remove_lock: sts.enumStruct({ + para: Id, + }), + reserve: sts.unit(), + schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + swap: sts.enumStruct({ + id: Id, + other: Id, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type RegistrarCall = RegistrarCall_add_lock | RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_register | RegistrarCall_remove_lock | RegistrarCall_reserve | RegistrarCall_schedule_code_upgrade | RegistrarCall_set_current_head | RegistrarCall_swap + +/** + * See [`Pallet::add_lock`]. + */ +export interface RegistrarCall_add_lock { + __kind: 'add_lock' + para: Id +} + +/** + * See [`Pallet::deregister`]. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: Id +} + +/** + * See [`Pallet::force_register`]. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId32 + deposit: bigint + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * See [`Pallet::register`]. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * See [`Pallet::remove_lock`]. + */ +export interface RegistrarCall_remove_lock { + __kind: 'remove_lock' + para: Id +} + +/** + * See [`Pallet::reserve`]. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * See [`Pallet::schedule_code_upgrade`]. + */ +export interface RegistrarCall_schedule_code_upgrade { + __kind: 'schedule_code_upgrade' + para: Id + newCode: ValidationCode +} + +/** + * See [`Pallet::set_current_head`]. + */ +export interface RegistrarCall_set_current_head { + __kind: 'set_current_head' + para: Id + newHead: HeadData +} + +/** + * See [`Pallet::swap`]. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: Id + other: Id +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ReferendaCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + index: sts.number(), + }), + kill: sts.enumStruct({ + index: sts.number(), + }), + nudge_referendum: sts.enumStruct({ + index: sts.number(), + }), + one_fewer_deciding: sts.enumStruct({ + track: sts.number(), + }), + place_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_submission_deposit: sts.enumStruct({ + index: sts.number(), + }), + set_metadata: sts.enumStruct({ + index: sts.number(), + maybeHash: sts.option(() => H256), + }), + submit: sts.enumStruct({ + proposalOrigin: OriginCaller, + proposal: Bounded, + enactmentMoment: DispatchTime, + }), + } +}) + +export const DispatchTime: sts.Type = sts.closedEnum(() => { + return { + After: sts.number(), + At: sts.number(), + } +}) + +export type DispatchTime = DispatchTime_After | DispatchTime_At + +export interface DispatchTime_After { + __kind: 'After' + value: number +} + +export interface DispatchTime_At { + __kind: 'At' + value: number +} + +export const Bounded: sts.Type = sts.closedEnum(() => { + return { + Inline: sts.bytes(), + Legacy: sts.enumStruct({ + hash: H256, + }), + Lookup: sts.enumStruct({ + hash: H256, + len: sts.number(), + }), + } +}) + +export type Bounded = Bounded_Inline | Bounded_Legacy | Bounded_Lookup + +export interface Bounded_Inline { + __kind: 'Inline' + value: Bytes +} + +export interface Bounded_Legacy { + __kind: 'Legacy' + hash: H256 +} + +export interface Bounded_Lookup { + __kind: 'Lookup' + hash: H256 + len: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ReferendaCall = ReferendaCall_cancel | ReferendaCall_kill | ReferendaCall_nudge_referendum | ReferendaCall_one_fewer_deciding | ReferendaCall_place_decision_deposit | ReferendaCall_refund_decision_deposit | ReferendaCall_refund_submission_deposit | ReferendaCall_set_metadata | ReferendaCall_submit + +/** + * See [`Pallet::cancel`]. + */ +export interface ReferendaCall_cancel { + __kind: 'cancel' + index: number +} + +/** + * See [`Pallet::kill`]. + */ +export interface ReferendaCall_kill { + __kind: 'kill' + index: number +} + +/** + * See [`Pallet::nudge_referendum`]. + */ +export interface ReferendaCall_nudge_referendum { + __kind: 'nudge_referendum' + index: number +} + +/** + * See [`Pallet::one_fewer_deciding`]. + */ +export interface ReferendaCall_one_fewer_deciding { + __kind: 'one_fewer_deciding' + track: number +} + +/** + * See [`Pallet::place_decision_deposit`]. + */ +export interface ReferendaCall_place_decision_deposit { + __kind: 'place_decision_deposit' + index: number +} + +/** + * See [`Pallet::refund_decision_deposit`]. + */ +export interface ReferendaCall_refund_decision_deposit { + __kind: 'refund_decision_deposit' + index: number +} + +/** + * See [`Pallet::refund_submission_deposit`]. + */ +export interface ReferendaCall_refund_submission_deposit { + __kind: 'refund_submission_deposit' + index: number +} + +/** + * See [`Pallet::set_metadata`]. + */ +export interface ReferendaCall_set_metadata { + __kind: 'set_metadata' + index: number + maybeHash?: (H256 | undefined) +} + +/** + * See [`Pallet::submit`]. + */ +export interface ReferendaCall_submit { + __kind: 'submit' + proposalOrigin: OriginCaller + proposal: Bounded + enactmentMoment: DispatchTime +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: MultiAddress, + call: Call, + }), + cancel_recovered: sts.enumStruct({ + account: MultiAddress, + }), + claim_recovery: sts.enumStruct({ + account: MultiAddress, + }), + close_recovery: sts.enumStruct({ + rescuer: MultiAddress, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId32), + threshold: sts.number(), + delayPeriod: sts.number(), + }), + initiate_recovery: sts.enumStruct({ + account: MultiAddress, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + vouch_recovery: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * See [`Pallet::as_recovered`]. + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: MultiAddress + call: Call +} + +/** + * See [`Pallet::cancel_recovered`]. + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: MultiAddress +} + +/** + * See [`Pallet::claim_recovery`]. + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: MultiAddress +} + +/** + * See [`Pallet::close_recovery`]. + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: MultiAddress +} + +/** + * See [`Pallet::create_recovery`]. + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId32[] + threshold: number + delayPeriod: number +} + +/** + * See [`Pallet::initiate_recovery`]. + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: MultiAddress +} + +/** + * See [`Pallet::remove_recovery`]. + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * See [`Pallet::set_recovered`]. + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * See [`Pallet::vouch_recovery`]. + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + announce: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + create_pure: sts.enumStruct({ + proxyType: ProxyType, + delay: sts.number(), + index: sts.number(), + }), + kill_pure: sts.enumStruct({ + spawner: MultiAddress, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + proxy_announced: sts.enumStruct({ + delegate: MultiAddress, + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + reject_announcement: sts.enumStruct({ + delegate: MultiAddress, + callHash: H256, + }), + remove_announcement: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_create_pure | ProxyCall_kill_pure | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * See [`Pallet::add_proxy`]. + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +/** + * See [`Pallet::announce`]. + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: MultiAddress + callHash: H256 +} + +/** + * See [`Pallet::create_pure`]. + */ +export interface ProxyCall_create_pure { + __kind: 'create_pure' + proxyType: ProxyType + delay: number + index: number +} + +/** + * See [`Pallet::kill_pure`]. + */ +export interface ProxyCall_kill_pure { + __kind: 'kill_pure' + spawner: MultiAddress + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * See [`Pallet::proxy`]. + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * See [`Pallet::proxy_announced`]. + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: MultiAddress + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * See [`Pallet::reject_announcement`]. + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: MultiAddress + callHash: H256 +} + +/** + * See [`Pallet::remove_announcement`]. + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: MultiAddress + callHash: H256 +} + +/** + * See [`Pallet::remove_proxies`]. + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * See [`Pallet::remove_proxy`]. + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NominationPools | ProxyType_NonTransfer | ProxyType_Society | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NominationPools { + __kind: 'NominationPools' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Society { + __kind: 'Society' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const PreimageCall: sts.Type = sts.closedEnum(() => { + return { + ensure_updated: sts.enumStruct({ + hashes: sts.array(() => H256), + }), + note_preimage: sts.enumStruct({ + bytes: sts.bytes(), + }), + request_preimage: sts.enumStruct({ + hash: H256, + }), + unnote_preimage: sts.enumStruct({ + hash: H256, + }), + unrequest_preimage: sts.enumStruct({ + hash: H256, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type PreimageCall = PreimageCall_ensure_updated | PreimageCall_note_preimage | PreimageCall_request_preimage | PreimageCall_unnote_preimage | PreimageCall_unrequest_preimage + +/** + * See [`Pallet::ensure_updated`]. + */ +export interface PreimageCall_ensure_updated { + __kind: 'ensure_updated' + hashes: H256[] +} + +/** + * See [`Pallet::note_preimage`]. + */ +export interface PreimageCall_note_preimage { + __kind: 'note_preimage' + bytes: Bytes +} + +/** + * See [`Pallet::request_preimage`]. + */ +export interface PreimageCall_request_preimage { + __kind: 'request_preimage' + hash: H256 +} + +/** + * See [`Pallet::unnote_preimage`]. + */ +export interface PreimageCall_unnote_preimage { + __kind: 'unnote_preimage' + hash: H256 +} + +/** + * See [`Pallet::unrequest_preimage`]. + */ +export interface PreimageCall_unrequest_preimage { + __kind: 'unrequest_preimage' + hash: H256 +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParasSlashingCall: sts.Type = sts.closedEnum(() => { + return { + report_dispute_lost_unsigned: sts.enumStruct({ + disputeProof: V6DisputeProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: sts.number(), + trieNodes: sts.array(() => sts.bytes()), + validatorCount: sts.number(), + } +}) + +export interface MembershipProof { + session: number + trieNodes: Bytes[] + validatorCount: number +} + +export const V6DisputeProof: sts.Type = sts.struct(() => { + return { + timeSlot: V6DisputesTimeSlot, + kind: V6SlashingOffenceKind, + validatorIndex: V6ValidatorIndex, + validatorId: V6Public, + } +}) + +export const V6ValidatorIndex = sts.number() + +export const V6SlashingOffenceKind: sts.Type = sts.closedEnum(() => { + return { + AgainstValid: sts.unit(), + ForInvalid: sts.unit(), + } +}) + +export type V6SlashingOffenceKind = V6SlashingOffenceKind_AgainstValid | V6SlashingOffenceKind_ForInvalid + +export interface V6SlashingOffenceKind_AgainstValid { + __kind: 'AgainstValid' +} + +export interface V6SlashingOffenceKind_ForInvalid { + __kind: 'ForInvalid' +} + +export const V6DisputesTimeSlot: sts.Type = sts.struct(() => { + return { + sessionIndex: sts.number(), + candidateHash: CandidateHash, + } +}) + +export const CandidateHash = sts.bytes() + +export interface V6DisputesTimeSlot { + sessionIndex: number + candidateHash: CandidateHash +} + +export type CandidateHash = Bytes + +export interface V6DisputeProof { + timeSlot: V6DisputesTimeSlot + kind: V6SlashingOffenceKind + validatorIndex: V6ValidatorIndex + validatorId: V6Public +} + +export type V6ValidatorIndex = number + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParasSlashingCall = ParasSlashingCall_report_dispute_lost_unsigned + +/** + * See [`Pallet::report_dispute_lost_unsigned`]. + */ +export interface ParasSlashingCall_report_dispute_lost_unsigned { + __kind: 'report_dispute_lost_unsigned' + disputeProof: V6DisputeProof + keyOwnerProof: MembershipProof +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParasSharedCall = never + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParasDisputesCall: sts.Type = sts.closedEnum(() => { + return { + force_unfreeze: sts.unit(), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParasDisputesCall = ParasDisputesCall_force_unfreeze + +/** + * See [`Pallet::force_unfreeze`]. + */ +export interface ParasDisputesCall_force_unfreeze { + __kind: 'force_unfreeze' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + add_trusted_validation_code: sts.enumStruct({ + validationCode: ValidationCode, + }), + force_note_new_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: Id, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + relayParentNumber: sts.number(), + }), + force_set_current_code: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_set_most_recent_context: sts.enumStruct({ + para: Id, + context: sts.number(), + }), + include_pvf_check_statement: sts.enumStruct({ + stmt: V6PvfCheckStatement, + signature: V6Signature, + }), + poke_unused_validation_code: sts.enumStruct({ + validationCodeHash: ValidationCodeHash, + }), + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const V6Signature = sts.bytes() + +export const V6PvfCheckStatement: sts.Type = sts.struct(() => { + return { + accept: sts.boolean(), + subject: ValidationCodeHash, + sessionIndex: sts.number(), + validatorIndex: V6ValidatorIndex, + } +}) + +export interface V6PvfCheckStatement { + accept: boolean + subject: ValidationCodeHash + sessionIndex: number + validatorIndex: V6ValidatorIndex +} + +export type ValidationCodeHash = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParasCall = ParasCall_add_trusted_validation_code | ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head | ParasCall_force_set_most_recent_context | ParasCall_include_pvf_check_statement | ParasCall_poke_unused_validation_code + +/** + * See [`Pallet::add_trusted_validation_code`]. + */ +export interface ParasCall_add_trusted_validation_code { + __kind: 'add_trusted_validation_code' + validationCode: ValidationCode +} + +/** + * See [`Pallet::force_note_new_head`]. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: Id + newHead: HeadData +} + +/** + * See [`Pallet::force_queue_action`]. + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: Id +} + +/** + * See [`Pallet::force_schedule_code_upgrade`]. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: Id + newCode: ValidationCode + relayParentNumber: number +} + +/** + * See [`Pallet::force_set_current_code`]. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: Id + newCode: ValidationCode +} + +/** + * See [`Pallet::force_set_current_head`]. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: Id + newHead: HeadData +} + +/** + * See [`Pallet::force_set_most_recent_context`]. + */ +export interface ParasCall_force_set_most_recent_context { + __kind: 'force_set_most_recent_context' + para: Id + context: number +} + +/** + * See [`Pallet::include_pvf_check_statement`]. + */ +export interface ParasCall_include_pvf_check_statement { + __kind: 'include_pvf_check_statement' + stmt: V6PvfCheckStatement + signature: V6Signature +} + +/** + * See [`Pallet::poke_unused_validation_code`]. + */ +export interface ParasCall_poke_unused_validation_code { + __kind: 'poke_unused_validation_code' + validationCodeHash: ValidationCodeHash +} + +export type V6Signature = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParaInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: V6InherentData, + }), + } +}) + +export const V6InherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => V6UncheckedSigned), + backedCandidates: sts.array(() => V6BackedCandidate), + disputes: sts.array(() => V6DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: H256, + number: sts.number(), + stateRoot: H256, + extrinsicsRoot: H256, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + Consensus: sts.tuple(() => [sts.bytes(), sts.bytes()]), + Other: sts.bytes(), + PreRuntime: sts.tuple(() => [sts.bytes(), sts.bytes()]), + RuntimeEnvironmentUpdated: sts.unit(), + Seal: sts.tuple(() => [sts.bytes(), sts.bytes()]), + } +}) + +export type DigestItem = DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: [Bytes, Bytes] +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: [Bytes, Bytes] +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: [Bytes, Bytes] +} + +export interface Digest { + logs: DigestItem[] +} + +export interface Header { + parentHash: H256 + number: number + stateRoot: H256 + extrinsicsRoot: H256 + digest: Digest +} + +export const V6DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: sts.number(), + statements: sts.array(() => sts.tuple(() => [V6DisputeStatement, V6ValidatorIndex, V6Signature])), + } +}) + +export const V6DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: V6InvalidDisputeStatementKind, + Valid: V6ValidDisputeStatementKind, + } +}) + +export const V6ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + BackingSeconded: H256, + BackingValid: H256, + Explicit: sts.unit(), + } +}) + +export type V6ValidDisputeStatementKind = V6ValidDisputeStatementKind_ApprovalChecking | V6ValidDisputeStatementKind_BackingSeconded | V6ValidDisputeStatementKind_BackingValid | V6ValidDisputeStatementKind_Explicit + +export interface V6ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface V6ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: H256 +} + +export interface V6ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: H256 +} + +export interface V6ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export const V6InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export type V6InvalidDisputeStatementKind = V6InvalidDisputeStatementKind_Explicit + +export interface V6InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type V6DisputeStatement = V6DisputeStatement_Invalid | V6DisputeStatement_Valid + +export interface V6DisputeStatement_Invalid { + __kind: 'Invalid' + value: V6InvalidDisputeStatementKind +} + +export interface V6DisputeStatement_Valid { + __kind: 'Valid' + value: V6ValidDisputeStatementKind +} + +export interface V6DisputeStatementSet { + candidateHash: CandidateHash + session: number + statements: [V6DisputeStatement, V6ValidatorIndex, V6Signature][] +} + +export const V6BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: V6CommittedCandidateReceipt, + validityVotes: sts.array(() => V6ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const V6ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: V6Signature, + Implicit: V6Signature, + } +}) + +export type V6ValidityAttestation = V6ValidityAttestation_Explicit | V6ValidityAttestation_Implicit + +export interface V6ValidityAttestation_Explicit { + __kind: 'Explicit' + value: V6Signature +} + +export interface V6ValidityAttestation_Implicit { + __kind: 'Implicit' + value: V6Signature +} + +export const V6CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: V6CandidateDescriptor, + commitments: V6CandidateCommitments, + } +}) + +export const V6CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => sts.bytes()), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: sts.number(), + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: Id, + data: sts.bytes(), + } +}) + +export interface OutboundHrmpMessage { + recipient: Id + data: Bytes +} + +export interface V6CandidateCommitments { + upwardMessages: Bytes[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: number +} + +export const V6CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: Id, + relayParent: H256, + collator: sts.bytes(), + persistedValidationDataHash: H256, + povHash: H256, + erasureRoot: H256, + signature: sts.bytes(), + paraHead: H256, + validationCodeHash: ValidationCodeHash, + } +}) + +export interface V6CandidateDescriptor { + paraId: Id + relayParent: H256 + collator: Bytes + persistedValidationDataHash: H256 + povHash: H256 + erasureRoot: H256 + signature: Bytes + paraHead: H256 + validationCodeHash: ValidationCodeHash +} + +export interface V6CommittedCandidateReceipt { + descriptor: V6CandidateDescriptor + commitments: V6CandidateCommitments +} + +export interface V6BackedCandidate { + candidate: V6CommittedCandidateReceipt + validityVotes: V6ValidityAttestation[] + validatorIndices: BitSequence +} + +export const V6UncheckedSigned: sts.Type = sts.struct(() => { + return { + payload: V6AvailabilityBitfield, + validatorIndex: V6ValidatorIndex, + signature: V6Signature, + } +}) + +export const V6AvailabilityBitfield = sts.bitseq() + +export interface V6UncheckedSigned { + payload: V6AvailabilityBitfield + validatorIndex: V6ValidatorIndex + signature: V6Signature +} + +export type V6AvailabilityBitfield = BitSequence + +export interface V6InherentData { + bitfields: V6UncheckedSigned[] + backedCandidates: V6BackedCandidate[] + disputes: V6DisputeStatementSet[] + parentHeader: Header +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParaInherentCall = ParaInherentCall_enter + +/** + * See [`Pallet::enter`]. + */ +export interface ParaInherentCall_enter { + __kind: 'enter' + data: V6InherentData +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParaInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParaInclusionCall = never + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const NominationPoolsCall: sts.Type = sts.closedEnum(() => { + return { + adjust_pool_deposit: sts.enumStruct({ + poolId: sts.number(), + }), + bond_extra: sts.enumStruct({ + extra: BondExtra, + }), + bond_extra_other: sts.enumStruct({ + member: MultiAddress, + extra: BondExtra, + }), + chill: sts.enumStruct({ + poolId: sts.number(), + }), + claim_commission: sts.enumStruct({ + poolId: sts.number(), + }), + claim_payout: sts.unit(), + claim_payout_other: sts.enumStruct({ + other: AccountId32, + }), + create: sts.enumStruct({ + amount: sts.bigint(), + root: MultiAddress, + nominator: MultiAddress, + bouncer: MultiAddress, + }), + create_with_pool_id: sts.enumStruct({ + amount: sts.bigint(), + root: MultiAddress, + nominator: MultiAddress, + bouncer: MultiAddress, + poolId: sts.number(), + }), + join: sts.enumStruct({ + amount: sts.bigint(), + poolId: sts.number(), + }), + nominate: sts.enumStruct({ + poolId: sts.number(), + validators: sts.array(() => AccountId32), + }), + pool_withdraw_unbonded: sts.enumStruct({ + poolId: sts.number(), + numSlashingSpans: sts.number(), + }), + set_claim_permission: sts.enumStruct({ + permission: ClaimPermission, + }), + set_commission: sts.enumStruct({ + poolId: sts.number(), + newCommission: sts.option(() => sts.tuple(() => [Perbill, AccountId32])), + }), + set_commission_change_rate: sts.enumStruct({ + poolId: sts.number(), + changeRate: CommissionChangeRate, + }), + set_commission_max: sts.enumStruct({ + poolId: sts.number(), + maxCommission: Perbill, + }), + set_configs: sts.enumStruct({ + minJoinBond: Type_326, + minCreateBond: Type_326, + maxPools: Type_327, + maxMembers: Type_327, + maxMembersPerPool: Type_327, + globalMaxCommission: Type_328, + }), + set_metadata: sts.enumStruct({ + poolId: sts.number(), + metadata: sts.bytes(), + }), + set_state: sts.enumStruct({ + poolId: sts.number(), + state: PoolState, + }), + unbond: sts.enumStruct({ + memberAccount: MultiAddress, + unbondingPoints: sts.bigint(), + }), + update_roles: sts.enumStruct({ + poolId: sts.number(), + newRoot: Type_329, + newNominator: Type_329, + newBouncer: Type_329, + }), + withdraw_unbonded: sts.enumStruct({ + memberAccount: MultiAddress, + numSlashingSpans: sts.number(), + }), + } +}) + +export const Type_329: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: AccountId32, + } +}) + +export type Type_329 = Type_329_Noop | Type_329_Remove | Type_329_Set + +export interface Type_329_Noop { + __kind: 'Noop' +} + +export interface Type_329_Remove { + __kind: 'Remove' +} + +export interface Type_329_Set { + __kind: 'Set' + value: AccountId32 +} + +export const PoolState: sts.Type = sts.closedEnum(() => { + return { + Blocked: sts.unit(), + Destroying: sts.unit(), + Open: sts.unit(), + } +}) + +export type PoolState = PoolState_Blocked | PoolState_Destroying | PoolState_Open + +export interface PoolState_Blocked { + __kind: 'Blocked' +} + +export interface PoolState_Destroying { + __kind: 'Destroying' +} + +export interface PoolState_Open { + __kind: 'Open' +} + +export const Type_328: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export type Type_328 = Type_328_Noop | Type_328_Remove | Type_328_Set + +export interface Type_328_Noop { + __kind: 'Noop' +} + +export interface Type_328_Remove { + __kind: 'Remove' +} + +export interface Type_328_Set { + __kind: 'Set' + value: Perbill +} + +export const Type_327: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_327 = Type_327_Noop | Type_327_Remove | Type_327_Set + +export interface Type_327_Noop { + __kind: 'Noop' +} + +export interface Type_327_Remove { + __kind: 'Remove' +} + +export interface Type_327_Set { + __kind: 'Set' + value: number +} + +export const Type_326: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type Type_326 = Type_326_Noop | Type_326_Remove | Type_326_Set + +export interface Type_326_Noop { + __kind: 'Noop' +} + +export interface Type_326_Remove { + __kind: 'Remove' +} + +export interface Type_326_Set { + __kind: 'Set' + value: bigint +} + +export const CommissionChangeRate: sts.Type = sts.struct(() => { + return { + maxIncrease: Perbill, + minDelay: sts.number(), + } +}) + +export interface CommissionChangeRate { + maxIncrease: Perbill + minDelay: number +} + +export const ClaimPermission: sts.Type = sts.closedEnum(() => { + return { + Permissioned: sts.unit(), + PermissionlessAll: sts.unit(), + PermissionlessCompound: sts.unit(), + PermissionlessWithdraw: sts.unit(), + } +}) + +export type ClaimPermission = ClaimPermission_Permissioned | ClaimPermission_PermissionlessAll | ClaimPermission_PermissionlessCompound | ClaimPermission_PermissionlessWithdraw + +export interface ClaimPermission_Permissioned { + __kind: 'Permissioned' +} + +export interface ClaimPermission_PermissionlessAll { + __kind: 'PermissionlessAll' +} + +export interface ClaimPermission_PermissionlessCompound { + __kind: 'PermissionlessCompound' +} + +export interface ClaimPermission_PermissionlessWithdraw { + __kind: 'PermissionlessWithdraw' +} + +export const BondExtra: sts.Type = sts.closedEnum(() => { + return { + FreeBalance: sts.bigint(), + Rewards: sts.unit(), + } +}) + +export type BondExtra = BondExtra_FreeBalance | BondExtra_Rewards + +export interface BondExtra_FreeBalance { + __kind: 'FreeBalance' + value: bigint +} + +export interface BondExtra_Rewards { + __kind: 'Rewards' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type NominationPoolsCall = NominationPoolsCall_adjust_pool_deposit | NominationPoolsCall_bond_extra | NominationPoolsCall_bond_extra_other | NominationPoolsCall_chill | NominationPoolsCall_claim_commission | NominationPoolsCall_claim_payout | NominationPoolsCall_claim_payout_other | NominationPoolsCall_create | NominationPoolsCall_create_with_pool_id | NominationPoolsCall_join | NominationPoolsCall_nominate | NominationPoolsCall_pool_withdraw_unbonded | NominationPoolsCall_set_claim_permission | NominationPoolsCall_set_commission | NominationPoolsCall_set_commission_change_rate | NominationPoolsCall_set_commission_max | NominationPoolsCall_set_configs | NominationPoolsCall_set_metadata | NominationPoolsCall_set_state | NominationPoolsCall_unbond | NominationPoolsCall_update_roles | NominationPoolsCall_withdraw_unbonded + +/** + * See [`Pallet::adjust_pool_deposit`]. + */ +export interface NominationPoolsCall_adjust_pool_deposit { + __kind: 'adjust_pool_deposit' + poolId: number +} + +/** + * See [`Pallet::bond_extra`]. + */ +export interface NominationPoolsCall_bond_extra { + __kind: 'bond_extra' + extra: BondExtra +} + +/** + * See [`Pallet::bond_extra_other`]. + */ +export interface NominationPoolsCall_bond_extra_other { + __kind: 'bond_extra_other' + member: MultiAddress + extra: BondExtra +} + +/** + * See [`Pallet::chill`]. + */ +export interface NominationPoolsCall_chill { + __kind: 'chill' + poolId: number +} + +/** + * See [`Pallet::claim_commission`]. + */ +export interface NominationPoolsCall_claim_commission { + __kind: 'claim_commission' + poolId: number +} + +/** + * See [`Pallet::claim_payout`]. + */ +export interface NominationPoolsCall_claim_payout { + __kind: 'claim_payout' +} + +/** + * See [`Pallet::claim_payout_other`]. + */ +export interface NominationPoolsCall_claim_payout_other { + __kind: 'claim_payout_other' + other: AccountId32 +} + +/** + * See [`Pallet::create`]. + */ +export interface NominationPoolsCall_create { + __kind: 'create' + amount: bigint + root: MultiAddress + nominator: MultiAddress + bouncer: MultiAddress +} + +/** + * See [`Pallet::create_with_pool_id`]. + */ +export interface NominationPoolsCall_create_with_pool_id { + __kind: 'create_with_pool_id' + amount: bigint + root: MultiAddress + nominator: MultiAddress + bouncer: MultiAddress + poolId: number +} + +/** + * See [`Pallet::join`]. + */ +export interface NominationPoolsCall_join { + __kind: 'join' + amount: bigint + poolId: number +} + +/** + * See [`Pallet::nominate`]. + */ +export interface NominationPoolsCall_nominate { + __kind: 'nominate' + poolId: number + validators: AccountId32[] +} + +/** + * See [`Pallet::pool_withdraw_unbonded`]. + */ +export interface NominationPoolsCall_pool_withdraw_unbonded { + __kind: 'pool_withdraw_unbonded' + poolId: number + numSlashingSpans: number +} + +/** + * See [`Pallet::set_claim_permission`]. + */ +export interface NominationPoolsCall_set_claim_permission { + __kind: 'set_claim_permission' + permission: ClaimPermission +} + +/** + * See [`Pallet::set_commission`]. + */ +export interface NominationPoolsCall_set_commission { + __kind: 'set_commission' + poolId: number + newCommission?: ([Perbill, AccountId32] | undefined) +} + +/** + * See [`Pallet::set_commission_change_rate`]. + */ +export interface NominationPoolsCall_set_commission_change_rate { + __kind: 'set_commission_change_rate' + poolId: number + changeRate: CommissionChangeRate +} + +/** + * See [`Pallet::set_commission_max`]. + */ +export interface NominationPoolsCall_set_commission_max { + __kind: 'set_commission_max' + poolId: number + maxCommission: Perbill +} + +/** + * See [`Pallet::set_configs`]. + */ +export interface NominationPoolsCall_set_configs { + __kind: 'set_configs' + minJoinBond: Type_326 + minCreateBond: Type_326 + maxPools: Type_327 + maxMembers: Type_327 + maxMembersPerPool: Type_327 + globalMaxCommission: Type_328 +} + +/** + * See [`Pallet::set_metadata`]. + */ +export interface NominationPoolsCall_set_metadata { + __kind: 'set_metadata' + poolId: number + metadata: Bytes +} + +/** + * See [`Pallet::set_state`]. + */ +export interface NominationPoolsCall_set_state { + __kind: 'set_state' + poolId: number + state: PoolState +} + +/** + * See [`Pallet::unbond`]. + */ +export interface NominationPoolsCall_unbond { + __kind: 'unbond' + memberAccount: MultiAddress + unbondingPoints: bigint +} + +/** + * See [`Pallet::update_roles`]. + */ +export interface NominationPoolsCall_update_roles { + __kind: 'update_roles' + poolId: number + newRoot: Type_329 + newNominator: Type_329 + newBouncer: Type_329 +} + +/** + * See [`Pallet::withdraw_unbonded`]. + */ +export interface NominationPoolsCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + memberAccount: MultiAddress + numSlashingSpans: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const NisCounterpartBalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + }), + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_allow_death: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + upgrade_accounts: sts.enumStruct({ + who: sts.array(() => AccountId32), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type NisCounterpartBalancesCall = NisCounterpartBalancesCall_force_set_balance | NisCounterpartBalancesCall_force_transfer | NisCounterpartBalancesCall_force_unreserve | NisCounterpartBalancesCall_transfer_all | NisCounterpartBalancesCall_transfer_allow_death | NisCounterpartBalancesCall_transfer_keep_alive | NisCounterpartBalancesCall_upgrade_accounts + +/** + * See [`Pallet::force_set_balance`]. + */ +export interface NisCounterpartBalancesCall_force_set_balance { + __kind: 'force_set_balance' + who: MultiAddress + newFree: bigint +} + +/** + * See [`Pallet::force_transfer`]. + */ +export interface NisCounterpartBalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::force_unreserve`]. + */ +export interface NisCounterpartBalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * See [`Pallet::transfer_all`]. + */ +export interface NisCounterpartBalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * See [`Pallet::transfer_allow_death`]. + */ +export interface NisCounterpartBalancesCall_transfer_allow_death { + __kind: 'transfer_allow_death' + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::transfer_keep_alive`]. + */ +export interface NisCounterpartBalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::upgrade_accounts`]. + */ +export interface NisCounterpartBalancesCall_upgrade_accounts { + __kind: 'upgrade_accounts' + who: AccountId32[] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const NisCall: sts.Type = sts.closedEnum(() => { + return { + communify: sts.enumStruct({ + index: sts.number(), + }), + fund_deficit: sts.unit(), + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + privatize: sts.enumStruct({ + index: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + thaw_communal: sts.enumStruct({ + index: sts.number(), + }), + thaw_private: sts.enumStruct({ + index: sts.number(), + maybeProportion: sts.option(() => Perquintill), + }), + } +}) + +export const Perquintill = sts.bigint() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type NisCall = NisCall_communify | NisCall_fund_deficit | NisCall_place_bid | NisCall_privatize | NisCall_retract_bid | NisCall_thaw_communal | NisCall_thaw_private + +/** + * See [`Pallet::communify`]. + */ +export interface NisCall_communify { + __kind: 'communify' + index: number +} + +/** + * See [`Pallet::fund_deficit`]. + */ +export interface NisCall_fund_deficit { + __kind: 'fund_deficit' +} + +/** + * See [`Pallet::place_bid`]. + */ +export interface NisCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * See [`Pallet::privatize`]. + */ +export interface NisCall_privatize { + __kind: 'privatize' + index: number +} + +/** + * See [`Pallet::retract_bid`]. + */ +export interface NisCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * See [`Pallet::thaw_communal`]. + */ +export interface NisCall_thaw_communal { + __kind: 'thaw_communal' + index: number +} + +/** + * See [`Pallet::thaw_private`]. + */ +export interface NisCall_thaw_private { + __kind: 'thaw_private' + index: number + maybeProportion?: (Perquintill | undefined) +} + +export type Perquintill = bigint + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + call: Call, + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId32), + call: Call, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * See [`Pallet::approve_as_multi`]. + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * See [`Pallet::as_multi`]. + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + call: Call + maxWeight: Weight +} + +/** + * See [`Pallet::as_multi_threshold_1`]. + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId32[] + call: Call +} + +/** + * See [`Pallet::cancel_as_multi`]. + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId32[] + timepoint: Timepoint + callHash: Bytes +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const MessageQueueCall: sts.Type = sts.closedEnum(() => { + return { + execute_overweight: sts.enumStruct({ + messageOrigin: AggregateMessageOrigin, + page: sts.number(), + index: sts.number(), + weightLimit: Weight, + }), + reap_page: sts.enumStruct({ + messageOrigin: AggregateMessageOrigin, + pageIndex: sts.number(), + }), + } +}) + +export const AggregateMessageOrigin: sts.Type = sts.closedEnum(() => { + return { + Ump: UmpQueueId, + } +}) + +export const UmpQueueId: sts.Type = sts.closedEnum(() => { + return { + Para: Id, + } +}) + +export type UmpQueueId = UmpQueueId_Para + +export interface UmpQueueId_Para { + __kind: 'Para' + value: Id +} + +export type AggregateMessageOrigin = AggregateMessageOrigin_Ump + +export interface AggregateMessageOrigin_Ump { + __kind: 'Ump' + value: UmpQueueId +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type MessageQueueCall = MessageQueueCall_execute_overweight | MessageQueueCall_reap_page + +/** + * See [`Pallet::execute_overweight`]. + */ +export interface MessageQueueCall_execute_overweight { + __kind: 'execute_overweight' + messageOrigin: AggregateMessageOrigin + page: number + index: number + weightLimit: Weight +} + +/** + * See [`Pallet::reap_page`]. + */ +export interface MessageQueueCall_reap_page { + __kind: 'reap_page' + messageOrigin: AggregateMessageOrigin + pageIndex: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const InitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type InitializerCall = InitializerCall_force_approve + +/** + * See [`Pallet::force_approve`]. + */ +export interface InitializerCall_force_approve { + __kind: 'force_approve' + upTo: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: sts.number(), + }), + force_transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: sts.number(), + }), + freeze: sts.enumStruct({ + index: sts.number(), + }), + transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * See [`Pallet::claim`]. + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: number +} + +/** + * See [`Pallet::force_transfer`]. + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: MultiAddress + index: number + freeze: boolean +} + +/** + * See [`Pallet::free`]. + */ +export interface IndicesCall_free { + __kind: 'free' + index: number +} + +/** + * See [`Pallet::freeze`]. + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: number +} + +/** + * See [`Pallet::transfer`]. + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: MultiAddress + index: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: sts.bytes(), + }), + } +}) + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: sts.number(), + sessionIndex: sts.number(), + authorityIndex: sts.number(), + validatorsLen: sts.number(), + } +}) + +export interface Heartbeat { + blockNumber: number + sessionIndex: number + authorityIndex: number + validatorsLen: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * See [`Pallet::heartbeat`]. + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Bytes +} + +/** + * Identity pallet declaration. + */ +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: MultiAddress, + }), + add_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: sts.number(), + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: MultiAddress, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: MultiAddress, + judgement: Judgement, + identity: H256, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: MultiAddress, + }), + rename_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: MultiAddress, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: BitFlags, + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId32, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => sts.tuple(() => [Data, Data])), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => sts.bytes()), + image: Data, + twitter: Data, + } +}) + +export interface IdentityInfo { + additional: [Data, Data][] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (Bytes | undefined) + image: Data + twitter: Data +} + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: Bytes +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: Bytes +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: Bytes +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: Bytes +} + +export const BitFlags = sts.bigint() + +export const Judgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: sts.bigint(), + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export type Judgement = Judgement_Erroneous | Judgement_FeePaid | Judgement_KnownGood | Judgement_LowQuality | Judgement_OutOfDate | Judgement_Reasonable | Judgement_Unknown + +export interface Judgement_Erroneous { + __kind: 'Erroneous' +} + +export interface Judgement_FeePaid { + __kind: 'FeePaid' + value: bigint +} + +export interface Judgement_KnownGood { + __kind: 'KnownGood' +} + +export interface Judgement_LowQuality { + __kind: 'LowQuality' +} + +export interface Judgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface Judgement_Reasonable { + __kind: 'Reasonable' +} + +export interface Judgement_Unknown { + __kind: 'Unknown' +} + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: sts.bytes(), + Keccak256: sts.bytes(), + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: sts.bytes(), + ShaThree256: sts.bytes(), + } +}) + +/** + * Identity pallet declaration. + */ +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * See [`Pallet::add_registrar`]. + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: MultiAddress +} + +/** + * See [`Pallet::add_sub`]. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: MultiAddress + data: Data +} + +/** + * See [`Pallet::cancel_request`]. + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: number +} + +/** + * See [`Pallet::clear_identity`]. + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * See [`Pallet::kill_identity`]. + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: MultiAddress +} + +/** + * See [`Pallet::provide_judgement`]. + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: MultiAddress + judgement: Judgement + identity: H256 +} + +/** + * See [`Pallet::quit_sub`]. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * See [`Pallet::remove_sub`]. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: MultiAddress +} + +/** + * See [`Pallet::rename_sub`]. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: MultiAddress + data: Data +} + +/** + * See [`Pallet::request_judgement`]. + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * See [`Pallet::set_account_id`]. + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: MultiAddress +} + +/** + * See [`Pallet::set_fee`]. + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * See [`Pallet::set_fields`]. + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: BitFlags +} + +/** + * See [`Pallet::set_identity`]. + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * See [`Pallet::set_subs`]. + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId32, Data][] +} + +export type BitFlags = bigint + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const HrmpCall: sts.Type = sts.closedEnum(() => { + return { + establish_system_channel: sts.enumStruct({ + sender: Id, + recipient: Id, + }), + force_clean_hrmp: sts.enumStruct({ + para: Id, + numInbound: sts.number(), + numOutbound: sts.number(), + }), + force_open_hrmp_channel: sts.enumStruct({ + sender: Id, + recipient: Id, + maxCapacity: sts.number(), + maxMessageSize: sts.number(), + }), + force_process_hrmp_close: sts.enumStruct({ + channels: sts.number(), + }), + force_process_hrmp_open: sts.enumStruct({ + channels: sts.number(), + }), + hrmp_accept_open_channel: sts.enumStruct({ + sender: Id, + }), + hrmp_cancel_open_request: sts.enumStruct({ + channelId: HrmpChannelId, + openRequests: sts.number(), + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: Id, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + poke_channel_deposits: sts.enumStruct({ + sender: Id, + recipient: Id, + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: Id, + recipient: Id, + } +}) + +export interface HrmpChannelId { + sender: Id + recipient: Id +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type HrmpCall = HrmpCall_establish_system_channel | HrmpCall_force_clean_hrmp | HrmpCall_force_open_hrmp_channel | HrmpCall_force_process_hrmp_close | HrmpCall_force_process_hrmp_open | HrmpCall_hrmp_accept_open_channel | HrmpCall_hrmp_cancel_open_request | HrmpCall_hrmp_close_channel | HrmpCall_hrmp_init_open_channel | HrmpCall_poke_channel_deposits + +/** + * See [`Pallet::establish_system_channel`]. + */ +export interface HrmpCall_establish_system_channel { + __kind: 'establish_system_channel' + sender: Id + recipient: Id +} + +/** + * See [`Pallet::force_clean_hrmp`]. + */ +export interface HrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: Id + numInbound: number + numOutbound: number +} + +/** + * See [`Pallet::force_open_hrmp_channel`]. + */ +export interface HrmpCall_force_open_hrmp_channel { + __kind: 'force_open_hrmp_channel' + sender: Id + recipient: Id + maxCapacity: number + maxMessageSize: number +} + +/** + * See [`Pallet::force_process_hrmp_close`]. + */ +export interface HrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' + channels: number +} + +/** + * See [`Pallet::force_process_hrmp_open`]. + */ +export interface HrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' + channels: number +} + +/** + * See [`Pallet::hrmp_accept_open_channel`]. + */ +export interface HrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: Id +} + +/** + * See [`Pallet::hrmp_cancel_open_request`]. + */ +export interface HrmpCall_hrmp_cancel_open_request { + __kind: 'hrmp_cancel_open_request' + channelId: HrmpChannelId + openRequests: number +} + +/** + * See [`Pallet::hrmp_close_channel`]. + */ +export interface HrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * See [`Pallet::hrmp_init_open_channel`]. + */ +export interface HrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: Id + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +/** + * See [`Pallet::poke_channel_deposits`]. + */ +export interface HrmpCall_poke_channel_deposits { + __kind: 'poke_channel_deposits' + sender: Id + recipient: Id +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: sts.number(), + bestFinalizedBlockNumber: sts.number(), + }), + report_equivocation: sts.enumStruct({ + equivocationProof: Type_131, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_131, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const Type_131: sts.Type = sts.struct(() => { + return { + setId: sts.bigint(), + equivocation: Equivocation, + } +}) + +export const Equivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: Type_139, + Prevote: Type_133, + } +}) + +export const Type_133: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Prevote, sts.bytes()]), + second: sts.tuple(() => [Prevote, sts.bytes()]), + } +}) + +export const Prevote: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Prevote { + targetHash: H256 + targetNumber: number +} + +export interface Type_133 { + roundNumber: bigint + identity: Public + first: [Prevote, Bytes] + second: [Prevote, Bytes] +} + +export const Type_139: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Precommit, sts.bytes()]), + second: sts.tuple(() => [Precommit, sts.bytes()]), + } +}) + +export const Precommit: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Precommit { + targetHash: H256 + targetNumber: number +} + +export interface Type_139 { + roundNumber: bigint + identity: Public + first: [Precommit, Bytes] + second: [Precommit, Bytes] +} + +export type Equivocation = Equivocation_Precommit | Equivocation_Prevote + +export interface Equivocation_Precommit { + __kind: 'Precommit' + value: Type_139 +} + +export interface Equivocation_Prevote { + __kind: 'Prevote' + value: Type_133 +} + +export interface Type_131 { + setId: bigint + equivocation: Equivocation +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * See [`Pallet::note_stalled`]. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: number + bestFinalizedBlockNumber: number +} + +/** + * See [`Pallet::report_equivocation`]. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_131 + keyOwnerProof: MembershipProof +} + +/** + * See [`Pallet::report_equivocation_unsigned`]. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_131 + keyOwnerProof: MembershipProof +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const FellowshipReferendaCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + index: sts.number(), + }), + kill: sts.enumStruct({ + index: sts.number(), + }), + nudge_referendum: sts.enumStruct({ + index: sts.number(), + }), + one_fewer_deciding: sts.enumStruct({ + track: sts.number(), + }), + place_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_submission_deposit: sts.enumStruct({ + index: sts.number(), + }), + set_metadata: sts.enumStruct({ + index: sts.number(), + maybeHash: sts.option(() => H256), + }), + submit: sts.enumStruct({ + proposalOrigin: OriginCaller, + proposal: Bounded, + enactmentMoment: DispatchTime, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type FellowshipReferendaCall = FellowshipReferendaCall_cancel | FellowshipReferendaCall_kill | FellowshipReferendaCall_nudge_referendum | FellowshipReferendaCall_one_fewer_deciding | FellowshipReferendaCall_place_decision_deposit | FellowshipReferendaCall_refund_decision_deposit | FellowshipReferendaCall_refund_submission_deposit | FellowshipReferendaCall_set_metadata | FellowshipReferendaCall_submit + +/** + * See [`Pallet::cancel`]. + */ +export interface FellowshipReferendaCall_cancel { + __kind: 'cancel' + index: number +} + +/** + * See [`Pallet::kill`]. + */ +export interface FellowshipReferendaCall_kill { + __kind: 'kill' + index: number +} + +/** + * See [`Pallet::nudge_referendum`]. + */ +export interface FellowshipReferendaCall_nudge_referendum { + __kind: 'nudge_referendum' + index: number +} + +/** + * See [`Pallet::one_fewer_deciding`]. + */ +export interface FellowshipReferendaCall_one_fewer_deciding { + __kind: 'one_fewer_deciding' + track: number +} + +/** + * See [`Pallet::place_decision_deposit`]. + */ +export interface FellowshipReferendaCall_place_decision_deposit { + __kind: 'place_decision_deposit' + index: number +} + +/** + * See [`Pallet::refund_decision_deposit`]. + */ +export interface FellowshipReferendaCall_refund_decision_deposit { + __kind: 'refund_decision_deposit' + index: number +} + +/** + * See [`Pallet::refund_submission_deposit`]. + */ +export interface FellowshipReferendaCall_refund_submission_deposit { + __kind: 'refund_submission_deposit' + index: number +} + +/** + * See [`Pallet::set_metadata`]. + */ +export interface FellowshipReferendaCall_set_metadata { + __kind: 'set_metadata' + index: number + maybeHash?: (H256 | undefined) +} + +/** + * See [`Pallet::submit`]. + */ +export interface FellowshipReferendaCall_submit { + __kind: 'submit' + proposalOrigin: OriginCaller + proposal: Bounded + enactmentMoment: DispatchTime +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const FellowshipCollectiveCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: MultiAddress, + }), + cleanup_poll: sts.enumStruct({ + pollIndex: sts.number(), + max: sts.number(), + }), + demote_member: sts.enumStruct({ + who: MultiAddress, + }), + promote_member: sts.enumStruct({ + who: MultiAddress, + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + minRank: sts.number(), + }), + vote: sts.enumStruct({ + poll: sts.number(), + aye: sts.boolean(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type FellowshipCollectiveCall = FellowshipCollectiveCall_add_member | FellowshipCollectiveCall_cleanup_poll | FellowshipCollectiveCall_demote_member | FellowshipCollectiveCall_promote_member | FellowshipCollectiveCall_remove_member | FellowshipCollectiveCall_vote + +/** + * See [`Pallet::add_member`]. + */ +export interface FellowshipCollectiveCall_add_member { + __kind: 'add_member' + who: MultiAddress +} + +/** + * See [`Pallet::cleanup_poll`]. + */ +export interface FellowshipCollectiveCall_cleanup_poll { + __kind: 'cleanup_poll' + pollIndex: number + max: number +} + +/** + * See [`Pallet::demote_member`]. + */ +export interface FellowshipCollectiveCall_demote_member { + __kind: 'demote_member' + who: MultiAddress +} + +/** + * See [`Pallet::promote_member`]. + */ +export interface FellowshipCollectiveCall_promote_member { + __kind: 'promote_member' + who: MultiAddress +} + +/** + * See [`Pallet::remove_member`]. + */ +export interface FellowshipCollectiveCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + minRank: number +} + +/** + * See [`Pallet::vote`]. + */ +export interface FellowshipCollectiveCall_vote { + __kind: 'vote' + poll: number + aye: boolean +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const FastUnstakeCall: sts.Type = sts.closedEnum(() => { + return { + control: sts.enumStruct({ + erasToCheck: sts.number(), + }), + deregister: sts.unit(), + register_fast_unstake: sts.unit(), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type FastUnstakeCall = FastUnstakeCall_control | FastUnstakeCall_deregister | FastUnstakeCall_register_fast_unstake + +/** + * See [`Pallet::control`]. + */ +export interface FastUnstakeCall_control { + __kind: 'control' + erasToCheck: number +} + +/** + * See [`Pallet::deregister`]. + */ +export interface FastUnstakeCall_deregister { + __kind: 'deregister' +} + +/** + * See [`Pallet::register_fast_unstake`]. + */ +export interface FastUnstakeCall_register_fast_unstake { + __kind: 'register_fast_unstake' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + governance_fallback: sts.enumStruct({ + maybeMaxVoters: sts.option(() => sts.number()), + maybeMaxTargets: sts.option(() => sts.number()), + }), + set_emergency_election_result: sts.enumStruct({ + supports: sts.array(() => sts.tuple(() => [AccountId32, Support])), + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => ElectionScore), + }), + submit: sts.enumStruct({ + rawSolution: RawSolution, + }), + submit_unsigned: sts.enumStruct({ + rawSolution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export const RawSolution: sts.Type = sts.struct(() => { + return { + solution: NposCompactSolution24, + score: ElectionScore, + round: sts.number(), + } +}) + +export const NposCompactSolution24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), + votes2: sts.array(() => sts.tuple(() => [sts.number(), sts.tuple(() => [sts.number(), sts.number()]), sts.number()])), + votes3: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes4: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes5: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes6: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes7: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes8: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes9: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes10: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes11: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes12: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes13: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes14: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes15: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes16: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes17: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes18: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes19: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes20: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes21: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes22: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes23: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes24: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + } +}) + +export interface NposCompactSolution24 { + votes1: [number, number][] + votes2: [number, [number, number], number][] + votes3: [number, [number, number][], number][] + votes4: [number, [number, number][], number][] + votes5: [number, [number, number][], number][] + votes6: [number, [number, number][], number][] + votes7: [number, [number, number][], number][] + votes8: [number, [number, number][], number][] + votes9: [number, [number, number][], number][] + votes10: [number, [number, number][], number][] + votes11: [number, [number, number][], number][] + votes12: [number, [number, number][], number][] + votes13: [number, [number, number][], number][] + votes14: [number, [number, number][], number][] + votes15: [number, [number, number][], number][] + votes16: [number, [number, number][], number][] + votes17: [number, [number, number][], number][] + votes18: [number, [number, number][], number][] + votes19: [number, [number, number][], number][] + votes20: [number, [number, number][], number][] + votes21: [number, [number, number][], number][] + votes22: [number, [number, number][], number][] + votes23: [number, [number, number][], number][] + votes24: [number, [number, number][], number][] +} + +export interface RawSolution { + solution: NposCompactSolution24 + score: ElectionScore + round: number +} + +export interface ElectionScore { + minimalStake: bigint + sumStake: bigint + sumStakeSquared: bigint +} + +export const ElectionScore: sts.Type = sts.struct(() => { + return { + minimalStake: sts.bigint(), + sumStake: sts.bigint(), + sumStakeSquared: sts.bigint(), + } +}) + +export const Support: sts.Type = sts.struct(() => { + return { + total: sts.bigint(), + voters: sts.array(() => sts.tuple(() => [AccountId32, sts.bigint()])), + } +}) + +export interface Support { + total: bigint + voters: [AccountId32, bigint][] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_governance_fallback | ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * See [`Pallet::governance_fallback`]. + */ +export interface ElectionProviderMultiPhaseCall_governance_fallback { + __kind: 'governance_fallback' + maybeMaxVoters?: (number | undefined) + maybeMaxTargets?: (number | undefined) +} + +/** + * See [`Pallet::set_emergency_election_result`]. + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + supports: [AccountId32, Support][] +} + +/** + * See [`Pallet::set_minimum_untrusted_score`]. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (ElectionScore | undefined) +} + +/** + * See [`Pallet::submit`]. + */ +export interface ElectionProviderMultiPhaseCall_submit { + __kind: 'submit' + rawSolution: RawSolution +} + +/** + * See [`Pallet::submit_unsigned`]. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + rawSolution: RawSolution + witness: SolutionOrSnapshotSize +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: Id, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + contribute_all: sts.enumStruct({ + index: sts.number(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: Id, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId32, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_contribute_all | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * See [`Pallet::add_memo`]. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: Id + memo: Bytes +} + +/** + * See [`Pallet::contribute`]. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * See [`Pallet::contribute_all`]. + */ +export interface CrowdloanCall_contribute_all { + __kind: 'contribute_all' + index: number + signature?: (MultiSignature | undefined) +} + +/** + * See [`Pallet::create`]. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * See [`Pallet::dissolve`]. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * See [`Pallet::edit`]. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * See [`Pallet::poke`]. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: Id +} + +/** + * See [`Pallet::refund`]. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * See [`Pallet::withdraw`]. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId32 + index: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ConvictionVotingCall: sts.Type = sts.closedEnum(() => { + return { + delegate: sts.enumStruct({ + class: sts.number(), + to: MultiAddress, + conviction: Conviction, + balance: sts.bigint(), + }), + remove_other_vote: sts.enumStruct({ + target: MultiAddress, + class: sts.number(), + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + class: sts.option(() => sts.number()), + index: sts.number(), + }), + undelegate: sts.enumStruct({ + class: sts.number(), + }), + unlock: sts.enumStruct({ + class: sts.number(), + target: MultiAddress, + }), + vote: sts.enumStruct({ + pollIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + SplitAbstain: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + abstain: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type AccountVote = AccountVote_Split | AccountVote_SplitAbstain | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface AccountVote_SplitAbstain { + __kind: 'SplitAbstain' + aye: bigint + nay: bigint + abstain: bigint +} + +export interface AccountVote_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ConvictionVotingCall = ConvictionVotingCall_delegate | ConvictionVotingCall_remove_other_vote | ConvictionVotingCall_remove_vote | ConvictionVotingCall_undelegate | ConvictionVotingCall_unlock | ConvictionVotingCall_vote + +/** + * See [`Pallet::delegate`]. + */ +export interface ConvictionVotingCall_delegate { + __kind: 'delegate' + class: number + to: MultiAddress + conviction: Conviction + balance: bigint +} + +/** + * See [`Pallet::remove_other_vote`]. + */ +export interface ConvictionVotingCall_remove_other_vote { + __kind: 'remove_other_vote' + target: MultiAddress + class: number + index: number +} + +/** + * See [`Pallet::remove_vote`]. + */ +export interface ConvictionVotingCall_remove_vote { + __kind: 'remove_vote' + class?: (number | undefined) + index: number +} + +/** + * See [`Pallet::undelegate`]. + */ +export interface ConvictionVotingCall_undelegate { + __kind: 'undelegate' + class: number +} + +/** + * See [`Pallet::unlock`]. + */ +export interface ConvictionVotingCall_unlock { + __kind: 'unlock' + class: number + target: MultiAddress +} + +/** + * See [`Pallet::vote`]. + */ +export interface ConvictionVotingCall_vote { + __kind: 'vote' + pollIndex: number + vote: AccountVote +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_async_backing_params: sts.enumStruct({ + new: V6AsyncBackingParams, + }), + set_bypass_consistency_check: sts.enumStruct({ + new: sts.boolean(), + }), + set_code_retention_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: sts.number(), + }), + set_executor_params: sts.enumStruct({ + new: sts.array(() => V6ExecutorParam), + }), + set_group_rotation_frequency: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_minimum_backing_votes: sts.enumStruct({ + new: sts.number(), + }), + set_minimum_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_on_demand_base_fee: sts.enumStruct({ + new: sts.bigint(), + }), + set_on_demand_cores: sts.enumStruct({ + new: sts.number(), + }), + set_on_demand_fee_variability: sts.enumStruct({ + new: Perbill, + }), + set_on_demand_queue_max_size: sts.enumStruct({ + new: sts.number(), + }), + set_on_demand_retries: sts.enumStruct({ + new: sts.number(), + }), + set_on_demand_target_queue_utilization: sts.enumStruct({ + new: Perbill, + }), + set_on_demand_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_paras_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_pvf_voting_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_cooldown: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +export const V6ExecutorParam: sts.Type = sts.closedEnum(() => { + return { + MaxMemoryPages: sts.number(), + PrecheckingMaxMemory: sts.bigint(), + PvfExecTimeout: sts.tuple(() => [V6PvfExecTimeoutKind, sts.bigint()]), + PvfPrepTimeout: sts.tuple(() => [V6PvfPrepTimeoutKind, sts.bigint()]), + StackLogicalMax: sts.number(), + StackNativeMax: sts.number(), + WasmExtBulkMemory: sts.unit(), + } +}) + +export const V6PvfPrepTimeoutKind: sts.Type = sts.closedEnum(() => { + return { + Lenient: sts.unit(), + Precheck: sts.unit(), + } +}) + +export type V6PvfPrepTimeoutKind = V6PvfPrepTimeoutKind_Lenient | V6PvfPrepTimeoutKind_Precheck + +export interface V6PvfPrepTimeoutKind_Lenient { + __kind: 'Lenient' +} + +export interface V6PvfPrepTimeoutKind_Precheck { + __kind: 'Precheck' +} + +export const V6PvfExecTimeoutKind: sts.Type = sts.closedEnum(() => { + return { + Approval: sts.unit(), + Backing: sts.unit(), + } +}) + +export type V6PvfExecTimeoutKind = V6PvfExecTimeoutKind_Approval | V6PvfExecTimeoutKind_Backing + +export interface V6PvfExecTimeoutKind_Approval { + __kind: 'Approval' +} + +export interface V6PvfExecTimeoutKind_Backing { + __kind: 'Backing' +} + +export type V6ExecutorParam = V6ExecutorParam_MaxMemoryPages | V6ExecutorParam_PrecheckingMaxMemory | V6ExecutorParam_PvfExecTimeout | V6ExecutorParam_PvfPrepTimeout | V6ExecutorParam_StackLogicalMax | V6ExecutorParam_StackNativeMax | V6ExecutorParam_WasmExtBulkMemory + +export interface V6ExecutorParam_MaxMemoryPages { + __kind: 'MaxMemoryPages' + value: number +} + +export interface V6ExecutorParam_PrecheckingMaxMemory { + __kind: 'PrecheckingMaxMemory' + value: bigint +} + +export interface V6ExecutorParam_PvfExecTimeout { + __kind: 'PvfExecTimeout' + value: [V6PvfExecTimeoutKind, bigint] +} + +export interface V6ExecutorParam_PvfPrepTimeout { + __kind: 'PvfPrepTimeout' + value: [V6PvfPrepTimeoutKind, bigint] +} + +export interface V6ExecutorParam_StackLogicalMax { + __kind: 'StackLogicalMax' + value: number +} + +export interface V6ExecutorParam_StackNativeMax { + __kind: 'StackNativeMax' + value: number +} + +export interface V6ExecutorParam_WasmExtBulkMemory { + __kind: 'WasmExtBulkMemory' +} + +export const V6AsyncBackingParams: sts.Type = sts.struct(() => { + return { + maxCandidateDepth: sts.number(), + allowedAncestryLen: sts.number(), + } +}) + +export interface V6AsyncBackingParams { + maxCandidateDepth: number + allowedAncestryLen: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ConfigurationCall = ConfigurationCall_set_async_backing_params | ConfigurationCall_set_bypass_consistency_check | ConfigurationCall_set_code_retention_period | ConfigurationCall_set_dispute_period | ConfigurationCall_set_dispute_post_conclusion_acceptance_period | ConfigurationCall_set_executor_params | ConfigurationCall_set_group_rotation_frequency | ConfigurationCall_set_hrmp_channel_max_capacity | ConfigurationCall_set_hrmp_channel_max_message_size | ConfigurationCall_set_hrmp_channel_max_total_size | ConfigurationCall_set_hrmp_max_message_num_per_candidate | ConfigurationCall_set_hrmp_max_parachain_inbound_channels | ConfigurationCall_set_hrmp_max_parachain_outbound_channels | ConfigurationCall_set_hrmp_open_request_ttl | ConfigurationCall_set_hrmp_recipient_deposit | ConfigurationCall_set_hrmp_sender_deposit | ConfigurationCall_set_max_code_size | ConfigurationCall_set_max_downward_message_size | ConfigurationCall_set_max_head_data_size | ConfigurationCall_set_max_pov_size | ConfigurationCall_set_max_upward_message_num_per_candidate | ConfigurationCall_set_max_upward_message_size | ConfigurationCall_set_max_upward_queue_count | ConfigurationCall_set_max_upward_queue_size | ConfigurationCall_set_max_validators | ConfigurationCall_set_max_validators_per_core | ConfigurationCall_set_minimum_backing_votes | ConfigurationCall_set_minimum_validation_upgrade_delay | ConfigurationCall_set_n_delay_tranches | ConfigurationCall_set_needed_approvals | ConfigurationCall_set_no_show_slots | ConfigurationCall_set_on_demand_base_fee | ConfigurationCall_set_on_demand_cores | ConfigurationCall_set_on_demand_fee_variability | ConfigurationCall_set_on_demand_queue_max_size | ConfigurationCall_set_on_demand_retries | ConfigurationCall_set_on_demand_target_queue_utilization | ConfigurationCall_set_on_demand_ttl | ConfigurationCall_set_paras_availability_period | ConfigurationCall_set_pvf_voting_ttl | ConfigurationCall_set_relay_vrf_modulo_samples | ConfigurationCall_set_scheduling_lookahead | ConfigurationCall_set_validation_upgrade_cooldown | ConfigurationCall_set_validation_upgrade_delay | ConfigurationCall_set_zeroth_delay_tranche_width + +/** + * See [`Pallet::set_async_backing_params`]. + */ +export interface ConfigurationCall_set_async_backing_params { + __kind: 'set_async_backing_params' + new: V6AsyncBackingParams +} + +/** + * See [`Pallet::set_bypass_consistency_check`]. + */ +export interface ConfigurationCall_set_bypass_consistency_check { + __kind: 'set_bypass_consistency_check' + new: boolean +} + +/** + * See [`Pallet::set_code_retention_period`]. + */ +export interface ConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: number +} + +/** + * See [`Pallet::set_dispute_period`]. + */ +export interface ConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: number +} + +/** + * See [`Pallet::set_dispute_post_conclusion_acceptance_period`]. + */ +export interface ConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: number +} + +/** + * See [`Pallet::set_executor_params`]. + */ +export interface ConfigurationCall_set_executor_params { + __kind: 'set_executor_params' + new: V6ExecutorParam[] +} + +/** + * See [`Pallet::set_group_rotation_frequency`]. + */ +export interface ConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: number +} + +/** + * See [`Pallet::set_hrmp_channel_max_capacity`]. + */ +export interface ConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * See [`Pallet::set_hrmp_channel_max_message_size`]. + */ +export interface ConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * See [`Pallet::set_hrmp_channel_max_total_size`]. + */ +export interface ConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * See [`Pallet::set_hrmp_max_message_num_per_candidate`]. + */ +export interface ConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * See [`Pallet::set_hrmp_max_parachain_inbound_channels`]. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * See [`Pallet::set_hrmp_max_parachain_outbound_channels`]. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * See [`Pallet::set_hrmp_open_request_ttl`]. + */ +export interface ConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * See [`Pallet::set_hrmp_recipient_deposit`]. + */ +export interface ConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: bigint +} + +/** + * See [`Pallet::set_hrmp_sender_deposit`]. + */ +export interface ConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: bigint +} + +/** + * See [`Pallet::set_max_code_size`]. + */ +export interface ConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * See [`Pallet::set_max_downward_message_size`]. + */ +export interface ConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * See [`Pallet::set_max_head_data_size`]. + */ +export interface ConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * See [`Pallet::set_max_pov_size`]. + */ +export interface ConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * See [`Pallet::set_max_upward_message_num_per_candidate`]. + */ +export interface ConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * See [`Pallet::set_max_upward_message_size`]. + */ +export interface ConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * See [`Pallet::set_max_upward_queue_count`]. + */ +export interface ConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * See [`Pallet::set_max_upward_queue_size`]. + */ +export interface ConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * See [`Pallet::set_max_validators`]. + */ +export interface ConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * See [`Pallet::set_max_validators_per_core`]. + */ +export interface ConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * See [`Pallet::set_minimum_backing_votes`]. + */ +export interface ConfigurationCall_set_minimum_backing_votes { + __kind: 'set_minimum_backing_votes' + new: number +} + +/** + * See [`Pallet::set_minimum_validation_upgrade_delay`]. + */ +export interface ConfigurationCall_set_minimum_validation_upgrade_delay { + __kind: 'set_minimum_validation_upgrade_delay' + new: number +} + +/** + * See [`Pallet::set_n_delay_tranches`]. + */ +export interface ConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * See [`Pallet::set_needed_approvals`]. + */ +export interface ConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * See [`Pallet::set_no_show_slots`]. + */ +export interface ConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * See [`Pallet::set_on_demand_base_fee`]. + */ +export interface ConfigurationCall_set_on_demand_base_fee { + __kind: 'set_on_demand_base_fee' + new: bigint +} + +/** + * See [`Pallet::set_on_demand_cores`]. + */ +export interface ConfigurationCall_set_on_demand_cores { + __kind: 'set_on_demand_cores' + new: number +} + +/** + * See [`Pallet::set_on_demand_fee_variability`]. + */ +export interface ConfigurationCall_set_on_demand_fee_variability { + __kind: 'set_on_demand_fee_variability' + new: Perbill +} + +/** + * See [`Pallet::set_on_demand_queue_max_size`]. + */ +export interface ConfigurationCall_set_on_demand_queue_max_size { + __kind: 'set_on_demand_queue_max_size' + new: number +} + +/** + * See [`Pallet::set_on_demand_retries`]. + */ +export interface ConfigurationCall_set_on_demand_retries { + __kind: 'set_on_demand_retries' + new: number +} + +/** + * See [`Pallet::set_on_demand_target_queue_utilization`]. + */ +export interface ConfigurationCall_set_on_demand_target_queue_utilization { + __kind: 'set_on_demand_target_queue_utilization' + new: Perbill +} + +/** + * See [`Pallet::set_on_demand_ttl`]. + */ +export interface ConfigurationCall_set_on_demand_ttl { + __kind: 'set_on_demand_ttl' + new: number +} + +/** + * See [`Pallet::set_paras_availability_period`]. + */ +export interface ConfigurationCall_set_paras_availability_period { + __kind: 'set_paras_availability_period' + new: number +} + +/** + * See [`Pallet::set_pvf_voting_ttl`]. + */ +export interface ConfigurationCall_set_pvf_voting_ttl { + __kind: 'set_pvf_voting_ttl' + new: number +} + +/** + * See [`Pallet::set_relay_vrf_modulo_samples`]. + */ +export interface ConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * See [`Pallet::set_scheduling_lookahead`]. + */ +export interface ConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * See [`Pallet::set_validation_upgrade_cooldown`]. + */ +export interface ConfigurationCall_set_validation_upgrade_cooldown { + __kind: 'set_validation_upgrade_cooldown' + new: number +} + +/** + * See [`Pallet::set_validation_upgrade_delay`]. + */ +export interface ConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: number +} + +/** + * See [`Pallet::set_zeroth_delay_tranche_width`]. + */ +export interface ConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: sts.bigint(), + vestingSchedule: sts.option(() => sts.tuple(() => [sts.bigint(), sts.bigint(), sts.number()])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId32), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * See [`Pallet::attest`]. + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * See [`Pallet::claim`]. + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId32 + ethereumSignature: EcdsaSignature +} + +/** + * See [`Pallet::claim_attest`]. + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId32 + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * See [`Pallet::mint_claim`]. + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: bigint + vestingSchedule?: ([bigint, bigint, number] | undefined) + statement?: (StatementKind | undefined) +} + +/** + * See [`Pallet::move_claim`]. + */ +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId32 | undefined) +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ChildBountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + add_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + value: sts.bigint(), + description: sts.bytes(), + }), + award_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + close_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + propose_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ChildBountiesCall = ChildBountiesCall_accept_curator | ChildBountiesCall_add_child_bounty | ChildBountiesCall_award_child_bounty | ChildBountiesCall_claim_child_bounty | ChildBountiesCall_close_child_bounty | ChildBountiesCall_propose_curator | ChildBountiesCall_unassign_curator + +/** + * See [`Pallet::accept_curator`]. + */ +export interface ChildBountiesCall_accept_curator { + __kind: 'accept_curator' + parentBountyId: number + childBountyId: number +} + +/** + * See [`Pallet::add_child_bounty`]. + */ +export interface ChildBountiesCall_add_child_bounty { + __kind: 'add_child_bounty' + parentBountyId: number + value: bigint + description: Bytes +} + +/** + * See [`Pallet::award_child_bounty`]. + */ +export interface ChildBountiesCall_award_child_bounty { + __kind: 'award_child_bounty' + parentBountyId: number + childBountyId: number + beneficiary: MultiAddress +} + +/** + * See [`Pallet::claim_child_bounty`]. + */ +export interface ChildBountiesCall_claim_child_bounty { + __kind: 'claim_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * See [`Pallet::close_child_bounty`]. + */ +export interface ChildBountiesCall_close_child_bounty { + __kind: 'close_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * See [`Pallet::propose_curator`]. + */ +export interface ChildBountiesCall_propose_curator { + __kind: 'propose_curator' + parentBountyId: number + childBountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * See [`Pallet::unassign_curator`]. + */ +export interface ChildBountiesCall_unassign_curator { + __kind: 'unassign_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * See [`Pallet::accept_curator`]. + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * See [`Pallet::approve_bounty`]. + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * See [`Pallet::award_bounty`]. + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: MultiAddress +} + +/** + * See [`Pallet::claim_bounty`]. + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * See [`Pallet::close_bounty`]. + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * See [`Pallet::extend_bounty_expiry`]. + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * See [`Pallet::propose_bounty`]. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * See [`Pallet::propose_curator`]. + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * See [`Pallet::unassign_curator`]. + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const BeefyCall: sts.Type = sts.closedEnum(() => { + return { + report_equivocation: sts.enumStruct({ + equivocationProof: Type_112, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_112, + keyOwnerProof: MembershipProof, + }), + set_new_genesis: sts.enumStruct({ + delayInBlocks: sts.number(), + }), + } +}) + +export const Type_112: sts.Type = sts.struct(() => { + return { + first: VoteMessage, + second: VoteMessage, + } +}) + +export const VoteMessage: sts.Type = sts.struct(() => { + return { + commitment: Commitment, + id: sts.bytes(), + signature: Signature, + } +}) + +export const Signature = sts.bytes() + +export const Commitment: sts.Type = sts.struct(() => { + return { + payload: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + blockNumber: sts.number(), + validatorSetId: sts.bigint(), + } +}) + +export interface Commitment { + payload: [Bytes, Bytes][] + blockNumber: number + validatorSetId: bigint +} + +export interface VoteMessage { + commitment: Commitment + id: Bytes + signature: Signature +} + +export type Signature = Bytes + +export interface Type_112 { + first: VoteMessage + second: VoteMessage +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type BeefyCall = BeefyCall_report_equivocation | BeefyCall_report_equivocation_unsigned | BeefyCall_set_new_genesis + +/** + * See [`Pallet::report_equivocation`]. + */ +export interface BeefyCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_112 + keyOwnerProof: MembershipProof +} + +/** + * See [`Pallet::report_equivocation_unsigned`]. + */ +export interface BeefyCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_112 + keyOwnerProof: MembershipProof +} + +/** + * See [`Pallet::set_new_genesis`]. + */ +export interface BeefyCall_set_new_genesis { + __kind: 'set_new_genesis' + delayInBlocks: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + }), + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_allow_death: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + upgrade_accounts: sts.enumStruct({ + who: sts.array(() => AccountId32), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type BalancesCall = BalancesCall_force_set_balance | BalancesCall_force_transfer | BalancesCall_force_unreserve | BalancesCall_transfer_all | BalancesCall_transfer_allow_death | BalancesCall_transfer_keep_alive | BalancesCall_upgrade_accounts + +/** + * See [`Pallet::force_set_balance`]. + */ +export interface BalancesCall_force_set_balance { + __kind: 'force_set_balance' + who: MultiAddress + newFree: bigint +} + +/** + * See [`Pallet::force_transfer`]. + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::force_unreserve`]. + */ +export interface BalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * See [`Pallet::transfer_all`]. + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * See [`Pallet::transfer_allow_death`]. + */ +export interface BalancesCall_transfer_allow_death { + __kind: 'transfer_allow_death' + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::transfer_keep_alive`]. + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::upgrade_accounts`]. + */ +export interface BalancesCall_upgrade_accounts { + __kind: 'upgrade_accounts' + who: AccountId32[] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const EquivocationProof: sts.Type = sts.struct(() => { + return { + offender: sts.bytes(), + slot: Slot, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Slot = sts.bigint() + +export interface EquivocationProof { + offender: Bytes + slot: Slot + firstHeader: Header + secondHeader: Header +} + +export type Slot = bigint + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V1: sts.enumStruct({ + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + }), + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type NextConfigDescriptor = NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * See [`Pallet::plan_config_change`]. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * See [`Pallet::report_equivocation`]. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * See [`Pallet::report_equivocation_unsigned`]. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * See [`Pallet::bid`]. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * See [`Pallet::cancel_auction`]. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * See [`Pallet::new_auction`]. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const AssetRateCall: sts.Type = sts.closedEnum(() => { + return { + create: sts.enumStruct({ + assetKind: VersionedLocatableAsset, + rate: FixedU128, + }), + remove: sts.enumStruct({ + assetKind: VersionedLocatableAsset, + }), + update: sts.enumStruct({ + assetKind: VersionedLocatableAsset, + rate: FixedU128, + }), + } +}) + +export const FixedU128 = sts.bigint() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type AssetRateCall = AssetRateCall_create | AssetRateCall_remove | AssetRateCall_update + +/** + * See [`Pallet::create`]. + */ +export interface AssetRateCall_create { + __kind: 'create' + assetKind: VersionedLocatableAsset + rate: FixedU128 +} + +/** + * See [`Pallet::remove`]. + */ +export interface AssetRateCall_remove { + __kind: 'remove' + assetKind: VersionedLocatableAsset +} + +/** + * See [`Pallet::update`]. + */ +export interface AssetRateCall_update { + __kind: 'update' + assetKind: VersionedLocatableAsset + rate: FixedU128 +} + +export type FixedU128 = bigint + +export type Call = Call_AssetRate | Call_Auctions | Call_Babe | Call_Balances | Call_Beefy | Call_Bounties | Call_ChildBounties | Call_Claims | Call_Configuration | Call_ConvictionVoting | Call_Crowdloan | Call_ElectionProviderMultiPhase | Call_FastUnstake | Call_FellowshipCollective | Call_FellowshipReferenda | Call_Grandpa | Call_Hrmp | Call_Identity | Call_ImOnline | Call_Indices | Call_Initializer | Call_MessageQueue | Call_Multisig | Call_Nis | Call_NisCounterpartBalances | Call_NominationPools | Call_ParaInclusion | Call_ParaInherent | Call_Paras | Call_ParasDisputes | Call_ParasShared | Call_ParasSlashing | Call_Preimage | Call_Proxy | Call_Recovery | Call_Referenda | Call_Registrar | Call_Scheduler | Call_Session | Call_Slots | Call_Society | Call_Staking | Call_StateTrieMigration | Call_System | Call_Timestamp | Call_Treasury | Call_Utility | Call_Vesting | Call_VoterList | Call_Whitelist | Call_XcmPallet + +export interface Call_AssetRate { + __kind: 'AssetRate' + value: AssetRateCall +} + +export interface Call_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Call_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Call_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Call_Beefy { + __kind: 'Beefy' + value: BeefyCall +} + +export interface Call_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Call_ChildBounties { + __kind: 'ChildBounties' + value: ChildBountiesCall +} + +export interface Call_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Call_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Call_ConvictionVoting { + __kind: 'ConvictionVoting' + value: ConvictionVotingCall +} + +export interface Call_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Call_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Call_FastUnstake { + __kind: 'FastUnstake' + value: FastUnstakeCall +} + +export interface Call_FellowshipCollective { + __kind: 'FellowshipCollective' + value: FellowshipCollectiveCall +} + +export interface Call_FellowshipReferenda { + __kind: 'FellowshipReferenda' + value: FellowshipReferendaCall +} + +export interface Call_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Call_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Call_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Call_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Call_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Call_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Call_MessageQueue { + __kind: 'MessageQueue' + value: MessageQueueCall +} + +export interface Call_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Call_Nis { + __kind: 'Nis' + value: NisCall +} + +export interface Call_NisCounterpartBalances { + __kind: 'NisCounterpartBalances' + value: NisCounterpartBalancesCall +} + +export interface Call_NominationPools { + __kind: 'NominationPools' + value: NominationPoolsCall +} + +export interface Call_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Call_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Call_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Call_ParasDisputes { + __kind: 'ParasDisputes' + value: ParasDisputesCall +} + +export interface Call_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Call_ParasSlashing { + __kind: 'ParasSlashing' + value: ParasSlashingCall +} + +export interface Call_Preimage { + __kind: 'Preimage' + value: PreimageCall +} + +export interface Call_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Call_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Call_Referenda { + __kind: 'Referenda' + value: ReferendaCall +} + +export interface Call_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Call_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Call_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Call_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Call_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Call_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Call_StateTrieMigration { + __kind: 'StateTrieMigration' + value: StateTrieMigrationCall +} + +export interface Call_System { + __kind: 'System' + value: SystemCall +} + +export interface Call_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Call_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Call_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Call_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Call_VoterList { + __kind: 'VoterList' + value: VoterListCall +} + +export interface Call_Whitelist { + __kind: 'Whitelist' + value: WhitelistCall +} + +export interface Call_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NominationPools: sts.unit(), + NonTransfer: sts.unit(), + Society: sts.unit(), + Staking: sts.unit(), + } +}) + +export const MultiAddress: sts.Type = sts.closedEnum(() => { + return { + Address20: sts.bytes(), + Address32: sts.bytes(), + Id: AccountId32, + Index: sts.unit(), + Raw: sts.bytes(), + } +}) diff --git a/squid/src/types/v1002000.ts b/squid/src/types/v1002000.ts new file mode 100644 index 00000000..bdd048be --- /dev/null +++ b/squid/src/types/v1002000.ts @@ -0,0 +1,12183 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Weight: sts.Type = sts.struct(() => { + return { + refTime: sts.bigint(), + proofSize: sts.bigint(), + } +}) + +export interface Weight { + refTime: bigint + proofSize: bigint +} + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: sts.number(), + index: sts.number(), + } +}) + +export interface Timepoint { + height: number + index: number +} + +export const AccountId32 = sts.bytes() + +export const Call: sts.Type = sts.closedEnum(() => { + return { + AssetRate: AssetRateCall, + Auctions: AuctionsCall, + Babe: BabeCall, + Balances: BalancesCall, + Beefy: BeefyCall, + Bounties: BountiesCall, + ChildBounties: ChildBountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + ConvictionVoting: ConvictionVotingCall, + Coretime: CoretimeCall, + Crowdloan: CrowdloanCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + FastUnstake: FastUnstakeCall, + FellowshipCollective: FellowshipCollectiveCall, + FellowshipReferenda: FellowshipReferendaCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Identity: IdentityCall, + IdentityMigrator: IdentityMigratorCall, + Indices: IndicesCall, + Initializer: InitializerCall, + MessageQueue: MessageQueueCall, + Multisig: MultisigCall, + Nis: NisCall, + NisCounterpartBalances: NisCounterpartBalancesCall, + NominationPools: NominationPoolsCall, + OnDemandAssignmentProvider: OnDemandAssignmentProviderCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Paras: ParasCall, + ParasDisputes: ParasDisputesCall, + ParasShared: ParasSharedCall, + ParasSlashing: ParasSlashingCall, + Preimage: PreimageCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Referenda: ReferendaCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + Timestamp: TimestampCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + VoterList: VoterListCall, + Whitelist: WhitelistCall, + XcmPallet: XcmPalletCall, + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + claim_assets: sts.enumStruct({ + assets: VersionedAssets, + beneficiary: VersionedLocation, + }), + execute: sts.enumStruct({ + message: Type_480, + maxWeight: Weight, + }), + force_default_xcm_version: sts.enumStruct({ + maybeXcmVersion: sts.option(() => sts.number()), + }), + force_subscribe_version_notify: sts.enumStruct({ + location: VersionedLocation, + }), + force_suspension: sts.enumStruct({ + suspended: sts.boolean(), + }), + force_unsubscribe_version_notify: sts.enumStruct({ + location: VersionedLocation, + }), + force_xcm_version: sts.enumStruct({ + location: V4Location, + version: sts.number(), + }), + limited_reserve_transfer_assets: sts.enumStruct({ + dest: VersionedLocation, + beneficiary: VersionedLocation, + assets: VersionedAssets, + feeAssetItem: sts.number(), + weightLimit: V3WeightLimit, + }), + limited_teleport_assets: sts.enumStruct({ + dest: VersionedLocation, + beneficiary: VersionedLocation, + assets: VersionedAssets, + feeAssetItem: sts.number(), + weightLimit: V3WeightLimit, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: VersionedLocation, + beneficiary: VersionedLocation, + assets: VersionedAssets, + feeAssetItem: sts.number(), + }), + send: sts.enumStruct({ + dest: VersionedLocation, + message: VersionedXcm, + }), + teleport_assets: sts.enumStruct({ + dest: VersionedLocation, + beneficiary: VersionedLocation, + assets: VersionedAssets, + feeAssetItem: sts.number(), + }), + transfer_assets: sts.enumStruct({ + dest: VersionedLocation, + beneficiary: VersionedLocation, + assets: VersionedAssets, + feeAssetItem: sts.number(), + weightLimit: V3WeightLimit, + }), + } +}) + +export const VersionedXcm: sts.Type = sts.closedEnum(() => { + return { + V2: sts.array(() => V2Instruction), + V3: sts.array(() => V3Instruction), + V4: sts.array(() => V4Instruction), + } +}) + +export const V4Instruction: sts.Type = sts.closedEnum(() => { + return { + AliasOrigin: V4Location, + BurnAsset: sts.array(() => V4Asset), + BuyExecution: sts.enumStruct({ + fees: V4Asset, + weightLimit: V3WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V4Asset), + ticket: V4Location, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + ClearTopic: sts.unit(), + ClearTransactStatus: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V4AssetFilter, + beneficiary: V4Location, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V4AssetFilter, + dest: V4Location, + xcm: sts.array(() => V4Instruction), + }), + DescendOrigin: V4Junctions, + ExchangeAsset: sts.enumStruct({ + give: V4AssetFilter, + want: sts.array(() => V4Asset), + maximal: sts.boolean(), + }), + ExpectAsset: sts.array(() => V4Asset), + ExpectError: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + ExpectOrigin: sts.option(() => V4Location), + ExpectPallet: sts.enumStruct({ + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + crateMajor: sts.number(), + minCrateMinor: sts.number(), + }), + ExpectTransactStatus: V3MaybeErrorCode, + ExportMessage: sts.enumStruct({ + network: V4NetworkId, + destination: V4Junctions, + xcm: sts.array(() => V4Instruction), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V4AssetFilter, + reserve: V4Location, + xcm: sts.array(() => V4Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V4AssetFilter, + dest: V4Location, + xcm: sts.array(() => V4Instruction), + }), + LockAsset: sts.enumStruct({ + asset: V4Asset, + unlocker: V4Location, + }), + NoteUnlockable: sts.enumStruct({ + asset: V4Asset, + owner: V4Location, + }), + QueryPallet: sts.enumStruct({ + moduleName: sts.bytes(), + responseInfo: V4QueryResponseInfo, + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V4Response, + maxWeight: Weight, + querier: sts.option(() => V4Location), + }), + ReceiveTeleportedAsset: sts.array(() => V4Asset), + RefundSurplus: sts.unit(), + ReportError: V4QueryResponseInfo, + ReportHolding: sts.enumStruct({ + responseInfo: V4QueryResponseInfo, + assets: V4AssetFilter, + }), + ReportTransactStatus: V4QueryResponseInfo, + RequestUnlock: sts.enumStruct({ + asset: V4Asset, + locker: V4Location, + }), + ReserveAssetDeposited: sts.array(() => V4Asset), + SetAppendix: sts.array(() => V4Instruction), + SetErrorHandler: sts.array(() => V4Instruction), + SetFeesMode: sts.enumStruct({ + jitWithdraw: sts.boolean(), + }), + SetTopic: sts.bytes(), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: Weight, + }), + Transact: sts.enumStruct({ + originKind: V2OriginKind, + requireWeightAtMost: Weight, + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V4Asset), + beneficiary: V4Location, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V4Asset), + dest: V4Location, + xcm: sts.array(() => V4Instruction), + }), + Trap: sts.bigint(), + UniversalOrigin: V4Junction, + UnlockAsset: sts.enumStruct({ + asset: V4Asset, + target: V4Location, + }), + UnpaidExecution: sts.enumStruct({ + weightLimit: V3WeightLimit, + checkOrigin: sts.option(() => V4Location), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V4Asset), + } +}) + +export const V4Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: sts.option(() => V4NetworkId), + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: sts.option(() => V4NetworkId), + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: sts.option(() => V4NetworkId), + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.enumStruct({ + length: sts.number(), + data: sts.bytes(), + }), + GlobalConsensus: V4NetworkId, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V3BodyId, + part: V3BodyPart, + }), + } +}) + +export const V3BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export type V3BodyPart = V3BodyPart_AtLeastProportion | V3BodyPart_Fraction | V3BodyPart_Members | V3BodyPart_MoreThanProportion | V3BodyPart_Voice + +export interface V3BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V3BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V3BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V3BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V3BodyPart_Voice { + __kind: 'Voice' +} + +export const V3BodyId: sts.Type = sts.closedEnum(() => { + return { + Administration: sts.unit(), + Defense: sts.unit(), + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Moniker: sts.bytes(), + Technical: sts.unit(), + Treasury: sts.unit(), + Unit: sts.unit(), + } +}) + +export type V3BodyId = V3BodyId_Administration | V3BodyId_Defense | V3BodyId_Executive | V3BodyId_Index | V3BodyId_Judicial | V3BodyId_Legislative | V3BodyId_Moniker | V3BodyId_Technical | V3BodyId_Treasury | V3BodyId_Unit + +export interface V3BodyId_Administration { + __kind: 'Administration' +} + +export interface V3BodyId_Defense { + __kind: 'Defense' +} + +export interface V3BodyId_Executive { + __kind: 'Executive' +} + +export interface V3BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V3BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V3BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V3BodyId_Moniker { + __kind: 'Moniker' + value: Bytes +} + +export interface V3BodyId_Technical { + __kind: 'Technical' +} + +export interface V3BodyId_Treasury { + __kind: 'Treasury' +} + +export interface V3BodyId_Unit { + __kind: 'Unit' +} + +export type V4Junction = V4Junction_AccountId32 | V4Junction_AccountIndex64 | V4Junction_AccountKey20 | V4Junction_GeneralIndex | V4Junction_GeneralKey | V4Junction_GlobalConsensus | V4Junction_OnlyChild | V4Junction_PalletInstance | V4Junction_Parachain | V4Junction_Plurality + +export interface V4Junction_AccountId32 { + __kind: 'AccountId32' + network?: (V4NetworkId | undefined) + id: Bytes +} + +export interface V4Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network?: (V4NetworkId | undefined) + index: bigint +} + +export interface V4Junction_AccountKey20 { + __kind: 'AccountKey20' + network?: (V4NetworkId | undefined) + key: Bytes +} + +export interface V4Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V4Junction_GeneralKey { + __kind: 'GeneralKey' + length: number + data: Bytes +} + +export interface V4Junction_GlobalConsensus { + __kind: 'GlobalConsensus' + value: V4NetworkId +} + +export interface V4Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V4Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V4Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V4Junction_Plurality { + __kind: 'Plurality' + id: V3BodyId + part: V3BodyPart +} + +export type V4NetworkId = V4NetworkId_BitcoinCash | V4NetworkId_BitcoinCore | V4NetworkId_ByFork | V4NetworkId_ByGenesis | V4NetworkId_Ethereum | V4NetworkId_Kusama | V4NetworkId_Polkadot | V4NetworkId_PolkadotBulletin | V4NetworkId_Rococo | V4NetworkId_Westend | V4NetworkId_Wococo + +export interface V4NetworkId_BitcoinCash { + __kind: 'BitcoinCash' +} + +export interface V4NetworkId_BitcoinCore { + __kind: 'BitcoinCore' +} + +export interface V4NetworkId_ByFork { + __kind: 'ByFork' + blockNumber: bigint + blockHash: Bytes +} + +export interface V4NetworkId_ByGenesis { + __kind: 'ByGenesis' + value: Bytes +} + +export interface V4NetworkId_Ethereum { + __kind: 'Ethereum' + chainId: bigint +} + +export interface V4NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V4NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export interface V4NetworkId_PolkadotBulletin { + __kind: 'PolkadotBulletin' +} + +export interface V4NetworkId_Rococo { + __kind: 'Rococo' +} + +export interface V4NetworkId_Westend { + __kind: 'Westend' +} + +export interface V4NetworkId_Wococo { + __kind: 'Wococo' +} + +export const DoubleEncoded: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncoded { + encoded: Bytes +} + +export const V2OriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type V2OriginKind = V2OriginKind_Native | V2OriginKind_SovereignAccount | V2OriginKind_Superuser | V2OriginKind_Xcm + +export interface V2OriginKind_Native { + __kind: 'Native' +} + +export interface V2OriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface V2OriginKind_Superuser { + __kind: 'Superuser' +} + +export interface V2OriginKind_Xcm { + __kind: 'Xcm' +} + +export const V4Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V4Asset), + DispatchResult: V3MaybeErrorCode, + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + Null: sts.unit(), + PalletsInfo: sts.array(() => V4PalletInfo), + Version: sts.number(), + } +}) + +export const V4PalletInfo: sts.Type = sts.struct(() => { + return { + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + major: sts.number(), + minor: sts.number(), + patch: sts.number(), + } +}) + +export interface V4PalletInfo { + index: number + name: Bytes + moduleName: Bytes + major: number + minor: number + patch: number +} + +export type V4Response = V4Response_Assets | V4Response_DispatchResult | V4Response_ExecutionResult | V4Response_Null | V4Response_PalletsInfo | V4Response_Version + +export interface V4Response_Assets { + __kind: 'Assets' + value: V4Asset[] +} + +export interface V4Response_DispatchResult { + __kind: 'DispatchResult' + value: V3MaybeErrorCode +} + +export interface V4Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V3Error] | undefined) +} + +export interface V4Response_Null { + __kind: 'Null' +} + +export interface V4Response_PalletsInfo { + __kind: 'PalletsInfo' + value: V4PalletInfo[] +} + +export interface V4Response_Version { + __kind: 'Version' + value: number +} + +export type V3Error = V3Error_AssetNotFound | V3Error_BadOrigin | V3Error_Barrier | V3Error_DestinationUnsupported | V3Error_ExceedsMaxMessageSize | V3Error_ExceedsStackLimit | V3Error_ExpectationFalse | V3Error_ExportError | V3Error_FailedToDecode | V3Error_FailedToTransactAsset | V3Error_FeesNotMet | V3Error_HoldingWouldOverflow | V3Error_InvalidLocation | V3Error_LocationCannotHold | V3Error_LocationFull | V3Error_LocationNotInvertible | V3Error_LockError | V3Error_MaxWeightInvalid | V3Error_NameMismatch | V3Error_NoDeal | V3Error_NoPermission | V3Error_NotDepositable | V3Error_NotHoldingFees | V3Error_NotWithdrawable | V3Error_Overflow | V3Error_PalletNotFound | V3Error_ReanchorFailed | V3Error_TooExpensive | V3Error_Transport | V3Error_Trap | V3Error_Unanchored | V3Error_UnhandledXcmVersion | V3Error_Unimplemented | V3Error_UnknownClaim | V3Error_Unroutable | V3Error_UntrustedReserveLocation | V3Error_UntrustedTeleportLocation | V3Error_VersionIncompatible | V3Error_WeightLimitReached | V3Error_WeightNotComputable + +export interface V3Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V3Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V3Error_Barrier { + __kind: 'Barrier' +} + +export interface V3Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V3Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V3Error_ExceedsStackLimit { + __kind: 'ExceedsStackLimit' +} + +export interface V3Error_ExpectationFalse { + __kind: 'ExpectationFalse' +} + +export interface V3Error_ExportError { + __kind: 'ExportError' +} + +export interface V3Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V3Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V3Error_FeesNotMet { + __kind: 'FeesNotMet' +} + +export interface V3Error_HoldingWouldOverflow { + __kind: 'HoldingWouldOverflow' +} + +export interface V3Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V3Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V3Error_LocationFull { + __kind: 'LocationFull' +} + +export interface V3Error_LocationNotInvertible { + __kind: 'LocationNotInvertible' +} + +export interface V3Error_LockError { + __kind: 'LockError' +} + +export interface V3Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V3Error_NameMismatch { + __kind: 'NameMismatch' +} + +export interface V3Error_NoDeal { + __kind: 'NoDeal' +} + +export interface V3Error_NoPermission { + __kind: 'NoPermission' +} + +export interface V3Error_NotDepositable { + __kind: 'NotDepositable' +} + +export interface V3Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V3Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V3Error_Overflow { + __kind: 'Overflow' +} + +export interface V3Error_PalletNotFound { + __kind: 'PalletNotFound' +} + +export interface V3Error_ReanchorFailed { + __kind: 'ReanchorFailed' +} + +export interface V3Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V3Error_Transport { + __kind: 'Transport' +} + +export interface V3Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V3Error_Unanchored { + __kind: 'Unanchored' +} + +export interface V3Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V3Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V3Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V3Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V3Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V3Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V3Error_VersionIncompatible { + __kind: 'VersionIncompatible' +} + +export interface V3Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: Weight +} + +export interface V3Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V3MaybeErrorCode = V3MaybeErrorCode_Error | V3MaybeErrorCode_Success | V3MaybeErrorCode_TruncatedError + +export interface V3MaybeErrorCode_Error { + __kind: 'Error' + value: Bytes +} + +export interface V3MaybeErrorCode_Success { + __kind: 'Success' +} + +export interface V3MaybeErrorCode_TruncatedError { + __kind: 'TruncatedError' + value: Bytes +} + +export interface V4Asset { + id: V4AssetId + fun: V4Fungibility +} + +export type V4Fungibility = V4Fungibility_Fungible | V4Fungibility_NonFungible + +export interface V4Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V4Fungibility_NonFungible { + __kind: 'NonFungible' + value: V4AssetInstance +} + +export type V4AssetInstance = V4AssetInstance_Array16 | V4AssetInstance_Array32 | V4AssetInstance_Array4 | V4AssetInstance_Array8 | V4AssetInstance_Index | V4AssetInstance_Undefined + +export interface V4AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V4AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V4AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V4AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V4AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V4AssetInstance_Undefined { + __kind: 'Undefined' +} + +export interface V4AssetId { + parents: number + interior: V4Junctions +} + +export type V4Junctions = V4Junctions_Here | V4Junctions_X1 | V4Junctions_X2 | V4Junctions_X3 | V4Junctions_X4 | V4Junctions_X5 | V4Junctions_X6 | V4Junctions_X7 | V4Junctions_X8 + +export interface V4Junctions_Here { + __kind: 'Here' +} + +export interface V4Junctions_X1 { + __kind: 'X1' + value: V4Junction[] +} + +export interface V4Junctions_X2 { + __kind: 'X2' + value: V4Junction[] +} + +export interface V4Junctions_X3 { + __kind: 'X3' + value: V4Junction[] +} + +export interface V4Junctions_X4 { + __kind: 'X4' + value: V4Junction[] +} + +export interface V4Junctions_X5 { + __kind: 'X5' + value: V4Junction[] +} + +export interface V4Junctions_X6 { + __kind: 'X6' + value: V4Junction[] +} + +export interface V4Junctions_X7 { + __kind: 'X7' + value: V4Junction[] +} + +export interface V4Junctions_X8 { + __kind: 'X8' + value: V4Junction[] +} + +export const V4QueryResponseInfo: sts.Type = sts.struct(() => { + return { + destination: V4Location, + queryId: sts.bigint(), + maxWeight: Weight, + } +}) + +export interface V4QueryResponseInfo { + destination: V4Location + queryId: bigint + maxWeight: Weight +} + +export interface V4Location { + parents: number + interior: V4Junctions +} + +export const V4NetworkId: sts.Type = sts.closedEnum(() => { + return { + BitcoinCash: sts.unit(), + BitcoinCore: sts.unit(), + ByFork: sts.enumStruct({ + blockNumber: sts.bigint(), + blockHash: sts.bytes(), + }), + ByGenesis: sts.bytes(), + Ethereum: sts.enumStruct({ + chainId: sts.bigint(), + }), + Kusama: sts.unit(), + Polkadot: sts.unit(), + PolkadotBulletin: sts.unit(), + Rococo: sts.unit(), + Westend: sts.unit(), + Wococo: sts.unit(), + } +}) + +export const V3MaybeErrorCode: sts.Type = sts.closedEnum(() => { + return { + Error: sts.bytes(), + Success: sts.unit(), + TruncatedError: sts.bytes(), + } +}) + +export const V3Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + ExceedsStackLimit: sts.unit(), + ExpectationFalse: sts.unit(), + ExportError: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + FeesNotMet: sts.unit(), + HoldingWouldOverflow: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + LocationFull: sts.unit(), + LocationNotInvertible: sts.unit(), + LockError: sts.unit(), + MaxWeightInvalid: sts.unit(), + NameMismatch: sts.unit(), + NoDeal: sts.unit(), + NoPermission: sts.unit(), + NotDepositable: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + PalletNotFound: sts.unit(), + ReanchorFailed: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + Unanchored: sts.unit(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + VersionIncompatible: sts.unit(), + WeightLimitReached: Weight, + WeightNotComputable: sts.unit(), + } +}) + +export const V4Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: sts.array(() => V4Junction), + X2: sts.array(() => V4Junction), + X3: sts.array(() => V4Junction), + X4: sts.array(() => V4Junction), + X5: sts.array(() => V4Junction), + X6: sts.array(() => V4Junction), + X7: sts.array(() => V4Junction), + X8: sts.array(() => V4Junction), + } +}) + +export const V4AssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V4Asset), + Wild: V4WildAsset, + } +}) + +export const V4WildAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllCounted: sts.number(), + AllOf: sts.enumStruct({ + id: V4AssetId, + fun: V4WildFungibility, + }), + AllOfCounted: sts.enumStruct({ + id: V4AssetId, + fun: V4WildFungibility, + count: sts.number(), + }), + } +}) + +export const V4WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V4WildFungibility = V4WildFungibility_Fungible | V4WildFungibility_NonFungible + +export interface V4WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V4WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V4AssetId: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V4Junctions, + } +}) + +export type V4WildAsset = V4WildAsset_All | V4WildAsset_AllCounted | V4WildAsset_AllOf | V4WildAsset_AllOfCounted + +export interface V4WildAsset_All { + __kind: 'All' +} + +export interface V4WildAsset_AllCounted { + __kind: 'AllCounted' + value: number +} + +export interface V4WildAsset_AllOf { + __kind: 'AllOf' + id: V4AssetId + fun: V4WildFungibility +} + +export interface V4WildAsset_AllOfCounted { + __kind: 'AllOfCounted' + id: V4AssetId + fun: V4WildFungibility + count: number +} + +export type V4AssetFilter = V4AssetFilter_Definite | V4AssetFilter_Wild + +export interface V4AssetFilter_Definite { + __kind: 'Definite' + value: V4Asset[] +} + +export interface V4AssetFilter_Wild { + __kind: 'Wild' + value: V4WildAsset +} + +export const V4Asset: sts.Type = sts.struct(() => { + return { + id: V4AssetId, + fun: V4Fungibility, + } +}) + +export const V4Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V4AssetInstance, + } +}) + +export const V4AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V4Instruction = V4Instruction_AliasOrigin | V4Instruction_BurnAsset | V4Instruction_BuyExecution | V4Instruction_ClaimAsset | V4Instruction_ClearError | V4Instruction_ClearOrigin | V4Instruction_ClearTopic | V4Instruction_ClearTransactStatus | V4Instruction_DepositAsset | V4Instruction_DepositReserveAsset | V4Instruction_DescendOrigin | V4Instruction_ExchangeAsset | V4Instruction_ExpectAsset | V4Instruction_ExpectError | V4Instruction_ExpectOrigin | V4Instruction_ExpectPallet | V4Instruction_ExpectTransactStatus | V4Instruction_ExportMessage | V4Instruction_HrmpChannelAccepted | V4Instruction_HrmpChannelClosing | V4Instruction_HrmpNewChannelOpenRequest | V4Instruction_InitiateReserveWithdraw | V4Instruction_InitiateTeleport | V4Instruction_LockAsset | V4Instruction_NoteUnlockable | V4Instruction_QueryPallet | V4Instruction_QueryResponse | V4Instruction_ReceiveTeleportedAsset | V4Instruction_RefundSurplus | V4Instruction_ReportError | V4Instruction_ReportHolding | V4Instruction_ReportTransactStatus | V4Instruction_RequestUnlock | V4Instruction_ReserveAssetDeposited | V4Instruction_SetAppendix | V4Instruction_SetErrorHandler | V4Instruction_SetFeesMode | V4Instruction_SetTopic | V4Instruction_SubscribeVersion | V4Instruction_Transact | V4Instruction_TransferAsset | V4Instruction_TransferReserveAsset | V4Instruction_Trap | V4Instruction_UniversalOrigin | V4Instruction_UnlockAsset | V4Instruction_UnpaidExecution | V4Instruction_UnsubscribeVersion | V4Instruction_WithdrawAsset + +export interface V4Instruction_AliasOrigin { + __kind: 'AliasOrigin' + value: V4Location +} + +export interface V4Instruction_BurnAsset { + __kind: 'BurnAsset' + value: V4Asset[] +} + +export interface V4Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V4Asset + weightLimit: V3WeightLimit +} + +export interface V4Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V4Asset[] + ticket: V4Location +} + +export interface V4Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V4Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V4Instruction_ClearTopic { + __kind: 'ClearTopic' +} + +export interface V4Instruction_ClearTransactStatus { + __kind: 'ClearTransactStatus' +} + +export interface V4Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V4AssetFilter + beneficiary: V4Location +} + +export interface V4Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V4AssetFilter + dest: V4Location + xcm: V4Instruction[] +} + +export interface V4Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V4Junctions +} + +export interface V4Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V4AssetFilter + want: V4Asset[] + maximal: boolean +} + +export interface V4Instruction_ExpectAsset { + __kind: 'ExpectAsset' + value: V4Asset[] +} + +export interface V4Instruction_ExpectError { + __kind: 'ExpectError' + value?: ([number, V3Error] | undefined) +} + +export interface V4Instruction_ExpectOrigin { + __kind: 'ExpectOrigin' + value?: (V4Location | undefined) +} + +export interface V4Instruction_ExpectPallet { + __kind: 'ExpectPallet' + index: number + name: Bytes + moduleName: Bytes + crateMajor: number + minCrateMinor: number +} + +export interface V4Instruction_ExpectTransactStatus { + __kind: 'ExpectTransactStatus' + value: V3MaybeErrorCode +} + +export interface V4Instruction_ExportMessage { + __kind: 'ExportMessage' + network: V4NetworkId + destination: V4Junctions + xcm: V4Instruction[] +} + +export interface V4Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V4Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V4Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V4Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V4AssetFilter + reserve: V4Location + xcm: V4Instruction[] +} + +export interface V4Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V4AssetFilter + dest: V4Location + xcm: V4Instruction[] +} + +export interface V4Instruction_LockAsset { + __kind: 'LockAsset' + asset: V4Asset + unlocker: V4Location +} + +export interface V4Instruction_NoteUnlockable { + __kind: 'NoteUnlockable' + asset: V4Asset + owner: V4Location +} + +export interface V4Instruction_QueryPallet { + __kind: 'QueryPallet' + moduleName: Bytes + responseInfo: V4QueryResponseInfo +} + +export interface V4Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V4Response + maxWeight: Weight + querier?: (V4Location | undefined) +} + +export interface V4Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V4Asset[] +} + +export interface V4Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V4Instruction_ReportError { + __kind: 'ReportError' + value: V4QueryResponseInfo +} + +export interface V4Instruction_ReportHolding { + __kind: 'ReportHolding' + responseInfo: V4QueryResponseInfo + assets: V4AssetFilter +} + +export interface V4Instruction_ReportTransactStatus { + __kind: 'ReportTransactStatus' + value: V4QueryResponseInfo +} + +export interface V4Instruction_RequestUnlock { + __kind: 'RequestUnlock' + asset: V4Asset + locker: V4Location +} + +export interface V4Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V4Asset[] +} + +export interface V4Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V4Instruction[] +} + +export interface V4Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V4Instruction[] +} + +export interface V4Instruction_SetFeesMode { + __kind: 'SetFeesMode' + jitWithdraw: boolean +} + +export interface V4Instruction_SetTopic { + __kind: 'SetTopic' + value: Bytes +} + +export interface V4Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: Weight +} + +export interface V4Instruction_Transact { + __kind: 'Transact' + originKind: V2OriginKind + requireWeightAtMost: Weight + call: DoubleEncoded +} + +export interface V4Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V4Asset[] + beneficiary: V4Location +} + +export interface V4Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V4Asset[] + dest: V4Location + xcm: V4Instruction[] +} + +export interface V4Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V4Instruction_UniversalOrigin { + __kind: 'UniversalOrigin' + value: V4Junction +} + +export interface V4Instruction_UnlockAsset { + __kind: 'UnlockAsset' + asset: V4Asset + target: V4Location +} + +export interface V4Instruction_UnpaidExecution { + __kind: 'UnpaidExecution' + weightLimit: V3WeightLimit + checkOrigin?: (V4Location | undefined) +} + +export interface V4Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V4Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V4Asset[] +} + +export type V3WeightLimit = V3WeightLimit_Limited | V3WeightLimit_Unlimited + +export interface V3WeightLimit_Limited { + __kind: 'Limited' + value: Weight +} + +export interface V3WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V3Instruction: sts.Type = sts.closedEnum(() => { + return { + AliasOrigin: V3MultiLocation, + BurnAsset: sts.array(() => V3MultiAsset), + BuyExecution: sts.enumStruct({ + fees: V3MultiAsset, + weightLimit: V3WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + ticket: V3MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + ClearTopic: sts.unit(), + ClearTransactStatus: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + beneficiary: V3MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + DescendOrigin: V3Junctions, + ExchangeAsset: sts.enumStruct({ + give: V3MultiAssetFilter, + want: sts.array(() => V3MultiAsset), + maximal: sts.boolean(), + }), + ExpectAsset: sts.array(() => V3MultiAsset), + ExpectError: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + ExpectOrigin: sts.option(() => V3MultiLocation), + ExpectPallet: sts.enumStruct({ + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + crateMajor: sts.number(), + minCrateMinor: sts.number(), + }), + ExpectTransactStatus: V3MaybeErrorCode, + ExportMessage: sts.enumStruct({ + network: V3NetworkId, + destination: V3Junctions, + xcm: sts.array(() => V3Instruction), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V3MultiAssetFilter, + reserve: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + LockAsset: sts.enumStruct({ + asset: V3MultiAsset, + unlocker: V3MultiLocation, + }), + NoteUnlockable: sts.enumStruct({ + asset: V3MultiAsset, + owner: V3MultiLocation, + }), + QueryPallet: sts.enumStruct({ + moduleName: sts.bytes(), + responseInfo: V3QueryResponseInfo, + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V3Response, + maxWeight: Weight, + querier: sts.option(() => V3MultiLocation), + }), + ReceiveTeleportedAsset: sts.array(() => V3MultiAsset), + RefundSurplus: sts.unit(), + ReportError: V3QueryResponseInfo, + ReportHolding: sts.enumStruct({ + responseInfo: V3QueryResponseInfo, + assets: V3MultiAssetFilter, + }), + ReportTransactStatus: V3QueryResponseInfo, + RequestUnlock: sts.enumStruct({ + asset: V3MultiAsset, + locker: V3MultiLocation, + }), + ReserveAssetDeposited: sts.array(() => V3MultiAsset), + SetAppendix: sts.array(() => V3Instruction), + SetErrorHandler: sts.array(() => V3Instruction), + SetFeesMode: sts.enumStruct({ + jitWithdraw: sts.boolean(), + }), + SetTopic: sts.bytes(), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: Weight, + }), + Transact: sts.enumStruct({ + originKind: V2OriginKind, + requireWeightAtMost: Weight, + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + beneficiary: V3MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + Trap: sts.bigint(), + UniversalOrigin: V3Junction, + UnlockAsset: sts.enumStruct({ + asset: V3MultiAsset, + target: V3MultiLocation, + }), + UnpaidExecution: sts.enumStruct({ + weightLimit: V3WeightLimit, + checkOrigin: sts.option(() => V3MultiLocation), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V3MultiAsset), + } +}) + +export const V3Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: sts.option(() => V3NetworkId), + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: sts.option(() => V3NetworkId), + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: sts.option(() => V3NetworkId), + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.enumStruct({ + length: sts.number(), + data: sts.bytes(), + }), + GlobalConsensus: V3NetworkId, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V3BodyId, + part: V3BodyPart, + }), + } +}) + +export type V3Junction = V3Junction_AccountId32 | V3Junction_AccountIndex64 | V3Junction_AccountKey20 | V3Junction_GeneralIndex | V3Junction_GeneralKey | V3Junction_GlobalConsensus | V3Junction_OnlyChild | V3Junction_PalletInstance | V3Junction_Parachain | V3Junction_Plurality + +export interface V3Junction_AccountId32 { + __kind: 'AccountId32' + network?: (V3NetworkId | undefined) + id: Bytes +} + +export interface V3Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network?: (V3NetworkId | undefined) + index: bigint +} + +export interface V3Junction_AccountKey20 { + __kind: 'AccountKey20' + network?: (V3NetworkId | undefined) + key: Bytes +} + +export interface V3Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V3Junction_GeneralKey { + __kind: 'GeneralKey' + length: number + data: Bytes +} + +export interface V3Junction_GlobalConsensus { + __kind: 'GlobalConsensus' + value: V3NetworkId +} + +export interface V3Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V3Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V3Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V3Junction_Plurality { + __kind: 'Plurality' + id: V3BodyId + part: V3BodyPart +} + +export type V3NetworkId = V3NetworkId_BitcoinCash | V3NetworkId_BitcoinCore | V3NetworkId_ByFork | V3NetworkId_ByGenesis | V3NetworkId_Ethereum | V3NetworkId_Kusama | V3NetworkId_Polkadot | V3NetworkId_PolkadotBulletin | V3NetworkId_Rococo | V3NetworkId_Westend | V3NetworkId_Wococo + +export interface V3NetworkId_BitcoinCash { + __kind: 'BitcoinCash' +} + +export interface V3NetworkId_BitcoinCore { + __kind: 'BitcoinCore' +} + +export interface V3NetworkId_ByFork { + __kind: 'ByFork' + blockNumber: bigint + blockHash: Bytes +} + +export interface V3NetworkId_ByGenesis { + __kind: 'ByGenesis' + value: Bytes +} + +export interface V3NetworkId_Ethereum { + __kind: 'Ethereum' + chainId: bigint +} + +export interface V3NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V3NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export interface V3NetworkId_PolkadotBulletin { + __kind: 'PolkadotBulletin' +} + +export interface V3NetworkId_Rococo { + __kind: 'Rococo' +} + +export interface V3NetworkId_Westend { + __kind: 'Westend' +} + +export interface V3NetworkId_Wococo { + __kind: 'Wococo' +} + +export const V3Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V3MultiAsset), + DispatchResult: V3MaybeErrorCode, + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + Null: sts.unit(), + PalletsInfo: sts.array(() => V3PalletInfo), + Version: sts.number(), + } +}) + +export const V3PalletInfo: sts.Type = sts.struct(() => { + return { + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + major: sts.number(), + minor: sts.number(), + patch: sts.number(), + } +}) + +export interface V3PalletInfo { + index: number + name: Bytes + moduleName: Bytes + major: number + minor: number + patch: number +} + +export type V3Response = V3Response_Assets | V3Response_DispatchResult | V3Response_ExecutionResult | V3Response_Null | V3Response_PalletsInfo | V3Response_Version + +export interface V3Response_Assets { + __kind: 'Assets' + value: V3MultiAsset[] +} + +export interface V3Response_DispatchResult { + __kind: 'DispatchResult' + value: V3MaybeErrorCode +} + +export interface V3Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V3Error] | undefined) +} + +export interface V3Response_Null { + __kind: 'Null' +} + +export interface V3Response_PalletsInfo { + __kind: 'PalletsInfo' + value: V3PalletInfo[] +} + +export interface V3Response_Version { + __kind: 'Version' + value: number +} + +export interface V3MultiAsset { + id: V3AssetId + fun: V3Fungibility +} + +export type V3Fungibility = V3Fungibility_Fungible | V3Fungibility_NonFungible + +export interface V3Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V3Fungibility_NonFungible { + __kind: 'NonFungible' + value: V3AssetInstance +} + +export type V3AssetInstance = V3AssetInstance_Array16 | V3AssetInstance_Array32 | V3AssetInstance_Array4 | V3AssetInstance_Array8 | V3AssetInstance_Index | V3AssetInstance_Undefined + +export interface V3AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V3AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V3AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V3AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V3AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V3AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V3AssetId = V3AssetId_Abstract | V3AssetId_Concrete + +export interface V3AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V3AssetId_Concrete { + __kind: 'Concrete' + value: V3MultiLocation +} + +export interface V3MultiLocation { + parents: number + interior: V3Junctions +} + +export type V3Junctions = V3Junctions_Here | V3Junctions_X1 | V3Junctions_X2 | V3Junctions_X3 | V3Junctions_X4 | V3Junctions_X5 | V3Junctions_X6 | V3Junctions_X7 | V3Junctions_X8 + +export interface V3Junctions_Here { + __kind: 'Here' +} + +export interface V3Junctions_X1 { + __kind: 'X1' + value: V3Junction +} + +export interface V3Junctions_X2 { + __kind: 'X2' + value: [V3Junction, V3Junction] +} + +export interface V3Junctions_X3 { + __kind: 'X3' + value: [V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X4 { + __kind: 'X4' + value: [V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X5 { + __kind: 'X5' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X6 { + __kind: 'X6' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X7 { + __kind: 'X7' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X8 { + __kind: 'X8' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export const V3QueryResponseInfo: sts.Type = sts.struct(() => { + return { + destination: V3MultiLocation, + queryId: sts.bigint(), + maxWeight: Weight, + } +}) + +export interface V3QueryResponseInfo { + destination: V3MultiLocation + queryId: bigint + maxWeight: Weight +} + +export const V3NetworkId: sts.Type = sts.closedEnum(() => { + return { + BitcoinCash: sts.unit(), + BitcoinCore: sts.unit(), + ByFork: sts.enumStruct({ + blockNumber: sts.bigint(), + blockHash: sts.bytes(), + }), + ByGenesis: sts.bytes(), + Ethereum: sts.enumStruct({ + chainId: sts.bigint(), + }), + Kusama: sts.unit(), + Polkadot: sts.unit(), + PolkadotBulletin: sts.unit(), + Rococo: sts.unit(), + Westend: sts.unit(), + Wococo: sts.unit(), + } +}) + +export const V3Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V3Junction, + X2: sts.tuple(() => [V3Junction, V3Junction]), + X3: sts.tuple(() => [V3Junction, V3Junction, V3Junction]), + X4: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction]), + X5: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + X6: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + X7: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + X8: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + } +}) + +export const V3MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V3MultiAsset), + Wild: V3WildMultiAsset, + } +}) + +export const V3WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllCounted: sts.number(), + AllOf: sts.enumStruct({ + id: V3AssetId, + fun: V3WildFungibility, + }), + AllOfCounted: sts.enumStruct({ + id: V3AssetId, + fun: V3WildFungibility, + count: sts.number(), + }), + } +}) + +export const V3WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V3WildFungibility = V3WildFungibility_Fungible | V3WildFungibility_NonFungible + +export interface V3WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V3WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V3AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V3MultiLocation, + } +}) + +export type V3WildMultiAsset = V3WildMultiAsset_All | V3WildMultiAsset_AllCounted | V3WildMultiAsset_AllOf | V3WildMultiAsset_AllOfCounted + +export interface V3WildMultiAsset_All { + __kind: 'All' +} + +export interface V3WildMultiAsset_AllCounted { + __kind: 'AllCounted' + value: number +} + +export interface V3WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V3AssetId + fun: V3WildFungibility +} + +export interface V3WildMultiAsset_AllOfCounted { + __kind: 'AllOfCounted' + id: V3AssetId + fun: V3WildFungibility + count: number +} + +export type V3MultiAssetFilter = V3MultiAssetFilter_Definite | V3MultiAssetFilter_Wild + +export interface V3MultiAssetFilter_Definite { + __kind: 'Definite' + value: V3MultiAsset[] +} + +export interface V3MultiAssetFilter_Wild { + __kind: 'Wild' + value: V3WildMultiAsset +} + +export const V3MultiAsset: sts.Type = sts.struct(() => { + return { + id: V3AssetId, + fun: V3Fungibility, + } +}) + +export const V3Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V3AssetInstance, + } +}) + +export const V3AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export const V3MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V3Junctions, + } +}) + +export type V3Instruction = V3Instruction_AliasOrigin | V3Instruction_BurnAsset | V3Instruction_BuyExecution | V3Instruction_ClaimAsset | V3Instruction_ClearError | V3Instruction_ClearOrigin | V3Instruction_ClearTopic | V3Instruction_ClearTransactStatus | V3Instruction_DepositAsset | V3Instruction_DepositReserveAsset | V3Instruction_DescendOrigin | V3Instruction_ExchangeAsset | V3Instruction_ExpectAsset | V3Instruction_ExpectError | V3Instruction_ExpectOrigin | V3Instruction_ExpectPallet | V3Instruction_ExpectTransactStatus | V3Instruction_ExportMessage | V3Instruction_HrmpChannelAccepted | V3Instruction_HrmpChannelClosing | V3Instruction_HrmpNewChannelOpenRequest | V3Instruction_InitiateReserveWithdraw | V3Instruction_InitiateTeleport | V3Instruction_LockAsset | V3Instruction_NoteUnlockable | V3Instruction_QueryPallet | V3Instruction_QueryResponse | V3Instruction_ReceiveTeleportedAsset | V3Instruction_RefundSurplus | V3Instruction_ReportError | V3Instruction_ReportHolding | V3Instruction_ReportTransactStatus | V3Instruction_RequestUnlock | V3Instruction_ReserveAssetDeposited | V3Instruction_SetAppendix | V3Instruction_SetErrorHandler | V3Instruction_SetFeesMode | V3Instruction_SetTopic | V3Instruction_SubscribeVersion | V3Instruction_Transact | V3Instruction_TransferAsset | V3Instruction_TransferReserveAsset | V3Instruction_Trap | V3Instruction_UniversalOrigin | V3Instruction_UnlockAsset | V3Instruction_UnpaidExecution | V3Instruction_UnsubscribeVersion | V3Instruction_WithdrawAsset + +export interface V3Instruction_AliasOrigin { + __kind: 'AliasOrigin' + value: V3MultiLocation +} + +export interface V3Instruction_BurnAsset { + __kind: 'BurnAsset' + value: V3MultiAsset[] +} + +export interface V3Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V3MultiAsset + weightLimit: V3WeightLimit +} + +export interface V3Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V3MultiAsset[] + ticket: V3MultiLocation +} + +export interface V3Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V3Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V3Instruction_ClearTopic { + __kind: 'ClearTopic' +} + +export interface V3Instruction_ClearTransactStatus { + __kind: 'ClearTransactStatus' +} + +export interface V3Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V3MultiAssetFilter + beneficiary: V3MultiLocation +} + +export interface V3Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V3Junctions +} + +export interface V3Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V3MultiAssetFilter + want: V3MultiAsset[] + maximal: boolean +} + +export interface V3Instruction_ExpectAsset { + __kind: 'ExpectAsset' + value: V3MultiAsset[] +} + +export interface V3Instruction_ExpectError { + __kind: 'ExpectError' + value?: ([number, V3Error] | undefined) +} + +export interface V3Instruction_ExpectOrigin { + __kind: 'ExpectOrigin' + value?: (V3MultiLocation | undefined) +} + +export interface V3Instruction_ExpectPallet { + __kind: 'ExpectPallet' + index: number + name: Bytes + moduleName: Bytes + crateMajor: number + minCrateMinor: number +} + +export interface V3Instruction_ExpectTransactStatus { + __kind: 'ExpectTransactStatus' + value: V3MaybeErrorCode +} + +export interface V3Instruction_ExportMessage { + __kind: 'ExportMessage' + network: V3NetworkId + destination: V3Junctions + xcm: V3Instruction[] +} + +export interface V3Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V3Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V3Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V3Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V3MultiAssetFilter + reserve: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_LockAsset { + __kind: 'LockAsset' + asset: V3MultiAsset + unlocker: V3MultiLocation +} + +export interface V3Instruction_NoteUnlockable { + __kind: 'NoteUnlockable' + asset: V3MultiAsset + owner: V3MultiLocation +} + +export interface V3Instruction_QueryPallet { + __kind: 'QueryPallet' + moduleName: Bytes + responseInfo: V3QueryResponseInfo +} + +export interface V3Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V3Response + maxWeight: Weight + querier?: (V3MultiLocation | undefined) +} + +export interface V3Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V3MultiAsset[] +} + +export interface V3Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V3Instruction_ReportError { + __kind: 'ReportError' + value: V3QueryResponseInfo +} + +export interface V3Instruction_ReportHolding { + __kind: 'ReportHolding' + responseInfo: V3QueryResponseInfo + assets: V3MultiAssetFilter +} + +export interface V3Instruction_ReportTransactStatus { + __kind: 'ReportTransactStatus' + value: V3QueryResponseInfo +} + +export interface V3Instruction_RequestUnlock { + __kind: 'RequestUnlock' + asset: V3MultiAsset + locker: V3MultiLocation +} + +export interface V3Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V3MultiAsset[] +} + +export interface V3Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V3Instruction[] +} + +export interface V3Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V3Instruction[] +} + +export interface V3Instruction_SetFeesMode { + __kind: 'SetFeesMode' + jitWithdraw: boolean +} + +export interface V3Instruction_SetTopic { + __kind: 'SetTopic' + value: Bytes +} + +export interface V3Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: Weight +} + +export interface V3Instruction_Transact { + __kind: 'Transact' + originKind: V2OriginKind + requireWeightAtMost: Weight + call: DoubleEncoded +} + +export interface V3Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V3MultiAsset[] + beneficiary: V3MultiLocation +} + +export interface V3Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V3MultiAsset[] + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V3Instruction_UniversalOrigin { + __kind: 'UniversalOrigin' + value: V3Junction +} + +export interface V3Instruction_UnlockAsset { + __kind: 'UnlockAsset' + asset: V3MultiAsset + target: V3MultiLocation +} + +export interface V3Instruction_UnpaidExecution { + __kind: 'UnpaidExecution' + weightLimit: V3WeightLimit + checkOrigin?: (V3MultiLocation | undefined) +} + +export interface V3Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V3Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V3MultiAsset[] +} + +export const V2Instruction: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V2MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + ticket: V2MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V2MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V2Junctions, + ExchangeAsset: sts.enumStruct({ + give: V2MultiAssetFilter, + receive: sts.array(() => V2MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V2MultiAssetFilter, + reserve: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V2MultiAssetFilter, + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + assets: V2MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V2MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V2MultiAsset), + SetAppendix: sts.array(() => V2Instruction), + SetErrorHandler: sts.array(() => V2Instruction), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V2OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + beneficiary: V2MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V2MultiAsset), + } +}) + +export const V2Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V2MultiAsset), + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V2Error])), + Null: sts.unit(), + Version: sts.number(), + } +}) + +export const V2Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + MaxWeightInvalid: sts.unit(), + MultiLocationFull: sts.unit(), + MultiLocationNotInvertible: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + WeightLimitReached: sts.bigint(), + WeightNotComputable: sts.unit(), + } +}) + +export type V2Error = V2Error_AssetNotFound | V2Error_BadOrigin | V2Error_Barrier | V2Error_DestinationUnsupported | V2Error_ExceedsMaxMessageSize | V2Error_FailedToDecode | V2Error_FailedToTransactAsset | V2Error_InvalidLocation | V2Error_LocationCannotHold | V2Error_MaxWeightInvalid | V2Error_MultiLocationFull | V2Error_MultiLocationNotInvertible | V2Error_NotHoldingFees | V2Error_NotWithdrawable | V2Error_Overflow | V2Error_TooExpensive | V2Error_Transport | V2Error_Trap | V2Error_UnhandledXcmVersion | V2Error_Unimplemented | V2Error_UnknownClaim | V2Error_Unroutable | V2Error_UntrustedReserveLocation | V2Error_UntrustedTeleportLocation | V2Error_WeightLimitReached | V2Error_WeightNotComputable + +export interface V2Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V2Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V2Error_Barrier { + __kind: 'Barrier' +} + +export interface V2Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V2Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V2Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V2Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V2Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V2Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V2Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V2Error_MultiLocationFull { + __kind: 'MultiLocationFull' +} + +export interface V2Error_MultiLocationNotInvertible { + __kind: 'MultiLocationNotInvertible' +} + +export interface V2Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V2Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V2Error_Overflow { + __kind: 'Overflow' +} + +export interface V2Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V2Error_Transport { + __kind: 'Transport' +} + +export interface V2Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V2Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V2Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V2Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V2Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V2Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V2Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: bigint +} + +export interface V2Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V2Response = V2Response_Assets | V2Response_ExecutionResult | V2Response_Null | V2Response_Version + +export interface V2Response_Assets { + __kind: 'Assets' + value: V2MultiAsset[] +} + +export interface V2Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V2Error] | undefined) +} + +export interface V2Response_Null { + __kind: 'Null' +} + +export interface V2Response_Version { + __kind: 'Version' + value: number +} + +export interface V2MultiAsset { + id: V2AssetId + fun: V2Fungibility +} + +export type V2Fungibility = V2Fungibility_Fungible | V2Fungibility_NonFungible + +export interface V2Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V2Fungibility_NonFungible { + __kind: 'NonFungible' + value: V2AssetInstance +} + +export type V2AssetInstance = V2AssetInstance_Array16 | V2AssetInstance_Array32 | V2AssetInstance_Array4 | V2AssetInstance_Array8 | V2AssetInstance_Blob | V2AssetInstance_Index | V2AssetInstance_Undefined + +export interface V2AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V2AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V2AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V2AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V2AssetInstance_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface V2AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V2AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V2AssetId = V2AssetId_Abstract | V2AssetId_Concrete + +export interface V2AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V2AssetId_Concrete { + __kind: 'Concrete' + value: V2MultiLocation +} + +export interface V2MultiLocation { + parents: number + interior: V2Junctions +} + +export type V2Junctions = V2Junctions_Here | V2Junctions_X1 | V2Junctions_X2 | V2Junctions_X3 | V2Junctions_X4 | V2Junctions_X5 | V2Junctions_X6 | V2Junctions_X7 | V2Junctions_X8 + +export interface V2Junctions_Here { + __kind: 'Here' +} + +export interface V2Junctions_X1 { + __kind: 'X1' + value: V2Junction +} + +export interface V2Junctions_X2 { + __kind: 'X2' + value: [V2Junction, V2Junction] +} + +export interface V2Junctions_X3 { + __kind: 'X3' + value: [V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X4 { + __kind: 'X4' + value: [V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X5 { + __kind: 'X5' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X6 { + __kind: 'X6' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X7 { + __kind: 'X7' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X8 { + __kind: 'X8' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export type V2Junction = V2Junction_AccountId32 | V2Junction_AccountIndex64 | V2Junction_AccountKey20 | V2Junction_GeneralIndex | V2Junction_GeneralKey | V2Junction_OnlyChild | V2Junction_PalletInstance | V2Junction_Parachain | V2Junction_Plurality + +export interface V2Junction_AccountId32 { + __kind: 'AccountId32' + network: V2NetworkId + id: Bytes +} + +export interface V2Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V2NetworkId + index: bigint +} + +export interface V2Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V2NetworkId + key: Bytes +} + +export interface V2Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V2Junction_GeneralKey { + __kind: 'GeneralKey' + value: WeakBoundedVec +} + +export interface V2Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V2Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V2Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V2Junction_Plurality { + __kind: 'Plurality' + id: V2BodyId + part: V2BodyPart +} + +export type V2BodyPart = V2BodyPart_AtLeastProportion | V2BodyPart_Fraction | V2BodyPart_Members | V2BodyPart_MoreThanProportion | V2BodyPart_Voice + +export interface V2BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V2BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V2BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V2BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V2BodyPart_Voice { + __kind: 'Voice' +} + +export type V2BodyId = V2BodyId_Administration | V2BodyId_Defense | V2BodyId_Executive | V2BodyId_Index | V2BodyId_Judicial | V2BodyId_Legislative | V2BodyId_Named | V2BodyId_Technical | V2BodyId_Treasury | V2BodyId_Unit + +export interface V2BodyId_Administration { + __kind: 'Administration' +} + +export interface V2BodyId_Defense { + __kind: 'Defense' +} + +export interface V2BodyId_Executive { + __kind: 'Executive' +} + +export interface V2BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V2BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V2BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V2BodyId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V2BodyId_Technical { + __kind: 'Technical' +} + +export interface V2BodyId_Treasury { + __kind: 'Treasury' +} + +export interface V2BodyId_Unit { + __kind: 'Unit' +} + +export type WeakBoundedVec = Bytes + +export type V2NetworkId = V2NetworkId_Any | V2NetworkId_Kusama | V2NetworkId_Named | V2NetworkId_Polkadot + +export interface V2NetworkId_Any { + __kind: 'Any' +} + +export interface V2NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V2NetworkId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V2NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export const V2Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V2Junction, + X2: sts.tuple(() => [V2Junction, V2Junction]), + X3: sts.tuple(() => [V2Junction, V2Junction, V2Junction]), + X4: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction]), + X5: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + X6: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + X7: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + X8: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + } +}) + +export const V2Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V2NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V2NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V2NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: WeakBoundedVec, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V2BodyId, + part: V2BodyPart, + }), + } +}) + +export const V2BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export const V2BodyId: sts.Type = sts.closedEnum(() => { + return { + Administration: sts.unit(), + Defense: sts.unit(), + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: WeakBoundedVec, + Technical: sts.unit(), + Treasury: sts.unit(), + Unit: sts.unit(), + } +}) + +export const WeakBoundedVec = sts.bytes() + +export const V2NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: WeakBoundedVec, + Polkadot: sts.unit(), + } +}) + +export const V2MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V2MultiAsset), + Wild: V2WildMultiAsset, + } +}) + +export const V2WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllOf: sts.enumStruct({ + id: V2AssetId, + fun: V2WildFungibility, + }), + } +}) + +export const V2WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V2WildFungibility = V2WildFungibility_Fungible | V2WildFungibility_NonFungible + +export interface V2WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V2WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V2AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V2MultiLocation, + } +}) + +export type V2WildMultiAsset = V2WildMultiAsset_All | V2WildMultiAsset_AllOf + +export interface V2WildMultiAsset_All { + __kind: 'All' +} + +export interface V2WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V2AssetId + fun: V2WildFungibility +} + +export type V2MultiAssetFilter = V2MultiAssetFilter_Definite | V2MultiAssetFilter_Wild + +export interface V2MultiAssetFilter_Definite { + __kind: 'Definite' + value: V2MultiAsset[] +} + +export interface V2MultiAssetFilter_Wild { + __kind: 'Wild' + value: V2WildMultiAsset +} + +export const V2MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V2Junctions, + } +}) + +export const V2WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: sts.bigint(), + Unlimited: sts.unit(), + } +}) + +export type V2WeightLimit = V2WeightLimit_Limited | V2WeightLimit_Unlimited + +export interface V2WeightLimit_Limited { + __kind: 'Limited' + value: bigint +} + +export interface V2WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V2MultiAsset: sts.Type = sts.struct(() => { + return { + id: V2AssetId, + fun: V2Fungibility, + } +}) + +export const V2Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V2AssetInstance, + } +}) + +export const V2AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V2Instruction = V2Instruction_BuyExecution | V2Instruction_ClaimAsset | V2Instruction_ClearError | V2Instruction_ClearOrigin | V2Instruction_DepositAsset | V2Instruction_DepositReserveAsset | V2Instruction_DescendOrigin | V2Instruction_ExchangeAsset | V2Instruction_HrmpChannelAccepted | V2Instruction_HrmpChannelClosing | V2Instruction_HrmpNewChannelOpenRequest | V2Instruction_InitiateReserveWithdraw | V2Instruction_InitiateTeleport | V2Instruction_QueryHolding | V2Instruction_QueryResponse | V2Instruction_ReceiveTeleportedAsset | V2Instruction_RefundSurplus | V2Instruction_ReportError | V2Instruction_ReserveAssetDeposited | V2Instruction_SetAppendix | V2Instruction_SetErrorHandler | V2Instruction_SubscribeVersion | V2Instruction_Transact | V2Instruction_TransferAsset | V2Instruction_TransferReserveAsset | V2Instruction_Trap | V2Instruction_UnsubscribeVersion | V2Instruction_WithdrawAsset + +export interface V2Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V2MultiAsset + weightLimit: V2WeightLimit +} + +export interface V2Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V2MultiAsset[] + ticket: V2MultiLocation +} + +export interface V2Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V2Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V2Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V2MultiAssetFilter + maxAssets: number + beneficiary: V2MultiLocation +} + +export interface V2Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V2MultiAssetFilter + maxAssets: number + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V2Junctions +} + +export interface V2Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V2MultiAssetFilter + receive: V2MultiAsset[] +} + +export interface V2Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V2Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V2Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V2Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V2MultiAssetFilter + reserve: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V2MultiAssetFilter + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V2MultiLocation + assets: V2MultiAssetFilter + maxResponseWeight: bigint +} + +export interface V2Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface V2Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V2MultiAsset[] +} + +export interface V2Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V2Instruction_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V2MultiLocation + maxResponseWeight: bigint +} + +export interface V2Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V2MultiAsset[] +} + +export interface V2Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V2Instruction[] +} + +export interface V2Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V2Instruction[] +} + +export interface V2Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V2Instruction_Transact { + __kind: 'Transact' + originType: V2OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V2Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V2MultiAsset[] + beneficiary: V2MultiLocation +} + +export interface V2Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V2MultiAsset[] + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V2Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V2MultiAsset[] +} + +export type VersionedXcm = VersionedXcm_V2 | VersionedXcm_V3 | VersionedXcm_V4 + +export interface VersionedXcm_V2 { + __kind: 'V2' + value: V2Instruction[] +} + +export interface VersionedXcm_V3 { + __kind: 'V3' + value: V3Instruction[] +} + +export interface VersionedXcm_V4 { + __kind: 'V4' + value: V4Instruction[] +} + +export const V3WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: Weight, + Unlimited: sts.unit(), + } +}) + +export const V4Location: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V4Junctions, + } +}) + +export const Type_480: sts.Type = sts.closedEnum(() => { + return { + V2: sts.array(() => Type_483), + V3: sts.array(() => Type_487), + V4: sts.array(() => Type_490), + } +}) + +export const Type_490: sts.Type = sts.closedEnum(() => { + return { + AliasOrigin: V4Location, + BurnAsset: sts.array(() => V4Asset), + BuyExecution: sts.enumStruct({ + fees: V4Asset, + weightLimit: V3WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V4Asset), + ticket: V4Location, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + ClearTopic: sts.unit(), + ClearTransactStatus: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V4AssetFilter, + beneficiary: V4Location, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V4AssetFilter, + dest: V4Location, + xcm: sts.array(() => V4Instruction), + }), + DescendOrigin: V4Junctions, + ExchangeAsset: sts.enumStruct({ + give: V4AssetFilter, + want: sts.array(() => V4Asset), + maximal: sts.boolean(), + }), + ExpectAsset: sts.array(() => V4Asset), + ExpectError: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + ExpectOrigin: sts.option(() => V4Location), + ExpectPallet: sts.enumStruct({ + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + crateMajor: sts.number(), + minCrateMinor: sts.number(), + }), + ExpectTransactStatus: V3MaybeErrorCode, + ExportMessage: sts.enumStruct({ + network: V4NetworkId, + destination: V4Junctions, + xcm: sts.array(() => V4Instruction), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V4AssetFilter, + reserve: V4Location, + xcm: sts.array(() => V4Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V4AssetFilter, + dest: V4Location, + xcm: sts.array(() => V4Instruction), + }), + LockAsset: sts.enumStruct({ + asset: V4Asset, + unlocker: V4Location, + }), + NoteUnlockable: sts.enumStruct({ + asset: V4Asset, + owner: V4Location, + }), + QueryPallet: sts.enumStruct({ + moduleName: sts.bytes(), + responseInfo: V4QueryResponseInfo, + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V4Response, + maxWeight: Weight, + querier: sts.option(() => V4Location), + }), + ReceiveTeleportedAsset: sts.array(() => V4Asset), + RefundSurplus: sts.unit(), + ReportError: V4QueryResponseInfo, + ReportHolding: sts.enumStruct({ + responseInfo: V4QueryResponseInfo, + assets: V4AssetFilter, + }), + ReportTransactStatus: V4QueryResponseInfo, + RequestUnlock: sts.enumStruct({ + asset: V4Asset, + locker: V4Location, + }), + ReserveAssetDeposited: sts.array(() => V4Asset), + SetAppendix: sts.array(() => Type_490), + SetErrorHandler: sts.array(() => Type_490), + SetFeesMode: sts.enumStruct({ + jitWithdraw: sts.boolean(), + }), + SetTopic: sts.bytes(), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: Weight, + }), + Transact: sts.enumStruct({ + originKind: V2OriginKind, + requireWeightAtMost: Weight, + call: Type_484, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V4Asset), + beneficiary: V4Location, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V4Asset), + dest: V4Location, + xcm: sts.array(() => V4Instruction), + }), + Trap: sts.bigint(), + UniversalOrigin: V4Junction, + UnlockAsset: sts.enumStruct({ + asset: V4Asset, + target: V4Location, + }), + UnpaidExecution: sts.enumStruct({ + weightLimit: V3WeightLimit, + checkOrigin: sts.option(() => V4Location), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V4Asset), + } +}) + +export const Type_484: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface Type_484 { + encoded: Bytes +} + +export type Type_490 = Type_490_AliasOrigin | Type_490_BurnAsset | Type_490_BuyExecution | Type_490_ClaimAsset | Type_490_ClearError | Type_490_ClearOrigin | Type_490_ClearTopic | Type_490_ClearTransactStatus | Type_490_DepositAsset | Type_490_DepositReserveAsset | Type_490_DescendOrigin | Type_490_ExchangeAsset | Type_490_ExpectAsset | Type_490_ExpectError | Type_490_ExpectOrigin | Type_490_ExpectPallet | Type_490_ExpectTransactStatus | Type_490_ExportMessage | Type_490_HrmpChannelAccepted | Type_490_HrmpChannelClosing | Type_490_HrmpNewChannelOpenRequest | Type_490_InitiateReserveWithdraw | Type_490_InitiateTeleport | Type_490_LockAsset | Type_490_NoteUnlockable | Type_490_QueryPallet | Type_490_QueryResponse | Type_490_ReceiveTeleportedAsset | Type_490_RefundSurplus | Type_490_ReportError | Type_490_ReportHolding | Type_490_ReportTransactStatus | Type_490_RequestUnlock | Type_490_ReserveAssetDeposited | Type_490_SetAppendix | Type_490_SetErrorHandler | Type_490_SetFeesMode | Type_490_SetTopic | Type_490_SubscribeVersion | Type_490_Transact | Type_490_TransferAsset | Type_490_TransferReserveAsset | Type_490_Trap | Type_490_UniversalOrigin | Type_490_UnlockAsset | Type_490_UnpaidExecution | Type_490_UnsubscribeVersion | Type_490_WithdrawAsset + +export interface Type_490_AliasOrigin { + __kind: 'AliasOrigin' + value: V4Location +} + +export interface Type_490_BurnAsset { + __kind: 'BurnAsset' + value: V4Asset[] +} + +export interface Type_490_BuyExecution { + __kind: 'BuyExecution' + fees: V4Asset + weightLimit: V3WeightLimit +} + +export interface Type_490_ClaimAsset { + __kind: 'ClaimAsset' + assets: V4Asset[] + ticket: V4Location +} + +export interface Type_490_ClearError { + __kind: 'ClearError' +} + +export interface Type_490_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_490_ClearTopic { + __kind: 'ClearTopic' +} + +export interface Type_490_ClearTransactStatus { + __kind: 'ClearTransactStatus' +} + +export interface Type_490_DepositAsset { + __kind: 'DepositAsset' + assets: V4AssetFilter + beneficiary: V4Location +} + +export interface Type_490_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V4AssetFilter + dest: V4Location + xcm: V4Instruction[] +} + +export interface Type_490_DescendOrigin { + __kind: 'DescendOrigin' + value: V4Junctions +} + +export interface Type_490_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V4AssetFilter + want: V4Asset[] + maximal: boolean +} + +export interface Type_490_ExpectAsset { + __kind: 'ExpectAsset' + value: V4Asset[] +} + +export interface Type_490_ExpectError { + __kind: 'ExpectError' + value?: ([number, V3Error] | undefined) +} + +export interface Type_490_ExpectOrigin { + __kind: 'ExpectOrigin' + value?: (V4Location | undefined) +} + +export interface Type_490_ExpectPallet { + __kind: 'ExpectPallet' + index: number + name: Bytes + moduleName: Bytes + crateMajor: number + minCrateMinor: number +} + +export interface Type_490_ExpectTransactStatus { + __kind: 'ExpectTransactStatus' + value: V3MaybeErrorCode +} + +export interface Type_490_ExportMessage { + __kind: 'ExportMessage' + network: V4NetworkId + destination: V4Junctions + xcm: V4Instruction[] +} + +export interface Type_490_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_490_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_490_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_490_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V4AssetFilter + reserve: V4Location + xcm: V4Instruction[] +} + +export interface Type_490_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V4AssetFilter + dest: V4Location + xcm: V4Instruction[] +} + +export interface Type_490_LockAsset { + __kind: 'LockAsset' + asset: V4Asset + unlocker: V4Location +} + +export interface Type_490_NoteUnlockable { + __kind: 'NoteUnlockable' + asset: V4Asset + owner: V4Location +} + +export interface Type_490_QueryPallet { + __kind: 'QueryPallet' + moduleName: Bytes + responseInfo: V4QueryResponseInfo +} + +export interface Type_490_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V4Response + maxWeight: Weight + querier?: (V4Location | undefined) +} + +export interface Type_490_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V4Asset[] +} + +export interface Type_490_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_490_ReportError { + __kind: 'ReportError' + value: V4QueryResponseInfo +} + +export interface Type_490_ReportHolding { + __kind: 'ReportHolding' + responseInfo: V4QueryResponseInfo + assets: V4AssetFilter +} + +export interface Type_490_ReportTransactStatus { + __kind: 'ReportTransactStatus' + value: V4QueryResponseInfo +} + +export interface Type_490_RequestUnlock { + __kind: 'RequestUnlock' + asset: V4Asset + locker: V4Location +} + +export interface Type_490_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V4Asset[] +} + +export interface Type_490_SetAppendix { + __kind: 'SetAppendix' + value: Type_490[] +} + +export interface Type_490_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_490[] +} + +export interface Type_490_SetFeesMode { + __kind: 'SetFeesMode' + jitWithdraw: boolean +} + +export interface Type_490_SetTopic { + __kind: 'SetTopic' + value: Bytes +} + +export interface Type_490_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: Weight +} + +export interface Type_490_Transact { + __kind: 'Transact' + originKind: V2OriginKind + requireWeightAtMost: Weight + call: Type_484 +} + +export interface Type_490_TransferAsset { + __kind: 'TransferAsset' + assets: V4Asset[] + beneficiary: V4Location +} + +export interface Type_490_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V4Asset[] + dest: V4Location + xcm: V4Instruction[] +} + +export interface Type_490_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_490_UniversalOrigin { + __kind: 'UniversalOrigin' + value: V4Junction +} + +export interface Type_490_UnlockAsset { + __kind: 'UnlockAsset' + asset: V4Asset + target: V4Location +} + +export interface Type_490_UnpaidExecution { + __kind: 'UnpaidExecution' + weightLimit: V3WeightLimit + checkOrigin?: (V4Location | undefined) +} + +export interface Type_490_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_490_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V4Asset[] +} + +export const Type_487: sts.Type = sts.closedEnum(() => { + return { + AliasOrigin: V3MultiLocation, + BurnAsset: sts.array(() => V3MultiAsset), + BuyExecution: sts.enumStruct({ + fees: V3MultiAsset, + weightLimit: V3WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + ticket: V3MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + ClearTopic: sts.unit(), + ClearTransactStatus: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + beneficiary: V3MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + DescendOrigin: V3Junctions, + ExchangeAsset: sts.enumStruct({ + give: V3MultiAssetFilter, + want: sts.array(() => V3MultiAsset), + maximal: sts.boolean(), + }), + ExpectAsset: sts.array(() => V3MultiAsset), + ExpectError: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + ExpectOrigin: sts.option(() => V3MultiLocation), + ExpectPallet: sts.enumStruct({ + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + crateMajor: sts.number(), + minCrateMinor: sts.number(), + }), + ExpectTransactStatus: V3MaybeErrorCode, + ExportMessage: sts.enumStruct({ + network: V3NetworkId, + destination: V3Junctions, + xcm: sts.array(() => V3Instruction), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V3MultiAssetFilter, + reserve: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + LockAsset: sts.enumStruct({ + asset: V3MultiAsset, + unlocker: V3MultiLocation, + }), + NoteUnlockable: sts.enumStruct({ + asset: V3MultiAsset, + owner: V3MultiLocation, + }), + QueryPallet: sts.enumStruct({ + moduleName: sts.bytes(), + responseInfo: V3QueryResponseInfo, + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V3Response, + maxWeight: Weight, + querier: sts.option(() => V3MultiLocation), + }), + ReceiveTeleportedAsset: sts.array(() => V3MultiAsset), + RefundSurplus: sts.unit(), + ReportError: V3QueryResponseInfo, + ReportHolding: sts.enumStruct({ + responseInfo: V3QueryResponseInfo, + assets: V3MultiAssetFilter, + }), + ReportTransactStatus: V3QueryResponseInfo, + RequestUnlock: sts.enumStruct({ + asset: V3MultiAsset, + locker: V3MultiLocation, + }), + ReserveAssetDeposited: sts.array(() => V3MultiAsset), + SetAppendix: sts.array(() => Type_487), + SetErrorHandler: sts.array(() => Type_487), + SetFeesMode: sts.enumStruct({ + jitWithdraw: sts.boolean(), + }), + SetTopic: sts.bytes(), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: Weight, + }), + Transact: sts.enumStruct({ + originKind: V2OriginKind, + requireWeightAtMost: Weight, + call: Type_484, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + beneficiary: V3MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + Trap: sts.bigint(), + UniversalOrigin: V3Junction, + UnlockAsset: sts.enumStruct({ + asset: V3MultiAsset, + target: V3MultiLocation, + }), + UnpaidExecution: sts.enumStruct({ + weightLimit: V3WeightLimit, + checkOrigin: sts.option(() => V3MultiLocation), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V3MultiAsset), + } +}) + +export type Type_487 = Type_487_AliasOrigin | Type_487_BurnAsset | Type_487_BuyExecution | Type_487_ClaimAsset | Type_487_ClearError | Type_487_ClearOrigin | Type_487_ClearTopic | Type_487_ClearTransactStatus | Type_487_DepositAsset | Type_487_DepositReserveAsset | Type_487_DescendOrigin | Type_487_ExchangeAsset | Type_487_ExpectAsset | Type_487_ExpectError | Type_487_ExpectOrigin | Type_487_ExpectPallet | Type_487_ExpectTransactStatus | Type_487_ExportMessage | Type_487_HrmpChannelAccepted | Type_487_HrmpChannelClosing | Type_487_HrmpNewChannelOpenRequest | Type_487_InitiateReserveWithdraw | Type_487_InitiateTeleport | Type_487_LockAsset | Type_487_NoteUnlockable | Type_487_QueryPallet | Type_487_QueryResponse | Type_487_ReceiveTeleportedAsset | Type_487_RefundSurplus | Type_487_ReportError | Type_487_ReportHolding | Type_487_ReportTransactStatus | Type_487_RequestUnlock | Type_487_ReserveAssetDeposited | Type_487_SetAppendix | Type_487_SetErrorHandler | Type_487_SetFeesMode | Type_487_SetTopic | Type_487_SubscribeVersion | Type_487_Transact | Type_487_TransferAsset | Type_487_TransferReserveAsset | Type_487_Trap | Type_487_UniversalOrigin | Type_487_UnlockAsset | Type_487_UnpaidExecution | Type_487_UnsubscribeVersion | Type_487_WithdrawAsset + +export interface Type_487_AliasOrigin { + __kind: 'AliasOrigin' + value: V3MultiLocation +} + +export interface Type_487_BurnAsset { + __kind: 'BurnAsset' + value: V3MultiAsset[] +} + +export interface Type_487_BuyExecution { + __kind: 'BuyExecution' + fees: V3MultiAsset + weightLimit: V3WeightLimit +} + +export interface Type_487_ClaimAsset { + __kind: 'ClaimAsset' + assets: V3MultiAsset[] + ticket: V3MultiLocation +} + +export interface Type_487_ClearError { + __kind: 'ClearError' +} + +export interface Type_487_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_487_ClearTopic { + __kind: 'ClearTopic' +} + +export interface Type_487_ClearTransactStatus { + __kind: 'ClearTransactStatus' +} + +export interface Type_487_DepositAsset { + __kind: 'DepositAsset' + assets: V3MultiAssetFilter + beneficiary: V3MultiLocation +} + +export interface Type_487_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_487_DescendOrigin { + __kind: 'DescendOrigin' + value: V3Junctions +} + +export interface Type_487_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V3MultiAssetFilter + want: V3MultiAsset[] + maximal: boolean +} + +export interface Type_487_ExpectAsset { + __kind: 'ExpectAsset' + value: V3MultiAsset[] +} + +export interface Type_487_ExpectError { + __kind: 'ExpectError' + value?: ([number, V3Error] | undefined) +} + +export interface Type_487_ExpectOrigin { + __kind: 'ExpectOrigin' + value?: (V3MultiLocation | undefined) +} + +export interface Type_487_ExpectPallet { + __kind: 'ExpectPallet' + index: number + name: Bytes + moduleName: Bytes + crateMajor: number + minCrateMinor: number +} + +export interface Type_487_ExpectTransactStatus { + __kind: 'ExpectTransactStatus' + value: V3MaybeErrorCode +} + +export interface Type_487_ExportMessage { + __kind: 'ExportMessage' + network: V3NetworkId + destination: V3Junctions + xcm: V3Instruction[] +} + +export interface Type_487_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_487_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_487_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_487_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V3MultiAssetFilter + reserve: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_487_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_487_LockAsset { + __kind: 'LockAsset' + asset: V3MultiAsset + unlocker: V3MultiLocation +} + +export interface Type_487_NoteUnlockable { + __kind: 'NoteUnlockable' + asset: V3MultiAsset + owner: V3MultiLocation +} + +export interface Type_487_QueryPallet { + __kind: 'QueryPallet' + moduleName: Bytes + responseInfo: V3QueryResponseInfo +} + +export interface Type_487_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V3Response + maxWeight: Weight + querier?: (V3MultiLocation | undefined) +} + +export interface Type_487_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V3MultiAsset[] +} + +export interface Type_487_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_487_ReportError { + __kind: 'ReportError' + value: V3QueryResponseInfo +} + +export interface Type_487_ReportHolding { + __kind: 'ReportHolding' + responseInfo: V3QueryResponseInfo + assets: V3MultiAssetFilter +} + +export interface Type_487_ReportTransactStatus { + __kind: 'ReportTransactStatus' + value: V3QueryResponseInfo +} + +export interface Type_487_RequestUnlock { + __kind: 'RequestUnlock' + asset: V3MultiAsset + locker: V3MultiLocation +} + +export interface Type_487_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V3MultiAsset[] +} + +export interface Type_487_SetAppendix { + __kind: 'SetAppendix' + value: Type_487[] +} + +export interface Type_487_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_487[] +} + +export interface Type_487_SetFeesMode { + __kind: 'SetFeesMode' + jitWithdraw: boolean +} + +export interface Type_487_SetTopic { + __kind: 'SetTopic' + value: Bytes +} + +export interface Type_487_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: Weight +} + +export interface Type_487_Transact { + __kind: 'Transact' + originKind: V2OriginKind + requireWeightAtMost: Weight + call: Type_484 +} + +export interface Type_487_TransferAsset { + __kind: 'TransferAsset' + assets: V3MultiAsset[] + beneficiary: V3MultiLocation +} + +export interface Type_487_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V3MultiAsset[] + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_487_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_487_UniversalOrigin { + __kind: 'UniversalOrigin' + value: V3Junction +} + +export interface Type_487_UnlockAsset { + __kind: 'UnlockAsset' + asset: V3MultiAsset + target: V3MultiLocation +} + +export interface Type_487_UnpaidExecution { + __kind: 'UnpaidExecution' + weightLimit: V3WeightLimit + checkOrigin?: (V3MultiLocation | undefined) +} + +export interface Type_487_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_487_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V3MultiAsset[] +} + +export const Type_483: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V2MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + ticket: V2MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V2MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V2Junctions, + ExchangeAsset: sts.enumStruct({ + give: V2MultiAssetFilter, + receive: sts.array(() => V2MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V2MultiAssetFilter, + reserve: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V2MultiAssetFilter, + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + assets: V2MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V2MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V2MultiAsset), + SetAppendix: sts.array(() => Type_483), + SetErrorHandler: sts.array(() => Type_483), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V2OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_484, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + beneficiary: V2MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V2MultiAsset), + } +}) + +export type Type_483 = Type_483_BuyExecution | Type_483_ClaimAsset | Type_483_ClearError | Type_483_ClearOrigin | Type_483_DepositAsset | Type_483_DepositReserveAsset | Type_483_DescendOrigin | Type_483_ExchangeAsset | Type_483_HrmpChannelAccepted | Type_483_HrmpChannelClosing | Type_483_HrmpNewChannelOpenRequest | Type_483_InitiateReserveWithdraw | Type_483_InitiateTeleport | Type_483_QueryHolding | Type_483_QueryResponse | Type_483_ReceiveTeleportedAsset | Type_483_RefundSurplus | Type_483_ReportError | Type_483_ReserveAssetDeposited | Type_483_SetAppendix | Type_483_SetErrorHandler | Type_483_SubscribeVersion | Type_483_Transact | Type_483_TransferAsset | Type_483_TransferReserveAsset | Type_483_Trap | Type_483_UnsubscribeVersion | Type_483_WithdrawAsset + +export interface Type_483_BuyExecution { + __kind: 'BuyExecution' + fees: V2MultiAsset + weightLimit: V2WeightLimit +} + +export interface Type_483_ClaimAsset { + __kind: 'ClaimAsset' + assets: V2MultiAsset[] + ticket: V2MultiLocation +} + +export interface Type_483_ClearError { + __kind: 'ClearError' +} + +export interface Type_483_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_483_DepositAsset { + __kind: 'DepositAsset' + assets: V2MultiAssetFilter + maxAssets: number + beneficiary: V2MultiLocation +} + +export interface Type_483_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V2MultiAssetFilter + maxAssets: number + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_483_DescendOrigin { + __kind: 'DescendOrigin' + value: V2Junctions +} + +export interface Type_483_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V2MultiAssetFilter + receive: V2MultiAsset[] +} + +export interface Type_483_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_483_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_483_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_483_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V2MultiAssetFilter + reserve: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_483_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V2MultiAssetFilter + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_483_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V2MultiLocation + assets: V2MultiAssetFilter + maxResponseWeight: bigint +} + +export interface Type_483_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface Type_483_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V2MultiAsset[] +} + +export interface Type_483_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_483_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V2MultiLocation + maxResponseWeight: bigint +} + +export interface Type_483_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V2MultiAsset[] +} + +export interface Type_483_SetAppendix { + __kind: 'SetAppendix' + value: Type_483[] +} + +export interface Type_483_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_483[] +} + +export interface Type_483_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_483_Transact { + __kind: 'Transact' + originType: V2OriginKind + requireWeightAtMost: bigint + call: Type_484 +} + +export interface Type_483_TransferAsset { + __kind: 'TransferAsset' + assets: V2MultiAsset[] + beneficiary: V2MultiLocation +} + +export interface Type_483_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V2MultiAsset[] + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_483_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_483_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_483_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V2MultiAsset[] +} + +export type Type_480 = Type_480_V2 | Type_480_V3 | Type_480_V4 + +export interface Type_480_V2 { + __kind: 'V2' + value: Type_483[] +} + +export interface Type_480_V3 { + __kind: 'V3' + value: Type_487[] +} + +export interface Type_480_V4 { + __kind: 'V4' + value: Type_490[] +} + +export const VersionedLocation: sts.Type = sts.closedEnum(() => { + return { + V2: V2MultiLocation, + V3: V3MultiLocation, + V4: V4Location, + } +}) + +export type VersionedLocation = VersionedLocation_V2 | VersionedLocation_V3 | VersionedLocation_V4 + +export interface VersionedLocation_V2 { + __kind: 'V2' + value: V2MultiLocation +} + +export interface VersionedLocation_V3 { + __kind: 'V3' + value: V3MultiLocation +} + +export interface VersionedLocation_V4 { + __kind: 'V4' + value: V4Location +} + +export const VersionedAssets: sts.Type = sts.closedEnum(() => { + return { + V2: sts.array(() => V2MultiAsset), + V3: sts.array(() => V3MultiAsset), + V4: sts.array(() => V4Asset), + } +}) + +export type VersionedAssets = VersionedAssets_V2 | VersionedAssets_V3 | VersionedAssets_V4 + +export interface VersionedAssets_V2 { + __kind: 'V2' + value: V2MultiAsset[] +} + +export interface VersionedAssets_V3 { + __kind: 'V3' + value: V3MultiAsset[] +} + +export interface VersionedAssets_V4 { + __kind: 'V4' + value: V4Asset[] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type XcmPalletCall = XcmPalletCall_claim_assets | XcmPalletCall_execute | XcmPalletCall_force_default_xcm_version | XcmPalletCall_force_subscribe_version_notify | XcmPalletCall_force_suspension | XcmPalletCall_force_unsubscribe_version_notify | XcmPalletCall_force_xcm_version | XcmPalletCall_limited_reserve_transfer_assets | XcmPalletCall_limited_teleport_assets | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets | XcmPalletCall_transfer_assets + +/** + * See [`Pallet::claim_assets`]. + */ +export interface XcmPalletCall_claim_assets { + __kind: 'claim_assets' + assets: VersionedAssets + beneficiary: VersionedLocation +} + +/** + * See [`Pallet::execute`]. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Type_480 + maxWeight: Weight +} + +/** + * See [`Pallet::force_default_xcm_version`]. + */ +export interface XcmPalletCall_force_default_xcm_version { + __kind: 'force_default_xcm_version' + maybeXcmVersion?: (number | undefined) +} + +/** + * See [`Pallet::force_subscribe_version_notify`]. + */ +export interface XcmPalletCall_force_subscribe_version_notify { + __kind: 'force_subscribe_version_notify' + location: VersionedLocation +} + +/** + * See [`Pallet::force_suspension`]. + */ +export interface XcmPalletCall_force_suspension { + __kind: 'force_suspension' + suspended: boolean +} + +/** + * See [`Pallet::force_unsubscribe_version_notify`]. + */ +export interface XcmPalletCall_force_unsubscribe_version_notify { + __kind: 'force_unsubscribe_version_notify' + location: VersionedLocation +} + +/** + * See [`Pallet::force_xcm_version`]. + */ +export interface XcmPalletCall_force_xcm_version { + __kind: 'force_xcm_version' + location: V4Location + version: number +} + +/** + * See [`Pallet::limited_reserve_transfer_assets`]. + */ +export interface XcmPalletCall_limited_reserve_transfer_assets { + __kind: 'limited_reserve_transfer_assets' + dest: VersionedLocation + beneficiary: VersionedLocation + assets: VersionedAssets + feeAssetItem: number + weightLimit: V3WeightLimit +} + +/** + * See [`Pallet::limited_teleport_assets`]. + */ +export interface XcmPalletCall_limited_teleport_assets { + __kind: 'limited_teleport_assets' + dest: VersionedLocation + beneficiary: VersionedLocation + assets: VersionedAssets + feeAssetItem: number + weightLimit: V3WeightLimit +} + +/** + * See [`Pallet::reserve_transfer_assets`]. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: VersionedLocation + beneficiary: VersionedLocation + assets: VersionedAssets + feeAssetItem: number +} + +/** + * See [`Pallet::send`]. + */ +export interface XcmPalletCall_send { + __kind: 'send' + dest: VersionedLocation + message: VersionedXcm +} + +/** + * See [`Pallet::teleport_assets`]. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: VersionedLocation + beneficiary: VersionedLocation + assets: VersionedAssets + feeAssetItem: number +} + +/** + * See [`Pallet::transfer_assets`]. + */ +export interface XcmPalletCall_transfer_assets { + __kind: 'transfer_assets' + dest: VersionedLocation + beneficiary: VersionedLocation + assets: VersionedAssets + feeAssetItem: number + weightLimit: V3WeightLimit +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const WhitelistCall: sts.Type = sts.closedEnum(() => { + return { + dispatch_whitelisted_call: sts.enumStruct({ + callHash: H256, + callEncodedLen: sts.number(), + callWeightWitness: Weight, + }), + dispatch_whitelisted_call_with_preimage: sts.enumStruct({ + call: Call, + }), + remove_whitelisted_call: sts.enumStruct({ + callHash: H256, + }), + whitelist_call: sts.enumStruct({ + callHash: H256, + }), + } +}) + +export const H256 = sts.bytes() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type WhitelistCall = WhitelistCall_dispatch_whitelisted_call | WhitelistCall_dispatch_whitelisted_call_with_preimage | WhitelistCall_remove_whitelisted_call | WhitelistCall_whitelist_call + +/** + * See [`Pallet::dispatch_whitelisted_call`]. + */ +export interface WhitelistCall_dispatch_whitelisted_call { + __kind: 'dispatch_whitelisted_call' + callHash: H256 + callEncodedLen: number + callWeightWitness: Weight +} + +/** + * See [`Pallet::dispatch_whitelisted_call_with_preimage`]. + */ +export interface WhitelistCall_dispatch_whitelisted_call_with_preimage { + __kind: 'dispatch_whitelisted_call_with_preimage' + call: Call +} + +/** + * See [`Pallet::remove_whitelisted_call`]. + */ +export interface WhitelistCall_remove_whitelisted_call { + __kind: 'remove_whitelisted_call' + callHash: H256 +} + +/** + * See [`Pallet::whitelist_call`]. + */ +export interface WhitelistCall_whitelist_call { + __kind: 'whitelist_call' + callHash: H256 +} + +export type H256 = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const VoterListCall: sts.Type = sts.closedEnum(() => { + return { + put_in_front_of: sts.enumStruct({ + lighter: MultiAddress, + }), + put_in_front_of_other: sts.enumStruct({ + heavier: MultiAddress, + lighter: MultiAddress, + }), + rebag: sts.enumStruct({ + dislocated: MultiAddress, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type VoterListCall = VoterListCall_put_in_front_of | VoterListCall_put_in_front_of_other | VoterListCall_rebag + +/** + * See [`Pallet::put_in_front_of`]. + */ +export interface VoterListCall_put_in_front_of { + __kind: 'put_in_front_of' + lighter: MultiAddress +} + +/** + * See [`Pallet::put_in_front_of_other`]. + */ +export interface VoterListCall_put_in_front_of_other { + __kind: 'put_in_front_of_other' + heavier: MultiAddress + lighter: MultiAddress +} + +/** + * See [`Pallet::rebag`]. + */ +export interface VoterListCall_rebag { + __kind: 'rebag' + dislocated: MultiAddress +} + +export type MultiAddress = MultiAddress_Address20 | MultiAddress_Address32 | MultiAddress_Id | MultiAddress_Index | MultiAddress_Raw + +export interface MultiAddress_Address20 { + __kind: 'Address20' + value: Bytes +} + +export interface MultiAddress_Address32 { + __kind: 'Address32' + value: Bytes +} + +export interface MultiAddress_Id { + __kind: 'Id' + value: AccountId32 +} + +export interface MultiAddress_Index { + __kind: 'Index' +} + +export interface MultiAddress_Raw { + __kind: 'Raw' + value: Bytes +} + +export type AccountId32 = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_remove_vesting_schedule: sts.enumStruct({ + target: MultiAddress, + scheduleIndex: sts.number(), + }), + force_vested_transfer: sts.enumStruct({ + source: MultiAddress, + target: MultiAddress, + schedule: VestingInfo, + }), + merge_schedules: sts.enumStruct({ + schedule1Index: sts.number(), + schedule2Index: sts.number(), + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: MultiAddress, + }), + vested_transfer: sts.enumStruct({ + target: MultiAddress, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: sts.bigint(), + perBlock: sts.bigint(), + startingBlock: sts.number(), + } +}) + +export interface VestingInfo { + locked: bigint + perBlock: bigint + startingBlock: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type VestingCall = VestingCall_force_remove_vesting_schedule | VestingCall_force_vested_transfer | VestingCall_merge_schedules | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * See [`Pallet::force_remove_vesting_schedule`]. + */ +export interface VestingCall_force_remove_vesting_schedule { + __kind: 'force_remove_vesting_schedule' + target: MultiAddress + scheduleIndex: number +} + +/** + * See [`Pallet::force_vested_transfer`]. + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: MultiAddress + target: MultiAddress + schedule: VestingInfo +} + +/** + * See [`Pallet::merge_schedules`]. + */ +export interface VestingCall_merge_schedules { + __kind: 'merge_schedules' + schedule1Index: number + schedule2Index: number +} + +/** + * See [`Pallet::vest`]. + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * See [`Pallet::vest_other`]. + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: MultiAddress +} + +/** + * See [`Pallet::vested_transfer`]. + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: MultiAddress + schedule: VestingInfo +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Call, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Call), + }), + dispatch_as: sts.enumStruct({ + asOrigin: OriginCaller, + call: Call, + }), + force_batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + with_weight: sts.enumStruct({ + call: Call, + weight: Weight, + }), + } +}) + +export const OriginCaller: sts.Type = sts.closedEnum(() => { + return { + Origins: Origin, + ParachainsOrigin: Type_164, + Void: Void, + XcmPallet: Type_166, + system: RawOrigin, + } +}) + +export const RawOrigin: sts.Type = sts.closedEnum(() => { + return { + None: sts.unit(), + Root: sts.unit(), + Signed: AccountId32, + } +}) + +export type RawOrigin = RawOrigin_None | RawOrigin_Root | RawOrigin_Signed + +export interface RawOrigin_None { + __kind: 'None' +} + +export interface RawOrigin_Root { + __kind: 'Root' +} + +export interface RawOrigin_Signed { + __kind: 'Signed' + value: AccountId32 +} + +export const Type_166: sts.Type = sts.closedEnum(() => { + return { + Response: V4Location, + Xcm: V4Location, + } +}) + +export type Type_166 = Type_166_Response | Type_166_Xcm + +export interface Type_166_Response { + __kind: 'Response' + value: V4Location +} + +export interface Type_166_Xcm { + __kind: 'Xcm' + value: V4Location +} + +export const Void: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Void = never + +export const Type_164: sts.Type = sts.closedEnum(() => { + return { + Parachain: Id, + } +}) + +export const Id = sts.number() + +export type Type_164 = Type_164_Parachain + +export interface Type_164_Parachain { + __kind: 'Parachain' + value: Id +} + +export type Id = number + +export const Origin: sts.Type = sts.closedEnum(() => { + return { + AuctionAdmin: sts.unit(), + BigSpender: sts.unit(), + BigTipper: sts.unit(), + Fellows: sts.unit(), + Fellowship1Dan: sts.unit(), + Fellowship2Dan: sts.unit(), + Fellowship3Dan: sts.unit(), + Fellowship4Dan: sts.unit(), + Fellowship5Dan: sts.unit(), + Fellowship6Dan: sts.unit(), + Fellowship7Dan: sts.unit(), + Fellowship8Dan: sts.unit(), + Fellowship9Dan: sts.unit(), + FellowshipAdmin: sts.unit(), + FellowshipExperts: sts.unit(), + FellowshipInitiates: sts.unit(), + FellowshipMasters: sts.unit(), + GeneralAdmin: sts.unit(), + LeaseAdmin: sts.unit(), + MediumSpender: sts.unit(), + ReferendumCanceller: sts.unit(), + ReferendumKiller: sts.unit(), + SmallSpender: sts.unit(), + SmallTipper: sts.unit(), + StakingAdmin: sts.unit(), + Treasurer: sts.unit(), + WhitelistedCaller: sts.unit(), + WishForChange: sts.unit(), + } +}) + +export type Origin = Origin_AuctionAdmin | Origin_BigSpender | Origin_BigTipper | Origin_Fellows | Origin_Fellowship1Dan | Origin_Fellowship2Dan | Origin_Fellowship3Dan | Origin_Fellowship4Dan | Origin_Fellowship5Dan | Origin_Fellowship6Dan | Origin_Fellowship7Dan | Origin_Fellowship8Dan | Origin_Fellowship9Dan | Origin_FellowshipAdmin | Origin_FellowshipExperts | Origin_FellowshipInitiates | Origin_FellowshipMasters | Origin_GeneralAdmin | Origin_LeaseAdmin | Origin_MediumSpender | Origin_ReferendumCanceller | Origin_ReferendumKiller | Origin_SmallSpender | Origin_SmallTipper | Origin_StakingAdmin | Origin_Treasurer | Origin_WhitelistedCaller | Origin_WishForChange + +export interface Origin_AuctionAdmin { + __kind: 'AuctionAdmin' +} + +export interface Origin_BigSpender { + __kind: 'BigSpender' +} + +export interface Origin_BigTipper { + __kind: 'BigTipper' +} + +export interface Origin_Fellows { + __kind: 'Fellows' +} + +export interface Origin_Fellowship1Dan { + __kind: 'Fellowship1Dan' +} + +export interface Origin_Fellowship2Dan { + __kind: 'Fellowship2Dan' +} + +export interface Origin_Fellowship3Dan { + __kind: 'Fellowship3Dan' +} + +export interface Origin_Fellowship4Dan { + __kind: 'Fellowship4Dan' +} + +export interface Origin_Fellowship5Dan { + __kind: 'Fellowship5Dan' +} + +export interface Origin_Fellowship6Dan { + __kind: 'Fellowship6Dan' +} + +export interface Origin_Fellowship7Dan { + __kind: 'Fellowship7Dan' +} + +export interface Origin_Fellowship8Dan { + __kind: 'Fellowship8Dan' +} + +export interface Origin_Fellowship9Dan { + __kind: 'Fellowship9Dan' +} + +export interface Origin_FellowshipAdmin { + __kind: 'FellowshipAdmin' +} + +export interface Origin_FellowshipExperts { + __kind: 'FellowshipExperts' +} + +export interface Origin_FellowshipInitiates { + __kind: 'FellowshipInitiates' +} + +export interface Origin_FellowshipMasters { + __kind: 'FellowshipMasters' +} + +export interface Origin_GeneralAdmin { + __kind: 'GeneralAdmin' +} + +export interface Origin_LeaseAdmin { + __kind: 'LeaseAdmin' +} + +export interface Origin_MediumSpender { + __kind: 'MediumSpender' +} + +export interface Origin_ReferendumCanceller { + __kind: 'ReferendumCanceller' +} + +export interface Origin_ReferendumKiller { + __kind: 'ReferendumKiller' +} + +export interface Origin_SmallSpender { + __kind: 'SmallSpender' +} + +export interface Origin_SmallTipper { + __kind: 'SmallTipper' +} + +export interface Origin_StakingAdmin { + __kind: 'StakingAdmin' +} + +export interface Origin_Treasurer { + __kind: 'Treasurer' +} + +export interface Origin_WhitelistedCaller { + __kind: 'WhitelistedCaller' +} + +export interface Origin_WishForChange { + __kind: 'WishForChange' +} + +export type OriginCaller = OriginCaller_Origins | OriginCaller_ParachainsOrigin | OriginCaller_Void | OriginCaller_XcmPallet | OriginCaller_system + +export interface OriginCaller_Origins { + __kind: 'Origins' + value: Origin +} + +export interface OriginCaller_ParachainsOrigin { + __kind: 'ParachainsOrigin' + value: Type_164 +} + +export interface OriginCaller_Void { + __kind: 'Void' + value: Void +} + +export interface OriginCaller_XcmPallet { + __kind: 'XcmPallet' + value: Type_166 +} + +export interface OriginCaller_system { + __kind: 'system' + value: RawOrigin +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all | UtilityCall_dispatch_as | UtilityCall_force_batch | UtilityCall_with_weight + +/** + * See [`Pallet::as_derivative`]. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Call +} + +/** + * See [`Pallet::batch`]. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Call[] +} + +/** + * See [`Pallet::batch_all`]. + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Call[] +} + +/** + * See [`Pallet::dispatch_as`]. + */ +export interface UtilityCall_dispatch_as { + __kind: 'dispatch_as' + asOrigin: OriginCaller + call: Call +} + +/** + * See [`Pallet::force_batch`]. + */ +export interface UtilityCall_force_batch { + __kind: 'force_batch' + calls: Call[] +} + +/** + * See [`Pallet::with_weight`]. + */ +export interface UtilityCall_with_weight { + __kind: 'with_weight' + call: Call + weight: Weight +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + check_status: sts.enumStruct({ + index: sts.number(), + }), + payout: sts.enumStruct({ + index: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: MultiAddress, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + remove_approval: sts.enumStruct({ + proposalId: sts.number(), + }), + spend: sts.enumStruct({ + assetKind: VersionedLocatableAsset, + amount: sts.bigint(), + beneficiary: VersionedLocation, + validFrom: sts.option(() => sts.number()), + }), + spend_local: sts.enumStruct({ + amount: sts.bigint(), + beneficiary: MultiAddress, + }), + void_spend: sts.enumStruct({ + index: sts.number(), + }), + } +}) + +export const VersionedLocatableAsset: sts.Type = sts.closedEnum(() => { + return { + V3: sts.enumStruct({ + location: V3MultiLocation, + assetId: V3AssetId, + }), + V4: sts.enumStruct({ + location: V4Location, + assetId: V4AssetId, + }), + } +}) + +export type VersionedLocatableAsset = VersionedLocatableAsset_V3 | VersionedLocatableAsset_V4 + +export interface VersionedLocatableAsset_V3 { + __kind: 'V3' + location: V3MultiLocation + assetId: V3AssetId +} + +export interface VersionedLocatableAsset_V4 { + __kind: 'V4' + location: V4Location + assetId: V4AssetId +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_check_status | TreasuryCall_payout | TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_remove_approval | TreasuryCall_spend | TreasuryCall_spend_local | TreasuryCall_void_spend + +/** + * See [`Pallet::approve_proposal`]. + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * See [`Pallet::check_status`]. + */ +export interface TreasuryCall_check_status { + __kind: 'check_status' + index: number +} + +/** + * See [`Pallet::payout`]. + */ +export interface TreasuryCall_payout { + __kind: 'payout' + index: number +} + +/** + * See [`Pallet::propose_spend`]. + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: MultiAddress +} + +/** + * See [`Pallet::reject_proposal`]. + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * See [`Pallet::remove_approval`]. + */ +export interface TreasuryCall_remove_approval { + __kind: 'remove_approval' + proposalId: number +} + +/** + * See [`Pallet::spend`]. + */ +export interface TreasuryCall_spend { + __kind: 'spend' + assetKind: VersionedLocatableAsset + amount: bigint + beneficiary: VersionedLocation + validFrom?: (number | undefined) +} + +/** + * See [`Pallet::spend_local`]. + */ +export interface TreasuryCall_spend_local { + __kind: 'spend_local' + amount: bigint + beneficiary: MultiAddress +} + +/** + * See [`Pallet::void_spend`]. + */ +export interface TreasuryCall_void_spend { + __kind: 'void_spend' + index: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type TimestampCall = TimestampCall_set + +/** + * See [`Pallet::set`]. + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + apply_authorized_upgrade: sts.enumStruct({ + code: sts.bytes(), + }), + authorize_upgrade: sts.enumStruct({ + codeHash: H256, + }), + authorize_upgrade_without_checks: sts.enumStruct({ + codeHash: H256, + }), + kill_prefix: sts.enumStruct({ + prefix: sts.bytes(), + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => sts.bytes()), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SystemCall = SystemCall_apply_authorized_upgrade | SystemCall_authorize_upgrade | SystemCall_authorize_upgrade_without_checks | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * See [`Pallet::apply_authorized_upgrade`]. + */ +export interface SystemCall_apply_authorized_upgrade { + __kind: 'apply_authorized_upgrade' + code: Bytes +} + +/** + * See [`Pallet::authorize_upgrade`]. + */ +export interface SystemCall_authorize_upgrade { + __kind: 'authorize_upgrade' + codeHash: H256 +} + +/** + * See [`Pallet::authorize_upgrade_without_checks`]. + */ +export interface SystemCall_authorize_upgrade_without_checks { + __kind: 'authorize_upgrade_without_checks' + codeHash: H256 +} + +/** + * See [`Pallet::kill_prefix`]. + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Bytes + subkeys: number +} + +/** + * See [`Pallet::kill_storage`]. + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Bytes[] +} + +/** + * See [`Pallet::remark`]. + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * See [`Pallet::remark_with_event`]. + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * See [`Pallet::set_code`]. + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * See [`Pallet::set_code_without_checks`]. + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * See [`Pallet::set_heap_pages`]. + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * See [`Pallet::set_storage`]. + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: [Bytes, Bytes][] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: sts.number(), + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + stash: AccountId32, + }), + deprecate_controller_batch: sts.enumStruct({ + controllers: sts.array(() => AccountId32), + }), + force_apply_min_commission: sts.enumStruct({ + validatorStash: AccountId32, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => MultiAddress), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => MultiAddress), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + }), + payout_stakers_by_page: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + page: sts.number(), + }), + reap_stash: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + restore_ledger: sts.enumStruct({ + stash: AccountId32, + maybeController: sts.option(() => AccountId32), + maybeTotal: sts.option(() => sts.bigint()), + maybeUnlocking: sts.option(() => sts.array(() => UnlockChunk)), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.unit(), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId32), + }), + set_min_commission: sts.enumStruct({ + new: Perbill, + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_staking_configs: sts.enumStruct({ + minNominatorBond: ConfigOp, + minValidatorBond: ConfigOp, + maxNominatorCount: Type_123, + maxValidatorCount: Type_123, + chillThreshold: Type_124, + minCommission: Type_125, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + update_payee: sts.enumStruct({ + controller: AccountId32, + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export const Type_125: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export type Type_125 = Type_125_Noop | Type_125_Remove | Type_125_Set + +export interface Type_125_Noop { + __kind: 'Noop' +} + +export interface Type_125_Remove { + __kind: 'Remove' +} + +export interface Type_125_Set { + __kind: 'Set' + value: Perbill +} + +export type Perbill = number + +export const Type_124: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Percent, + } +}) + +export type Type_124 = Type_124_Noop | Type_124_Remove | Type_124_Set + +export interface Type_124_Noop { + __kind: 'Noop' +} + +export interface Type_124_Remove { + __kind: 'Remove' +} + +export interface Type_124_Set { + __kind: 'Set' + value: Percent +} + +export type Percent = number + +export const Type_123: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_123 = Type_123_Noop | Type_123_Remove | Type_123_Set + +export interface Type_123_Noop { + __kind: 'Noop' +} + +export interface Type_123_Remove { + __kind: 'Remove' +} + +export interface Type_123_Set { + __kind: 'Set' + value: number +} + +export const ConfigOp: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type ConfigOp = ConfigOp_Noop | ConfigOp_Remove | ConfigOp_Set + +export interface ConfigOp_Noop { + __kind: 'Noop' +} + +export interface ConfigOp_Remove { + __kind: 'Remove' +} + +export interface ConfigOp_Set { + __kind: 'Set' + value: bigint +} + +export const Perbill = sts.number() + +export const Percent = sts.number() + +export const UnlockChunk: sts.Type = sts.struct(() => { + return { + value: sts.bigint(), + era: sts.number(), + } +}) + +export interface UnlockChunk { + value: bigint + era: number +} + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_deprecate_controller_batch | StakingCall_force_apply_min_commission | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_payout_stakers_by_page | StakingCall_reap_stash | StakingCall_rebond | StakingCall_restore_ledger | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_invulnerables | StakingCall_set_min_commission | StakingCall_set_payee | StakingCall_set_staking_configs | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_update_payee | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * See [`Pallet::bond`]. + */ +export interface StakingCall_bond { + __kind: 'bond' + value: bigint + payee: RewardDestination +} + +/** + * See [`Pallet::bond_extra`]. + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * See [`Pallet::cancel_deferred_slash`]. + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: number + slashIndices: number[] +} + +/** + * See [`Pallet::chill`]. + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * See [`Pallet::chill_other`]. + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + stash: AccountId32 +} + +/** + * See [`Pallet::deprecate_controller_batch`]. + */ +export interface StakingCall_deprecate_controller_batch { + __kind: 'deprecate_controller_batch' + controllers: AccountId32[] +} + +/** + * See [`Pallet::force_apply_min_commission`]. + */ +export interface StakingCall_force_apply_min_commission { + __kind: 'force_apply_min_commission' + validatorStash: AccountId32 +} + +/** + * See [`Pallet::force_new_era`]. + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * See [`Pallet::force_new_era_always`]. + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * See [`Pallet::force_no_eras`]. + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * See [`Pallet::force_unstake`]. + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * See [`Pallet::increase_validator_count`]. + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * See [`Pallet::kick`]. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: MultiAddress[] +} + +/** + * See [`Pallet::nominate`]. + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: MultiAddress[] +} + +/** + * See [`Pallet::payout_stakers`]. + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId32 + era: number +} + +/** + * See [`Pallet::payout_stakers_by_page`]. + */ +export interface StakingCall_payout_stakers_by_page { + __kind: 'payout_stakers_by_page' + validatorStash: AccountId32 + era: number + page: number +} + +/** + * See [`Pallet::reap_stash`]. + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * See [`Pallet::rebond`]. + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * See [`Pallet::restore_ledger`]. + */ +export interface StakingCall_restore_ledger { + __kind: 'restore_ledger' + stash: AccountId32 + maybeController?: (AccountId32 | undefined) + maybeTotal?: (bigint | undefined) + maybeUnlocking?: (UnlockChunk[] | undefined) +} + +/** + * See [`Pallet::scale_validator_count`]. + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * See [`Pallet::set_controller`]. + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' +} + +/** + * See [`Pallet::set_invulnerables`]. + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId32[] +} + +/** + * See [`Pallet::set_min_commission`]. + */ +export interface StakingCall_set_min_commission { + __kind: 'set_min_commission' + new: Perbill +} + +/** + * See [`Pallet::set_payee`]. + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * See [`Pallet::set_staking_configs`]. + */ +export interface StakingCall_set_staking_configs { + __kind: 'set_staking_configs' + minNominatorBond: ConfigOp + minValidatorBond: ConfigOp + maxNominatorCount: Type_123 + maxValidatorCount: Type_123 + chillThreshold: Type_124 + minCommission: Type_125 +} + +/** + * See [`Pallet::set_validator_count`]. + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * See [`Pallet::unbond`]. + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * See [`Pallet::update_payee`]. + */ +export interface StakingCall_update_payee { + __kind: 'update_payee' + controller: AccountId32 +} + +/** + * See [`Pallet::validate`]. + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * See [`Pallet::withdraw_unbonded`]. + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bestow_membership: sts.enumStruct({ + candidate: AccountId32, + }), + bid: sts.enumStruct({ + value: sts.bigint(), + }), + claim_membership: sts.unit(), + cleanup_candidacy: sts.enumStruct({ + candidate: AccountId32, + max: sts.number(), + }), + cleanup_challenge: sts.enumStruct({ + challengeRound: sts.number(), + max: sts.number(), + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + dissolve: sts.unit(), + drop_candidate: sts.enumStruct({ + candidate: AccountId32, + }), + found_society: sts.enumStruct({ + founder: MultiAddress, + maxMembers: sts.number(), + maxIntake: sts.number(), + maxStrikes: sts.number(), + candidateDeposit: sts.bigint(), + rules: sts.bytes(), + }), + judge_suspended_member: sts.enumStruct({ + who: MultiAddress, + forgive: sts.boolean(), + }), + kick_candidate: sts.enumStruct({ + candidate: AccountId32, + }), + payout: sts.unit(), + punish_skeptic: sts.unit(), + resign_candidacy: sts.unit(), + set_parameters: sts.enumStruct({ + maxMembers: sts.number(), + maxIntake: sts.number(), + maxStrikes: sts.number(), + candidateDeposit: sts.bigint(), + }), + unbid: sts.unit(), + unvouch: sts.unit(), + vote: sts.enumStruct({ + candidate: MultiAddress, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: MultiAddress, + value: sts.bigint(), + tip: sts.bigint(), + }), + waive_repay: sts.enumStruct({ + amount: sts.bigint(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SocietyCall = SocietyCall_bestow_membership | SocietyCall_bid | SocietyCall_claim_membership | SocietyCall_cleanup_candidacy | SocietyCall_cleanup_challenge | SocietyCall_defender_vote | SocietyCall_dissolve | SocietyCall_drop_candidate | SocietyCall_found_society | SocietyCall_judge_suspended_member | SocietyCall_kick_candidate | SocietyCall_payout | SocietyCall_punish_skeptic | SocietyCall_resign_candidacy | SocietyCall_set_parameters | SocietyCall_unbid | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch | SocietyCall_waive_repay + +/** + * See [`Pallet::bestow_membership`]. + */ +export interface SocietyCall_bestow_membership { + __kind: 'bestow_membership' + candidate: AccountId32 +} + +/** + * See [`Pallet::bid`]. + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: bigint +} + +/** + * See [`Pallet::claim_membership`]. + */ +export interface SocietyCall_claim_membership { + __kind: 'claim_membership' +} + +/** + * See [`Pallet::cleanup_candidacy`]. + */ +export interface SocietyCall_cleanup_candidacy { + __kind: 'cleanup_candidacy' + candidate: AccountId32 + max: number +} + +/** + * See [`Pallet::cleanup_challenge`]. + */ +export interface SocietyCall_cleanup_challenge { + __kind: 'cleanup_challenge' + challengeRound: number + max: number +} + +/** + * See [`Pallet::defender_vote`]. + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * See [`Pallet::dissolve`]. + */ +export interface SocietyCall_dissolve { + __kind: 'dissolve' +} + +/** + * See [`Pallet::drop_candidate`]. + */ +export interface SocietyCall_drop_candidate { + __kind: 'drop_candidate' + candidate: AccountId32 +} + +/** + * See [`Pallet::found_society`]. + */ +export interface SocietyCall_found_society { + __kind: 'found_society' + founder: MultiAddress + maxMembers: number + maxIntake: number + maxStrikes: number + candidateDeposit: bigint + rules: Bytes +} + +/** + * See [`Pallet::judge_suspended_member`]. + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: MultiAddress + forgive: boolean +} + +/** + * See [`Pallet::kick_candidate`]. + */ +export interface SocietyCall_kick_candidate { + __kind: 'kick_candidate' + candidate: AccountId32 +} + +/** + * See [`Pallet::payout`]. + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * See [`Pallet::punish_skeptic`]. + */ +export interface SocietyCall_punish_skeptic { + __kind: 'punish_skeptic' +} + +/** + * See [`Pallet::resign_candidacy`]. + */ +export interface SocietyCall_resign_candidacy { + __kind: 'resign_candidacy' +} + +/** + * See [`Pallet::set_parameters`]. + */ +export interface SocietyCall_set_parameters { + __kind: 'set_parameters' + maxMembers: number + maxIntake: number + maxStrikes: number + candidateDeposit: bigint +} + +/** + * See [`Pallet::unbid`]. + */ +export interface SocietyCall_unbid { + __kind: 'unbid' +} + +/** + * See [`Pallet::unvouch`]. + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' +} + +/** + * See [`Pallet::vote`]. + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: MultiAddress + approve: boolean +} + +/** + * See [`Pallet::vouch`]. + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: MultiAddress + value: bigint + tip: bigint +} + +/** + * See [`Pallet::waive_repay`]. + */ +export interface SocietyCall_waive_repay { + __kind: 'waive_repay' + amount: bigint +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: Id, + }), + force_lease: sts.enumStruct({ + para: Id, + leaser: AccountId32, + amount: sts.bigint(), + periodBegin: sts.number(), + periodCount: sts.number(), + }), + trigger_onboard: sts.enumStruct({ + para: Id, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * See [`Pallet::clear_all_leases`]. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: Id +} + +/** + * See [`Pallet::force_lease`]. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: Id + leaser: AccountId32 + amount: bigint + periodBegin: number + periodCount: number +} + +/** + * See [`Pallet::trigger_onboard`]. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: Id +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: SessionKeys, + proof: sts.bytes(), + }), + } +}) + +export const SessionKeys: sts.Type = sts.struct(() => { + return { + grandpa: Public, + babe: sts.bytes(), + paraValidator: V6Public, + paraAssignment: sts.bytes(), + authorityDiscovery: sts.bytes(), + beefy: sts.bytes(), + } +}) + +export const V6Public = sts.bytes() + +export const Public = sts.bytes() + +export interface SessionKeys { + grandpa: Public + babe: Bytes + paraValidator: V6Public + paraAssignment: Bytes + authorityDiscovery: Bytes + beefy: Bytes +} + +export type V6Public = Bytes + +export type Public = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * See [`Pallet::purge_keys`]. + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * See [`Pallet::set_keys`]. + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: SessionKeys + proof: Bytes +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: sts.number(), + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_after: sts.enumStruct({ + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * See [`Pallet::cancel`]. + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: number + index: number +} + +/** + * See [`Pallet::cancel_named`]. + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * See [`Pallet::schedule`]. + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * See [`Pallet::schedule_after`]. + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * See [`Pallet::schedule_named`]. + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * See [`Pallet::schedule_named_after`]. + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + add_lock: sts.enumStruct({ + para: Id, + }), + deregister: sts.enumStruct({ + id: Id, + }), + force_register: sts.enumStruct({ + who: AccountId32, + deposit: sts.bigint(), + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + register: sts.enumStruct({ + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + remove_lock: sts.enumStruct({ + para: Id, + }), + reserve: sts.unit(), + schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + swap: sts.enumStruct({ + id: Id, + other: Id, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type RegistrarCall = RegistrarCall_add_lock | RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_register | RegistrarCall_remove_lock | RegistrarCall_reserve | RegistrarCall_schedule_code_upgrade | RegistrarCall_set_current_head | RegistrarCall_swap + +/** + * See [`Pallet::add_lock`]. + */ +export interface RegistrarCall_add_lock { + __kind: 'add_lock' + para: Id +} + +/** + * See [`Pallet::deregister`]. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: Id +} + +/** + * See [`Pallet::force_register`]. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId32 + deposit: bigint + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * See [`Pallet::register`]. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * See [`Pallet::remove_lock`]. + */ +export interface RegistrarCall_remove_lock { + __kind: 'remove_lock' + para: Id +} + +/** + * See [`Pallet::reserve`]. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * See [`Pallet::schedule_code_upgrade`]. + */ +export interface RegistrarCall_schedule_code_upgrade { + __kind: 'schedule_code_upgrade' + para: Id + newCode: ValidationCode +} + +/** + * See [`Pallet::set_current_head`]. + */ +export interface RegistrarCall_set_current_head { + __kind: 'set_current_head' + para: Id + newHead: HeadData +} + +/** + * See [`Pallet::swap`]. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: Id + other: Id +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ReferendaCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + index: sts.number(), + }), + kill: sts.enumStruct({ + index: sts.number(), + }), + nudge_referendum: sts.enumStruct({ + index: sts.number(), + }), + one_fewer_deciding: sts.enumStruct({ + track: sts.number(), + }), + place_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_submission_deposit: sts.enumStruct({ + index: sts.number(), + }), + set_metadata: sts.enumStruct({ + index: sts.number(), + maybeHash: sts.option(() => H256), + }), + submit: sts.enumStruct({ + proposalOrigin: OriginCaller, + proposal: Bounded, + enactmentMoment: DispatchTime, + }), + } +}) + +export const DispatchTime: sts.Type = sts.closedEnum(() => { + return { + After: sts.number(), + At: sts.number(), + } +}) + +export type DispatchTime = DispatchTime_After | DispatchTime_At + +export interface DispatchTime_After { + __kind: 'After' + value: number +} + +export interface DispatchTime_At { + __kind: 'At' + value: number +} + +export const Bounded: sts.Type = sts.closedEnum(() => { + return { + Inline: sts.bytes(), + Legacy: sts.enumStruct({ + hash: H256, + }), + Lookup: sts.enumStruct({ + hash: H256, + len: sts.number(), + }), + } +}) + +export type Bounded = Bounded_Inline | Bounded_Legacy | Bounded_Lookup + +export interface Bounded_Inline { + __kind: 'Inline' + value: Bytes +} + +export interface Bounded_Legacy { + __kind: 'Legacy' + hash: H256 +} + +export interface Bounded_Lookup { + __kind: 'Lookup' + hash: H256 + len: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ReferendaCall = ReferendaCall_cancel | ReferendaCall_kill | ReferendaCall_nudge_referendum | ReferendaCall_one_fewer_deciding | ReferendaCall_place_decision_deposit | ReferendaCall_refund_decision_deposit | ReferendaCall_refund_submission_deposit | ReferendaCall_set_metadata | ReferendaCall_submit + +/** + * See [`Pallet::cancel`]. + */ +export interface ReferendaCall_cancel { + __kind: 'cancel' + index: number +} + +/** + * See [`Pallet::kill`]. + */ +export interface ReferendaCall_kill { + __kind: 'kill' + index: number +} + +/** + * See [`Pallet::nudge_referendum`]. + */ +export interface ReferendaCall_nudge_referendum { + __kind: 'nudge_referendum' + index: number +} + +/** + * See [`Pallet::one_fewer_deciding`]. + */ +export interface ReferendaCall_one_fewer_deciding { + __kind: 'one_fewer_deciding' + track: number +} + +/** + * See [`Pallet::place_decision_deposit`]. + */ +export interface ReferendaCall_place_decision_deposit { + __kind: 'place_decision_deposit' + index: number +} + +/** + * See [`Pallet::refund_decision_deposit`]. + */ +export interface ReferendaCall_refund_decision_deposit { + __kind: 'refund_decision_deposit' + index: number +} + +/** + * See [`Pallet::refund_submission_deposit`]. + */ +export interface ReferendaCall_refund_submission_deposit { + __kind: 'refund_submission_deposit' + index: number +} + +/** + * See [`Pallet::set_metadata`]. + */ +export interface ReferendaCall_set_metadata { + __kind: 'set_metadata' + index: number + maybeHash?: (H256 | undefined) +} + +/** + * See [`Pallet::submit`]. + */ +export interface ReferendaCall_submit { + __kind: 'submit' + proposalOrigin: OriginCaller + proposal: Bounded + enactmentMoment: DispatchTime +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: MultiAddress, + call: Call, + }), + cancel_recovered: sts.enumStruct({ + account: MultiAddress, + }), + claim_recovery: sts.enumStruct({ + account: MultiAddress, + }), + close_recovery: sts.enumStruct({ + rescuer: MultiAddress, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId32), + threshold: sts.number(), + delayPeriod: sts.number(), + }), + initiate_recovery: sts.enumStruct({ + account: MultiAddress, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + vouch_recovery: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * See [`Pallet::as_recovered`]. + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: MultiAddress + call: Call +} + +/** + * See [`Pallet::cancel_recovered`]. + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: MultiAddress +} + +/** + * See [`Pallet::claim_recovery`]. + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: MultiAddress +} + +/** + * See [`Pallet::close_recovery`]. + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: MultiAddress +} + +/** + * See [`Pallet::create_recovery`]. + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId32[] + threshold: number + delayPeriod: number +} + +/** + * See [`Pallet::initiate_recovery`]. + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: MultiAddress +} + +/** + * See [`Pallet::remove_recovery`]. + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * See [`Pallet::set_recovered`]. + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * See [`Pallet::vouch_recovery`]. + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + announce: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + create_pure: sts.enumStruct({ + proxyType: ProxyType, + delay: sts.number(), + index: sts.number(), + }), + kill_pure: sts.enumStruct({ + spawner: MultiAddress, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + proxy_announced: sts.enumStruct({ + delegate: MultiAddress, + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + reject_announcement: sts.enumStruct({ + delegate: MultiAddress, + callHash: H256, + }), + remove_announcement: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_create_pure | ProxyCall_kill_pure | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * See [`Pallet::add_proxy`]. + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +/** + * See [`Pallet::announce`]. + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: MultiAddress + callHash: H256 +} + +/** + * See [`Pallet::create_pure`]. + */ +export interface ProxyCall_create_pure { + __kind: 'create_pure' + proxyType: ProxyType + delay: number + index: number +} + +/** + * See [`Pallet::kill_pure`]. + */ +export interface ProxyCall_kill_pure { + __kind: 'kill_pure' + spawner: MultiAddress + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * See [`Pallet::proxy`]. + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * See [`Pallet::proxy_announced`]. + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: MultiAddress + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * See [`Pallet::reject_announcement`]. + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: MultiAddress + callHash: H256 +} + +/** + * See [`Pallet::remove_announcement`]. + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: MultiAddress + callHash: H256 +} + +/** + * See [`Pallet::remove_proxies`]. + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * See [`Pallet::remove_proxy`]. + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NominationPools | ProxyType_NonTransfer | ProxyType_Society | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NominationPools { + __kind: 'NominationPools' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Society { + __kind: 'Society' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const PreimageCall: sts.Type = sts.closedEnum(() => { + return { + ensure_updated: sts.enumStruct({ + hashes: sts.array(() => H256), + }), + note_preimage: sts.enumStruct({ + bytes: sts.bytes(), + }), + request_preimage: sts.enumStruct({ + hash: H256, + }), + unnote_preimage: sts.enumStruct({ + hash: H256, + }), + unrequest_preimage: sts.enumStruct({ + hash: H256, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type PreimageCall = PreimageCall_ensure_updated | PreimageCall_note_preimage | PreimageCall_request_preimage | PreimageCall_unnote_preimage | PreimageCall_unrequest_preimage + +/** + * See [`Pallet::ensure_updated`]. + */ +export interface PreimageCall_ensure_updated { + __kind: 'ensure_updated' + hashes: H256[] +} + +/** + * See [`Pallet::note_preimage`]. + */ +export interface PreimageCall_note_preimage { + __kind: 'note_preimage' + bytes: Bytes +} + +/** + * See [`Pallet::request_preimage`]. + */ +export interface PreimageCall_request_preimage { + __kind: 'request_preimage' + hash: H256 +} + +/** + * See [`Pallet::unnote_preimage`]. + */ +export interface PreimageCall_unnote_preimage { + __kind: 'unnote_preimage' + hash: H256 +} + +/** + * See [`Pallet::unrequest_preimage`]. + */ +export interface PreimageCall_unrequest_preimage { + __kind: 'unrequest_preimage' + hash: H256 +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParasSlashingCall: sts.Type = sts.closedEnum(() => { + return { + report_dispute_lost_unsigned: sts.enumStruct({ + disputeProof: V6DisputeProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: sts.number(), + trieNodes: sts.array(() => sts.bytes()), + validatorCount: sts.number(), + } +}) + +export interface MembershipProof { + session: number + trieNodes: Bytes[] + validatorCount: number +} + +export const V6DisputeProof: sts.Type = sts.struct(() => { + return { + timeSlot: V6DisputesTimeSlot, + kind: V6SlashingOffenceKind, + validatorIndex: V6ValidatorIndex, + validatorId: V6Public, + } +}) + +export const V6ValidatorIndex = sts.number() + +export const V6SlashingOffenceKind: sts.Type = sts.closedEnum(() => { + return { + AgainstValid: sts.unit(), + ForInvalid: sts.unit(), + } +}) + +export type V6SlashingOffenceKind = V6SlashingOffenceKind_AgainstValid | V6SlashingOffenceKind_ForInvalid + +export interface V6SlashingOffenceKind_AgainstValid { + __kind: 'AgainstValid' +} + +export interface V6SlashingOffenceKind_ForInvalid { + __kind: 'ForInvalid' +} + +export const V6DisputesTimeSlot: sts.Type = sts.struct(() => { + return { + sessionIndex: sts.number(), + candidateHash: CandidateHash, + } +}) + +export const CandidateHash = sts.bytes() + +export interface V6DisputesTimeSlot { + sessionIndex: number + candidateHash: CandidateHash +} + +export type CandidateHash = Bytes + +export interface V6DisputeProof { + timeSlot: V6DisputesTimeSlot + kind: V6SlashingOffenceKind + validatorIndex: V6ValidatorIndex + validatorId: V6Public +} + +export type V6ValidatorIndex = number + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParasSlashingCall = ParasSlashingCall_report_dispute_lost_unsigned + +/** + * See [`Pallet::report_dispute_lost_unsigned`]. + */ +export interface ParasSlashingCall_report_dispute_lost_unsigned { + __kind: 'report_dispute_lost_unsigned' + disputeProof: V6DisputeProof + keyOwnerProof: MembershipProof +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParasSharedCall = never + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParasDisputesCall: sts.Type = sts.closedEnum(() => { + return { + force_unfreeze: sts.unit(), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParasDisputesCall = ParasDisputesCall_force_unfreeze + +/** + * See [`Pallet::force_unfreeze`]. + */ +export interface ParasDisputesCall_force_unfreeze { + __kind: 'force_unfreeze' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + add_trusted_validation_code: sts.enumStruct({ + validationCode: ValidationCode, + }), + force_note_new_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: Id, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + relayParentNumber: sts.number(), + }), + force_set_current_code: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_set_most_recent_context: sts.enumStruct({ + para: Id, + context: sts.number(), + }), + include_pvf_check_statement: sts.enumStruct({ + stmt: V6PvfCheckStatement, + signature: V6Signature, + }), + poke_unused_validation_code: sts.enumStruct({ + validationCodeHash: ValidationCodeHash, + }), + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const V6Signature = sts.bytes() + +export const V6PvfCheckStatement: sts.Type = sts.struct(() => { + return { + accept: sts.boolean(), + subject: ValidationCodeHash, + sessionIndex: sts.number(), + validatorIndex: V6ValidatorIndex, + } +}) + +export interface V6PvfCheckStatement { + accept: boolean + subject: ValidationCodeHash + sessionIndex: number + validatorIndex: V6ValidatorIndex +} + +export type ValidationCodeHash = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParasCall = ParasCall_add_trusted_validation_code | ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head | ParasCall_force_set_most_recent_context | ParasCall_include_pvf_check_statement | ParasCall_poke_unused_validation_code + +/** + * See [`Pallet::add_trusted_validation_code`]. + */ +export interface ParasCall_add_trusted_validation_code { + __kind: 'add_trusted_validation_code' + validationCode: ValidationCode +} + +/** + * See [`Pallet::force_note_new_head`]. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: Id + newHead: HeadData +} + +/** + * See [`Pallet::force_queue_action`]. + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: Id +} + +/** + * See [`Pallet::force_schedule_code_upgrade`]. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: Id + newCode: ValidationCode + relayParentNumber: number +} + +/** + * See [`Pallet::force_set_current_code`]. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: Id + newCode: ValidationCode +} + +/** + * See [`Pallet::force_set_current_head`]. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: Id + newHead: HeadData +} + +/** + * See [`Pallet::force_set_most_recent_context`]. + */ +export interface ParasCall_force_set_most_recent_context { + __kind: 'force_set_most_recent_context' + para: Id + context: number +} + +/** + * See [`Pallet::include_pvf_check_statement`]. + */ +export interface ParasCall_include_pvf_check_statement { + __kind: 'include_pvf_check_statement' + stmt: V6PvfCheckStatement + signature: V6Signature +} + +/** + * See [`Pallet::poke_unused_validation_code`]. + */ +export interface ParasCall_poke_unused_validation_code { + __kind: 'poke_unused_validation_code' + validationCodeHash: ValidationCodeHash +} + +export type V6Signature = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParaInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: V6InherentData, + }), + } +}) + +export const V6InherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => V6UncheckedSigned), + backedCandidates: sts.array(() => V6BackedCandidate), + disputes: sts.array(() => V6DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: H256, + number: sts.number(), + stateRoot: H256, + extrinsicsRoot: H256, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + Consensus: sts.tuple(() => [sts.bytes(), sts.bytes()]), + Other: sts.bytes(), + PreRuntime: sts.tuple(() => [sts.bytes(), sts.bytes()]), + RuntimeEnvironmentUpdated: sts.unit(), + Seal: sts.tuple(() => [sts.bytes(), sts.bytes()]), + } +}) + +export type DigestItem = DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: [Bytes, Bytes] +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: [Bytes, Bytes] +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: [Bytes, Bytes] +} + +export interface Digest { + logs: DigestItem[] +} + +export interface Header { + parentHash: H256 + number: number + stateRoot: H256 + extrinsicsRoot: H256 + digest: Digest +} + +export const V6DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: sts.number(), + statements: sts.array(() => sts.tuple(() => [V6DisputeStatement, V6ValidatorIndex, V6Signature])), + } +}) + +export const V6DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: V6InvalidDisputeStatementKind, + Valid: V6ValidDisputeStatementKind, + } +}) + +export const V6ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + ApprovalCheckingMultipleCandidates: sts.array(() => CandidateHash), + BackingSeconded: H256, + BackingValid: H256, + Explicit: sts.unit(), + } +}) + +export type V6ValidDisputeStatementKind = V6ValidDisputeStatementKind_ApprovalChecking | V6ValidDisputeStatementKind_ApprovalCheckingMultipleCandidates | V6ValidDisputeStatementKind_BackingSeconded | V6ValidDisputeStatementKind_BackingValid | V6ValidDisputeStatementKind_Explicit + +export interface V6ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface V6ValidDisputeStatementKind_ApprovalCheckingMultipleCandidates { + __kind: 'ApprovalCheckingMultipleCandidates' + value: CandidateHash[] +} + +export interface V6ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: H256 +} + +export interface V6ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: H256 +} + +export interface V6ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export const V6InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export type V6InvalidDisputeStatementKind = V6InvalidDisputeStatementKind_Explicit + +export interface V6InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type V6DisputeStatement = V6DisputeStatement_Invalid | V6DisputeStatement_Valid + +export interface V6DisputeStatement_Invalid { + __kind: 'Invalid' + value: V6InvalidDisputeStatementKind +} + +export interface V6DisputeStatement_Valid { + __kind: 'Valid' + value: V6ValidDisputeStatementKind +} + +export interface V6DisputeStatementSet { + candidateHash: CandidateHash + session: number + statements: [V6DisputeStatement, V6ValidatorIndex, V6Signature][] +} + +export const V6BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: V6CommittedCandidateReceipt, + validityVotes: sts.array(() => V6ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const V6ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: V6Signature, + Implicit: V6Signature, + } +}) + +export type V6ValidityAttestation = V6ValidityAttestation_Explicit | V6ValidityAttestation_Implicit + +export interface V6ValidityAttestation_Explicit { + __kind: 'Explicit' + value: V6Signature +} + +export interface V6ValidityAttestation_Implicit { + __kind: 'Implicit' + value: V6Signature +} + +export const V6CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: V6CandidateDescriptor, + commitments: V6CandidateCommitments, + } +}) + +export const V6CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => sts.bytes()), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: sts.number(), + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: Id, + data: sts.bytes(), + } +}) + +export interface OutboundHrmpMessage { + recipient: Id + data: Bytes +} + +export interface V6CandidateCommitments { + upwardMessages: Bytes[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: number +} + +export const V6CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: Id, + relayParent: H256, + collator: sts.bytes(), + persistedValidationDataHash: H256, + povHash: H256, + erasureRoot: H256, + signature: sts.bytes(), + paraHead: H256, + validationCodeHash: ValidationCodeHash, + } +}) + +export interface V6CandidateDescriptor { + paraId: Id + relayParent: H256 + collator: Bytes + persistedValidationDataHash: H256 + povHash: H256 + erasureRoot: H256 + signature: Bytes + paraHead: H256 + validationCodeHash: ValidationCodeHash +} + +export interface V6CommittedCandidateReceipt { + descriptor: V6CandidateDescriptor + commitments: V6CandidateCommitments +} + +export interface V6BackedCandidate { + candidate: V6CommittedCandidateReceipt + validityVotes: V6ValidityAttestation[] + validatorIndices: BitSequence +} + +export const V6UncheckedSigned: sts.Type = sts.struct(() => { + return { + payload: V6AvailabilityBitfield, + validatorIndex: V6ValidatorIndex, + signature: V6Signature, + } +}) + +export const V6AvailabilityBitfield = sts.bitseq() + +export interface V6UncheckedSigned { + payload: V6AvailabilityBitfield + validatorIndex: V6ValidatorIndex + signature: V6Signature +} + +export type V6AvailabilityBitfield = BitSequence + +export interface V6InherentData { + bitfields: V6UncheckedSigned[] + backedCandidates: V6BackedCandidate[] + disputes: V6DisputeStatementSet[] + parentHeader: Header +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParaInherentCall = ParaInherentCall_enter + +/** + * See [`Pallet::enter`]. + */ +export interface ParaInherentCall_enter { + __kind: 'enter' + data: V6InherentData +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParaInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParaInclusionCall = never + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const OnDemandAssignmentProviderCall: sts.Type = sts.closedEnum(() => { + return { + place_order_allow_death: sts.enumStruct({ + maxAmount: sts.bigint(), + paraId: Id, + }), + place_order_keep_alive: sts.enumStruct({ + maxAmount: sts.bigint(), + paraId: Id, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type OnDemandAssignmentProviderCall = OnDemandAssignmentProviderCall_place_order_allow_death | OnDemandAssignmentProviderCall_place_order_keep_alive + +/** + * See [`Pallet::place_order_allow_death`]. + */ +export interface OnDemandAssignmentProviderCall_place_order_allow_death { + __kind: 'place_order_allow_death' + maxAmount: bigint + paraId: Id +} + +/** + * See [`Pallet::place_order_keep_alive`]. + */ +export interface OnDemandAssignmentProviderCall_place_order_keep_alive { + __kind: 'place_order_keep_alive' + maxAmount: bigint + paraId: Id +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const NominationPoolsCall: sts.Type = sts.closedEnum(() => { + return { + adjust_pool_deposit: sts.enumStruct({ + poolId: sts.number(), + }), + bond_extra: sts.enumStruct({ + extra: BondExtra, + }), + bond_extra_other: sts.enumStruct({ + member: MultiAddress, + extra: BondExtra, + }), + chill: sts.enumStruct({ + poolId: sts.number(), + }), + claim_commission: sts.enumStruct({ + poolId: sts.number(), + }), + claim_payout: sts.unit(), + claim_payout_other: sts.enumStruct({ + other: AccountId32, + }), + create: sts.enumStruct({ + amount: sts.bigint(), + root: MultiAddress, + nominator: MultiAddress, + bouncer: MultiAddress, + }), + create_with_pool_id: sts.enumStruct({ + amount: sts.bigint(), + root: MultiAddress, + nominator: MultiAddress, + bouncer: MultiAddress, + poolId: sts.number(), + }), + join: sts.enumStruct({ + amount: sts.bigint(), + poolId: sts.number(), + }), + nominate: sts.enumStruct({ + poolId: sts.number(), + validators: sts.array(() => AccountId32), + }), + pool_withdraw_unbonded: sts.enumStruct({ + poolId: sts.number(), + numSlashingSpans: sts.number(), + }), + set_claim_permission: sts.enumStruct({ + permission: ClaimPermission, + }), + set_commission: sts.enumStruct({ + poolId: sts.number(), + newCommission: sts.option(() => sts.tuple(() => [Perbill, AccountId32])), + }), + set_commission_change_rate: sts.enumStruct({ + poolId: sts.number(), + changeRate: CommissionChangeRate, + }), + set_commission_claim_permission: sts.enumStruct({ + poolId: sts.number(), + permission: sts.option(() => CommissionClaimPermission), + }), + set_commission_max: sts.enumStruct({ + poolId: sts.number(), + maxCommission: Perbill, + }), + set_configs: sts.enumStruct({ + minJoinBond: Type_337, + minCreateBond: Type_337, + maxPools: Type_338, + maxMembers: Type_338, + maxMembersPerPool: Type_338, + globalMaxCommission: Type_339, + }), + set_metadata: sts.enumStruct({ + poolId: sts.number(), + metadata: sts.bytes(), + }), + set_state: sts.enumStruct({ + poolId: sts.number(), + state: PoolState, + }), + unbond: sts.enumStruct({ + memberAccount: MultiAddress, + unbondingPoints: sts.bigint(), + }), + update_roles: sts.enumStruct({ + poolId: sts.number(), + newRoot: Type_340, + newNominator: Type_340, + newBouncer: Type_340, + }), + withdraw_unbonded: sts.enumStruct({ + memberAccount: MultiAddress, + numSlashingSpans: sts.number(), + }), + } +}) + +export const Type_340: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: AccountId32, + } +}) + +export type Type_340 = Type_340_Noop | Type_340_Remove | Type_340_Set + +export interface Type_340_Noop { + __kind: 'Noop' +} + +export interface Type_340_Remove { + __kind: 'Remove' +} + +export interface Type_340_Set { + __kind: 'Set' + value: AccountId32 +} + +export const PoolState: sts.Type = sts.closedEnum(() => { + return { + Blocked: sts.unit(), + Destroying: sts.unit(), + Open: sts.unit(), + } +}) + +export type PoolState = PoolState_Blocked | PoolState_Destroying | PoolState_Open + +export interface PoolState_Blocked { + __kind: 'Blocked' +} + +export interface PoolState_Destroying { + __kind: 'Destroying' +} + +export interface PoolState_Open { + __kind: 'Open' +} + +export const Type_339: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export type Type_339 = Type_339_Noop | Type_339_Remove | Type_339_Set + +export interface Type_339_Noop { + __kind: 'Noop' +} + +export interface Type_339_Remove { + __kind: 'Remove' +} + +export interface Type_339_Set { + __kind: 'Set' + value: Perbill +} + +export const Type_338: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_338 = Type_338_Noop | Type_338_Remove | Type_338_Set + +export interface Type_338_Noop { + __kind: 'Noop' +} + +export interface Type_338_Remove { + __kind: 'Remove' +} + +export interface Type_338_Set { + __kind: 'Set' + value: number +} + +export const Type_337: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type Type_337 = Type_337_Noop | Type_337_Remove | Type_337_Set + +export interface Type_337_Noop { + __kind: 'Noop' +} + +export interface Type_337_Remove { + __kind: 'Remove' +} + +export interface Type_337_Set { + __kind: 'Set' + value: bigint +} + +export const CommissionClaimPermission: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Permissionless: sts.unit(), + } +}) + +export type CommissionClaimPermission = CommissionClaimPermission_Account | CommissionClaimPermission_Permissionless + +export interface CommissionClaimPermission_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface CommissionClaimPermission_Permissionless { + __kind: 'Permissionless' +} + +export const CommissionChangeRate: sts.Type = sts.struct(() => { + return { + maxIncrease: Perbill, + minDelay: sts.number(), + } +}) + +export interface CommissionChangeRate { + maxIncrease: Perbill + minDelay: number +} + +export const ClaimPermission: sts.Type = sts.closedEnum(() => { + return { + Permissioned: sts.unit(), + PermissionlessAll: sts.unit(), + PermissionlessCompound: sts.unit(), + PermissionlessWithdraw: sts.unit(), + } +}) + +export type ClaimPermission = ClaimPermission_Permissioned | ClaimPermission_PermissionlessAll | ClaimPermission_PermissionlessCompound | ClaimPermission_PermissionlessWithdraw + +export interface ClaimPermission_Permissioned { + __kind: 'Permissioned' +} + +export interface ClaimPermission_PermissionlessAll { + __kind: 'PermissionlessAll' +} + +export interface ClaimPermission_PermissionlessCompound { + __kind: 'PermissionlessCompound' +} + +export interface ClaimPermission_PermissionlessWithdraw { + __kind: 'PermissionlessWithdraw' +} + +export const BondExtra: sts.Type = sts.closedEnum(() => { + return { + FreeBalance: sts.bigint(), + Rewards: sts.unit(), + } +}) + +export type BondExtra = BondExtra_FreeBalance | BondExtra_Rewards + +export interface BondExtra_FreeBalance { + __kind: 'FreeBalance' + value: bigint +} + +export interface BondExtra_Rewards { + __kind: 'Rewards' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type NominationPoolsCall = NominationPoolsCall_adjust_pool_deposit | NominationPoolsCall_bond_extra | NominationPoolsCall_bond_extra_other | NominationPoolsCall_chill | NominationPoolsCall_claim_commission | NominationPoolsCall_claim_payout | NominationPoolsCall_claim_payout_other | NominationPoolsCall_create | NominationPoolsCall_create_with_pool_id | NominationPoolsCall_join | NominationPoolsCall_nominate | NominationPoolsCall_pool_withdraw_unbonded | NominationPoolsCall_set_claim_permission | NominationPoolsCall_set_commission | NominationPoolsCall_set_commission_change_rate | NominationPoolsCall_set_commission_claim_permission | NominationPoolsCall_set_commission_max | NominationPoolsCall_set_configs | NominationPoolsCall_set_metadata | NominationPoolsCall_set_state | NominationPoolsCall_unbond | NominationPoolsCall_update_roles | NominationPoolsCall_withdraw_unbonded + +/** + * See [`Pallet::adjust_pool_deposit`]. + */ +export interface NominationPoolsCall_adjust_pool_deposit { + __kind: 'adjust_pool_deposit' + poolId: number +} + +/** + * See [`Pallet::bond_extra`]. + */ +export interface NominationPoolsCall_bond_extra { + __kind: 'bond_extra' + extra: BondExtra +} + +/** + * See [`Pallet::bond_extra_other`]. + */ +export interface NominationPoolsCall_bond_extra_other { + __kind: 'bond_extra_other' + member: MultiAddress + extra: BondExtra +} + +/** + * See [`Pallet::chill`]. + */ +export interface NominationPoolsCall_chill { + __kind: 'chill' + poolId: number +} + +/** + * See [`Pallet::claim_commission`]. + */ +export interface NominationPoolsCall_claim_commission { + __kind: 'claim_commission' + poolId: number +} + +/** + * See [`Pallet::claim_payout`]. + */ +export interface NominationPoolsCall_claim_payout { + __kind: 'claim_payout' +} + +/** + * See [`Pallet::claim_payout_other`]. + */ +export interface NominationPoolsCall_claim_payout_other { + __kind: 'claim_payout_other' + other: AccountId32 +} + +/** + * See [`Pallet::create`]. + */ +export interface NominationPoolsCall_create { + __kind: 'create' + amount: bigint + root: MultiAddress + nominator: MultiAddress + bouncer: MultiAddress +} + +/** + * See [`Pallet::create_with_pool_id`]. + */ +export interface NominationPoolsCall_create_with_pool_id { + __kind: 'create_with_pool_id' + amount: bigint + root: MultiAddress + nominator: MultiAddress + bouncer: MultiAddress + poolId: number +} + +/** + * See [`Pallet::join`]. + */ +export interface NominationPoolsCall_join { + __kind: 'join' + amount: bigint + poolId: number +} + +/** + * See [`Pallet::nominate`]. + */ +export interface NominationPoolsCall_nominate { + __kind: 'nominate' + poolId: number + validators: AccountId32[] +} + +/** + * See [`Pallet::pool_withdraw_unbonded`]. + */ +export interface NominationPoolsCall_pool_withdraw_unbonded { + __kind: 'pool_withdraw_unbonded' + poolId: number + numSlashingSpans: number +} + +/** + * See [`Pallet::set_claim_permission`]. + */ +export interface NominationPoolsCall_set_claim_permission { + __kind: 'set_claim_permission' + permission: ClaimPermission +} + +/** + * See [`Pallet::set_commission`]. + */ +export interface NominationPoolsCall_set_commission { + __kind: 'set_commission' + poolId: number + newCommission?: ([Perbill, AccountId32] | undefined) +} + +/** + * See [`Pallet::set_commission_change_rate`]. + */ +export interface NominationPoolsCall_set_commission_change_rate { + __kind: 'set_commission_change_rate' + poolId: number + changeRate: CommissionChangeRate +} + +/** + * See [`Pallet::set_commission_claim_permission`]. + */ +export interface NominationPoolsCall_set_commission_claim_permission { + __kind: 'set_commission_claim_permission' + poolId: number + permission?: (CommissionClaimPermission | undefined) +} + +/** + * See [`Pallet::set_commission_max`]. + */ +export interface NominationPoolsCall_set_commission_max { + __kind: 'set_commission_max' + poolId: number + maxCommission: Perbill +} + +/** + * See [`Pallet::set_configs`]. + */ +export interface NominationPoolsCall_set_configs { + __kind: 'set_configs' + minJoinBond: Type_337 + minCreateBond: Type_337 + maxPools: Type_338 + maxMembers: Type_338 + maxMembersPerPool: Type_338 + globalMaxCommission: Type_339 +} + +/** + * See [`Pallet::set_metadata`]. + */ +export interface NominationPoolsCall_set_metadata { + __kind: 'set_metadata' + poolId: number + metadata: Bytes +} + +/** + * See [`Pallet::set_state`]. + */ +export interface NominationPoolsCall_set_state { + __kind: 'set_state' + poolId: number + state: PoolState +} + +/** + * See [`Pallet::unbond`]. + */ +export interface NominationPoolsCall_unbond { + __kind: 'unbond' + memberAccount: MultiAddress + unbondingPoints: bigint +} + +/** + * See [`Pallet::update_roles`]. + */ +export interface NominationPoolsCall_update_roles { + __kind: 'update_roles' + poolId: number + newRoot: Type_340 + newNominator: Type_340 + newBouncer: Type_340 +} + +/** + * See [`Pallet::withdraw_unbonded`]. + */ +export interface NominationPoolsCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + memberAccount: MultiAddress + numSlashingSpans: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const NisCounterpartBalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_adjust_total_issuance: sts.enumStruct({ + direction: AdjustmentDirection, + delta: sts.bigint(), + }), + force_set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + }), + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_allow_death: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + upgrade_accounts: sts.enumStruct({ + who: sts.array(() => AccountId32), + }), + } +}) + +export const AdjustmentDirection: sts.Type = sts.closedEnum(() => { + return { + Decrease: sts.unit(), + Increase: sts.unit(), + } +}) + +export type AdjustmentDirection = AdjustmentDirection_Decrease | AdjustmentDirection_Increase + +export interface AdjustmentDirection_Decrease { + __kind: 'Decrease' +} + +export interface AdjustmentDirection_Increase { + __kind: 'Increase' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type NisCounterpartBalancesCall = NisCounterpartBalancesCall_force_adjust_total_issuance | NisCounterpartBalancesCall_force_set_balance | NisCounterpartBalancesCall_force_transfer | NisCounterpartBalancesCall_force_unreserve | NisCounterpartBalancesCall_transfer_all | NisCounterpartBalancesCall_transfer_allow_death | NisCounterpartBalancesCall_transfer_keep_alive | NisCounterpartBalancesCall_upgrade_accounts + +/** + * See [`Pallet::force_adjust_total_issuance`]. + */ +export interface NisCounterpartBalancesCall_force_adjust_total_issuance { + __kind: 'force_adjust_total_issuance' + direction: AdjustmentDirection + delta: bigint +} + +/** + * See [`Pallet::force_set_balance`]. + */ +export interface NisCounterpartBalancesCall_force_set_balance { + __kind: 'force_set_balance' + who: MultiAddress + newFree: bigint +} + +/** + * See [`Pallet::force_transfer`]. + */ +export interface NisCounterpartBalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::force_unreserve`]. + */ +export interface NisCounterpartBalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * See [`Pallet::transfer_all`]. + */ +export interface NisCounterpartBalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * See [`Pallet::transfer_allow_death`]. + */ +export interface NisCounterpartBalancesCall_transfer_allow_death { + __kind: 'transfer_allow_death' + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::transfer_keep_alive`]. + */ +export interface NisCounterpartBalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::upgrade_accounts`]. + */ +export interface NisCounterpartBalancesCall_upgrade_accounts { + __kind: 'upgrade_accounts' + who: AccountId32[] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const NisCall: sts.Type = sts.closedEnum(() => { + return { + communify: sts.enumStruct({ + index: sts.number(), + }), + fund_deficit: sts.unit(), + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + privatize: sts.enumStruct({ + index: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + thaw_communal: sts.enumStruct({ + index: sts.number(), + }), + thaw_private: sts.enumStruct({ + index: sts.number(), + maybeProportion: sts.option(() => Perquintill), + }), + } +}) + +export const Perquintill = sts.bigint() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type NisCall = NisCall_communify | NisCall_fund_deficit | NisCall_place_bid | NisCall_privatize | NisCall_retract_bid | NisCall_thaw_communal | NisCall_thaw_private + +/** + * See [`Pallet::communify`]. + */ +export interface NisCall_communify { + __kind: 'communify' + index: number +} + +/** + * See [`Pallet::fund_deficit`]. + */ +export interface NisCall_fund_deficit { + __kind: 'fund_deficit' +} + +/** + * See [`Pallet::place_bid`]. + */ +export interface NisCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * See [`Pallet::privatize`]. + */ +export interface NisCall_privatize { + __kind: 'privatize' + index: number +} + +/** + * See [`Pallet::retract_bid`]. + */ +export interface NisCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * See [`Pallet::thaw_communal`]. + */ +export interface NisCall_thaw_communal { + __kind: 'thaw_communal' + index: number +} + +/** + * See [`Pallet::thaw_private`]. + */ +export interface NisCall_thaw_private { + __kind: 'thaw_private' + index: number + maybeProportion?: (Perquintill | undefined) +} + +export type Perquintill = bigint + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + call: Call, + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId32), + call: Call, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * See [`Pallet::approve_as_multi`]. + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * See [`Pallet::as_multi`]. + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + call: Call + maxWeight: Weight +} + +/** + * See [`Pallet::as_multi_threshold_1`]. + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId32[] + call: Call +} + +/** + * See [`Pallet::cancel_as_multi`]. + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId32[] + timepoint: Timepoint + callHash: Bytes +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const MessageQueueCall: sts.Type = sts.closedEnum(() => { + return { + execute_overweight: sts.enumStruct({ + messageOrigin: AggregateMessageOrigin, + page: sts.number(), + index: sts.number(), + weightLimit: Weight, + }), + reap_page: sts.enumStruct({ + messageOrigin: AggregateMessageOrigin, + pageIndex: sts.number(), + }), + } +}) + +export const AggregateMessageOrigin: sts.Type = sts.closedEnum(() => { + return { + Ump: UmpQueueId, + } +}) + +export const UmpQueueId: sts.Type = sts.closedEnum(() => { + return { + Para: Id, + } +}) + +export type UmpQueueId = UmpQueueId_Para + +export interface UmpQueueId_Para { + __kind: 'Para' + value: Id +} + +export type AggregateMessageOrigin = AggregateMessageOrigin_Ump + +export interface AggregateMessageOrigin_Ump { + __kind: 'Ump' + value: UmpQueueId +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type MessageQueueCall = MessageQueueCall_execute_overweight | MessageQueueCall_reap_page + +/** + * See [`Pallet::execute_overweight`]. + */ +export interface MessageQueueCall_execute_overweight { + __kind: 'execute_overweight' + messageOrigin: AggregateMessageOrigin + page: number + index: number + weightLimit: Weight +} + +/** + * See [`Pallet::reap_page`]. + */ +export interface MessageQueueCall_reap_page { + __kind: 'reap_page' + messageOrigin: AggregateMessageOrigin + pageIndex: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const InitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type InitializerCall = InitializerCall_force_approve + +/** + * See [`Pallet::force_approve`]. + */ +export interface InitializerCall_force_approve { + __kind: 'force_approve' + upTo: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: sts.number(), + }), + force_transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: sts.number(), + }), + freeze: sts.enumStruct({ + index: sts.number(), + }), + transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * See [`Pallet::claim`]. + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: number +} + +/** + * See [`Pallet::force_transfer`]. + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: MultiAddress + index: number + freeze: boolean +} + +/** + * See [`Pallet::free`]. + */ +export interface IndicesCall_free { + __kind: 'free' + index: number +} + +/** + * See [`Pallet::freeze`]. + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: number +} + +/** + * See [`Pallet::transfer`]. + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: MultiAddress + index: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const IdentityMigratorCall: sts.Type = sts.closedEnum(() => { + return { + poke_deposit: sts.enumStruct({ + who: AccountId32, + }), + reap_identity: sts.enumStruct({ + who: AccountId32, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type IdentityMigratorCall = IdentityMigratorCall_poke_deposit | IdentityMigratorCall_reap_identity + +/** + * See [`Pallet::poke_deposit`]. + */ +export interface IdentityMigratorCall_poke_deposit { + __kind: 'poke_deposit' + who: AccountId32 +} + +/** + * See [`Pallet::reap_identity`]. + */ +export interface IdentityMigratorCall_reap_identity { + __kind: 'reap_identity' + who: AccountId32 +} + +/** + * Identity pallet declaration. + */ +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + accept_username: sts.enumStruct({ + username: BoundedVec, + }), + add_registrar: sts.enumStruct({ + account: MultiAddress, + }), + add_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + add_username_authority: sts.enumStruct({ + authority: MultiAddress, + suffix: sts.bytes(), + allocation: sts.number(), + }), + cancel_request: sts.enumStruct({ + regIndex: sts.number(), + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: MultiAddress, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: MultiAddress, + judgement: Judgement, + identity: H256, + }), + quit_sub: sts.unit(), + remove_dangling_username: sts.enumStruct({ + username: BoundedVec, + }), + remove_expired_approval: sts.enumStruct({ + username: BoundedVec, + }), + remove_sub: sts.enumStruct({ + sub: MultiAddress, + }), + remove_username_authority: sts.enumStruct({ + authority: MultiAddress, + }), + rename_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: MultiAddress, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: sts.bigint(), + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_primary_username: sts.enumStruct({ + username: BoundedVec, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId32, Data])), + }), + set_username_for: sts.enumStruct({ + who: MultiAddress, + username: sts.bytes(), + signature: sts.option(() => MultiSignature), + }), + } +}) + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => sts.tuple(() => [Data, Data])), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => sts.bytes()), + image: Data, + twitter: Data, + } +}) + +export interface IdentityInfo { + additional: [Data, Data][] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (Bytes | undefined) + image: Data + twitter: Data +} + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: Bytes +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: Bytes +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: Bytes +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: Bytes +} + +export const Judgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: sts.bigint(), + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export type Judgement = Judgement_Erroneous | Judgement_FeePaid | Judgement_KnownGood | Judgement_LowQuality | Judgement_OutOfDate | Judgement_Reasonable | Judgement_Unknown + +export interface Judgement_Erroneous { + __kind: 'Erroneous' +} + +export interface Judgement_FeePaid { + __kind: 'FeePaid' + value: bigint +} + +export interface Judgement_KnownGood { + __kind: 'KnownGood' +} + +export interface Judgement_LowQuality { + __kind: 'LowQuality' +} + +export interface Judgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface Judgement_Reasonable { + __kind: 'Reasonable' +} + +export interface Judgement_Unknown { + __kind: 'Unknown' +} + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: sts.bytes(), + Keccak256: sts.bytes(), + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: sts.bytes(), + ShaThree256: sts.bytes(), + } +}) + +export const BoundedVec = sts.bytes() + +/** + * Identity pallet declaration. + */ +export type IdentityCall = IdentityCall_accept_username | IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_add_username_authority | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_dangling_username | IdentityCall_remove_expired_approval | IdentityCall_remove_sub | IdentityCall_remove_username_authority | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_primary_username | IdentityCall_set_subs | IdentityCall_set_username_for + +/** + * See [`Pallet::accept_username`]. + */ +export interface IdentityCall_accept_username { + __kind: 'accept_username' + username: BoundedVec +} + +/** + * See [`Pallet::add_registrar`]. + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: MultiAddress +} + +/** + * See [`Pallet::add_sub`]. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: MultiAddress + data: Data +} + +/** + * See [`Pallet::add_username_authority`]. + */ +export interface IdentityCall_add_username_authority { + __kind: 'add_username_authority' + authority: MultiAddress + suffix: Bytes + allocation: number +} + +/** + * See [`Pallet::cancel_request`]. + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: number +} + +/** + * See [`Pallet::clear_identity`]. + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * See [`Pallet::kill_identity`]. + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: MultiAddress +} + +/** + * See [`Pallet::provide_judgement`]. + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: MultiAddress + judgement: Judgement + identity: H256 +} + +/** + * See [`Pallet::quit_sub`]. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * See [`Pallet::remove_dangling_username`]. + */ +export interface IdentityCall_remove_dangling_username { + __kind: 'remove_dangling_username' + username: BoundedVec +} + +/** + * See [`Pallet::remove_expired_approval`]. + */ +export interface IdentityCall_remove_expired_approval { + __kind: 'remove_expired_approval' + username: BoundedVec +} + +/** + * See [`Pallet::remove_sub`]. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: MultiAddress +} + +/** + * See [`Pallet::remove_username_authority`]. + */ +export interface IdentityCall_remove_username_authority { + __kind: 'remove_username_authority' + authority: MultiAddress +} + +/** + * See [`Pallet::rename_sub`]. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: MultiAddress + data: Data +} + +/** + * See [`Pallet::request_judgement`]. + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * See [`Pallet::set_account_id`]. + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: MultiAddress +} + +/** + * See [`Pallet::set_fee`]. + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * See [`Pallet::set_fields`]. + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: bigint +} + +/** + * See [`Pallet::set_identity`]. + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * See [`Pallet::set_primary_username`]. + */ +export interface IdentityCall_set_primary_username { + __kind: 'set_primary_username' + username: BoundedVec +} + +/** + * See [`Pallet::set_subs`]. + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId32, Data][] +} + +/** + * See [`Pallet::set_username_for`]. + */ +export interface IdentityCall_set_username_for { + __kind: 'set_username_for' + who: MultiAddress + username: Bytes + signature?: (MultiSignature | undefined) +} + +export type BoundedVec = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const HrmpCall: sts.Type = sts.closedEnum(() => { + return { + establish_system_channel: sts.enumStruct({ + sender: Id, + recipient: Id, + }), + force_clean_hrmp: sts.enumStruct({ + para: Id, + numInbound: sts.number(), + numOutbound: sts.number(), + }), + force_open_hrmp_channel: sts.enumStruct({ + sender: Id, + recipient: Id, + maxCapacity: sts.number(), + maxMessageSize: sts.number(), + }), + force_process_hrmp_close: sts.enumStruct({ + channels: sts.number(), + }), + force_process_hrmp_open: sts.enumStruct({ + channels: sts.number(), + }), + hrmp_accept_open_channel: sts.enumStruct({ + sender: Id, + }), + hrmp_cancel_open_request: sts.enumStruct({ + channelId: HrmpChannelId, + openRequests: sts.number(), + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: Id, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + poke_channel_deposits: sts.enumStruct({ + sender: Id, + recipient: Id, + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: Id, + recipient: Id, + } +}) + +export interface HrmpChannelId { + sender: Id + recipient: Id +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type HrmpCall = HrmpCall_establish_system_channel | HrmpCall_force_clean_hrmp | HrmpCall_force_open_hrmp_channel | HrmpCall_force_process_hrmp_close | HrmpCall_force_process_hrmp_open | HrmpCall_hrmp_accept_open_channel | HrmpCall_hrmp_cancel_open_request | HrmpCall_hrmp_close_channel | HrmpCall_hrmp_init_open_channel | HrmpCall_poke_channel_deposits + +/** + * See [`Pallet::establish_system_channel`]. + */ +export interface HrmpCall_establish_system_channel { + __kind: 'establish_system_channel' + sender: Id + recipient: Id +} + +/** + * See [`Pallet::force_clean_hrmp`]. + */ +export interface HrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: Id + numInbound: number + numOutbound: number +} + +/** + * See [`Pallet::force_open_hrmp_channel`]. + */ +export interface HrmpCall_force_open_hrmp_channel { + __kind: 'force_open_hrmp_channel' + sender: Id + recipient: Id + maxCapacity: number + maxMessageSize: number +} + +/** + * See [`Pallet::force_process_hrmp_close`]. + */ +export interface HrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' + channels: number +} + +/** + * See [`Pallet::force_process_hrmp_open`]. + */ +export interface HrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' + channels: number +} + +/** + * See [`Pallet::hrmp_accept_open_channel`]. + */ +export interface HrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: Id +} + +/** + * See [`Pallet::hrmp_cancel_open_request`]. + */ +export interface HrmpCall_hrmp_cancel_open_request { + __kind: 'hrmp_cancel_open_request' + channelId: HrmpChannelId + openRequests: number +} + +/** + * See [`Pallet::hrmp_close_channel`]. + */ +export interface HrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * See [`Pallet::hrmp_init_open_channel`]. + */ +export interface HrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: Id + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +/** + * See [`Pallet::poke_channel_deposits`]. + */ +export interface HrmpCall_poke_channel_deposits { + __kind: 'poke_channel_deposits' + sender: Id + recipient: Id +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: sts.number(), + bestFinalizedBlockNumber: sts.number(), + }), + report_equivocation: sts.enumStruct({ + equivocationProof: Type_142, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_142, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const Type_142: sts.Type = sts.struct(() => { + return { + setId: sts.bigint(), + equivocation: Equivocation, + } +}) + +export const Equivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: Type_150, + Prevote: Type_144, + } +}) + +export const Type_144: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Prevote, Signature]), + second: sts.tuple(() => [Prevote, Signature]), + } +}) + +export const Signature = sts.bytes() + +export const Prevote: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Prevote { + targetHash: H256 + targetNumber: number +} + +export interface Type_144 { + roundNumber: bigint + identity: Public + first: [Prevote, Signature] + second: [Prevote, Signature] +} + +export type Signature = Bytes + +export const Type_150: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Precommit, Signature]), + second: sts.tuple(() => [Precommit, Signature]), + } +}) + +export const Precommit: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Precommit { + targetHash: H256 + targetNumber: number +} + +export interface Type_150 { + roundNumber: bigint + identity: Public + first: [Precommit, Signature] + second: [Precommit, Signature] +} + +export type Equivocation = Equivocation_Precommit | Equivocation_Prevote + +export interface Equivocation_Precommit { + __kind: 'Precommit' + value: Type_150 +} + +export interface Equivocation_Prevote { + __kind: 'Prevote' + value: Type_144 +} + +export interface Type_142 { + setId: bigint + equivocation: Equivocation +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * See [`Pallet::note_stalled`]. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: number + bestFinalizedBlockNumber: number +} + +/** + * See [`Pallet::report_equivocation`]. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_142 + keyOwnerProof: MembershipProof +} + +/** + * See [`Pallet::report_equivocation_unsigned`]. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_142 + keyOwnerProof: MembershipProof +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const FellowshipReferendaCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + index: sts.number(), + }), + kill: sts.enumStruct({ + index: sts.number(), + }), + nudge_referendum: sts.enumStruct({ + index: sts.number(), + }), + one_fewer_deciding: sts.enumStruct({ + track: sts.number(), + }), + place_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_submission_deposit: sts.enumStruct({ + index: sts.number(), + }), + set_metadata: sts.enumStruct({ + index: sts.number(), + maybeHash: sts.option(() => H256), + }), + submit: sts.enumStruct({ + proposalOrigin: OriginCaller, + proposal: Bounded, + enactmentMoment: DispatchTime, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type FellowshipReferendaCall = FellowshipReferendaCall_cancel | FellowshipReferendaCall_kill | FellowshipReferendaCall_nudge_referendum | FellowshipReferendaCall_one_fewer_deciding | FellowshipReferendaCall_place_decision_deposit | FellowshipReferendaCall_refund_decision_deposit | FellowshipReferendaCall_refund_submission_deposit | FellowshipReferendaCall_set_metadata | FellowshipReferendaCall_submit + +/** + * See [`Pallet::cancel`]. + */ +export interface FellowshipReferendaCall_cancel { + __kind: 'cancel' + index: number +} + +/** + * See [`Pallet::kill`]. + */ +export interface FellowshipReferendaCall_kill { + __kind: 'kill' + index: number +} + +/** + * See [`Pallet::nudge_referendum`]. + */ +export interface FellowshipReferendaCall_nudge_referendum { + __kind: 'nudge_referendum' + index: number +} + +/** + * See [`Pallet::one_fewer_deciding`]. + */ +export interface FellowshipReferendaCall_one_fewer_deciding { + __kind: 'one_fewer_deciding' + track: number +} + +/** + * See [`Pallet::place_decision_deposit`]. + */ +export interface FellowshipReferendaCall_place_decision_deposit { + __kind: 'place_decision_deposit' + index: number +} + +/** + * See [`Pallet::refund_decision_deposit`]. + */ +export interface FellowshipReferendaCall_refund_decision_deposit { + __kind: 'refund_decision_deposit' + index: number +} + +/** + * See [`Pallet::refund_submission_deposit`]. + */ +export interface FellowshipReferendaCall_refund_submission_deposit { + __kind: 'refund_submission_deposit' + index: number +} + +/** + * See [`Pallet::set_metadata`]. + */ +export interface FellowshipReferendaCall_set_metadata { + __kind: 'set_metadata' + index: number + maybeHash?: (H256 | undefined) +} + +/** + * See [`Pallet::submit`]. + */ +export interface FellowshipReferendaCall_submit { + __kind: 'submit' + proposalOrigin: OriginCaller + proposal: Bounded + enactmentMoment: DispatchTime +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const FellowshipCollectiveCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: MultiAddress, + }), + cleanup_poll: sts.enumStruct({ + pollIndex: sts.number(), + max: sts.number(), + }), + demote_member: sts.enumStruct({ + who: MultiAddress, + }), + exchange_member: sts.enumStruct({ + who: MultiAddress, + newWho: MultiAddress, + }), + promote_member: sts.enumStruct({ + who: MultiAddress, + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + minRank: sts.number(), + }), + vote: sts.enumStruct({ + poll: sts.number(), + aye: sts.boolean(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type FellowshipCollectiveCall = FellowshipCollectiveCall_add_member | FellowshipCollectiveCall_cleanup_poll | FellowshipCollectiveCall_demote_member | FellowshipCollectiveCall_exchange_member | FellowshipCollectiveCall_promote_member | FellowshipCollectiveCall_remove_member | FellowshipCollectiveCall_vote + +/** + * See [`Pallet::add_member`]. + */ +export interface FellowshipCollectiveCall_add_member { + __kind: 'add_member' + who: MultiAddress +} + +/** + * See [`Pallet::cleanup_poll`]. + */ +export interface FellowshipCollectiveCall_cleanup_poll { + __kind: 'cleanup_poll' + pollIndex: number + max: number +} + +/** + * See [`Pallet::demote_member`]. + */ +export interface FellowshipCollectiveCall_demote_member { + __kind: 'demote_member' + who: MultiAddress +} + +/** + * See [`Pallet::exchange_member`]. + */ +export interface FellowshipCollectiveCall_exchange_member { + __kind: 'exchange_member' + who: MultiAddress + newWho: MultiAddress +} + +/** + * See [`Pallet::promote_member`]. + */ +export interface FellowshipCollectiveCall_promote_member { + __kind: 'promote_member' + who: MultiAddress +} + +/** + * See [`Pallet::remove_member`]. + */ +export interface FellowshipCollectiveCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + minRank: number +} + +/** + * See [`Pallet::vote`]. + */ +export interface FellowshipCollectiveCall_vote { + __kind: 'vote' + poll: number + aye: boolean +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const FastUnstakeCall: sts.Type = sts.closedEnum(() => { + return { + control: sts.enumStruct({ + erasToCheck: sts.number(), + }), + deregister: sts.unit(), + register_fast_unstake: sts.unit(), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type FastUnstakeCall = FastUnstakeCall_control | FastUnstakeCall_deregister | FastUnstakeCall_register_fast_unstake + +/** + * See [`Pallet::control`]. + */ +export interface FastUnstakeCall_control { + __kind: 'control' + erasToCheck: number +} + +/** + * See [`Pallet::deregister`]. + */ +export interface FastUnstakeCall_deregister { + __kind: 'deregister' +} + +/** + * See [`Pallet::register_fast_unstake`]. + */ +export interface FastUnstakeCall_register_fast_unstake { + __kind: 'register_fast_unstake' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + governance_fallback: sts.enumStruct({ + maybeMaxVoters: sts.option(() => sts.number()), + maybeMaxTargets: sts.option(() => sts.number()), + }), + set_emergency_election_result: sts.enumStruct({ + supports: sts.array(() => sts.tuple(() => [AccountId32, Support])), + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => ElectionScore), + }), + submit: sts.enumStruct({ + rawSolution: RawSolution, + }), + submit_unsigned: sts.enumStruct({ + rawSolution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export const RawSolution: sts.Type = sts.struct(() => { + return { + solution: NposCompactSolution24, + score: ElectionScore, + round: sts.number(), + } +}) + +export const NposCompactSolution24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), + votes2: sts.array(() => sts.tuple(() => [sts.number(), sts.tuple(() => [sts.number(), sts.number()]), sts.number()])), + votes3: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes4: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes5: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes6: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes7: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes8: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes9: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes10: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes11: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes12: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes13: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes14: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes15: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes16: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes17: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes18: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes19: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes20: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes21: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes22: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes23: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes24: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + } +}) + +export interface NposCompactSolution24 { + votes1: [number, number][] + votes2: [number, [number, number], number][] + votes3: [number, [number, number][], number][] + votes4: [number, [number, number][], number][] + votes5: [number, [number, number][], number][] + votes6: [number, [number, number][], number][] + votes7: [number, [number, number][], number][] + votes8: [number, [number, number][], number][] + votes9: [number, [number, number][], number][] + votes10: [number, [number, number][], number][] + votes11: [number, [number, number][], number][] + votes12: [number, [number, number][], number][] + votes13: [number, [number, number][], number][] + votes14: [number, [number, number][], number][] + votes15: [number, [number, number][], number][] + votes16: [number, [number, number][], number][] + votes17: [number, [number, number][], number][] + votes18: [number, [number, number][], number][] + votes19: [number, [number, number][], number][] + votes20: [number, [number, number][], number][] + votes21: [number, [number, number][], number][] + votes22: [number, [number, number][], number][] + votes23: [number, [number, number][], number][] + votes24: [number, [number, number][], number][] +} + +export interface RawSolution { + solution: NposCompactSolution24 + score: ElectionScore + round: number +} + +export interface ElectionScore { + minimalStake: bigint + sumStake: bigint + sumStakeSquared: bigint +} + +export const ElectionScore: sts.Type = sts.struct(() => { + return { + minimalStake: sts.bigint(), + sumStake: sts.bigint(), + sumStakeSquared: sts.bigint(), + } +}) + +export const Support: sts.Type = sts.struct(() => { + return { + total: sts.bigint(), + voters: sts.array(() => sts.tuple(() => [AccountId32, sts.bigint()])), + } +}) + +export interface Support { + total: bigint + voters: [AccountId32, bigint][] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_governance_fallback | ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * See [`Pallet::governance_fallback`]. + */ +export interface ElectionProviderMultiPhaseCall_governance_fallback { + __kind: 'governance_fallback' + maybeMaxVoters?: (number | undefined) + maybeMaxTargets?: (number | undefined) +} + +/** + * See [`Pallet::set_emergency_election_result`]. + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + supports: [AccountId32, Support][] +} + +/** + * See [`Pallet::set_minimum_untrusted_score`]. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (ElectionScore | undefined) +} + +/** + * See [`Pallet::submit`]. + */ +export interface ElectionProviderMultiPhaseCall_submit { + __kind: 'submit' + rawSolution: RawSolution +} + +/** + * See [`Pallet::submit_unsigned`]. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + rawSolution: RawSolution + witness: SolutionOrSnapshotSize +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: Id, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + contribute_all: sts.enumStruct({ + index: sts.number(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: Id, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId32, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_contribute_all | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * See [`Pallet::add_memo`]. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: Id + memo: Bytes +} + +/** + * See [`Pallet::contribute`]. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * See [`Pallet::contribute_all`]. + */ +export interface CrowdloanCall_contribute_all { + __kind: 'contribute_all' + index: number + signature?: (MultiSignature | undefined) +} + +/** + * See [`Pallet::create`]. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * See [`Pallet::dissolve`]. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * See [`Pallet::edit`]. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * See [`Pallet::poke`]. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: Id +} + +/** + * See [`Pallet::refund`]. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * See [`Pallet::withdraw`]. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId32 + index: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const CoretimeCall: sts.Type = sts.closedEnum(() => { + return { + assign_core: sts.enumStruct({ + core: sts.number(), + begin: sts.number(), + assignment: sts.array(() => sts.tuple(() => [CoreAssignment, PartsOf57600])), + endHint: sts.option(() => sts.number()), + }), + request_core_count: sts.enumStruct({ + count: sts.number(), + }), + } +}) + +export const PartsOf57600 = sts.number() + +export const CoreAssignment: sts.Type = sts.closedEnum(() => { + return { + Idle: sts.unit(), + Pool: sts.unit(), + Task: sts.number(), + } +}) + +export type CoreAssignment = CoreAssignment_Idle | CoreAssignment_Pool | CoreAssignment_Task + +export interface CoreAssignment_Idle { + __kind: 'Idle' +} + +export interface CoreAssignment_Pool { + __kind: 'Pool' +} + +export interface CoreAssignment_Task { + __kind: 'Task' + value: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type CoretimeCall = CoretimeCall_assign_core | CoretimeCall_request_core_count + +/** + * See [`Pallet::assign_core`]. + */ +export interface CoretimeCall_assign_core { + __kind: 'assign_core' + core: number + begin: number + assignment: [CoreAssignment, PartsOf57600][] + endHint?: (number | undefined) +} + +/** + * See [`Pallet::request_core_count`]. + */ +export interface CoretimeCall_request_core_count { + __kind: 'request_core_count' + count: number +} + +export type PartsOf57600 = number + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ConvictionVotingCall: sts.Type = sts.closedEnum(() => { + return { + delegate: sts.enumStruct({ + class: sts.number(), + to: MultiAddress, + conviction: Conviction, + balance: sts.bigint(), + }), + remove_other_vote: sts.enumStruct({ + target: MultiAddress, + class: sts.number(), + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + class: sts.option(() => sts.number()), + index: sts.number(), + }), + undelegate: sts.enumStruct({ + class: sts.number(), + }), + unlock: sts.enumStruct({ + class: sts.number(), + target: MultiAddress, + }), + vote: sts.enumStruct({ + pollIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + SplitAbstain: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + abstain: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type AccountVote = AccountVote_Split | AccountVote_SplitAbstain | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface AccountVote_SplitAbstain { + __kind: 'SplitAbstain' + aye: bigint + nay: bigint + abstain: bigint +} + +export interface AccountVote_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ConvictionVotingCall = ConvictionVotingCall_delegate | ConvictionVotingCall_remove_other_vote | ConvictionVotingCall_remove_vote | ConvictionVotingCall_undelegate | ConvictionVotingCall_unlock | ConvictionVotingCall_vote + +/** + * See [`Pallet::delegate`]. + */ +export interface ConvictionVotingCall_delegate { + __kind: 'delegate' + class: number + to: MultiAddress + conviction: Conviction + balance: bigint +} + +/** + * See [`Pallet::remove_other_vote`]. + */ +export interface ConvictionVotingCall_remove_other_vote { + __kind: 'remove_other_vote' + target: MultiAddress + class: number + index: number +} + +/** + * See [`Pallet::remove_vote`]. + */ +export interface ConvictionVotingCall_remove_vote { + __kind: 'remove_vote' + class?: (number | undefined) + index: number +} + +/** + * See [`Pallet::undelegate`]. + */ +export interface ConvictionVotingCall_undelegate { + __kind: 'undelegate' + class: number +} + +/** + * See [`Pallet::unlock`]. + */ +export interface ConvictionVotingCall_unlock { + __kind: 'unlock' + class: number + target: MultiAddress +} + +/** + * See [`Pallet::vote`]. + */ +export interface ConvictionVotingCall_vote { + __kind: 'vote' + pollIndex: number + vote: AccountVote +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_approval_voting_params: sts.enumStruct({ + new: ApprovalVotingParams, + }), + set_async_backing_params: sts.enumStruct({ + new: V6AsyncBackingParams, + }), + set_bypass_consistency_check: sts.enumStruct({ + new: sts.boolean(), + }), + set_code_retention_period: sts.enumStruct({ + new: sts.number(), + }), + set_coretime_cores: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: sts.number(), + }), + set_executor_params: sts.enumStruct({ + new: sts.array(() => V6ExecutorParam), + }), + set_group_rotation_frequency: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_minimum_backing_votes: sts.enumStruct({ + new: sts.number(), + }), + set_minimum_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_node_feature: sts.enumStruct({ + index: sts.number(), + value: sts.boolean(), + }), + set_on_demand_base_fee: sts.enumStruct({ + new: sts.bigint(), + }), + set_on_demand_fee_variability: sts.enumStruct({ + new: Perbill, + }), + set_on_demand_queue_max_size: sts.enumStruct({ + new: sts.number(), + }), + set_on_demand_retries: sts.enumStruct({ + new: sts.number(), + }), + set_on_demand_target_queue_utilization: sts.enumStruct({ + new: Perbill, + }), + set_on_demand_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_paras_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_pvf_voting_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_cooldown: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +export const V6ExecutorParam: sts.Type = sts.closedEnum(() => { + return { + MaxMemoryPages: sts.number(), + PrecheckingMaxMemory: sts.bigint(), + PvfExecTimeout: sts.tuple(() => [V6PvfExecKind, sts.bigint()]), + PvfPrepTimeout: sts.tuple(() => [V6PvfPrepKind, sts.bigint()]), + StackLogicalMax: sts.number(), + StackNativeMax: sts.number(), + WasmExtBulkMemory: sts.unit(), + } +}) + +export const V6PvfPrepKind: sts.Type = sts.closedEnum(() => { + return { + Precheck: sts.unit(), + Prepare: sts.unit(), + } +}) + +export type V6PvfPrepKind = V6PvfPrepKind_Precheck | V6PvfPrepKind_Prepare + +export interface V6PvfPrepKind_Precheck { + __kind: 'Precheck' +} + +export interface V6PvfPrepKind_Prepare { + __kind: 'Prepare' +} + +export const V6PvfExecKind: sts.Type = sts.closedEnum(() => { + return { + Approval: sts.unit(), + Backing: sts.unit(), + } +}) + +export type V6PvfExecKind = V6PvfExecKind_Approval | V6PvfExecKind_Backing + +export interface V6PvfExecKind_Approval { + __kind: 'Approval' +} + +export interface V6PvfExecKind_Backing { + __kind: 'Backing' +} + +export type V6ExecutorParam = V6ExecutorParam_MaxMemoryPages | V6ExecutorParam_PrecheckingMaxMemory | V6ExecutorParam_PvfExecTimeout | V6ExecutorParam_PvfPrepTimeout | V6ExecutorParam_StackLogicalMax | V6ExecutorParam_StackNativeMax | V6ExecutorParam_WasmExtBulkMemory + +export interface V6ExecutorParam_MaxMemoryPages { + __kind: 'MaxMemoryPages' + value: number +} + +export interface V6ExecutorParam_PrecheckingMaxMemory { + __kind: 'PrecheckingMaxMemory' + value: bigint +} + +export interface V6ExecutorParam_PvfExecTimeout { + __kind: 'PvfExecTimeout' + value: [V6PvfExecKind, bigint] +} + +export interface V6ExecutorParam_PvfPrepTimeout { + __kind: 'PvfPrepTimeout' + value: [V6PvfPrepKind, bigint] +} + +export interface V6ExecutorParam_StackLogicalMax { + __kind: 'StackLogicalMax' + value: number +} + +export interface V6ExecutorParam_StackNativeMax { + __kind: 'StackNativeMax' + value: number +} + +export interface V6ExecutorParam_WasmExtBulkMemory { + __kind: 'WasmExtBulkMemory' +} + +export const V6AsyncBackingParams: sts.Type = sts.struct(() => { + return { + maxCandidateDepth: sts.number(), + allowedAncestryLen: sts.number(), + } +}) + +export interface V6AsyncBackingParams { + maxCandidateDepth: number + allowedAncestryLen: number +} + +export const ApprovalVotingParams: sts.Type = sts.struct(() => { + return { + maxApprovalCoalesceCount: sts.number(), + } +}) + +export interface ApprovalVotingParams { + maxApprovalCoalesceCount: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ConfigurationCall = ConfigurationCall_set_approval_voting_params | ConfigurationCall_set_async_backing_params | ConfigurationCall_set_bypass_consistency_check | ConfigurationCall_set_code_retention_period | ConfigurationCall_set_coretime_cores | ConfigurationCall_set_dispute_period | ConfigurationCall_set_dispute_post_conclusion_acceptance_period | ConfigurationCall_set_executor_params | ConfigurationCall_set_group_rotation_frequency | ConfigurationCall_set_hrmp_channel_max_capacity | ConfigurationCall_set_hrmp_channel_max_message_size | ConfigurationCall_set_hrmp_channel_max_total_size | ConfigurationCall_set_hrmp_max_message_num_per_candidate | ConfigurationCall_set_hrmp_max_parachain_inbound_channels | ConfigurationCall_set_hrmp_max_parachain_outbound_channels | ConfigurationCall_set_hrmp_open_request_ttl | ConfigurationCall_set_hrmp_recipient_deposit | ConfigurationCall_set_hrmp_sender_deposit | ConfigurationCall_set_max_code_size | ConfigurationCall_set_max_downward_message_size | ConfigurationCall_set_max_head_data_size | ConfigurationCall_set_max_pov_size | ConfigurationCall_set_max_upward_message_num_per_candidate | ConfigurationCall_set_max_upward_message_size | ConfigurationCall_set_max_upward_queue_count | ConfigurationCall_set_max_upward_queue_size | ConfigurationCall_set_max_validators | ConfigurationCall_set_max_validators_per_core | ConfigurationCall_set_minimum_backing_votes | ConfigurationCall_set_minimum_validation_upgrade_delay | ConfigurationCall_set_n_delay_tranches | ConfigurationCall_set_needed_approvals | ConfigurationCall_set_no_show_slots | ConfigurationCall_set_node_feature | ConfigurationCall_set_on_demand_base_fee | ConfigurationCall_set_on_demand_fee_variability | ConfigurationCall_set_on_demand_queue_max_size | ConfigurationCall_set_on_demand_retries | ConfigurationCall_set_on_demand_target_queue_utilization | ConfigurationCall_set_on_demand_ttl | ConfigurationCall_set_paras_availability_period | ConfigurationCall_set_pvf_voting_ttl | ConfigurationCall_set_relay_vrf_modulo_samples | ConfigurationCall_set_scheduling_lookahead | ConfigurationCall_set_validation_upgrade_cooldown | ConfigurationCall_set_validation_upgrade_delay | ConfigurationCall_set_zeroth_delay_tranche_width + +/** + * See [`Pallet::set_approval_voting_params`]. + */ +export interface ConfigurationCall_set_approval_voting_params { + __kind: 'set_approval_voting_params' + new: ApprovalVotingParams +} + +/** + * See [`Pallet::set_async_backing_params`]. + */ +export interface ConfigurationCall_set_async_backing_params { + __kind: 'set_async_backing_params' + new: V6AsyncBackingParams +} + +/** + * See [`Pallet::set_bypass_consistency_check`]. + */ +export interface ConfigurationCall_set_bypass_consistency_check { + __kind: 'set_bypass_consistency_check' + new: boolean +} + +/** + * See [`Pallet::set_code_retention_period`]. + */ +export interface ConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: number +} + +/** + * See [`Pallet::set_coretime_cores`]. + */ +export interface ConfigurationCall_set_coretime_cores { + __kind: 'set_coretime_cores' + new: number +} + +/** + * See [`Pallet::set_dispute_period`]. + */ +export interface ConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: number +} + +/** + * See [`Pallet::set_dispute_post_conclusion_acceptance_period`]. + */ +export interface ConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: number +} + +/** + * See [`Pallet::set_executor_params`]. + */ +export interface ConfigurationCall_set_executor_params { + __kind: 'set_executor_params' + new: V6ExecutorParam[] +} + +/** + * See [`Pallet::set_group_rotation_frequency`]. + */ +export interface ConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: number +} + +/** + * See [`Pallet::set_hrmp_channel_max_capacity`]. + */ +export interface ConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * See [`Pallet::set_hrmp_channel_max_message_size`]. + */ +export interface ConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * See [`Pallet::set_hrmp_channel_max_total_size`]. + */ +export interface ConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * See [`Pallet::set_hrmp_max_message_num_per_candidate`]. + */ +export interface ConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * See [`Pallet::set_hrmp_max_parachain_inbound_channels`]. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * See [`Pallet::set_hrmp_max_parachain_outbound_channels`]. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * See [`Pallet::set_hrmp_open_request_ttl`]. + */ +export interface ConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * See [`Pallet::set_hrmp_recipient_deposit`]. + */ +export interface ConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: bigint +} + +/** + * See [`Pallet::set_hrmp_sender_deposit`]. + */ +export interface ConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: bigint +} + +/** + * See [`Pallet::set_max_code_size`]. + */ +export interface ConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * See [`Pallet::set_max_downward_message_size`]. + */ +export interface ConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * See [`Pallet::set_max_head_data_size`]. + */ +export interface ConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * See [`Pallet::set_max_pov_size`]. + */ +export interface ConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * See [`Pallet::set_max_upward_message_num_per_candidate`]. + */ +export interface ConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * See [`Pallet::set_max_upward_message_size`]. + */ +export interface ConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * See [`Pallet::set_max_upward_queue_count`]. + */ +export interface ConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * See [`Pallet::set_max_upward_queue_size`]. + */ +export interface ConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * See [`Pallet::set_max_validators`]. + */ +export interface ConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * See [`Pallet::set_max_validators_per_core`]. + */ +export interface ConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * See [`Pallet::set_minimum_backing_votes`]. + */ +export interface ConfigurationCall_set_minimum_backing_votes { + __kind: 'set_minimum_backing_votes' + new: number +} + +/** + * See [`Pallet::set_minimum_validation_upgrade_delay`]. + */ +export interface ConfigurationCall_set_minimum_validation_upgrade_delay { + __kind: 'set_minimum_validation_upgrade_delay' + new: number +} + +/** + * See [`Pallet::set_n_delay_tranches`]. + */ +export interface ConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * See [`Pallet::set_needed_approvals`]. + */ +export interface ConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * See [`Pallet::set_no_show_slots`]. + */ +export interface ConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * See [`Pallet::set_node_feature`]. + */ +export interface ConfigurationCall_set_node_feature { + __kind: 'set_node_feature' + index: number + value: boolean +} + +/** + * See [`Pallet::set_on_demand_base_fee`]. + */ +export interface ConfigurationCall_set_on_demand_base_fee { + __kind: 'set_on_demand_base_fee' + new: bigint +} + +/** + * See [`Pallet::set_on_demand_fee_variability`]. + */ +export interface ConfigurationCall_set_on_demand_fee_variability { + __kind: 'set_on_demand_fee_variability' + new: Perbill +} + +/** + * See [`Pallet::set_on_demand_queue_max_size`]. + */ +export interface ConfigurationCall_set_on_demand_queue_max_size { + __kind: 'set_on_demand_queue_max_size' + new: number +} + +/** + * See [`Pallet::set_on_demand_retries`]. + */ +export interface ConfigurationCall_set_on_demand_retries { + __kind: 'set_on_demand_retries' + new: number +} + +/** + * See [`Pallet::set_on_demand_target_queue_utilization`]. + */ +export interface ConfigurationCall_set_on_demand_target_queue_utilization { + __kind: 'set_on_demand_target_queue_utilization' + new: Perbill +} + +/** + * See [`Pallet::set_on_demand_ttl`]. + */ +export interface ConfigurationCall_set_on_demand_ttl { + __kind: 'set_on_demand_ttl' + new: number +} + +/** + * See [`Pallet::set_paras_availability_period`]. + */ +export interface ConfigurationCall_set_paras_availability_period { + __kind: 'set_paras_availability_period' + new: number +} + +/** + * See [`Pallet::set_pvf_voting_ttl`]. + */ +export interface ConfigurationCall_set_pvf_voting_ttl { + __kind: 'set_pvf_voting_ttl' + new: number +} + +/** + * See [`Pallet::set_relay_vrf_modulo_samples`]. + */ +export interface ConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * See [`Pallet::set_scheduling_lookahead`]. + */ +export interface ConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * See [`Pallet::set_validation_upgrade_cooldown`]. + */ +export interface ConfigurationCall_set_validation_upgrade_cooldown { + __kind: 'set_validation_upgrade_cooldown' + new: number +} + +/** + * See [`Pallet::set_validation_upgrade_delay`]. + */ +export interface ConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: number +} + +/** + * See [`Pallet::set_zeroth_delay_tranche_width`]. + */ +export interface ConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: sts.bigint(), + vestingSchedule: sts.option(() => sts.tuple(() => [sts.bigint(), sts.bigint(), sts.number()])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId32), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * See [`Pallet::attest`]. + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * See [`Pallet::claim`]. + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId32 + ethereumSignature: EcdsaSignature +} + +/** + * See [`Pallet::claim_attest`]. + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId32 + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * See [`Pallet::mint_claim`]. + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: bigint + vestingSchedule?: ([bigint, bigint, number] | undefined) + statement?: (StatementKind | undefined) +} + +/** + * See [`Pallet::move_claim`]. + */ +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId32 | undefined) +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ChildBountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + add_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + value: sts.bigint(), + description: sts.bytes(), + }), + award_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + close_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + propose_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ChildBountiesCall = ChildBountiesCall_accept_curator | ChildBountiesCall_add_child_bounty | ChildBountiesCall_award_child_bounty | ChildBountiesCall_claim_child_bounty | ChildBountiesCall_close_child_bounty | ChildBountiesCall_propose_curator | ChildBountiesCall_unassign_curator + +/** + * See [`Pallet::accept_curator`]. + */ +export interface ChildBountiesCall_accept_curator { + __kind: 'accept_curator' + parentBountyId: number + childBountyId: number +} + +/** + * See [`Pallet::add_child_bounty`]. + */ +export interface ChildBountiesCall_add_child_bounty { + __kind: 'add_child_bounty' + parentBountyId: number + value: bigint + description: Bytes +} + +/** + * See [`Pallet::award_child_bounty`]. + */ +export interface ChildBountiesCall_award_child_bounty { + __kind: 'award_child_bounty' + parentBountyId: number + childBountyId: number + beneficiary: MultiAddress +} + +/** + * See [`Pallet::claim_child_bounty`]. + */ +export interface ChildBountiesCall_claim_child_bounty { + __kind: 'claim_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * See [`Pallet::close_child_bounty`]. + */ +export interface ChildBountiesCall_close_child_bounty { + __kind: 'close_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * See [`Pallet::propose_curator`]. + */ +export interface ChildBountiesCall_propose_curator { + __kind: 'propose_curator' + parentBountyId: number + childBountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * See [`Pallet::unassign_curator`]. + */ +export interface ChildBountiesCall_unassign_curator { + __kind: 'unassign_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * See [`Pallet::accept_curator`]. + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * See [`Pallet::approve_bounty`]. + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * See [`Pallet::award_bounty`]. + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: MultiAddress +} + +/** + * See [`Pallet::claim_bounty`]. + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * See [`Pallet::close_bounty`]. + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * See [`Pallet::extend_bounty_expiry`]. + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * See [`Pallet::propose_bounty`]. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * See [`Pallet::propose_curator`]. + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * See [`Pallet::unassign_curator`]. + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const BeefyCall: sts.Type = sts.closedEnum(() => { + return { + report_equivocation: sts.enumStruct({ + equivocationProof: Type_497, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_497, + keyOwnerProof: MembershipProof, + }), + set_new_genesis: sts.enumStruct({ + delayInBlocks: sts.number(), + }), + } +}) + +export const Type_497: sts.Type = sts.struct(() => { + return { + first: VoteMessage, + second: VoteMessage, + } +}) + +export const VoteMessage: sts.Type = sts.struct(() => { + return { + commitment: Commitment, + id: sts.bytes(), + signature: sts.bytes(), + } +}) + +export const Commitment: sts.Type = sts.struct(() => { + return { + payload: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + blockNumber: sts.number(), + validatorSetId: sts.bigint(), + } +}) + +export interface Commitment { + payload: [Bytes, Bytes][] + blockNumber: number + validatorSetId: bigint +} + +export interface VoteMessage { + commitment: Commitment + id: Bytes + signature: Bytes +} + +export interface Type_497 { + first: VoteMessage + second: VoteMessage +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type BeefyCall = BeefyCall_report_equivocation | BeefyCall_report_equivocation_unsigned | BeefyCall_set_new_genesis + +/** + * See [`Pallet::report_equivocation`]. + */ +export interface BeefyCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_497 + keyOwnerProof: MembershipProof +} + +/** + * See [`Pallet::report_equivocation_unsigned`]. + */ +export interface BeefyCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_497 + keyOwnerProof: MembershipProof +} + +/** + * See [`Pallet::set_new_genesis`]. + */ +export interface BeefyCall_set_new_genesis { + __kind: 'set_new_genesis' + delayInBlocks: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_adjust_total_issuance: sts.enumStruct({ + direction: AdjustmentDirection, + delta: sts.bigint(), + }), + force_set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + }), + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_allow_death: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + upgrade_accounts: sts.enumStruct({ + who: sts.array(() => AccountId32), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type BalancesCall = BalancesCall_force_adjust_total_issuance | BalancesCall_force_set_balance | BalancesCall_force_transfer | BalancesCall_force_unreserve | BalancesCall_transfer_all | BalancesCall_transfer_allow_death | BalancesCall_transfer_keep_alive | BalancesCall_upgrade_accounts + +/** + * See [`Pallet::force_adjust_total_issuance`]. + */ +export interface BalancesCall_force_adjust_total_issuance { + __kind: 'force_adjust_total_issuance' + direction: AdjustmentDirection + delta: bigint +} + +/** + * See [`Pallet::force_set_balance`]. + */ +export interface BalancesCall_force_set_balance { + __kind: 'force_set_balance' + who: MultiAddress + newFree: bigint +} + +/** + * See [`Pallet::force_transfer`]. + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::force_unreserve`]. + */ +export interface BalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * See [`Pallet::transfer_all`]. + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * See [`Pallet::transfer_allow_death`]. + */ +export interface BalancesCall_transfer_allow_death { + __kind: 'transfer_allow_death' + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::transfer_keep_alive`]. + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::upgrade_accounts`]. + */ +export interface BalancesCall_upgrade_accounts { + __kind: 'upgrade_accounts' + who: AccountId32[] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const EquivocationProof: sts.Type = sts.struct(() => { + return { + offender: sts.bytes(), + slot: Slot, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Slot = sts.bigint() + +export interface EquivocationProof { + offender: Bytes + slot: Slot + firstHeader: Header + secondHeader: Header +} + +export type Slot = bigint + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V1: sts.enumStruct({ + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + }), + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type NextConfigDescriptor = NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * See [`Pallet::plan_config_change`]. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * See [`Pallet::report_equivocation`]. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * See [`Pallet::report_equivocation_unsigned`]. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * See [`Pallet::bid`]. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * See [`Pallet::cancel_auction`]. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * See [`Pallet::new_auction`]. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const AssetRateCall: sts.Type = sts.closedEnum(() => { + return { + create: sts.enumStruct({ + assetKind: VersionedLocatableAsset, + rate: FixedU128, + }), + remove: sts.enumStruct({ + assetKind: VersionedLocatableAsset, + }), + update: sts.enumStruct({ + assetKind: VersionedLocatableAsset, + rate: FixedU128, + }), + } +}) + +export const FixedU128 = sts.bigint() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type AssetRateCall = AssetRateCall_create | AssetRateCall_remove | AssetRateCall_update + +/** + * See [`Pallet::create`]. + */ +export interface AssetRateCall_create { + __kind: 'create' + assetKind: VersionedLocatableAsset + rate: FixedU128 +} + +/** + * See [`Pallet::remove`]. + */ +export interface AssetRateCall_remove { + __kind: 'remove' + assetKind: VersionedLocatableAsset +} + +/** + * See [`Pallet::update`]. + */ +export interface AssetRateCall_update { + __kind: 'update' + assetKind: VersionedLocatableAsset + rate: FixedU128 +} + +export type FixedU128 = bigint + +export type Call = Call_AssetRate | Call_Auctions | Call_Babe | Call_Balances | Call_Beefy | Call_Bounties | Call_ChildBounties | Call_Claims | Call_Configuration | Call_ConvictionVoting | Call_Coretime | Call_Crowdloan | Call_ElectionProviderMultiPhase | Call_FastUnstake | Call_FellowshipCollective | Call_FellowshipReferenda | Call_Grandpa | Call_Hrmp | Call_Identity | Call_IdentityMigrator | Call_Indices | Call_Initializer | Call_MessageQueue | Call_Multisig | Call_Nis | Call_NisCounterpartBalances | Call_NominationPools | Call_OnDemandAssignmentProvider | Call_ParaInclusion | Call_ParaInherent | Call_Paras | Call_ParasDisputes | Call_ParasShared | Call_ParasSlashing | Call_Preimage | Call_Proxy | Call_Recovery | Call_Referenda | Call_Registrar | Call_Scheduler | Call_Session | Call_Slots | Call_Society | Call_Staking | Call_System | Call_Timestamp | Call_Treasury | Call_Utility | Call_Vesting | Call_VoterList | Call_Whitelist | Call_XcmPallet + +export interface Call_AssetRate { + __kind: 'AssetRate' + value: AssetRateCall +} + +export interface Call_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Call_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Call_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Call_Beefy { + __kind: 'Beefy' + value: BeefyCall +} + +export interface Call_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Call_ChildBounties { + __kind: 'ChildBounties' + value: ChildBountiesCall +} + +export interface Call_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Call_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Call_ConvictionVoting { + __kind: 'ConvictionVoting' + value: ConvictionVotingCall +} + +export interface Call_Coretime { + __kind: 'Coretime' + value: CoretimeCall +} + +export interface Call_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Call_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Call_FastUnstake { + __kind: 'FastUnstake' + value: FastUnstakeCall +} + +export interface Call_FellowshipCollective { + __kind: 'FellowshipCollective' + value: FellowshipCollectiveCall +} + +export interface Call_FellowshipReferenda { + __kind: 'FellowshipReferenda' + value: FellowshipReferendaCall +} + +export interface Call_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Call_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Call_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Call_IdentityMigrator { + __kind: 'IdentityMigrator' + value: IdentityMigratorCall +} + +export interface Call_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Call_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Call_MessageQueue { + __kind: 'MessageQueue' + value: MessageQueueCall +} + +export interface Call_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Call_Nis { + __kind: 'Nis' + value: NisCall +} + +export interface Call_NisCounterpartBalances { + __kind: 'NisCounterpartBalances' + value: NisCounterpartBalancesCall +} + +export interface Call_NominationPools { + __kind: 'NominationPools' + value: NominationPoolsCall +} + +export interface Call_OnDemandAssignmentProvider { + __kind: 'OnDemandAssignmentProvider' + value: OnDemandAssignmentProviderCall +} + +export interface Call_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Call_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Call_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Call_ParasDisputes { + __kind: 'ParasDisputes' + value: ParasDisputesCall +} + +export interface Call_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Call_ParasSlashing { + __kind: 'ParasSlashing' + value: ParasSlashingCall +} + +export interface Call_Preimage { + __kind: 'Preimage' + value: PreimageCall +} + +export interface Call_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Call_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Call_Referenda { + __kind: 'Referenda' + value: ReferendaCall +} + +export interface Call_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Call_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Call_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Call_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Call_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Call_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Call_System { + __kind: 'System' + value: SystemCall +} + +export interface Call_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Call_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Call_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Call_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Call_VoterList { + __kind: 'VoterList' + value: VoterListCall +} + +export interface Call_Whitelist { + __kind: 'Whitelist' + value: WhitelistCall +} + +export interface Call_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NominationPools: sts.unit(), + NonTransfer: sts.unit(), + Society: sts.unit(), + Staking: sts.unit(), + } +}) + +export const MultiAddress: sts.Type = sts.closedEnum(() => { + return { + Address20: sts.bytes(), + Address32: sts.bytes(), + Id: AccountId32, + Index: sts.unit(), + Raw: sts.bytes(), + } +}) diff --git a/squid/src/types/v1002004.ts b/squid/src/types/v1002004.ts new file mode 100644 index 00000000..fc5723e3 --- /dev/null +++ b/squid/src/types/v1002004.ts @@ -0,0 +1,12253 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Weight: sts.Type = sts.struct(() => { + return { + refTime: sts.bigint(), + proofSize: sts.bigint(), + } +}) + +export interface Weight { + refTime: bigint + proofSize: bigint +} + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: sts.number(), + index: sts.number(), + } +}) + +export interface Timepoint { + height: number + index: number +} + +export const AccountId32 = sts.bytes() + +export const Call: sts.Type = sts.closedEnum(() => { + return { + AssetRate: AssetRateCall, + Auctions: AuctionsCall, + Babe: BabeCall, + Balances: BalancesCall, + Beefy: BeefyCall, + Bounties: BountiesCall, + ChildBounties: ChildBountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + ConvictionVoting: ConvictionVotingCall, + Coretime: CoretimeCall, + Crowdloan: CrowdloanCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + FastUnstake: FastUnstakeCall, + FellowshipCollective: FellowshipCollectiveCall, + FellowshipReferenda: FellowshipReferendaCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Identity: IdentityCall, + IdentityMigrator: IdentityMigratorCall, + Indices: IndicesCall, + Initializer: InitializerCall, + MessageQueue: MessageQueueCall, + Multisig: MultisigCall, + Nis: NisCall, + NisCounterpartBalances: NisCounterpartBalancesCall, + NominationPools: NominationPoolsCall, + OnDemandAssignmentProvider: OnDemandAssignmentProviderCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Paras: ParasCall, + ParasDisputes: ParasDisputesCall, + ParasShared: ParasSharedCall, + ParasSlashing: ParasSlashingCall, + Preimage: PreimageCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Referenda: ReferendaCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + Timestamp: TimestampCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + VoterList: VoterListCall, + Whitelist: WhitelistCall, + XcmPallet: XcmPalletCall, + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + claim_assets: sts.enumStruct({ + assets: VersionedAssets, + beneficiary: VersionedLocation, + }), + execute: sts.enumStruct({ + message: Type_480, + maxWeight: Weight, + }), + force_default_xcm_version: sts.enumStruct({ + maybeXcmVersion: sts.option(() => sts.number()), + }), + force_subscribe_version_notify: sts.enumStruct({ + location: VersionedLocation, + }), + force_suspension: sts.enumStruct({ + suspended: sts.boolean(), + }), + force_unsubscribe_version_notify: sts.enumStruct({ + location: VersionedLocation, + }), + force_xcm_version: sts.enumStruct({ + location: V4Location, + version: sts.number(), + }), + limited_reserve_transfer_assets: sts.enumStruct({ + dest: VersionedLocation, + beneficiary: VersionedLocation, + assets: VersionedAssets, + feeAssetItem: sts.number(), + weightLimit: V3WeightLimit, + }), + limited_teleport_assets: sts.enumStruct({ + dest: VersionedLocation, + beneficiary: VersionedLocation, + assets: VersionedAssets, + feeAssetItem: sts.number(), + weightLimit: V3WeightLimit, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: VersionedLocation, + beneficiary: VersionedLocation, + assets: VersionedAssets, + feeAssetItem: sts.number(), + }), + send: sts.enumStruct({ + dest: VersionedLocation, + message: VersionedXcm, + }), + teleport_assets: sts.enumStruct({ + dest: VersionedLocation, + beneficiary: VersionedLocation, + assets: VersionedAssets, + feeAssetItem: sts.number(), + }), + transfer_assets: sts.enumStruct({ + dest: VersionedLocation, + beneficiary: VersionedLocation, + assets: VersionedAssets, + feeAssetItem: sts.number(), + weightLimit: V3WeightLimit, + }), + transfer_assets_using_type_and_then: sts.enumStruct({ + dest: VersionedLocation, + assets: VersionedAssets, + assetsTransferType: TransferType, + remoteFeesId: VersionedAssetId, + feesTransferType: TransferType, + customXcmOnDest: VersionedXcm, + weightLimit: V3WeightLimit, + }), + } +}) + +export const VersionedAssetId: sts.Type = sts.closedEnum(() => { + return { + V3: V3AssetId, + V4: V4AssetId, + } +}) + +export const V4AssetId: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V4Junctions, + } +}) + +export const V4Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: sts.array(() => V4Junction), + X2: sts.array(() => V4Junction), + X3: sts.array(() => V4Junction), + X4: sts.array(() => V4Junction), + X5: sts.array(() => V4Junction), + X6: sts.array(() => V4Junction), + X7: sts.array(() => V4Junction), + X8: sts.array(() => V4Junction), + } +}) + +export const V4Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: sts.option(() => V4NetworkId), + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: sts.option(() => V4NetworkId), + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: sts.option(() => V4NetworkId), + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.enumStruct({ + length: sts.number(), + data: sts.bytes(), + }), + GlobalConsensus: V4NetworkId, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V3BodyId, + part: V3BodyPart, + }), + } +}) + +export const V3BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export type V3BodyPart = V3BodyPart_AtLeastProportion | V3BodyPart_Fraction | V3BodyPart_Members | V3BodyPart_MoreThanProportion | V3BodyPart_Voice + +export interface V3BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V3BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V3BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V3BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V3BodyPart_Voice { + __kind: 'Voice' +} + +export const V3BodyId: sts.Type = sts.closedEnum(() => { + return { + Administration: sts.unit(), + Defense: sts.unit(), + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Moniker: sts.bytes(), + Technical: sts.unit(), + Treasury: sts.unit(), + Unit: sts.unit(), + } +}) + +export type V3BodyId = V3BodyId_Administration | V3BodyId_Defense | V3BodyId_Executive | V3BodyId_Index | V3BodyId_Judicial | V3BodyId_Legislative | V3BodyId_Moniker | V3BodyId_Technical | V3BodyId_Treasury | V3BodyId_Unit + +export interface V3BodyId_Administration { + __kind: 'Administration' +} + +export interface V3BodyId_Defense { + __kind: 'Defense' +} + +export interface V3BodyId_Executive { + __kind: 'Executive' +} + +export interface V3BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V3BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V3BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V3BodyId_Moniker { + __kind: 'Moniker' + value: Bytes +} + +export interface V3BodyId_Technical { + __kind: 'Technical' +} + +export interface V3BodyId_Treasury { + __kind: 'Treasury' +} + +export interface V3BodyId_Unit { + __kind: 'Unit' +} + +export const V4NetworkId: sts.Type = sts.closedEnum(() => { + return { + BitcoinCash: sts.unit(), + BitcoinCore: sts.unit(), + ByFork: sts.enumStruct({ + blockNumber: sts.bigint(), + blockHash: sts.bytes(), + }), + ByGenesis: sts.bytes(), + Ethereum: sts.enumStruct({ + chainId: sts.bigint(), + }), + Kusama: sts.unit(), + Polkadot: sts.unit(), + PolkadotBulletin: sts.unit(), + Rococo: sts.unit(), + Westend: sts.unit(), + Wococo: sts.unit(), + } +}) + +export type V4NetworkId = V4NetworkId_BitcoinCash | V4NetworkId_BitcoinCore | V4NetworkId_ByFork | V4NetworkId_ByGenesis | V4NetworkId_Ethereum | V4NetworkId_Kusama | V4NetworkId_Polkadot | V4NetworkId_PolkadotBulletin | V4NetworkId_Rococo | V4NetworkId_Westend | V4NetworkId_Wococo + +export interface V4NetworkId_BitcoinCash { + __kind: 'BitcoinCash' +} + +export interface V4NetworkId_BitcoinCore { + __kind: 'BitcoinCore' +} + +export interface V4NetworkId_ByFork { + __kind: 'ByFork' + blockNumber: bigint + blockHash: Bytes +} + +export interface V4NetworkId_ByGenesis { + __kind: 'ByGenesis' + value: Bytes +} + +export interface V4NetworkId_Ethereum { + __kind: 'Ethereum' + chainId: bigint +} + +export interface V4NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V4NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export interface V4NetworkId_PolkadotBulletin { + __kind: 'PolkadotBulletin' +} + +export interface V4NetworkId_Rococo { + __kind: 'Rococo' +} + +export interface V4NetworkId_Westend { + __kind: 'Westend' +} + +export interface V4NetworkId_Wococo { + __kind: 'Wococo' +} + +export type V4Junction = V4Junction_AccountId32 | V4Junction_AccountIndex64 | V4Junction_AccountKey20 | V4Junction_GeneralIndex | V4Junction_GeneralKey | V4Junction_GlobalConsensus | V4Junction_OnlyChild | V4Junction_PalletInstance | V4Junction_Parachain | V4Junction_Plurality + +export interface V4Junction_AccountId32 { + __kind: 'AccountId32' + network?: (V4NetworkId | undefined) + id: Bytes +} + +export interface V4Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network?: (V4NetworkId | undefined) + index: bigint +} + +export interface V4Junction_AccountKey20 { + __kind: 'AccountKey20' + network?: (V4NetworkId | undefined) + key: Bytes +} + +export interface V4Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V4Junction_GeneralKey { + __kind: 'GeneralKey' + length: number + data: Bytes +} + +export interface V4Junction_GlobalConsensus { + __kind: 'GlobalConsensus' + value: V4NetworkId +} + +export interface V4Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V4Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V4Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V4Junction_Plurality { + __kind: 'Plurality' + id: V3BodyId + part: V3BodyPart +} + +export type V4Junctions = V4Junctions_Here | V4Junctions_X1 | V4Junctions_X2 | V4Junctions_X3 | V4Junctions_X4 | V4Junctions_X5 | V4Junctions_X6 | V4Junctions_X7 | V4Junctions_X8 + +export interface V4Junctions_Here { + __kind: 'Here' +} + +export interface V4Junctions_X1 { + __kind: 'X1' + value: V4Junction[] +} + +export interface V4Junctions_X2 { + __kind: 'X2' + value: V4Junction[] +} + +export interface V4Junctions_X3 { + __kind: 'X3' + value: V4Junction[] +} + +export interface V4Junctions_X4 { + __kind: 'X4' + value: V4Junction[] +} + +export interface V4Junctions_X5 { + __kind: 'X5' + value: V4Junction[] +} + +export interface V4Junctions_X6 { + __kind: 'X6' + value: V4Junction[] +} + +export interface V4Junctions_X7 { + __kind: 'X7' + value: V4Junction[] +} + +export interface V4Junctions_X8 { + __kind: 'X8' + value: V4Junction[] +} + +export interface V4AssetId { + parents: number + interior: V4Junctions +} + +export const V3AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V3MultiLocation, + } +}) + +export const V3MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V3Junctions, + } +}) + +export const V3Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V3Junction, + X2: sts.tuple(() => [V3Junction, V3Junction]), + X3: sts.tuple(() => [V3Junction, V3Junction, V3Junction]), + X4: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction]), + X5: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + X6: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + X7: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + X8: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + } +}) + +export const V3Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: sts.option(() => V3NetworkId), + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: sts.option(() => V3NetworkId), + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: sts.option(() => V3NetworkId), + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.enumStruct({ + length: sts.number(), + data: sts.bytes(), + }), + GlobalConsensus: V3NetworkId, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V3BodyId, + part: V3BodyPart, + }), + } +}) + +export const V3NetworkId: sts.Type = sts.closedEnum(() => { + return { + BitcoinCash: sts.unit(), + BitcoinCore: sts.unit(), + ByFork: sts.enumStruct({ + blockNumber: sts.bigint(), + blockHash: sts.bytes(), + }), + ByGenesis: sts.bytes(), + Ethereum: sts.enumStruct({ + chainId: sts.bigint(), + }), + Kusama: sts.unit(), + Polkadot: sts.unit(), + PolkadotBulletin: sts.unit(), + Rococo: sts.unit(), + Westend: sts.unit(), + Wococo: sts.unit(), + } +}) + +export type V3NetworkId = V3NetworkId_BitcoinCash | V3NetworkId_BitcoinCore | V3NetworkId_ByFork | V3NetworkId_ByGenesis | V3NetworkId_Ethereum | V3NetworkId_Kusama | V3NetworkId_Polkadot | V3NetworkId_PolkadotBulletin | V3NetworkId_Rococo | V3NetworkId_Westend | V3NetworkId_Wococo + +export interface V3NetworkId_BitcoinCash { + __kind: 'BitcoinCash' +} + +export interface V3NetworkId_BitcoinCore { + __kind: 'BitcoinCore' +} + +export interface V3NetworkId_ByFork { + __kind: 'ByFork' + blockNumber: bigint + blockHash: Bytes +} + +export interface V3NetworkId_ByGenesis { + __kind: 'ByGenesis' + value: Bytes +} + +export interface V3NetworkId_Ethereum { + __kind: 'Ethereum' + chainId: bigint +} + +export interface V3NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V3NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export interface V3NetworkId_PolkadotBulletin { + __kind: 'PolkadotBulletin' +} + +export interface V3NetworkId_Rococo { + __kind: 'Rococo' +} + +export interface V3NetworkId_Westend { + __kind: 'Westend' +} + +export interface V3NetworkId_Wococo { + __kind: 'Wococo' +} + +export type V3Junction = V3Junction_AccountId32 | V3Junction_AccountIndex64 | V3Junction_AccountKey20 | V3Junction_GeneralIndex | V3Junction_GeneralKey | V3Junction_GlobalConsensus | V3Junction_OnlyChild | V3Junction_PalletInstance | V3Junction_Parachain | V3Junction_Plurality + +export interface V3Junction_AccountId32 { + __kind: 'AccountId32' + network?: (V3NetworkId | undefined) + id: Bytes +} + +export interface V3Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network?: (V3NetworkId | undefined) + index: bigint +} + +export interface V3Junction_AccountKey20 { + __kind: 'AccountKey20' + network?: (V3NetworkId | undefined) + key: Bytes +} + +export interface V3Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V3Junction_GeneralKey { + __kind: 'GeneralKey' + length: number + data: Bytes +} + +export interface V3Junction_GlobalConsensus { + __kind: 'GlobalConsensus' + value: V3NetworkId +} + +export interface V3Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V3Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V3Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V3Junction_Plurality { + __kind: 'Plurality' + id: V3BodyId + part: V3BodyPart +} + +export type V3Junctions = V3Junctions_Here | V3Junctions_X1 | V3Junctions_X2 | V3Junctions_X3 | V3Junctions_X4 | V3Junctions_X5 | V3Junctions_X6 | V3Junctions_X7 | V3Junctions_X8 + +export interface V3Junctions_Here { + __kind: 'Here' +} + +export interface V3Junctions_X1 { + __kind: 'X1' + value: V3Junction +} + +export interface V3Junctions_X2 { + __kind: 'X2' + value: [V3Junction, V3Junction] +} + +export interface V3Junctions_X3 { + __kind: 'X3' + value: [V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X4 { + __kind: 'X4' + value: [V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X5 { + __kind: 'X5' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X6 { + __kind: 'X6' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X7 { + __kind: 'X7' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X8 { + __kind: 'X8' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3MultiLocation { + parents: number + interior: V3Junctions +} + +export type V3AssetId = V3AssetId_Abstract | V3AssetId_Concrete + +export interface V3AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V3AssetId_Concrete { + __kind: 'Concrete' + value: V3MultiLocation +} + +export type VersionedAssetId = VersionedAssetId_V3 | VersionedAssetId_V4 + +export interface VersionedAssetId_V3 { + __kind: 'V3' + value: V3AssetId +} + +export interface VersionedAssetId_V4 { + __kind: 'V4' + value: V4AssetId +} + +export const TransferType: sts.Type = sts.closedEnum(() => { + return { + DestinationReserve: sts.unit(), + LocalReserve: sts.unit(), + RemoteReserve: VersionedLocation, + Teleport: sts.unit(), + } +}) + +export type TransferType = TransferType_DestinationReserve | TransferType_LocalReserve | TransferType_RemoteReserve | TransferType_Teleport + +export interface TransferType_DestinationReserve { + __kind: 'DestinationReserve' +} + +export interface TransferType_LocalReserve { + __kind: 'LocalReserve' +} + +export interface TransferType_RemoteReserve { + __kind: 'RemoteReserve' + value: VersionedLocation +} + +export interface TransferType_Teleport { + __kind: 'Teleport' +} + +export type VersionedLocation = VersionedLocation_V2 | VersionedLocation_V3 | VersionedLocation_V4 + +export interface VersionedLocation_V2 { + __kind: 'V2' + value: V2MultiLocation +} + +export interface VersionedLocation_V3 { + __kind: 'V3' + value: V3MultiLocation +} + +export interface VersionedLocation_V4 { + __kind: 'V4' + value: V4Location +} + +export interface V4Location { + parents: number + interior: V4Junctions +} + +export interface V2MultiLocation { + parents: number + interior: V2Junctions +} + +export type V2Junctions = V2Junctions_Here | V2Junctions_X1 | V2Junctions_X2 | V2Junctions_X3 | V2Junctions_X4 | V2Junctions_X5 | V2Junctions_X6 | V2Junctions_X7 | V2Junctions_X8 + +export interface V2Junctions_Here { + __kind: 'Here' +} + +export interface V2Junctions_X1 { + __kind: 'X1' + value: V2Junction +} + +export interface V2Junctions_X2 { + __kind: 'X2' + value: [V2Junction, V2Junction] +} + +export interface V2Junctions_X3 { + __kind: 'X3' + value: [V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X4 { + __kind: 'X4' + value: [V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X5 { + __kind: 'X5' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X6 { + __kind: 'X6' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X7 { + __kind: 'X7' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X8 { + __kind: 'X8' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export type V2Junction = V2Junction_AccountId32 | V2Junction_AccountIndex64 | V2Junction_AccountKey20 | V2Junction_GeneralIndex | V2Junction_GeneralKey | V2Junction_OnlyChild | V2Junction_PalletInstance | V2Junction_Parachain | V2Junction_Plurality + +export interface V2Junction_AccountId32 { + __kind: 'AccountId32' + network: V2NetworkId + id: Bytes +} + +export interface V2Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V2NetworkId + index: bigint +} + +export interface V2Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V2NetworkId + key: Bytes +} + +export interface V2Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V2Junction_GeneralKey { + __kind: 'GeneralKey' + value: WeakBoundedVec +} + +export interface V2Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V2Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V2Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V2Junction_Plurality { + __kind: 'Plurality' + id: V2BodyId + part: V2BodyPart +} + +export type V2BodyPart = V2BodyPart_AtLeastProportion | V2BodyPart_Fraction | V2BodyPart_Members | V2BodyPart_MoreThanProportion | V2BodyPart_Voice + +export interface V2BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V2BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V2BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V2BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V2BodyPart_Voice { + __kind: 'Voice' +} + +export type V2BodyId = V2BodyId_Administration | V2BodyId_Defense | V2BodyId_Executive | V2BodyId_Index | V2BodyId_Judicial | V2BodyId_Legislative | V2BodyId_Named | V2BodyId_Technical | V2BodyId_Treasury | V2BodyId_Unit + +export interface V2BodyId_Administration { + __kind: 'Administration' +} + +export interface V2BodyId_Defense { + __kind: 'Defense' +} + +export interface V2BodyId_Executive { + __kind: 'Executive' +} + +export interface V2BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V2BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V2BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V2BodyId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V2BodyId_Technical { + __kind: 'Technical' +} + +export interface V2BodyId_Treasury { + __kind: 'Treasury' +} + +export interface V2BodyId_Unit { + __kind: 'Unit' +} + +export type WeakBoundedVec = Bytes + +export type V2NetworkId = V2NetworkId_Any | V2NetworkId_Kusama | V2NetworkId_Named | V2NetworkId_Polkadot + +export interface V2NetworkId_Any { + __kind: 'Any' +} + +export interface V2NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V2NetworkId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V2NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export const VersionedXcm: sts.Type = sts.closedEnum(() => { + return { + V2: sts.array(() => V2Instruction), + V3: sts.array(() => V3Instruction), + V4: sts.array(() => V4Instruction), + } +}) + +export const V4Instruction: sts.Type = sts.closedEnum(() => { + return { + AliasOrigin: V4Location, + BurnAsset: sts.array(() => V4Asset), + BuyExecution: sts.enumStruct({ + fees: V4Asset, + weightLimit: V3WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V4Asset), + ticket: V4Location, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + ClearTopic: sts.unit(), + ClearTransactStatus: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V4AssetFilter, + beneficiary: V4Location, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V4AssetFilter, + dest: V4Location, + xcm: sts.array(() => V4Instruction), + }), + DescendOrigin: V4Junctions, + ExchangeAsset: sts.enumStruct({ + give: V4AssetFilter, + want: sts.array(() => V4Asset), + maximal: sts.boolean(), + }), + ExpectAsset: sts.array(() => V4Asset), + ExpectError: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + ExpectOrigin: sts.option(() => V4Location), + ExpectPallet: sts.enumStruct({ + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + crateMajor: sts.number(), + minCrateMinor: sts.number(), + }), + ExpectTransactStatus: V3MaybeErrorCode, + ExportMessage: sts.enumStruct({ + network: V4NetworkId, + destination: V4Junctions, + xcm: sts.array(() => V4Instruction), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V4AssetFilter, + reserve: V4Location, + xcm: sts.array(() => V4Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V4AssetFilter, + dest: V4Location, + xcm: sts.array(() => V4Instruction), + }), + LockAsset: sts.enumStruct({ + asset: V4Asset, + unlocker: V4Location, + }), + NoteUnlockable: sts.enumStruct({ + asset: V4Asset, + owner: V4Location, + }), + QueryPallet: sts.enumStruct({ + moduleName: sts.bytes(), + responseInfo: V4QueryResponseInfo, + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V4Response, + maxWeight: Weight, + querier: sts.option(() => V4Location), + }), + ReceiveTeleportedAsset: sts.array(() => V4Asset), + RefundSurplus: sts.unit(), + ReportError: V4QueryResponseInfo, + ReportHolding: sts.enumStruct({ + responseInfo: V4QueryResponseInfo, + assets: V4AssetFilter, + }), + ReportTransactStatus: V4QueryResponseInfo, + RequestUnlock: sts.enumStruct({ + asset: V4Asset, + locker: V4Location, + }), + ReserveAssetDeposited: sts.array(() => V4Asset), + SetAppendix: sts.array(() => V4Instruction), + SetErrorHandler: sts.array(() => V4Instruction), + SetFeesMode: sts.enumStruct({ + jitWithdraw: sts.boolean(), + }), + SetTopic: sts.bytes(), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: Weight, + }), + Transact: sts.enumStruct({ + originKind: V2OriginKind, + requireWeightAtMost: Weight, + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V4Asset), + beneficiary: V4Location, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V4Asset), + dest: V4Location, + xcm: sts.array(() => V4Instruction), + }), + Trap: sts.bigint(), + UniversalOrigin: V4Junction, + UnlockAsset: sts.enumStruct({ + asset: V4Asset, + target: V4Location, + }), + UnpaidExecution: sts.enumStruct({ + weightLimit: V3WeightLimit, + checkOrigin: sts.option(() => V4Location), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V4Asset), + } +}) + +export const DoubleEncoded: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncoded { + encoded: Bytes +} + +export const V2OriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type V2OriginKind = V2OriginKind_Native | V2OriginKind_SovereignAccount | V2OriginKind_Superuser | V2OriginKind_Xcm + +export interface V2OriginKind_Native { + __kind: 'Native' +} + +export interface V2OriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface V2OriginKind_Superuser { + __kind: 'Superuser' +} + +export interface V2OriginKind_Xcm { + __kind: 'Xcm' +} + +export const V4Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V4Asset), + DispatchResult: V3MaybeErrorCode, + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + Null: sts.unit(), + PalletsInfo: sts.array(() => V4PalletInfo), + Version: sts.number(), + } +}) + +export const V4PalletInfo: sts.Type = sts.struct(() => { + return { + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + major: sts.number(), + minor: sts.number(), + patch: sts.number(), + } +}) + +export interface V4PalletInfo { + index: number + name: Bytes + moduleName: Bytes + major: number + minor: number + patch: number +} + +export type V4Response = V4Response_Assets | V4Response_DispatchResult | V4Response_ExecutionResult | V4Response_Null | V4Response_PalletsInfo | V4Response_Version + +export interface V4Response_Assets { + __kind: 'Assets' + value: V4Asset[] +} + +export interface V4Response_DispatchResult { + __kind: 'DispatchResult' + value: V3MaybeErrorCode +} + +export interface V4Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V3Error] | undefined) +} + +export interface V4Response_Null { + __kind: 'Null' +} + +export interface V4Response_PalletsInfo { + __kind: 'PalletsInfo' + value: V4PalletInfo[] +} + +export interface V4Response_Version { + __kind: 'Version' + value: number +} + +export type V3Error = V3Error_AssetNotFound | V3Error_BadOrigin | V3Error_Barrier | V3Error_DestinationUnsupported | V3Error_ExceedsMaxMessageSize | V3Error_ExceedsStackLimit | V3Error_ExpectationFalse | V3Error_ExportError | V3Error_FailedToDecode | V3Error_FailedToTransactAsset | V3Error_FeesNotMet | V3Error_HoldingWouldOverflow | V3Error_InvalidLocation | V3Error_LocationCannotHold | V3Error_LocationFull | V3Error_LocationNotInvertible | V3Error_LockError | V3Error_MaxWeightInvalid | V3Error_NameMismatch | V3Error_NoDeal | V3Error_NoPermission | V3Error_NotDepositable | V3Error_NotHoldingFees | V3Error_NotWithdrawable | V3Error_Overflow | V3Error_PalletNotFound | V3Error_ReanchorFailed | V3Error_TooExpensive | V3Error_Transport | V3Error_Trap | V3Error_Unanchored | V3Error_UnhandledXcmVersion | V3Error_Unimplemented | V3Error_UnknownClaim | V3Error_Unroutable | V3Error_UntrustedReserveLocation | V3Error_UntrustedTeleportLocation | V3Error_VersionIncompatible | V3Error_WeightLimitReached | V3Error_WeightNotComputable + +export interface V3Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V3Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V3Error_Barrier { + __kind: 'Barrier' +} + +export interface V3Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V3Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V3Error_ExceedsStackLimit { + __kind: 'ExceedsStackLimit' +} + +export interface V3Error_ExpectationFalse { + __kind: 'ExpectationFalse' +} + +export interface V3Error_ExportError { + __kind: 'ExportError' +} + +export interface V3Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V3Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V3Error_FeesNotMet { + __kind: 'FeesNotMet' +} + +export interface V3Error_HoldingWouldOverflow { + __kind: 'HoldingWouldOverflow' +} + +export interface V3Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V3Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V3Error_LocationFull { + __kind: 'LocationFull' +} + +export interface V3Error_LocationNotInvertible { + __kind: 'LocationNotInvertible' +} + +export interface V3Error_LockError { + __kind: 'LockError' +} + +export interface V3Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V3Error_NameMismatch { + __kind: 'NameMismatch' +} + +export interface V3Error_NoDeal { + __kind: 'NoDeal' +} + +export interface V3Error_NoPermission { + __kind: 'NoPermission' +} + +export interface V3Error_NotDepositable { + __kind: 'NotDepositable' +} + +export interface V3Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V3Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V3Error_Overflow { + __kind: 'Overflow' +} + +export interface V3Error_PalletNotFound { + __kind: 'PalletNotFound' +} + +export interface V3Error_ReanchorFailed { + __kind: 'ReanchorFailed' +} + +export interface V3Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V3Error_Transport { + __kind: 'Transport' +} + +export interface V3Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V3Error_Unanchored { + __kind: 'Unanchored' +} + +export interface V3Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V3Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V3Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V3Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V3Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V3Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V3Error_VersionIncompatible { + __kind: 'VersionIncompatible' +} + +export interface V3Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: Weight +} + +export interface V3Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V3MaybeErrorCode = V3MaybeErrorCode_Error | V3MaybeErrorCode_Success | V3MaybeErrorCode_TruncatedError + +export interface V3MaybeErrorCode_Error { + __kind: 'Error' + value: Bytes +} + +export interface V3MaybeErrorCode_Success { + __kind: 'Success' +} + +export interface V3MaybeErrorCode_TruncatedError { + __kind: 'TruncatedError' + value: Bytes +} + +export interface V4Asset { + id: V4AssetId + fun: V4Fungibility +} + +export type V4Fungibility = V4Fungibility_Fungible | V4Fungibility_NonFungible + +export interface V4Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V4Fungibility_NonFungible { + __kind: 'NonFungible' + value: V4AssetInstance +} + +export type V4AssetInstance = V4AssetInstance_Array16 | V4AssetInstance_Array32 | V4AssetInstance_Array4 | V4AssetInstance_Array8 | V4AssetInstance_Index | V4AssetInstance_Undefined + +export interface V4AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V4AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V4AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V4AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V4AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V4AssetInstance_Undefined { + __kind: 'Undefined' +} + +export const V4QueryResponseInfo: sts.Type = sts.struct(() => { + return { + destination: V4Location, + queryId: sts.bigint(), + maxWeight: Weight, + } +}) + +export interface V4QueryResponseInfo { + destination: V4Location + queryId: bigint + maxWeight: Weight +} + +export const V3MaybeErrorCode: sts.Type = sts.closedEnum(() => { + return { + Error: sts.bytes(), + Success: sts.unit(), + TruncatedError: sts.bytes(), + } +}) + +export const V3Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + ExceedsStackLimit: sts.unit(), + ExpectationFalse: sts.unit(), + ExportError: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + FeesNotMet: sts.unit(), + HoldingWouldOverflow: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + LocationFull: sts.unit(), + LocationNotInvertible: sts.unit(), + LockError: sts.unit(), + MaxWeightInvalid: sts.unit(), + NameMismatch: sts.unit(), + NoDeal: sts.unit(), + NoPermission: sts.unit(), + NotDepositable: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + PalletNotFound: sts.unit(), + ReanchorFailed: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + Unanchored: sts.unit(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + VersionIncompatible: sts.unit(), + WeightLimitReached: Weight, + WeightNotComputable: sts.unit(), + } +}) + +export const V4AssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V4Asset), + Wild: V4WildAsset, + } +}) + +export const V4WildAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllCounted: sts.number(), + AllOf: sts.enumStruct({ + id: V4AssetId, + fun: V4WildFungibility, + }), + AllOfCounted: sts.enumStruct({ + id: V4AssetId, + fun: V4WildFungibility, + count: sts.number(), + }), + } +}) + +export const V4WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V4WildFungibility = V4WildFungibility_Fungible | V4WildFungibility_NonFungible + +export interface V4WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V4WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export type V4WildAsset = V4WildAsset_All | V4WildAsset_AllCounted | V4WildAsset_AllOf | V4WildAsset_AllOfCounted + +export interface V4WildAsset_All { + __kind: 'All' +} + +export interface V4WildAsset_AllCounted { + __kind: 'AllCounted' + value: number +} + +export interface V4WildAsset_AllOf { + __kind: 'AllOf' + id: V4AssetId + fun: V4WildFungibility +} + +export interface V4WildAsset_AllOfCounted { + __kind: 'AllOfCounted' + id: V4AssetId + fun: V4WildFungibility + count: number +} + +export type V4AssetFilter = V4AssetFilter_Definite | V4AssetFilter_Wild + +export interface V4AssetFilter_Definite { + __kind: 'Definite' + value: V4Asset[] +} + +export interface V4AssetFilter_Wild { + __kind: 'Wild' + value: V4WildAsset +} + +export const V4Asset: sts.Type = sts.struct(() => { + return { + id: V4AssetId, + fun: V4Fungibility, + } +}) + +export const V4Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V4AssetInstance, + } +}) + +export const V4AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V4Instruction = V4Instruction_AliasOrigin | V4Instruction_BurnAsset | V4Instruction_BuyExecution | V4Instruction_ClaimAsset | V4Instruction_ClearError | V4Instruction_ClearOrigin | V4Instruction_ClearTopic | V4Instruction_ClearTransactStatus | V4Instruction_DepositAsset | V4Instruction_DepositReserveAsset | V4Instruction_DescendOrigin | V4Instruction_ExchangeAsset | V4Instruction_ExpectAsset | V4Instruction_ExpectError | V4Instruction_ExpectOrigin | V4Instruction_ExpectPallet | V4Instruction_ExpectTransactStatus | V4Instruction_ExportMessage | V4Instruction_HrmpChannelAccepted | V4Instruction_HrmpChannelClosing | V4Instruction_HrmpNewChannelOpenRequest | V4Instruction_InitiateReserveWithdraw | V4Instruction_InitiateTeleport | V4Instruction_LockAsset | V4Instruction_NoteUnlockable | V4Instruction_QueryPallet | V4Instruction_QueryResponse | V4Instruction_ReceiveTeleportedAsset | V4Instruction_RefundSurplus | V4Instruction_ReportError | V4Instruction_ReportHolding | V4Instruction_ReportTransactStatus | V4Instruction_RequestUnlock | V4Instruction_ReserveAssetDeposited | V4Instruction_SetAppendix | V4Instruction_SetErrorHandler | V4Instruction_SetFeesMode | V4Instruction_SetTopic | V4Instruction_SubscribeVersion | V4Instruction_Transact | V4Instruction_TransferAsset | V4Instruction_TransferReserveAsset | V4Instruction_Trap | V4Instruction_UniversalOrigin | V4Instruction_UnlockAsset | V4Instruction_UnpaidExecution | V4Instruction_UnsubscribeVersion | V4Instruction_WithdrawAsset + +export interface V4Instruction_AliasOrigin { + __kind: 'AliasOrigin' + value: V4Location +} + +export interface V4Instruction_BurnAsset { + __kind: 'BurnAsset' + value: V4Asset[] +} + +export interface V4Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V4Asset + weightLimit: V3WeightLimit +} + +export interface V4Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V4Asset[] + ticket: V4Location +} + +export interface V4Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V4Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V4Instruction_ClearTopic { + __kind: 'ClearTopic' +} + +export interface V4Instruction_ClearTransactStatus { + __kind: 'ClearTransactStatus' +} + +export interface V4Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V4AssetFilter + beneficiary: V4Location +} + +export interface V4Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V4AssetFilter + dest: V4Location + xcm: V4Instruction[] +} + +export interface V4Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V4Junctions +} + +export interface V4Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V4AssetFilter + want: V4Asset[] + maximal: boolean +} + +export interface V4Instruction_ExpectAsset { + __kind: 'ExpectAsset' + value: V4Asset[] +} + +export interface V4Instruction_ExpectError { + __kind: 'ExpectError' + value?: ([number, V3Error] | undefined) +} + +export interface V4Instruction_ExpectOrigin { + __kind: 'ExpectOrigin' + value?: (V4Location | undefined) +} + +export interface V4Instruction_ExpectPallet { + __kind: 'ExpectPallet' + index: number + name: Bytes + moduleName: Bytes + crateMajor: number + minCrateMinor: number +} + +export interface V4Instruction_ExpectTransactStatus { + __kind: 'ExpectTransactStatus' + value: V3MaybeErrorCode +} + +export interface V4Instruction_ExportMessage { + __kind: 'ExportMessage' + network: V4NetworkId + destination: V4Junctions + xcm: V4Instruction[] +} + +export interface V4Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V4Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V4Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V4Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V4AssetFilter + reserve: V4Location + xcm: V4Instruction[] +} + +export interface V4Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V4AssetFilter + dest: V4Location + xcm: V4Instruction[] +} + +export interface V4Instruction_LockAsset { + __kind: 'LockAsset' + asset: V4Asset + unlocker: V4Location +} + +export interface V4Instruction_NoteUnlockable { + __kind: 'NoteUnlockable' + asset: V4Asset + owner: V4Location +} + +export interface V4Instruction_QueryPallet { + __kind: 'QueryPallet' + moduleName: Bytes + responseInfo: V4QueryResponseInfo +} + +export interface V4Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V4Response + maxWeight: Weight + querier?: (V4Location | undefined) +} + +export interface V4Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V4Asset[] +} + +export interface V4Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V4Instruction_ReportError { + __kind: 'ReportError' + value: V4QueryResponseInfo +} + +export interface V4Instruction_ReportHolding { + __kind: 'ReportHolding' + responseInfo: V4QueryResponseInfo + assets: V4AssetFilter +} + +export interface V4Instruction_ReportTransactStatus { + __kind: 'ReportTransactStatus' + value: V4QueryResponseInfo +} + +export interface V4Instruction_RequestUnlock { + __kind: 'RequestUnlock' + asset: V4Asset + locker: V4Location +} + +export interface V4Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V4Asset[] +} + +export interface V4Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V4Instruction[] +} + +export interface V4Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V4Instruction[] +} + +export interface V4Instruction_SetFeesMode { + __kind: 'SetFeesMode' + jitWithdraw: boolean +} + +export interface V4Instruction_SetTopic { + __kind: 'SetTopic' + value: Bytes +} + +export interface V4Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: Weight +} + +export interface V4Instruction_Transact { + __kind: 'Transact' + originKind: V2OriginKind + requireWeightAtMost: Weight + call: DoubleEncoded +} + +export interface V4Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V4Asset[] + beneficiary: V4Location +} + +export interface V4Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V4Asset[] + dest: V4Location + xcm: V4Instruction[] +} + +export interface V4Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V4Instruction_UniversalOrigin { + __kind: 'UniversalOrigin' + value: V4Junction +} + +export interface V4Instruction_UnlockAsset { + __kind: 'UnlockAsset' + asset: V4Asset + target: V4Location +} + +export interface V4Instruction_UnpaidExecution { + __kind: 'UnpaidExecution' + weightLimit: V3WeightLimit + checkOrigin?: (V4Location | undefined) +} + +export interface V4Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V4Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V4Asset[] +} + +export type V3WeightLimit = V3WeightLimit_Limited | V3WeightLimit_Unlimited + +export interface V3WeightLimit_Limited { + __kind: 'Limited' + value: Weight +} + +export interface V3WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V3Instruction: sts.Type = sts.closedEnum(() => { + return { + AliasOrigin: V3MultiLocation, + BurnAsset: sts.array(() => V3MultiAsset), + BuyExecution: sts.enumStruct({ + fees: V3MultiAsset, + weightLimit: V3WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + ticket: V3MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + ClearTopic: sts.unit(), + ClearTransactStatus: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + beneficiary: V3MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + DescendOrigin: V3Junctions, + ExchangeAsset: sts.enumStruct({ + give: V3MultiAssetFilter, + want: sts.array(() => V3MultiAsset), + maximal: sts.boolean(), + }), + ExpectAsset: sts.array(() => V3MultiAsset), + ExpectError: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + ExpectOrigin: sts.option(() => V3MultiLocation), + ExpectPallet: sts.enumStruct({ + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + crateMajor: sts.number(), + minCrateMinor: sts.number(), + }), + ExpectTransactStatus: V3MaybeErrorCode, + ExportMessage: sts.enumStruct({ + network: V3NetworkId, + destination: V3Junctions, + xcm: sts.array(() => V3Instruction), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V3MultiAssetFilter, + reserve: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + LockAsset: sts.enumStruct({ + asset: V3MultiAsset, + unlocker: V3MultiLocation, + }), + NoteUnlockable: sts.enumStruct({ + asset: V3MultiAsset, + owner: V3MultiLocation, + }), + QueryPallet: sts.enumStruct({ + moduleName: sts.bytes(), + responseInfo: V3QueryResponseInfo, + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V3Response, + maxWeight: Weight, + querier: sts.option(() => V3MultiLocation), + }), + ReceiveTeleportedAsset: sts.array(() => V3MultiAsset), + RefundSurplus: sts.unit(), + ReportError: V3QueryResponseInfo, + ReportHolding: sts.enumStruct({ + responseInfo: V3QueryResponseInfo, + assets: V3MultiAssetFilter, + }), + ReportTransactStatus: V3QueryResponseInfo, + RequestUnlock: sts.enumStruct({ + asset: V3MultiAsset, + locker: V3MultiLocation, + }), + ReserveAssetDeposited: sts.array(() => V3MultiAsset), + SetAppendix: sts.array(() => V3Instruction), + SetErrorHandler: sts.array(() => V3Instruction), + SetFeesMode: sts.enumStruct({ + jitWithdraw: sts.boolean(), + }), + SetTopic: sts.bytes(), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: Weight, + }), + Transact: sts.enumStruct({ + originKind: V2OriginKind, + requireWeightAtMost: Weight, + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + beneficiary: V3MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + Trap: sts.bigint(), + UniversalOrigin: V3Junction, + UnlockAsset: sts.enumStruct({ + asset: V3MultiAsset, + target: V3MultiLocation, + }), + UnpaidExecution: sts.enumStruct({ + weightLimit: V3WeightLimit, + checkOrigin: sts.option(() => V3MultiLocation), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V3MultiAsset), + } +}) + +export const V3Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V3MultiAsset), + DispatchResult: V3MaybeErrorCode, + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + Null: sts.unit(), + PalletsInfo: sts.array(() => V3PalletInfo), + Version: sts.number(), + } +}) + +export const V3PalletInfo: sts.Type = sts.struct(() => { + return { + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + major: sts.number(), + minor: sts.number(), + patch: sts.number(), + } +}) + +export interface V3PalletInfo { + index: number + name: Bytes + moduleName: Bytes + major: number + minor: number + patch: number +} + +export type V3Response = V3Response_Assets | V3Response_DispatchResult | V3Response_ExecutionResult | V3Response_Null | V3Response_PalletsInfo | V3Response_Version + +export interface V3Response_Assets { + __kind: 'Assets' + value: V3MultiAsset[] +} + +export interface V3Response_DispatchResult { + __kind: 'DispatchResult' + value: V3MaybeErrorCode +} + +export interface V3Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V3Error] | undefined) +} + +export interface V3Response_Null { + __kind: 'Null' +} + +export interface V3Response_PalletsInfo { + __kind: 'PalletsInfo' + value: V3PalletInfo[] +} + +export interface V3Response_Version { + __kind: 'Version' + value: number +} + +export interface V3MultiAsset { + id: V3AssetId + fun: V3Fungibility +} + +export type V3Fungibility = V3Fungibility_Fungible | V3Fungibility_NonFungible + +export interface V3Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V3Fungibility_NonFungible { + __kind: 'NonFungible' + value: V3AssetInstance +} + +export type V3AssetInstance = V3AssetInstance_Array16 | V3AssetInstance_Array32 | V3AssetInstance_Array4 | V3AssetInstance_Array8 | V3AssetInstance_Index | V3AssetInstance_Undefined + +export interface V3AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V3AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V3AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V3AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V3AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V3AssetInstance_Undefined { + __kind: 'Undefined' +} + +export const V3QueryResponseInfo: sts.Type = sts.struct(() => { + return { + destination: V3MultiLocation, + queryId: sts.bigint(), + maxWeight: Weight, + } +}) + +export interface V3QueryResponseInfo { + destination: V3MultiLocation + queryId: bigint + maxWeight: Weight +} + +export const V3MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V3MultiAsset), + Wild: V3WildMultiAsset, + } +}) + +export const V3WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllCounted: sts.number(), + AllOf: sts.enumStruct({ + id: V3AssetId, + fun: V3WildFungibility, + }), + AllOfCounted: sts.enumStruct({ + id: V3AssetId, + fun: V3WildFungibility, + count: sts.number(), + }), + } +}) + +export const V3WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V3WildFungibility = V3WildFungibility_Fungible | V3WildFungibility_NonFungible + +export interface V3WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V3WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export type V3WildMultiAsset = V3WildMultiAsset_All | V3WildMultiAsset_AllCounted | V3WildMultiAsset_AllOf | V3WildMultiAsset_AllOfCounted + +export interface V3WildMultiAsset_All { + __kind: 'All' +} + +export interface V3WildMultiAsset_AllCounted { + __kind: 'AllCounted' + value: number +} + +export interface V3WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V3AssetId + fun: V3WildFungibility +} + +export interface V3WildMultiAsset_AllOfCounted { + __kind: 'AllOfCounted' + id: V3AssetId + fun: V3WildFungibility + count: number +} + +export type V3MultiAssetFilter = V3MultiAssetFilter_Definite | V3MultiAssetFilter_Wild + +export interface V3MultiAssetFilter_Definite { + __kind: 'Definite' + value: V3MultiAsset[] +} + +export interface V3MultiAssetFilter_Wild { + __kind: 'Wild' + value: V3WildMultiAsset +} + +export const V3MultiAsset: sts.Type = sts.struct(() => { + return { + id: V3AssetId, + fun: V3Fungibility, + } +}) + +export const V3Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V3AssetInstance, + } +}) + +export const V3AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V3Instruction = V3Instruction_AliasOrigin | V3Instruction_BurnAsset | V3Instruction_BuyExecution | V3Instruction_ClaimAsset | V3Instruction_ClearError | V3Instruction_ClearOrigin | V3Instruction_ClearTopic | V3Instruction_ClearTransactStatus | V3Instruction_DepositAsset | V3Instruction_DepositReserveAsset | V3Instruction_DescendOrigin | V3Instruction_ExchangeAsset | V3Instruction_ExpectAsset | V3Instruction_ExpectError | V3Instruction_ExpectOrigin | V3Instruction_ExpectPallet | V3Instruction_ExpectTransactStatus | V3Instruction_ExportMessage | V3Instruction_HrmpChannelAccepted | V3Instruction_HrmpChannelClosing | V3Instruction_HrmpNewChannelOpenRequest | V3Instruction_InitiateReserveWithdraw | V3Instruction_InitiateTeleport | V3Instruction_LockAsset | V3Instruction_NoteUnlockable | V3Instruction_QueryPallet | V3Instruction_QueryResponse | V3Instruction_ReceiveTeleportedAsset | V3Instruction_RefundSurplus | V3Instruction_ReportError | V3Instruction_ReportHolding | V3Instruction_ReportTransactStatus | V3Instruction_RequestUnlock | V3Instruction_ReserveAssetDeposited | V3Instruction_SetAppendix | V3Instruction_SetErrorHandler | V3Instruction_SetFeesMode | V3Instruction_SetTopic | V3Instruction_SubscribeVersion | V3Instruction_Transact | V3Instruction_TransferAsset | V3Instruction_TransferReserveAsset | V3Instruction_Trap | V3Instruction_UniversalOrigin | V3Instruction_UnlockAsset | V3Instruction_UnpaidExecution | V3Instruction_UnsubscribeVersion | V3Instruction_WithdrawAsset + +export interface V3Instruction_AliasOrigin { + __kind: 'AliasOrigin' + value: V3MultiLocation +} + +export interface V3Instruction_BurnAsset { + __kind: 'BurnAsset' + value: V3MultiAsset[] +} + +export interface V3Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V3MultiAsset + weightLimit: V3WeightLimit +} + +export interface V3Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V3MultiAsset[] + ticket: V3MultiLocation +} + +export interface V3Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V3Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V3Instruction_ClearTopic { + __kind: 'ClearTopic' +} + +export interface V3Instruction_ClearTransactStatus { + __kind: 'ClearTransactStatus' +} + +export interface V3Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V3MultiAssetFilter + beneficiary: V3MultiLocation +} + +export interface V3Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V3Junctions +} + +export interface V3Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V3MultiAssetFilter + want: V3MultiAsset[] + maximal: boolean +} + +export interface V3Instruction_ExpectAsset { + __kind: 'ExpectAsset' + value: V3MultiAsset[] +} + +export interface V3Instruction_ExpectError { + __kind: 'ExpectError' + value?: ([number, V3Error] | undefined) +} + +export interface V3Instruction_ExpectOrigin { + __kind: 'ExpectOrigin' + value?: (V3MultiLocation | undefined) +} + +export interface V3Instruction_ExpectPallet { + __kind: 'ExpectPallet' + index: number + name: Bytes + moduleName: Bytes + crateMajor: number + minCrateMinor: number +} + +export interface V3Instruction_ExpectTransactStatus { + __kind: 'ExpectTransactStatus' + value: V3MaybeErrorCode +} + +export interface V3Instruction_ExportMessage { + __kind: 'ExportMessage' + network: V3NetworkId + destination: V3Junctions + xcm: V3Instruction[] +} + +export interface V3Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V3Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V3Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V3Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V3MultiAssetFilter + reserve: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_LockAsset { + __kind: 'LockAsset' + asset: V3MultiAsset + unlocker: V3MultiLocation +} + +export interface V3Instruction_NoteUnlockable { + __kind: 'NoteUnlockable' + asset: V3MultiAsset + owner: V3MultiLocation +} + +export interface V3Instruction_QueryPallet { + __kind: 'QueryPallet' + moduleName: Bytes + responseInfo: V3QueryResponseInfo +} + +export interface V3Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V3Response + maxWeight: Weight + querier?: (V3MultiLocation | undefined) +} + +export interface V3Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V3MultiAsset[] +} + +export interface V3Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V3Instruction_ReportError { + __kind: 'ReportError' + value: V3QueryResponseInfo +} + +export interface V3Instruction_ReportHolding { + __kind: 'ReportHolding' + responseInfo: V3QueryResponseInfo + assets: V3MultiAssetFilter +} + +export interface V3Instruction_ReportTransactStatus { + __kind: 'ReportTransactStatus' + value: V3QueryResponseInfo +} + +export interface V3Instruction_RequestUnlock { + __kind: 'RequestUnlock' + asset: V3MultiAsset + locker: V3MultiLocation +} + +export interface V3Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V3MultiAsset[] +} + +export interface V3Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V3Instruction[] +} + +export interface V3Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V3Instruction[] +} + +export interface V3Instruction_SetFeesMode { + __kind: 'SetFeesMode' + jitWithdraw: boolean +} + +export interface V3Instruction_SetTopic { + __kind: 'SetTopic' + value: Bytes +} + +export interface V3Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: Weight +} + +export interface V3Instruction_Transact { + __kind: 'Transact' + originKind: V2OriginKind + requireWeightAtMost: Weight + call: DoubleEncoded +} + +export interface V3Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V3MultiAsset[] + beneficiary: V3MultiLocation +} + +export interface V3Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V3MultiAsset[] + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V3Instruction_UniversalOrigin { + __kind: 'UniversalOrigin' + value: V3Junction +} + +export interface V3Instruction_UnlockAsset { + __kind: 'UnlockAsset' + asset: V3MultiAsset + target: V3MultiLocation +} + +export interface V3Instruction_UnpaidExecution { + __kind: 'UnpaidExecution' + weightLimit: V3WeightLimit + checkOrigin?: (V3MultiLocation | undefined) +} + +export interface V3Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V3Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V3MultiAsset[] +} + +export const V2Instruction: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V2MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + ticket: V2MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V2MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V2Junctions, + ExchangeAsset: sts.enumStruct({ + give: V2MultiAssetFilter, + receive: sts.array(() => V2MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V2MultiAssetFilter, + reserve: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V2MultiAssetFilter, + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + assets: V2MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V2MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V2MultiAsset), + SetAppendix: sts.array(() => V2Instruction), + SetErrorHandler: sts.array(() => V2Instruction), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V2OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + beneficiary: V2MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V2MultiAsset), + } +}) + +export const V2Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V2MultiAsset), + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V2Error])), + Null: sts.unit(), + Version: sts.number(), + } +}) + +export const V2Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + MaxWeightInvalid: sts.unit(), + MultiLocationFull: sts.unit(), + MultiLocationNotInvertible: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + WeightLimitReached: sts.bigint(), + WeightNotComputable: sts.unit(), + } +}) + +export type V2Error = V2Error_AssetNotFound | V2Error_BadOrigin | V2Error_Barrier | V2Error_DestinationUnsupported | V2Error_ExceedsMaxMessageSize | V2Error_FailedToDecode | V2Error_FailedToTransactAsset | V2Error_InvalidLocation | V2Error_LocationCannotHold | V2Error_MaxWeightInvalid | V2Error_MultiLocationFull | V2Error_MultiLocationNotInvertible | V2Error_NotHoldingFees | V2Error_NotWithdrawable | V2Error_Overflow | V2Error_TooExpensive | V2Error_Transport | V2Error_Trap | V2Error_UnhandledXcmVersion | V2Error_Unimplemented | V2Error_UnknownClaim | V2Error_Unroutable | V2Error_UntrustedReserveLocation | V2Error_UntrustedTeleportLocation | V2Error_WeightLimitReached | V2Error_WeightNotComputable + +export interface V2Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V2Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V2Error_Barrier { + __kind: 'Barrier' +} + +export interface V2Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V2Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V2Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V2Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V2Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V2Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V2Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V2Error_MultiLocationFull { + __kind: 'MultiLocationFull' +} + +export interface V2Error_MultiLocationNotInvertible { + __kind: 'MultiLocationNotInvertible' +} + +export interface V2Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V2Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V2Error_Overflow { + __kind: 'Overflow' +} + +export interface V2Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V2Error_Transport { + __kind: 'Transport' +} + +export interface V2Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V2Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V2Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V2Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V2Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V2Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V2Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: bigint +} + +export interface V2Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V2Response = V2Response_Assets | V2Response_ExecutionResult | V2Response_Null | V2Response_Version + +export interface V2Response_Assets { + __kind: 'Assets' + value: V2MultiAsset[] +} + +export interface V2Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V2Error] | undefined) +} + +export interface V2Response_Null { + __kind: 'Null' +} + +export interface V2Response_Version { + __kind: 'Version' + value: number +} + +export interface V2MultiAsset { + id: V2AssetId + fun: V2Fungibility +} + +export type V2Fungibility = V2Fungibility_Fungible | V2Fungibility_NonFungible + +export interface V2Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V2Fungibility_NonFungible { + __kind: 'NonFungible' + value: V2AssetInstance +} + +export type V2AssetInstance = V2AssetInstance_Array16 | V2AssetInstance_Array32 | V2AssetInstance_Array4 | V2AssetInstance_Array8 | V2AssetInstance_Blob | V2AssetInstance_Index | V2AssetInstance_Undefined + +export interface V2AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V2AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V2AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V2AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V2AssetInstance_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface V2AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V2AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V2AssetId = V2AssetId_Abstract | V2AssetId_Concrete + +export interface V2AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V2AssetId_Concrete { + __kind: 'Concrete' + value: V2MultiLocation +} + +export const V2Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V2Junction, + X2: sts.tuple(() => [V2Junction, V2Junction]), + X3: sts.tuple(() => [V2Junction, V2Junction, V2Junction]), + X4: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction]), + X5: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + X6: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + X7: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + X8: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + } +}) + +export const V2Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V2NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V2NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V2NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: WeakBoundedVec, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V2BodyId, + part: V2BodyPart, + }), + } +}) + +export const V2BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export const V2BodyId: sts.Type = sts.closedEnum(() => { + return { + Administration: sts.unit(), + Defense: sts.unit(), + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: WeakBoundedVec, + Technical: sts.unit(), + Treasury: sts.unit(), + Unit: sts.unit(), + } +}) + +export const WeakBoundedVec = sts.bytes() + +export const V2NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: WeakBoundedVec, + Polkadot: sts.unit(), + } +}) + +export const V2MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V2MultiAsset), + Wild: V2WildMultiAsset, + } +}) + +export const V2WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllOf: sts.enumStruct({ + id: V2AssetId, + fun: V2WildFungibility, + }), + } +}) + +export const V2WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V2WildFungibility = V2WildFungibility_Fungible | V2WildFungibility_NonFungible + +export interface V2WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V2WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V2AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V2MultiLocation, + } +}) + +export type V2WildMultiAsset = V2WildMultiAsset_All | V2WildMultiAsset_AllOf + +export interface V2WildMultiAsset_All { + __kind: 'All' +} + +export interface V2WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V2AssetId + fun: V2WildFungibility +} + +export type V2MultiAssetFilter = V2MultiAssetFilter_Definite | V2MultiAssetFilter_Wild + +export interface V2MultiAssetFilter_Definite { + __kind: 'Definite' + value: V2MultiAsset[] +} + +export interface V2MultiAssetFilter_Wild { + __kind: 'Wild' + value: V2WildMultiAsset +} + +export const V2MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V2Junctions, + } +}) + +export const V2WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: sts.bigint(), + Unlimited: sts.unit(), + } +}) + +export type V2WeightLimit = V2WeightLimit_Limited | V2WeightLimit_Unlimited + +export interface V2WeightLimit_Limited { + __kind: 'Limited' + value: bigint +} + +export interface V2WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V2MultiAsset: sts.Type = sts.struct(() => { + return { + id: V2AssetId, + fun: V2Fungibility, + } +}) + +export const V2Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V2AssetInstance, + } +}) + +export const V2AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V2Instruction = V2Instruction_BuyExecution | V2Instruction_ClaimAsset | V2Instruction_ClearError | V2Instruction_ClearOrigin | V2Instruction_DepositAsset | V2Instruction_DepositReserveAsset | V2Instruction_DescendOrigin | V2Instruction_ExchangeAsset | V2Instruction_HrmpChannelAccepted | V2Instruction_HrmpChannelClosing | V2Instruction_HrmpNewChannelOpenRequest | V2Instruction_InitiateReserveWithdraw | V2Instruction_InitiateTeleport | V2Instruction_QueryHolding | V2Instruction_QueryResponse | V2Instruction_ReceiveTeleportedAsset | V2Instruction_RefundSurplus | V2Instruction_ReportError | V2Instruction_ReserveAssetDeposited | V2Instruction_SetAppendix | V2Instruction_SetErrorHandler | V2Instruction_SubscribeVersion | V2Instruction_Transact | V2Instruction_TransferAsset | V2Instruction_TransferReserveAsset | V2Instruction_Trap | V2Instruction_UnsubscribeVersion | V2Instruction_WithdrawAsset + +export interface V2Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V2MultiAsset + weightLimit: V2WeightLimit +} + +export interface V2Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V2MultiAsset[] + ticket: V2MultiLocation +} + +export interface V2Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V2Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V2Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V2MultiAssetFilter + maxAssets: number + beneficiary: V2MultiLocation +} + +export interface V2Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V2MultiAssetFilter + maxAssets: number + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V2Junctions +} + +export interface V2Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V2MultiAssetFilter + receive: V2MultiAsset[] +} + +export interface V2Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V2Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V2Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V2Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V2MultiAssetFilter + reserve: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V2MultiAssetFilter + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V2MultiLocation + assets: V2MultiAssetFilter + maxResponseWeight: bigint +} + +export interface V2Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface V2Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V2MultiAsset[] +} + +export interface V2Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V2Instruction_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V2MultiLocation + maxResponseWeight: bigint +} + +export interface V2Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V2MultiAsset[] +} + +export interface V2Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V2Instruction[] +} + +export interface V2Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V2Instruction[] +} + +export interface V2Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V2Instruction_Transact { + __kind: 'Transact' + originType: V2OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V2Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V2MultiAsset[] + beneficiary: V2MultiLocation +} + +export interface V2Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V2MultiAsset[] + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V2Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V2MultiAsset[] +} + +export type VersionedXcm = VersionedXcm_V2 | VersionedXcm_V3 | VersionedXcm_V4 + +export interface VersionedXcm_V2 { + __kind: 'V2' + value: V2Instruction[] +} + +export interface VersionedXcm_V3 { + __kind: 'V3' + value: V3Instruction[] +} + +export interface VersionedXcm_V4 { + __kind: 'V4' + value: V4Instruction[] +} + +export const V3WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: Weight, + Unlimited: sts.unit(), + } +}) + +export const V4Location: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V4Junctions, + } +}) + +export const Type_480: sts.Type = sts.closedEnum(() => { + return { + V2: sts.array(() => Type_483), + V3: sts.array(() => Type_487), + V4: sts.array(() => Type_490), + } +}) + +export const Type_490: sts.Type = sts.closedEnum(() => { + return { + AliasOrigin: V4Location, + BurnAsset: sts.array(() => V4Asset), + BuyExecution: sts.enumStruct({ + fees: V4Asset, + weightLimit: V3WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V4Asset), + ticket: V4Location, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + ClearTopic: sts.unit(), + ClearTransactStatus: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V4AssetFilter, + beneficiary: V4Location, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V4AssetFilter, + dest: V4Location, + xcm: sts.array(() => V4Instruction), + }), + DescendOrigin: V4Junctions, + ExchangeAsset: sts.enumStruct({ + give: V4AssetFilter, + want: sts.array(() => V4Asset), + maximal: sts.boolean(), + }), + ExpectAsset: sts.array(() => V4Asset), + ExpectError: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + ExpectOrigin: sts.option(() => V4Location), + ExpectPallet: sts.enumStruct({ + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + crateMajor: sts.number(), + minCrateMinor: sts.number(), + }), + ExpectTransactStatus: V3MaybeErrorCode, + ExportMessage: sts.enumStruct({ + network: V4NetworkId, + destination: V4Junctions, + xcm: sts.array(() => V4Instruction), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V4AssetFilter, + reserve: V4Location, + xcm: sts.array(() => V4Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V4AssetFilter, + dest: V4Location, + xcm: sts.array(() => V4Instruction), + }), + LockAsset: sts.enumStruct({ + asset: V4Asset, + unlocker: V4Location, + }), + NoteUnlockable: sts.enumStruct({ + asset: V4Asset, + owner: V4Location, + }), + QueryPallet: sts.enumStruct({ + moduleName: sts.bytes(), + responseInfo: V4QueryResponseInfo, + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V4Response, + maxWeight: Weight, + querier: sts.option(() => V4Location), + }), + ReceiveTeleportedAsset: sts.array(() => V4Asset), + RefundSurplus: sts.unit(), + ReportError: V4QueryResponseInfo, + ReportHolding: sts.enumStruct({ + responseInfo: V4QueryResponseInfo, + assets: V4AssetFilter, + }), + ReportTransactStatus: V4QueryResponseInfo, + RequestUnlock: sts.enumStruct({ + asset: V4Asset, + locker: V4Location, + }), + ReserveAssetDeposited: sts.array(() => V4Asset), + SetAppendix: sts.array(() => Type_490), + SetErrorHandler: sts.array(() => Type_490), + SetFeesMode: sts.enumStruct({ + jitWithdraw: sts.boolean(), + }), + SetTopic: sts.bytes(), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: Weight, + }), + Transact: sts.enumStruct({ + originKind: V2OriginKind, + requireWeightAtMost: Weight, + call: Type_484, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V4Asset), + beneficiary: V4Location, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V4Asset), + dest: V4Location, + xcm: sts.array(() => V4Instruction), + }), + Trap: sts.bigint(), + UniversalOrigin: V4Junction, + UnlockAsset: sts.enumStruct({ + asset: V4Asset, + target: V4Location, + }), + UnpaidExecution: sts.enumStruct({ + weightLimit: V3WeightLimit, + checkOrigin: sts.option(() => V4Location), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V4Asset), + } +}) + +export const Type_484: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface Type_484 { + encoded: Bytes +} + +export type Type_490 = Type_490_AliasOrigin | Type_490_BurnAsset | Type_490_BuyExecution | Type_490_ClaimAsset | Type_490_ClearError | Type_490_ClearOrigin | Type_490_ClearTopic | Type_490_ClearTransactStatus | Type_490_DepositAsset | Type_490_DepositReserveAsset | Type_490_DescendOrigin | Type_490_ExchangeAsset | Type_490_ExpectAsset | Type_490_ExpectError | Type_490_ExpectOrigin | Type_490_ExpectPallet | Type_490_ExpectTransactStatus | Type_490_ExportMessage | Type_490_HrmpChannelAccepted | Type_490_HrmpChannelClosing | Type_490_HrmpNewChannelOpenRequest | Type_490_InitiateReserveWithdraw | Type_490_InitiateTeleport | Type_490_LockAsset | Type_490_NoteUnlockable | Type_490_QueryPallet | Type_490_QueryResponse | Type_490_ReceiveTeleportedAsset | Type_490_RefundSurplus | Type_490_ReportError | Type_490_ReportHolding | Type_490_ReportTransactStatus | Type_490_RequestUnlock | Type_490_ReserveAssetDeposited | Type_490_SetAppendix | Type_490_SetErrorHandler | Type_490_SetFeesMode | Type_490_SetTopic | Type_490_SubscribeVersion | Type_490_Transact | Type_490_TransferAsset | Type_490_TransferReserveAsset | Type_490_Trap | Type_490_UniversalOrigin | Type_490_UnlockAsset | Type_490_UnpaidExecution | Type_490_UnsubscribeVersion | Type_490_WithdrawAsset + +export interface Type_490_AliasOrigin { + __kind: 'AliasOrigin' + value: V4Location +} + +export interface Type_490_BurnAsset { + __kind: 'BurnAsset' + value: V4Asset[] +} + +export interface Type_490_BuyExecution { + __kind: 'BuyExecution' + fees: V4Asset + weightLimit: V3WeightLimit +} + +export interface Type_490_ClaimAsset { + __kind: 'ClaimAsset' + assets: V4Asset[] + ticket: V4Location +} + +export interface Type_490_ClearError { + __kind: 'ClearError' +} + +export interface Type_490_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_490_ClearTopic { + __kind: 'ClearTopic' +} + +export interface Type_490_ClearTransactStatus { + __kind: 'ClearTransactStatus' +} + +export interface Type_490_DepositAsset { + __kind: 'DepositAsset' + assets: V4AssetFilter + beneficiary: V4Location +} + +export interface Type_490_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V4AssetFilter + dest: V4Location + xcm: V4Instruction[] +} + +export interface Type_490_DescendOrigin { + __kind: 'DescendOrigin' + value: V4Junctions +} + +export interface Type_490_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V4AssetFilter + want: V4Asset[] + maximal: boolean +} + +export interface Type_490_ExpectAsset { + __kind: 'ExpectAsset' + value: V4Asset[] +} + +export interface Type_490_ExpectError { + __kind: 'ExpectError' + value?: ([number, V3Error] | undefined) +} + +export interface Type_490_ExpectOrigin { + __kind: 'ExpectOrigin' + value?: (V4Location | undefined) +} + +export interface Type_490_ExpectPallet { + __kind: 'ExpectPallet' + index: number + name: Bytes + moduleName: Bytes + crateMajor: number + minCrateMinor: number +} + +export interface Type_490_ExpectTransactStatus { + __kind: 'ExpectTransactStatus' + value: V3MaybeErrorCode +} + +export interface Type_490_ExportMessage { + __kind: 'ExportMessage' + network: V4NetworkId + destination: V4Junctions + xcm: V4Instruction[] +} + +export interface Type_490_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_490_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_490_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_490_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V4AssetFilter + reserve: V4Location + xcm: V4Instruction[] +} + +export interface Type_490_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V4AssetFilter + dest: V4Location + xcm: V4Instruction[] +} + +export interface Type_490_LockAsset { + __kind: 'LockAsset' + asset: V4Asset + unlocker: V4Location +} + +export interface Type_490_NoteUnlockable { + __kind: 'NoteUnlockable' + asset: V4Asset + owner: V4Location +} + +export interface Type_490_QueryPallet { + __kind: 'QueryPallet' + moduleName: Bytes + responseInfo: V4QueryResponseInfo +} + +export interface Type_490_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V4Response + maxWeight: Weight + querier?: (V4Location | undefined) +} + +export interface Type_490_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V4Asset[] +} + +export interface Type_490_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_490_ReportError { + __kind: 'ReportError' + value: V4QueryResponseInfo +} + +export interface Type_490_ReportHolding { + __kind: 'ReportHolding' + responseInfo: V4QueryResponseInfo + assets: V4AssetFilter +} + +export interface Type_490_ReportTransactStatus { + __kind: 'ReportTransactStatus' + value: V4QueryResponseInfo +} + +export interface Type_490_RequestUnlock { + __kind: 'RequestUnlock' + asset: V4Asset + locker: V4Location +} + +export interface Type_490_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V4Asset[] +} + +export interface Type_490_SetAppendix { + __kind: 'SetAppendix' + value: Type_490[] +} + +export interface Type_490_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_490[] +} + +export interface Type_490_SetFeesMode { + __kind: 'SetFeesMode' + jitWithdraw: boolean +} + +export interface Type_490_SetTopic { + __kind: 'SetTopic' + value: Bytes +} + +export interface Type_490_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: Weight +} + +export interface Type_490_Transact { + __kind: 'Transact' + originKind: V2OriginKind + requireWeightAtMost: Weight + call: Type_484 +} + +export interface Type_490_TransferAsset { + __kind: 'TransferAsset' + assets: V4Asset[] + beneficiary: V4Location +} + +export interface Type_490_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V4Asset[] + dest: V4Location + xcm: V4Instruction[] +} + +export interface Type_490_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_490_UniversalOrigin { + __kind: 'UniversalOrigin' + value: V4Junction +} + +export interface Type_490_UnlockAsset { + __kind: 'UnlockAsset' + asset: V4Asset + target: V4Location +} + +export interface Type_490_UnpaidExecution { + __kind: 'UnpaidExecution' + weightLimit: V3WeightLimit + checkOrigin?: (V4Location | undefined) +} + +export interface Type_490_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_490_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V4Asset[] +} + +export const Type_487: sts.Type = sts.closedEnum(() => { + return { + AliasOrigin: V3MultiLocation, + BurnAsset: sts.array(() => V3MultiAsset), + BuyExecution: sts.enumStruct({ + fees: V3MultiAsset, + weightLimit: V3WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + ticket: V3MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + ClearTopic: sts.unit(), + ClearTransactStatus: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + beneficiary: V3MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + DescendOrigin: V3Junctions, + ExchangeAsset: sts.enumStruct({ + give: V3MultiAssetFilter, + want: sts.array(() => V3MultiAsset), + maximal: sts.boolean(), + }), + ExpectAsset: sts.array(() => V3MultiAsset), + ExpectError: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + ExpectOrigin: sts.option(() => V3MultiLocation), + ExpectPallet: sts.enumStruct({ + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + crateMajor: sts.number(), + minCrateMinor: sts.number(), + }), + ExpectTransactStatus: V3MaybeErrorCode, + ExportMessage: sts.enumStruct({ + network: V3NetworkId, + destination: V3Junctions, + xcm: sts.array(() => V3Instruction), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V3MultiAssetFilter, + reserve: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + LockAsset: sts.enumStruct({ + asset: V3MultiAsset, + unlocker: V3MultiLocation, + }), + NoteUnlockable: sts.enumStruct({ + asset: V3MultiAsset, + owner: V3MultiLocation, + }), + QueryPallet: sts.enumStruct({ + moduleName: sts.bytes(), + responseInfo: V3QueryResponseInfo, + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V3Response, + maxWeight: Weight, + querier: sts.option(() => V3MultiLocation), + }), + ReceiveTeleportedAsset: sts.array(() => V3MultiAsset), + RefundSurplus: sts.unit(), + ReportError: V3QueryResponseInfo, + ReportHolding: sts.enumStruct({ + responseInfo: V3QueryResponseInfo, + assets: V3MultiAssetFilter, + }), + ReportTransactStatus: V3QueryResponseInfo, + RequestUnlock: sts.enumStruct({ + asset: V3MultiAsset, + locker: V3MultiLocation, + }), + ReserveAssetDeposited: sts.array(() => V3MultiAsset), + SetAppendix: sts.array(() => Type_487), + SetErrorHandler: sts.array(() => Type_487), + SetFeesMode: sts.enumStruct({ + jitWithdraw: sts.boolean(), + }), + SetTopic: sts.bytes(), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: Weight, + }), + Transact: sts.enumStruct({ + originKind: V2OriginKind, + requireWeightAtMost: Weight, + call: Type_484, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + beneficiary: V3MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + Trap: sts.bigint(), + UniversalOrigin: V3Junction, + UnlockAsset: sts.enumStruct({ + asset: V3MultiAsset, + target: V3MultiLocation, + }), + UnpaidExecution: sts.enumStruct({ + weightLimit: V3WeightLimit, + checkOrigin: sts.option(() => V3MultiLocation), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V3MultiAsset), + } +}) + +export type Type_487 = Type_487_AliasOrigin | Type_487_BurnAsset | Type_487_BuyExecution | Type_487_ClaimAsset | Type_487_ClearError | Type_487_ClearOrigin | Type_487_ClearTopic | Type_487_ClearTransactStatus | Type_487_DepositAsset | Type_487_DepositReserveAsset | Type_487_DescendOrigin | Type_487_ExchangeAsset | Type_487_ExpectAsset | Type_487_ExpectError | Type_487_ExpectOrigin | Type_487_ExpectPallet | Type_487_ExpectTransactStatus | Type_487_ExportMessage | Type_487_HrmpChannelAccepted | Type_487_HrmpChannelClosing | Type_487_HrmpNewChannelOpenRequest | Type_487_InitiateReserveWithdraw | Type_487_InitiateTeleport | Type_487_LockAsset | Type_487_NoteUnlockable | Type_487_QueryPallet | Type_487_QueryResponse | Type_487_ReceiveTeleportedAsset | Type_487_RefundSurplus | Type_487_ReportError | Type_487_ReportHolding | Type_487_ReportTransactStatus | Type_487_RequestUnlock | Type_487_ReserveAssetDeposited | Type_487_SetAppendix | Type_487_SetErrorHandler | Type_487_SetFeesMode | Type_487_SetTopic | Type_487_SubscribeVersion | Type_487_Transact | Type_487_TransferAsset | Type_487_TransferReserveAsset | Type_487_Trap | Type_487_UniversalOrigin | Type_487_UnlockAsset | Type_487_UnpaidExecution | Type_487_UnsubscribeVersion | Type_487_WithdrawAsset + +export interface Type_487_AliasOrigin { + __kind: 'AliasOrigin' + value: V3MultiLocation +} + +export interface Type_487_BurnAsset { + __kind: 'BurnAsset' + value: V3MultiAsset[] +} + +export interface Type_487_BuyExecution { + __kind: 'BuyExecution' + fees: V3MultiAsset + weightLimit: V3WeightLimit +} + +export interface Type_487_ClaimAsset { + __kind: 'ClaimAsset' + assets: V3MultiAsset[] + ticket: V3MultiLocation +} + +export interface Type_487_ClearError { + __kind: 'ClearError' +} + +export interface Type_487_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_487_ClearTopic { + __kind: 'ClearTopic' +} + +export interface Type_487_ClearTransactStatus { + __kind: 'ClearTransactStatus' +} + +export interface Type_487_DepositAsset { + __kind: 'DepositAsset' + assets: V3MultiAssetFilter + beneficiary: V3MultiLocation +} + +export interface Type_487_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_487_DescendOrigin { + __kind: 'DescendOrigin' + value: V3Junctions +} + +export interface Type_487_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V3MultiAssetFilter + want: V3MultiAsset[] + maximal: boolean +} + +export interface Type_487_ExpectAsset { + __kind: 'ExpectAsset' + value: V3MultiAsset[] +} + +export interface Type_487_ExpectError { + __kind: 'ExpectError' + value?: ([number, V3Error] | undefined) +} + +export interface Type_487_ExpectOrigin { + __kind: 'ExpectOrigin' + value?: (V3MultiLocation | undefined) +} + +export interface Type_487_ExpectPallet { + __kind: 'ExpectPallet' + index: number + name: Bytes + moduleName: Bytes + crateMajor: number + minCrateMinor: number +} + +export interface Type_487_ExpectTransactStatus { + __kind: 'ExpectTransactStatus' + value: V3MaybeErrorCode +} + +export interface Type_487_ExportMessage { + __kind: 'ExportMessage' + network: V3NetworkId + destination: V3Junctions + xcm: V3Instruction[] +} + +export interface Type_487_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_487_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_487_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_487_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V3MultiAssetFilter + reserve: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_487_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_487_LockAsset { + __kind: 'LockAsset' + asset: V3MultiAsset + unlocker: V3MultiLocation +} + +export interface Type_487_NoteUnlockable { + __kind: 'NoteUnlockable' + asset: V3MultiAsset + owner: V3MultiLocation +} + +export interface Type_487_QueryPallet { + __kind: 'QueryPallet' + moduleName: Bytes + responseInfo: V3QueryResponseInfo +} + +export interface Type_487_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V3Response + maxWeight: Weight + querier?: (V3MultiLocation | undefined) +} + +export interface Type_487_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V3MultiAsset[] +} + +export interface Type_487_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_487_ReportError { + __kind: 'ReportError' + value: V3QueryResponseInfo +} + +export interface Type_487_ReportHolding { + __kind: 'ReportHolding' + responseInfo: V3QueryResponseInfo + assets: V3MultiAssetFilter +} + +export interface Type_487_ReportTransactStatus { + __kind: 'ReportTransactStatus' + value: V3QueryResponseInfo +} + +export interface Type_487_RequestUnlock { + __kind: 'RequestUnlock' + asset: V3MultiAsset + locker: V3MultiLocation +} + +export interface Type_487_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V3MultiAsset[] +} + +export interface Type_487_SetAppendix { + __kind: 'SetAppendix' + value: Type_487[] +} + +export interface Type_487_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_487[] +} + +export interface Type_487_SetFeesMode { + __kind: 'SetFeesMode' + jitWithdraw: boolean +} + +export interface Type_487_SetTopic { + __kind: 'SetTopic' + value: Bytes +} + +export interface Type_487_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: Weight +} + +export interface Type_487_Transact { + __kind: 'Transact' + originKind: V2OriginKind + requireWeightAtMost: Weight + call: Type_484 +} + +export interface Type_487_TransferAsset { + __kind: 'TransferAsset' + assets: V3MultiAsset[] + beneficiary: V3MultiLocation +} + +export interface Type_487_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V3MultiAsset[] + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_487_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_487_UniversalOrigin { + __kind: 'UniversalOrigin' + value: V3Junction +} + +export interface Type_487_UnlockAsset { + __kind: 'UnlockAsset' + asset: V3MultiAsset + target: V3MultiLocation +} + +export interface Type_487_UnpaidExecution { + __kind: 'UnpaidExecution' + weightLimit: V3WeightLimit + checkOrigin?: (V3MultiLocation | undefined) +} + +export interface Type_487_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_487_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V3MultiAsset[] +} + +export const Type_483: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V2MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + ticket: V2MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V2MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V2Junctions, + ExchangeAsset: sts.enumStruct({ + give: V2MultiAssetFilter, + receive: sts.array(() => V2MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V2MultiAssetFilter, + reserve: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V2MultiAssetFilter, + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + assets: V2MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V2MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V2MultiAsset), + SetAppendix: sts.array(() => Type_483), + SetErrorHandler: sts.array(() => Type_483), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V2OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_484, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + beneficiary: V2MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V2MultiAsset), + } +}) + +export type Type_483 = Type_483_BuyExecution | Type_483_ClaimAsset | Type_483_ClearError | Type_483_ClearOrigin | Type_483_DepositAsset | Type_483_DepositReserveAsset | Type_483_DescendOrigin | Type_483_ExchangeAsset | Type_483_HrmpChannelAccepted | Type_483_HrmpChannelClosing | Type_483_HrmpNewChannelOpenRequest | Type_483_InitiateReserveWithdraw | Type_483_InitiateTeleport | Type_483_QueryHolding | Type_483_QueryResponse | Type_483_ReceiveTeleportedAsset | Type_483_RefundSurplus | Type_483_ReportError | Type_483_ReserveAssetDeposited | Type_483_SetAppendix | Type_483_SetErrorHandler | Type_483_SubscribeVersion | Type_483_Transact | Type_483_TransferAsset | Type_483_TransferReserveAsset | Type_483_Trap | Type_483_UnsubscribeVersion | Type_483_WithdrawAsset + +export interface Type_483_BuyExecution { + __kind: 'BuyExecution' + fees: V2MultiAsset + weightLimit: V2WeightLimit +} + +export interface Type_483_ClaimAsset { + __kind: 'ClaimAsset' + assets: V2MultiAsset[] + ticket: V2MultiLocation +} + +export interface Type_483_ClearError { + __kind: 'ClearError' +} + +export interface Type_483_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_483_DepositAsset { + __kind: 'DepositAsset' + assets: V2MultiAssetFilter + maxAssets: number + beneficiary: V2MultiLocation +} + +export interface Type_483_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V2MultiAssetFilter + maxAssets: number + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_483_DescendOrigin { + __kind: 'DescendOrigin' + value: V2Junctions +} + +export interface Type_483_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V2MultiAssetFilter + receive: V2MultiAsset[] +} + +export interface Type_483_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_483_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_483_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_483_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V2MultiAssetFilter + reserve: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_483_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V2MultiAssetFilter + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_483_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V2MultiLocation + assets: V2MultiAssetFilter + maxResponseWeight: bigint +} + +export interface Type_483_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface Type_483_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V2MultiAsset[] +} + +export interface Type_483_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_483_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V2MultiLocation + maxResponseWeight: bigint +} + +export interface Type_483_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V2MultiAsset[] +} + +export interface Type_483_SetAppendix { + __kind: 'SetAppendix' + value: Type_483[] +} + +export interface Type_483_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_483[] +} + +export interface Type_483_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_483_Transact { + __kind: 'Transact' + originType: V2OriginKind + requireWeightAtMost: bigint + call: Type_484 +} + +export interface Type_483_TransferAsset { + __kind: 'TransferAsset' + assets: V2MultiAsset[] + beneficiary: V2MultiLocation +} + +export interface Type_483_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V2MultiAsset[] + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_483_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_483_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_483_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V2MultiAsset[] +} + +export type Type_480 = Type_480_V2 | Type_480_V3 | Type_480_V4 + +export interface Type_480_V2 { + __kind: 'V2' + value: Type_483[] +} + +export interface Type_480_V3 { + __kind: 'V3' + value: Type_487[] +} + +export interface Type_480_V4 { + __kind: 'V4' + value: Type_490[] +} + +export const VersionedLocation: sts.Type = sts.closedEnum(() => { + return { + V2: V2MultiLocation, + V3: V3MultiLocation, + V4: V4Location, + } +}) + +export const VersionedAssets: sts.Type = sts.closedEnum(() => { + return { + V2: sts.array(() => V2MultiAsset), + V3: sts.array(() => V3MultiAsset), + V4: sts.array(() => V4Asset), + } +}) + +export type VersionedAssets = VersionedAssets_V2 | VersionedAssets_V3 | VersionedAssets_V4 + +export interface VersionedAssets_V2 { + __kind: 'V2' + value: V2MultiAsset[] +} + +export interface VersionedAssets_V3 { + __kind: 'V3' + value: V3MultiAsset[] +} + +export interface VersionedAssets_V4 { + __kind: 'V4' + value: V4Asset[] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type XcmPalletCall = XcmPalletCall_claim_assets | XcmPalletCall_execute | XcmPalletCall_force_default_xcm_version | XcmPalletCall_force_subscribe_version_notify | XcmPalletCall_force_suspension | XcmPalletCall_force_unsubscribe_version_notify | XcmPalletCall_force_xcm_version | XcmPalletCall_limited_reserve_transfer_assets | XcmPalletCall_limited_teleport_assets | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets | XcmPalletCall_transfer_assets | XcmPalletCall_transfer_assets_using_type_and_then + +/** + * See [`Pallet::claim_assets`]. + */ +export interface XcmPalletCall_claim_assets { + __kind: 'claim_assets' + assets: VersionedAssets + beneficiary: VersionedLocation +} + +/** + * See [`Pallet::execute`]. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Type_480 + maxWeight: Weight +} + +/** + * See [`Pallet::force_default_xcm_version`]. + */ +export interface XcmPalletCall_force_default_xcm_version { + __kind: 'force_default_xcm_version' + maybeXcmVersion?: (number | undefined) +} + +/** + * See [`Pallet::force_subscribe_version_notify`]. + */ +export interface XcmPalletCall_force_subscribe_version_notify { + __kind: 'force_subscribe_version_notify' + location: VersionedLocation +} + +/** + * See [`Pallet::force_suspension`]. + */ +export interface XcmPalletCall_force_suspension { + __kind: 'force_suspension' + suspended: boolean +} + +/** + * See [`Pallet::force_unsubscribe_version_notify`]. + */ +export interface XcmPalletCall_force_unsubscribe_version_notify { + __kind: 'force_unsubscribe_version_notify' + location: VersionedLocation +} + +/** + * See [`Pallet::force_xcm_version`]. + */ +export interface XcmPalletCall_force_xcm_version { + __kind: 'force_xcm_version' + location: V4Location + version: number +} + +/** + * See [`Pallet::limited_reserve_transfer_assets`]. + */ +export interface XcmPalletCall_limited_reserve_transfer_assets { + __kind: 'limited_reserve_transfer_assets' + dest: VersionedLocation + beneficiary: VersionedLocation + assets: VersionedAssets + feeAssetItem: number + weightLimit: V3WeightLimit +} + +/** + * See [`Pallet::limited_teleport_assets`]. + */ +export interface XcmPalletCall_limited_teleport_assets { + __kind: 'limited_teleport_assets' + dest: VersionedLocation + beneficiary: VersionedLocation + assets: VersionedAssets + feeAssetItem: number + weightLimit: V3WeightLimit +} + +/** + * See [`Pallet::reserve_transfer_assets`]. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: VersionedLocation + beneficiary: VersionedLocation + assets: VersionedAssets + feeAssetItem: number +} + +/** + * See [`Pallet::send`]. + */ +export interface XcmPalletCall_send { + __kind: 'send' + dest: VersionedLocation + message: VersionedXcm +} + +/** + * See [`Pallet::teleport_assets`]. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: VersionedLocation + beneficiary: VersionedLocation + assets: VersionedAssets + feeAssetItem: number +} + +/** + * See [`Pallet::transfer_assets`]. + */ +export interface XcmPalletCall_transfer_assets { + __kind: 'transfer_assets' + dest: VersionedLocation + beneficiary: VersionedLocation + assets: VersionedAssets + feeAssetItem: number + weightLimit: V3WeightLimit +} + +/** + * See [`Pallet::transfer_assets_using_type_and_then`]. + */ +export interface XcmPalletCall_transfer_assets_using_type_and_then { + __kind: 'transfer_assets_using_type_and_then' + dest: VersionedLocation + assets: VersionedAssets + assetsTransferType: TransferType + remoteFeesId: VersionedAssetId + feesTransferType: TransferType + customXcmOnDest: VersionedXcm + weightLimit: V3WeightLimit +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const WhitelistCall: sts.Type = sts.closedEnum(() => { + return { + dispatch_whitelisted_call: sts.enumStruct({ + callHash: H256, + callEncodedLen: sts.number(), + callWeightWitness: Weight, + }), + dispatch_whitelisted_call_with_preimage: sts.enumStruct({ + call: Call, + }), + remove_whitelisted_call: sts.enumStruct({ + callHash: H256, + }), + whitelist_call: sts.enumStruct({ + callHash: H256, + }), + } +}) + +export const H256 = sts.bytes() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type WhitelistCall = WhitelistCall_dispatch_whitelisted_call | WhitelistCall_dispatch_whitelisted_call_with_preimage | WhitelistCall_remove_whitelisted_call | WhitelistCall_whitelist_call + +/** + * See [`Pallet::dispatch_whitelisted_call`]. + */ +export interface WhitelistCall_dispatch_whitelisted_call { + __kind: 'dispatch_whitelisted_call' + callHash: H256 + callEncodedLen: number + callWeightWitness: Weight +} + +/** + * See [`Pallet::dispatch_whitelisted_call_with_preimage`]. + */ +export interface WhitelistCall_dispatch_whitelisted_call_with_preimage { + __kind: 'dispatch_whitelisted_call_with_preimage' + call: Call +} + +/** + * See [`Pallet::remove_whitelisted_call`]. + */ +export interface WhitelistCall_remove_whitelisted_call { + __kind: 'remove_whitelisted_call' + callHash: H256 +} + +/** + * See [`Pallet::whitelist_call`]. + */ +export interface WhitelistCall_whitelist_call { + __kind: 'whitelist_call' + callHash: H256 +} + +export type H256 = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const VoterListCall: sts.Type = sts.closedEnum(() => { + return { + put_in_front_of: sts.enumStruct({ + lighter: MultiAddress, + }), + put_in_front_of_other: sts.enumStruct({ + heavier: MultiAddress, + lighter: MultiAddress, + }), + rebag: sts.enumStruct({ + dislocated: MultiAddress, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type VoterListCall = VoterListCall_put_in_front_of | VoterListCall_put_in_front_of_other | VoterListCall_rebag + +/** + * See [`Pallet::put_in_front_of`]. + */ +export interface VoterListCall_put_in_front_of { + __kind: 'put_in_front_of' + lighter: MultiAddress +} + +/** + * See [`Pallet::put_in_front_of_other`]. + */ +export interface VoterListCall_put_in_front_of_other { + __kind: 'put_in_front_of_other' + heavier: MultiAddress + lighter: MultiAddress +} + +/** + * See [`Pallet::rebag`]. + */ +export interface VoterListCall_rebag { + __kind: 'rebag' + dislocated: MultiAddress +} + +export type MultiAddress = MultiAddress_Address20 | MultiAddress_Address32 | MultiAddress_Id | MultiAddress_Index | MultiAddress_Raw + +export interface MultiAddress_Address20 { + __kind: 'Address20' + value: Bytes +} + +export interface MultiAddress_Address32 { + __kind: 'Address32' + value: Bytes +} + +export interface MultiAddress_Id { + __kind: 'Id' + value: AccountId32 +} + +export interface MultiAddress_Index { + __kind: 'Index' +} + +export interface MultiAddress_Raw { + __kind: 'Raw' + value: Bytes +} + +export type AccountId32 = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_remove_vesting_schedule: sts.enumStruct({ + target: MultiAddress, + scheduleIndex: sts.number(), + }), + force_vested_transfer: sts.enumStruct({ + source: MultiAddress, + target: MultiAddress, + schedule: VestingInfo, + }), + merge_schedules: sts.enumStruct({ + schedule1Index: sts.number(), + schedule2Index: sts.number(), + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: MultiAddress, + }), + vested_transfer: sts.enumStruct({ + target: MultiAddress, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: sts.bigint(), + perBlock: sts.bigint(), + startingBlock: sts.number(), + } +}) + +export interface VestingInfo { + locked: bigint + perBlock: bigint + startingBlock: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type VestingCall = VestingCall_force_remove_vesting_schedule | VestingCall_force_vested_transfer | VestingCall_merge_schedules | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * See [`Pallet::force_remove_vesting_schedule`]. + */ +export interface VestingCall_force_remove_vesting_schedule { + __kind: 'force_remove_vesting_schedule' + target: MultiAddress + scheduleIndex: number +} + +/** + * See [`Pallet::force_vested_transfer`]. + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: MultiAddress + target: MultiAddress + schedule: VestingInfo +} + +/** + * See [`Pallet::merge_schedules`]. + */ +export interface VestingCall_merge_schedules { + __kind: 'merge_schedules' + schedule1Index: number + schedule2Index: number +} + +/** + * See [`Pallet::vest`]. + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * See [`Pallet::vest_other`]. + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: MultiAddress +} + +/** + * See [`Pallet::vested_transfer`]. + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: MultiAddress + schedule: VestingInfo +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Call, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Call), + }), + dispatch_as: sts.enumStruct({ + asOrigin: OriginCaller, + call: Call, + }), + force_batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + with_weight: sts.enumStruct({ + call: Call, + weight: Weight, + }), + } +}) + +export const OriginCaller: sts.Type = sts.closedEnum(() => { + return { + Origins: Origin, + ParachainsOrigin: Type_164, + Void: Void, + XcmPallet: Type_166, + system: RawOrigin, + } +}) + +export const RawOrigin: sts.Type = sts.closedEnum(() => { + return { + None: sts.unit(), + Root: sts.unit(), + Signed: AccountId32, + } +}) + +export type RawOrigin = RawOrigin_None | RawOrigin_Root | RawOrigin_Signed + +export interface RawOrigin_None { + __kind: 'None' +} + +export interface RawOrigin_Root { + __kind: 'Root' +} + +export interface RawOrigin_Signed { + __kind: 'Signed' + value: AccountId32 +} + +export const Type_166: sts.Type = sts.closedEnum(() => { + return { + Response: V4Location, + Xcm: V4Location, + } +}) + +export type Type_166 = Type_166_Response | Type_166_Xcm + +export interface Type_166_Response { + __kind: 'Response' + value: V4Location +} + +export interface Type_166_Xcm { + __kind: 'Xcm' + value: V4Location +} + +export const Void: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Void = never + +export const Type_164: sts.Type = sts.closedEnum(() => { + return { + Parachain: Id, + } +}) + +export const Id = sts.number() + +export type Type_164 = Type_164_Parachain + +export interface Type_164_Parachain { + __kind: 'Parachain' + value: Id +} + +export type Id = number + +export const Origin: sts.Type = sts.closedEnum(() => { + return { + AuctionAdmin: sts.unit(), + BigSpender: sts.unit(), + BigTipper: sts.unit(), + Fellows: sts.unit(), + Fellowship1Dan: sts.unit(), + Fellowship2Dan: sts.unit(), + Fellowship3Dan: sts.unit(), + Fellowship4Dan: sts.unit(), + Fellowship5Dan: sts.unit(), + Fellowship6Dan: sts.unit(), + Fellowship7Dan: sts.unit(), + Fellowship8Dan: sts.unit(), + Fellowship9Dan: sts.unit(), + FellowshipAdmin: sts.unit(), + FellowshipExperts: sts.unit(), + FellowshipInitiates: sts.unit(), + FellowshipMasters: sts.unit(), + GeneralAdmin: sts.unit(), + LeaseAdmin: sts.unit(), + MediumSpender: sts.unit(), + ReferendumCanceller: sts.unit(), + ReferendumKiller: sts.unit(), + SmallSpender: sts.unit(), + SmallTipper: sts.unit(), + StakingAdmin: sts.unit(), + Treasurer: sts.unit(), + WhitelistedCaller: sts.unit(), + WishForChange: sts.unit(), + } +}) + +export type Origin = Origin_AuctionAdmin | Origin_BigSpender | Origin_BigTipper | Origin_Fellows | Origin_Fellowship1Dan | Origin_Fellowship2Dan | Origin_Fellowship3Dan | Origin_Fellowship4Dan | Origin_Fellowship5Dan | Origin_Fellowship6Dan | Origin_Fellowship7Dan | Origin_Fellowship8Dan | Origin_Fellowship9Dan | Origin_FellowshipAdmin | Origin_FellowshipExperts | Origin_FellowshipInitiates | Origin_FellowshipMasters | Origin_GeneralAdmin | Origin_LeaseAdmin | Origin_MediumSpender | Origin_ReferendumCanceller | Origin_ReferendumKiller | Origin_SmallSpender | Origin_SmallTipper | Origin_StakingAdmin | Origin_Treasurer | Origin_WhitelistedCaller | Origin_WishForChange + +export interface Origin_AuctionAdmin { + __kind: 'AuctionAdmin' +} + +export interface Origin_BigSpender { + __kind: 'BigSpender' +} + +export interface Origin_BigTipper { + __kind: 'BigTipper' +} + +export interface Origin_Fellows { + __kind: 'Fellows' +} + +export interface Origin_Fellowship1Dan { + __kind: 'Fellowship1Dan' +} + +export interface Origin_Fellowship2Dan { + __kind: 'Fellowship2Dan' +} + +export interface Origin_Fellowship3Dan { + __kind: 'Fellowship3Dan' +} + +export interface Origin_Fellowship4Dan { + __kind: 'Fellowship4Dan' +} + +export interface Origin_Fellowship5Dan { + __kind: 'Fellowship5Dan' +} + +export interface Origin_Fellowship6Dan { + __kind: 'Fellowship6Dan' +} + +export interface Origin_Fellowship7Dan { + __kind: 'Fellowship7Dan' +} + +export interface Origin_Fellowship8Dan { + __kind: 'Fellowship8Dan' +} + +export interface Origin_Fellowship9Dan { + __kind: 'Fellowship9Dan' +} + +export interface Origin_FellowshipAdmin { + __kind: 'FellowshipAdmin' +} + +export interface Origin_FellowshipExperts { + __kind: 'FellowshipExperts' +} + +export interface Origin_FellowshipInitiates { + __kind: 'FellowshipInitiates' +} + +export interface Origin_FellowshipMasters { + __kind: 'FellowshipMasters' +} + +export interface Origin_GeneralAdmin { + __kind: 'GeneralAdmin' +} + +export interface Origin_LeaseAdmin { + __kind: 'LeaseAdmin' +} + +export interface Origin_MediumSpender { + __kind: 'MediumSpender' +} + +export interface Origin_ReferendumCanceller { + __kind: 'ReferendumCanceller' +} + +export interface Origin_ReferendumKiller { + __kind: 'ReferendumKiller' +} + +export interface Origin_SmallSpender { + __kind: 'SmallSpender' +} + +export interface Origin_SmallTipper { + __kind: 'SmallTipper' +} + +export interface Origin_StakingAdmin { + __kind: 'StakingAdmin' +} + +export interface Origin_Treasurer { + __kind: 'Treasurer' +} + +export interface Origin_WhitelistedCaller { + __kind: 'WhitelistedCaller' +} + +export interface Origin_WishForChange { + __kind: 'WishForChange' +} + +export type OriginCaller = OriginCaller_Origins | OriginCaller_ParachainsOrigin | OriginCaller_Void | OriginCaller_XcmPallet | OriginCaller_system + +export interface OriginCaller_Origins { + __kind: 'Origins' + value: Origin +} + +export interface OriginCaller_ParachainsOrigin { + __kind: 'ParachainsOrigin' + value: Type_164 +} + +export interface OriginCaller_Void { + __kind: 'Void' + value: Void +} + +export interface OriginCaller_XcmPallet { + __kind: 'XcmPallet' + value: Type_166 +} + +export interface OriginCaller_system { + __kind: 'system' + value: RawOrigin +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all | UtilityCall_dispatch_as | UtilityCall_force_batch | UtilityCall_with_weight + +/** + * See [`Pallet::as_derivative`]. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Call +} + +/** + * See [`Pallet::batch`]. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Call[] +} + +/** + * See [`Pallet::batch_all`]. + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Call[] +} + +/** + * See [`Pallet::dispatch_as`]. + */ +export interface UtilityCall_dispatch_as { + __kind: 'dispatch_as' + asOrigin: OriginCaller + call: Call +} + +/** + * See [`Pallet::force_batch`]. + */ +export interface UtilityCall_force_batch { + __kind: 'force_batch' + calls: Call[] +} + +/** + * See [`Pallet::with_weight`]. + */ +export interface UtilityCall_with_weight { + __kind: 'with_weight' + call: Call + weight: Weight +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + check_status: sts.enumStruct({ + index: sts.number(), + }), + payout: sts.enumStruct({ + index: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: MultiAddress, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + remove_approval: sts.enumStruct({ + proposalId: sts.number(), + }), + spend: sts.enumStruct({ + assetKind: VersionedLocatableAsset, + amount: sts.bigint(), + beneficiary: VersionedLocation, + validFrom: sts.option(() => sts.number()), + }), + spend_local: sts.enumStruct({ + amount: sts.bigint(), + beneficiary: MultiAddress, + }), + void_spend: sts.enumStruct({ + index: sts.number(), + }), + } +}) + +export const VersionedLocatableAsset: sts.Type = sts.closedEnum(() => { + return { + V3: sts.enumStruct({ + location: V3MultiLocation, + assetId: V3AssetId, + }), + V4: sts.enumStruct({ + location: V4Location, + assetId: V4AssetId, + }), + } +}) + +export type VersionedLocatableAsset = VersionedLocatableAsset_V3 | VersionedLocatableAsset_V4 + +export interface VersionedLocatableAsset_V3 { + __kind: 'V3' + location: V3MultiLocation + assetId: V3AssetId +} + +export interface VersionedLocatableAsset_V4 { + __kind: 'V4' + location: V4Location + assetId: V4AssetId +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_check_status | TreasuryCall_payout | TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_remove_approval | TreasuryCall_spend | TreasuryCall_spend_local | TreasuryCall_void_spend + +/** + * See [`Pallet::approve_proposal`]. + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * See [`Pallet::check_status`]. + */ +export interface TreasuryCall_check_status { + __kind: 'check_status' + index: number +} + +/** + * See [`Pallet::payout`]. + */ +export interface TreasuryCall_payout { + __kind: 'payout' + index: number +} + +/** + * See [`Pallet::propose_spend`]. + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: MultiAddress +} + +/** + * See [`Pallet::reject_proposal`]. + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * See [`Pallet::remove_approval`]. + */ +export interface TreasuryCall_remove_approval { + __kind: 'remove_approval' + proposalId: number +} + +/** + * See [`Pallet::spend`]. + */ +export interface TreasuryCall_spend { + __kind: 'spend' + assetKind: VersionedLocatableAsset + amount: bigint + beneficiary: VersionedLocation + validFrom?: (number | undefined) +} + +/** + * See [`Pallet::spend_local`]. + */ +export interface TreasuryCall_spend_local { + __kind: 'spend_local' + amount: bigint + beneficiary: MultiAddress +} + +/** + * See [`Pallet::void_spend`]. + */ +export interface TreasuryCall_void_spend { + __kind: 'void_spend' + index: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type TimestampCall = TimestampCall_set + +/** + * See [`Pallet::set`]. + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + apply_authorized_upgrade: sts.enumStruct({ + code: sts.bytes(), + }), + authorize_upgrade: sts.enumStruct({ + codeHash: H256, + }), + authorize_upgrade_without_checks: sts.enumStruct({ + codeHash: H256, + }), + kill_prefix: sts.enumStruct({ + prefix: sts.bytes(), + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => sts.bytes()), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SystemCall = SystemCall_apply_authorized_upgrade | SystemCall_authorize_upgrade | SystemCall_authorize_upgrade_without_checks | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * See [`Pallet::apply_authorized_upgrade`]. + */ +export interface SystemCall_apply_authorized_upgrade { + __kind: 'apply_authorized_upgrade' + code: Bytes +} + +/** + * See [`Pallet::authorize_upgrade`]. + */ +export interface SystemCall_authorize_upgrade { + __kind: 'authorize_upgrade' + codeHash: H256 +} + +/** + * See [`Pallet::authorize_upgrade_without_checks`]. + */ +export interface SystemCall_authorize_upgrade_without_checks { + __kind: 'authorize_upgrade_without_checks' + codeHash: H256 +} + +/** + * See [`Pallet::kill_prefix`]. + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Bytes + subkeys: number +} + +/** + * See [`Pallet::kill_storage`]. + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Bytes[] +} + +/** + * See [`Pallet::remark`]. + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * See [`Pallet::remark_with_event`]. + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * See [`Pallet::set_code`]. + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * See [`Pallet::set_code_without_checks`]. + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * See [`Pallet::set_heap_pages`]. + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * See [`Pallet::set_storage`]. + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: [Bytes, Bytes][] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: sts.number(), + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + stash: AccountId32, + }), + deprecate_controller_batch: sts.enumStruct({ + controllers: sts.array(() => AccountId32), + }), + force_apply_min_commission: sts.enumStruct({ + validatorStash: AccountId32, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => MultiAddress), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => MultiAddress), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + }), + payout_stakers_by_page: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + page: sts.number(), + }), + reap_stash: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + restore_ledger: sts.enumStruct({ + stash: AccountId32, + maybeController: sts.option(() => AccountId32), + maybeTotal: sts.option(() => sts.bigint()), + maybeUnlocking: sts.option(() => sts.array(() => UnlockChunk)), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.unit(), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId32), + }), + set_min_commission: sts.enumStruct({ + new: Perbill, + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_staking_configs: sts.enumStruct({ + minNominatorBond: ConfigOp, + minValidatorBond: ConfigOp, + maxNominatorCount: Type_123, + maxValidatorCount: Type_123, + chillThreshold: Type_124, + minCommission: Type_125, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + update_payee: sts.enumStruct({ + controller: AccountId32, + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export const Type_125: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export type Type_125 = Type_125_Noop | Type_125_Remove | Type_125_Set + +export interface Type_125_Noop { + __kind: 'Noop' +} + +export interface Type_125_Remove { + __kind: 'Remove' +} + +export interface Type_125_Set { + __kind: 'Set' + value: Perbill +} + +export type Perbill = number + +export const Type_124: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Percent, + } +}) + +export type Type_124 = Type_124_Noop | Type_124_Remove | Type_124_Set + +export interface Type_124_Noop { + __kind: 'Noop' +} + +export interface Type_124_Remove { + __kind: 'Remove' +} + +export interface Type_124_Set { + __kind: 'Set' + value: Percent +} + +export type Percent = number + +export const Type_123: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_123 = Type_123_Noop | Type_123_Remove | Type_123_Set + +export interface Type_123_Noop { + __kind: 'Noop' +} + +export interface Type_123_Remove { + __kind: 'Remove' +} + +export interface Type_123_Set { + __kind: 'Set' + value: number +} + +export const ConfigOp: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type ConfigOp = ConfigOp_Noop | ConfigOp_Remove | ConfigOp_Set + +export interface ConfigOp_Noop { + __kind: 'Noop' +} + +export interface ConfigOp_Remove { + __kind: 'Remove' +} + +export interface ConfigOp_Set { + __kind: 'Set' + value: bigint +} + +export const Perbill = sts.number() + +export const Percent = sts.number() + +export const UnlockChunk: sts.Type = sts.struct(() => { + return { + value: sts.bigint(), + era: sts.number(), + } +}) + +export interface UnlockChunk { + value: bigint + era: number +} + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_deprecate_controller_batch | StakingCall_force_apply_min_commission | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_payout_stakers_by_page | StakingCall_reap_stash | StakingCall_rebond | StakingCall_restore_ledger | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_invulnerables | StakingCall_set_min_commission | StakingCall_set_payee | StakingCall_set_staking_configs | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_update_payee | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * See [`Pallet::bond`]. + */ +export interface StakingCall_bond { + __kind: 'bond' + value: bigint + payee: RewardDestination +} + +/** + * See [`Pallet::bond_extra`]. + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * See [`Pallet::cancel_deferred_slash`]. + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: number + slashIndices: number[] +} + +/** + * See [`Pallet::chill`]. + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * See [`Pallet::chill_other`]. + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + stash: AccountId32 +} + +/** + * See [`Pallet::deprecate_controller_batch`]. + */ +export interface StakingCall_deprecate_controller_batch { + __kind: 'deprecate_controller_batch' + controllers: AccountId32[] +} + +/** + * See [`Pallet::force_apply_min_commission`]. + */ +export interface StakingCall_force_apply_min_commission { + __kind: 'force_apply_min_commission' + validatorStash: AccountId32 +} + +/** + * See [`Pallet::force_new_era`]. + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * See [`Pallet::force_new_era_always`]. + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * See [`Pallet::force_no_eras`]. + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * See [`Pallet::force_unstake`]. + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * See [`Pallet::increase_validator_count`]. + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * See [`Pallet::kick`]. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: MultiAddress[] +} + +/** + * See [`Pallet::nominate`]. + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: MultiAddress[] +} + +/** + * See [`Pallet::payout_stakers`]. + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId32 + era: number +} + +/** + * See [`Pallet::payout_stakers_by_page`]. + */ +export interface StakingCall_payout_stakers_by_page { + __kind: 'payout_stakers_by_page' + validatorStash: AccountId32 + era: number + page: number +} + +/** + * See [`Pallet::reap_stash`]. + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * See [`Pallet::rebond`]. + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * See [`Pallet::restore_ledger`]. + */ +export interface StakingCall_restore_ledger { + __kind: 'restore_ledger' + stash: AccountId32 + maybeController?: (AccountId32 | undefined) + maybeTotal?: (bigint | undefined) + maybeUnlocking?: (UnlockChunk[] | undefined) +} + +/** + * See [`Pallet::scale_validator_count`]. + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * See [`Pallet::set_controller`]. + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' +} + +/** + * See [`Pallet::set_invulnerables`]. + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId32[] +} + +/** + * See [`Pallet::set_min_commission`]. + */ +export interface StakingCall_set_min_commission { + __kind: 'set_min_commission' + new: Perbill +} + +/** + * See [`Pallet::set_payee`]. + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * See [`Pallet::set_staking_configs`]. + */ +export interface StakingCall_set_staking_configs { + __kind: 'set_staking_configs' + minNominatorBond: ConfigOp + minValidatorBond: ConfigOp + maxNominatorCount: Type_123 + maxValidatorCount: Type_123 + chillThreshold: Type_124 + minCommission: Type_125 +} + +/** + * See [`Pallet::set_validator_count`]. + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * See [`Pallet::unbond`]. + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * See [`Pallet::update_payee`]. + */ +export interface StakingCall_update_payee { + __kind: 'update_payee' + controller: AccountId32 +} + +/** + * See [`Pallet::validate`]. + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * See [`Pallet::withdraw_unbonded`]. + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bestow_membership: sts.enumStruct({ + candidate: AccountId32, + }), + bid: sts.enumStruct({ + value: sts.bigint(), + }), + claim_membership: sts.unit(), + cleanup_candidacy: sts.enumStruct({ + candidate: AccountId32, + max: sts.number(), + }), + cleanup_challenge: sts.enumStruct({ + challengeRound: sts.number(), + max: sts.number(), + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + dissolve: sts.unit(), + drop_candidate: sts.enumStruct({ + candidate: AccountId32, + }), + found_society: sts.enumStruct({ + founder: MultiAddress, + maxMembers: sts.number(), + maxIntake: sts.number(), + maxStrikes: sts.number(), + candidateDeposit: sts.bigint(), + rules: sts.bytes(), + }), + judge_suspended_member: sts.enumStruct({ + who: MultiAddress, + forgive: sts.boolean(), + }), + kick_candidate: sts.enumStruct({ + candidate: AccountId32, + }), + payout: sts.unit(), + punish_skeptic: sts.unit(), + resign_candidacy: sts.unit(), + set_parameters: sts.enumStruct({ + maxMembers: sts.number(), + maxIntake: sts.number(), + maxStrikes: sts.number(), + candidateDeposit: sts.bigint(), + }), + unbid: sts.unit(), + unvouch: sts.unit(), + vote: sts.enumStruct({ + candidate: MultiAddress, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: MultiAddress, + value: sts.bigint(), + tip: sts.bigint(), + }), + waive_repay: sts.enumStruct({ + amount: sts.bigint(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SocietyCall = SocietyCall_bestow_membership | SocietyCall_bid | SocietyCall_claim_membership | SocietyCall_cleanup_candidacy | SocietyCall_cleanup_challenge | SocietyCall_defender_vote | SocietyCall_dissolve | SocietyCall_drop_candidate | SocietyCall_found_society | SocietyCall_judge_suspended_member | SocietyCall_kick_candidate | SocietyCall_payout | SocietyCall_punish_skeptic | SocietyCall_resign_candidacy | SocietyCall_set_parameters | SocietyCall_unbid | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch | SocietyCall_waive_repay + +/** + * See [`Pallet::bestow_membership`]. + */ +export interface SocietyCall_bestow_membership { + __kind: 'bestow_membership' + candidate: AccountId32 +} + +/** + * See [`Pallet::bid`]. + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: bigint +} + +/** + * See [`Pallet::claim_membership`]. + */ +export interface SocietyCall_claim_membership { + __kind: 'claim_membership' +} + +/** + * See [`Pallet::cleanup_candidacy`]. + */ +export interface SocietyCall_cleanup_candidacy { + __kind: 'cleanup_candidacy' + candidate: AccountId32 + max: number +} + +/** + * See [`Pallet::cleanup_challenge`]. + */ +export interface SocietyCall_cleanup_challenge { + __kind: 'cleanup_challenge' + challengeRound: number + max: number +} + +/** + * See [`Pallet::defender_vote`]. + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * See [`Pallet::dissolve`]. + */ +export interface SocietyCall_dissolve { + __kind: 'dissolve' +} + +/** + * See [`Pallet::drop_candidate`]. + */ +export interface SocietyCall_drop_candidate { + __kind: 'drop_candidate' + candidate: AccountId32 +} + +/** + * See [`Pallet::found_society`]. + */ +export interface SocietyCall_found_society { + __kind: 'found_society' + founder: MultiAddress + maxMembers: number + maxIntake: number + maxStrikes: number + candidateDeposit: bigint + rules: Bytes +} + +/** + * See [`Pallet::judge_suspended_member`]. + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: MultiAddress + forgive: boolean +} + +/** + * See [`Pallet::kick_candidate`]. + */ +export interface SocietyCall_kick_candidate { + __kind: 'kick_candidate' + candidate: AccountId32 +} + +/** + * See [`Pallet::payout`]. + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * See [`Pallet::punish_skeptic`]. + */ +export interface SocietyCall_punish_skeptic { + __kind: 'punish_skeptic' +} + +/** + * See [`Pallet::resign_candidacy`]. + */ +export interface SocietyCall_resign_candidacy { + __kind: 'resign_candidacy' +} + +/** + * See [`Pallet::set_parameters`]. + */ +export interface SocietyCall_set_parameters { + __kind: 'set_parameters' + maxMembers: number + maxIntake: number + maxStrikes: number + candidateDeposit: bigint +} + +/** + * See [`Pallet::unbid`]. + */ +export interface SocietyCall_unbid { + __kind: 'unbid' +} + +/** + * See [`Pallet::unvouch`]. + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' +} + +/** + * See [`Pallet::vote`]. + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: MultiAddress + approve: boolean +} + +/** + * See [`Pallet::vouch`]. + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: MultiAddress + value: bigint + tip: bigint +} + +/** + * See [`Pallet::waive_repay`]. + */ +export interface SocietyCall_waive_repay { + __kind: 'waive_repay' + amount: bigint +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: Id, + }), + force_lease: sts.enumStruct({ + para: Id, + leaser: AccountId32, + amount: sts.bigint(), + periodBegin: sts.number(), + periodCount: sts.number(), + }), + trigger_onboard: sts.enumStruct({ + para: Id, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * See [`Pallet::clear_all_leases`]. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: Id +} + +/** + * See [`Pallet::force_lease`]. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: Id + leaser: AccountId32 + amount: bigint + periodBegin: number + periodCount: number +} + +/** + * See [`Pallet::trigger_onboard`]. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: Id +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: SessionKeys, + proof: sts.bytes(), + }), + } +}) + +export const SessionKeys: sts.Type = sts.struct(() => { + return { + grandpa: Public, + babe: sts.bytes(), + paraValidator: V6Public, + paraAssignment: sts.bytes(), + authorityDiscovery: sts.bytes(), + beefy: sts.bytes(), + } +}) + +export const V6Public = sts.bytes() + +export const Public = sts.bytes() + +export interface SessionKeys { + grandpa: Public + babe: Bytes + paraValidator: V6Public + paraAssignment: Bytes + authorityDiscovery: Bytes + beefy: Bytes +} + +export type V6Public = Bytes + +export type Public = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * See [`Pallet::purge_keys`]. + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * See [`Pallet::set_keys`]. + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: SessionKeys + proof: Bytes +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: sts.number(), + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_after: sts.enumStruct({ + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * See [`Pallet::cancel`]. + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: number + index: number +} + +/** + * See [`Pallet::cancel_named`]. + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * See [`Pallet::schedule`]. + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * See [`Pallet::schedule_after`]. + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * See [`Pallet::schedule_named`]. + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * See [`Pallet::schedule_named_after`]. + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + add_lock: sts.enumStruct({ + para: Id, + }), + deregister: sts.enumStruct({ + id: Id, + }), + force_register: sts.enumStruct({ + who: AccountId32, + deposit: sts.bigint(), + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + register: sts.enumStruct({ + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + remove_lock: sts.enumStruct({ + para: Id, + }), + reserve: sts.unit(), + schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + swap: sts.enumStruct({ + id: Id, + other: Id, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type RegistrarCall = RegistrarCall_add_lock | RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_register | RegistrarCall_remove_lock | RegistrarCall_reserve | RegistrarCall_schedule_code_upgrade | RegistrarCall_set_current_head | RegistrarCall_swap + +/** + * See [`Pallet::add_lock`]. + */ +export interface RegistrarCall_add_lock { + __kind: 'add_lock' + para: Id +} + +/** + * See [`Pallet::deregister`]. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: Id +} + +/** + * See [`Pallet::force_register`]. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId32 + deposit: bigint + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * See [`Pallet::register`]. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * See [`Pallet::remove_lock`]. + */ +export interface RegistrarCall_remove_lock { + __kind: 'remove_lock' + para: Id +} + +/** + * See [`Pallet::reserve`]. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * See [`Pallet::schedule_code_upgrade`]. + */ +export interface RegistrarCall_schedule_code_upgrade { + __kind: 'schedule_code_upgrade' + para: Id + newCode: ValidationCode +} + +/** + * See [`Pallet::set_current_head`]. + */ +export interface RegistrarCall_set_current_head { + __kind: 'set_current_head' + para: Id + newHead: HeadData +} + +/** + * See [`Pallet::swap`]. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: Id + other: Id +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ReferendaCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + index: sts.number(), + }), + kill: sts.enumStruct({ + index: sts.number(), + }), + nudge_referendum: sts.enumStruct({ + index: sts.number(), + }), + one_fewer_deciding: sts.enumStruct({ + track: sts.number(), + }), + place_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_submission_deposit: sts.enumStruct({ + index: sts.number(), + }), + set_metadata: sts.enumStruct({ + index: sts.number(), + maybeHash: sts.option(() => H256), + }), + submit: sts.enumStruct({ + proposalOrigin: OriginCaller, + proposal: Bounded, + enactmentMoment: DispatchTime, + }), + } +}) + +export const DispatchTime: sts.Type = sts.closedEnum(() => { + return { + After: sts.number(), + At: sts.number(), + } +}) + +export type DispatchTime = DispatchTime_After | DispatchTime_At + +export interface DispatchTime_After { + __kind: 'After' + value: number +} + +export interface DispatchTime_At { + __kind: 'At' + value: number +} + +export const Bounded: sts.Type = sts.closedEnum(() => { + return { + Inline: sts.bytes(), + Legacy: sts.enumStruct({ + hash: H256, + }), + Lookup: sts.enumStruct({ + hash: H256, + len: sts.number(), + }), + } +}) + +export type Bounded = Bounded_Inline | Bounded_Legacy | Bounded_Lookup + +export interface Bounded_Inline { + __kind: 'Inline' + value: Bytes +} + +export interface Bounded_Legacy { + __kind: 'Legacy' + hash: H256 +} + +export interface Bounded_Lookup { + __kind: 'Lookup' + hash: H256 + len: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ReferendaCall = ReferendaCall_cancel | ReferendaCall_kill | ReferendaCall_nudge_referendum | ReferendaCall_one_fewer_deciding | ReferendaCall_place_decision_deposit | ReferendaCall_refund_decision_deposit | ReferendaCall_refund_submission_deposit | ReferendaCall_set_metadata | ReferendaCall_submit + +/** + * See [`Pallet::cancel`]. + */ +export interface ReferendaCall_cancel { + __kind: 'cancel' + index: number +} + +/** + * See [`Pallet::kill`]. + */ +export interface ReferendaCall_kill { + __kind: 'kill' + index: number +} + +/** + * See [`Pallet::nudge_referendum`]. + */ +export interface ReferendaCall_nudge_referendum { + __kind: 'nudge_referendum' + index: number +} + +/** + * See [`Pallet::one_fewer_deciding`]. + */ +export interface ReferendaCall_one_fewer_deciding { + __kind: 'one_fewer_deciding' + track: number +} + +/** + * See [`Pallet::place_decision_deposit`]. + */ +export interface ReferendaCall_place_decision_deposit { + __kind: 'place_decision_deposit' + index: number +} + +/** + * See [`Pallet::refund_decision_deposit`]. + */ +export interface ReferendaCall_refund_decision_deposit { + __kind: 'refund_decision_deposit' + index: number +} + +/** + * See [`Pallet::refund_submission_deposit`]. + */ +export interface ReferendaCall_refund_submission_deposit { + __kind: 'refund_submission_deposit' + index: number +} + +/** + * See [`Pallet::set_metadata`]. + */ +export interface ReferendaCall_set_metadata { + __kind: 'set_metadata' + index: number + maybeHash?: (H256 | undefined) +} + +/** + * See [`Pallet::submit`]. + */ +export interface ReferendaCall_submit { + __kind: 'submit' + proposalOrigin: OriginCaller + proposal: Bounded + enactmentMoment: DispatchTime +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: MultiAddress, + call: Call, + }), + cancel_recovered: sts.enumStruct({ + account: MultiAddress, + }), + claim_recovery: sts.enumStruct({ + account: MultiAddress, + }), + close_recovery: sts.enumStruct({ + rescuer: MultiAddress, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId32), + threshold: sts.number(), + delayPeriod: sts.number(), + }), + initiate_recovery: sts.enumStruct({ + account: MultiAddress, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + vouch_recovery: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * See [`Pallet::as_recovered`]. + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: MultiAddress + call: Call +} + +/** + * See [`Pallet::cancel_recovered`]. + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: MultiAddress +} + +/** + * See [`Pallet::claim_recovery`]. + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: MultiAddress +} + +/** + * See [`Pallet::close_recovery`]. + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: MultiAddress +} + +/** + * See [`Pallet::create_recovery`]. + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId32[] + threshold: number + delayPeriod: number +} + +/** + * See [`Pallet::initiate_recovery`]. + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: MultiAddress +} + +/** + * See [`Pallet::remove_recovery`]. + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * See [`Pallet::set_recovered`]. + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * See [`Pallet::vouch_recovery`]. + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + announce: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + create_pure: sts.enumStruct({ + proxyType: ProxyType, + delay: sts.number(), + index: sts.number(), + }), + kill_pure: sts.enumStruct({ + spawner: MultiAddress, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + proxy_announced: sts.enumStruct({ + delegate: MultiAddress, + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + reject_announcement: sts.enumStruct({ + delegate: MultiAddress, + callHash: H256, + }), + remove_announcement: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_create_pure | ProxyCall_kill_pure | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * See [`Pallet::add_proxy`]. + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +/** + * See [`Pallet::announce`]. + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: MultiAddress + callHash: H256 +} + +/** + * See [`Pallet::create_pure`]. + */ +export interface ProxyCall_create_pure { + __kind: 'create_pure' + proxyType: ProxyType + delay: number + index: number +} + +/** + * See [`Pallet::kill_pure`]. + */ +export interface ProxyCall_kill_pure { + __kind: 'kill_pure' + spawner: MultiAddress + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * See [`Pallet::proxy`]. + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * See [`Pallet::proxy_announced`]. + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: MultiAddress + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * See [`Pallet::reject_announcement`]. + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: MultiAddress + callHash: H256 +} + +/** + * See [`Pallet::remove_announcement`]. + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: MultiAddress + callHash: H256 +} + +/** + * See [`Pallet::remove_proxies`]. + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * See [`Pallet::remove_proxy`]. + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NominationPools | ProxyType_NonTransfer | ProxyType_Society | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NominationPools { + __kind: 'NominationPools' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Society { + __kind: 'Society' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const PreimageCall: sts.Type = sts.closedEnum(() => { + return { + ensure_updated: sts.enumStruct({ + hashes: sts.array(() => H256), + }), + note_preimage: sts.enumStruct({ + bytes: sts.bytes(), + }), + request_preimage: sts.enumStruct({ + hash: H256, + }), + unnote_preimage: sts.enumStruct({ + hash: H256, + }), + unrequest_preimage: sts.enumStruct({ + hash: H256, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type PreimageCall = PreimageCall_ensure_updated | PreimageCall_note_preimage | PreimageCall_request_preimage | PreimageCall_unnote_preimage | PreimageCall_unrequest_preimage + +/** + * See [`Pallet::ensure_updated`]. + */ +export interface PreimageCall_ensure_updated { + __kind: 'ensure_updated' + hashes: H256[] +} + +/** + * See [`Pallet::note_preimage`]. + */ +export interface PreimageCall_note_preimage { + __kind: 'note_preimage' + bytes: Bytes +} + +/** + * See [`Pallet::request_preimage`]. + */ +export interface PreimageCall_request_preimage { + __kind: 'request_preimage' + hash: H256 +} + +/** + * See [`Pallet::unnote_preimage`]. + */ +export interface PreimageCall_unnote_preimage { + __kind: 'unnote_preimage' + hash: H256 +} + +/** + * See [`Pallet::unrequest_preimage`]. + */ +export interface PreimageCall_unrequest_preimage { + __kind: 'unrequest_preimage' + hash: H256 +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParasSlashingCall: sts.Type = sts.closedEnum(() => { + return { + report_dispute_lost_unsigned: sts.enumStruct({ + disputeProof: V6DisputeProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: sts.number(), + trieNodes: sts.array(() => sts.bytes()), + validatorCount: sts.number(), + } +}) + +export interface MembershipProof { + session: number + trieNodes: Bytes[] + validatorCount: number +} + +export const V6DisputeProof: sts.Type = sts.struct(() => { + return { + timeSlot: V6DisputesTimeSlot, + kind: V6SlashingOffenceKind, + validatorIndex: V6ValidatorIndex, + validatorId: V6Public, + } +}) + +export const V6ValidatorIndex = sts.number() + +export const V6SlashingOffenceKind: sts.Type = sts.closedEnum(() => { + return { + AgainstValid: sts.unit(), + ForInvalid: sts.unit(), + } +}) + +export type V6SlashingOffenceKind = V6SlashingOffenceKind_AgainstValid | V6SlashingOffenceKind_ForInvalid + +export interface V6SlashingOffenceKind_AgainstValid { + __kind: 'AgainstValid' +} + +export interface V6SlashingOffenceKind_ForInvalid { + __kind: 'ForInvalid' +} + +export const V6DisputesTimeSlot: sts.Type = sts.struct(() => { + return { + sessionIndex: sts.number(), + candidateHash: CandidateHash, + } +}) + +export const CandidateHash = sts.bytes() + +export interface V6DisputesTimeSlot { + sessionIndex: number + candidateHash: CandidateHash +} + +export type CandidateHash = Bytes + +export interface V6DisputeProof { + timeSlot: V6DisputesTimeSlot + kind: V6SlashingOffenceKind + validatorIndex: V6ValidatorIndex + validatorId: V6Public +} + +export type V6ValidatorIndex = number + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParasSlashingCall = ParasSlashingCall_report_dispute_lost_unsigned + +/** + * See [`Pallet::report_dispute_lost_unsigned`]. + */ +export interface ParasSlashingCall_report_dispute_lost_unsigned { + __kind: 'report_dispute_lost_unsigned' + disputeProof: V6DisputeProof + keyOwnerProof: MembershipProof +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParasSharedCall = never + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParasDisputesCall: sts.Type = sts.closedEnum(() => { + return { + force_unfreeze: sts.unit(), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParasDisputesCall = ParasDisputesCall_force_unfreeze + +/** + * See [`Pallet::force_unfreeze`]. + */ +export interface ParasDisputesCall_force_unfreeze { + __kind: 'force_unfreeze' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + add_trusted_validation_code: sts.enumStruct({ + validationCode: ValidationCode, + }), + force_note_new_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: Id, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + relayParentNumber: sts.number(), + }), + force_set_current_code: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_set_most_recent_context: sts.enumStruct({ + para: Id, + context: sts.number(), + }), + include_pvf_check_statement: sts.enumStruct({ + stmt: V6PvfCheckStatement, + signature: V6Signature, + }), + poke_unused_validation_code: sts.enumStruct({ + validationCodeHash: ValidationCodeHash, + }), + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const V6Signature = sts.bytes() + +export const V6PvfCheckStatement: sts.Type = sts.struct(() => { + return { + accept: sts.boolean(), + subject: ValidationCodeHash, + sessionIndex: sts.number(), + validatorIndex: V6ValidatorIndex, + } +}) + +export interface V6PvfCheckStatement { + accept: boolean + subject: ValidationCodeHash + sessionIndex: number + validatorIndex: V6ValidatorIndex +} + +export type ValidationCodeHash = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParasCall = ParasCall_add_trusted_validation_code | ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head | ParasCall_force_set_most_recent_context | ParasCall_include_pvf_check_statement | ParasCall_poke_unused_validation_code + +/** + * See [`Pallet::add_trusted_validation_code`]. + */ +export interface ParasCall_add_trusted_validation_code { + __kind: 'add_trusted_validation_code' + validationCode: ValidationCode +} + +/** + * See [`Pallet::force_note_new_head`]. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: Id + newHead: HeadData +} + +/** + * See [`Pallet::force_queue_action`]. + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: Id +} + +/** + * See [`Pallet::force_schedule_code_upgrade`]. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: Id + newCode: ValidationCode + relayParentNumber: number +} + +/** + * See [`Pallet::force_set_current_code`]. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: Id + newCode: ValidationCode +} + +/** + * See [`Pallet::force_set_current_head`]. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: Id + newHead: HeadData +} + +/** + * See [`Pallet::force_set_most_recent_context`]. + */ +export interface ParasCall_force_set_most_recent_context { + __kind: 'force_set_most_recent_context' + para: Id + context: number +} + +/** + * See [`Pallet::include_pvf_check_statement`]. + */ +export interface ParasCall_include_pvf_check_statement { + __kind: 'include_pvf_check_statement' + stmt: V6PvfCheckStatement + signature: V6Signature +} + +/** + * See [`Pallet::poke_unused_validation_code`]. + */ +export interface ParasCall_poke_unused_validation_code { + __kind: 'poke_unused_validation_code' + validationCodeHash: ValidationCodeHash +} + +export type V6Signature = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParaInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: V6InherentData, + }), + } +}) + +export const V6InherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => V6UncheckedSigned), + backedCandidates: sts.array(() => V6BackedCandidate), + disputes: sts.array(() => V6DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: H256, + number: sts.number(), + stateRoot: H256, + extrinsicsRoot: H256, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + Consensus: sts.tuple(() => [sts.bytes(), sts.bytes()]), + Other: sts.bytes(), + PreRuntime: sts.tuple(() => [sts.bytes(), sts.bytes()]), + RuntimeEnvironmentUpdated: sts.unit(), + Seal: sts.tuple(() => [sts.bytes(), sts.bytes()]), + } +}) + +export type DigestItem = DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: [Bytes, Bytes] +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: [Bytes, Bytes] +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: [Bytes, Bytes] +} + +export interface Digest { + logs: DigestItem[] +} + +export interface Header { + parentHash: H256 + number: number + stateRoot: H256 + extrinsicsRoot: H256 + digest: Digest +} + +export const V6DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: sts.number(), + statements: sts.array(() => sts.tuple(() => [V6DisputeStatement, V6ValidatorIndex, V6Signature])), + } +}) + +export const V6DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: V6InvalidDisputeStatementKind, + Valid: V6ValidDisputeStatementKind, + } +}) + +export const V6ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + ApprovalCheckingMultipleCandidates: sts.array(() => CandidateHash), + BackingSeconded: H256, + BackingValid: H256, + Explicit: sts.unit(), + } +}) + +export type V6ValidDisputeStatementKind = V6ValidDisputeStatementKind_ApprovalChecking | V6ValidDisputeStatementKind_ApprovalCheckingMultipleCandidates | V6ValidDisputeStatementKind_BackingSeconded | V6ValidDisputeStatementKind_BackingValid | V6ValidDisputeStatementKind_Explicit + +export interface V6ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface V6ValidDisputeStatementKind_ApprovalCheckingMultipleCandidates { + __kind: 'ApprovalCheckingMultipleCandidates' + value: CandidateHash[] +} + +export interface V6ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: H256 +} + +export interface V6ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: H256 +} + +export interface V6ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export const V6InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export type V6InvalidDisputeStatementKind = V6InvalidDisputeStatementKind_Explicit + +export interface V6InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type V6DisputeStatement = V6DisputeStatement_Invalid | V6DisputeStatement_Valid + +export interface V6DisputeStatement_Invalid { + __kind: 'Invalid' + value: V6InvalidDisputeStatementKind +} + +export interface V6DisputeStatement_Valid { + __kind: 'Valid' + value: V6ValidDisputeStatementKind +} + +export interface V6DisputeStatementSet { + candidateHash: CandidateHash + session: number + statements: [V6DisputeStatement, V6ValidatorIndex, V6Signature][] +} + +export const V6BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: V6CommittedCandidateReceipt, + validityVotes: sts.array(() => V6ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const V6ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: V6Signature, + Implicit: V6Signature, + } +}) + +export type V6ValidityAttestation = V6ValidityAttestation_Explicit | V6ValidityAttestation_Implicit + +export interface V6ValidityAttestation_Explicit { + __kind: 'Explicit' + value: V6Signature +} + +export interface V6ValidityAttestation_Implicit { + __kind: 'Implicit' + value: V6Signature +} + +export const V6CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: V6CandidateDescriptor, + commitments: V6CandidateCommitments, + } +}) + +export const V6CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => sts.bytes()), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: sts.number(), + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: Id, + data: sts.bytes(), + } +}) + +export interface OutboundHrmpMessage { + recipient: Id + data: Bytes +} + +export interface V6CandidateCommitments { + upwardMessages: Bytes[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: number +} + +export const V6CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: Id, + relayParent: H256, + collator: sts.bytes(), + persistedValidationDataHash: H256, + povHash: H256, + erasureRoot: H256, + signature: sts.bytes(), + paraHead: H256, + validationCodeHash: ValidationCodeHash, + } +}) + +export interface V6CandidateDescriptor { + paraId: Id + relayParent: H256 + collator: Bytes + persistedValidationDataHash: H256 + povHash: H256 + erasureRoot: H256 + signature: Bytes + paraHead: H256 + validationCodeHash: ValidationCodeHash +} + +export interface V6CommittedCandidateReceipt { + descriptor: V6CandidateDescriptor + commitments: V6CandidateCommitments +} + +export interface V6BackedCandidate { + candidate: V6CommittedCandidateReceipt + validityVotes: V6ValidityAttestation[] + validatorIndices: BitSequence +} + +export const V6UncheckedSigned: sts.Type = sts.struct(() => { + return { + payload: V6AvailabilityBitfield, + validatorIndex: V6ValidatorIndex, + signature: V6Signature, + } +}) + +export const V6AvailabilityBitfield = sts.bitseq() + +export interface V6UncheckedSigned { + payload: V6AvailabilityBitfield + validatorIndex: V6ValidatorIndex + signature: V6Signature +} + +export type V6AvailabilityBitfield = BitSequence + +export interface V6InherentData { + bitfields: V6UncheckedSigned[] + backedCandidates: V6BackedCandidate[] + disputes: V6DisputeStatementSet[] + parentHeader: Header +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParaInherentCall = ParaInherentCall_enter + +/** + * See [`Pallet::enter`]. + */ +export interface ParaInherentCall_enter { + __kind: 'enter' + data: V6InherentData +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParaInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParaInclusionCall = never + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const OnDemandAssignmentProviderCall: sts.Type = sts.closedEnum(() => { + return { + place_order_allow_death: sts.enumStruct({ + maxAmount: sts.bigint(), + paraId: Id, + }), + place_order_keep_alive: sts.enumStruct({ + maxAmount: sts.bigint(), + paraId: Id, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type OnDemandAssignmentProviderCall = OnDemandAssignmentProviderCall_place_order_allow_death | OnDemandAssignmentProviderCall_place_order_keep_alive + +/** + * See [`Pallet::place_order_allow_death`]. + */ +export interface OnDemandAssignmentProviderCall_place_order_allow_death { + __kind: 'place_order_allow_death' + maxAmount: bigint + paraId: Id +} + +/** + * See [`Pallet::place_order_keep_alive`]. + */ +export interface OnDemandAssignmentProviderCall_place_order_keep_alive { + __kind: 'place_order_keep_alive' + maxAmount: bigint + paraId: Id +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const NominationPoolsCall: sts.Type = sts.closedEnum(() => { + return { + adjust_pool_deposit: sts.enumStruct({ + poolId: sts.number(), + }), + bond_extra: sts.enumStruct({ + extra: BondExtra, + }), + bond_extra_other: sts.enumStruct({ + member: MultiAddress, + extra: BondExtra, + }), + chill: sts.enumStruct({ + poolId: sts.number(), + }), + claim_commission: sts.enumStruct({ + poolId: sts.number(), + }), + claim_payout: sts.unit(), + claim_payout_other: sts.enumStruct({ + other: AccountId32, + }), + create: sts.enumStruct({ + amount: sts.bigint(), + root: MultiAddress, + nominator: MultiAddress, + bouncer: MultiAddress, + }), + create_with_pool_id: sts.enumStruct({ + amount: sts.bigint(), + root: MultiAddress, + nominator: MultiAddress, + bouncer: MultiAddress, + poolId: sts.number(), + }), + join: sts.enumStruct({ + amount: sts.bigint(), + poolId: sts.number(), + }), + nominate: sts.enumStruct({ + poolId: sts.number(), + validators: sts.array(() => AccountId32), + }), + pool_withdraw_unbonded: sts.enumStruct({ + poolId: sts.number(), + numSlashingSpans: sts.number(), + }), + set_claim_permission: sts.enumStruct({ + permission: ClaimPermission, + }), + set_commission: sts.enumStruct({ + poolId: sts.number(), + newCommission: sts.option(() => sts.tuple(() => [Perbill, AccountId32])), + }), + set_commission_change_rate: sts.enumStruct({ + poolId: sts.number(), + changeRate: CommissionChangeRate, + }), + set_commission_claim_permission: sts.enumStruct({ + poolId: sts.number(), + permission: sts.option(() => CommissionClaimPermission), + }), + set_commission_max: sts.enumStruct({ + poolId: sts.number(), + maxCommission: Perbill, + }), + set_configs: sts.enumStruct({ + minJoinBond: Type_337, + minCreateBond: Type_337, + maxPools: Type_338, + maxMembers: Type_338, + maxMembersPerPool: Type_338, + globalMaxCommission: Type_339, + }), + set_metadata: sts.enumStruct({ + poolId: sts.number(), + metadata: sts.bytes(), + }), + set_state: sts.enumStruct({ + poolId: sts.number(), + state: PoolState, + }), + unbond: sts.enumStruct({ + memberAccount: MultiAddress, + unbondingPoints: sts.bigint(), + }), + update_roles: sts.enumStruct({ + poolId: sts.number(), + newRoot: Type_340, + newNominator: Type_340, + newBouncer: Type_340, + }), + withdraw_unbonded: sts.enumStruct({ + memberAccount: MultiAddress, + numSlashingSpans: sts.number(), + }), + } +}) + +export const Type_340: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: AccountId32, + } +}) + +export type Type_340 = Type_340_Noop | Type_340_Remove | Type_340_Set + +export interface Type_340_Noop { + __kind: 'Noop' +} + +export interface Type_340_Remove { + __kind: 'Remove' +} + +export interface Type_340_Set { + __kind: 'Set' + value: AccountId32 +} + +export const PoolState: sts.Type = sts.closedEnum(() => { + return { + Blocked: sts.unit(), + Destroying: sts.unit(), + Open: sts.unit(), + } +}) + +export type PoolState = PoolState_Blocked | PoolState_Destroying | PoolState_Open + +export interface PoolState_Blocked { + __kind: 'Blocked' +} + +export interface PoolState_Destroying { + __kind: 'Destroying' +} + +export interface PoolState_Open { + __kind: 'Open' +} + +export const Type_339: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export type Type_339 = Type_339_Noop | Type_339_Remove | Type_339_Set + +export interface Type_339_Noop { + __kind: 'Noop' +} + +export interface Type_339_Remove { + __kind: 'Remove' +} + +export interface Type_339_Set { + __kind: 'Set' + value: Perbill +} + +export const Type_338: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_338 = Type_338_Noop | Type_338_Remove | Type_338_Set + +export interface Type_338_Noop { + __kind: 'Noop' +} + +export interface Type_338_Remove { + __kind: 'Remove' +} + +export interface Type_338_Set { + __kind: 'Set' + value: number +} + +export const Type_337: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type Type_337 = Type_337_Noop | Type_337_Remove | Type_337_Set + +export interface Type_337_Noop { + __kind: 'Noop' +} + +export interface Type_337_Remove { + __kind: 'Remove' +} + +export interface Type_337_Set { + __kind: 'Set' + value: bigint +} + +export const CommissionClaimPermission: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Permissionless: sts.unit(), + } +}) + +export type CommissionClaimPermission = CommissionClaimPermission_Account | CommissionClaimPermission_Permissionless + +export interface CommissionClaimPermission_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface CommissionClaimPermission_Permissionless { + __kind: 'Permissionless' +} + +export const CommissionChangeRate: sts.Type = sts.struct(() => { + return { + maxIncrease: Perbill, + minDelay: sts.number(), + } +}) + +export interface CommissionChangeRate { + maxIncrease: Perbill + minDelay: number +} + +export const ClaimPermission: sts.Type = sts.closedEnum(() => { + return { + Permissioned: sts.unit(), + PermissionlessAll: sts.unit(), + PermissionlessCompound: sts.unit(), + PermissionlessWithdraw: sts.unit(), + } +}) + +export type ClaimPermission = ClaimPermission_Permissioned | ClaimPermission_PermissionlessAll | ClaimPermission_PermissionlessCompound | ClaimPermission_PermissionlessWithdraw + +export interface ClaimPermission_Permissioned { + __kind: 'Permissioned' +} + +export interface ClaimPermission_PermissionlessAll { + __kind: 'PermissionlessAll' +} + +export interface ClaimPermission_PermissionlessCompound { + __kind: 'PermissionlessCompound' +} + +export interface ClaimPermission_PermissionlessWithdraw { + __kind: 'PermissionlessWithdraw' +} + +export const BondExtra: sts.Type = sts.closedEnum(() => { + return { + FreeBalance: sts.bigint(), + Rewards: sts.unit(), + } +}) + +export type BondExtra = BondExtra_FreeBalance | BondExtra_Rewards + +export interface BondExtra_FreeBalance { + __kind: 'FreeBalance' + value: bigint +} + +export interface BondExtra_Rewards { + __kind: 'Rewards' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type NominationPoolsCall = NominationPoolsCall_adjust_pool_deposit | NominationPoolsCall_bond_extra | NominationPoolsCall_bond_extra_other | NominationPoolsCall_chill | NominationPoolsCall_claim_commission | NominationPoolsCall_claim_payout | NominationPoolsCall_claim_payout_other | NominationPoolsCall_create | NominationPoolsCall_create_with_pool_id | NominationPoolsCall_join | NominationPoolsCall_nominate | NominationPoolsCall_pool_withdraw_unbonded | NominationPoolsCall_set_claim_permission | NominationPoolsCall_set_commission | NominationPoolsCall_set_commission_change_rate | NominationPoolsCall_set_commission_claim_permission | NominationPoolsCall_set_commission_max | NominationPoolsCall_set_configs | NominationPoolsCall_set_metadata | NominationPoolsCall_set_state | NominationPoolsCall_unbond | NominationPoolsCall_update_roles | NominationPoolsCall_withdraw_unbonded + +/** + * See [`Pallet::adjust_pool_deposit`]. + */ +export interface NominationPoolsCall_adjust_pool_deposit { + __kind: 'adjust_pool_deposit' + poolId: number +} + +/** + * See [`Pallet::bond_extra`]. + */ +export interface NominationPoolsCall_bond_extra { + __kind: 'bond_extra' + extra: BondExtra +} + +/** + * See [`Pallet::bond_extra_other`]. + */ +export interface NominationPoolsCall_bond_extra_other { + __kind: 'bond_extra_other' + member: MultiAddress + extra: BondExtra +} + +/** + * See [`Pallet::chill`]. + */ +export interface NominationPoolsCall_chill { + __kind: 'chill' + poolId: number +} + +/** + * See [`Pallet::claim_commission`]. + */ +export interface NominationPoolsCall_claim_commission { + __kind: 'claim_commission' + poolId: number +} + +/** + * See [`Pallet::claim_payout`]. + */ +export interface NominationPoolsCall_claim_payout { + __kind: 'claim_payout' +} + +/** + * See [`Pallet::claim_payout_other`]. + */ +export interface NominationPoolsCall_claim_payout_other { + __kind: 'claim_payout_other' + other: AccountId32 +} + +/** + * See [`Pallet::create`]. + */ +export interface NominationPoolsCall_create { + __kind: 'create' + amount: bigint + root: MultiAddress + nominator: MultiAddress + bouncer: MultiAddress +} + +/** + * See [`Pallet::create_with_pool_id`]. + */ +export interface NominationPoolsCall_create_with_pool_id { + __kind: 'create_with_pool_id' + amount: bigint + root: MultiAddress + nominator: MultiAddress + bouncer: MultiAddress + poolId: number +} + +/** + * See [`Pallet::join`]. + */ +export interface NominationPoolsCall_join { + __kind: 'join' + amount: bigint + poolId: number +} + +/** + * See [`Pallet::nominate`]. + */ +export interface NominationPoolsCall_nominate { + __kind: 'nominate' + poolId: number + validators: AccountId32[] +} + +/** + * See [`Pallet::pool_withdraw_unbonded`]. + */ +export interface NominationPoolsCall_pool_withdraw_unbonded { + __kind: 'pool_withdraw_unbonded' + poolId: number + numSlashingSpans: number +} + +/** + * See [`Pallet::set_claim_permission`]. + */ +export interface NominationPoolsCall_set_claim_permission { + __kind: 'set_claim_permission' + permission: ClaimPermission +} + +/** + * See [`Pallet::set_commission`]. + */ +export interface NominationPoolsCall_set_commission { + __kind: 'set_commission' + poolId: number + newCommission?: ([Perbill, AccountId32] | undefined) +} + +/** + * See [`Pallet::set_commission_change_rate`]. + */ +export interface NominationPoolsCall_set_commission_change_rate { + __kind: 'set_commission_change_rate' + poolId: number + changeRate: CommissionChangeRate +} + +/** + * See [`Pallet::set_commission_claim_permission`]. + */ +export interface NominationPoolsCall_set_commission_claim_permission { + __kind: 'set_commission_claim_permission' + poolId: number + permission?: (CommissionClaimPermission | undefined) +} + +/** + * See [`Pallet::set_commission_max`]. + */ +export interface NominationPoolsCall_set_commission_max { + __kind: 'set_commission_max' + poolId: number + maxCommission: Perbill +} + +/** + * See [`Pallet::set_configs`]. + */ +export interface NominationPoolsCall_set_configs { + __kind: 'set_configs' + minJoinBond: Type_337 + minCreateBond: Type_337 + maxPools: Type_338 + maxMembers: Type_338 + maxMembersPerPool: Type_338 + globalMaxCommission: Type_339 +} + +/** + * See [`Pallet::set_metadata`]. + */ +export interface NominationPoolsCall_set_metadata { + __kind: 'set_metadata' + poolId: number + metadata: Bytes +} + +/** + * See [`Pallet::set_state`]. + */ +export interface NominationPoolsCall_set_state { + __kind: 'set_state' + poolId: number + state: PoolState +} + +/** + * See [`Pallet::unbond`]. + */ +export interface NominationPoolsCall_unbond { + __kind: 'unbond' + memberAccount: MultiAddress + unbondingPoints: bigint +} + +/** + * See [`Pallet::update_roles`]. + */ +export interface NominationPoolsCall_update_roles { + __kind: 'update_roles' + poolId: number + newRoot: Type_340 + newNominator: Type_340 + newBouncer: Type_340 +} + +/** + * See [`Pallet::withdraw_unbonded`]. + */ +export interface NominationPoolsCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + memberAccount: MultiAddress + numSlashingSpans: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const NisCounterpartBalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_adjust_total_issuance: sts.enumStruct({ + direction: AdjustmentDirection, + delta: sts.bigint(), + }), + force_set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + }), + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_allow_death: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + upgrade_accounts: sts.enumStruct({ + who: sts.array(() => AccountId32), + }), + } +}) + +export const AdjustmentDirection: sts.Type = sts.closedEnum(() => { + return { + Decrease: sts.unit(), + Increase: sts.unit(), + } +}) + +export type AdjustmentDirection = AdjustmentDirection_Decrease | AdjustmentDirection_Increase + +export interface AdjustmentDirection_Decrease { + __kind: 'Decrease' +} + +export interface AdjustmentDirection_Increase { + __kind: 'Increase' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type NisCounterpartBalancesCall = NisCounterpartBalancesCall_force_adjust_total_issuance | NisCounterpartBalancesCall_force_set_balance | NisCounterpartBalancesCall_force_transfer | NisCounterpartBalancesCall_force_unreserve | NisCounterpartBalancesCall_transfer_all | NisCounterpartBalancesCall_transfer_allow_death | NisCounterpartBalancesCall_transfer_keep_alive | NisCounterpartBalancesCall_upgrade_accounts + +/** + * See [`Pallet::force_adjust_total_issuance`]. + */ +export interface NisCounterpartBalancesCall_force_adjust_total_issuance { + __kind: 'force_adjust_total_issuance' + direction: AdjustmentDirection + delta: bigint +} + +/** + * See [`Pallet::force_set_balance`]. + */ +export interface NisCounterpartBalancesCall_force_set_balance { + __kind: 'force_set_balance' + who: MultiAddress + newFree: bigint +} + +/** + * See [`Pallet::force_transfer`]. + */ +export interface NisCounterpartBalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::force_unreserve`]. + */ +export interface NisCounterpartBalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * See [`Pallet::transfer_all`]. + */ +export interface NisCounterpartBalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * See [`Pallet::transfer_allow_death`]. + */ +export interface NisCounterpartBalancesCall_transfer_allow_death { + __kind: 'transfer_allow_death' + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::transfer_keep_alive`]. + */ +export interface NisCounterpartBalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::upgrade_accounts`]. + */ +export interface NisCounterpartBalancesCall_upgrade_accounts { + __kind: 'upgrade_accounts' + who: AccountId32[] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const NisCall: sts.Type = sts.closedEnum(() => { + return { + communify: sts.enumStruct({ + index: sts.number(), + }), + fund_deficit: sts.unit(), + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + privatize: sts.enumStruct({ + index: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + thaw_communal: sts.enumStruct({ + index: sts.number(), + }), + thaw_private: sts.enumStruct({ + index: sts.number(), + maybeProportion: sts.option(() => Perquintill), + }), + } +}) + +export const Perquintill = sts.bigint() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type NisCall = NisCall_communify | NisCall_fund_deficit | NisCall_place_bid | NisCall_privatize | NisCall_retract_bid | NisCall_thaw_communal | NisCall_thaw_private + +/** + * See [`Pallet::communify`]. + */ +export interface NisCall_communify { + __kind: 'communify' + index: number +} + +/** + * See [`Pallet::fund_deficit`]. + */ +export interface NisCall_fund_deficit { + __kind: 'fund_deficit' +} + +/** + * See [`Pallet::place_bid`]. + */ +export interface NisCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * See [`Pallet::privatize`]. + */ +export interface NisCall_privatize { + __kind: 'privatize' + index: number +} + +/** + * See [`Pallet::retract_bid`]. + */ +export interface NisCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * See [`Pallet::thaw_communal`]. + */ +export interface NisCall_thaw_communal { + __kind: 'thaw_communal' + index: number +} + +/** + * See [`Pallet::thaw_private`]. + */ +export interface NisCall_thaw_private { + __kind: 'thaw_private' + index: number + maybeProportion?: (Perquintill | undefined) +} + +export type Perquintill = bigint + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + call: Call, + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId32), + call: Call, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * See [`Pallet::approve_as_multi`]. + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * See [`Pallet::as_multi`]. + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + call: Call + maxWeight: Weight +} + +/** + * See [`Pallet::as_multi_threshold_1`]. + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId32[] + call: Call +} + +/** + * See [`Pallet::cancel_as_multi`]. + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId32[] + timepoint: Timepoint + callHash: Bytes +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const MessageQueueCall: sts.Type = sts.closedEnum(() => { + return { + execute_overweight: sts.enumStruct({ + messageOrigin: AggregateMessageOrigin, + page: sts.number(), + index: sts.number(), + weightLimit: Weight, + }), + reap_page: sts.enumStruct({ + messageOrigin: AggregateMessageOrigin, + pageIndex: sts.number(), + }), + } +}) + +export const AggregateMessageOrigin: sts.Type = sts.closedEnum(() => { + return { + Ump: UmpQueueId, + } +}) + +export const UmpQueueId: sts.Type = sts.closedEnum(() => { + return { + Para: Id, + } +}) + +export type UmpQueueId = UmpQueueId_Para + +export interface UmpQueueId_Para { + __kind: 'Para' + value: Id +} + +export type AggregateMessageOrigin = AggregateMessageOrigin_Ump + +export interface AggregateMessageOrigin_Ump { + __kind: 'Ump' + value: UmpQueueId +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type MessageQueueCall = MessageQueueCall_execute_overweight | MessageQueueCall_reap_page + +/** + * See [`Pallet::execute_overweight`]. + */ +export interface MessageQueueCall_execute_overweight { + __kind: 'execute_overweight' + messageOrigin: AggregateMessageOrigin + page: number + index: number + weightLimit: Weight +} + +/** + * See [`Pallet::reap_page`]. + */ +export interface MessageQueueCall_reap_page { + __kind: 'reap_page' + messageOrigin: AggregateMessageOrigin + pageIndex: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const InitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type InitializerCall = InitializerCall_force_approve + +/** + * See [`Pallet::force_approve`]. + */ +export interface InitializerCall_force_approve { + __kind: 'force_approve' + upTo: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: sts.number(), + }), + force_transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: sts.number(), + }), + freeze: sts.enumStruct({ + index: sts.number(), + }), + transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * See [`Pallet::claim`]. + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: number +} + +/** + * See [`Pallet::force_transfer`]. + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: MultiAddress + index: number + freeze: boolean +} + +/** + * See [`Pallet::free`]. + */ +export interface IndicesCall_free { + __kind: 'free' + index: number +} + +/** + * See [`Pallet::freeze`]. + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: number +} + +/** + * See [`Pallet::transfer`]. + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: MultiAddress + index: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const IdentityMigratorCall: sts.Type = sts.closedEnum(() => { + return { + poke_deposit: sts.enumStruct({ + who: AccountId32, + }), + reap_identity: sts.enumStruct({ + who: AccountId32, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type IdentityMigratorCall = IdentityMigratorCall_poke_deposit | IdentityMigratorCall_reap_identity + +/** + * See [`Pallet::poke_deposit`]. + */ +export interface IdentityMigratorCall_poke_deposit { + __kind: 'poke_deposit' + who: AccountId32 +} + +/** + * See [`Pallet::reap_identity`]. + */ +export interface IdentityMigratorCall_reap_identity { + __kind: 'reap_identity' + who: AccountId32 +} + +/** + * Identity pallet declaration. + */ +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + accept_username: sts.enumStruct({ + username: BoundedVec, + }), + add_registrar: sts.enumStruct({ + account: MultiAddress, + }), + add_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + add_username_authority: sts.enumStruct({ + authority: MultiAddress, + suffix: sts.bytes(), + allocation: sts.number(), + }), + cancel_request: sts.enumStruct({ + regIndex: sts.number(), + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: MultiAddress, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: MultiAddress, + judgement: Judgement, + identity: H256, + }), + quit_sub: sts.unit(), + remove_dangling_username: sts.enumStruct({ + username: BoundedVec, + }), + remove_expired_approval: sts.enumStruct({ + username: BoundedVec, + }), + remove_sub: sts.enumStruct({ + sub: MultiAddress, + }), + remove_username_authority: sts.enumStruct({ + authority: MultiAddress, + }), + rename_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: MultiAddress, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: sts.bigint(), + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_primary_username: sts.enumStruct({ + username: BoundedVec, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId32, Data])), + }), + set_username_for: sts.enumStruct({ + who: MultiAddress, + username: sts.bytes(), + signature: sts.option(() => MultiSignature), + }), + } +}) + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => sts.tuple(() => [Data, Data])), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => sts.bytes()), + image: Data, + twitter: Data, + } +}) + +export interface IdentityInfo { + additional: [Data, Data][] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (Bytes | undefined) + image: Data + twitter: Data +} + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: Bytes +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: Bytes +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: Bytes +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: Bytes +} + +export const Judgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: sts.bigint(), + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export type Judgement = Judgement_Erroneous | Judgement_FeePaid | Judgement_KnownGood | Judgement_LowQuality | Judgement_OutOfDate | Judgement_Reasonable | Judgement_Unknown + +export interface Judgement_Erroneous { + __kind: 'Erroneous' +} + +export interface Judgement_FeePaid { + __kind: 'FeePaid' + value: bigint +} + +export interface Judgement_KnownGood { + __kind: 'KnownGood' +} + +export interface Judgement_LowQuality { + __kind: 'LowQuality' +} + +export interface Judgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface Judgement_Reasonable { + __kind: 'Reasonable' +} + +export interface Judgement_Unknown { + __kind: 'Unknown' +} + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: sts.bytes(), + Keccak256: sts.bytes(), + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: sts.bytes(), + ShaThree256: sts.bytes(), + } +}) + +export const BoundedVec = sts.bytes() + +/** + * Identity pallet declaration. + */ +export type IdentityCall = IdentityCall_accept_username | IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_add_username_authority | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_dangling_username | IdentityCall_remove_expired_approval | IdentityCall_remove_sub | IdentityCall_remove_username_authority | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_primary_username | IdentityCall_set_subs | IdentityCall_set_username_for + +/** + * See [`Pallet::accept_username`]. + */ +export interface IdentityCall_accept_username { + __kind: 'accept_username' + username: BoundedVec +} + +/** + * See [`Pallet::add_registrar`]. + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: MultiAddress +} + +/** + * See [`Pallet::add_sub`]. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: MultiAddress + data: Data +} + +/** + * See [`Pallet::add_username_authority`]. + */ +export interface IdentityCall_add_username_authority { + __kind: 'add_username_authority' + authority: MultiAddress + suffix: Bytes + allocation: number +} + +/** + * See [`Pallet::cancel_request`]. + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: number +} + +/** + * See [`Pallet::clear_identity`]. + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * See [`Pallet::kill_identity`]. + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: MultiAddress +} + +/** + * See [`Pallet::provide_judgement`]. + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: MultiAddress + judgement: Judgement + identity: H256 +} + +/** + * See [`Pallet::quit_sub`]. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * See [`Pallet::remove_dangling_username`]. + */ +export interface IdentityCall_remove_dangling_username { + __kind: 'remove_dangling_username' + username: BoundedVec +} + +/** + * See [`Pallet::remove_expired_approval`]. + */ +export interface IdentityCall_remove_expired_approval { + __kind: 'remove_expired_approval' + username: BoundedVec +} + +/** + * See [`Pallet::remove_sub`]. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: MultiAddress +} + +/** + * See [`Pallet::remove_username_authority`]. + */ +export interface IdentityCall_remove_username_authority { + __kind: 'remove_username_authority' + authority: MultiAddress +} + +/** + * See [`Pallet::rename_sub`]. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: MultiAddress + data: Data +} + +/** + * See [`Pallet::request_judgement`]. + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * See [`Pallet::set_account_id`]. + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: MultiAddress +} + +/** + * See [`Pallet::set_fee`]. + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * See [`Pallet::set_fields`]. + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: bigint +} + +/** + * See [`Pallet::set_identity`]. + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * See [`Pallet::set_primary_username`]. + */ +export interface IdentityCall_set_primary_username { + __kind: 'set_primary_username' + username: BoundedVec +} + +/** + * See [`Pallet::set_subs`]. + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId32, Data][] +} + +/** + * See [`Pallet::set_username_for`]. + */ +export interface IdentityCall_set_username_for { + __kind: 'set_username_for' + who: MultiAddress + username: Bytes + signature?: (MultiSignature | undefined) +} + +export type BoundedVec = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const HrmpCall: sts.Type = sts.closedEnum(() => { + return { + establish_system_channel: sts.enumStruct({ + sender: Id, + recipient: Id, + }), + force_clean_hrmp: sts.enumStruct({ + para: Id, + numInbound: sts.number(), + numOutbound: sts.number(), + }), + force_open_hrmp_channel: sts.enumStruct({ + sender: Id, + recipient: Id, + maxCapacity: sts.number(), + maxMessageSize: sts.number(), + }), + force_process_hrmp_close: sts.enumStruct({ + channels: sts.number(), + }), + force_process_hrmp_open: sts.enumStruct({ + channels: sts.number(), + }), + hrmp_accept_open_channel: sts.enumStruct({ + sender: Id, + }), + hrmp_cancel_open_request: sts.enumStruct({ + channelId: HrmpChannelId, + openRequests: sts.number(), + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: Id, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + poke_channel_deposits: sts.enumStruct({ + sender: Id, + recipient: Id, + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: Id, + recipient: Id, + } +}) + +export interface HrmpChannelId { + sender: Id + recipient: Id +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type HrmpCall = HrmpCall_establish_system_channel | HrmpCall_force_clean_hrmp | HrmpCall_force_open_hrmp_channel | HrmpCall_force_process_hrmp_close | HrmpCall_force_process_hrmp_open | HrmpCall_hrmp_accept_open_channel | HrmpCall_hrmp_cancel_open_request | HrmpCall_hrmp_close_channel | HrmpCall_hrmp_init_open_channel | HrmpCall_poke_channel_deposits + +/** + * See [`Pallet::establish_system_channel`]. + */ +export interface HrmpCall_establish_system_channel { + __kind: 'establish_system_channel' + sender: Id + recipient: Id +} + +/** + * See [`Pallet::force_clean_hrmp`]. + */ +export interface HrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: Id + numInbound: number + numOutbound: number +} + +/** + * See [`Pallet::force_open_hrmp_channel`]. + */ +export interface HrmpCall_force_open_hrmp_channel { + __kind: 'force_open_hrmp_channel' + sender: Id + recipient: Id + maxCapacity: number + maxMessageSize: number +} + +/** + * See [`Pallet::force_process_hrmp_close`]. + */ +export interface HrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' + channels: number +} + +/** + * See [`Pallet::force_process_hrmp_open`]. + */ +export interface HrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' + channels: number +} + +/** + * See [`Pallet::hrmp_accept_open_channel`]. + */ +export interface HrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: Id +} + +/** + * See [`Pallet::hrmp_cancel_open_request`]. + */ +export interface HrmpCall_hrmp_cancel_open_request { + __kind: 'hrmp_cancel_open_request' + channelId: HrmpChannelId + openRequests: number +} + +/** + * See [`Pallet::hrmp_close_channel`]. + */ +export interface HrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * See [`Pallet::hrmp_init_open_channel`]. + */ +export interface HrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: Id + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +/** + * See [`Pallet::poke_channel_deposits`]. + */ +export interface HrmpCall_poke_channel_deposits { + __kind: 'poke_channel_deposits' + sender: Id + recipient: Id +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: sts.number(), + bestFinalizedBlockNumber: sts.number(), + }), + report_equivocation: sts.enumStruct({ + equivocationProof: Type_142, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_142, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const Type_142: sts.Type = sts.struct(() => { + return { + setId: sts.bigint(), + equivocation: Equivocation, + } +}) + +export const Equivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: Type_150, + Prevote: Type_144, + } +}) + +export const Type_144: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Prevote, Signature]), + second: sts.tuple(() => [Prevote, Signature]), + } +}) + +export const Signature = sts.bytes() + +export const Prevote: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Prevote { + targetHash: H256 + targetNumber: number +} + +export interface Type_144 { + roundNumber: bigint + identity: Public + first: [Prevote, Signature] + second: [Prevote, Signature] +} + +export type Signature = Bytes + +export const Type_150: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Precommit, Signature]), + second: sts.tuple(() => [Precommit, Signature]), + } +}) + +export const Precommit: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Precommit { + targetHash: H256 + targetNumber: number +} + +export interface Type_150 { + roundNumber: bigint + identity: Public + first: [Precommit, Signature] + second: [Precommit, Signature] +} + +export type Equivocation = Equivocation_Precommit | Equivocation_Prevote + +export interface Equivocation_Precommit { + __kind: 'Precommit' + value: Type_150 +} + +export interface Equivocation_Prevote { + __kind: 'Prevote' + value: Type_144 +} + +export interface Type_142 { + setId: bigint + equivocation: Equivocation +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * See [`Pallet::note_stalled`]. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: number + bestFinalizedBlockNumber: number +} + +/** + * See [`Pallet::report_equivocation`]. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_142 + keyOwnerProof: MembershipProof +} + +/** + * See [`Pallet::report_equivocation_unsigned`]. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_142 + keyOwnerProof: MembershipProof +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const FellowshipReferendaCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + index: sts.number(), + }), + kill: sts.enumStruct({ + index: sts.number(), + }), + nudge_referendum: sts.enumStruct({ + index: sts.number(), + }), + one_fewer_deciding: sts.enumStruct({ + track: sts.number(), + }), + place_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_submission_deposit: sts.enumStruct({ + index: sts.number(), + }), + set_metadata: sts.enumStruct({ + index: sts.number(), + maybeHash: sts.option(() => H256), + }), + submit: sts.enumStruct({ + proposalOrigin: OriginCaller, + proposal: Bounded, + enactmentMoment: DispatchTime, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type FellowshipReferendaCall = FellowshipReferendaCall_cancel | FellowshipReferendaCall_kill | FellowshipReferendaCall_nudge_referendum | FellowshipReferendaCall_one_fewer_deciding | FellowshipReferendaCall_place_decision_deposit | FellowshipReferendaCall_refund_decision_deposit | FellowshipReferendaCall_refund_submission_deposit | FellowshipReferendaCall_set_metadata | FellowshipReferendaCall_submit + +/** + * See [`Pallet::cancel`]. + */ +export interface FellowshipReferendaCall_cancel { + __kind: 'cancel' + index: number +} + +/** + * See [`Pallet::kill`]. + */ +export interface FellowshipReferendaCall_kill { + __kind: 'kill' + index: number +} + +/** + * See [`Pallet::nudge_referendum`]. + */ +export interface FellowshipReferendaCall_nudge_referendum { + __kind: 'nudge_referendum' + index: number +} + +/** + * See [`Pallet::one_fewer_deciding`]. + */ +export interface FellowshipReferendaCall_one_fewer_deciding { + __kind: 'one_fewer_deciding' + track: number +} + +/** + * See [`Pallet::place_decision_deposit`]. + */ +export interface FellowshipReferendaCall_place_decision_deposit { + __kind: 'place_decision_deposit' + index: number +} + +/** + * See [`Pallet::refund_decision_deposit`]. + */ +export interface FellowshipReferendaCall_refund_decision_deposit { + __kind: 'refund_decision_deposit' + index: number +} + +/** + * See [`Pallet::refund_submission_deposit`]. + */ +export interface FellowshipReferendaCall_refund_submission_deposit { + __kind: 'refund_submission_deposit' + index: number +} + +/** + * See [`Pallet::set_metadata`]. + */ +export interface FellowshipReferendaCall_set_metadata { + __kind: 'set_metadata' + index: number + maybeHash?: (H256 | undefined) +} + +/** + * See [`Pallet::submit`]. + */ +export interface FellowshipReferendaCall_submit { + __kind: 'submit' + proposalOrigin: OriginCaller + proposal: Bounded + enactmentMoment: DispatchTime +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const FellowshipCollectiveCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: MultiAddress, + }), + cleanup_poll: sts.enumStruct({ + pollIndex: sts.number(), + max: sts.number(), + }), + demote_member: sts.enumStruct({ + who: MultiAddress, + }), + exchange_member: sts.enumStruct({ + who: MultiAddress, + newWho: MultiAddress, + }), + promote_member: sts.enumStruct({ + who: MultiAddress, + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + minRank: sts.number(), + }), + vote: sts.enumStruct({ + poll: sts.number(), + aye: sts.boolean(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type FellowshipCollectiveCall = FellowshipCollectiveCall_add_member | FellowshipCollectiveCall_cleanup_poll | FellowshipCollectiveCall_demote_member | FellowshipCollectiveCall_exchange_member | FellowshipCollectiveCall_promote_member | FellowshipCollectiveCall_remove_member | FellowshipCollectiveCall_vote + +/** + * See [`Pallet::add_member`]. + */ +export interface FellowshipCollectiveCall_add_member { + __kind: 'add_member' + who: MultiAddress +} + +/** + * See [`Pallet::cleanup_poll`]. + */ +export interface FellowshipCollectiveCall_cleanup_poll { + __kind: 'cleanup_poll' + pollIndex: number + max: number +} + +/** + * See [`Pallet::demote_member`]. + */ +export interface FellowshipCollectiveCall_demote_member { + __kind: 'demote_member' + who: MultiAddress +} + +/** + * See [`Pallet::exchange_member`]. + */ +export interface FellowshipCollectiveCall_exchange_member { + __kind: 'exchange_member' + who: MultiAddress + newWho: MultiAddress +} + +/** + * See [`Pallet::promote_member`]. + */ +export interface FellowshipCollectiveCall_promote_member { + __kind: 'promote_member' + who: MultiAddress +} + +/** + * See [`Pallet::remove_member`]. + */ +export interface FellowshipCollectiveCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + minRank: number +} + +/** + * See [`Pallet::vote`]. + */ +export interface FellowshipCollectiveCall_vote { + __kind: 'vote' + poll: number + aye: boolean +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const FastUnstakeCall: sts.Type = sts.closedEnum(() => { + return { + control: sts.enumStruct({ + erasToCheck: sts.number(), + }), + deregister: sts.unit(), + register_fast_unstake: sts.unit(), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type FastUnstakeCall = FastUnstakeCall_control | FastUnstakeCall_deregister | FastUnstakeCall_register_fast_unstake + +/** + * See [`Pallet::control`]. + */ +export interface FastUnstakeCall_control { + __kind: 'control' + erasToCheck: number +} + +/** + * See [`Pallet::deregister`]. + */ +export interface FastUnstakeCall_deregister { + __kind: 'deregister' +} + +/** + * See [`Pallet::register_fast_unstake`]. + */ +export interface FastUnstakeCall_register_fast_unstake { + __kind: 'register_fast_unstake' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + governance_fallback: sts.enumStruct({ + maybeMaxVoters: sts.option(() => sts.number()), + maybeMaxTargets: sts.option(() => sts.number()), + }), + set_emergency_election_result: sts.enumStruct({ + supports: sts.array(() => sts.tuple(() => [AccountId32, Support])), + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => ElectionScore), + }), + submit: sts.enumStruct({ + rawSolution: RawSolution, + }), + submit_unsigned: sts.enumStruct({ + rawSolution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export const RawSolution: sts.Type = sts.struct(() => { + return { + solution: NposCompactSolution24, + score: ElectionScore, + round: sts.number(), + } +}) + +export const NposCompactSolution24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), + votes2: sts.array(() => sts.tuple(() => [sts.number(), sts.tuple(() => [sts.number(), sts.number()]), sts.number()])), + votes3: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes4: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes5: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes6: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes7: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes8: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes9: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes10: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes11: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes12: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes13: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes14: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes15: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes16: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes17: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes18: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes19: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes20: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes21: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes22: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes23: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes24: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + } +}) + +export interface NposCompactSolution24 { + votes1: [number, number][] + votes2: [number, [number, number], number][] + votes3: [number, [number, number][], number][] + votes4: [number, [number, number][], number][] + votes5: [number, [number, number][], number][] + votes6: [number, [number, number][], number][] + votes7: [number, [number, number][], number][] + votes8: [number, [number, number][], number][] + votes9: [number, [number, number][], number][] + votes10: [number, [number, number][], number][] + votes11: [number, [number, number][], number][] + votes12: [number, [number, number][], number][] + votes13: [number, [number, number][], number][] + votes14: [number, [number, number][], number][] + votes15: [number, [number, number][], number][] + votes16: [number, [number, number][], number][] + votes17: [number, [number, number][], number][] + votes18: [number, [number, number][], number][] + votes19: [number, [number, number][], number][] + votes20: [number, [number, number][], number][] + votes21: [number, [number, number][], number][] + votes22: [number, [number, number][], number][] + votes23: [number, [number, number][], number][] + votes24: [number, [number, number][], number][] +} + +export interface RawSolution { + solution: NposCompactSolution24 + score: ElectionScore + round: number +} + +export interface ElectionScore { + minimalStake: bigint + sumStake: bigint + sumStakeSquared: bigint +} + +export const ElectionScore: sts.Type = sts.struct(() => { + return { + minimalStake: sts.bigint(), + sumStake: sts.bigint(), + sumStakeSquared: sts.bigint(), + } +}) + +export const Support: sts.Type = sts.struct(() => { + return { + total: sts.bigint(), + voters: sts.array(() => sts.tuple(() => [AccountId32, sts.bigint()])), + } +}) + +export interface Support { + total: bigint + voters: [AccountId32, bigint][] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_governance_fallback | ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * See [`Pallet::governance_fallback`]. + */ +export interface ElectionProviderMultiPhaseCall_governance_fallback { + __kind: 'governance_fallback' + maybeMaxVoters?: (number | undefined) + maybeMaxTargets?: (number | undefined) +} + +/** + * See [`Pallet::set_emergency_election_result`]. + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + supports: [AccountId32, Support][] +} + +/** + * See [`Pallet::set_minimum_untrusted_score`]. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (ElectionScore | undefined) +} + +/** + * See [`Pallet::submit`]. + */ +export interface ElectionProviderMultiPhaseCall_submit { + __kind: 'submit' + rawSolution: RawSolution +} + +/** + * See [`Pallet::submit_unsigned`]. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + rawSolution: RawSolution + witness: SolutionOrSnapshotSize +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: Id, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + contribute_all: sts.enumStruct({ + index: sts.number(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: Id, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId32, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_contribute_all | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * See [`Pallet::add_memo`]. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: Id + memo: Bytes +} + +/** + * See [`Pallet::contribute`]. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * See [`Pallet::contribute_all`]. + */ +export interface CrowdloanCall_contribute_all { + __kind: 'contribute_all' + index: number + signature?: (MultiSignature | undefined) +} + +/** + * See [`Pallet::create`]. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * See [`Pallet::dissolve`]. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * See [`Pallet::edit`]. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * See [`Pallet::poke`]. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: Id +} + +/** + * See [`Pallet::refund`]. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * See [`Pallet::withdraw`]. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId32 + index: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const CoretimeCall: sts.Type = sts.closedEnum(() => { + return { + assign_core: sts.enumStruct({ + core: sts.number(), + begin: sts.number(), + assignment: sts.array(() => sts.tuple(() => [CoreAssignment, PartsOf57600])), + endHint: sts.option(() => sts.number()), + }), + request_core_count: sts.enumStruct({ + count: sts.number(), + }), + } +}) + +export const PartsOf57600 = sts.number() + +export const CoreAssignment: sts.Type = sts.closedEnum(() => { + return { + Idle: sts.unit(), + Pool: sts.unit(), + Task: sts.number(), + } +}) + +export type CoreAssignment = CoreAssignment_Idle | CoreAssignment_Pool | CoreAssignment_Task + +export interface CoreAssignment_Idle { + __kind: 'Idle' +} + +export interface CoreAssignment_Pool { + __kind: 'Pool' +} + +export interface CoreAssignment_Task { + __kind: 'Task' + value: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type CoretimeCall = CoretimeCall_assign_core | CoretimeCall_request_core_count + +/** + * See [`Pallet::assign_core`]. + */ +export interface CoretimeCall_assign_core { + __kind: 'assign_core' + core: number + begin: number + assignment: [CoreAssignment, PartsOf57600][] + endHint?: (number | undefined) +} + +/** + * See [`Pallet::request_core_count`]. + */ +export interface CoretimeCall_request_core_count { + __kind: 'request_core_count' + count: number +} + +export type PartsOf57600 = number + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ConvictionVotingCall: sts.Type = sts.closedEnum(() => { + return { + delegate: sts.enumStruct({ + class: sts.number(), + to: MultiAddress, + conviction: Conviction, + balance: sts.bigint(), + }), + remove_other_vote: sts.enumStruct({ + target: MultiAddress, + class: sts.number(), + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + class: sts.option(() => sts.number()), + index: sts.number(), + }), + undelegate: sts.enumStruct({ + class: sts.number(), + }), + unlock: sts.enumStruct({ + class: sts.number(), + target: MultiAddress, + }), + vote: sts.enumStruct({ + pollIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + SplitAbstain: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + abstain: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type AccountVote = AccountVote_Split | AccountVote_SplitAbstain | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface AccountVote_SplitAbstain { + __kind: 'SplitAbstain' + aye: bigint + nay: bigint + abstain: bigint +} + +export interface AccountVote_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ConvictionVotingCall = ConvictionVotingCall_delegate | ConvictionVotingCall_remove_other_vote | ConvictionVotingCall_remove_vote | ConvictionVotingCall_undelegate | ConvictionVotingCall_unlock | ConvictionVotingCall_vote + +/** + * See [`Pallet::delegate`]. + */ +export interface ConvictionVotingCall_delegate { + __kind: 'delegate' + class: number + to: MultiAddress + conviction: Conviction + balance: bigint +} + +/** + * See [`Pallet::remove_other_vote`]. + */ +export interface ConvictionVotingCall_remove_other_vote { + __kind: 'remove_other_vote' + target: MultiAddress + class: number + index: number +} + +/** + * See [`Pallet::remove_vote`]. + */ +export interface ConvictionVotingCall_remove_vote { + __kind: 'remove_vote' + class?: (number | undefined) + index: number +} + +/** + * See [`Pallet::undelegate`]. + */ +export interface ConvictionVotingCall_undelegate { + __kind: 'undelegate' + class: number +} + +/** + * See [`Pallet::unlock`]. + */ +export interface ConvictionVotingCall_unlock { + __kind: 'unlock' + class: number + target: MultiAddress +} + +/** + * See [`Pallet::vote`]. + */ +export interface ConvictionVotingCall_vote { + __kind: 'vote' + pollIndex: number + vote: AccountVote +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_approval_voting_params: sts.enumStruct({ + new: ApprovalVotingParams, + }), + set_async_backing_params: sts.enumStruct({ + new: V6AsyncBackingParams, + }), + set_bypass_consistency_check: sts.enumStruct({ + new: sts.boolean(), + }), + set_code_retention_period: sts.enumStruct({ + new: sts.number(), + }), + set_coretime_cores: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: sts.number(), + }), + set_executor_params: sts.enumStruct({ + new: sts.array(() => V6ExecutorParam), + }), + set_group_rotation_frequency: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_minimum_backing_votes: sts.enumStruct({ + new: sts.number(), + }), + set_minimum_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_node_feature: sts.enumStruct({ + index: sts.number(), + value: sts.boolean(), + }), + set_on_demand_base_fee: sts.enumStruct({ + new: sts.bigint(), + }), + set_on_demand_fee_variability: sts.enumStruct({ + new: Perbill, + }), + set_on_demand_queue_max_size: sts.enumStruct({ + new: sts.number(), + }), + set_on_demand_retries: sts.enumStruct({ + new: sts.number(), + }), + set_on_demand_target_queue_utilization: sts.enumStruct({ + new: Perbill, + }), + set_on_demand_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_paras_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_pvf_voting_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_cooldown: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +export const V6ExecutorParam: sts.Type = sts.closedEnum(() => { + return { + MaxMemoryPages: sts.number(), + PrecheckingMaxMemory: sts.bigint(), + PvfExecTimeout: sts.tuple(() => [V6PvfExecKind, sts.bigint()]), + PvfPrepTimeout: sts.tuple(() => [V6PvfPrepKind, sts.bigint()]), + StackLogicalMax: sts.number(), + StackNativeMax: sts.number(), + WasmExtBulkMemory: sts.unit(), + } +}) + +export const V6PvfPrepKind: sts.Type = sts.closedEnum(() => { + return { + Precheck: sts.unit(), + Prepare: sts.unit(), + } +}) + +export type V6PvfPrepKind = V6PvfPrepKind_Precheck | V6PvfPrepKind_Prepare + +export interface V6PvfPrepKind_Precheck { + __kind: 'Precheck' +} + +export interface V6PvfPrepKind_Prepare { + __kind: 'Prepare' +} + +export const V6PvfExecKind: sts.Type = sts.closedEnum(() => { + return { + Approval: sts.unit(), + Backing: sts.unit(), + } +}) + +export type V6PvfExecKind = V6PvfExecKind_Approval | V6PvfExecKind_Backing + +export interface V6PvfExecKind_Approval { + __kind: 'Approval' +} + +export interface V6PvfExecKind_Backing { + __kind: 'Backing' +} + +export type V6ExecutorParam = V6ExecutorParam_MaxMemoryPages | V6ExecutorParam_PrecheckingMaxMemory | V6ExecutorParam_PvfExecTimeout | V6ExecutorParam_PvfPrepTimeout | V6ExecutorParam_StackLogicalMax | V6ExecutorParam_StackNativeMax | V6ExecutorParam_WasmExtBulkMemory + +export interface V6ExecutorParam_MaxMemoryPages { + __kind: 'MaxMemoryPages' + value: number +} + +export interface V6ExecutorParam_PrecheckingMaxMemory { + __kind: 'PrecheckingMaxMemory' + value: bigint +} + +export interface V6ExecutorParam_PvfExecTimeout { + __kind: 'PvfExecTimeout' + value: [V6PvfExecKind, bigint] +} + +export interface V6ExecutorParam_PvfPrepTimeout { + __kind: 'PvfPrepTimeout' + value: [V6PvfPrepKind, bigint] +} + +export interface V6ExecutorParam_StackLogicalMax { + __kind: 'StackLogicalMax' + value: number +} + +export interface V6ExecutorParam_StackNativeMax { + __kind: 'StackNativeMax' + value: number +} + +export interface V6ExecutorParam_WasmExtBulkMemory { + __kind: 'WasmExtBulkMemory' +} + +export const V6AsyncBackingParams: sts.Type = sts.struct(() => { + return { + maxCandidateDepth: sts.number(), + allowedAncestryLen: sts.number(), + } +}) + +export interface V6AsyncBackingParams { + maxCandidateDepth: number + allowedAncestryLen: number +} + +export const ApprovalVotingParams: sts.Type = sts.struct(() => { + return { + maxApprovalCoalesceCount: sts.number(), + } +}) + +export interface ApprovalVotingParams { + maxApprovalCoalesceCount: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ConfigurationCall = ConfigurationCall_set_approval_voting_params | ConfigurationCall_set_async_backing_params | ConfigurationCall_set_bypass_consistency_check | ConfigurationCall_set_code_retention_period | ConfigurationCall_set_coretime_cores | ConfigurationCall_set_dispute_period | ConfigurationCall_set_dispute_post_conclusion_acceptance_period | ConfigurationCall_set_executor_params | ConfigurationCall_set_group_rotation_frequency | ConfigurationCall_set_hrmp_channel_max_capacity | ConfigurationCall_set_hrmp_channel_max_message_size | ConfigurationCall_set_hrmp_channel_max_total_size | ConfigurationCall_set_hrmp_max_message_num_per_candidate | ConfigurationCall_set_hrmp_max_parachain_inbound_channels | ConfigurationCall_set_hrmp_max_parachain_outbound_channels | ConfigurationCall_set_hrmp_open_request_ttl | ConfigurationCall_set_hrmp_recipient_deposit | ConfigurationCall_set_hrmp_sender_deposit | ConfigurationCall_set_max_code_size | ConfigurationCall_set_max_downward_message_size | ConfigurationCall_set_max_head_data_size | ConfigurationCall_set_max_pov_size | ConfigurationCall_set_max_upward_message_num_per_candidate | ConfigurationCall_set_max_upward_message_size | ConfigurationCall_set_max_upward_queue_count | ConfigurationCall_set_max_upward_queue_size | ConfigurationCall_set_max_validators | ConfigurationCall_set_max_validators_per_core | ConfigurationCall_set_minimum_backing_votes | ConfigurationCall_set_minimum_validation_upgrade_delay | ConfigurationCall_set_n_delay_tranches | ConfigurationCall_set_needed_approvals | ConfigurationCall_set_no_show_slots | ConfigurationCall_set_node_feature | ConfigurationCall_set_on_demand_base_fee | ConfigurationCall_set_on_demand_fee_variability | ConfigurationCall_set_on_demand_queue_max_size | ConfigurationCall_set_on_demand_retries | ConfigurationCall_set_on_demand_target_queue_utilization | ConfigurationCall_set_on_demand_ttl | ConfigurationCall_set_paras_availability_period | ConfigurationCall_set_pvf_voting_ttl | ConfigurationCall_set_relay_vrf_modulo_samples | ConfigurationCall_set_scheduling_lookahead | ConfigurationCall_set_validation_upgrade_cooldown | ConfigurationCall_set_validation_upgrade_delay | ConfigurationCall_set_zeroth_delay_tranche_width + +/** + * See [`Pallet::set_approval_voting_params`]. + */ +export interface ConfigurationCall_set_approval_voting_params { + __kind: 'set_approval_voting_params' + new: ApprovalVotingParams +} + +/** + * See [`Pallet::set_async_backing_params`]. + */ +export interface ConfigurationCall_set_async_backing_params { + __kind: 'set_async_backing_params' + new: V6AsyncBackingParams +} + +/** + * See [`Pallet::set_bypass_consistency_check`]. + */ +export interface ConfigurationCall_set_bypass_consistency_check { + __kind: 'set_bypass_consistency_check' + new: boolean +} + +/** + * See [`Pallet::set_code_retention_period`]. + */ +export interface ConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: number +} + +/** + * See [`Pallet::set_coretime_cores`]. + */ +export interface ConfigurationCall_set_coretime_cores { + __kind: 'set_coretime_cores' + new: number +} + +/** + * See [`Pallet::set_dispute_period`]. + */ +export interface ConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: number +} + +/** + * See [`Pallet::set_dispute_post_conclusion_acceptance_period`]. + */ +export interface ConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: number +} + +/** + * See [`Pallet::set_executor_params`]. + */ +export interface ConfigurationCall_set_executor_params { + __kind: 'set_executor_params' + new: V6ExecutorParam[] +} + +/** + * See [`Pallet::set_group_rotation_frequency`]. + */ +export interface ConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: number +} + +/** + * See [`Pallet::set_hrmp_channel_max_capacity`]. + */ +export interface ConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * See [`Pallet::set_hrmp_channel_max_message_size`]. + */ +export interface ConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * See [`Pallet::set_hrmp_channel_max_total_size`]. + */ +export interface ConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * See [`Pallet::set_hrmp_max_message_num_per_candidate`]. + */ +export interface ConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * See [`Pallet::set_hrmp_max_parachain_inbound_channels`]. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * See [`Pallet::set_hrmp_max_parachain_outbound_channels`]. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * See [`Pallet::set_hrmp_open_request_ttl`]. + */ +export interface ConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * See [`Pallet::set_hrmp_recipient_deposit`]. + */ +export interface ConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: bigint +} + +/** + * See [`Pallet::set_hrmp_sender_deposit`]. + */ +export interface ConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: bigint +} + +/** + * See [`Pallet::set_max_code_size`]. + */ +export interface ConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * See [`Pallet::set_max_downward_message_size`]. + */ +export interface ConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * See [`Pallet::set_max_head_data_size`]. + */ +export interface ConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * See [`Pallet::set_max_pov_size`]. + */ +export interface ConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * See [`Pallet::set_max_upward_message_num_per_candidate`]. + */ +export interface ConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * See [`Pallet::set_max_upward_message_size`]. + */ +export interface ConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * See [`Pallet::set_max_upward_queue_count`]. + */ +export interface ConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * See [`Pallet::set_max_upward_queue_size`]. + */ +export interface ConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * See [`Pallet::set_max_validators`]. + */ +export interface ConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * See [`Pallet::set_max_validators_per_core`]. + */ +export interface ConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * See [`Pallet::set_minimum_backing_votes`]. + */ +export interface ConfigurationCall_set_minimum_backing_votes { + __kind: 'set_minimum_backing_votes' + new: number +} + +/** + * See [`Pallet::set_minimum_validation_upgrade_delay`]. + */ +export interface ConfigurationCall_set_minimum_validation_upgrade_delay { + __kind: 'set_minimum_validation_upgrade_delay' + new: number +} + +/** + * See [`Pallet::set_n_delay_tranches`]. + */ +export interface ConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * See [`Pallet::set_needed_approvals`]. + */ +export interface ConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * See [`Pallet::set_no_show_slots`]. + */ +export interface ConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * See [`Pallet::set_node_feature`]. + */ +export interface ConfigurationCall_set_node_feature { + __kind: 'set_node_feature' + index: number + value: boolean +} + +/** + * See [`Pallet::set_on_demand_base_fee`]. + */ +export interface ConfigurationCall_set_on_demand_base_fee { + __kind: 'set_on_demand_base_fee' + new: bigint +} + +/** + * See [`Pallet::set_on_demand_fee_variability`]. + */ +export interface ConfigurationCall_set_on_demand_fee_variability { + __kind: 'set_on_demand_fee_variability' + new: Perbill +} + +/** + * See [`Pallet::set_on_demand_queue_max_size`]. + */ +export interface ConfigurationCall_set_on_demand_queue_max_size { + __kind: 'set_on_demand_queue_max_size' + new: number +} + +/** + * See [`Pallet::set_on_demand_retries`]. + */ +export interface ConfigurationCall_set_on_demand_retries { + __kind: 'set_on_demand_retries' + new: number +} + +/** + * See [`Pallet::set_on_demand_target_queue_utilization`]. + */ +export interface ConfigurationCall_set_on_demand_target_queue_utilization { + __kind: 'set_on_demand_target_queue_utilization' + new: Perbill +} + +/** + * See [`Pallet::set_on_demand_ttl`]. + */ +export interface ConfigurationCall_set_on_demand_ttl { + __kind: 'set_on_demand_ttl' + new: number +} + +/** + * See [`Pallet::set_paras_availability_period`]. + */ +export interface ConfigurationCall_set_paras_availability_period { + __kind: 'set_paras_availability_period' + new: number +} + +/** + * See [`Pallet::set_pvf_voting_ttl`]. + */ +export interface ConfigurationCall_set_pvf_voting_ttl { + __kind: 'set_pvf_voting_ttl' + new: number +} + +/** + * See [`Pallet::set_relay_vrf_modulo_samples`]. + */ +export interface ConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * See [`Pallet::set_scheduling_lookahead`]. + */ +export interface ConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * See [`Pallet::set_validation_upgrade_cooldown`]. + */ +export interface ConfigurationCall_set_validation_upgrade_cooldown { + __kind: 'set_validation_upgrade_cooldown' + new: number +} + +/** + * See [`Pallet::set_validation_upgrade_delay`]. + */ +export interface ConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: number +} + +/** + * See [`Pallet::set_zeroth_delay_tranche_width`]. + */ +export interface ConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: sts.bigint(), + vestingSchedule: sts.option(() => sts.tuple(() => [sts.bigint(), sts.bigint(), sts.number()])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId32), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * See [`Pallet::attest`]. + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * See [`Pallet::claim`]. + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId32 + ethereumSignature: EcdsaSignature +} + +/** + * See [`Pallet::claim_attest`]. + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId32 + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * See [`Pallet::mint_claim`]. + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: bigint + vestingSchedule?: ([bigint, bigint, number] | undefined) + statement?: (StatementKind | undefined) +} + +/** + * See [`Pallet::move_claim`]. + */ +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId32 | undefined) +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ChildBountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + add_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + value: sts.bigint(), + description: sts.bytes(), + }), + award_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + close_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + propose_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ChildBountiesCall = ChildBountiesCall_accept_curator | ChildBountiesCall_add_child_bounty | ChildBountiesCall_award_child_bounty | ChildBountiesCall_claim_child_bounty | ChildBountiesCall_close_child_bounty | ChildBountiesCall_propose_curator | ChildBountiesCall_unassign_curator + +/** + * See [`Pallet::accept_curator`]. + */ +export interface ChildBountiesCall_accept_curator { + __kind: 'accept_curator' + parentBountyId: number + childBountyId: number +} + +/** + * See [`Pallet::add_child_bounty`]. + */ +export interface ChildBountiesCall_add_child_bounty { + __kind: 'add_child_bounty' + parentBountyId: number + value: bigint + description: Bytes +} + +/** + * See [`Pallet::award_child_bounty`]. + */ +export interface ChildBountiesCall_award_child_bounty { + __kind: 'award_child_bounty' + parentBountyId: number + childBountyId: number + beneficiary: MultiAddress +} + +/** + * See [`Pallet::claim_child_bounty`]. + */ +export interface ChildBountiesCall_claim_child_bounty { + __kind: 'claim_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * See [`Pallet::close_child_bounty`]. + */ +export interface ChildBountiesCall_close_child_bounty { + __kind: 'close_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * See [`Pallet::propose_curator`]. + */ +export interface ChildBountiesCall_propose_curator { + __kind: 'propose_curator' + parentBountyId: number + childBountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * See [`Pallet::unassign_curator`]. + */ +export interface ChildBountiesCall_unassign_curator { + __kind: 'unassign_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * See [`Pallet::accept_curator`]. + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * See [`Pallet::approve_bounty`]. + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * See [`Pallet::award_bounty`]. + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: MultiAddress +} + +/** + * See [`Pallet::claim_bounty`]. + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * See [`Pallet::close_bounty`]. + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * See [`Pallet::extend_bounty_expiry`]. + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * See [`Pallet::propose_bounty`]. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * See [`Pallet::propose_curator`]. + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * See [`Pallet::unassign_curator`]. + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const BeefyCall: sts.Type = sts.closedEnum(() => { + return { + report_equivocation: sts.enumStruct({ + equivocationProof: Type_499, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_499, + keyOwnerProof: MembershipProof, + }), + set_new_genesis: sts.enumStruct({ + delayInBlocks: sts.number(), + }), + } +}) + +export const Type_499: sts.Type = sts.struct(() => { + return { + first: VoteMessage, + second: VoteMessage, + } +}) + +export const VoteMessage: sts.Type = sts.struct(() => { + return { + commitment: Commitment, + id: sts.bytes(), + signature: sts.bytes(), + } +}) + +export const Commitment: sts.Type = sts.struct(() => { + return { + payload: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + blockNumber: sts.number(), + validatorSetId: sts.bigint(), + } +}) + +export interface Commitment { + payload: [Bytes, Bytes][] + blockNumber: number + validatorSetId: bigint +} + +export interface VoteMessage { + commitment: Commitment + id: Bytes + signature: Bytes +} + +export interface Type_499 { + first: VoteMessage + second: VoteMessage +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type BeefyCall = BeefyCall_report_equivocation | BeefyCall_report_equivocation_unsigned | BeefyCall_set_new_genesis + +/** + * See [`Pallet::report_equivocation`]. + */ +export interface BeefyCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_499 + keyOwnerProof: MembershipProof +} + +/** + * See [`Pallet::report_equivocation_unsigned`]. + */ +export interface BeefyCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_499 + keyOwnerProof: MembershipProof +} + +/** + * See [`Pallet::set_new_genesis`]. + */ +export interface BeefyCall_set_new_genesis { + __kind: 'set_new_genesis' + delayInBlocks: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_adjust_total_issuance: sts.enumStruct({ + direction: AdjustmentDirection, + delta: sts.bigint(), + }), + force_set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + }), + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_allow_death: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + upgrade_accounts: sts.enumStruct({ + who: sts.array(() => AccountId32), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type BalancesCall = BalancesCall_force_adjust_total_issuance | BalancesCall_force_set_balance | BalancesCall_force_transfer | BalancesCall_force_unreserve | BalancesCall_transfer_all | BalancesCall_transfer_allow_death | BalancesCall_transfer_keep_alive | BalancesCall_upgrade_accounts + +/** + * See [`Pallet::force_adjust_total_issuance`]. + */ +export interface BalancesCall_force_adjust_total_issuance { + __kind: 'force_adjust_total_issuance' + direction: AdjustmentDirection + delta: bigint +} + +/** + * See [`Pallet::force_set_balance`]. + */ +export interface BalancesCall_force_set_balance { + __kind: 'force_set_balance' + who: MultiAddress + newFree: bigint +} + +/** + * See [`Pallet::force_transfer`]. + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::force_unreserve`]. + */ +export interface BalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * See [`Pallet::transfer_all`]. + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * See [`Pallet::transfer_allow_death`]. + */ +export interface BalancesCall_transfer_allow_death { + __kind: 'transfer_allow_death' + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::transfer_keep_alive`]. + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::upgrade_accounts`]. + */ +export interface BalancesCall_upgrade_accounts { + __kind: 'upgrade_accounts' + who: AccountId32[] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const EquivocationProof: sts.Type = sts.struct(() => { + return { + offender: sts.bytes(), + slot: Slot, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Slot = sts.bigint() + +export interface EquivocationProof { + offender: Bytes + slot: Slot + firstHeader: Header + secondHeader: Header +} + +export type Slot = bigint + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V1: sts.enumStruct({ + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + }), + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type NextConfigDescriptor = NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * See [`Pallet::plan_config_change`]. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * See [`Pallet::report_equivocation`]. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * See [`Pallet::report_equivocation_unsigned`]. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * See [`Pallet::bid`]. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * See [`Pallet::cancel_auction`]. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * See [`Pallet::new_auction`]. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const AssetRateCall: sts.Type = sts.closedEnum(() => { + return { + create: sts.enumStruct({ + assetKind: VersionedLocatableAsset, + rate: FixedU128, + }), + remove: sts.enumStruct({ + assetKind: VersionedLocatableAsset, + }), + update: sts.enumStruct({ + assetKind: VersionedLocatableAsset, + rate: FixedU128, + }), + } +}) + +export const FixedU128 = sts.bigint() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type AssetRateCall = AssetRateCall_create | AssetRateCall_remove | AssetRateCall_update + +/** + * See [`Pallet::create`]. + */ +export interface AssetRateCall_create { + __kind: 'create' + assetKind: VersionedLocatableAsset + rate: FixedU128 +} + +/** + * See [`Pallet::remove`]. + */ +export interface AssetRateCall_remove { + __kind: 'remove' + assetKind: VersionedLocatableAsset +} + +/** + * See [`Pallet::update`]. + */ +export interface AssetRateCall_update { + __kind: 'update' + assetKind: VersionedLocatableAsset + rate: FixedU128 +} + +export type FixedU128 = bigint + +export type Call = Call_AssetRate | Call_Auctions | Call_Babe | Call_Balances | Call_Beefy | Call_Bounties | Call_ChildBounties | Call_Claims | Call_Configuration | Call_ConvictionVoting | Call_Coretime | Call_Crowdloan | Call_ElectionProviderMultiPhase | Call_FastUnstake | Call_FellowshipCollective | Call_FellowshipReferenda | Call_Grandpa | Call_Hrmp | Call_Identity | Call_IdentityMigrator | Call_Indices | Call_Initializer | Call_MessageQueue | Call_Multisig | Call_Nis | Call_NisCounterpartBalances | Call_NominationPools | Call_OnDemandAssignmentProvider | Call_ParaInclusion | Call_ParaInherent | Call_Paras | Call_ParasDisputes | Call_ParasShared | Call_ParasSlashing | Call_Preimage | Call_Proxy | Call_Recovery | Call_Referenda | Call_Registrar | Call_Scheduler | Call_Session | Call_Slots | Call_Society | Call_Staking | Call_System | Call_Timestamp | Call_Treasury | Call_Utility | Call_Vesting | Call_VoterList | Call_Whitelist | Call_XcmPallet + +export interface Call_AssetRate { + __kind: 'AssetRate' + value: AssetRateCall +} + +export interface Call_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Call_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Call_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Call_Beefy { + __kind: 'Beefy' + value: BeefyCall +} + +export interface Call_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Call_ChildBounties { + __kind: 'ChildBounties' + value: ChildBountiesCall +} + +export interface Call_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Call_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Call_ConvictionVoting { + __kind: 'ConvictionVoting' + value: ConvictionVotingCall +} + +export interface Call_Coretime { + __kind: 'Coretime' + value: CoretimeCall +} + +export interface Call_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Call_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Call_FastUnstake { + __kind: 'FastUnstake' + value: FastUnstakeCall +} + +export interface Call_FellowshipCollective { + __kind: 'FellowshipCollective' + value: FellowshipCollectiveCall +} + +export interface Call_FellowshipReferenda { + __kind: 'FellowshipReferenda' + value: FellowshipReferendaCall +} + +export interface Call_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Call_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Call_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Call_IdentityMigrator { + __kind: 'IdentityMigrator' + value: IdentityMigratorCall +} + +export interface Call_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Call_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Call_MessageQueue { + __kind: 'MessageQueue' + value: MessageQueueCall +} + +export interface Call_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Call_Nis { + __kind: 'Nis' + value: NisCall +} + +export interface Call_NisCounterpartBalances { + __kind: 'NisCounterpartBalances' + value: NisCounterpartBalancesCall +} + +export interface Call_NominationPools { + __kind: 'NominationPools' + value: NominationPoolsCall +} + +export interface Call_OnDemandAssignmentProvider { + __kind: 'OnDemandAssignmentProvider' + value: OnDemandAssignmentProviderCall +} + +export interface Call_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Call_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Call_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Call_ParasDisputes { + __kind: 'ParasDisputes' + value: ParasDisputesCall +} + +export interface Call_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Call_ParasSlashing { + __kind: 'ParasSlashing' + value: ParasSlashingCall +} + +export interface Call_Preimage { + __kind: 'Preimage' + value: PreimageCall +} + +export interface Call_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Call_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Call_Referenda { + __kind: 'Referenda' + value: ReferendaCall +} + +export interface Call_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Call_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Call_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Call_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Call_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Call_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Call_System { + __kind: 'System' + value: SystemCall +} + +export interface Call_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Call_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Call_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Call_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Call_VoterList { + __kind: 'VoterList' + value: VoterListCall +} + +export interface Call_Whitelist { + __kind: 'Whitelist' + value: WhitelistCall +} + +export interface Call_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NominationPools: sts.unit(), + NonTransfer: sts.unit(), + Society: sts.unit(), + Staking: sts.unit(), + } +}) + +export const MultiAddress: sts.Type = sts.closedEnum(() => { + return { + Address20: sts.bytes(), + Address32: sts.bytes(), + Id: AccountId32, + Index: sts.unit(), + Raw: sts.bytes(), + } +}) diff --git a/squid/src/types/v1002005.ts b/squid/src/types/v1002005.ts new file mode 100644 index 00000000..9d880750 --- /dev/null +++ b/squid/src/types/v1002005.ts @@ -0,0 +1,12264 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Weight: sts.Type = sts.struct(() => { + return { + refTime: sts.bigint(), + proofSize: sts.bigint(), + } +}) + +export interface Weight { + refTime: bigint + proofSize: bigint +} + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: sts.number(), + index: sts.number(), + } +}) + +export interface Timepoint { + height: number + index: number +} + +export const AccountId32 = sts.bytes() + +export const Call: sts.Type = sts.closedEnum(() => { + return { + AssetRate: AssetRateCall, + Auctions: AuctionsCall, + Babe: BabeCall, + Balances: BalancesCall, + Beefy: BeefyCall, + Bounties: BountiesCall, + ChildBounties: ChildBountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + ConvictionVoting: ConvictionVotingCall, + Coretime: CoretimeCall, + Crowdloan: CrowdloanCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + FastUnstake: FastUnstakeCall, + FellowshipCollective: FellowshipCollectiveCall, + FellowshipReferenda: FellowshipReferendaCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Identity: IdentityCall, + IdentityMigrator: IdentityMigratorCall, + Indices: IndicesCall, + Initializer: InitializerCall, + MessageQueue: MessageQueueCall, + Multisig: MultisigCall, + Nis: NisCall, + NisCounterpartBalances: NisCounterpartBalancesCall, + NominationPools: NominationPoolsCall, + OnDemandAssignmentProvider: OnDemandAssignmentProviderCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Paras: ParasCall, + ParasDisputes: ParasDisputesCall, + ParasShared: ParasSharedCall, + ParasSlashing: ParasSlashingCall, + Preimage: PreimageCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Referenda: ReferendaCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + Timestamp: TimestampCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + VoterList: VoterListCall, + Whitelist: WhitelistCall, + XcmPallet: XcmPalletCall, + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + claim_assets: sts.enumStruct({ + assets: VersionedAssets, + beneficiary: VersionedLocation, + }), + execute: sts.enumStruct({ + message: Type_480, + maxWeight: Weight, + }), + force_default_xcm_version: sts.enumStruct({ + maybeXcmVersion: sts.option(() => sts.number()), + }), + force_subscribe_version_notify: sts.enumStruct({ + location: VersionedLocation, + }), + force_suspension: sts.enumStruct({ + suspended: sts.boolean(), + }), + force_unsubscribe_version_notify: sts.enumStruct({ + location: VersionedLocation, + }), + force_xcm_version: sts.enumStruct({ + location: V4Location, + version: sts.number(), + }), + limited_reserve_transfer_assets: sts.enumStruct({ + dest: VersionedLocation, + beneficiary: VersionedLocation, + assets: VersionedAssets, + feeAssetItem: sts.number(), + weightLimit: V3WeightLimit, + }), + limited_teleport_assets: sts.enumStruct({ + dest: VersionedLocation, + beneficiary: VersionedLocation, + assets: VersionedAssets, + feeAssetItem: sts.number(), + weightLimit: V3WeightLimit, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: VersionedLocation, + beneficiary: VersionedLocation, + assets: VersionedAssets, + feeAssetItem: sts.number(), + }), + send: sts.enumStruct({ + dest: VersionedLocation, + message: VersionedXcm, + }), + teleport_assets: sts.enumStruct({ + dest: VersionedLocation, + beneficiary: VersionedLocation, + assets: VersionedAssets, + feeAssetItem: sts.number(), + }), + transfer_assets: sts.enumStruct({ + dest: VersionedLocation, + beneficiary: VersionedLocation, + assets: VersionedAssets, + feeAssetItem: sts.number(), + weightLimit: V3WeightLimit, + }), + transfer_assets_using_type_and_then: sts.enumStruct({ + dest: VersionedLocation, + assets: VersionedAssets, + assetsTransferType: TransferType, + remoteFeesId: VersionedAssetId, + feesTransferType: TransferType, + customXcmOnDest: VersionedXcm, + weightLimit: V3WeightLimit, + }), + } +}) + +export const VersionedAssetId: sts.Type = sts.closedEnum(() => { + return { + V3: V3AssetId, + V4: V4AssetId, + } +}) + +export const V4AssetId: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V4Junctions, + } +}) + +export const V4Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: sts.array(() => V4Junction), + X2: sts.array(() => V4Junction), + X3: sts.array(() => V4Junction), + X4: sts.array(() => V4Junction), + X5: sts.array(() => V4Junction), + X6: sts.array(() => V4Junction), + X7: sts.array(() => V4Junction), + X8: sts.array(() => V4Junction), + } +}) + +export const V4Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: sts.option(() => V4NetworkId), + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: sts.option(() => V4NetworkId), + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: sts.option(() => V4NetworkId), + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.enumStruct({ + length: sts.number(), + data: sts.bytes(), + }), + GlobalConsensus: V4NetworkId, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V3BodyId, + part: V3BodyPart, + }), + } +}) + +export const V3BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export type V3BodyPart = V3BodyPart_AtLeastProportion | V3BodyPart_Fraction | V3BodyPart_Members | V3BodyPart_MoreThanProportion | V3BodyPart_Voice + +export interface V3BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V3BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V3BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V3BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V3BodyPart_Voice { + __kind: 'Voice' +} + +export const V3BodyId: sts.Type = sts.closedEnum(() => { + return { + Administration: sts.unit(), + Defense: sts.unit(), + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Moniker: sts.bytes(), + Technical: sts.unit(), + Treasury: sts.unit(), + Unit: sts.unit(), + } +}) + +export type V3BodyId = V3BodyId_Administration | V3BodyId_Defense | V3BodyId_Executive | V3BodyId_Index | V3BodyId_Judicial | V3BodyId_Legislative | V3BodyId_Moniker | V3BodyId_Technical | V3BodyId_Treasury | V3BodyId_Unit + +export interface V3BodyId_Administration { + __kind: 'Administration' +} + +export interface V3BodyId_Defense { + __kind: 'Defense' +} + +export interface V3BodyId_Executive { + __kind: 'Executive' +} + +export interface V3BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V3BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V3BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V3BodyId_Moniker { + __kind: 'Moniker' + value: Bytes +} + +export interface V3BodyId_Technical { + __kind: 'Technical' +} + +export interface V3BodyId_Treasury { + __kind: 'Treasury' +} + +export interface V3BodyId_Unit { + __kind: 'Unit' +} + +export const V4NetworkId: sts.Type = sts.closedEnum(() => { + return { + BitcoinCash: sts.unit(), + BitcoinCore: sts.unit(), + ByFork: sts.enumStruct({ + blockNumber: sts.bigint(), + blockHash: sts.bytes(), + }), + ByGenesis: sts.bytes(), + Ethereum: sts.enumStruct({ + chainId: sts.bigint(), + }), + Kusama: sts.unit(), + Polkadot: sts.unit(), + PolkadotBulletin: sts.unit(), + Rococo: sts.unit(), + Westend: sts.unit(), + Wococo: sts.unit(), + } +}) + +export type V4NetworkId = V4NetworkId_BitcoinCash | V4NetworkId_BitcoinCore | V4NetworkId_ByFork | V4NetworkId_ByGenesis | V4NetworkId_Ethereum | V4NetworkId_Kusama | V4NetworkId_Polkadot | V4NetworkId_PolkadotBulletin | V4NetworkId_Rococo | V4NetworkId_Westend | V4NetworkId_Wococo + +export interface V4NetworkId_BitcoinCash { + __kind: 'BitcoinCash' +} + +export interface V4NetworkId_BitcoinCore { + __kind: 'BitcoinCore' +} + +export interface V4NetworkId_ByFork { + __kind: 'ByFork' + blockNumber: bigint + blockHash: Bytes +} + +export interface V4NetworkId_ByGenesis { + __kind: 'ByGenesis' + value: Bytes +} + +export interface V4NetworkId_Ethereum { + __kind: 'Ethereum' + chainId: bigint +} + +export interface V4NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V4NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export interface V4NetworkId_PolkadotBulletin { + __kind: 'PolkadotBulletin' +} + +export interface V4NetworkId_Rococo { + __kind: 'Rococo' +} + +export interface V4NetworkId_Westend { + __kind: 'Westend' +} + +export interface V4NetworkId_Wococo { + __kind: 'Wococo' +} + +export type V4Junction = V4Junction_AccountId32 | V4Junction_AccountIndex64 | V4Junction_AccountKey20 | V4Junction_GeneralIndex | V4Junction_GeneralKey | V4Junction_GlobalConsensus | V4Junction_OnlyChild | V4Junction_PalletInstance | V4Junction_Parachain | V4Junction_Plurality + +export interface V4Junction_AccountId32 { + __kind: 'AccountId32' + network?: (V4NetworkId | undefined) + id: Bytes +} + +export interface V4Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network?: (V4NetworkId | undefined) + index: bigint +} + +export interface V4Junction_AccountKey20 { + __kind: 'AccountKey20' + network?: (V4NetworkId | undefined) + key: Bytes +} + +export interface V4Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V4Junction_GeneralKey { + __kind: 'GeneralKey' + length: number + data: Bytes +} + +export interface V4Junction_GlobalConsensus { + __kind: 'GlobalConsensus' + value: V4NetworkId +} + +export interface V4Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V4Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V4Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V4Junction_Plurality { + __kind: 'Plurality' + id: V3BodyId + part: V3BodyPart +} + +export type V4Junctions = V4Junctions_Here | V4Junctions_X1 | V4Junctions_X2 | V4Junctions_X3 | V4Junctions_X4 | V4Junctions_X5 | V4Junctions_X6 | V4Junctions_X7 | V4Junctions_X8 + +export interface V4Junctions_Here { + __kind: 'Here' +} + +export interface V4Junctions_X1 { + __kind: 'X1' + value: V4Junction[] +} + +export interface V4Junctions_X2 { + __kind: 'X2' + value: V4Junction[] +} + +export interface V4Junctions_X3 { + __kind: 'X3' + value: V4Junction[] +} + +export interface V4Junctions_X4 { + __kind: 'X4' + value: V4Junction[] +} + +export interface V4Junctions_X5 { + __kind: 'X5' + value: V4Junction[] +} + +export interface V4Junctions_X6 { + __kind: 'X6' + value: V4Junction[] +} + +export interface V4Junctions_X7 { + __kind: 'X7' + value: V4Junction[] +} + +export interface V4Junctions_X8 { + __kind: 'X8' + value: V4Junction[] +} + +export interface V4AssetId { + parents: number + interior: V4Junctions +} + +export const V3AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V3MultiLocation, + } +}) + +export const V3MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V3Junctions, + } +}) + +export const V3Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V3Junction, + X2: sts.tuple(() => [V3Junction, V3Junction]), + X3: sts.tuple(() => [V3Junction, V3Junction, V3Junction]), + X4: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction]), + X5: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + X6: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + X7: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + X8: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + } +}) + +export const V3Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: sts.option(() => V3NetworkId), + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: sts.option(() => V3NetworkId), + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: sts.option(() => V3NetworkId), + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.enumStruct({ + length: sts.number(), + data: sts.bytes(), + }), + GlobalConsensus: V3NetworkId, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V3BodyId, + part: V3BodyPart, + }), + } +}) + +export const V3NetworkId: sts.Type = sts.closedEnum(() => { + return { + BitcoinCash: sts.unit(), + BitcoinCore: sts.unit(), + ByFork: sts.enumStruct({ + blockNumber: sts.bigint(), + blockHash: sts.bytes(), + }), + ByGenesis: sts.bytes(), + Ethereum: sts.enumStruct({ + chainId: sts.bigint(), + }), + Kusama: sts.unit(), + Polkadot: sts.unit(), + PolkadotBulletin: sts.unit(), + Rococo: sts.unit(), + Westend: sts.unit(), + Wococo: sts.unit(), + } +}) + +export type V3NetworkId = V3NetworkId_BitcoinCash | V3NetworkId_BitcoinCore | V3NetworkId_ByFork | V3NetworkId_ByGenesis | V3NetworkId_Ethereum | V3NetworkId_Kusama | V3NetworkId_Polkadot | V3NetworkId_PolkadotBulletin | V3NetworkId_Rococo | V3NetworkId_Westend | V3NetworkId_Wococo + +export interface V3NetworkId_BitcoinCash { + __kind: 'BitcoinCash' +} + +export interface V3NetworkId_BitcoinCore { + __kind: 'BitcoinCore' +} + +export interface V3NetworkId_ByFork { + __kind: 'ByFork' + blockNumber: bigint + blockHash: Bytes +} + +export interface V3NetworkId_ByGenesis { + __kind: 'ByGenesis' + value: Bytes +} + +export interface V3NetworkId_Ethereum { + __kind: 'Ethereum' + chainId: bigint +} + +export interface V3NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V3NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export interface V3NetworkId_PolkadotBulletin { + __kind: 'PolkadotBulletin' +} + +export interface V3NetworkId_Rococo { + __kind: 'Rococo' +} + +export interface V3NetworkId_Westend { + __kind: 'Westend' +} + +export interface V3NetworkId_Wococo { + __kind: 'Wococo' +} + +export type V3Junction = V3Junction_AccountId32 | V3Junction_AccountIndex64 | V3Junction_AccountKey20 | V3Junction_GeneralIndex | V3Junction_GeneralKey | V3Junction_GlobalConsensus | V3Junction_OnlyChild | V3Junction_PalletInstance | V3Junction_Parachain | V3Junction_Plurality + +export interface V3Junction_AccountId32 { + __kind: 'AccountId32' + network?: (V3NetworkId | undefined) + id: Bytes +} + +export interface V3Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network?: (V3NetworkId | undefined) + index: bigint +} + +export interface V3Junction_AccountKey20 { + __kind: 'AccountKey20' + network?: (V3NetworkId | undefined) + key: Bytes +} + +export interface V3Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V3Junction_GeneralKey { + __kind: 'GeneralKey' + length: number + data: Bytes +} + +export interface V3Junction_GlobalConsensus { + __kind: 'GlobalConsensus' + value: V3NetworkId +} + +export interface V3Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V3Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V3Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V3Junction_Plurality { + __kind: 'Plurality' + id: V3BodyId + part: V3BodyPart +} + +export type V3Junctions = V3Junctions_Here | V3Junctions_X1 | V3Junctions_X2 | V3Junctions_X3 | V3Junctions_X4 | V3Junctions_X5 | V3Junctions_X6 | V3Junctions_X7 | V3Junctions_X8 + +export interface V3Junctions_Here { + __kind: 'Here' +} + +export interface V3Junctions_X1 { + __kind: 'X1' + value: V3Junction +} + +export interface V3Junctions_X2 { + __kind: 'X2' + value: [V3Junction, V3Junction] +} + +export interface V3Junctions_X3 { + __kind: 'X3' + value: [V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X4 { + __kind: 'X4' + value: [V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X5 { + __kind: 'X5' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X6 { + __kind: 'X6' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X7 { + __kind: 'X7' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X8 { + __kind: 'X8' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3MultiLocation { + parents: number + interior: V3Junctions +} + +export type V3AssetId = V3AssetId_Abstract | V3AssetId_Concrete + +export interface V3AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V3AssetId_Concrete { + __kind: 'Concrete' + value: V3MultiLocation +} + +export type VersionedAssetId = VersionedAssetId_V3 | VersionedAssetId_V4 + +export interface VersionedAssetId_V3 { + __kind: 'V3' + value: V3AssetId +} + +export interface VersionedAssetId_V4 { + __kind: 'V4' + value: V4AssetId +} + +export const TransferType: sts.Type = sts.closedEnum(() => { + return { + DestinationReserve: sts.unit(), + LocalReserve: sts.unit(), + RemoteReserve: VersionedLocation, + Teleport: sts.unit(), + } +}) + +export type TransferType = TransferType_DestinationReserve | TransferType_LocalReserve | TransferType_RemoteReserve | TransferType_Teleport + +export interface TransferType_DestinationReserve { + __kind: 'DestinationReserve' +} + +export interface TransferType_LocalReserve { + __kind: 'LocalReserve' +} + +export interface TransferType_RemoteReserve { + __kind: 'RemoteReserve' + value: VersionedLocation +} + +export interface TransferType_Teleport { + __kind: 'Teleport' +} + +export type VersionedLocation = VersionedLocation_V2 | VersionedLocation_V3 | VersionedLocation_V4 + +export interface VersionedLocation_V2 { + __kind: 'V2' + value: V2MultiLocation +} + +export interface VersionedLocation_V3 { + __kind: 'V3' + value: V3MultiLocation +} + +export interface VersionedLocation_V4 { + __kind: 'V4' + value: V4Location +} + +export interface V4Location { + parents: number + interior: V4Junctions +} + +export interface V2MultiLocation { + parents: number + interior: V2Junctions +} + +export type V2Junctions = V2Junctions_Here | V2Junctions_X1 | V2Junctions_X2 | V2Junctions_X3 | V2Junctions_X4 | V2Junctions_X5 | V2Junctions_X6 | V2Junctions_X7 | V2Junctions_X8 + +export interface V2Junctions_Here { + __kind: 'Here' +} + +export interface V2Junctions_X1 { + __kind: 'X1' + value: V2Junction +} + +export interface V2Junctions_X2 { + __kind: 'X2' + value: [V2Junction, V2Junction] +} + +export interface V2Junctions_X3 { + __kind: 'X3' + value: [V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X4 { + __kind: 'X4' + value: [V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X5 { + __kind: 'X5' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X6 { + __kind: 'X6' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X7 { + __kind: 'X7' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X8 { + __kind: 'X8' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export type V2Junction = V2Junction_AccountId32 | V2Junction_AccountIndex64 | V2Junction_AccountKey20 | V2Junction_GeneralIndex | V2Junction_GeneralKey | V2Junction_OnlyChild | V2Junction_PalletInstance | V2Junction_Parachain | V2Junction_Plurality + +export interface V2Junction_AccountId32 { + __kind: 'AccountId32' + network: V2NetworkId + id: Bytes +} + +export interface V2Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V2NetworkId + index: bigint +} + +export interface V2Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V2NetworkId + key: Bytes +} + +export interface V2Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V2Junction_GeneralKey { + __kind: 'GeneralKey' + value: WeakBoundedVec +} + +export interface V2Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V2Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V2Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V2Junction_Plurality { + __kind: 'Plurality' + id: V2BodyId + part: V2BodyPart +} + +export type V2BodyPart = V2BodyPart_AtLeastProportion | V2BodyPart_Fraction | V2BodyPart_Members | V2BodyPart_MoreThanProportion | V2BodyPart_Voice + +export interface V2BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V2BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V2BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V2BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V2BodyPart_Voice { + __kind: 'Voice' +} + +export type V2BodyId = V2BodyId_Administration | V2BodyId_Defense | V2BodyId_Executive | V2BodyId_Index | V2BodyId_Judicial | V2BodyId_Legislative | V2BodyId_Named | V2BodyId_Technical | V2BodyId_Treasury | V2BodyId_Unit + +export interface V2BodyId_Administration { + __kind: 'Administration' +} + +export interface V2BodyId_Defense { + __kind: 'Defense' +} + +export interface V2BodyId_Executive { + __kind: 'Executive' +} + +export interface V2BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V2BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V2BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V2BodyId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V2BodyId_Technical { + __kind: 'Technical' +} + +export interface V2BodyId_Treasury { + __kind: 'Treasury' +} + +export interface V2BodyId_Unit { + __kind: 'Unit' +} + +export type WeakBoundedVec = Bytes + +export type V2NetworkId = V2NetworkId_Any | V2NetworkId_Kusama | V2NetworkId_Named | V2NetworkId_Polkadot + +export interface V2NetworkId_Any { + __kind: 'Any' +} + +export interface V2NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V2NetworkId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V2NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export const VersionedXcm: sts.Type = sts.closedEnum(() => { + return { + V2: sts.array(() => V2Instruction), + V3: sts.array(() => V3Instruction), + V4: sts.array(() => V4Instruction), + } +}) + +export const V4Instruction: sts.Type = sts.closedEnum(() => { + return { + AliasOrigin: V4Location, + BurnAsset: sts.array(() => V4Asset), + BuyExecution: sts.enumStruct({ + fees: V4Asset, + weightLimit: V3WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V4Asset), + ticket: V4Location, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + ClearTopic: sts.unit(), + ClearTransactStatus: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V4AssetFilter, + beneficiary: V4Location, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V4AssetFilter, + dest: V4Location, + xcm: sts.array(() => V4Instruction), + }), + DescendOrigin: V4Junctions, + ExchangeAsset: sts.enumStruct({ + give: V4AssetFilter, + want: sts.array(() => V4Asset), + maximal: sts.boolean(), + }), + ExpectAsset: sts.array(() => V4Asset), + ExpectError: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + ExpectOrigin: sts.option(() => V4Location), + ExpectPallet: sts.enumStruct({ + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + crateMajor: sts.number(), + minCrateMinor: sts.number(), + }), + ExpectTransactStatus: V3MaybeErrorCode, + ExportMessage: sts.enumStruct({ + network: V4NetworkId, + destination: V4Junctions, + xcm: sts.array(() => V4Instruction), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V4AssetFilter, + reserve: V4Location, + xcm: sts.array(() => V4Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V4AssetFilter, + dest: V4Location, + xcm: sts.array(() => V4Instruction), + }), + LockAsset: sts.enumStruct({ + asset: V4Asset, + unlocker: V4Location, + }), + NoteUnlockable: sts.enumStruct({ + asset: V4Asset, + owner: V4Location, + }), + QueryPallet: sts.enumStruct({ + moduleName: sts.bytes(), + responseInfo: V4QueryResponseInfo, + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V4Response, + maxWeight: Weight, + querier: sts.option(() => V4Location), + }), + ReceiveTeleportedAsset: sts.array(() => V4Asset), + RefundSurplus: sts.unit(), + ReportError: V4QueryResponseInfo, + ReportHolding: sts.enumStruct({ + responseInfo: V4QueryResponseInfo, + assets: V4AssetFilter, + }), + ReportTransactStatus: V4QueryResponseInfo, + RequestUnlock: sts.enumStruct({ + asset: V4Asset, + locker: V4Location, + }), + ReserveAssetDeposited: sts.array(() => V4Asset), + SetAppendix: sts.array(() => V4Instruction), + SetErrorHandler: sts.array(() => V4Instruction), + SetFeesMode: sts.enumStruct({ + jitWithdraw: sts.boolean(), + }), + SetTopic: sts.bytes(), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: Weight, + }), + Transact: sts.enumStruct({ + originKind: V2OriginKind, + requireWeightAtMost: Weight, + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V4Asset), + beneficiary: V4Location, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V4Asset), + dest: V4Location, + xcm: sts.array(() => V4Instruction), + }), + Trap: sts.bigint(), + UniversalOrigin: V4Junction, + UnlockAsset: sts.enumStruct({ + asset: V4Asset, + target: V4Location, + }), + UnpaidExecution: sts.enumStruct({ + weightLimit: V3WeightLimit, + checkOrigin: sts.option(() => V4Location), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V4Asset), + } +}) + +export const DoubleEncoded: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncoded { + encoded: Bytes +} + +export const V2OriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type V2OriginKind = V2OriginKind_Native | V2OriginKind_SovereignAccount | V2OriginKind_Superuser | V2OriginKind_Xcm + +export interface V2OriginKind_Native { + __kind: 'Native' +} + +export interface V2OriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface V2OriginKind_Superuser { + __kind: 'Superuser' +} + +export interface V2OriginKind_Xcm { + __kind: 'Xcm' +} + +export const V4Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V4Asset), + DispatchResult: V3MaybeErrorCode, + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + Null: sts.unit(), + PalletsInfo: sts.array(() => V4PalletInfo), + Version: sts.number(), + } +}) + +export const V4PalletInfo: sts.Type = sts.struct(() => { + return { + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + major: sts.number(), + minor: sts.number(), + patch: sts.number(), + } +}) + +export interface V4PalletInfo { + index: number + name: Bytes + moduleName: Bytes + major: number + minor: number + patch: number +} + +export type V4Response = V4Response_Assets | V4Response_DispatchResult | V4Response_ExecutionResult | V4Response_Null | V4Response_PalletsInfo | V4Response_Version + +export interface V4Response_Assets { + __kind: 'Assets' + value: V4Asset[] +} + +export interface V4Response_DispatchResult { + __kind: 'DispatchResult' + value: V3MaybeErrorCode +} + +export interface V4Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V3Error] | undefined) +} + +export interface V4Response_Null { + __kind: 'Null' +} + +export interface V4Response_PalletsInfo { + __kind: 'PalletsInfo' + value: V4PalletInfo[] +} + +export interface V4Response_Version { + __kind: 'Version' + value: number +} + +export type V3Error = V3Error_AssetNotFound | V3Error_BadOrigin | V3Error_Barrier | V3Error_DestinationUnsupported | V3Error_ExceedsMaxMessageSize | V3Error_ExceedsStackLimit | V3Error_ExpectationFalse | V3Error_ExportError | V3Error_FailedToDecode | V3Error_FailedToTransactAsset | V3Error_FeesNotMet | V3Error_HoldingWouldOverflow | V3Error_InvalidLocation | V3Error_LocationCannotHold | V3Error_LocationFull | V3Error_LocationNotInvertible | V3Error_LockError | V3Error_MaxWeightInvalid | V3Error_NameMismatch | V3Error_NoDeal | V3Error_NoPermission | V3Error_NotDepositable | V3Error_NotHoldingFees | V3Error_NotWithdrawable | V3Error_Overflow | V3Error_PalletNotFound | V3Error_ReanchorFailed | V3Error_TooExpensive | V3Error_Transport | V3Error_Trap | V3Error_Unanchored | V3Error_UnhandledXcmVersion | V3Error_Unimplemented | V3Error_UnknownClaim | V3Error_Unroutable | V3Error_UntrustedReserveLocation | V3Error_UntrustedTeleportLocation | V3Error_VersionIncompatible | V3Error_WeightLimitReached | V3Error_WeightNotComputable + +export interface V3Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V3Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V3Error_Barrier { + __kind: 'Barrier' +} + +export interface V3Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V3Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V3Error_ExceedsStackLimit { + __kind: 'ExceedsStackLimit' +} + +export interface V3Error_ExpectationFalse { + __kind: 'ExpectationFalse' +} + +export interface V3Error_ExportError { + __kind: 'ExportError' +} + +export interface V3Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V3Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V3Error_FeesNotMet { + __kind: 'FeesNotMet' +} + +export interface V3Error_HoldingWouldOverflow { + __kind: 'HoldingWouldOverflow' +} + +export interface V3Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V3Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V3Error_LocationFull { + __kind: 'LocationFull' +} + +export interface V3Error_LocationNotInvertible { + __kind: 'LocationNotInvertible' +} + +export interface V3Error_LockError { + __kind: 'LockError' +} + +export interface V3Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V3Error_NameMismatch { + __kind: 'NameMismatch' +} + +export interface V3Error_NoDeal { + __kind: 'NoDeal' +} + +export interface V3Error_NoPermission { + __kind: 'NoPermission' +} + +export interface V3Error_NotDepositable { + __kind: 'NotDepositable' +} + +export interface V3Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V3Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V3Error_Overflow { + __kind: 'Overflow' +} + +export interface V3Error_PalletNotFound { + __kind: 'PalletNotFound' +} + +export interface V3Error_ReanchorFailed { + __kind: 'ReanchorFailed' +} + +export interface V3Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V3Error_Transport { + __kind: 'Transport' +} + +export interface V3Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V3Error_Unanchored { + __kind: 'Unanchored' +} + +export interface V3Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V3Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V3Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V3Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V3Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V3Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V3Error_VersionIncompatible { + __kind: 'VersionIncompatible' +} + +export interface V3Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: Weight +} + +export interface V3Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V3MaybeErrorCode = V3MaybeErrorCode_Error | V3MaybeErrorCode_Success | V3MaybeErrorCode_TruncatedError + +export interface V3MaybeErrorCode_Error { + __kind: 'Error' + value: Bytes +} + +export interface V3MaybeErrorCode_Success { + __kind: 'Success' +} + +export interface V3MaybeErrorCode_TruncatedError { + __kind: 'TruncatedError' + value: Bytes +} + +export interface V4Asset { + id: V4AssetId + fun: V4Fungibility +} + +export type V4Fungibility = V4Fungibility_Fungible | V4Fungibility_NonFungible + +export interface V4Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V4Fungibility_NonFungible { + __kind: 'NonFungible' + value: V4AssetInstance +} + +export type V4AssetInstance = V4AssetInstance_Array16 | V4AssetInstance_Array32 | V4AssetInstance_Array4 | V4AssetInstance_Array8 | V4AssetInstance_Index | V4AssetInstance_Undefined + +export interface V4AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V4AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V4AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V4AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V4AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V4AssetInstance_Undefined { + __kind: 'Undefined' +} + +export const V4QueryResponseInfo: sts.Type = sts.struct(() => { + return { + destination: V4Location, + queryId: sts.bigint(), + maxWeight: Weight, + } +}) + +export interface V4QueryResponseInfo { + destination: V4Location + queryId: bigint + maxWeight: Weight +} + +export const V3MaybeErrorCode: sts.Type = sts.closedEnum(() => { + return { + Error: sts.bytes(), + Success: sts.unit(), + TruncatedError: sts.bytes(), + } +}) + +export const V3Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + ExceedsStackLimit: sts.unit(), + ExpectationFalse: sts.unit(), + ExportError: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + FeesNotMet: sts.unit(), + HoldingWouldOverflow: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + LocationFull: sts.unit(), + LocationNotInvertible: sts.unit(), + LockError: sts.unit(), + MaxWeightInvalid: sts.unit(), + NameMismatch: sts.unit(), + NoDeal: sts.unit(), + NoPermission: sts.unit(), + NotDepositable: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + PalletNotFound: sts.unit(), + ReanchorFailed: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + Unanchored: sts.unit(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + VersionIncompatible: sts.unit(), + WeightLimitReached: Weight, + WeightNotComputable: sts.unit(), + } +}) + +export const V4AssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V4Asset), + Wild: V4WildAsset, + } +}) + +export const V4WildAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllCounted: sts.number(), + AllOf: sts.enumStruct({ + id: V4AssetId, + fun: V4WildFungibility, + }), + AllOfCounted: sts.enumStruct({ + id: V4AssetId, + fun: V4WildFungibility, + count: sts.number(), + }), + } +}) + +export const V4WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V4WildFungibility = V4WildFungibility_Fungible | V4WildFungibility_NonFungible + +export interface V4WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V4WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export type V4WildAsset = V4WildAsset_All | V4WildAsset_AllCounted | V4WildAsset_AllOf | V4WildAsset_AllOfCounted + +export interface V4WildAsset_All { + __kind: 'All' +} + +export interface V4WildAsset_AllCounted { + __kind: 'AllCounted' + value: number +} + +export interface V4WildAsset_AllOf { + __kind: 'AllOf' + id: V4AssetId + fun: V4WildFungibility +} + +export interface V4WildAsset_AllOfCounted { + __kind: 'AllOfCounted' + id: V4AssetId + fun: V4WildFungibility + count: number +} + +export type V4AssetFilter = V4AssetFilter_Definite | V4AssetFilter_Wild + +export interface V4AssetFilter_Definite { + __kind: 'Definite' + value: V4Asset[] +} + +export interface V4AssetFilter_Wild { + __kind: 'Wild' + value: V4WildAsset +} + +export const V4Asset: sts.Type = sts.struct(() => { + return { + id: V4AssetId, + fun: V4Fungibility, + } +}) + +export const V4Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V4AssetInstance, + } +}) + +export const V4AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V4Instruction = V4Instruction_AliasOrigin | V4Instruction_BurnAsset | V4Instruction_BuyExecution | V4Instruction_ClaimAsset | V4Instruction_ClearError | V4Instruction_ClearOrigin | V4Instruction_ClearTopic | V4Instruction_ClearTransactStatus | V4Instruction_DepositAsset | V4Instruction_DepositReserveAsset | V4Instruction_DescendOrigin | V4Instruction_ExchangeAsset | V4Instruction_ExpectAsset | V4Instruction_ExpectError | V4Instruction_ExpectOrigin | V4Instruction_ExpectPallet | V4Instruction_ExpectTransactStatus | V4Instruction_ExportMessage | V4Instruction_HrmpChannelAccepted | V4Instruction_HrmpChannelClosing | V4Instruction_HrmpNewChannelOpenRequest | V4Instruction_InitiateReserveWithdraw | V4Instruction_InitiateTeleport | V4Instruction_LockAsset | V4Instruction_NoteUnlockable | V4Instruction_QueryPallet | V4Instruction_QueryResponse | V4Instruction_ReceiveTeleportedAsset | V4Instruction_RefundSurplus | V4Instruction_ReportError | V4Instruction_ReportHolding | V4Instruction_ReportTransactStatus | V4Instruction_RequestUnlock | V4Instruction_ReserveAssetDeposited | V4Instruction_SetAppendix | V4Instruction_SetErrorHandler | V4Instruction_SetFeesMode | V4Instruction_SetTopic | V4Instruction_SubscribeVersion | V4Instruction_Transact | V4Instruction_TransferAsset | V4Instruction_TransferReserveAsset | V4Instruction_Trap | V4Instruction_UniversalOrigin | V4Instruction_UnlockAsset | V4Instruction_UnpaidExecution | V4Instruction_UnsubscribeVersion | V4Instruction_WithdrawAsset + +export interface V4Instruction_AliasOrigin { + __kind: 'AliasOrigin' + value: V4Location +} + +export interface V4Instruction_BurnAsset { + __kind: 'BurnAsset' + value: V4Asset[] +} + +export interface V4Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V4Asset + weightLimit: V3WeightLimit +} + +export interface V4Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V4Asset[] + ticket: V4Location +} + +export interface V4Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V4Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V4Instruction_ClearTopic { + __kind: 'ClearTopic' +} + +export interface V4Instruction_ClearTransactStatus { + __kind: 'ClearTransactStatus' +} + +export interface V4Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V4AssetFilter + beneficiary: V4Location +} + +export interface V4Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V4AssetFilter + dest: V4Location + xcm: V4Instruction[] +} + +export interface V4Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V4Junctions +} + +export interface V4Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V4AssetFilter + want: V4Asset[] + maximal: boolean +} + +export interface V4Instruction_ExpectAsset { + __kind: 'ExpectAsset' + value: V4Asset[] +} + +export interface V4Instruction_ExpectError { + __kind: 'ExpectError' + value?: ([number, V3Error] | undefined) +} + +export interface V4Instruction_ExpectOrigin { + __kind: 'ExpectOrigin' + value?: (V4Location | undefined) +} + +export interface V4Instruction_ExpectPallet { + __kind: 'ExpectPallet' + index: number + name: Bytes + moduleName: Bytes + crateMajor: number + minCrateMinor: number +} + +export interface V4Instruction_ExpectTransactStatus { + __kind: 'ExpectTransactStatus' + value: V3MaybeErrorCode +} + +export interface V4Instruction_ExportMessage { + __kind: 'ExportMessage' + network: V4NetworkId + destination: V4Junctions + xcm: V4Instruction[] +} + +export interface V4Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V4Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V4Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V4Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V4AssetFilter + reserve: V4Location + xcm: V4Instruction[] +} + +export interface V4Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V4AssetFilter + dest: V4Location + xcm: V4Instruction[] +} + +export interface V4Instruction_LockAsset { + __kind: 'LockAsset' + asset: V4Asset + unlocker: V4Location +} + +export interface V4Instruction_NoteUnlockable { + __kind: 'NoteUnlockable' + asset: V4Asset + owner: V4Location +} + +export interface V4Instruction_QueryPallet { + __kind: 'QueryPallet' + moduleName: Bytes + responseInfo: V4QueryResponseInfo +} + +export interface V4Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V4Response + maxWeight: Weight + querier?: (V4Location | undefined) +} + +export interface V4Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V4Asset[] +} + +export interface V4Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V4Instruction_ReportError { + __kind: 'ReportError' + value: V4QueryResponseInfo +} + +export interface V4Instruction_ReportHolding { + __kind: 'ReportHolding' + responseInfo: V4QueryResponseInfo + assets: V4AssetFilter +} + +export interface V4Instruction_ReportTransactStatus { + __kind: 'ReportTransactStatus' + value: V4QueryResponseInfo +} + +export interface V4Instruction_RequestUnlock { + __kind: 'RequestUnlock' + asset: V4Asset + locker: V4Location +} + +export interface V4Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V4Asset[] +} + +export interface V4Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V4Instruction[] +} + +export interface V4Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V4Instruction[] +} + +export interface V4Instruction_SetFeesMode { + __kind: 'SetFeesMode' + jitWithdraw: boolean +} + +export interface V4Instruction_SetTopic { + __kind: 'SetTopic' + value: Bytes +} + +export interface V4Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: Weight +} + +export interface V4Instruction_Transact { + __kind: 'Transact' + originKind: V2OriginKind + requireWeightAtMost: Weight + call: DoubleEncoded +} + +export interface V4Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V4Asset[] + beneficiary: V4Location +} + +export interface V4Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V4Asset[] + dest: V4Location + xcm: V4Instruction[] +} + +export interface V4Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V4Instruction_UniversalOrigin { + __kind: 'UniversalOrigin' + value: V4Junction +} + +export interface V4Instruction_UnlockAsset { + __kind: 'UnlockAsset' + asset: V4Asset + target: V4Location +} + +export interface V4Instruction_UnpaidExecution { + __kind: 'UnpaidExecution' + weightLimit: V3WeightLimit + checkOrigin?: (V4Location | undefined) +} + +export interface V4Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V4Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V4Asset[] +} + +export type V3WeightLimit = V3WeightLimit_Limited | V3WeightLimit_Unlimited + +export interface V3WeightLimit_Limited { + __kind: 'Limited' + value: Weight +} + +export interface V3WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V3Instruction: sts.Type = sts.closedEnum(() => { + return { + AliasOrigin: V3MultiLocation, + BurnAsset: sts.array(() => V3MultiAsset), + BuyExecution: sts.enumStruct({ + fees: V3MultiAsset, + weightLimit: V3WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + ticket: V3MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + ClearTopic: sts.unit(), + ClearTransactStatus: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + beneficiary: V3MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + DescendOrigin: V3Junctions, + ExchangeAsset: sts.enumStruct({ + give: V3MultiAssetFilter, + want: sts.array(() => V3MultiAsset), + maximal: sts.boolean(), + }), + ExpectAsset: sts.array(() => V3MultiAsset), + ExpectError: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + ExpectOrigin: sts.option(() => V3MultiLocation), + ExpectPallet: sts.enumStruct({ + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + crateMajor: sts.number(), + minCrateMinor: sts.number(), + }), + ExpectTransactStatus: V3MaybeErrorCode, + ExportMessage: sts.enumStruct({ + network: V3NetworkId, + destination: V3Junctions, + xcm: sts.array(() => V3Instruction), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V3MultiAssetFilter, + reserve: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + LockAsset: sts.enumStruct({ + asset: V3MultiAsset, + unlocker: V3MultiLocation, + }), + NoteUnlockable: sts.enumStruct({ + asset: V3MultiAsset, + owner: V3MultiLocation, + }), + QueryPallet: sts.enumStruct({ + moduleName: sts.bytes(), + responseInfo: V3QueryResponseInfo, + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V3Response, + maxWeight: Weight, + querier: sts.option(() => V3MultiLocation), + }), + ReceiveTeleportedAsset: sts.array(() => V3MultiAsset), + RefundSurplus: sts.unit(), + ReportError: V3QueryResponseInfo, + ReportHolding: sts.enumStruct({ + responseInfo: V3QueryResponseInfo, + assets: V3MultiAssetFilter, + }), + ReportTransactStatus: V3QueryResponseInfo, + RequestUnlock: sts.enumStruct({ + asset: V3MultiAsset, + locker: V3MultiLocation, + }), + ReserveAssetDeposited: sts.array(() => V3MultiAsset), + SetAppendix: sts.array(() => V3Instruction), + SetErrorHandler: sts.array(() => V3Instruction), + SetFeesMode: sts.enumStruct({ + jitWithdraw: sts.boolean(), + }), + SetTopic: sts.bytes(), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: Weight, + }), + Transact: sts.enumStruct({ + originKind: V2OriginKind, + requireWeightAtMost: Weight, + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + beneficiary: V3MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + Trap: sts.bigint(), + UniversalOrigin: V3Junction, + UnlockAsset: sts.enumStruct({ + asset: V3MultiAsset, + target: V3MultiLocation, + }), + UnpaidExecution: sts.enumStruct({ + weightLimit: V3WeightLimit, + checkOrigin: sts.option(() => V3MultiLocation), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V3MultiAsset), + } +}) + +export const V3Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V3MultiAsset), + DispatchResult: V3MaybeErrorCode, + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + Null: sts.unit(), + PalletsInfo: sts.array(() => V3PalletInfo), + Version: sts.number(), + } +}) + +export const V3PalletInfo: sts.Type = sts.struct(() => { + return { + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + major: sts.number(), + minor: sts.number(), + patch: sts.number(), + } +}) + +export interface V3PalletInfo { + index: number + name: Bytes + moduleName: Bytes + major: number + minor: number + patch: number +} + +export type V3Response = V3Response_Assets | V3Response_DispatchResult | V3Response_ExecutionResult | V3Response_Null | V3Response_PalletsInfo | V3Response_Version + +export interface V3Response_Assets { + __kind: 'Assets' + value: V3MultiAsset[] +} + +export interface V3Response_DispatchResult { + __kind: 'DispatchResult' + value: V3MaybeErrorCode +} + +export interface V3Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V3Error] | undefined) +} + +export interface V3Response_Null { + __kind: 'Null' +} + +export interface V3Response_PalletsInfo { + __kind: 'PalletsInfo' + value: V3PalletInfo[] +} + +export interface V3Response_Version { + __kind: 'Version' + value: number +} + +export interface V3MultiAsset { + id: V3AssetId + fun: V3Fungibility +} + +export type V3Fungibility = V3Fungibility_Fungible | V3Fungibility_NonFungible + +export interface V3Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V3Fungibility_NonFungible { + __kind: 'NonFungible' + value: V3AssetInstance +} + +export type V3AssetInstance = V3AssetInstance_Array16 | V3AssetInstance_Array32 | V3AssetInstance_Array4 | V3AssetInstance_Array8 | V3AssetInstance_Index | V3AssetInstance_Undefined + +export interface V3AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V3AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V3AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V3AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V3AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V3AssetInstance_Undefined { + __kind: 'Undefined' +} + +export const V3QueryResponseInfo: sts.Type = sts.struct(() => { + return { + destination: V3MultiLocation, + queryId: sts.bigint(), + maxWeight: Weight, + } +}) + +export interface V3QueryResponseInfo { + destination: V3MultiLocation + queryId: bigint + maxWeight: Weight +} + +export const V3MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V3MultiAsset), + Wild: V3WildMultiAsset, + } +}) + +export const V3WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllCounted: sts.number(), + AllOf: sts.enumStruct({ + id: V3AssetId, + fun: V3WildFungibility, + }), + AllOfCounted: sts.enumStruct({ + id: V3AssetId, + fun: V3WildFungibility, + count: sts.number(), + }), + } +}) + +export const V3WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V3WildFungibility = V3WildFungibility_Fungible | V3WildFungibility_NonFungible + +export interface V3WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V3WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export type V3WildMultiAsset = V3WildMultiAsset_All | V3WildMultiAsset_AllCounted | V3WildMultiAsset_AllOf | V3WildMultiAsset_AllOfCounted + +export interface V3WildMultiAsset_All { + __kind: 'All' +} + +export interface V3WildMultiAsset_AllCounted { + __kind: 'AllCounted' + value: number +} + +export interface V3WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V3AssetId + fun: V3WildFungibility +} + +export interface V3WildMultiAsset_AllOfCounted { + __kind: 'AllOfCounted' + id: V3AssetId + fun: V3WildFungibility + count: number +} + +export type V3MultiAssetFilter = V3MultiAssetFilter_Definite | V3MultiAssetFilter_Wild + +export interface V3MultiAssetFilter_Definite { + __kind: 'Definite' + value: V3MultiAsset[] +} + +export interface V3MultiAssetFilter_Wild { + __kind: 'Wild' + value: V3WildMultiAsset +} + +export const V3MultiAsset: sts.Type = sts.struct(() => { + return { + id: V3AssetId, + fun: V3Fungibility, + } +}) + +export const V3Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V3AssetInstance, + } +}) + +export const V3AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V3Instruction = V3Instruction_AliasOrigin | V3Instruction_BurnAsset | V3Instruction_BuyExecution | V3Instruction_ClaimAsset | V3Instruction_ClearError | V3Instruction_ClearOrigin | V3Instruction_ClearTopic | V3Instruction_ClearTransactStatus | V3Instruction_DepositAsset | V3Instruction_DepositReserveAsset | V3Instruction_DescendOrigin | V3Instruction_ExchangeAsset | V3Instruction_ExpectAsset | V3Instruction_ExpectError | V3Instruction_ExpectOrigin | V3Instruction_ExpectPallet | V3Instruction_ExpectTransactStatus | V3Instruction_ExportMessage | V3Instruction_HrmpChannelAccepted | V3Instruction_HrmpChannelClosing | V3Instruction_HrmpNewChannelOpenRequest | V3Instruction_InitiateReserveWithdraw | V3Instruction_InitiateTeleport | V3Instruction_LockAsset | V3Instruction_NoteUnlockable | V3Instruction_QueryPallet | V3Instruction_QueryResponse | V3Instruction_ReceiveTeleportedAsset | V3Instruction_RefundSurplus | V3Instruction_ReportError | V3Instruction_ReportHolding | V3Instruction_ReportTransactStatus | V3Instruction_RequestUnlock | V3Instruction_ReserveAssetDeposited | V3Instruction_SetAppendix | V3Instruction_SetErrorHandler | V3Instruction_SetFeesMode | V3Instruction_SetTopic | V3Instruction_SubscribeVersion | V3Instruction_Transact | V3Instruction_TransferAsset | V3Instruction_TransferReserveAsset | V3Instruction_Trap | V3Instruction_UniversalOrigin | V3Instruction_UnlockAsset | V3Instruction_UnpaidExecution | V3Instruction_UnsubscribeVersion | V3Instruction_WithdrawAsset + +export interface V3Instruction_AliasOrigin { + __kind: 'AliasOrigin' + value: V3MultiLocation +} + +export interface V3Instruction_BurnAsset { + __kind: 'BurnAsset' + value: V3MultiAsset[] +} + +export interface V3Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V3MultiAsset + weightLimit: V3WeightLimit +} + +export interface V3Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V3MultiAsset[] + ticket: V3MultiLocation +} + +export interface V3Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V3Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V3Instruction_ClearTopic { + __kind: 'ClearTopic' +} + +export interface V3Instruction_ClearTransactStatus { + __kind: 'ClearTransactStatus' +} + +export interface V3Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V3MultiAssetFilter + beneficiary: V3MultiLocation +} + +export interface V3Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V3Junctions +} + +export interface V3Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V3MultiAssetFilter + want: V3MultiAsset[] + maximal: boolean +} + +export interface V3Instruction_ExpectAsset { + __kind: 'ExpectAsset' + value: V3MultiAsset[] +} + +export interface V3Instruction_ExpectError { + __kind: 'ExpectError' + value?: ([number, V3Error] | undefined) +} + +export interface V3Instruction_ExpectOrigin { + __kind: 'ExpectOrigin' + value?: (V3MultiLocation | undefined) +} + +export interface V3Instruction_ExpectPallet { + __kind: 'ExpectPallet' + index: number + name: Bytes + moduleName: Bytes + crateMajor: number + minCrateMinor: number +} + +export interface V3Instruction_ExpectTransactStatus { + __kind: 'ExpectTransactStatus' + value: V3MaybeErrorCode +} + +export interface V3Instruction_ExportMessage { + __kind: 'ExportMessage' + network: V3NetworkId + destination: V3Junctions + xcm: V3Instruction[] +} + +export interface V3Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V3Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V3Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V3Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V3MultiAssetFilter + reserve: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_LockAsset { + __kind: 'LockAsset' + asset: V3MultiAsset + unlocker: V3MultiLocation +} + +export interface V3Instruction_NoteUnlockable { + __kind: 'NoteUnlockable' + asset: V3MultiAsset + owner: V3MultiLocation +} + +export interface V3Instruction_QueryPallet { + __kind: 'QueryPallet' + moduleName: Bytes + responseInfo: V3QueryResponseInfo +} + +export interface V3Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V3Response + maxWeight: Weight + querier?: (V3MultiLocation | undefined) +} + +export interface V3Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V3MultiAsset[] +} + +export interface V3Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V3Instruction_ReportError { + __kind: 'ReportError' + value: V3QueryResponseInfo +} + +export interface V3Instruction_ReportHolding { + __kind: 'ReportHolding' + responseInfo: V3QueryResponseInfo + assets: V3MultiAssetFilter +} + +export interface V3Instruction_ReportTransactStatus { + __kind: 'ReportTransactStatus' + value: V3QueryResponseInfo +} + +export interface V3Instruction_RequestUnlock { + __kind: 'RequestUnlock' + asset: V3MultiAsset + locker: V3MultiLocation +} + +export interface V3Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V3MultiAsset[] +} + +export interface V3Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V3Instruction[] +} + +export interface V3Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V3Instruction[] +} + +export interface V3Instruction_SetFeesMode { + __kind: 'SetFeesMode' + jitWithdraw: boolean +} + +export interface V3Instruction_SetTopic { + __kind: 'SetTopic' + value: Bytes +} + +export interface V3Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: Weight +} + +export interface V3Instruction_Transact { + __kind: 'Transact' + originKind: V2OriginKind + requireWeightAtMost: Weight + call: DoubleEncoded +} + +export interface V3Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V3MultiAsset[] + beneficiary: V3MultiLocation +} + +export interface V3Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V3MultiAsset[] + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V3Instruction_UniversalOrigin { + __kind: 'UniversalOrigin' + value: V3Junction +} + +export interface V3Instruction_UnlockAsset { + __kind: 'UnlockAsset' + asset: V3MultiAsset + target: V3MultiLocation +} + +export interface V3Instruction_UnpaidExecution { + __kind: 'UnpaidExecution' + weightLimit: V3WeightLimit + checkOrigin?: (V3MultiLocation | undefined) +} + +export interface V3Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V3Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V3MultiAsset[] +} + +export const V2Instruction: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V2MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + ticket: V2MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V2MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V2Junctions, + ExchangeAsset: sts.enumStruct({ + give: V2MultiAssetFilter, + receive: sts.array(() => V2MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V2MultiAssetFilter, + reserve: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V2MultiAssetFilter, + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + assets: V2MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V2MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V2MultiAsset), + SetAppendix: sts.array(() => V2Instruction), + SetErrorHandler: sts.array(() => V2Instruction), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V2OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + beneficiary: V2MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V2MultiAsset), + } +}) + +export const V2Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V2MultiAsset), + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V2Error])), + Null: sts.unit(), + Version: sts.number(), + } +}) + +export const V2Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + MaxWeightInvalid: sts.unit(), + MultiLocationFull: sts.unit(), + MultiLocationNotInvertible: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + WeightLimitReached: sts.bigint(), + WeightNotComputable: sts.unit(), + } +}) + +export type V2Error = V2Error_AssetNotFound | V2Error_BadOrigin | V2Error_Barrier | V2Error_DestinationUnsupported | V2Error_ExceedsMaxMessageSize | V2Error_FailedToDecode | V2Error_FailedToTransactAsset | V2Error_InvalidLocation | V2Error_LocationCannotHold | V2Error_MaxWeightInvalid | V2Error_MultiLocationFull | V2Error_MultiLocationNotInvertible | V2Error_NotHoldingFees | V2Error_NotWithdrawable | V2Error_Overflow | V2Error_TooExpensive | V2Error_Transport | V2Error_Trap | V2Error_UnhandledXcmVersion | V2Error_Unimplemented | V2Error_UnknownClaim | V2Error_Unroutable | V2Error_UntrustedReserveLocation | V2Error_UntrustedTeleportLocation | V2Error_WeightLimitReached | V2Error_WeightNotComputable + +export interface V2Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V2Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V2Error_Barrier { + __kind: 'Barrier' +} + +export interface V2Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V2Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V2Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V2Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V2Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V2Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V2Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V2Error_MultiLocationFull { + __kind: 'MultiLocationFull' +} + +export interface V2Error_MultiLocationNotInvertible { + __kind: 'MultiLocationNotInvertible' +} + +export interface V2Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V2Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V2Error_Overflow { + __kind: 'Overflow' +} + +export interface V2Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V2Error_Transport { + __kind: 'Transport' +} + +export interface V2Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V2Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V2Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V2Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V2Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V2Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V2Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: bigint +} + +export interface V2Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V2Response = V2Response_Assets | V2Response_ExecutionResult | V2Response_Null | V2Response_Version + +export interface V2Response_Assets { + __kind: 'Assets' + value: V2MultiAsset[] +} + +export interface V2Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V2Error] | undefined) +} + +export interface V2Response_Null { + __kind: 'Null' +} + +export interface V2Response_Version { + __kind: 'Version' + value: number +} + +export interface V2MultiAsset { + id: V2AssetId + fun: V2Fungibility +} + +export type V2Fungibility = V2Fungibility_Fungible | V2Fungibility_NonFungible + +export interface V2Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V2Fungibility_NonFungible { + __kind: 'NonFungible' + value: V2AssetInstance +} + +export type V2AssetInstance = V2AssetInstance_Array16 | V2AssetInstance_Array32 | V2AssetInstance_Array4 | V2AssetInstance_Array8 | V2AssetInstance_Blob | V2AssetInstance_Index | V2AssetInstance_Undefined + +export interface V2AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V2AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V2AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V2AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V2AssetInstance_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface V2AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V2AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V2AssetId = V2AssetId_Abstract | V2AssetId_Concrete + +export interface V2AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V2AssetId_Concrete { + __kind: 'Concrete' + value: V2MultiLocation +} + +export const V2Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V2Junction, + X2: sts.tuple(() => [V2Junction, V2Junction]), + X3: sts.tuple(() => [V2Junction, V2Junction, V2Junction]), + X4: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction]), + X5: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + X6: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + X7: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + X8: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + } +}) + +export const V2Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V2NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V2NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V2NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: WeakBoundedVec, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V2BodyId, + part: V2BodyPart, + }), + } +}) + +export const V2BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export const V2BodyId: sts.Type = sts.closedEnum(() => { + return { + Administration: sts.unit(), + Defense: sts.unit(), + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: WeakBoundedVec, + Technical: sts.unit(), + Treasury: sts.unit(), + Unit: sts.unit(), + } +}) + +export const WeakBoundedVec = sts.bytes() + +export const V2NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: WeakBoundedVec, + Polkadot: sts.unit(), + } +}) + +export const V2MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V2MultiAsset), + Wild: V2WildMultiAsset, + } +}) + +export const V2WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllOf: sts.enumStruct({ + id: V2AssetId, + fun: V2WildFungibility, + }), + } +}) + +export const V2WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V2WildFungibility = V2WildFungibility_Fungible | V2WildFungibility_NonFungible + +export interface V2WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V2WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V2AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V2MultiLocation, + } +}) + +export type V2WildMultiAsset = V2WildMultiAsset_All | V2WildMultiAsset_AllOf + +export interface V2WildMultiAsset_All { + __kind: 'All' +} + +export interface V2WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V2AssetId + fun: V2WildFungibility +} + +export type V2MultiAssetFilter = V2MultiAssetFilter_Definite | V2MultiAssetFilter_Wild + +export interface V2MultiAssetFilter_Definite { + __kind: 'Definite' + value: V2MultiAsset[] +} + +export interface V2MultiAssetFilter_Wild { + __kind: 'Wild' + value: V2WildMultiAsset +} + +export const V2MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V2Junctions, + } +}) + +export const V2WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: sts.bigint(), + Unlimited: sts.unit(), + } +}) + +export type V2WeightLimit = V2WeightLimit_Limited | V2WeightLimit_Unlimited + +export interface V2WeightLimit_Limited { + __kind: 'Limited' + value: bigint +} + +export interface V2WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V2MultiAsset: sts.Type = sts.struct(() => { + return { + id: V2AssetId, + fun: V2Fungibility, + } +}) + +export const V2Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V2AssetInstance, + } +}) + +export const V2AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V2Instruction = V2Instruction_BuyExecution | V2Instruction_ClaimAsset | V2Instruction_ClearError | V2Instruction_ClearOrigin | V2Instruction_DepositAsset | V2Instruction_DepositReserveAsset | V2Instruction_DescendOrigin | V2Instruction_ExchangeAsset | V2Instruction_HrmpChannelAccepted | V2Instruction_HrmpChannelClosing | V2Instruction_HrmpNewChannelOpenRequest | V2Instruction_InitiateReserveWithdraw | V2Instruction_InitiateTeleport | V2Instruction_QueryHolding | V2Instruction_QueryResponse | V2Instruction_ReceiveTeleportedAsset | V2Instruction_RefundSurplus | V2Instruction_ReportError | V2Instruction_ReserveAssetDeposited | V2Instruction_SetAppendix | V2Instruction_SetErrorHandler | V2Instruction_SubscribeVersion | V2Instruction_Transact | V2Instruction_TransferAsset | V2Instruction_TransferReserveAsset | V2Instruction_Trap | V2Instruction_UnsubscribeVersion | V2Instruction_WithdrawAsset + +export interface V2Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V2MultiAsset + weightLimit: V2WeightLimit +} + +export interface V2Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V2MultiAsset[] + ticket: V2MultiLocation +} + +export interface V2Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V2Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V2Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V2MultiAssetFilter + maxAssets: number + beneficiary: V2MultiLocation +} + +export interface V2Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V2MultiAssetFilter + maxAssets: number + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V2Junctions +} + +export interface V2Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V2MultiAssetFilter + receive: V2MultiAsset[] +} + +export interface V2Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V2Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V2Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V2Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V2MultiAssetFilter + reserve: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V2MultiAssetFilter + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V2MultiLocation + assets: V2MultiAssetFilter + maxResponseWeight: bigint +} + +export interface V2Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface V2Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V2MultiAsset[] +} + +export interface V2Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V2Instruction_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V2MultiLocation + maxResponseWeight: bigint +} + +export interface V2Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V2MultiAsset[] +} + +export interface V2Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V2Instruction[] +} + +export interface V2Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V2Instruction[] +} + +export interface V2Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V2Instruction_Transact { + __kind: 'Transact' + originType: V2OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V2Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V2MultiAsset[] + beneficiary: V2MultiLocation +} + +export interface V2Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V2MultiAsset[] + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V2Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V2MultiAsset[] +} + +export type VersionedXcm = VersionedXcm_V2 | VersionedXcm_V3 | VersionedXcm_V4 + +export interface VersionedXcm_V2 { + __kind: 'V2' + value: V2Instruction[] +} + +export interface VersionedXcm_V3 { + __kind: 'V3' + value: V3Instruction[] +} + +export interface VersionedXcm_V4 { + __kind: 'V4' + value: V4Instruction[] +} + +export const V3WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: Weight, + Unlimited: sts.unit(), + } +}) + +export const V4Location: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V4Junctions, + } +}) + +export const Type_480: sts.Type = sts.closedEnum(() => { + return { + V2: sts.array(() => Type_483), + V3: sts.array(() => Type_487), + V4: sts.array(() => Type_490), + } +}) + +export const Type_490: sts.Type = sts.closedEnum(() => { + return { + AliasOrigin: V4Location, + BurnAsset: sts.array(() => V4Asset), + BuyExecution: sts.enumStruct({ + fees: V4Asset, + weightLimit: V3WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V4Asset), + ticket: V4Location, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + ClearTopic: sts.unit(), + ClearTransactStatus: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V4AssetFilter, + beneficiary: V4Location, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V4AssetFilter, + dest: V4Location, + xcm: sts.array(() => V4Instruction), + }), + DescendOrigin: V4Junctions, + ExchangeAsset: sts.enumStruct({ + give: V4AssetFilter, + want: sts.array(() => V4Asset), + maximal: sts.boolean(), + }), + ExpectAsset: sts.array(() => V4Asset), + ExpectError: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + ExpectOrigin: sts.option(() => V4Location), + ExpectPallet: sts.enumStruct({ + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + crateMajor: sts.number(), + minCrateMinor: sts.number(), + }), + ExpectTransactStatus: V3MaybeErrorCode, + ExportMessage: sts.enumStruct({ + network: V4NetworkId, + destination: V4Junctions, + xcm: sts.array(() => V4Instruction), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V4AssetFilter, + reserve: V4Location, + xcm: sts.array(() => V4Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V4AssetFilter, + dest: V4Location, + xcm: sts.array(() => V4Instruction), + }), + LockAsset: sts.enumStruct({ + asset: V4Asset, + unlocker: V4Location, + }), + NoteUnlockable: sts.enumStruct({ + asset: V4Asset, + owner: V4Location, + }), + QueryPallet: sts.enumStruct({ + moduleName: sts.bytes(), + responseInfo: V4QueryResponseInfo, + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V4Response, + maxWeight: Weight, + querier: sts.option(() => V4Location), + }), + ReceiveTeleportedAsset: sts.array(() => V4Asset), + RefundSurplus: sts.unit(), + ReportError: V4QueryResponseInfo, + ReportHolding: sts.enumStruct({ + responseInfo: V4QueryResponseInfo, + assets: V4AssetFilter, + }), + ReportTransactStatus: V4QueryResponseInfo, + RequestUnlock: sts.enumStruct({ + asset: V4Asset, + locker: V4Location, + }), + ReserveAssetDeposited: sts.array(() => V4Asset), + SetAppendix: sts.array(() => Type_490), + SetErrorHandler: sts.array(() => Type_490), + SetFeesMode: sts.enumStruct({ + jitWithdraw: sts.boolean(), + }), + SetTopic: sts.bytes(), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: Weight, + }), + Transact: sts.enumStruct({ + originKind: V2OriginKind, + requireWeightAtMost: Weight, + call: Type_484, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V4Asset), + beneficiary: V4Location, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V4Asset), + dest: V4Location, + xcm: sts.array(() => V4Instruction), + }), + Trap: sts.bigint(), + UniversalOrigin: V4Junction, + UnlockAsset: sts.enumStruct({ + asset: V4Asset, + target: V4Location, + }), + UnpaidExecution: sts.enumStruct({ + weightLimit: V3WeightLimit, + checkOrigin: sts.option(() => V4Location), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V4Asset), + } +}) + +export const Type_484: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface Type_484 { + encoded: Bytes +} + +export type Type_490 = Type_490_AliasOrigin | Type_490_BurnAsset | Type_490_BuyExecution | Type_490_ClaimAsset | Type_490_ClearError | Type_490_ClearOrigin | Type_490_ClearTopic | Type_490_ClearTransactStatus | Type_490_DepositAsset | Type_490_DepositReserveAsset | Type_490_DescendOrigin | Type_490_ExchangeAsset | Type_490_ExpectAsset | Type_490_ExpectError | Type_490_ExpectOrigin | Type_490_ExpectPallet | Type_490_ExpectTransactStatus | Type_490_ExportMessage | Type_490_HrmpChannelAccepted | Type_490_HrmpChannelClosing | Type_490_HrmpNewChannelOpenRequest | Type_490_InitiateReserveWithdraw | Type_490_InitiateTeleport | Type_490_LockAsset | Type_490_NoteUnlockable | Type_490_QueryPallet | Type_490_QueryResponse | Type_490_ReceiveTeleportedAsset | Type_490_RefundSurplus | Type_490_ReportError | Type_490_ReportHolding | Type_490_ReportTransactStatus | Type_490_RequestUnlock | Type_490_ReserveAssetDeposited | Type_490_SetAppendix | Type_490_SetErrorHandler | Type_490_SetFeesMode | Type_490_SetTopic | Type_490_SubscribeVersion | Type_490_Transact | Type_490_TransferAsset | Type_490_TransferReserveAsset | Type_490_Trap | Type_490_UniversalOrigin | Type_490_UnlockAsset | Type_490_UnpaidExecution | Type_490_UnsubscribeVersion | Type_490_WithdrawAsset + +export interface Type_490_AliasOrigin { + __kind: 'AliasOrigin' + value: V4Location +} + +export interface Type_490_BurnAsset { + __kind: 'BurnAsset' + value: V4Asset[] +} + +export interface Type_490_BuyExecution { + __kind: 'BuyExecution' + fees: V4Asset + weightLimit: V3WeightLimit +} + +export interface Type_490_ClaimAsset { + __kind: 'ClaimAsset' + assets: V4Asset[] + ticket: V4Location +} + +export interface Type_490_ClearError { + __kind: 'ClearError' +} + +export interface Type_490_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_490_ClearTopic { + __kind: 'ClearTopic' +} + +export interface Type_490_ClearTransactStatus { + __kind: 'ClearTransactStatus' +} + +export interface Type_490_DepositAsset { + __kind: 'DepositAsset' + assets: V4AssetFilter + beneficiary: V4Location +} + +export interface Type_490_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V4AssetFilter + dest: V4Location + xcm: V4Instruction[] +} + +export interface Type_490_DescendOrigin { + __kind: 'DescendOrigin' + value: V4Junctions +} + +export interface Type_490_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V4AssetFilter + want: V4Asset[] + maximal: boolean +} + +export interface Type_490_ExpectAsset { + __kind: 'ExpectAsset' + value: V4Asset[] +} + +export interface Type_490_ExpectError { + __kind: 'ExpectError' + value?: ([number, V3Error] | undefined) +} + +export interface Type_490_ExpectOrigin { + __kind: 'ExpectOrigin' + value?: (V4Location | undefined) +} + +export interface Type_490_ExpectPallet { + __kind: 'ExpectPallet' + index: number + name: Bytes + moduleName: Bytes + crateMajor: number + minCrateMinor: number +} + +export interface Type_490_ExpectTransactStatus { + __kind: 'ExpectTransactStatus' + value: V3MaybeErrorCode +} + +export interface Type_490_ExportMessage { + __kind: 'ExportMessage' + network: V4NetworkId + destination: V4Junctions + xcm: V4Instruction[] +} + +export interface Type_490_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_490_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_490_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_490_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V4AssetFilter + reserve: V4Location + xcm: V4Instruction[] +} + +export interface Type_490_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V4AssetFilter + dest: V4Location + xcm: V4Instruction[] +} + +export interface Type_490_LockAsset { + __kind: 'LockAsset' + asset: V4Asset + unlocker: V4Location +} + +export interface Type_490_NoteUnlockable { + __kind: 'NoteUnlockable' + asset: V4Asset + owner: V4Location +} + +export interface Type_490_QueryPallet { + __kind: 'QueryPallet' + moduleName: Bytes + responseInfo: V4QueryResponseInfo +} + +export interface Type_490_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V4Response + maxWeight: Weight + querier?: (V4Location | undefined) +} + +export interface Type_490_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V4Asset[] +} + +export interface Type_490_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_490_ReportError { + __kind: 'ReportError' + value: V4QueryResponseInfo +} + +export interface Type_490_ReportHolding { + __kind: 'ReportHolding' + responseInfo: V4QueryResponseInfo + assets: V4AssetFilter +} + +export interface Type_490_ReportTransactStatus { + __kind: 'ReportTransactStatus' + value: V4QueryResponseInfo +} + +export interface Type_490_RequestUnlock { + __kind: 'RequestUnlock' + asset: V4Asset + locker: V4Location +} + +export interface Type_490_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V4Asset[] +} + +export interface Type_490_SetAppendix { + __kind: 'SetAppendix' + value: Type_490[] +} + +export interface Type_490_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_490[] +} + +export interface Type_490_SetFeesMode { + __kind: 'SetFeesMode' + jitWithdraw: boolean +} + +export interface Type_490_SetTopic { + __kind: 'SetTopic' + value: Bytes +} + +export interface Type_490_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: Weight +} + +export interface Type_490_Transact { + __kind: 'Transact' + originKind: V2OriginKind + requireWeightAtMost: Weight + call: Type_484 +} + +export interface Type_490_TransferAsset { + __kind: 'TransferAsset' + assets: V4Asset[] + beneficiary: V4Location +} + +export interface Type_490_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V4Asset[] + dest: V4Location + xcm: V4Instruction[] +} + +export interface Type_490_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_490_UniversalOrigin { + __kind: 'UniversalOrigin' + value: V4Junction +} + +export interface Type_490_UnlockAsset { + __kind: 'UnlockAsset' + asset: V4Asset + target: V4Location +} + +export interface Type_490_UnpaidExecution { + __kind: 'UnpaidExecution' + weightLimit: V3WeightLimit + checkOrigin?: (V4Location | undefined) +} + +export interface Type_490_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_490_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V4Asset[] +} + +export const Type_487: sts.Type = sts.closedEnum(() => { + return { + AliasOrigin: V3MultiLocation, + BurnAsset: sts.array(() => V3MultiAsset), + BuyExecution: sts.enumStruct({ + fees: V3MultiAsset, + weightLimit: V3WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + ticket: V3MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + ClearTopic: sts.unit(), + ClearTransactStatus: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + beneficiary: V3MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + DescendOrigin: V3Junctions, + ExchangeAsset: sts.enumStruct({ + give: V3MultiAssetFilter, + want: sts.array(() => V3MultiAsset), + maximal: sts.boolean(), + }), + ExpectAsset: sts.array(() => V3MultiAsset), + ExpectError: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + ExpectOrigin: sts.option(() => V3MultiLocation), + ExpectPallet: sts.enumStruct({ + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + crateMajor: sts.number(), + minCrateMinor: sts.number(), + }), + ExpectTransactStatus: V3MaybeErrorCode, + ExportMessage: sts.enumStruct({ + network: V3NetworkId, + destination: V3Junctions, + xcm: sts.array(() => V3Instruction), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V3MultiAssetFilter, + reserve: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + LockAsset: sts.enumStruct({ + asset: V3MultiAsset, + unlocker: V3MultiLocation, + }), + NoteUnlockable: sts.enumStruct({ + asset: V3MultiAsset, + owner: V3MultiLocation, + }), + QueryPallet: sts.enumStruct({ + moduleName: sts.bytes(), + responseInfo: V3QueryResponseInfo, + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V3Response, + maxWeight: Weight, + querier: sts.option(() => V3MultiLocation), + }), + ReceiveTeleportedAsset: sts.array(() => V3MultiAsset), + RefundSurplus: sts.unit(), + ReportError: V3QueryResponseInfo, + ReportHolding: sts.enumStruct({ + responseInfo: V3QueryResponseInfo, + assets: V3MultiAssetFilter, + }), + ReportTransactStatus: V3QueryResponseInfo, + RequestUnlock: sts.enumStruct({ + asset: V3MultiAsset, + locker: V3MultiLocation, + }), + ReserveAssetDeposited: sts.array(() => V3MultiAsset), + SetAppendix: sts.array(() => Type_487), + SetErrorHandler: sts.array(() => Type_487), + SetFeesMode: sts.enumStruct({ + jitWithdraw: sts.boolean(), + }), + SetTopic: sts.bytes(), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: Weight, + }), + Transact: sts.enumStruct({ + originKind: V2OriginKind, + requireWeightAtMost: Weight, + call: Type_484, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + beneficiary: V3MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + Trap: sts.bigint(), + UniversalOrigin: V3Junction, + UnlockAsset: sts.enumStruct({ + asset: V3MultiAsset, + target: V3MultiLocation, + }), + UnpaidExecution: sts.enumStruct({ + weightLimit: V3WeightLimit, + checkOrigin: sts.option(() => V3MultiLocation), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V3MultiAsset), + } +}) + +export type Type_487 = Type_487_AliasOrigin | Type_487_BurnAsset | Type_487_BuyExecution | Type_487_ClaimAsset | Type_487_ClearError | Type_487_ClearOrigin | Type_487_ClearTopic | Type_487_ClearTransactStatus | Type_487_DepositAsset | Type_487_DepositReserveAsset | Type_487_DescendOrigin | Type_487_ExchangeAsset | Type_487_ExpectAsset | Type_487_ExpectError | Type_487_ExpectOrigin | Type_487_ExpectPallet | Type_487_ExpectTransactStatus | Type_487_ExportMessage | Type_487_HrmpChannelAccepted | Type_487_HrmpChannelClosing | Type_487_HrmpNewChannelOpenRequest | Type_487_InitiateReserveWithdraw | Type_487_InitiateTeleport | Type_487_LockAsset | Type_487_NoteUnlockable | Type_487_QueryPallet | Type_487_QueryResponse | Type_487_ReceiveTeleportedAsset | Type_487_RefundSurplus | Type_487_ReportError | Type_487_ReportHolding | Type_487_ReportTransactStatus | Type_487_RequestUnlock | Type_487_ReserveAssetDeposited | Type_487_SetAppendix | Type_487_SetErrorHandler | Type_487_SetFeesMode | Type_487_SetTopic | Type_487_SubscribeVersion | Type_487_Transact | Type_487_TransferAsset | Type_487_TransferReserveAsset | Type_487_Trap | Type_487_UniversalOrigin | Type_487_UnlockAsset | Type_487_UnpaidExecution | Type_487_UnsubscribeVersion | Type_487_WithdrawAsset + +export interface Type_487_AliasOrigin { + __kind: 'AliasOrigin' + value: V3MultiLocation +} + +export interface Type_487_BurnAsset { + __kind: 'BurnAsset' + value: V3MultiAsset[] +} + +export interface Type_487_BuyExecution { + __kind: 'BuyExecution' + fees: V3MultiAsset + weightLimit: V3WeightLimit +} + +export interface Type_487_ClaimAsset { + __kind: 'ClaimAsset' + assets: V3MultiAsset[] + ticket: V3MultiLocation +} + +export interface Type_487_ClearError { + __kind: 'ClearError' +} + +export interface Type_487_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_487_ClearTopic { + __kind: 'ClearTopic' +} + +export interface Type_487_ClearTransactStatus { + __kind: 'ClearTransactStatus' +} + +export interface Type_487_DepositAsset { + __kind: 'DepositAsset' + assets: V3MultiAssetFilter + beneficiary: V3MultiLocation +} + +export interface Type_487_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_487_DescendOrigin { + __kind: 'DescendOrigin' + value: V3Junctions +} + +export interface Type_487_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V3MultiAssetFilter + want: V3MultiAsset[] + maximal: boolean +} + +export interface Type_487_ExpectAsset { + __kind: 'ExpectAsset' + value: V3MultiAsset[] +} + +export interface Type_487_ExpectError { + __kind: 'ExpectError' + value?: ([number, V3Error] | undefined) +} + +export interface Type_487_ExpectOrigin { + __kind: 'ExpectOrigin' + value?: (V3MultiLocation | undefined) +} + +export interface Type_487_ExpectPallet { + __kind: 'ExpectPallet' + index: number + name: Bytes + moduleName: Bytes + crateMajor: number + minCrateMinor: number +} + +export interface Type_487_ExpectTransactStatus { + __kind: 'ExpectTransactStatus' + value: V3MaybeErrorCode +} + +export interface Type_487_ExportMessage { + __kind: 'ExportMessage' + network: V3NetworkId + destination: V3Junctions + xcm: V3Instruction[] +} + +export interface Type_487_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_487_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_487_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_487_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V3MultiAssetFilter + reserve: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_487_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_487_LockAsset { + __kind: 'LockAsset' + asset: V3MultiAsset + unlocker: V3MultiLocation +} + +export interface Type_487_NoteUnlockable { + __kind: 'NoteUnlockable' + asset: V3MultiAsset + owner: V3MultiLocation +} + +export interface Type_487_QueryPallet { + __kind: 'QueryPallet' + moduleName: Bytes + responseInfo: V3QueryResponseInfo +} + +export interface Type_487_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V3Response + maxWeight: Weight + querier?: (V3MultiLocation | undefined) +} + +export interface Type_487_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V3MultiAsset[] +} + +export interface Type_487_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_487_ReportError { + __kind: 'ReportError' + value: V3QueryResponseInfo +} + +export interface Type_487_ReportHolding { + __kind: 'ReportHolding' + responseInfo: V3QueryResponseInfo + assets: V3MultiAssetFilter +} + +export interface Type_487_ReportTransactStatus { + __kind: 'ReportTransactStatus' + value: V3QueryResponseInfo +} + +export interface Type_487_RequestUnlock { + __kind: 'RequestUnlock' + asset: V3MultiAsset + locker: V3MultiLocation +} + +export interface Type_487_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V3MultiAsset[] +} + +export interface Type_487_SetAppendix { + __kind: 'SetAppendix' + value: Type_487[] +} + +export interface Type_487_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_487[] +} + +export interface Type_487_SetFeesMode { + __kind: 'SetFeesMode' + jitWithdraw: boolean +} + +export interface Type_487_SetTopic { + __kind: 'SetTopic' + value: Bytes +} + +export interface Type_487_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: Weight +} + +export interface Type_487_Transact { + __kind: 'Transact' + originKind: V2OriginKind + requireWeightAtMost: Weight + call: Type_484 +} + +export interface Type_487_TransferAsset { + __kind: 'TransferAsset' + assets: V3MultiAsset[] + beneficiary: V3MultiLocation +} + +export interface Type_487_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V3MultiAsset[] + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_487_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_487_UniversalOrigin { + __kind: 'UniversalOrigin' + value: V3Junction +} + +export interface Type_487_UnlockAsset { + __kind: 'UnlockAsset' + asset: V3MultiAsset + target: V3MultiLocation +} + +export interface Type_487_UnpaidExecution { + __kind: 'UnpaidExecution' + weightLimit: V3WeightLimit + checkOrigin?: (V3MultiLocation | undefined) +} + +export interface Type_487_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_487_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V3MultiAsset[] +} + +export const Type_483: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V2MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + ticket: V2MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V2MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V2Junctions, + ExchangeAsset: sts.enumStruct({ + give: V2MultiAssetFilter, + receive: sts.array(() => V2MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V2MultiAssetFilter, + reserve: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V2MultiAssetFilter, + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + assets: V2MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V2MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V2MultiAsset), + SetAppendix: sts.array(() => Type_483), + SetErrorHandler: sts.array(() => Type_483), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V2OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_484, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + beneficiary: V2MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V2MultiAsset), + } +}) + +export type Type_483 = Type_483_BuyExecution | Type_483_ClaimAsset | Type_483_ClearError | Type_483_ClearOrigin | Type_483_DepositAsset | Type_483_DepositReserveAsset | Type_483_DescendOrigin | Type_483_ExchangeAsset | Type_483_HrmpChannelAccepted | Type_483_HrmpChannelClosing | Type_483_HrmpNewChannelOpenRequest | Type_483_InitiateReserveWithdraw | Type_483_InitiateTeleport | Type_483_QueryHolding | Type_483_QueryResponse | Type_483_ReceiveTeleportedAsset | Type_483_RefundSurplus | Type_483_ReportError | Type_483_ReserveAssetDeposited | Type_483_SetAppendix | Type_483_SetErrorHandler | Type_483_SubscribeVersion | Type_483_Transact | Type_483_TransferAsset | Type_483_TransferReserveAsset | Type_483_Trap | Type_483_UnsubscribeVersion | Type_483_WithdrawAsset + +export interface Type_483_BuyExecution { + __kind: 'BuyExecution' + fees: V2MultiAsset + weightLimit: V2WeightLimit +} + +export interface Type_483_ClaimAsset { + __kind: 'ClaimAsset' + assets: V2MultiAsset[] + ticket: V2MultiLocation +} + +export interface Type_483_ClearError { + __kind: 'ClearError' +} + +export interface Type_483_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_483_DepositAsset { + __kind: 'DepositAsset' + assets: V2MultiAssetFilter + maxAssets: number + beneficiary: V2MultiLocation +} + +export interface Type_483_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V2MultiAssetFilter + maxAssets: number + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_483_DescendOrigin { + __kind: 'DescendOrigin' + value: V2Junctions +} + +export interface Type_483_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V2MultiAssetFilter + receive: V2MultiAsset[] +} + +export interface Type_483_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_483_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_483_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_483_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V2MultiAssetFilter + reserve: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_483_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V2MultiAssetFilter + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_483_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V2MultiLocation + assets: V2MultiAssetFilter + maxResponseWeight: bigint +} + +export interface Type_483_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface Type_483_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V2MultiAsset[] +} + +export interface Type_483_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_483_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V2MultiLocation + maxResponseWeight: bigint +} + +export interface Type_483_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V2MultiAsset[] +} + +export interface Type_483_SetAppendix { + __kind: 'SetAppendix' + value: Type_483[] +} + +export interface Type_483_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_483[] +} + +export interface Type_483_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_483_Transact { + __kind: 'Transact' + originType: V2OriginKind + requireWeightAtMost: bigint + call: Type_484 +} + +export interface Type_483_TransferAsset { + __kind: 'TransferAsset' + assets: V2MultiAsset[] + beneficiary: V2MultiLocation +} + +export interface Type_483_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V2MultiAsset[] + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_483_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_483_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_483_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V2MultiAsset[] +} + +export type Type_480 = Type_480_V2 | Type_480_V3 | Type_480_V4 + +export interface Type_480_V2 { + __kind: 'V2' + value: Type_483[] +} + +export interface Type_480_V3 { + __kind: 'V3' + value: Type_487[] +} + +export interface Type_480_V4 { + __kind: 'V4' + value: Type_490[] +} + +export const VersionedLocation: sts.Type = sts.closedEnum(() => { + return { + V2: V2MultiLocation, + V3: V3MultiLocation, + V4: V4Location, + } +}) + +export const VersionedAssets: sts.Type = sts.closedEnum(() => { + return { + V2: sts.array(() => V2MultiAsset), + V3: sts.array(() => V3MultiAsset), + V4: sts.array(() => V4Asset), + } +}) + +export type VersionedAssets = VersionedAssets_V2 | VersionedAssets_V3 | VersionedAssets_V4 + +export interface VersionedAssets_V2 { + __kind: 'V2' + value: V2MultiAsset[] +} + +export interface VersionedAssets_V3 { + __kind: 'V3' + value: V3MultiAsset[] +} + +export interface VersionedAssets_V4 { + __kind: 'V4' + value: V4Asset[] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type XcmPalletCall = XcmPalletCall_claim_assets | XcmPalletCall_execute | XcmPalletCall_force_default_xcm_version | XcmPalletCall_force_subscribe_version_notify | XcmPalletCall_force_suspension | XcmPalletCall_force_unsubscribe_version_notify | XcmPalletCall_force_xcm_version | XcmPalletCall_limited_reserve_transfer_assets | XcmPalletCall_limited_teleport_assets | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets | XcmPalletCall_transfer_assets | XcmPalletCall_transfer_assets_using_type_and_then + +/** + * See [`Pallet::claim_assets`]. + */ +export interface XcmPalletCall_claim_assets { + __kind: 'claim_assets' + assets: VersionedAssets + beneficiary: VersionedLocation +} + +/** + * See [`Pallet::execute`]. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Type_480 + maxWeight: Weight +} + +/** + * See [`Pallet::force_default_xcm_version`]. + */ +export interface XcmPalletCall_force_default_xcm_version { + __kind: 'force_default_xcm_version' + maybeXcmVersion?: (number | undefined) +} + +/** + * See [`Pallet::force_subscribe_version_notify`]. + */ +export interface XcmPalletCall_force_subscribe_version_notify { + __kind: 'force_subscribe_version_notify' + location: VersionedLocation +} + +/** + * See [`Pallet::force_suspension`]. + */ +export interface XcmPalletCall_force_suspension { + __kind: 'force_suspension' + suspended: boolean +} + +/** + * See [`Pallet::force_unsubscribe_version_notify`]. + */ +export interface XcmPalletCall_force_unsubscribe_version_notify { + __kind: 'force_unsubscribe_version_notify' + location: VersionedLocation +} + +/** + * See [`Pallet::force_xcm_version`]. + */ +export interface XcmPalletCall_force_xcm_version { + __kind: 'force_xcm_version' + location: V4Location + version: number +} + +/** + * See [`Pallet::limited_reserve_transfer_assets`]. + */ +export interface XcmPalletCall_limited_reserve_transfer_assets { + __kind: 'limited_reserve_transfer_assets' + dest: VersionedLocation + beneficiary: VersionedLocation + assets: VersionedAssets + feeAssetItem: number + weightLimit: V3WeightLimit +} + +/** + * See [`Pallet::limited_teleport_assets`]. + */ +export interface XcmPalletCall_limited_teleport_assets { + __kind: 'limited_teleport_assets' + dest: VersionedLocation + beneficiary: VersionedLocation + assets: VersionedAssets + feeAssetItem: number + weightLimit: V3WeightLimit +} + +/** + * See [`Pallet::reserve_transfer_assets`]. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: VersionedLocation + beneficiary: VersionedLocation + assets: VersionedAssets + feeAssetItem: number +} + +/** + * See [`Pallet::send`]. + */ +export interface XcmPalletCall_send { + __kind: 'send' + dest: VersionedLocation + message: VersionedXcm +} + +/** + * See [`Pallet::teleport_assets`]. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: VersionedLocation + beneficiary: VersionedLocation + assets: VersionedAssets + feeAssetItem: number +} + +/** + * See [`Pallet::transfer_assets`]. + */ +export interface XcmPalletCall_transfer_assets { + __kind: 'transfer_assets' + dest: VersionedLocation + beneficiary: VersionedLocation + assets: VersionedAssets + feeAssetItem: number + weightLimit: V3WeightLimit +} + +/** + * See [`Pallet::transfer_assets_using_type_and_then`]. + */ +export interface XcmPalletCall_transfer_assets_using_type_and_then { + __kind: 'transfer_assets_using_type_and_then' + dest: VersionedLocation + assets: VersionedAssets + assetsTransferType: TransferType + remoteFeesId: VersionedAssetId + feesTransferType: TransferType + customXcmOnDest: VersionedXcm + weightLimit: V3WeightLimit +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const WhitelistCall: sts.Type = sts.closedEnum(() => { + return { + dispatch_whitelisted_call: sts.enumStruct({ + callHash: H256, + callEncodedLen: sts.number(), + callWeightWitness: Weight, + }), + dispatch_whitelisted_call_with_preimage: sts.enumStruct({ + call: Call, + }), + remove_whitelisted_call: sts.enumStruct({ + callHash: H256, + }), + whitelist_call: sts.enumStruct({ + callHash: H256, + }), + } +}) + +export const H256 = sts.bytes() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type WhitelistCall = WhitelistCall_dispatch_whitelisted_call | WhitelistCall_dispatch_whitelisted_call_with_preimage | WhitelistCall_remove_whitelisted_call | WhitelistCall_whitelist_call + +/** + * See [`Pallet::dispatch_whitelisted_call`]. + */ +export interface WhitelistCall_dispatch_whitelisted_call { + __kind: 'dispatch_whitelisted_call' + callHash: H256 + callEncodedLen: number + callWeightWitness: Weight +} + +/** + * See [`Pallet::dispatch_whitelisted_call_with_preimage`]. + */ +export interface WhitelistCall_dispatch_whitelisted_call_with_preimage { + __kind: 'dispatch_whitelisted_call_with_preimage' + call: Call +} + +/** + * See [`Pallet::remove_whitelisted_call`]. + */ +export interface WhitelistCall_remove_whitelisted_call { + __kind: 'remove_whitelisted_call' + callHash: H256 +} + +/** + * See [`Pallet::whitelist_call`]. + */ +export interface WhitelistCall_whitelist_call { + __kind: 'whitelist_call' + callHash: H256 +} + +export type H256 = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const VoterListCall: sts.Type = sts.closedEnum(() => { + return { + put_in_front_of: sts.enumStruct({ + lighter: MultiAddress, + }), + put_in_front_of_other: sts.enumStruct({ + heavier: MultiAddress, + lighter: MultiAddress, + }), + rebag: sts.enumStruct({ + dislocated: MultiAddress, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type VoterListCall = VoterListCall_put_in_front_of | VoterListCall_put_in_front_of_other | VoterListCall_rebag + +/** + * See [`Pallet::put_in_front_of`]. + */ +export interface VoterListCall_put_in_front_of { + __kind: 'put_in_front_of' + lighter: MultiAddress +} + +/** + * See [`Pallet::put_in_front_of_other`]. + */ +export interface VoterListCall_put_in_front_of_other { + __kind: 'put_in_front_of_other' + heavier: MultiAddress + lighter: MultiAddress +} + +/** + * See [`Pallet::rebag`]. + */ +export interface VoterListCall_rebag { + __kind: 'rebag' + dislocated: MultiAddress +} + +export type MultiAddress = MultiAddress_Address20 | MultiAddress_Address32 | MultiAddress_Id | MultiAddress_Index | MultiAddress_Raw + +export interface MultiAddress_Address20 { + __kind: 'Address20' + value: Bytes +} + +export interface MultiAddress_Address32 { + __kind: 'Address32' + value: Bytes +} + +export interface MultiAddress_Id { + __kind: 'Id' + value: AccountId32 +} + +export interface MultiAddress_Index { + __kind: 'Index' +} + +export interface MultiAddress_Raw { + __kind: 'Raw' + value: Bytes +} + +export type AccountId32 = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_remove_vesting_schedule: sts.enumStruct({ + target: MultiAddress, + scheduleIndex: sts.number(), + }), + force_vested_transfer: sts.enumStruct({ + source: MultiAddress, + target: MultiAddress, + schedule: VestingInfo, + }), + merge_schedules: sts.enumStruct({ + schedule1Index: sts.number(), + schedule2Index: sts.number(), + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: MultiAddress, + }), + vested_transfer: sts.enumStruct({ + target: MultiAddress, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: sts.bigint(), + perBlock: sts.bigint(), + startingBlock: sts.number(), + } +}) + +export interface VestingInfo { + locked: bigint + perBlock: bigint + startingBlock: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type VestingCall = VestingCall_force_remove_vesting_schedule | VestingCall_force_vested_transfer | VestingCall_merge_schedules | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * See [`Pallet::force_remove_vesting_schedule`]. + */ +export interface VestingCall_force_remove_vesting_schedule { + __kind: 'force_remove_vesting_schedule' + target: MultiAddress + scheduleIndex: number +} + +/** + * See [`Pallet::force_vested_transfer`]. + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: MultiAddress + target: MultiAddress + schedule: VestingInfo +} + +/** + * See [`Pallet::merge_schedules`]. + */ +export interface VestingCall_merge_schedules { + __kind: 'merge_schedules' + schedule1Index: number + schedule2Index: number +} + +/** + * See [`Pallet::vest`]. + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * See [`Pallet::vest_other`]. + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: MultiAddress +} + +/** + * See [`Pallet::vested_transfer`]. + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: MultiAddress + schedule: VestingInfo +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Call, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Call), + }), + dispatch_as: sts.enumStruct({ + asOrigin: OriginCaller, + call: Call, + }), + force_batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + with_weight: sts.enumStruct({ + call: Call, + weight: Weight, + }), + } +}) + +export const OriginCaller: sts.Type = sts.closedEnum(() => { + return { + Origins: Origin, + ParachainsOrigin: Type_164, + Void: Void, + XcmPallet: Type_166, + system: RawOrigin, + } +}) + +export const RawOrigin: sts.Type = sts.closedEnum(() => { + return { + None: sts.unit(), + Root: sts.unit(), + Signed: AccountId32, + } +}) + +export type RawOrigin = RawOrigin_None | RawOrigin_Root | RawOrigin_Signed + +export interface RawOrigin_None { + __kind: 'None' +} + +export interface RawOrigin_Root { + __kind: 'Root' +} + +export interface RawOrigin_Signed { + __kind: 'Signed' + value: AccountId32 +} + +export const Type_166: sts.Type = sts.closedEnum(() => { + return { + Response: V4Location, + Xcm: V4Location, + } +}) + +export type Type_166 = Type_166_Response | Type_166_Xcm + +export interface Type_166_Response { + __kind: 'Response' + value: V4Location +} + +export interface Type_166_Xcm { + __kind: 'Xcm' + value: V4Location +} + +export const Void: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Void = never + +export const Type_164: sts.Type = sts.closedEnum(() => { + return { + Parachain: Id, + } +}) + +export const Id = sts.number() + +export type Type_164 = Type_164_Parachain + +export interface Type_164_Parachain { + __kind: 'Parachain' + value: Id +} + +export type Id = number + +export const Origin: sts.Type = sts.closedEnum(() => { + return { + AuctionAdmin: sts.unit(), + BigSpender: sts.unit(), + BigTipper: sts.unit(), + Fellows: sts.unit(), + Fellowship1Dan: sts.unit(), + Fellowship2Dan: sts.unit(), + Fellowship3Dan: sts.unit(), + Fellowship4Dan: sts.unit(), + Fellowship5Dan: sts.unit(), + Fellowship6Dan: sts.unit(), + Fellowship7Dan: sts.unit(), + Fellowship8Dan: sts.unit(), + Fellowship9Dan: sts.unit(), + FellowshipAdmin: sts.unit(), + FellowshipExperts: sts.unit(), + FellowshipInitiates: sts.unit(), + FellowshipMasters: sts.unit(), + GeneralAdmin: sts.unit(), + LeaseAdmin: sts.unit(), + MediumSpender: sts.unit(), + ReferendumCanceller: sts.unit(), + ReferendumKiller: sts.unit(), + SmallSpender: sts.unit(), + SmallTipper: sts.unit(), + StakingAdmin: sts.unit(), + Treasurer: sts.unit(), + WhitelistedCaller: sts.unit(), + WishForChange: sts.unit(), + } +}) + +export type Origin = Origin_AuctionAdmin | Origin_BigSpender | Origin_BigTipper | Origin_Fellows | Origin_Fellowship1Dan | Origin_Fellowship2Dan | Origin_Fellowship3Dan | Origin_Fellowship4Dan | Origin_Fellowship5Dan | Origin_Fellowship6Dan | Origin_Fellowship7Dan | Origin_Fellowship8Dan | Origin_Fellowship9Dan | Origin_FellowshipAdmin | Origin_FellowshipExperts | Origin_FellowshipInitiates | Origin_FellowshipMasters | Origin_GeneralAdmin | Origin_LeaseAdmin | Origin_MediumSpender | Origin_ReferendumCanceller | Origin_ReferendumKiller | Origin_SmallSpender | Origin_SmallTipper | Origin_StakingAdmin | Origin_Treasurer | Origin_WhitelistedCaller | Origin_WishForChange + +export interface Origin_AuctionAdmin { + __kind: 'AuctionAdmin' +} + +export interface Origin_BigSpender { + __kind: 'BigSpender' +} + +export interface Origin_BigTipper { + __kind: 'BigTipper' +} + +export interface Origin_Fellows { + __kind: 'Fellows' +} + +export interface Origin_Fellowship1Dan { + __kind: 'Fellowship1Dan' +} + +export interface Origin_Fellowship2Dan { + __kind: 'Fellowship2Dan' +} + +export interface Origin_Fellowship3Dan { + __kind: 'Fellowship3Dan' +} + +export interface Origin_Fellowship4Dan { + __kind: 'Fellowship4Dan' +} + +export interface Origin_Fellowship5Dan { + __kind: 'Fellowship5Dan' +} + +export interface Origin_Fellowship6Dan { + __kind: 'Fellowship6Dan' +} + +export interface Origin_Fellowship7Dan { + __kind: 'Fellowship7Dan' +} + +export interface Origin_Fellowship8Dan { + __kind: 'Fellowship8Dan' +} + +export interface Origin_Fellowship9Dan { + __kind: 'Fellowship9Dan' +} + +export interface Origin_FellowshipAdmin { + __kind: 'FellowshipAdmin' +} + +export interface Origin_FellowshipExperts { + __kind: 'FellowshipExperts' +} + +export interface Origin_FellowshipInitiates { + __kind: 'FellowshipInitiates' +} + +export interface Origin_FellowshipMasters { + __kind: 'FellowshipMasters' +} + +export interface Origin_GeneralAdmin { + __kind: 'GeneralAdmin' +} + +export interface Origin_LeaseAdmin { + __kind: 'LeaseAdmin' +} + +export interface Origin_MediumSpender { + __kind: 'MediumSpender' +} + +export interface Origin_ReferendumCanceller { + __kind: 'ReferendumCanceller' +} + +export interface Origin_ReferendumKiller { + __kind: 'ReferendumKiller' +} + +export interface Origin_SmallSpender { + __kind: 'SmallSpender' +} + +export interface Origin_SmallTipper { + __kind: 'SmallTipper' +} + +export interface Origin_StakingAdmin { + __kind: 'StakingAdmin' +} + +export interface Origin_Treasurer { + __kind: 'Treasurer' +} + +export interface Origin_WhitelistedCaller { + __kind: 'WhitelistedCaller' +} + +export interface Origin_WishForChange { + __kind: 'WishForChange' +} + +export type OriginCaller = OriginCaller_Origins | OriginCaller_ParachainsOrigin | OriginCaller_Void | OriginCaller_XcmPallet | OriginCaller_system + +export interface OriginCaller_Origins { + __kind: 'Origins' + value: Origin +} + +export interface OriginCaller_ParachainsOrigin { + __kind: 'ParachainsOrigin' + value: Type_164 +} + +export interface OriginCaller_Void { + __kind: 'Void' + value: Void +} + +export interface OriginCaller_XcmPallet { + __kind: 'XcmPallet' + value: Type_166 +} + +export interface OriginCaller_system { + __kind: 'system' + value: RawOrigin +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all | UtilityCall_dispatch_as | UtilityCall_force_batch | UtilityCall_with_weight + +/** + * See [`Pallet::as_derivative`]. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Call +} + +/** + * See [`Pallet::batch`]. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Call[] +} + +/** + * See [`Pallet::batch_all`]. + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Call[] +} + +/** + * See [`Pallet::dispatch_as`]. + */ +export interface UtilityCall_dispatch_as { + __kind: 'dispatch_as' + asOrigin: OriginCaller + call: Call +} + +/** + * See [`Pallet::force_batch`]. + */ +export interface UtilityCall_force_batch { + __kind: 'force_batch' + calls: Call[] +} + +/** + * See [`Pallet::with_weight`]. + */ +export interface UtilityCall_with_weight { + __kind: 'with_weight' + call: Call + weight: Weight +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + check_status: sts.enumStruct({ + index: sts.number(), + }), + payout: sts.enumStruct({ + index: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: MultiAddress, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + remove_approval: sts.enumStruct({ + proposalId: sts.number(), + }), + spend: sts.enumStruct({ + assetKind: VersionedLocatableAsset, + amount: sts.bigint(), + beneficiary: VersionedLocation, + validFrom: sts.option(() => sts.number()), + }), + spend_local: sts.enumStruct({ + amount: sts.bigint(), + beneficiary: MultiAddress, + }), + void_spend: sts.enumStruct({ + index: sts.number(), + }), + } +}) + +export const VersionedLocatableAsset: sts.Type = sts.closedEnum(() => { + return { + V3: sts.enumStruct({ + location: V3MultiLocation, + assetId: V3AssetId, + }), + V4: sts.enumStruct({ + location: V4Location, + assetId: V4AssetId, + }), + } +}) + +export type VersionedLocatableAsset = VersionedLocatableAsset_V3 | VersionedLocatableAsset_V4 + +export interface VersionedLocatableAsset_V3 { + __kind: 'V3' + location: V3MultiLocation + assetId: V3AssetId +} + +export interface VersionedLocatableAsset_V4 { + __kind: 'V4' + location: V4Location + assetId: V4AssetId +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_check_status | TreasuryCall_payout | TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_remove_approval | TreasuryCall_spend | TreasuryCall_spend_local | TreasuryCall_void_spend + +/** + * See [`Pallet::approve_proposal`]. + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * See [`Pallet::check_status`]. + */ +export interface TreasuryCall_check_status { + __kind: 'check_status' + index: number +} + +/** + * See [`Pallet::payout`]. + */ +export interface TreasuryCall_payout { + __kind: 'payout' + index: number +} + +/** + * See [`Pallet::propose_spend`]. + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: MultiAddress +} + +/** + * See [`Pallet::reject_proposal`]. + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * See [`Pallet::remove_approval`]. + */ +export interface TreasuryCall_remove_approval { + __kind: 'remove_approval' + proposalId: number +} + +/** + * See [`Pallet::spend`]. + */ +export interface TreasuryCall_spend { + __kind: 'spend' + assetKind: VersionedLocatableAsset + amount: bigint + beneficiary: VersionedLocation + validFrom?: (number | undefined) +} + +/** + * See [`Pallet::spend_local`]. + */ +export interface TreasuryCall_spend_local { + __kind: 'spend_local' + amount: bigint + beneficiary: MultiAddress +} + +/** + * See [`Pallet::void_spend`]. + */ +export interface TreasuryCall_void_spend { + __kind: 'void_spend' + index: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type TimestampCall = TimestampCall_set + +/** + * See [`Pallet::set`]. + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + apply_authorized_upgrade: sts.enumStruct({ + code: sts.bytes(), + }), + authorize_upgrade: sts.enumStruct({ + codeHash: H256, + }), + authorize_upgrade_without_checks: sts.enumStruct({ + codeHash: H256, + }), + kill_prefix: sts.enumStruct({ + prefix: sts.bytes(), + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => sts.bytes()), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SystemCall = SystemCall_apply_authorized_upgrade | SystemCall_authorize_upgrade | SystemCall_authorize_upgrade_without_checks | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * See [`Pallet::apply_authorized_upgrade`]. + */ +export interface SystemCall_apply_authorized_upgrade { + __kind: 'apply_authorized_upgrade' + code: Bytes +} + +/** + * See [`Pallet::authorize_upgrade`]. + */ +export interface SystemCall_authorize_upgrade { + __kind: 'authorize_upgrade' + codeHash: H256 +} + +/** + * See [`Pallet::authorize_upgrade_without_checks`]. + */ +export interface SystemCall_authorize_upgrade_without_checks { + __kind: 'authorize_upgrade_without_checks' + codeHash: H256 +} + +/** + * See [`Pallet::kill_prefix`]. + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Bytes + subkeys: number +} + +/** + * See [`Pallet::kill_storage`]. + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Bytes[] +} + +/** + * See [`Pallet::remark`]. + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * See [`Pallet::remark_with_event`]. + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * See [`Pallet::set_code`]. + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * See [`Pallet::set_code_without_checks`]. + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * See [`Pallet::set_heap_pages`]. + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * See [`Pallet::set_storage`]. + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: [Bytes, Bytes][] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: sts.number(), + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + stash: AccountId32, + }), + deprecate_controller_batch: sts.enumStruct({ + controllers: sts.array(() => AccountId32), + }), + force_apply_min_commission: sts.enumStruct({ + validatorStash: AccountId32, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => MultiAddress), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => MultiAddress), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + }), + payout_stakers_by_page: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + page: sts.number(), + }), + reap_stash: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + restore_ledger: sts.enumStruct({ + stash: AccountId32, + maybeController: sts.option(() => AccountId32), + maybeTotal: sts.option(() => sts.bigint()), + maybeUnlocking: sts.option(() => sts.array(() => UnlockChunk)), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.unit(), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId32), + }), + set_min_commission: sts.enumStruct({ + new: Perbill, + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_staking_configs: sts.enumStruct({ + minNominatorBond: ConfigOp, + minValidatorBond: ConfigOp, + maxNominatorCount: Type_123, + maxValidatorCount: Type_123, + chillThreshold: Type_124, + minCommission: Type_125, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + update_payee: sts.enumStruct({ + controller: AccountId32, + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export const Type_125: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export type Type_125 = Type_125_Noop | Type_125_Remove | Type_125_Set + +export interface Type_125_Noop { + __kind: 'Noop' +} + +export interface Type_125_Remove { + __kind: 'Remove' +} + +export interface Type_125_Set { + __kind: 'Set' + value: Perbill +} + +export type Perbill = number + +export const Type_124: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Percent, + } +}) + +export type Type_124 = Type_124_Noop | Type_124_Remove | Type_124_Set + +export interface Type_124_Noop { + __kind: 'Noop' +} + +export interface Type_124_Remove { + __kind: 'Remove' +} + +export interface Type_124_Set { + __kind: 'Set' + value: Percent +} + +export type Percent = number + +export const Type_123: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_123 = Type_123_Noop | Type_123_Remove | Type_123_Set + +export interface Type_123_Noop { + __kind: 'Noop' +} + +export interface Type_123_Remove { + __kind: 'Remove' +} + +export interface Type_123_Set { + __kind: 'Set' + value: number +} + +export const ConfigOp: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type ConfigOp = ConfigOp_Noop | ConfigOp_Remove | ConfigOp_Set + +export interface ConfigOp_Noop { + __kind: 'Noop' +} + +export interface ConfigOp_Remove { + __kind: 'Remove' +} + +export interface ConfigOp_Set { + __kind: 'Set' + value: bigint +} + +export const Perbill = sts.number() + +export const Percent = sts.number() + +export const UnlockChunk: sts.Type = sts.struct(() => { + return { + value: sts.bigint(), + era: sts.number(), + } +}) + +export interface UnlockChunk { + value: bigint + era: number +} + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_deprecate_controller_batch | StakingCall_force_apply_min_commission | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_payout_stakers_by_page | StakingCall_reap_stash | StakingCall_rebond | StakingCall_restore_ledger | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_invulnerables | StakingCall_set_min_commission | StakingCall_set_payee | StakingCall_set_staking_configs | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_update_payee | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * See [`Pallet::bond`]. + */ +export interface StakingCall_bond { + __kind: 'bond' + value: bigint + payee: RewardDestination +} + +/** + * See [`Pallet::bond_extra`]. + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * See [`Pallet::cancel_deferred_slash`]. + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: number + slashIndices: number[] +} + +/** + * See [`Pallet::chill`]. + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * See [`Pallet::chill_other`]. + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + stash: AccountId32 +} + +/** + * See [`Pallet::deprecate_controller_batch`]. + */ +export interface StakingCall_deprecate_controller_batch { + __kind: 'deprecate_controller_batch' + controllers: AccountId32[] +} + +/** + * See [`Pallet::force_apply_min_commission`]. + */ +export interface StakingCall_force_apply_min_commission { + __kind: 'force_apply_min_commission' + validatorStash: AccountId32 +} + +/** + * See [`Pallet::force_new_era`]. + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * See [`Pallet::force_new_era_always`]. + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * See [`Pallet::force_no_eras`]. + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * See [`Pallet::force_unstake`]. + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * See [`Pallet::increase_validator_count`]. + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * See [`Pallet::kick`]. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: MultiAddress[] +} + +/** + * See [`Pallet::nominate`]. + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: MultiAddress[] +} + +/** + * See [`Pallet::payout_stakers`]. + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId32 + era: number +} + +/** + * See [`Pallet::payout_stakers_by_page`]. + */ +export interface StakingCall_payout_stakers_by_page { + __kind: 'payout_stakers_by_page' + validatorStash: AccountId32 + era: number + page: number +} + +/** + * See [`Pallet::reap_stash`]. + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * See [`Pallet::rebond`]. + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * See [`Pallet::restore_ledger`]. + */ +export interface StakingCall_restore_ledger { + __kind: 'restore_ledger' + stash: AccountId32 + maybeController?: (AccountId32 | undefined) + maybeTotal?: (bigint | undefined) + maybeUnlocking?: (UnlockChunk[] | undefined) +} + +/** + * See [`Pallet::scale_validator_count`]. + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * See [`Pallet::set_controller`]. + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' +} + +/** + * See [`Pallet::set_invulnerables`]. + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId32[] +} + +/** + * See [`Pallet::set_min_commission`]. + */ +export interface StakingCall_set_min_commission { + __kind: 'set_min_commission' + new: Perbill +} + +/** + * See [`Pallet::set_payee`]. + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * See [`Pallet::set_staking_configs`]. + */ +export interface StakingCall_set_staking_configs { + __kind: 'set_staking_configs' + minNominatorBond: ConfigOp + minValidatorBond: ConfigOp + maxNominatorCount: Type_123 + maxValidatorCount: Type_123 + chillThreshold: Type_124 + minCommission: Type_125 +} + +/** + * See [`Pallet::set_validator_count`]. + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * See [`Pallet::unbond`]. + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * See [`Pallet::update_payee`]. + */ +export interface StakingCall_update_payee { + __kind: 'update_payee' + controller: AccountId32 +} + +/** + * See [`Pallet::validate`]. + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * See [`Pallet::withdraw_unbonded`]. + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bestow_membership: sts.enumStruct({ + candidate: AccountId32, + }), + bid: sts.enumStruct({ + value: sts.bigint(), + }), + claim_membership: sts.unit(), + cleanup_candidacy: sts.enumStruct({ + candidate: AccountId32, + max: sts.number(), + }), + cleanup_challenge: sts.enumStruct({ + challengeRound: sts.number(), + max: sts.number(), + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + dissolve: sts.unit(), + drop_candidate: sts.enumStruct({ + candidate: AccountId32, + }), + found_society: sts.enumStruct({ + founder: MultiAddress, + maxMembers: sts.number(), + maxIntake: sts.number(), + maxStrikes: sts.number(), + candidateDeposit: sts.bigint(), + rules: sts.bytes(), + }), + judge_suspended_member: sts.enumStruct({ + who: MultiAddress, + forgive: sts.boolean(), + }), + kick_candidate: sts.enumStruct({ + candidate: AccountId32, + }), + payout: sts.unit(), + punish_skeptic: sts.unit(), + resign_candidacy: sts.unit(), + set_parameters: sts.enumStruct({ + maxMembers: sts.number(), + maxIntake: sts.number(), + maxStrikes: sts.number(), + candidateDeposit: sts.bigint(), + }), + unbid: sts.unit(), + unvouch: sts.unit(), + vote: sts.enumStruct({ + candidate: MultiAddress, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: MultiAddress, + value: sts.bigint(), + tip: sts.bigint(), + }), + waive_repay: sts.enumStruct({ + amount: sts.bigint(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SocietyCall = SocietyCall_bestow_membership | SocietyCall_bid | SocietyCall_claim_membership | SocietyCall_cleanup_candidacy | SocietyCall_cleanup_challenge | SocietyCall_defender_vote | SocietyCall_dissolve | SocietyCall_drop_candidate | SocietyCall_found_society | SocietyCall_judge_suspended_member | SocietyCall_kick_candidate | SocietyCall_payout | SocietyCall_punish_skeptic | SocietyCall_resign_candidacy | SocietyCall_set_parameters | SocietyCall_unbid | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch | SocietyCall_waive_repay + +/** + * See [`Pallet::bestow_membership`]. + */ +export interface SocietyCall_bestow_membership { + __kind: 'bestow_membership' + candidate: AccountId32 +} + +/** + * See [`Pallet::bid`]. + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: bigint +} + +/** + * See [`Pallet::claim_membership`]. + */ +export interface SocietyCall_claim_membership { + __kind: 'claim_membership' +} + +/** + * See [`Pallet::cleanup_candidacy`]. + */ +export interface SocietyCall_cleanup_candidacy { + __kind: 'cleanup_candidacy' + candidate: AccountId32 + max: number +} + +/** + * See [`Pallet::cleanup_challenge`]. + */ +export interface SocietyCall_cleanup_challenge { + __kind: 'cleanup_challenge' + challengeRound: number + max: number +} + +/** + * See [`Pallet::defender_vote`]. + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * See [`Pallet::dissolve`]. + */ +export interface SocietyCall_dissolve { + __kind: 'dissolve' +} + +/** + * See [`Pallet::drop_candidate`]. + */ +export interface SocietyCall_drop_candidate { + __kind: 'drop_candidate' + candidate: AccountId32 +} + +/** + * See [`Pallet::found_society`]. + */ +export interface SocietyCall_found_society { + __kind: 'found_society' + founder: MultiAddress + maxMembers: number + maxIntake: number + maxStrikes: number + candidateDeposit: bigint + rules: Bytes +} + +/** + * See [`Pallet::judge_suspended_member`]. + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: MultiAddress + forgive: boolean +} + +/** + * See [`Pallet::kick_candidate`]. + */ +export interface SocietyCall_kick_candidate { + __kind: 'kick_candidate' + candidate: AccountId32 +} + +/** + * See [`Pallet::payout`]. + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * See [`Pallet::punish_skeptic`]. + */ +export interface SocietyCall_punish_skeptic { + __kind: 'punish_skeptic' +} + +/** + * See [`Pallet::resign_candidacy`]. + */ +export interface SocietyCall_resign_candidacy { + __kind: 'resign_candidacy' +} + +/** + * See [`Pallet::set_parameters`]. + */ +export interface SocietyCall_set_parameters { + __kind: 'set_parameters' + maxMembers: number + maxIntake: number + maxStrikes: number + candidateDeposit: bigint +} + +/** + * See [`Pallet::unbid`]. + */ +export interface SocietyCall_unbid { + __kind: 'unbid' +} + +/** + * See [`Pallet::unvouch`]. + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' +} + +/** + * See [`Pallet::vote`]. + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: MultiAddress + approve: boolean +} + +/** + * See [`Pallet::vouch`]. + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: MultiAddress + value: bigint + tip: bigint +} + +/** + * See [`Pallet::waive_repay`]. + */ +export interface SocietyCall_waive_repay { + __kind: 'waive_repay' + amount: bigint +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: Id, + }), + force_lease: sts.enumStruct({ + para: Id, + leaser: AccountId32, + amount: sts.bigint(), + periodBegin: sts.number(), + periodCount: sts.number(), + }), + trigger_onboard: sts.enumStruct({ + para: Id, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * See [`Pallet::clear_all_leases`]. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: Id +} + +/** + * See [`Pallet::force_lease`]. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: Id + leaser: AccountId32 + amount: bigint + periodBegin: number + periodCount: number +} + +/** + * See [`Pallet::trigger_onboard`]. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: Id +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: SessionKeys, + proof: sts.bytes(), + }), + } +}) + +export const SessionKeys: sts.Type = sts.struct(() => { + return { + grandpa: Public, + babe: sts.bytes(), + paraValidator: V6Public, + paraAssignment: sts.bytes(), + authorityDiscovery: sts.bytes(), + beefy: sts.bytes(), + } +}) + +export const V6Public = sts.bytes() + +export const Public = sts.bytes() + +export interface SessionKeys { + grandpa: Public + babe: Bytes + paraValidator: V6Public + paraAssignment: Bytes + authorityDiscovery: Bytes + beefy: Bytes +} + +export type V6Public = Bytes + +export type Public = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * See [`Pallet::purge_keys`]. + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * See [`Pallet::set_keys`]. + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: SessionKeys + proof: Bytes +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: sts.number(), + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_after: sts.enumStruct({ + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * See [`Pallet::cancel`]. + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: number + index: number +} + +/** + * See [`Pallet::cancel_named`]. + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * See [`Pallet::schedule`]. + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * See [`Pallet::schedule_after`]. + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * See [`Pallet::schedule_named`]. + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * See [`Pallet::schedule_named_after`]. + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + add_lock: sts.enumStruct({ + para: Id, + }), + deregister: sts.enumStruct({ + id: Id, + }), + force_register: sts.enumStruct({ + who: AccountId32, + deposit: sts.bigint(), + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + register: sts.enumStruct({ + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + remove_lock: sts.enumStruct({ + para: Id, + }), + reserve: sts.unit(), + schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + swap: sts.enumStruct({ + id: Id, + other: Id, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type RegistrarCall = RegistrarCall_add_lock | RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_register | RegistrarCall_remove_lock | RegistrarCall_reserve | RegistrarCall_schedule_code_upgrade | RegistrarCall_set_current_head | RegistrarCall_swap + +/** + * See [`Pallet::add_lock`]. + */ +export interface RegistrarCall_add_lock { + __kind: 'add_lock' + para: Id +} + +/** + * See [`Pallet::deregister`]. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: Id +} + +/** + * See [`Pallet::force_register`]. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId32 + deposit: bigint + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * See [`Pallet::register`]. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * See [`Pallet::remove_lock`]. + */ +export interface RegistrarCall_remove_lock { + __kind: 'remove_lock' + para: Id +} + +/** + * See [`Pallet::reserve`]. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * See [`Pallet::schedule_code_upgrade`]. + */ +export interface RegistrarCall_schedule_code_upgrade { + __kind: 'schedule_code_upgrade' + para: Id + newCode: ValidationCode +} + +/** + * See [`Pallet::set_current_head`]. + */ +export interface RegistrarCall_set_current_head { + __kind: 'set_current_head' + para: Id + newHead: HeadData +} + +/** + * See [`Pallet::swap`]. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: Id + other: Id +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ReferendaCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + index: sts.number(), + }), + kill: sts.enumStruct({ + index: sts.number(), + }), + nudge_referendum: sts.enumStruct({ + index: sts.number(), + }), + one_fewer_deciding: sts.enumStruct({ + track: sts.number(), + }), + place_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_submission_deposit: sts.enumStruct({ + index: sts.number(), + }), + set_metadata: sts.enumStruct({ + index: sts.number(), + maybeHash: sts.option(() => H256), + }), + submit: sts.enumStruct({ + proposalOrigin: OriginCaller, + proposal: Bounded, + enactmentMoment: DispatchTime, + }), + } +}) + +export const DispatchTime: sts.Type = sts.closedEnum(() => { + return { + After: sts.number(), + At: sts.number(), + } +}) + +export type DispatchTime = DispatchTime_After | DispatchTime_At + +export interface DispatchTime_After { + __kind: 'After' + value: number +} + +export interface DispatchTime_At { + __kind: 'At' + value: number +} + +export const Bounded: sts.Type = sts.closedEnum(() => { + return { + Inline: sts.bytes(), + Legacy: sts.enumStruct({ + hash: H256, + }), + Lookup: sts.enumStruct({ + hash: H256, + len: sts.number(), + }), + } +}) + +export type Bounded = Bounded_Inline | Bounded_Legacy | Bounded_Lookup + +export interface Bounded_Inline { + __kind: 'Inline' + value: Bytes +} + +export interface Bounded_Legacy { + __kind: 'Legacy' + hash: H256 +} + +export interface Bounded_Lookup { + __kind: 'Lookup' + hash: H256 + len: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ReferendaCall = ReferendaCall_cancel | ReferendaCall_kill | ReferendaCall_nudge_referendum | ReferendaCall_one_fewer_deciding | ReferendaCall_place_decision_deposit | ReferendaCall_refund_decision_deposit | ReferendaCall_refund_submission_deposit | ReferendaCall_set_metadata | ReferendaCall_submit + +/** + * See [`Pallet::cancel`]. + */ +export interface ReferendaCall_cancel { + __kind: 'cancel' + index: number +} + +/** + * See [`Pallet::kill`]. + */ +export interface ReferendaCall_kill { + __kind: 'kill' + index: number +} + +/** + * See [`Pallet::nudge_referendum`]. + */ +export interface ReferendaCall_nudge_referendum { + __kind: 'nudge_referendum' + index: number +} + +/** + * See [`Pallet::one_fewer_deciding`]. + */ +export interface ReferendaCall_one_fewer_deciding { + __kind: 'one_fewer_deciding' + track: number +} + +/** + * See [`Pallet::place_decision_deposit`]. + */ +export interface ReferendaCall_place_decision_deposit { + __kind: 'place_decision_deposit' + index: number +} + +/** + * See [`Pallet::refund_decision_deposit`]. + */ +export interface ReferendaCall_refund_decision_deposit { + __kind: 'refund_decision_deposit' + index: number +} + +/** + * See [`Pallet::refund_submission_deposit`]. + */ +export interface ReferendaCall_refund_submission_deposit { + __kind: 'refund_submission_deposit' + index: number +} + +/** + * See [`Pallet::set_metadata`]. + */ +export interface ReferendaCall_set_metadata { + __kind: 'set_metadata' + index: number + maybeHash?: (H256 | undefined) +} + +/** + * See [`Pallet::submit`]. + */ +export interface ReferendaCall_submit { + __kind: 'submit' + proposalOrigin: OriginCaller + proposal: Bounded + enactmentMoment: DispatchTime +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: MultiAddress, + call: Call, + }), + cancel_recovered: sts.enumStruct({ + account: MultiAddress, + }), + claim_recovery: sts.enumStruct({ + account: MultiAddress, + }), + close_recovery: sts.enumStruct({ + rescuer: MultiAddress, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId32), + threshold: sts.number(), + delayPeriod: sts.number(), + }), + initiate_recovery: sts.enumStruct({ + account: MultiAddress, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + vouch_recovery: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * See [`Pallet::as_recovered`]. + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: MultiAddress + call: Call +} + +/** + * See [`Pallet::cancel_recovered`]. + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: MultiAddress +} + +/** + * See [`Pallet::claim_recovery`]. + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: MultiAddress +} + +/** + * See [`Pallet::close_recovery`]. + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: MultiAddress +} + +/** + * See [`Pallet::create_recovery`]. + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId32[] + threshold: number + delayPeriod: number +} + +/** + * See [`Pallet::initiate_recovery`]. + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: MultiAddress +} + +/** + * See [`Pallet::remove_recovery`]. + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * See [`Pallet::set_recovered`]. + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * See [`Pallet::vouch_recovery`]. + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + announce: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + create_pure: sts.enumStruct({ + proxyType: ProxyType, + delay: sts.number(), + index: sts.number(), + }), + kill_pure: sts.enumStruct({ + spawner: MultiAddress, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + proxy_announced: sts.enumStruct({ + delegate: MultiAddress, + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + reject_announcement: sts.enumStruct({ + delegate: MultiAddress, + callHash: H256, + }), + remove_announcement: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_create_pure | ProxyCall_kill_pure | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * See [`Pallet::add_proxy`]. + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +/** + * See [`Pallet::announce`]. + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: MultiAddress + callHash: H256 +} + +/** + * See [`Pallet::create_pure`]. + */ +export interface ProxyCall_create_pure { + __kind: 'create_pure' + proxyType: ProxyType + delay: number + index: number +} + +/** + * See [`Pallet::kill_pure`]. + */ +export interface ProxyCall_kill_pure { + __kind: 'kill_pure' + spawner: MultiAddress + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * See [`Pallet::proxy`]. + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * See [`Pallet::proxy_announced`]. + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: MultiAddress + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * See [`Pallet::reject_announcement`]. + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: MultiAddress + callHash: H256 +} + +/** + * See [`Pallet::remove_announcement`]. + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: MultiAddress + callHash: H256 +} + +/** + * See [`Pallet::remove_proxies`]. + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * See [`Pallet::remove_proxy`]. + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NominationPools | ProxyType_NonTransfer | ProxyType_Society | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NominationPools { + __kind: 'NominationPools' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Society { + __kind: 'Society' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const PreimageCall: sts.Type = sts.closedEnum(() => { + return { + ensure_updated: sts.enumStruct({ + hashes: sts.array(() => H256), + }), + note_preimage: sts.enumStruct({ + bytes: sts.bytes(), + }), + request_preimage: sts.enumStruct({ + hash: H256, + }), + unnote_preimage: sts.enumStruct({ + hash: H256, + }), + unrequest_preimage: sts.enumStruct({ + hash: H256, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type PreimageCall = PreimageCall_ensure_updated | PreimageCall_note_preimage | PreimageCall_request_preimage | PreimageCall_unnote_preimage | PreimageCall_unrequest_preimage + +/** + * See [`Pallet::ensure_updated`]. + */ +export interface PreimageCall_ensure_updated { + __kind: 'ensure_updated' + hashes: H256[] +} + +/** + * See [`Pallet::note_preimage`]. + */ +export interface PreimageCall_note_preimage { + __kind: 'note_preimage' + bytes: Bytes +} + +/** + * See [`Pallet::request_preimage`]. + */ +export interface PreimageCall_request_preimage { + __kind: 'request_preimage' + hash: H256 +} + +/** + * See [`Pallet::unnote_preimage`]. + */ +export interface PreimageCall_unnote_preimage { + __kind: 'unnote_preimage' + hash: H256 +} + +/** + * See [`Pallet::unrequest_preimage`]. + */ +export interface PreimageCall_unrequest_preimage { + __kind: 'unrequest_preimage' + hash: H256 +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParasSlashingCall: sts.Type = sts.closedEnum(() => { + return { + report_dispute_lost_unsigned: sts.enumStruct({ + disputeProof: V6DisputeProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: sts.number(), + trieNodes: sts.array(() => sts.bytes()), + validatorCount: sts.number(), + } +}) + +export interface MembershipProof { + session: number + trieNodes: Bytes[] + validatorCount: number +} + +export const V6DisputeProof: sts.Type = sts.struct(() => { + return { + timeSlot: V6DisputesTimeSlot, + kind: V6SlashingOffenceKind, + validatorIndex: V6ValidatorIndex, + validatorId: V6Public, + } +}) + +export const V6ValidatorIndex = sts.number() + +export const V6SlashingOffenceKind: sts.Type = sts.closedEnum(() => { + return { + AgainstValid: sts.unit(), + ForInvalid: sts.unit(), + } +}) + +export type V6SlashingOffenceKind = V6SlashingOffenceKind_AgainstValid | V6SlashingOffenceKind_ForInvalid + +export interface V6SlashingOffenceKind_AgainstValid { + __kind: 'AgainstValid' +} + +export interface V6SlashingOffenceKind_ForInvalid { + __kind: 'ForInvalid' +} + +export const V6DisputesTimeSlot: sts.Type = sts.struct(() => { + return { + sessionIndex: sts.number(), + candidateHash: CandidateHash, + } +}) + +export const CandidateHash = sts.bytes() + +export interface V6DisputesTimeSlot { + sessionIndex: number + candidateHash: CandidateHash +} + +export type CandidateHash = Bytes + +export interface V6DisputeProof { + timeSlot: V6DisputesTimeSlot + kind: V6SlashingOffenceKind + validatorIndex: V6ValidatorIndex + validatorId: V6Public +} + +export type V6ValidatorIndex = number + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParasSlashingCall = ParasSlashingCall_report_dispute_lost_unsigned + +/** + * See [`Pallet::report_dispute_lost_unsigned`]. + */ +export interface ParasSlashingCall_report_dispute_lost_unsigned { + __kind: 'report_dispute_lost_unsigned' + disputeProof: V6DisputeProof + keyOwnerProof: MembershipProof +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParasSharedCall = never + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParasDisputesCall: sts.Type = sts.closedEnum(() => { + return { + force_unfreeze: sts.unit(), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParasDisputesCall = ParasDisputesCall_force_unfreeze + +/** + * See [`Pallet::force_unfreeze`]. + */ +export interface ParasDisputesCall_force_unfreeze { + __kind: 'force_unfreeze' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + add_trusted_validation_code: sts.enumStruct({ + validationCode: ValidationCode, + }), + force_note_new_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: Id, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + relayParentNumber: sts.number(), + }), + force_set_current_code: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_set_most_recent_context: sts.enumStruct({ + para: Id, + context: sts.number(), + }), + include_pvf_check_statement: sts.enumStruct({ + stmt: V6PvfCheckStatement, + signature: V6Signature, + }), + poke_unused_validation_code: sts.enumStruct({ + validationCodeHash: ValidationCodeHash, + }), + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const V6Signature = sts.bytes() + +export const V6PvfCheckStatement: sts.Type = sts.struct(() => { + return { + accept: sts.boolean(), + subject: ValidationCodeHash, + sessionIndex: sts.number(), + validatorIndex: V6ValidatorIndex, + } +}) + +export interface V6PvfCheckStatement { + accept: boolean + subject: ValidationCodeHash + sessionIndex: number + validatorIndex: V6ValidatorIndex +} + +export type ValidationCodeHash = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParasCall = ParasCall_add_trusted_validation_code | ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head | ParasCall_force_set_most_recent_context | ParasCall_include_pvf_check_statement | ParasCall_poke_unused_validation_code + +/** + * See [`Pallet::add_trusted_validation_code`]. + */ +export interface ParasCall_add_trusted_validation_code { + __kind: 'add_trusted_validation_code' + validationCode: ValidationCode +} + +/** + * See [`Pallet::force_note_new_head`]. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: Id + newHead: HeadData +} + +/** + * See [`Pallet::force_queue_action`]. + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: Id +} + +/** + * See [`Pallet::force_schedule_code_upgrade`]. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: Id + newCode: ValidationCode + relayParentNumber: number +} + +/** + * See [`Pallet::force_set_current_code`]. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: Id + newCode: ValidationCode +} + +/** + * See [`Pallet::force_set_current_head`]. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: Id + newHead: HeadData +} + +/** + * See [`Pallet::force_set_most_recent_context`]. + */ +export interface ParasCall_force_set_most_recent_context { + __kind: 'force_set_most_recent_context' + para: Id + context: number +} + +/** + * See [`Pallet::include_pvf_check_statement`]. + */ +export interface ParasCall_include_pvf_check_statement { + __kind: 'include_pvf_check_statement' + stmt: V6PvfCheckStatement + signature: V6Signature +} + +/** + * See [`Pallet::poke_unused_validation_code`]. + */ +export interface ParasCall_poke_unused_validation_code { + __kind: 'poke_unused_validation_code' + validationCodeHash: ValidationCodeHash +} + +export type V6Signature = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParaInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: V6InherentData, + }), + } +}) + +export const V6InherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => V6UncheckedSigned), + backedCandidates: sts.array(() => V6BackedCandidate), + disputes: sts.array(() => V6DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: H256, + number: sts.number(), + stateRoot: H256, + extrinsicsRoot: H256, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + Consensus: sts.tuple(() => [sts.bytes(), sts.bytes()]), + Other: sts.bytes(), + PreRuntime: sts.tuple(() => [sts.bytes(), sts.bytes()]), + RuntimeEnvironmentUpdated: sts.unit(), + Seal: sts.tuple(() => [sts.bytes(), sts.bytes()]), + } +}) + +export type DigestItem = DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: [Bytes, Bytes] +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: [Bytes, Bytes] +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: [Bytes, Bytes] +} + +export interface Digest { + logs: DigestItem[] +} + +export interface Header { + parentHash: H256 + number: number + stateRoot: H256 + extrinsicsRoot: H256 + digest: Digest +} + +export const V6DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: sts.number(), + statements: sts.array(() => sts.tuple(() => [V6DisputeStatement, V6ValidatorIndex, V6Signature])), + } +}) + +export const V6DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: V6InvalidDisputeStatementKind, + Valid: V6ValidDisputeStatementKind, + } +}) + +export const V6ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + ApprovalCheckingMultipleCandidates: sts.array(() => CandidateHash), + BackingSeconded: H256, + BackingValid: H256, + Explicit: sts.unit(), + } +}) + +export type V6ValidDisputeStatementKind = V6ValidDisputeStatementKind_ApprovalChecking | V6ValidDisputeStatementKind_ApprovalCheckingMultipleCandidates | V6ValidDisputeStatementKind_BackingSeconded | V6ValidDisputeStatementKind_BackingValid | V6ValidDisputeStatementKind_Explicit + +export interface V6ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface V6ValidDisputeStatementKind_ApprovalCheckingMultipleCandidates { + __kind: 'ApprovalCheckingMultipleCandidates' + value: CandidateHash[] +} + +export interface V6ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: H256 +} + +export interface V6ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: H256 +} + +export interface V6ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export const V6InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export type V6InvalidDisputeStatementKind = V6InvalidDisputeStatementKind_Explicit + +export interface V6InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type V6DisputeStatement = V6DisputeStatement_Invalid | V6DisputeStatement_Valid + +export interface V6DisputeStatement_Invalid { + __kind: 'Invalid' + value: V6InvalidDisputeStatementKind +} + +export interface V6DisputeStatement_Valid { + __kind: 'Valid' + value: V6ValidDisputeStatementKind +} + +export interface V6DisputeStatementSet { + candidateHash: CandidateHash + session: number + statements: [V6DisputeStatement, V6ValidatorIndex, V6Signature][] +} + +export const V6BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: V6CommittedCandidateReceipt, + validityVotes: sts.array(() => V6ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const V6ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: V6Signature, + Implicit: V6Signature, + } +}) + +export type V6ValidityAttestation = V6ValidityAttestation_Explicit | V6ValidityAttestation_Implicit + +export interface V6ValidityAttestation_Explicit { + __kind: 'Explicit' + value: V6Signature +} + +export interface V6ValidityAttestation_Implicit { + __kind: 'Implicit' + value: V6Signature +} + +export const V6CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: V6CandidateDescriptor, + commitments: V6CandidateCommitments, + } +}) + +export const V6CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => sts.bytes()), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: sts.number(), + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: Id, + data: sts.bytes(), + } +}) + +export interface OutboundHrmpMessage { + recipient: Id + data: Bytes +} + +export interface V6CandidateCommitments { + upwardMessages: Bytes[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: number +} + +export const V6CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: Id, + relayParent: H256, + collator: sts.bytes(), + persistedValidationDataHash: H256, + povHash: H256, + erasureRoot: H256, + signature: sts.bytes(), + paraHead: H256, + validationCodeHash: ValidationCodeHash, + } +}) + +export interface V6CandidateDescriptor { + paraId: Id + relayParent: H256 + collator: Bytes + persistedValidationDataHash: H256 + povHash: H256 + erasureRoot: H256 + signature: Bytes + paraHead: H256 + validationCodeHash: ValidationCodeHash +} + +export interface V6CommittedCandidateReceipt { + descriptor: V6CandidateDescriptor + commitments: V6CandidateCommitments +} + +export interface V6BackedCandidate { + candidate: V6CommittedCandidateReceipt + validityVotes: V6ValidityAttestation[] + validatorIndices: BitSequence +} + +export const V6UncheckedSigned: sts.Type = sts.struct(() => { + return { + payload: V6AvailabilityBitfield, + validatorIndex: V6ValidatorIndex, + signature: V6Signature, + } +}) + +export const V6AvailabilityBitfield = sts.bitseq() + +export interface V6UncheckedSigned { + payload: V6AvailabilityBitfield + validatorIndex: V6ValidatorIndex + signature: V6Signature +} + +export type V6AvailabilityBitfield = BitSequence + +export interface V6InherentData { + bitfields: V6UncheckedSigned[] + backedCandidates: V6BackedCandidate[] + disputes: V6DisputeStatementSet[] + parentHeader: Header +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParaInherentCall = ParaInherentCall_enter + +/** + * See [`Pallet::enter`]. + */ +export interface ParaInherentCall_enter { + __kind: 'enter' + data: V6InherentData +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParaInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParaInclusionCall = never + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const OnDemandAssignmentProviderCall: sts.Type = sts.closedEnum(() => { + return { + place_order_allow_death: sts.enumStruct({ + maxAmount: sts.bigint(), + paraId: Id, + }), + place_order_keep_alive: sts.enumStruct({ + maxAmount: sts.bigint(), + paraId: Id, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type OnDemandAssignmentProviderCall = OnDemandAssignmentProviderCall_place_order_allow_death | OnDemandAssignmentProviderCall_place_order_keep_alive + +/** + * See [`Pallet::place_order_allow_death`]. + */ +export interface OnDemandAssignmentProviderCall_place_order_allow_death { + __kind: 'place_order_allow_death' + maxAmount: bigint + paraId: Id +} + +/** + * See [`Pallet::place_order_keep_alive`]. + */ +export interface OnDemandAssignmentProviderCall_place_order_keep_alive { + __kind: 'place_order_keep_alive' + maxAmount: bigint + paraId: Id +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const NominationPoolsCall: sts.Type = sts.closedEnum(() => { + return { + adjust_pool_deposit: sts.enumStruct({ + poolId: sts.number(), + }), + bond_extra: sts.enumStruct({ + extra: BondExtra, + }), + bond_extra_other: sts.enumStruct({ + member: MultiAddress, + extra: BondExtra, + }), + chill: sts.enumStruct({ + poolId: sts.number(), + }), + claim_commission: sts.enumStruct({ + poolId: sts.number(), + }), + claim_payout: sts.unit(), + claim_payout_other: sts.enumStruct({ + other: AccountId32, + }), + create: sts.enumStruct({ + amount: sts.bigint(), + root: MultiAddress, + nominator: MultiAddress, + bouncer: MultiAddress, + }), + create_with_pool_id: sts.enumStruct({ + amount: sts.bigint(), + root: MultiAddress, + nominator: MultiAddress, + bouncer: MultiAddress, + poolId: sts.number(), + }), + join: sts.enumStruct({ + amount: sts.bigint(), + poolId: sts.number(), + }), + nominate: sts.enumStruct({ + poolId: sts.number(), + validators: sts.array(() => AccountId32), + }), + pool_withdraw_unbonded: sts.enumStruct({ + poolId: sts.number(), + numSlashingSpans: sts.number(), + }), + set_claim_permission: sts.enumStruct({ + permission: ClaimPermission, + }), + set_commission: sts.enumStruct({ + poolId: sts.number(), + newCommission: sts.option(() => sts.tuple(() => [Perbill, AccountId32])), + }), + set_commission_change_rate: sts.enumStruct({ + poolId: sts.number(), + changeRate: CommissionChangeRate, + }), + set_commission_claim_permission: sts.enumStruct({ + poolId: sts.number(), + permission: sts.option(() => CommissionClaimPermission), + }), + set_commission_max: sts.enumStruct({ + poolId: sts.number(), + maxCommission: Perbill, + }), + set_configs: sts.enumStruct({ + minJoinBond: Type_337, + minCreateBond: Type_337, + maxPools: Type_338, + maxMembers: Type_338, + maxMembersPerPool: Type_338, + globalMaxCommission: Type_339, + }), + set_metadata: sts.enumStruct({ + poolId: sts.number(), + metadata: sts.bytes(), + }), + set_state: sts.enumStruct({ + poolId: sts.number(), + state: PoolState, + }), + unbond: sts.enumStruct({ + memberAccount: MultiAddress, + unbondingPoints: sts.bigint(), + }), + update_roles: sts.enumStruct({ + poolId: sts.number(), + newRoot: Type_340, + newNominator: Type_340, + newBouncer: Type_340, + }), + withdraw_unbonded: sts.enumStruct({ + memberAccount: MultiAddress, + numSlashingSpans: sts.number(), + }), + } +}) + +export const Type_340: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: AccountId32, + } +}) + +export type Type_340 = Type_340_Noop | Type_340_Remove | Type_340_Set + +export interface Type_340_Noop { + __kind: 'Noop' +} + +export interface Type_340_Remove { + __kind: 'Remove' +} + +export interface Type_340_Set { + __kind: 'Set' + value: AccountId32 +} + +export const PoolState: sts.Type = sts.closedEnum(() => { + return { + Blocked: sts.unit(), + Destroying: sts.unit(), + Open: sts.unit(), + } +}) + +export type PoolState = PoolState_Blocked | PoolState_Destroying | PoolState_Open + +export interface PoolState_Blocked { + __kind: 'Blocked' +} + +export interface PoolState_Destroying { + __kind: 'Destroying' +} + +export interface PoolState_Open { + __kind: 'Open' +} + +export const Type_339: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export type Type_339 = Type_339_Noop | Type_339_Remove | Type_339_Set + +export interface Type_339_Noop { + __kind: 'Noop' +} + +export interface Type_339_Remove { + __kind: 'Remove' +} + +export interface Type_339_Set { + __kind: 'Set' + value: Perbill +} + +export const Type_338: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_338 = Type_338_Noop | Type_338_Remove | Type_338_Set + +export interface Type_338_Noop { + __kind: 'Noop' +} + +export interface Type_338_Remove { + __kind: 'Remove' +} + +export interface Type_338_Set { + __kind: 'Set' + value: number +} + +export const Type_337: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type Type_337 = Type_337_Noop | Type_337_Remove | Type_337_Set + +export interface Type_337_Noop { + __kind: 'Noop' +} + +export interface Type_337_Remove { + __kind: 'Remove' +} + +export interface Type_337_Set { + __kind: 'Set' + value: bigint +} + +export const CommissionClaimPermission: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Permissionless: sts.unit(), + } +}) + +export type CommissionClaimPermission = CommissionClaimPermission_Account | CommissionClaimPermission_Permissionless + +export interface CommissionClaimPermission_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface CommissionClaimPermission_Permissionless { + __kind: 'Permissionless' +} + +export const CommissionChangeRate: sts.Type = sts.struct(() => { + return { + maxIncrease: Perbill, + minDelay: sts.number(), + } +}) + +export interface CommissionChangeRate { + maxIncrease: Perbill + minDelay: number +} + +export const ClaimPermission: sts.Type = sts.closedEnum(() => { + return { + Permissioned: sts.unit(), + PermissionlessAll: sts.unit(), + PermissionlessCompound: sts.unit(), + PermissionlessWithdraw: sts.unit(), + } +}) + +export type ClaimPermission = ClaimPermission_Permissioned | ClaimPermission_PermissionlessAll | ClaimPermission_PermissionlessCompound | ClaimPermission_PermissionlessWithdraw + +export interface ClaimPermission_Permissioned { + __kind: 'Permissioned' +} + +export interface ClaimPermission_PermissionlessAll { + __kind: 'PermissionlessAll' +} + +export interface ClaimPermission_PermissionlessCompound { + __kind: 'PermissionlessCompound' +} + +export interface ClaimPermission_PermissionlessWithdraw { + __kind: 'PermissionlessWithdraw' +} + +export const BondExtra: sts.Type = sts.closedEnum(() => { + return { + FreeBalance: sts.bigint(), + Rewards: sts.unit(), + } +}) + +export type BondExtra = BondExtra_FreeBalance | BondExtra_Rewards + +export interface BondExtra_FreeBalance { + __kind: 'FreeBalance' + value: bigint +} + +export interface BondExtra_Rewards { + __kind: 'Rewards' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type NominationPoolsCall = NominationPoolsCall_adjust_pool_deposit | NominationPoolsCall_bond_extra | NominationPoolsCall_bond_extra_other | NominationPoolsCall_chill | NominationPoolsCall_claim_commission | NominationPoolsCall_claim_payout | NominationPoolsCall_claim_payout_other | NominationPoolsCall_create | NominationPoolsCall_create_with_pool_id | NominationPoolsCall_join | NominationPoolsCall_nominate | NominationPoolsCall_pool_withdraw_unbonded | NominationPoolsCall_set_claim_permission | NominationPoolsCall_set_commission | NominationPoolsCall_set_commission_change_rate | NominationPoolsCall_set_commission_claim_permission | NominationPoolsCall_set_commission_max | NominationPoolsCall_set_configs | NominationPoolsCall_set_metadata | NominationPoolsCall_set_state | NominationPoolsCall_unbond | NominationPoolsCall_update_roles | NominationPoolsCall_withdraw_unbonded + +/** + * See [`Pallet::adjust_pool_deposit`]. + */ +export interface NominationPoolsCall_adjust_pool_deposit { + __kind: 'adjust_pool_deposit' + poolId: number +} + +/** + * See [`Pallet::bond_extra`]. + */ +export interface NominationPoolsCall_bond_extra { + __kind: 'bond_extra' + extra: BondExtra +} + +/** + * See [`Pallet::bond_extra_other`]. + */ +export interface NominationPoolsCall_bond_extra_other { + __kind: 'bond_extra_other' + member: MultiAddress + extra: BondExtra +} + +/** + * See [`Pallet::chill`]. + */ +export interface NominationPoolsCall_chill { + __kind: 'chill' + poolId: number +} + +/** + * See [`Pallet::claim_commission`]. + */ +export interface NominationPoolsCall_claim_commission { + __kind: 'claim_commission' + poolId: number +} + +/** + * See [`Pallet::claim_payout`]. + */ +export interface NominationPoolsCall_claim_payout { + __kind: 'claim_payout' +} + +/** + * See [`Pallet::claim_payout_other`]. + */ +export interface NominationPoolsCall_claim_payout_other { + __kind: 'claim_payout_other' + other: AccountId32 +} + +/** + * See [`Pallet::create`]. + */ +export interface NominationPoolsCall_create { + __kind: 'create' + amount: bigint + root: MultiAddress + nominator: MultiAddress + bouncer: MultiAddress +} + +/** + * See [`Pallet::create_with_pool_id`]. + */ +export interface NominationPoolsCall_create_with_pool_id { + __kind: 'create_with_pool_id' + amount: bigint + root: MultiAddress + nominator: MultiAddress + bouncer: MultiAddress + poolId: number +} + +/** + * See [`Pallet::join`]. + */ +export interface NominationPoolsCall_join { + __kind: 'join' + amount: bigint + poolId: number +} + +/** + * See [`Pallet::nominate`]. + */ +export interface NominationPoolsCall_nominate { + __kind: 'nominate' + poolId: number + validators: AccountId32[] +} + +/** + * See [`Pallet::pool_withdraw_unbonded`]. + */ +export interface NominationPoolsCall_pool_withdraw_unbonded { + __kind: 'pool_withdraw_unbonded' + poolId: number + numSlashingSpans: number +} + +/** + * See [`Pallet::set_claim_permission`]. + */ +export interface NominationPoolsCall_set_claim_permission { + __kind: 'set_claim_permission' + permission: ClaimPermission +} + +/** + * See [`Pallet::set_commission`]. + */ +export interface NominationPoolsCall_set_commission { + __kind: 'set_commission' + poolId: number + newCommission?: ([Perbill, AccountId32] | undefined) +} + +/** + * See [`Pallet::set_commission_change_rate`]. + */ +export interface NominationPoolsCall_set_commission_change_rate { + __kind: 'set_commission_change_rate' + poolId: number + changeRate: CommissionChangeRate +} + +/** + * See [`Pallet::set_commission_claim_permission`]. + */ +export interface NominationPoolsCall_set_commission_claim_permission { + __kind: 'set_commission_claim_permission' + poolId: number + permission?: (CommissionClaimPermission | undefined) +} + +/** + * See [`Pallet::set_commission_max`]. + */ +export interface NominationPoolsCall_set_commission_max { + __kind: 'set_commission_max' + poolId: number + maxCommission: Perbill +} + +/** + * See [`Pallet::set_configs`]. + */ +export interface NominationPoolsCall_set_configs { + __kind: 'set_configs' + minJoinBond: Type_337 + minCreateBond: Type_337 + maxPools: Type_338 + maxMembers: Type_338 + maxMembersPerPool: Type_338 + globalMaxCommission: Type_339 +} + +/** + * See [`Pallet::set_metadata`]. + */ +export interface NominationPoolsCall_set_metadata { + __kind: 'set_metadata' + poolId: number + metadata: Bytes +} + +/** + * See [`Pallet::set_state`]. + */ +export interface NominationPoolsCall_set_state { + __kind: 'set_state' + poolId: number + state: PoolState +} + +/** + * See [`Pallet::unbond`]. + */ +export interface NominationPoolsCall_unbond { + __kind: 'unbond' + memberAccount: MultiAddress + unbondingPoints: bigint +} + +/** + * See [`Pallet::update_roles`]. + */ +export interface NominationPoolsCall_update_roles { + __kind: 'update_roles' + poolId: number + newRoot: Type_340 + newNominator: Type_340 + newBouncer: Type_340 +} + +/** + * See [`Pallet::withdraw_unbonded`]. + */ +export interface NominationPoolsCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + memberAccount: MultiAddress + numSlashingSpans: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const NisCounterpartBalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_adjust_total_issuance: sts.enumStruct({ + direction: AdjustmentDirection, + delta: sts.bigint(), + }), + force_set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + }), + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_allow_death: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + upgrade_accounts: sts.enumStruct({ + who: sts.array(() => AccountId32), + }), + } +}) + +export const AdjustmentDirection: sts.Type = sts.closedEnum(() => { + return { + Decrease: sts.unit(), + Increase: sts.unit(), + } +}) + +export type AdjustmentDirection = AdjustmentDirection_Decrease | AdjustmentDirection_Increase + +export interface AdjustmentDirection_Decrease { + __kind: 'Decrease' +} + +export interface AdjustmentDirection_Increase { + __kind: 'Increase' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type NisCounterpartBalancesCall = NisCounterpartBalancesCall_force_adjust_total_issuance | NisCounterpartBalancesCall_force_set_balance | NisCounterpartBalancesCall_force_transfer | NisCounterpartBalancesCall_force_unreserve | NisCounterpartBalancesCall_transfer_all | NisCounterpartBalancesCall_transfer_allow_death | NisCounterpartBalancesCall_transfer_keep_alive | NisCounterpartBalancesCall_upgrade_accounts + +/** + * See [`Pallet::force_adjust_total_issuance`]. + */ +export interface NisCounterpartBalancesCall_force_adjust_total_issuance { + __kind: 'force_adjust_total_issuance' + direction: AdjustmentDirection + delta: bigint +} + +/** + * See [`Pallet::force_set_balance`]. + */ +export interface NisCounterpartBalancesCall_force_set_balance { + __kind: 'force_set_balance' + who: MultiAddress + newFree: bigint +} + +/** + * See [`Pallet::force_transfer`]. + */ +export interface NisCounterpartBalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::force_unreserve`]. + */ +export interface NisCounterpartBalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * See [`Pallet::transfer_all`]. + */ +export interface NisCounterpartBalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * See [`Pallet::transfer_allow_death`]. + */ +export interface NisCounterpartBalancesCall_transfer_allow_death { + __kind: 'transfer_allow_death' + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::transfer_keep_alive`]. + */ +export interface NisCounterpartBalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::upgrade_accounts`]. + */ +export interface NisCounterpartBalancesCall_upgrade_accounts { + __kind: 'upgrade_accounts' + who: AccountId32[] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const NisCall: sts.Type = sts.closedEnum(() => { + return { + communify: sts.enumStruct({ + index: sts.number(), + }), + fund_deficit: sts.unit(), + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + privatize: sts.enumStruct({ + index: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + thaw_communal: sts.enumStruct({ + index: sts.number(), + }), + thaw_private: sts.enumStruct({ + index: sts.number(), + maybeProportion: sts.option(() => Perquintill), + }), + } +}) + +export const Perquintill = sts.bigint() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type NisCall = NisCall_communify | NisCall_fund_deficit | NisCall_place_bid | NisCall_privatize | NisCall_retract_bid | NisCall_thaw_communal | NisCall_thaw_private + +/** + * See [`Pallet::communify`]. + */ +export interface NisCall_communify { + __kind: 'communify' + index: number +} + +/** + * See [`Pallet::fund_deficit`]. + */ +export interface NisCall_fund_deficit { + __kind: 'fund_deficit' +} + +/** + * See [`Pallet::place_bid`]. + */ +export interface NisCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * See [`Pallet::privatize`]. + */ +export interface NisCall_privatize { + __kind: 'privatize' + index: number +} + +/** + * See [`Pallet::retract_bid`]. + */ +export interface NisCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * See [`Pallet::thaw_communal`]. + */ +export interface NisCall_thaw_communal { + __kind: 'thaw_communal' + index: number +} + +/** + * See [`Pallet::thaw_private`]. + */ +export interface NisCall_thaw_private { + __kind: 'thaw_private' + index: number + maybeProportion?: (Perquintill | undefined) +} + +export type Perquintill = bigint + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + call: Call, + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId32), + call: Call, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * See [`Pallet::approve_as_multi`]. + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * See [`Pallet::as_multi`]. + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + call: Call + maxWeight: Weight +} + +/** + * See [`Pallet::as_multi_threshold_1`]. + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId32[] + call: Call +} + +/** + * See [`Pallet::cancel_as_multi`]. + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId32[] + timepoint: Timepoint + callHash: Bytes +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const MessageQueueCall: sts.Type = sts.closedEnum(() => { + return { + execute_overweight: sts.enumStruct({ + messageOrigin: AggregateMessageOrigin, + page: sts.number(), + index: sts.number(), + weightLimit: Weight, + }), + reap_page: sts.enumStruct({ + messageOrigin: AggregateMessageOrigin, + pageIndex: sts.number(), + }), + } +}) + +export const AggregateMessageOrigin: sts.Type = sts.closedEnum(() => { + return { + Ump: UmpQueueId, + } +}) + +export const UmpQueueId: sts.Type = sts.closedEnum(() => { + return { + Para: Id, + } +}) + +export type UmpQueueId = UmpQueueId_Para + +export interface UmpQueueId_Para { + __kind: 'Para' + value: Id +} + +export type AggregateMessageOrigin = AggregateMessageOrigin_Ump + +export interface AggregateMessageOrigin_Ump { + __kind: 'Ump' + value: UmpQueueId +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type MessageQueueCall = MessageQueueCall_execute_overweight | MessageQueueCall_reap_page + +/** + * See [`Pallet::execute_overweight`]. + */ +export interface MessageQueueCall_execute_overweight { + __kind: 'execute_overweight' + messageOrigin: AggregateMessageOrigin + page: number + index: number + weightLimit: Weight +} + +/** + * See [`Pallet::reap_page`]. + */ +export interface MessageQueueCall_reap_page { + __kind: 'reap_page' + messageOrigin: AggregateMessageOrigin + pageIndex: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const InitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type InitializerCall = InitializerCall_force_approve + +/** + * See [`Pallet::force_approve`]. + */ +export interface InitializerCall_force_approve { + __kind: 'force_approve' + upTo: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: sts.number(), + }), + force_transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: sts.number(), + }), + freeze: sts.enumStruct({ + index: sts.number(), + }), + transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * See [`Pallet::claim`]. + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: number +} + +/** + * See [`Pallet::force_transfer`]. + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: MultiAddress + index: number + freeze: boolean +} + +/** + * See [`Pallet::free`]. + */ +export interface IndicesCall_free { + __kind: 'free' + index: number +} + +/** + * See [`Pallet::freeze`]. + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: number +} + +/** + * See [`Pallet::transfer`]. + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: MultiAddress + index: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const IdentityMigratorCall: sts.Type = sts.closedEnum(() => { + return { + poke_deposit: sts.enumStruct({ + who: AccountId32, + }), + reap_identity: sts.enumStruct({ + who: AccountId32, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type IdentityMigratorCall = IdentityMigratorCall_poke_deposit | IdentityMigratorCall_reap_identity + +/** + * See [`Pallet::poke_deposit`]. + */ +export interface IdentityMigratorCall_poke_deposit { + __kind: 'poke_deposit' + who: AccountId32 +} + +/** + * See [`Pallet::reap_identity`]. + */ +export interface IdentityMigratorCall_reap_identity { + __kind: 'reap_identity' + who: AccountId32 +} + +/** + * Identity pallet declaration. + */ +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + accept_username: sts.enumStruct({ + username: BoundedVec, + }), + add_registrar: sts.enumStruct({ + account: MultiAddress, + }), + add_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + add_username_authority: sts.enumStruct({ + authority: MultiAddress, + suffix: sts.bytes(), + allocation: sts.number(), + }), + cancel_request: sts.enumStruct({ + regIndex: sts.number(), + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: MultiAddress, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: MultiAddress, + judgement: Judgement, + identity: H256, + }), + quit_sub: sts.unit(), + remove_dangling_username: sts.enumStruct({ + username: BoundedVec, + }), + remove_expired_approval: sts.enumStruct({ + username: BoundedVec, + }), + remove_sub: sts.enumStruct({ + sub: MultiAddress, + }), + remove_username_authority: sts.enumStruct({ + authority: MultiAddress, + }), + rename_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: MultiAddress, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: sts.bigint(), + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_primary_username: sts.enumStruct({ + username: BoundedVec, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId32, Data])), + }), + set_username_for: sts.enumStruct({ + who: MultiAddress, + username: sts.bytes(), + signature: sts.option(() => MultiSignature), + }), + } +}) + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => sts.tuple(() => [Data, Data])), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => sts.bytes()), + image: Data, + twitter: Data, + } +}) + +export interface IdentityInfo { + additional: [Data, Data][] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (Bytes | undefined) + image: Data + twitter: Data +} + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: Bytes +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: Bytes +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: Bytes +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: Bytes +} + +export const Judgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: sts.bigint(), + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export type Judgement = Judgement_Erroneous | Judgement_FeePaid | Judgement_KnownGood | Judgement_LowQuality | Judgement_OutOfDate | Judgement_Reasonable | Judgement_Unknown + +export interface Judgement_Erroneous { + __kind: 'Erroneous' +} + +export interface Judgement_FeePaid { + __kind: 'FeePaid' + value: bigint +} + +export interface Judgement_KnownGood { + __kind: 'KnownGood' +} + +export interface Judgement_LowQuality { + __kind: 'LowQuality' +} + +export interface Judgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface Judgement_Reasonable { + __kind: 'Reasonable' +} + +export interface Judgement_Unknown { + __kind: 'Unknown' +} + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: sts.bytes(), + Keccak256: sts.bytes(), + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: sts.bytes(), + ShaThree256: sts.bytes(), + } +}) + +export const BoundedVec = sts.bytes() + +/** + * Identity pallet declaration. + */ +export type IdentityCall = IdentityCall_accept_username | IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_add_username_authority | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_dangling_username | IdentityCall_remove_expired_approval | IdentityCall_remove_sub | IdentityCall_remove_username_authority | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_primary_username | IdentityCall_set_subs | IdentityCall_set_username_for + +/** + * See [`Pallet::accept_username`]. + */ +export interface IdentityCall_accept_username { + __kind: 'accept_username' + username: BoundedVec +} + +/** + * See [`Pallet::add_registrar`]. + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: MultiAddress +} + +/** + * See [`Pallet::add_sub`]. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: MultiAddress + data: Data +} + +/** + * See [`Pallet::add_username_authority`]. + */ +export interface IdentityCall_add_username_authority { + __kind: 'add_username_authority' + authority: MultiAddress + suffix: Bytes + allocation: number +} + +/** + * See [`Pallet::cancel_request`]. + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: number +} + +/** + * See [`Pallet::clear_identity`]. + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * See [`Pallet::kill_identity`]. + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: MultiAddress +} + +/** + * See [`Pallet::provide_judgement`]. + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: MultiAddress + judgement: Judgement + identity: H256 +} + +/** + * See [`Pallet::quit_sub`]. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * See [`Pallet::remove_dangling_username`]. + */ +export interface IdentityCall_remove_dangling_username { + __kind: 'remove_dangling_username' + username: BoundedVec +} + +/** + * See [`Pallet::remove_expired_approval`]. + */ +export interface IdentityCall_remove_expired_approval { + __kind: 'remove_expired_approval' + username: BoundedVec +} + +/** + * See [`Pallet::remove_sub`]. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: MultiAddress +} + +/** + * See [`Pallet::remove_username_authority`]. + */ +export interface IdentityCall_remove_username_authority { + __kind: 'remove_username_authority' + authority: MultiAddress +} + +/** + * See [`Pallet::rename_sub`]. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: MultiAddress + data: Data +} + +/** + * See [`Pallet::request_judgement`]. + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * See [`Pallet::set_account_id`]. + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: MultiAddress +} + +/** + * See [`Pallet::set_fee`]. + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * See [`Pallet::set_fields`]. + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: bigint +} + +/** + * See [`Pallet::set_identity`]. + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * See [`Pallet::set_primary_username`]. + */ +export interface IdentityCall_set_primary_username { + __kind: 'set_primary_username' + username: BoundedVec +} + +/** + * See [`Pallet::set_subs`]. + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId32, Data][] +} + +/** + * See [`Pallet::set_username_for`]. + */ +export interface IdentityCall_set_username_for { + __kind: 'set_username_for' + who: MultiAddress + username: Bytes + signature?: (MultiSignature | undefined) +} + +export type BoundedVec = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const HrmpCall: sts.Type = sts.closedEnum(() => { + return { + establish_channel_with_system: sts.enumStruct({ + targetSystemChain: Id, + }), + establish_system_channel: sts.enumStruct({ + sender: Id, + recipient: Id, + }), + force_clean_hrmp: sts.enumStruct({ + para: Id, + numInbound: sts.number(), + numOutbound: sts.number(), + }), + force_open_hrmp_channel: sts.enumStruct({ + sender: Id, + recipient: Id, + maxCapacity: sts.number(), + maxMessageSize: sts.number(), + }), + force_process_hrmp_close: sts.enumStruct({ + channels: sts.number(), + }), + force_process_hrmp_open: sts.enumStruct({ + channels: sts.number(), + }), + hrmp_accept_open_channel: sts.enumStruct({ + sender: Id, + }), + hrmp_cancel_open_request: sts.enumStruct({ + channelId: HrmpChannelId, + openRequests: sts.number(), + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: Id, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + poke_channel_deposits: sts.enumStruct({ + sender: Id, + recipient: Id, + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: Id, + recipient: Id, + } +}) + +export interface HrmpChannelId { + sender: Id + recipient: Id +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type HrmpCall = HrmpCall_establish_channel_with_system | HrmpCall_establish_system_channel | HrmpCall_force_clean_hrmp | HrmpCall_force_open_hrmp_channel | HrmpCall_force_process_hrmp_close | HrmpCall_force_process_hrmp_open | HrmpCall_hrmp_accept_open_channel | HrmpCall_hrmp_cancel_open_request | HrmpCall_hrmp_close_channel | HrmpCall_hrmp_init_open_channel | HrmpCall_poke_channel_deposits + +/** + * See [`Pallet::establish_channel_with_system`]. + */ +export interface HrmpCall_establish_channel_with_system { + __kind: 'establish_channel_with_system' + targetSystemChain: Id +} + +/** + * See [`Pallet::establish_system_channel`]. + */ +export interface HrmpCall_establish_system_channel { + __kind: 'establish_system_channel' + sender: Id + recipient: Id +} + +/** + * See [`Pallet::force_clean_hrmp`]. + */ +export interface HrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: Id + numInbound: number + numOutbound: number +} + +/** + * See [`Pallet::force_open_hrmp_channel`]. + */ +export interface HrmpCall_force_open_hrmp_channel { + __kind: 'force_open_hrmp_channel' + sender: Id + recipient: Id + maxCapacity: number + maxMessageSize: number +} + +/** + * See [`Pallet::force_process_hrmp_close`]. + */ +export interface HrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' + channels: number +} + +/** + * See [`Pallet::force_process_hrmp_open`]. + */ +export interface HrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' + channels: number +} + +/** + * See [`Pallet::hrmp_accept_open_channel`]. + */ +export interface HrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: Id +} + +/** + * See [`Pallet::hrmp_cancel_open_request`]. + */ +export interface HrmpCall_hrmp_cancel_open_request { + __kind: 'hrmp_cancel_open_request' + channelId: HrmpChannelId + openRequests: number +} + +/** + * See [`Pallet::hrmp_close_channel`]. + */ +export interface HrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * See [`Pallet::hrmp_init_open_channel`]. + */ +export interface HrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: Id + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +/** + * See [`Pallet::poke_channel_deposits`]. + */ +export interface HrmpCall_poke_channel_deposits { + __kind: 'poke_channel_deposits' + sender: Id + recipient: Id +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: sts.number(), + bestFinalizedBlockNumber: sts.number(), + }), + report_equivocation: sts.enumStruct({ + equivocationProof: Type_142, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_142, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const Type_142: sts.Type = sts.struct(() => { + return { + setId: sts.bigint(), + equivocation: Equivocation, + } +}) + +export const Equivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: Type_150, + Prevote: Type_144, + } +}) + +export const Type_144: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Prevote, Signature]), + second: sts.tuple(() => [Prevote, Signature]), + } +}) + +export const Signature = sts.bytes() + +export const Prevote: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Prevote { + targetHash: H256 + targetNumber: number +} + +export interface Type_144 { + roundNumber: bigint + identity: Public + first: [Prevote, Signature] + second: [Prevote, Signature] +} + +export type Signature = Bytes + +export const Type_150: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Precommit, Signature]), + second: sts.tuple(() => [Precommit, Signature]), + } +}) + +export const Precommit: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Precommit { + targetHash: H256 + targetNumber: number +} + +export interface Type_150 { + roundNumber: bigint + identity: Public + first: [Precommit, Signature] + second: [Precommit, Signature] +} + +export type Equivocation = Equivocation_Precommit | Equivocation_Prevote + +export interface Equivocation_Precommit { + __kind: 'Precommit' + value: Type_150 +} + +export interface Equivocation_Prevote { + __kind: 'Prevote' + value: Type_144 +} + +export interface Type_142 { + setId: bigint + equivocation: Equivocation +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * See [`Pallet::note_stalled`]. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: number + bestFinalizedBlockNumber: number +} + +/** + * See [`Pallet::report_equivocation`]. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_142 + keyOwnerProof: MembershipProof +} + +/** + * See [`Pallet::report_equivocation_unsigned`]. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_142 + keyOwnerProof: MembershipProof +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const FellowshipReferendaCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + index: sts.number(), + }), + kill: sts.enumStruct({ + index: sts.number(), + }), + nudge_referendum: sts.enumStruct({ + index: sts.number(), + }), + one_fewer_deciding: sts.enumStruct({ + track: sts.number(), + }), + place_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_submission_deposit: sts.enumStruct({ + index: sts.number(), + }), + set_metadata: sts.enumStruct({ + index: sts.number(), + maybeHash: sts.option(() => H256), + }), + submit: sts.enumStruct({ + proposalOrigin: OriginCaller, + proposal: Bounded, + enactmentMoment: DispatchTime, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type FellowshipReferendaCall = FellowshipReferendaCall_cancel | FellowshipReferendaCall_kill | FellowshipReferendaCall_nudge_referendum | FellowshipReferendaCall_one_fewer_deciding | FellowshipReferendaCall_place_decision_deposit | FellowshipReferendaCall_refund_decision_deposit | FellowshipReferendaCall_refund_submission_deposit | FellowshipReferendaCall_set_metadata | FellowshipReferendaCall_submit + +/** + * See [`Pallet::cancel`]. + */ +export interface FellowshipReferendaCall_cancel { + __kind: 'cancel' + index: number +} + +/** + * See [`Pallet::kill`]. + */ +export interface FellowshipReferendaCall_kill { + __kind: 'kill' + index: number +} + +/** + * See [`Pallet::nudge_referendum`]. + */ +export interface FellowshipReferendaCall_nudge_referendum { + __kind: 'nudge_referendum' + index: number +} + +/** + * See [`Pallet::one_fewer_deciding`]. + */ +export interface FellowshipReferendaCall_one_fewer_deciding { + __kind: 'one_fewer_deciding' + track: number +} + +/** + * See [`Pallet::place_decision_deposit`]. + */ +export interface FellowshipReferendaCall_place_decision_deposit { + __kind: 'place_decision_deposit' + index: number +} + +/** + * See [`Pallet::refund_decision_deposit`]. + */ +export interface FellowshipReferendaCall_refund_decision_deposit { + __kind: 'refund_decision_deposit' + index: number +} + +/** + * See [`Pallet::refund_submission_deposit`]. + */ +export interface FellowshipReferendaCall_refund_submission_deposit { + __kind: 'refund_submission_deposit' + index: number +} + +/** + * See [`Pallet::set_metadata`]. + */ +export interface FellowshipReferendaCall_set_metadata { + __kind: 'set_metadata' + index: number + maybeHash?: (H256 | undefined) +} + +/** + * See [`Pallet::submit`]. + */ +export interface FellowshipReferendaCall_submit { + __kind: 'submit' + proposalOrigin: OriginCaller + proposal: Bounded + enactmentMoment: DispatchTime +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const FellowshipCollectiveCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: MultiAddress, + }), + cleanup_poll: sts.enumStruct({ + pollIndex: sts.number(), + max: sts.number(), + }), + demote_member: sts.enumStruct({ + who: MultiAddress, + }), + exchange_member: sts.enumStruct({ + who: MultiAddress, + newWho: MultiAddress, + }), + promote_member: sts.enumStruct({ + who: MultiAddress, + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + minRank: sts.number(), + }), + vote: sts.enumStruct({ + poll: sts.number(), + aye: sts.boolean(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type FellowshipCollectiveCall = FellowshipCollectiveCall_add_member | FellowshipCollectiveCall_cleanup_poll | FellowshipCollectiveCall_demote_member | FellowshipCollectiveCall_exchange_member | FellowshipCollectiveCall_promote_member | FellowshipCollectiveCall_remove_member | FellowshipCollectiveCall_vote + +/** + * See [`Pallet::add_member`]. + */ +export interface FellowshipCollectiveCall_add_member { + __kind: 'add_member' + who: MultiAddress +} + +/** + * See [`Pallet::cleanup_poll`]. + */ +export interface FellowshipCollectiveCall_cleanup_poll { + __kind: 'cleanup_poll' + pollIndex: number + max: number +} + +/** + * See [`Pallet::demote_member`]. + */ +export interface FellowshipCollectiveCall_demote_member { + __kind: 'demote_member' + who: MultiAddress +} + +/** + * See [`Pallet::exchange_member`]. + */ +export interface FellowshipCollectiveCall_exchange_member { + __kind: 'exchange_member' + who: MultiAddress + newWho: MultiAddress +} + +/** + * See [`Pallet::promote_member`]. + */ +export interface FellowshipCollectiveCall_promote_member { + __kind: 'promote_member' + who: MultiAddress +} + +/** + * See [`Pallet::remove_member`]. + */ +export interface FellowshipCollectiveCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + minRank: number +} + +/** + * See [`Pallet::vote`]. + */ +export interface FellowshipCollectiveCall_vote { + __kind: 'vote' + poll: number + aye: boolean +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const FastUnstakeCall: sts.Type = sts.closedEnum(() => { + return { + control: sts.enumStruct({ + erasToCheck: sts.number(), + }), + deregister: sts.unit(), + register_fast_unstake: sts.unit(), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type FastUnstakeCall = FastUnstakeCall_control | FastUnstakeCall_deregister | FastUnstakeCall_register_fast_unstake + +/** + * See [`Pallet::control`]. + */ +export interface FastUnstakeCall_control { + __kind: 'control' + erasToCheck: number +} + +/** + * See [`Pallet::deregister`]. + */ +export interface FastUnstakeCall_deregister { + __kind: 'deregister' +} + +/** + * See [`Pallet::register_fast_unstake`]. + */ +export interface FastUnstakeCall_register_fast_unstake { + __kind: 'register_fast_unstake' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + governance_fallback: sts.enumStruct({ + maybeMaxVoters: sts.option(() => sts.number()), + maybeMaxTargets: sts.option(() => sts.number()), + }), + set_emergency_election_result: sts.enumStruct({ + supports: sts.array(() => sts.tuple(() => [AccountId32, Support])), + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => ElectionScore), + }), + submit: sts.enumStruct({ + rawSolution: RawSolution, + }), + submit_unsigned: sts.enumStruct({ + rawSolution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export const RawSolution: sts.Type = sts.struct(() => { + return { + solution: NposCompactSolution24, + score: ElectionScore, + round: sts.number(), + } +}) + +export const NposCompactSolution24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), + votes2: sts.array(() => sts.tuple(() => [sts.number(), sts.tuple(() => [sts.number(), sts.number()]), sts.number()])), + votes3: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes4: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes5: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes6: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes7: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes8: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes9: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes10: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes11: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes12: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes13: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes14: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes15: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes16: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes17: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes18: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes19: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes20: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes21: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes22: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes23: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes24: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + } +}) + +export interface NposCompactSolution24 { + votes1: [number, number][] + votes2: [number, [number, number], number][] + votes3: [number, [number, number][], number][] + votes4: [number, [number, number][], number][] + votes5: [number, [number, number][], number][] + votes6: [number, [number, number][], number][] + votes7: [number, [number, number][], number][] + votes8: [number, [number, number][], number][] + votes9: [number, [number, number][], number][] + votes10: [number, [number, number][], number][] + votes11: [number, [number, number][], number][] + votes12: [number, [number, number][], number][] + votes13: [number, [number, number][], number][] + votes14: [number, [number, number][], number][] + votes15: [number, [number, number][], number][] + votes16: [number, [number, number][], number][] + votes17: [number, [number, number][], number][] + votes18: [number, [number, number][], number][] + votes19: [number, [number, number][], number][] + votes20: [number, [number, number][], number][] + votes21: [number, [number, number][], number][] + votes22: [number, [number, number][], number][] + votes23: [number, [number, number][], number][] + votes24: [number, [number, number][], number][] +} + +export interface RawSolution { + solution: NposCompactSolution24 + score: ElectionScore + round: number +} + +export interface ElectionScore { + minimalStake: bigint + sumStake: bigint + sumStakeSquared: bigint +} + +export const ElectionScore: sts.Type = sts.struct(() => { + return { + minimalStake: sts.bigint(), + sumStake: sts.bigint(), + sumStakeSquared: sts.bigint(), + } +}) + +export const Support: sts.Type = sts.struct(() => { + return { + total: sts.bigint(), + voters: sts.array(() => sts.tuple(() => [AccountId32, sts.bigint()])), + } +}) + +export interface Support { + total: bigint + voters: [AccountId32, bigint][] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_governance_fallback | ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * See [`Pallet::governance_fallback`]. + */ +export interface ElectionProviderMultiPhaseCall_governance_fallback { + __kind: 'governance_fallback' + maybeMaxVoters?: (number | undefined) + maybeMaxTargets?: (number | undefined) +} + +/** + * See [`Pallet::set_emergency_election_result`]. + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + supports: [AccountId32, Support][] +} + +/** + * See [`Pallet::set_minimum_untrusted_score`]. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (ElectionScore | undefined) +} + +/** + * See [`Pallet::submit`]. + */ +export interface ElectionProviderMultiPhaseCall_submit { + __kind: 'submit' + rawSolution: RawSolution +} + +/** + * See [`Pallet::submit_unsigned`]. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + rawSolution: RawSolution + witness: SolutionOrSnapshotSize +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: Id, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + contribute_all: sts.enumStruct({ + index: sts.number(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: Id, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId32, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_contribute_all | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * See [`Pallet::add_memo`]. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: Id + memo: Bytes +} + +/** + * See [`Pallet::contribute`]. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * See [`Pallet::contribute_all`]. + */ +export interface CrowdloanCall_contribute_all { + __kind: 'contribute_all' + index: number + signature?: (MultiSignature | undefined) +} + +/** + * See [`Pallet::create`]. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * See [`Pallet::dissolve`]. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * See [`Pallet::edit`]. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * See [`Pallet::poke`]. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: Id +} + +/** + * See [`Pallet::refund`]. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * See [`Pallet::withdraw`]. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId32 + index: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const CoretimeCall: sts.Type = sts.closedEnum(() => { + return { + assign_core: sts.enumStruct({ + core: sts.number(), + begin: sts.number(), + assignment: sts.array(() => sts.tuple(() => [CoreAssignment, PartsOf57600])), + endHint: sts.option(() => sts.number()), + }), + request_core_count: sts.enumStruct({ + count: sts.number(), + }), + } +}) + +export const PartsOf57600 = sts.number() + +export const CoreAssignment: sts.Type = sts.closedEnum(() => { + return { + Idle: sts.unit(), + Pool: sts.unit(), + Task: sts.number(), + } +}) + +export type CoreAssignment = CoreAssignment_Idle | CoreAssignment_Pool | CoreAssignment_Task + +export interface CoreAssignment_Idle { + __kind: 'Idle' +} + +export interface CoreAssignment_Pool { + __kind: 'Pool' +} + +export interface CoreAssignment_Task { + __kind: 'Task' + value: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type CoretimeCall = CoretimeCall_assign_core | CoretimeCall_request_core_count + +/** + * See [`Pallet::assign_core`]. + */ +export interface CoretimeCall_assign_core { + __kind: 'assign_core' + core: number + begin: number + assignment: [CoreAssignment, PartsOf57600][] + endHint?: (number | undefined) +} + +/** + * See [`Pallet::request_core_count`]. + */ +export interface CoretimeCall_request_core_count { + __kind: 'request_core_count' + count: number +} + +export type PartsOf57600 = number + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ConvictionVotingCall: sts.Type = sts.closedEnum(() => { + return { + delegate: sts.enumStruct({ + class: sts.number(), + to: MultiAddress, + conviction: Conviction, + balance: sts.bigint(), + }), + remove_other_vote: sts.enumStruct({ + target: MultiAddress, + class: sts.number(), + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + class: sts.option(() => sts.number()), + index: sts.number(), + }), + undelegate: sts.enumStruct({ + class: sts.number(), + }), + unlock: sts.enumStruct({ + class: sts.number(), + target: MultiAddress, + }), + vote: sts.enumStruct({ + pollIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + SplitAbstain: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + abstain: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type AccountVote = AccountVote_Split | AccountVote_SplitAbstain | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface AccountVote_SplitAbstain { + __kind: 'SplitAbstain' + aye: bigint + nay: bigint + abstain: bigint +} + +export interface AccountVote_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ConvictionVotingCall = ConvictionVotingCall_delegate | ConvictionVotingCall_remove_other_vote | ConvictionVotingCall_remove_vote | ConvictionVotingCall_undelegate | ConvictionVotingCall_unlock | ConvictionVotingCall_vote + +/** + * See [`Pallet::delegate`]. + */ +export interface ConvictionVotingCall_delegate { + __kind: 'delegate' + class: number + to: MultiAddress + conviction: Conviction + balance: bigint +} + +/** + * See [`Pallet::remove_other_vote`]. + */ +export interface ConvictionVotingCall_remove_other_vote { + __kind: 'remove_other_vote' + target: MultiAddress + class: number + index: number +} + +/** + * See [`Pallet::remove_vote`]. + */ +export interface ConvictionVotingCall_remove_vote { + __kind: 'remove_vote' + class?: (number | undefined) + index: number +} + +/** + * See [`Pallet::undelegate`]. + */ +export interface ConvictionVotingCall_undelegate { + __kind: 'undelegate' + class: number +} + +/** + * See [`Pallet::unlock`]. + */ +export interface ConvictionVotingCall_unlock { + __kind: 'unlock' + class: number + target: MultiAddress +} + +/** + * See [`Pallet::vote`]. + */ +export interface ConvictionVotingCall_vote { + __kind: 'vote' + pollIndex: number + vote: AccountVote +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_approval_voting_params: sts.enumStruct({ + new: ApprovalVotingParams, + }), + set_async_backing_params: sts.enumStruct({ + new: V6AsyncBackingParams, + }), + set_bypass_consistency_check: sts.enumStruct({ + new: sts.boolean(), + }), + set_code_retention_period: sts.enumStruct({ + new: sts.number(), + }), + set_coretime_cores: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: sts.number(), + }), + set_executor_params: sts.enumStruct({ + new: sts.array(() => V6ExecutorParam), + }), + set_group_rotation_frequency: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_minimum_backing_votes: sts.enumStruct({ + new: sts.number(), + }), + set_minimum_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_node_feature: sts.enumStruct({ + index: sts.number(), + value: sts.boolean(), + }), + set_on_demand_base_fee: sts.enumStruct({ + new: sts.bigint(), + }), + set_on_demand_fee_variability: sts.enumStruct({ + new: Perbill, + }), + set_on_demand_queue_max_size: sts.enumStruct({ + new: sts.number(), + }), + set_on_demand_retries: sts.enumStruct({ + new: sts.number(), + }), + set_on_demand_target_queue_utilization: sts.enumStruct({ + new: Perbill, + }), + set_on_demand_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_paras_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_pvf_voting_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_cooldown: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +export const V6ExecutorParam: sts.Type = sts.closedEnum(() => { + return { + MaxMemoryPages: sts.number(), + PrecheckingMaxMemory: sts.bigint(), + PvfExecTimeout: sts.tuple(() => [V6PvfExecKind, sts.bigint()]), + PvfPrepTimeout: sts.tuple(() => [V6PvfPrepKind, sts.bigint()]), + StackLogicalMax: sts.number(), + StackNativeMax: sts.number(), + WasmExtBulkMemory: sts.unit(), + } +}) + +export const V6PvfPrepKind: sts.Type = sts.closedEnum(() => { + return { + Precheck: sts.unit(), + Prepare: sts.unit(), + } +}) + +export type V6PvfPrepKind = V6PvfPrepKind_Precheck | V6PvfPrepKind_Prepare + +export interface V6PvfPrepKind_Precheck { + __kind: 'Precheck' +} + +export interface V6PvfPrepKind_Prepare { + __kind: 'Prepare' +} + +export const V6PvfExecKind: sts.Type = sts.closedEnum(() => { + return { + Approval: sts.unit(), + Backing: sts.unit(), + } +}) + +export type V6PvfExecKind = V6PvfExecKind_Approval | V6PvfExecKind_Backing + +export interface V6PvfExecKind_Approval { + __kind: 'Approval' +} + +export interface V6PvfExecKind_Backing { + __kind: 'Backing' +} + +export type V6ExecutorParam = V6ExecutorParam_MaxMemoryPages | V6ExecutorParam_PrecheckingMaxMemory | V6ExecutorParam_PvfExecTimeout | V6ExecutorParam_PvfPrepTimeout | V6ExecutorParam_StackLogicalMax | V6ExecutorParam_StackNativeMax | V6ExecutorParam_WasmExtBulkMemory + +export interface V6ExecutorParam_MaxMemoryPages { + __kind: 'MaxMemoryPages' + value: number +} + +export interface V6ExecutorParam_PrecheckingMaxMemory { + __kind: 'PrecheckingMaxMemory' + value: bigint +} + +export interface V6ExecutorParam_PvfExecTimeout { + __kind: 'PvfExecTimeout' + value: [V6PvfExecKind, bigint] +} + +export interface V6ExecutorParam_PvfPrepTimeout { + __kind: 'PvfPrepTimeout' + value: [V6PvfPrepKind, bigint] +} + +export interface V6ExecutorParam_StackLogicalMax { + __kind: 'StackLogicalMax' + value: number +} + +export interface V6ExecutorParam_StackNativeMax { + __kind: 'StackNativeMax' + value: number +} + +export interface V6ExecutorParam_WasmExtBulkMemory { + __kind: 'WasmExtBulkMemory' +} + +export const V6AsyncBackingParams: sts.Type = sts.struct(() => { + return { + maxCandidateDepth: sts.number(), + allowedAncestryLen: sts.number(), + } +}) + +export interface V6AsyncBackingParams { + maxCandidateDepth: number + allowedAncestryLen: number +} + +export const ApprovalVotingParams: sts.Type = sts.struct(() => { + return { + maxApprovalCoalesceCount: sts.number(), + } +}) + +export interface ApprovalVotingParams { + maxApprovalCoalesceCount: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ConfigurationCall = ConfigurationCall_set_approval_voting_params | ConfigurationCall_set_async_backing_params | ConfigurationCall_set_bypass_consistency_check | ConfigurationCall_set_code_retention_period | ConfigurationCall_set_coretime_cores | ConfigurationCall_set_dispute_period | ConfigurationCall_set_dispute_post_conclusion_acceptance_period | ConfigurationCall_set_executor_params | ConfigurationCall_set_group_rotation_frequency | ConfigurationCall_set_hrmp_channel_max_capacity | ConfigurationCall_set_hrmp_channel_max_message_size | ConfigurationCall_set_hrmp_channel_max_total_size | ConfigurationCall_set_hrmp_max_message_num_per_candidate | ConfigurationCall_set_hrmp_max_parachain_inbound_channels | ConfigurationCall_set_hrmp_max_parachain_outbound_channels | ConfigurationCall_set_hrmp_open_request_ttl | ConfigurationCall_set_hrmp_recipient_deposit | ConfigurationCall_set_hrmp_sender_deposit | ConfigurationCall_set_max_code_size | ConfigurationCall_set_max_downward_message_size | ConfigurationCall_set_max_head_data_size | ConfigurationCall_set_max_pov_size | ConfigurationCall_set_max_upward_message_num_per_candidate | ConfigurationCall_set_max_upward_message_size | ConfigurationCall_set_max_upward_queue_count | ConfigurationCall_set_max_upward_queue_size | ConfigurationCall_set_max_validators | ConfigurationCall_set_max_validators_per_core | ConfigurationCall_set_minimum_backing_votes | ConfigurationCall_set_minimum_validation_upgrade_delay | ConfigurationCall_set_n_delay_tranches | ConfigurationCall_set_needed_approvals | ConfigurationCall_set_no_show_slots | ConfigurationCall_set_node_feature | ConfigurationCall_set_on_demand_base_fee | ConfigurationCall_set_on_demand_fee_variability | ConfigurationCall_set_on_demand_queue_max_size | ConfigurationCall_set_on_demand_retries | ConfigurationCall_set_on_demand_target_queue_utilization | ConfigurationCall_set_on_demand_ttl | ConfigurationCall_set_paras_availability_period | ConfigurationCall_set_pvf_voting_ttl | ConfigurationCall_set_relay_vrf_modulo_samples | ConfigurationCall_set_scheduling_lookahead | ConfigurationCall_set_validation_upgrade_cooldown | ConfigurationCall_set_validation_upgrade_delay | ConfigurationCall_set_zeroth_delay_tranche_width + +/** + * See [`Pallet::set_approval_voting_params`]. + */ +export interface ConfigurationCall_set_approval_voting_params { + __kind: 'set_approval_voting_params' + new: ApprovalVotingParams +} + +/** + * See [`Pallet::set_async_backing_params`]. + */ +export interface ConfigurationCall_set_async_backing_params { + __kind: 'set_async_backing_params' + new: V6AsyncBackingParams +} + +/** + * See [`Pallet::set_bypass_consistency_check`]. + */ +export interface ConfigurationCall_set_bypass_consistency_check { + __kind: 'set_bypass_consistency_check' + new: boolean +} + +/** + * See [`Pallet::set_code_retention_period`]. + */ +export interface ConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: number +} + +/** + * See [`Pallet::set_coretime_cores`]. + */ +export interface ConfigurationCall_set_coretime_cores { + __kind: 'set_coretime_cores' + new: number +} + +/** + * See [`Pallet::set_dispute_period`]. + */ +export interface ConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: number +} + +/** + * See [`Pallet::set_dispute_post_conclusion_acceptance_period`]. + */ +export interface ConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: number +} + +/** + * See [`Pallet::set_executor_params`]. + */ +export interface ConfigurationCall_set_executor_params { + __kind: 'set_executor_params' + new: V6ExecutorParam[] +} + +/** + * See [`Pallet::set_group_rotation_frequency`]. + */ +export interface ConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: number +} + +/** + * See [`Pallet::set_hrmp_channel_max_capacity`]. + */ +export interface ConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * See [`Pallet::set_hrmp_channel_max_message_size`]. + */ +export interface ConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * See [`Pallet::set_hrmp_channel_max_total_size`]. + */ +export interface ConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * See [`Pallet::set_hrmp_max_message_num_per_candidate`]. + */ +export interface ConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * See [`Pallet::set_hrmp_max_parachain_inbound_channels`]. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * See [`Pallet::set_hrmp_max_parachain_outbound_channels`]. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * See [`Pallet::set_hrmp_open_request_ttl`]. + */ +export interface ConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * See [`Pallet::set_hrmp_recipient_deposit`]. + */ +export interface ConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: bigint +} + +/** + * See [`Pallet::set_hrmp_sender_deposit`]. + */ +export interface ConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: bigint +} + +/** + * See [`Pallet::set_max_code_size`]. + */ +export interface ConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * See [`Pallet::set_max_downward_message_size`]. + */ +export interface ConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * See [`Pallet::set_max_head_data_size`]. + */ +export interface ConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * See [`Pallet::set_max_pov_size`]. + */ +export interface ConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * See [`Pallet::set_max_upward_message_num_per_candidate`]. + */ +export interface ConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * See [`Pallet::set_max_upward_message_size`]. + */ +export interface ConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * See [`Pallet::set_max_upward_queue_count`]. + */ +export interface ConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * See [`Pallet::set_max_upward_queue_size`]. + */ +export interface ConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * See [`Pallet::set_max_validators`]. + */ +export interface ConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * See [`Pallet::set_max_validators_per_core`]. + */ +export interface ConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * See [`Pallet::set_minimum_backing_votes`]. + */ +export interface ConfigurationCall_set_minimum_backing_votes { + __kind: 'set_minimum_backing_votes' + new: number +} + +/** + * See [`Pallet::set_minimum_validation_upgrade_delay`]. + */ +export interface ConfigurationCall_set_minimum_validation_upgrade_delay { + __kind: 'set_minimum_validation_upgrade_delay' + new: number +} + +/** + * See [`Pallet::set_n_delay_tranches`]. + */ +export interface ConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * See [`Pallet::set_needed_approvals`]. + */ +export interface ConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * See [`Pallet::set_no_show_slots`]. + */ +export interface ConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * See [`Pallet::set_node_feature`]. + */ +export interface ConfigurationCall_set_node_feature { + __kind: 'set_node_feature' + index: number + value: boolean +} + +/** + * See [`Pallet::set_on_demand_base_fee`]. + */ +export interface ConfigurationCall_set_on_demand_base_fee { + __kind: 'set_on_demand_base_fee' + new: bigint +} + +/** + * See [`Pallet::set_on_demand_fee_variability`]. + */ +export interface ConfigurationCall_set_on_demand_fee_variability { + __kind: 'set_on_demand_fee_variability' + new: Perbill +} + +/** + * See [`Pallet::set_on_demand_queue_max_size`]. + */ +export interface ConfigurationCall_set_on_demand_queue_max_size { + __kind: 'set_on_demand_queue_max_size' + new: number +} + +/** + * See [`Pallet::set_on_demand_retries`]. + */ +export interface ConfigurationCall_set_on_demand_retries { + __kind: 'set_on_demand_retries' + new: number +} + +/** + * See [`Pallet::set_on_demand_target_queue_utilization`]. + */ +export interface ConfigurationCall_set_on_demand_target_queue_utilization { + __kind: 'set_on_demand_target_queue_utilization' + new: Perbill +} + +/** + * See [`Pallet::set_on_demand_ttl`]. + */ +export interface ConfigurationCall_set_on_demand_ttl { + __kind: 'set_on_demand_ttl' + new: number +} + +/** + * See [`Pallet::set_paras_availability_period`]. + */ +export interface ConfigurationCall_set_paras_availability_period { + __kind: 'set_paras_availability_period' + new: number +} + +/** + * See [`Pallet::set_pvf_voting_ttl`]. + */ +export interface ConfigurationCall_set_pvf_voting_ttl { + __kind: 'set_pvf_voting_ttl' + new: number +} + +/** + * See [`Pallet::set_relay_vrf_modulo_samples`]. + */ +export interface ConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * See [`Pallet::set_scheduling_lookahead`]. + */ +export interface ConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * See [`Pallet::set_validation_upgrade_cooldown`]. + */ +export interface ConfigurationCall_set_validation_upgrade_cooldown { + __kind: 'set_validation_upgrade_cooldown' + new: number +} + +/** + * See [`Pallet::set_validation_upgrade_delay`]. + */ +export interface ConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: number +} + +/** + * See [`Pallet::set_zeroth_delay_tranche_width`]. + */ +export interface ConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: sts.bigint(), + vestingSchedule: sts.option(() => sts.tuple(() => [sts.bigint(), sts.bigint(), sts.number()])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId32), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * See [`Pallet::attest`]. + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * See [`Pallet::claim`]. + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId32 + ethereumSignature: EcdsaSignature +} + +/** + * See [`Pallet::claim_attest`]. + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId32 + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * See [`Pallet::mint_claim`]. + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: bigint + vestingSchedule?: ([bigint, bigint, number] | undefined) + statement?: (StatementKind | undefined) +} + +/** + * See [`Pallet::move_claim`]. + */ +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId32 | undefined) +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ChildBountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + add_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + value: sts.bigint(), + description: sts.bytes(), + }), + award_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + close_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + propose_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ChildBountiesCall = ChildBountiesCall_accept_curator | ChildBountiesCall_add_child_bounty | ChildBountiesCall_award_child_bounty | ChildBountiesCall_claim_child_bounty | ChildBountiesCall_close_child_bounty | ChildBountiesCall_propose_curator | ChildBountiesCall_unassign_curator + +/** + * See [`Pallet::accept_curator`]. + */ +export interface ChildBountiesCall_accept_curator { + __kind: 'accept_curator' + parentBountyId: number + childBountyId: number +} + +/** + * See [`Pallet::add_child_bounty`]. + */ +export interface ChildBountiesCall_add_child_bounty { + __kind: 'add_child_bounty' + parentBountyId: number + value: bigint + description: Bytes +} + +/** + * See [`Pallet::award_child_bounty`]. + */ +export interface ChildBountiesCall_award_child_bounty { + __kind: 'award_child_bounty' + parentBountyId: number + childBountyId: number + beneficiary: MultiAddress +} + +/** + * See [`Pallet::claim_child_bounty`]. + */ +export interface ChildBountiesCall_claim_child_bounty { + __kind: 'claim_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * See [`Pallet::close_child_bounty`]. + */ +export interface ChildBountiesCall_close_child_bounty { + __kind: 'close_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * See [`Pallet::propose_curator`]. + */ +export interface ChildBountiesCall_propose_curator { + __kind: 'propose_curator' + parentBountyId: number + childBountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * See [`Pallet::unassign_curator`]. + */ +export interface ChildBountiesCall_unassign_curator { + __kind: 'unassign_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * See [`Pallet::accept_curator`]. + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * See [`Pallet::approve_bounty`]. + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * See [`Pallet::award_bounty`]. + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: MultiAddress +} + +/** + * See [`Pallet::claim_bounty`]. + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * See [`Pallet::close_bounty`]. + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * See [`Pallet::extend_bounty_expiry`]. + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * See [`Pallet::propose_bounty`]. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * See [`Pallet::propose_curator`]. + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * See [`Pallet::unassign_curator`]. + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const BeefyCall: sts.Type = sts.closedEnum(() => { + return { + report_equivocation: sts.enumStruct({ + equivocationProof: Type_499, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_499, + keyOwnerProof: MembershipProof, + }), + set_new_genesis: sts.enumStruct({ + delayInBlocks: sts.number(), + }), + } +}) + +export const Type_499: sts.Type = sts.struct(() => { + return { + first: VoteMessage, + second: VoteMessage, + } +}) + +export const VoteMessage: sts.Type = sts.struct(() => { + return { + commitment: Commitment, + id: sts.bytes(), + signature: sts.bytes(), + } +}) + +export const Commitment: sts.Type = sts.struct(() => { + return { + payload: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + blockNumber: sts.number(), + validatorSetId: sts.bigint(), + } +}) + +export interface Commitment { + payload: [Bytes, Bytes][] + blockNumber: number + validatorSetId: bigint +} + +export interface VoteMessage { + commitment: Commitment + id: Bytes + signature: Bytes +} + +export interface Type_499 { + first: VoteMessage + second: VoteMessage +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type BeefyCall = BeefyCall_report_equivocation | BeefyCall_report_equivocation_unsigned | BeefyCall_set_new_genesis + +/** + * See [`Pallet::report_equivocation`]. + */ +export interface BeefyCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_499 + keyOwnerProof: MembershipProof +} + +/** + * See [`Pallet::report_equivocation_unsigned`]. + */ +export interface BeefyCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_499 + keyOwnerProof: MembershipProof +} + +/** + * See [`Pallet::set_new_genesis`]. + */ +export interface BeefyCall_set_new_genesis { + __kind: 'set_new_genesis' + delayInBlocks: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_adjust_total_issuance: sts.enumStruct({ + direction: AdjustmentDirection, + delta: sts.bigint(), + }), + force_set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + }), + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_allow_death: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + upgrade_accounts: sts.enumStruct({ + who: sts.array(() => AccountId32), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type BalancesCall = BalancesCall_force_adjust_total_issuance | BalancesCall_force_set_balance | BalancesCall_force_transfer | BalancesCall_force_unreserve | BalancesCall_transfer_all | BalancesCall_transfer_allow_death | BalancesCall_transfer_keep_alive | BalancesCall_upgrade_accounts + +/** + * See [`Pallet::force_adjust_total_issuance`]. + */ +export interface BalancesCall_force_adjust_total_issuance { + __kind: 'force_adjust_total_issuance' + direction: AdjustmentDirection + delta: bigint +} + +/** + * See [`Pallet::force_set_balance`]. + */ +export interface BalancesCall_force_set_balance { + __kind: 'force_set_balance' + who: MultiAddress + newFree: bigint +} + +/** + * See [`Pallet::force_transfer`]. + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::force_unreserve`]. + */ +export interface BalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * See [`Pallet::transfer_all`]. + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * See [`Pallet::transfer_allow_death`]. + */ +export interface BalancesCall_transfer_allow_death { + __kind: 'transfer_allow_death' + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::transfer_keep_alive`]. + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::upgrade_accounts`]. + */ +export interface BalancesCall_upgrade_accounts { + __kind: 'upgrade_accounts' + who: AccountId32[] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const EquivocationProof: sts.Type = sts.struct(() => { + return { + offender: sts.bytes(), + slot: Slot, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Slot = sts.bigint() + +export interface EquivocationProof { + offender: Bytes + slot: Slot + firstHeader: Header + secondHeader: Header +} + +export type Slot = bigint + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V1: sts.enumStruct({ + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + }), + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type NextConfigDescriptor = NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * See [`Pallet::plan_config_change`]. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * See [`Pallet::report_equivocation`]. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * See [`Pallet::report_equivocation_unsigned`]. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * See [`Pallet::bid`]. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * See [`Pallet::cancel_auction`]. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * See [`Pallet::new_auction`]. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const AssetRateCall: sts.Type = sts.closedEnum(() => { + return { + create: sts.enumStruct({ + assetKind: VersionedLocatableAsset, + rate: FixedU128, + }), + remove: sts.enumStruct({ + assetKind: VersionedLocatableAsset, + }), + update: sts.enumStruct({ + assetKind: VersionedLocatableAsset, + rate: FixedU128, + }), + } +}) + +export const FixedU128 = sts.bigint() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type AssetRateCall = AssetRateCall_create | AssetRateCall_remove | AssetRateCall_update + +/** + * See [`Pallet::create`]. + */ +export interface AssetRateCall_create { + __kind: 'create' + assetKind: VersionedLocatableAsset + rate: FixedU128 +} + +/** + * See [`Pallet::remove`]. + */ +export interface AssetRateCall_remove { + __kind: 'remove' + assetKind: VersionedLocatableAsset +} + +/** + * See [`Pallet::update`]. + */ +export interface AssetRateCall_update { + __kind: 'update' + assetKind: VersionedLocatableAsset + rate: FixedU128 +} + +export type FixedU128 = bigint + +export type Call = Call_AssetRate | Call_Auctions | Call_Babe | Call_Balances | Call_Beefy | Call_Bounties | Call_ChildBounties | Call_Claims | Call_Configuration | Call_ConvictionVoting | Call_Coretime | Call_Crowdloan | Call_ElectionProviderMultiPhase | Call_FastUnstake | Call_FellowshipCollective | Call_FellowshipReferenda | Call_Grandpa | Call_Hrmp | Call_Identity | Call_IdentityMigrator | Call_Indices | Call_Initializer | Call_MessageQueue | Call_Multisig | Call_Nis | Call_NisCounterpartBalances | Call_NominationPools | Call_OnDemandAssignmentProvider | Call_ParaInclusion | Call_ParaInherent | Call_Paras | Call_ParasDisputes | Call_ParasShared | Call_ParasSlashing | Call_Preimage | Call_Proxy | Call_Recovery | Call_Referenda | Call_Registrar | Call_Scheduler | Call_Session | Call_Slots | Call_Society | Call_Staking | Call_System | Call_Timestamp | Call_Treasury | Call_Utility | Call_Vesting | Call_VoterList | Call_Whitelist | Call_XcmPallet + +export interface Call_AssetRate { + __kind: 'AssetRate' + value: AssetRateCall +} + +export interface Call_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Call_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Call_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Call_Beefy { + __kind: 'Beefy' + value: BeefyCall +} + +export interface Call_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Call_ChildBounties { + __kind: 'ChildBounties' + value: ChildBountiesCall +} + +export interface Call_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Call_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Call_ConvictionVoting { + __kind: 'ConvictionVoting' + value: ConvictionVotingCall +} + +export interface Call_Coretime { + __kind: 'Coretime' + value: CoretimeCall +} + +export interface Call_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Call_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Call_FastUnstake { + __kind: 'FastUnstake' + value: FastUnstakeCall +} + +export interface Call_FellowshipCollective { + __kind: 'FellowshipCollective' + value: FellowshipCollectiveCall +} + +export interface Call_FellowshipReferenda { + __kind: 'FellowshipReferenda' + value: FellowshipReferendaCall +} + +export interface Call_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Call_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Call_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Call_IdentityMigrator { + __kind: 'IdentityMigrator' + value: IdentityMigratorCall +} + +export interface Call_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Call_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Call_MessageQueue { + __kind: 'MessageQueue' + value: MessageQueueCall +} + +export interface Call_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Call_Nis { + __kind: 'Nis' + value: NisCall +} + +export interface Call_NisCounterpartBalances { + __kind: 'NisCounterpartBalances' + value: NisCounterpartBalancesCall +} + +export interface Call_NominationPools { + __kind: 'NominationPools' + value: NominationPoolsCall +} + +export interface Call_OnDemandAssignmentProvider { + __kind: 'OnDemandAssignmentProvider' + value: OnDemandAssignmentProviderCall +} + +export interface Call_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Call_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Call_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Call_ParasDisputes { + __kind: 'ParasDisputes' + value: ParasDisputesCall +} + +export interface Call_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Call_ParasSlashing { + __kind: 'ParasSlashing' + value: ParasSlashingCall +} + +export interface Call_Preimage { + __kind: 'Preimage' + value: PreimageCall +} + +export interface Call_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Call_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Call_Referenda { + __kind: 'Referenda' + value: ReferendaCall +} + +export interface Call_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Call_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Call_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Call_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Call_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Call_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Call_System { + __kind: 'System' + value: SystemCall +} + +export interface Call_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Call_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Call_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Call_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Call_VoterList { + __kind: 'VoterList' + value: VoterListCall +} + +export interface Call_Whitelist { + __kind: 'Whitelist' + value: WhitelistCall +} + +export interface Call_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NominationPools: sts.unit(), + NonTransfer: sts.unit(), + Society: sts.unit(), + Staking: sts.unit(), + } +}) + +export const MultiAddress: sts.Type = sts.closedEnum(() => { + return { + Address20: sts.bytes(), + Address32: sts.bytes(), + Id: AccountId32, + Index: sts.unit(), + Raw: sts.bytes(), + } +}) diff --git a/squid/src/types/v1002006.ts b/squid/src/types/v1002006.ts new file mode 100644 index 00000000..3659f1cc --- /dev/null +++ b/squid/src/types/v1002006.ts @@ -0,0 +1,11634 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Weight: sts.Type = sts.struct(() => { + return { + refTime: sts.bigint(), + proofSize: sts.bigint(), + } +}) + +export interface Weight { + refTime: bigint + proofSize: bigint +} + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: sts.number(), + index: sts.number(), + } +}) + +export interface Timepoint { + height: number + index: number +} + +export const Call: sts.Type = sts.closedEnum(() => { + return { + AssetRate: AssetRateCall, + Auctions: AuctionsCall, + Babe: BabeCall, + Balances: BalancesCall, + Beefy: BeefyCall, + Bounties: BountiesCall, + ChildBounties: ChildBountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + ConvictionVoting: ConvictionVotingCall, + Coretime: CoretimeCall, + Crowdloan: CrowdloanCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + FastUnstake: FastUnstakeCall, + FellowshipCollective: FellowshipCollectiveCall, + FellowshipReferenda: FellowshipReferendaCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Indices: IndicesCall, + Initializer: InitializerCall, + MessageQueue: MessageQueueCall, + Multisig: MultisigCall, + Nis: NisCall, + NisCounterpartBalances: NisCounterpartBalancesCall, + NominationPools: NominationPoolsCall, + OnDemandAssignmentProvider: OnDemandAssignmentProviderCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Paras: ParasCall, + ParasDisputes: ParasDisputesCall, + ParasShared: ParasSharedCall, + ParasSlashing: ParasSlashingCall, + Preimage: PreimageCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Referenda: ReferendaCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + Timestamp: TimestampCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + VoterList: VoterListCall, + Whitelist: WhitelistCall, + XcmPallet: XcmPalletCall, + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + claim_assets: sts.enumStruct({ + assets: VersionedAssets, + beneficiary: VersionedLocation, + }), + execute: sts.enumStruct({ + message: Type_441, + maxWeight: Weight, + }), + force_default_xcm_version: sts.enumStruct({ + maybeXcmVersion: sts.option(() => sts.number()), + }), + force_subscribe_version_notify: sts.enumStruct({ + location: VersionedLocation, + }), + force_suspension: sts.enumStruct({ + suspended: sts.boolean(), + }), + force_unsubscribe_version_notify: sts.enumStruct({ + location: VersionedLocation, + }), + force_xcm_version: sts.enumStruct({ + location: V4Location, + version: sts.number(), + }), + limited_reserve_transfer_assets: sts.enumStruct({ + dest: VersionedLocation, + beneficiary: VersionedLocation, + assets: VersionedAssets, + feeAssetItem: sts.number(), + weightLimit: V3WeightLimit, + }), + limited_teleport_assets: sts.enumStruct({ + dest: VersionedLocation, + beneficiary: VersionedLocation, + assets: VersionedAssets, + feeAssetItem: sts.number(), + weightLimit: V3WeightLimit, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: VersionedLocation, + beneficiary: VersionedLocation, + assets: VersionedAssets, + feeAssetItem: sts.number(), + }), + send: sts.enumStruct({ + dest: VersionedLocation, + message: VersionedXcm, + }), + teleport_assets: sts.enumStruct({ + dest: VersionedLocation, + beneficiary: VersionedLocation, + assets: VersionedAssets, + feeAssetItem: sts.number(), + }), + transfer_assets: sts.enumStruct({ + dest: VersionedLocation, + beneficiary: VersionedLocation, + assets: VersionedAssets, + feeAssetItem: sts.number(), + weightLimit: V3WeightLimit, + }), + transfer_assets_using_type_and_then: sts.enumStruct({ + dest: VersionedLocation, + assets: VersionedAssets, + assetsTransferType: TransferType, + remoteFeesId: VersionedAssetId, + feesTransferType: TransferType, + customXcmOnDest: VersionedXcm, + weightLimit: V3WeightLimit, + }), + } +}) + +export const VersionedAssetId: sts.Type = sts.closedEnum(() => { + return { + V3: V3AssetId, + V4: V4AssetId, + } +}) + +export const V4AssetId: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V4Junctions, + } +}) + +export const V4Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: sts.array(() => V4Junction), + X2: sts.array(() => V4Junction), + X3: sts.array(() => V4Junction), + X4: sts.array(() => V4Junction), + X5: sts.array(() => V4Junction), + X6: sts.array(() => V4Junction), + X7: sts.array(() => V4Junction), + X8: sts.array(() => V4Junction), + } +}) + +export const V4Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: sts.option(() => V4NetworkId), + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: sts.option(() => V4NetworkId), + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: sts.option(() => V4NetworkId), + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.enumStruct({ + length: sts.number(), + data: sts.bytes(), + }), + GlobalConsensus: V4NetworkId, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V3BodyId, + part: V3BodyPart, + }), + } +}) + +export const V3BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export type V3BodyPart = V3BodyPart_AtLeastProportion | V3BodyPart_Fraction | V3BodyPart_Members | V3BodyPart_MoreThanProportion | V3BodyPart_Voice + +export interface V3BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V3BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V3BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V3BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V3BodyPart_Voice { + __kind: 'Voice' +} + +export const V3BodyId: sts.Type = sts.closedEnum(() => { + return { + Administration: sts.unit(), + Defense: sts.unit(), + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Moniker: sts.bytes(), + Technical: sts.unit(), + Treasury: sts.unit(), + Unit: sts.unit(), + } +}) + +export type V3BodyId = V3BodyId_Administration | V3BodyId_Defense | V3BodyId_Executive | V3BodyId_Index | V3BodyId_Judicial | V3BodyId_Legislative | V3BodyId_Moniker | V3BodyId_Technical | V3BodyId_Treasury | V3BodyId_Unit + +export interface V3BodyId_Administration { + __kind: 'Administration' +} + +export interface V3BodyId_Defense { + __kind: 'Defense' +} + +export interface V3BodyId_Executive { + __kind: 'Executive' +} + +export interface V3BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V3BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V3BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V3BodyId_Moniker { + __kind: 'Moniker' + value: Bytes +} + +export interface V3BodyId_Technical { + __kind: 'Technical' +} + +export interface V3BodyId_Treasury { + __kind: 'Treasury' +} + +export interface V3BodyId_Unit { + __kind: 'Unit' +} + +export const V4NetworkId: sts.Type = sts.closedEnum(() => { + return { + BitcoinCash: sts.unit(), + BitcoinCore: sts.unit(), + ByFork: sts.enumStruct({ + blockNumber: sts.bigint(), + blockHash: sts.bytes(), + }), + ByGenesis: sts.bytes(), + Ethereum: sts.enumStruct({ + chainId: sts.bigint(), + }), + Kusama: sts.unit(), + Polkadot: sts.unit(), + PolkadotBulletin: sts.unit(), + Rococo: sts.unit(), + Westend: sts.unit(), + Wococo: sts.unit(), + } +}) + +export type V4NetworkId = V4NetworkId_BitcoinCash | V4NetworkId_BitcoinCore | V4NetworkId_ByFork | V4NetworkId_ByGenesis | V4NetworkId_Ethereum | V4NetworkId_Kusama | V4NetworkId_Polkadot | V4NetworkId_PolkadotBulletin | V4NetworkId_Rococo | V4NetworkId_Westend | V4NetworkId_Wococo + +export interface V4NetworkId_BitcoinCash { + __kind: 'BitcoinCash' +} + +export interface V4NetworkId_BitcoinCore { + __kind: 'BitcoinCore' +} + +export interface V4NetworkId_ByFork { + __kind: 'ByFork' + blockNumber: bigint + blockHash: Bytes +} + +export interface V4NetworkId_ByGenesis { + __kind: 'ByGenesis' + value: Bytes +} + +export interface V4NetworkId_Ethereum { + __kind: 'Ethereum' + chainId: bigint +} + +export interface V4NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V4NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export interface V4NetworkId_PolkadotBulletin { + __kind: 'PolkadotBulletin' +} + +export interface V4NetworkId_Rococo { + __kind: 'Rococo' +} + +export interface V4NetworkId_Westend { + __kind: 'Westend' +} + +export interface V4NetworkId_Wococo { + __kind: 'Wococo' +} + +export type V4Junction = V4Junction_AccountId32 | V4Junction_AccountIndex64 | V4Junction_AccountKey20 | V4Junction_GeneralIndex | V4Junction_GeneralKey | V4Junction_GlobalConsensus | V4Junction_OnlyChild | V4Junction_PalletInstance | V4Junction_Parachain | V4Junction_Plurality + +export interface V4Junction_AccountId32 { + __kind: 'AccountId32' + network?: (V4NetworkId | undefined) + id: Bytes +} + +export interface V4Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network?: (V4NetworkId | undefined) + index: bigint +} + +export interface V4Junction_AccountKey20 { + __kind: 'AccountKey20' + network?: (V4NetworkId | undefined) + key: Bytes +} + +export interface V4Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V4Junction_GeneralKey { + __kind: 'GeneralKey' + length: number + data: Bytes +} + +export interface V4Junction_GlobalConsensus { + __kind: 'GlobalConsensus' + value: V4NetworkId +} + +export interface V4Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V4Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V4Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V4Junction_Plurality { + __kind: 'Plurality' + id: V3BodyId + part: V3BodyPart +} + +export type V4Junctions = V4Junctions_Here | V4Junctions_X1 | V4Junctions_X2 | V4Junctions_X3 | V4Junctions_X4 | V4Junctions_X5 | V4Junctions_X6 | V4Junctions_X7 | V4Junctions_X8 + +export interface V4Junctions_Here { + __kind: 'Here' +} + +export interface V4Junctions_X1 { + __kind: 'X1' + value: V4Junction[] +} + +export interface V4Junctions_X2 { + __kind: 'X2' + value: V4Junction[] +} + +export interface V4Junctions_X3 { + __kind: 'X3' + value: V4Junction[] +} + +export interface V4Junctions_X4 { + __kind: 'X4' + value: V4Junction[] +} + +export interface V4Junctions_X5 { + __kind: 'X5' + value: V4Junction[] +} + +export interface V4Junctions_X6 { + __kind: 'X6' + value: V4Junction[] +} + +export interface V4Junctions_X7 { + __kind: 'X7' + value: V4Junction[] +} + +export interface V4Junctions_X8 { + __kind: 'X8' + value: V4Junction[] +} + +export interface V4AssetId { + parents: number + interior: V4Junctions +} + +export const V3AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V3MultiLocation, + } +}) + +export const V3MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V3Junctions, + } +}) + +export const V3Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V3Junction, + X2: sts.tuple(() => [V3Junction, V3Junction]), + X3: sts.tuple(() => [V3Junction, V3Junction, V3Junction]), + X4: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction]), + X5: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + X6: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + X7: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + X8: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + } +}) + +export const V3Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: sts.option(() => V3NetworkId), + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: sts.option(() => V3NetworkId), + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: sts.option(() => V3NetworkId), + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.enumStruct({ + length: sts.number(), + data: sts.bytes(), + }), + GlobalConsensus: V3NetworkId, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V3BodyId, + part: V3BodyPart, + }), + } +}) + +export const V3NetworkId: sts.Type = sts.closedEnum(() => { + return { + BitcoinCash: sts.unit(), + BitcoinCore: sts.unit(), + ByFork: sts.enumStruct({ + blockNumber: sts.bigint(), + blockHash: sts.bytes(), + }), + ByGenesis: sts.bytes(), + Ethereum: sts.enumStruct({ + chainId: sts.bigint(), + }), + Kusama: sts.unit(), + Polkadot: sts.unit(), + PolkadotBulletin: sts.unit(), + Rococo: sts.unit(), + Westend: sts.unit(), + Wococo: sts.unit(), + } +}) + +export type V3NetworkId = V3NetworkId_BitcoinCash | V3NetworkId_BitcoinCore | V3NetworkId_ByFork | V3NetworkId_ByGenesis | V3NetworkId_Ethereum | V3NetworkId_Kusama | V3NetworkId_Polkadot | V3NetworkId_PolkadotBulletin | V3NetworkId_Rococo | V3NetworkId_Westend | V3NetworkId_Wococo + +export interface V3NetworkId_BitcoinCash { + __kind: 'BitcoinCash' +} + +export interface V3NetworkId_BitcoinCore { + __kind: 'BitcoinCore' +} + +export interface V3NetworkId_ByFork { + __kind: 'ByFork' + blockNumber: bigint + blockHash: Bytes +} + +export interface V3NetworkId_ByGenesis { + __kind: 'ByGenesis' + value: Bytes +} + +export interface V3NetworkId_Ethereum { + __kind: 'Ethereum' + chainId: bigint +} + +export interface V3NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V3NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export interface V3NetworkId_PolkadotBulletin { + __kind: 'PolkadotBulletin' +} + +export interface V3NetworkId_Rococo { + __kind: 'Rococo' +} + +export interface V3NetworkId_Westend { + __kind: 'Westend' +} + +export interface V3NetworkId_Wococo { + __kind: 'Wococo' +} + +export type V3Junction = V3Junction_AccountId32 | V3Junction_AccountIndex64 | V3Junction_AccountKey20 | V3Junction_GeneralIndex | V3Junction_GeneralKey | V3Junction_GlobalConsensus | V3Junction_OnlyChild | V3Junction_PalletInstance | V3Junction_Parachain | V3Junction_Plurality + +export interface V3Junction_AccountId32 { + __kind: 'AccountId32' + network?: (V3NetworkId | undefined) + id: Bytes +} + +export interface V3Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network?: (V3NetworkId | undefined) + index: bigint +} + +export interface V3Junction_AccountKey20 { + __kind: 'AccountKey20' + network?: (V3NetworkId | undefined) + key: Bytes +} + +export interface V3Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V3Junction_GeneralKey { + __kind: 'GeneralKey' + length: number + data: Bytes +} + +export interface V3Junction_GlobalConsensus { + __kind: 'GlobalConsensus' + value: V3NetworkId +} + +export interface V3Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V3Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V3Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V3Junction_Plurality { + __kind: 'Plurality' + id: V3BodyId + part: V3BodyPart +} + +export type V3Junctions = V3Junctions_Here | V3Junctions_X1 | V3Junctions_X2 | V3Junctions_X3 | V3Junctions_X4 | V3Junctions_X5 | V3Junctions_X6 | V3Junctions_X7 | V3Junctions_X8 + +export interface V3Junctions_Here { + __kind: 'Here' +} + +export interface V3Junctions_X1 { + __kind: 'X1' + value: V3Junction +} + +export interface V3Junctions_X2 { + __kind: 'X2' + value: [V3Junction, V3Junction] +} + +export interface V3Junctions_X3 { + __kind: 'X3' + value: [V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X4 { + __kind: 'X4' + value: [V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X5 { + __kind: 'X5' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X6 { + __kind: 'X6' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X7 { + __kind: 'X7' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X8 { + __kind: 'X8' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3MultiLocation { + parents: number + interior: V3Junctions +} + +export type V3AssetId = V3AssetId_Abstract | V3AssetId_Concrete + +export interface V3AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V3AssetId_Concrete { + __kind: 'Concrete' + value: V3MultiLocation +} + +export type VersionedAssetId = VersionedAssetId_V3 | VersionedAssetId_V4 + +export interface VersionedAssetId_V3 { + __kind: 'V3' + value: V3AssetId +} + +export interface VersionedAssetId_V4 { + __kind: 'V4' + value: V4AssetId +} + +export const TransferType: sts.Type = sts.closedEnum(() => { + return { + DestinationReserve: sts.unit(), + LocalReserve: sts.unit(), + RemoteReserve: VersionedLocation, + Teleport: sts.unit(), + } +}) + +export type TransferType = TransferType_DestinationReserve | TransferType_LocalReserve | TransferType_RemoteReserve | TransferType_Teleport + +export interface TransferType_DestinationReserve { + __kind: 'DestinationReserve' +} + +export interface TransferType_LocalReserve { + __kind: 'LocalReserve' +} + +export interface TransferType_RemoteReserve { + __kind: 'RemoteReserve' + value: VersionedLocation +} + +export interface TransferType_Teleport { + __kind: 'Teleport' +} + +export type VersionedLocation = VersionedLocation_V2 | VersionedLocation_V3 | VersionedLocation_V4 + +export interface VersionedLocation_V2 { + __kind: 'V2' + value: V2MultiLocation +} + +export interface VersionedLocation_V3 { + __kind: 'V3' + value: V3MultiLocation +} + +export interface VersionedLocation_V4 { + __kind: 'V4' + value: V4Location +} + +export interface V4Location { + parents: number + interior: V4Junctions +} + +export interface V2MultiLocation { + parents: number + interior: V2Junctions +} + +export type V2Junctions = V2Junctions_Here | V2Junctions_X1 | V2Junctions_X2 | V2Junctions_X3 | V2Junctions_X4 | V2Junctions_X5 | V2Junctions_X6 | V2Junctions_X7 | V2Junctions_X8 + +export interface V2Junctions_Here { + __kind: 'Here' +} + +export interface V2Junctions_X1 { + __kind: 'X1' + value: V2Junction +} + +export interface V2Junctions_X2 { + __kind: 'X2' + value: [V2Junction, V2Junction] +} + +export interface V2Junctions_X3 { + __kind: 'X3' + value: [V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X4 { + __kind: 'X4' + value: [V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X5 { + __kind: 'X5' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X6 { + __kind: 'X6' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X7 { + __kind: 'X7' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X8 { + __kind: 'X8' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export type V2Junction = V2Junction_AccountId32 | V2Junction_AccountIndex64 | V2Junction_AccountKey20 | V2Junction_GeneralIndex | V2Junction_GeneralKey | V2Junction_OnlyChild | V2Junction_PalletInstance | V2Junction_Parachain | V2Junction_Plurality + +export interface V2Junction_AccountId32 { + __kind: 'AccountId32' + network: V2NetworkId + id: Bytes +} + +export interface V2Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V2NetworkId + index: bigint +} + +export interface V2Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V2NetworkId + key: Bytes +} + +export interface V2Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V2Junction_GeneralKey { + __kind: 'GeneralKey' + value: WeakBoundedVec +} + +export interface V2Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V2Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V2Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V2Junction_Plurality { + __kind: 'Plurality' + id: V2BodyId + part: V2BodyPart +} + +export type V2BodyPart = V2BodyPart_AtLeastProportion | V2BodyPart_Fraction | V2BodyPart_Members | V2BodyPart_MoreThanProportion | V2BodyPart_Voice + +export interface V2BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V2BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V2BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V2BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V2BodyPart_Voice { + __kind: 'Voice' +} + +export type V2BodyId = V2BodyId_Administration | V2BodyId_Defense | V2BodyId_Executive | V2BodyId_Index | V2BodyId_Judicial | V2BodyId_Legislative | V2BodyId_Named | V2BodyId_Technical | V2BodyId_Treasury | V2BodyId_Unit + +export interface V2BodyId_Administration { + __kind: 'Administration' +} + +export interface V2BodyId_Defense { + __kind: 'Defense' +} + +export interface V2BodyId_Executive { + __kind: 'Executive' +} + +export interface V2BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V2BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V2BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V2BodyId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V2BodyId_Technical { + __kind: 'Technical' +} + +export interface V2BodyId_Treasury { + __kind: 'Treasury' +} + +export interface V2BodyId_Unit { + __kind: 'Unit' +} + +export type WeakBoundedVec = Bytes + +export type V2NetworkId = V2NetworkId_Any | V2NetworkId_Kusama | V2NetworkId_Named | V2NetworkId_Polkadot + +export interface V2NetworkId_Any { + __kind: 'Any' +} + +export interface V2NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V2NetworkId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V2NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export const VersionedXcm: sts.Type = sts.closedEnum(() => { + return { + V2: sts.array(() => V2Instruction), + V3: sts.array(() => V3Instruction), + V4: sts.array(() => V4Instruction), + } +}) + +export const V4Instruction: sts.Type = sts.closedEnum(() => { + return { + AliasOrigin: V4Location, + BurnAsset: sts.array(() => V4Asset), + BuyExecution: sts.enumStruct({ + fees: V4Asset, + weightLimit: V3WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V4Asset), + ticket: V4Location, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + ClearTopic: sts.unit(), + ClearTransactStatus: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V4AssetFilter, + beneficiary: V4Location, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V4AssetFilter, + dest: V4Location, + xcm: sts.array(() => V4Instruction), + }), + DescendOrigin: V4Junctions, + ExchangeAsset: sts.enumStruct({ + give: V4AssetFilter, + want: sts.array(() => V4Asset), + maximal: sts.boolean(), + }), + ExpectAsset: sts.array(() => V4Asset), + ExpectError: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + ExpectOrigin: sts.option(() => V4Location), + ExpectPallet: sts.enumStruct({ + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + crateMajor: sts.number(), + minCrateMinor: sts.number(), + }), + ExpectTransactStatus: V3MaybeErrorCode, + ExportMessage: sts.enumStruct({ + network: V4NetworkId, + destination: V4Junctions, + xcm: sts.array(() => V4Instruction), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V4AssetFilter, + reserve: V4Location, + xcm: sts.array(() => V4Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V4AssetFilter, + dest: V4Location, + xcm: sts.array(() => V4Instruction), + }), + LockAsset: sts.enumStruct({ + asset: V4Asset, + unlocker: V4Location, + }), + NoteUnlockable: sts.enumStruct({ + asset: V4Asset, + owner: V4Location, + }), + QueryPallet: sts.enumStruct({ + moduleName: sts.bytes(), + responseInfo: V4QueryResponseInfo, + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V4Response, + maxWeight: Weight, + querier: sts.option(() => V4Location), + }), + ReceiveTeleportedAsset: sts.array(() => V4Asset), + RefundSurplus: sts.unit(), + ReportError: V4QueryResponseInfo, + ReportHolding: sts.enumStruct({ + responseInfo: V4QueryResponseInfo, + assets: V4AssetFilter, + }), + ReportTransactStatus: V4QueryResponseInfo, + RequestUnlock: sts.enumStruct({ + asset: V4Asset, + locker: V4Location, + }), + ReserveAssetDeposited: sts.array(() => V4Asset), + SetAppendix: sts.array(() => V4Instruction), + SetErrorHandler: sts.array(() => V4Instruction), + SetFeesMode: sts.enumStruct({ + jitWithdraw: sts.boolean(), + }), + SetTopic: sts.bytes(), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: Weight, + }), + Transact: sts.enumStruct({ + originKind: V2OriginKind, + requireWeightAtMost: Weight, + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V4Asset), + beneficiary: V4Location, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V4Asset), + dest: V4Location, + xcm: sts.array(() => V4Instruction), + }), + Trap: sts.bigint(), + UniversalOrigin: V4Junction, + UnlockAsset: sts.enumStruct({ + asset: V4Asset, + target: V4Location, + }), + UnpaidExecution: sts.enumStruct({ + weightLimit: V3WeightLimit, + checkOrigin: sts.option(() => V4Location), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V4Asset), + } +}) + +export const DoubleEncoded: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncoded { + encoded: Bytes +} + +export const V2OriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type V2OriginKind = V2OriginKind_Native | V2OriginKind_SovereignAccount | V2OriginKind_Superuser | V2OriginKind_Xcm + +export interface V2OriginKind_Native { + __kind: 'Native' +} + +export interface V2OriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface V2OriginKind_Superuser { + __kind: 'Superuser' +} + +export interface V2OriginKind_Xcm { + __kind: 'Xcm' +} + +export const V4Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V4Asset), + DispatchResult: V3MaybeErrorCode, + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + Null: sts.unit(), + PalletsInfo: sts.array(() => V4PalletInfo), + Version: sts.number(), + } +}) + +export const V4PalletInfo: sts.Type = sts.struct(() => { + return { + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + major: sts.number(), + minor: sts.number(), + patch: sts.number(), + } +}) + +export interface V4PalletInfo { + index: number + name: Bytes + moduleName: Bytes + major: number + minor: number + patch: number +} + +export type V4Response = V4Response_Assets | V4Response_DispatchResult | V4Response_ExecutionResult | V4Response_Null | V4Response_PalletsInfo | V4Response_Version + +export interface V4Response_Assets { + __kind: 'Assets' + value: V4Asset[] +} + +export interface V4Response_DispatchResult { + __kind: 'DispatchResult' + value: V3MaybeErrorCode +} + +export interface V4Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V3Error] | undefined) +} + +export interface V4Response_Null { + __kind: 'Null' +} + +export interface V4Response_PalletsInfo { + __kind: 'PalletsInfo' + value: V4PalletInfo[] +} + +export interface V4Response_Version { + __kind: 'Version' + value: number +} + +export type V3Error = V3Error_AssetNotFound | V3Error_BadOrigin | V3Error_Barrier | V3Error_DestinationUnsupported | V3Error_ExceedsMaxMessageSize | V3Error_ExceedsStackLimit | V3Error_ExpectationFalse | V3Error_ExportError | V3Error_FailedToDecode | V3Error_FailedToTransactAsset | V3Error_FeesNotMet | V3Error_HoldingWouldOverflow | V3Error_InvalidLocation | V3Error_LocationCannotHold | V3Error_LocationFull | V3Error_LocationNotInvertible | V3Error_LockError | V3Error_MaxWeightInvalid | V3Error_NameMismatch | V3Error_NoDeal | V3Error_NoPermission | V3Error_NotDepositable | V3Error_NotHoldingFees | V3Error_NotWithdrawable | V3Error_Overflow | V3Error_PalletNotFound | V3Error_ReanchorFailed | V3Error_TooExpensive | V3Error_Transport | V3Error_Trap | V3Error_Unanchored | V3Error_UnhandledXcmVersion | V3Error_Unimplemented | V3Error_UnknownClaim | V3Error_Unroutable | V3Error_UntrustedReserveLocation | V3Error_UntrustedTeleportLocation | V3Error_VersionIncompatible | V3Error_WeightLimitReached | V3Error_WeightNotComputable + +export interface V3Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V3Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V3Error_Barrier { + __kind: 'Barrier' +} + +export interface V3Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V3Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V3Error_ExceedsStackLimit { + __kind: 'ExceedsStackLimit' +} + +export interface V3Error_ExpectationFalse { + __kind: 'ExpectationFalse' +} + +export interface V3Error_ExportError { + __kind: 'ExportError' +} + +export interface V3Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V3Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V3Error_FeesNotMet { + __kind: 'FeesNotMet' +} + +export interface V3Error_HoldingWouldOverflow { + __kind: 'HoldingWouldOverflow' +} + +export interface V3Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V3Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V3Error_LocationFull { + __kind: 'LocationFull' +} + +export interface V3Error_LocationNotInvertible { + __kind: 'LocationNotInvertible' +} + +export interface V3Error_LockError { + __kind: 'LockError' +} + +export interface V3Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V3Error_NameMismatch { + __kind: 'NameMismatch' +} + +export interface V3Error_NoDeal { + __kind: 'NoDeal' +} + +export interface V3Error_NoPermission { + __kind: 'NoPermission' +} + +export interface V3Error_NotDepositable { + __kind: 'NotDepositable' +} + +export interface V3Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V3Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V3Error_Overflow { + __kind: 'Overflow' +} + +export interface V3Error_PalletNotFound { + __kind: 'PalletNotFound' +} + +export interface V3Error_ReanchorFailed { + __kind: 'ReanchorFailed' +} + +export interface V3Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V3Error_Transport { + __kind: 'Transport' +} + +export interface V3Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V3Error_Unanchored { + __kind: 'Unanchored' +} + +export interface V3Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V3Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V3Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V3Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V3Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V3Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V3Error_VersionIncompatible { + __kind: 'VersionIncompatible' +} + +export interface V3Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: Weight +} + +export interface V3Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V3MaybeErrorCode = V3MaybeErrorCode_Error | V3MaybeErrorCode_Success | V3MaybeErrorCode_TruncatedError + +export interface V3MaybeErrorCode_Error { + __kind: 'Error' + value: Bytes +} + +export interface V3MaybeErrorCode_Success { + __kind: 'Success' +} + +export interface V3MaybeErrorCode_TruncatedError { + __kind: 'TruncatedError' + value: Bytes +} + +export interface V4Asset { + id: V4AssetId + fun: V4Fungibility +} + +export type V4Fungibility = V4Fungibility_Fungible | V4Fungibility_NonFungible + +export interface V4Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V4Fungibility_NonFungible { + __kind: 'NonFungible' + value: V4AssetInstance +} + +export type V4AssetInstance = V4AssetInstance_Array16 | V4AssetInstance_Array32 | V4AssetInstance_Array4 | V4AssetInstance_Array8 | V4AssetInstance_Index | V4AssetInstance_Undefined + +export interface V4AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V4AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V4AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V4AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V4AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V4AssetInstance_Undefined { + __kind: 'Undefined' +} + +export const V4QueryResponseInfo: sts.Type = sts.struct(() => { + return { + destination: V4Location, + queryId: sts.bigint(), + maxWeight: Weight, + } +}) + +export interface V4QueryResponseInfo { + destination: V4Location + queryId: bigint + maxWeight: Weight +} + +export const V3MaybeErrorCode: sts.Type = sts.closedEnum(() => { + return { + Error: sts.bytes(), + Success: sts.unit(), + TruncatedError: sts.bytes(), + } +}) + +export const V3Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + ExceedsStackLimit: sts.unit(), + ExpectationFalse: sts.unit(), + ExportError: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + FeesNotMet: sts.unit(), + HoldingWouldOverflow: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + LocationFull: sts.unit(), + LocationNotInvertible: sts.unit(), + LockError: sts.unit(), + MaxWeightInvalid: sts.unit(), + NameMismatch: sts.unit(), + NoDeal: sts.unit(), + NoPermission: sts.unit(), + NotDepositable: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + PalletNotFound: sts.unit(), + ReanchorFailed: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + Unanchored: sts.unit(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + VersionIncompatible: sts.unit(), + WeightLimitReached: Weight, + WeightNotComputable: sts.unit(), + } +}) + +export const V4AssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V4Asset), + Wild: V4WildAsset, + } +}) + +export const V4WildAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllCounted: sts.number(), + AllOf: sts.enumStruct({ + id: V4AssetId, + fun: V4WildFungibility, + }), + AllOfCounted: sts.enumStruct({ + id: V4AssetId, + fun: V4WildFungibility, + count: sts.number(), + }), + } +}) + +export const V4WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V4WildFungibility = V4WildFungibility_Fungible | V4WildFungibility_NonFungible + +export interface V4WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V4WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export type V4WildAsset = V4WildAsset_All | V4WildAsset_AllCounted | V4WildAsset_AllOf | V4WildAsset_AllOfCounted + +export interface V4WildAsset_All { + __kind: 'All' +} + +export interface V4WildAsset_AllCounted { + __kind: 'AllCounted' + value: number +} + +export interface V4WildAsset_AllOf { + __kind: 'AllOf' + id: V4AssetId + fun: V4WildFungibility +} + +export interface V4WildAsset_AllOfCounted { + __kind: 'AllOfCounted' + id: V4AssetId + fun: V4WildFungibility + count: number +} + +export type V4AssetFilter = V4AssetFilter_Definite | V4AssetFilter_Wild + +export interface V4AssetFilter_Definite { + __kind: 'Definite' + value: V4Asset[] +} + +export interface V4AssetFilter_Wild { + __kind: 'Wild' + value: V4WildAsset +} + +export const V4Asset: sts.Type = sts.struct(() => { + return { + id: V4AssetId, + fun: V4Fungibility, + } +}) + +export const V4Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V4AssetInstance, + } +}) + +export const V4AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V4Instruction = V4Instruction_AliasOrigin | V4Instruction_BurnAsset | V4Instruction_BuyExecution | V4Instruction_ClaimAsset | V4Instruction_ClearError | V4Instruction_ClearOrigin | V4Instruction_ClearTopic | V4Instruction_ClearTransactStatus | V4Instruction_DepositAsset | V4Instruction_DepositReserveAsset | V4Instruction_DescendOrigin | V4Instruction_ExchangeAsset | V4Instruction_ExpectAsset | V4Instruction_ExpectError | V4Instruction_ExpectOrigin | V4Instruction_ExpectPallet | V4Instruction_ExpectTransactStatus | V4Instruction_ExportMessage | V4Instruction_HrmpChannelAccepted | V4Instruction_HrmpChannelClosing | V4Instruction_HrmpNewChannelOpenRequest | V4Instruction_InitiateReserveWithdraw | V4Instruction_InitiateTeleport | V4Instruction_LockAsset | V4Instruction_NoteUnlockable | V4Instruction_QueryPallet | V4Instruction_QueryResponse | V4Instruction_ReceiveTeleportedAsset | V4Instruction_RefundSurplus | V4Instruction_ReportError | V4Instruction_ReportHolding | V4Instruction_ReportTransactStatus | V4Instruction_RequestUnlock | V4Instruction_ReserveAssetDeposited | V4Instruction_SetAppendix | V4Instruction_SetErrorHandler | V4Instruction_SetFeesMode | V4Instruction_SetTopic | V4Instruction_SubscribeVersion | V4Instruction_Transact | V4Instruction_TransferAsset | V4Instruction_TransferReserveAsset | V4Instruction_Trap | V4Instruction_UniversalOrigin | V4Instruction_UnlockAsset | V4Instruction_UnpaidExecution | V4Instruction_UnsubscribeVersion | V4Instruction_WithdrawAsset + +export interface V4Instruction_AliasOrigin { + __kind: 'AliasOrigin' + value: V4Location +} + +export interface V4Instruction_BurnAsset { + __kind: 'BurnAsset' + value: V4Asset[] +} + +export interface V4Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V4Asset + weightLimit: V3WeightLimit +} + +export interface V4Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V4Asset[] + ticket: V4Location +} + +export interface V4Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V4Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V4Instruction_ClearTopic { + __kind: 'ClearTopic' +} + +export interface V4Instruction_ClearTransactStatus { + __kind: 'ClearTransactStatus' +} + +export interface V4Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V4AssetFilter + beneficiary: V4Location +} + +export interface V4Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V4AssetFilter + dest: V4Location + xcm: V4Instruction[] +} + +export interface V4Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V4Junctions +} + +export interface V4Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V4AssetFilter + want: V4Asset[] + maximal: boolean +} + +export interface V4Instruction_ExpectAsset { + __kind: 'ExpectAsset' + value: V4Asset[] +} + +export interface V4Instruction_ExpectError { + __kind: 'ExpectError' + value?: ([number, V3Error] | undefined) +} + +export interface V4Instruction_ExpectOrigin { + __kind: 'ExpectOrigin' + value?: (V4Location | undefined) +} + +export interface V4Instruction_ExpectPallet { + __kind: 'ExpectPallet' + index: number + name: Bytes + moduleName: Bytes + crateMajor: number + minCrateMinor: number +} + +export interface V4Instruction_ExpectTransactStatus { + __kind: 'ExpectTransactStatus' + value: V3MaybeErrorCode +} + +export interface V4Instruction_ExportMessage { + __kind: 'ExportMessage' + network: V4NetworkId + destination: V4Junctions + xcm: V4Instruction[] +} + +export interface V4Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V4Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V4Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V4Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V4AssetFilter + reserve: V4Location + xcm: V4Instruction[] +} + +export interface V4Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V4AssetFilter + dest: V4Location + xcm: V4Instruction[] +} + +export interface V4Instruction_LockAsset { + __kind: 'LockAsset' + asset: V4Asset + unlocker: V4Location +} + +export interface V4Instruction_NoteUnlockable { + __kind: 'NoteUnlockable' + asset: V4Asset + owner: V4Location +} + +export interface V4Instruction_QueryPallet { + __kind: 'QueryPallet' + moduleName: Bytes + responseInfo: V4QueryResponseInfo +} + +export interface V4Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V4Response + maxWeight: Weight + querier?: (V4Location | undefined) +} + +export interface V4Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V4Asset[] +} + +export interface V4Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V4Instruction_ReportError { + __kind: 'ReportError' + value: V4QueryResponseInfo +} + +export interface V4Instruction_ReportHolding { + __kind: 'ReportHolding' + responseInfo: V4QueryResponseInfo + assets: V4AssetFilter +} + +export interface V4Instruction_ReportTransactStatus { + __kind: 'ReportTransactStatus' + value: V4QueryResponseInfo +} + +export interface V4Instruction_RequestUnlock { + __kind: 'RequestUnlock' + asset: V4Asset + locker: V4Location +} + +export interface V4Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V4Asset[] +} + +export interface V4Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V4Instruction[] +} + +export interface V4Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V4Instruction[] +} + +export interface V4Instruction_SetFeesMode { + __kind: 'SetFeesMode' + jitWithdraw: boolean +} + +export interface V4Instruction_SetTopic { + __kind: 'SetTopic' + value: Bytes +} + +export interface V4Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: Weight +} + +export interface V4Instruction_Transact { + __kind: 'Transact' + originKind: V2OriginKind + requireWeightAtMost: Weight + call: DoubleEncoded +} + +export interface V4Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V4Asset[] + beneficiary: V4Location +} + +export interface V4Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V4Asset[] + dest: V4Location + xcm: V4Instruction[] +} + +export interface V4Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V4Instruction_UniversalOrigin { + __kind: 'UniversalOrigin' + value: V4Junction +} + +export interface V4Instruction_UnlockAsset { + __kind: 'UnlockAsset' + asset: V4Asset + target: V4Location +} + +export interface V4Instruction_UnpaidExecution { + __kind: 'UnpaidExecution' + weightLimit: V3WeightLimit + checkOrigin?: (V4Location | undefined) +} + +export interface V4Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V4Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V4Asset[] +} + +export type V3WeightLimit = V3WeightLimit_Limited | V3WeightLimit_Unlimited + +export interface V3WeightLimit_Limited { + __kind: 'Limited' + value: Weight +} + +export interface V3WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V3Instruction: sts.Type = sts.closedEnum(() => { + return { + AliasOrigin: V3MultiLocation, + BurnAsset: sts.array(() => V3MultiAsset), + BuyExecution: sts.enumStruct({ + fees: V3MultiAsset, + weightLimit: V3WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + ticket: V3MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + ClearTopic: sts.unit(), + ClearTransactStatus: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + beneficiary: V3MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + DescendOrigin: V3Junctions, + ExchangeAsset: sts.enumStruct({ + give: V3MultiAssetFilter, + want: sts.array(() => V3MultiAsset), + maximal: sts.boolean(), + }), + ExpectAsset: sts.array(() => V3MultiAsset), + ExpectError: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + ExpectOrigin: sts.option(() => V3MultiLocation), + ExpectPallet: sts.enumStruct({ + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + crateMajor: sts.number(), + minCrateMinor: sts.number(), + }), + ExpectTransactStatus: V3MaybeErrorCode, + ExportMessage: sts.enumStruct({ + network: V3NetworkId, + destination: V3Junctions, + xcm: sts.array(() => V3Instruction), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V3MultiAssetFilter, + reserve: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + LockAsset: sts.enumStruct({ + asset: V3MultiAsset, + unlocker: V3MultiLocation, + }), + NoteUnlockable: sts.enumStruct({ + asset: V3MultiAsset, + owner: V3MultiLocation, + }), + QueryPallet: sts.enumStruct({ + moduleName: sts.bytes(), + responseInfo: V3QueryResponseInfo, + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V3Response, + maxWeight: Weight, + querier: sts.option(() => V3MultiLocation), + }), + ReceiveTeleportedAsset: sts.array(() => V3MultiAsset), + RefundSurplus: sts.unit(), + ReportError: V3QueryResponseInfo, + ReportHolding: sts.enumStruct({ + responseInfo: V3QueryResponseInfo, + assets: V3MultiAssetFilter, + }), + ReportTransactStatus: V3QueryResponseInfo, + RequestUnlock: sts.enumStruct({ + asset: V3MultiAsset, + locker: V3MultiLocation, + }), + ReserveAssetDeposited: sts.array(() => V3MultiAsset), + SetAppendix: sts.array(() => V3Instruction), + SetErrorHandler: sts.array(() => V3Instruction), + SetFeesMode: sts.enumStruct({ + jitWithdraw: sts.boolean(), + }), + SetTopic: sts.bytes(), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: Weight, + }), + Transact: sts.enumStruct({ + originKind: V2OriginKind, + requireWeightAtMost: Weight, + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + beneficiary: V3MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + Trap: sts.bigint(), + UniversalOrigin: V3Junction, + UnlockAsset: sts.enumStruct({ + asset: V3MultiAsset, + target: V3MultiLocation, + }), + UnpaidExecution: sts.enumStruct({ + weightLimit: V3WeightLimit, + checkOrigin: sts.option(() => V3MultiLocation), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V3MultiAsset), + } +}) + +export const V3Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V3MultiAsset), + DispatchResult: V3MaybeErrorCode, + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + Null: sts.unit(), + PalletsInfo: sts.array(() => V3PalletInfo), + Version: sts.number(), + } +}) + +export const V3PalletInfo: sts.Type = sts.struct(() => { + return { + index: sts.number(), + name: BoundedVec, + moduleName: BoundedVec, + major: sts.number(), + minor: sts.number(), + patch: sts.number(), + } +}) + +export const BoundedVec = sts.bytes() + +export interface V3PalletInfo { + index: number + name: BoundedVec + moduleName: BoundedVec + major: number + minor: number + patch: number +} + +export type BoundedVec = Bytes + +export type V3Response = V3Response_Assets | V3Response_DispatchResult | V3Response_ExecutionResult | V3Response_Null | V3Response_PalletsInfo | V3Response_Version + +export interface V3Response_Assets { + __kind: 'Assets' + value: V3MultiAsset[] +} + +export interface V3Response_DispatchResult { + __kind: 'DispatchResult' + value: V3MaybeErrorCode +} + +export interface V3Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V3Error] | undefined) +} + +export interface V3Response_Null { + __kind: 'Null' +} + +export interface V3Response_PalletsInfo { + __kind: 'PalletsInfo' + value: V3PalletInfo[] +} + +export interface V3Response_Version { + __kind: 'Version' + value: number +} + +export interface V3MultiAsset { + id: V3AssetId + fun: V3Fungibility +} + +export type V3Fungibility = V3Fungibility_Fungible | V3Fungibility_NonFungible + +export interface V3Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V3Fungibility_NonFungible { + __kind: 'NonFungible' + value: V3AssetInstance +} + +export type V3AssetInstance = V3AssetInstance_Array16 | V3AssetInstance_Array32 | V3AssetInstance_Array4 | V3AssetInstance_Array8 | V3AssetInstance_Index | V3AssetInstance_Undefined + +export interface V3AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V3AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V3AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V3AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V3AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V3AssetInstance_Undefined { + __kind: 'Undefined' +} + +export const V3QueryResponseInfo: sts.Type = sts.struct(() => { + return { + destination: V3MultiLocation, + queryId: sts.bigint(), + maxWeight: Weight, + } +}) + +export interface V3QueryResponseInfo { + destination: V3MultiLocation + queryId: bigint + maxWeight: Weight +} + +export const V3MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V3MultiAsset), + Wild: V3WildMultiAsset, + } +}) + +export const V3WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllCounted: sts.number(), + AllOf: sts.enumStruct({ + id: V3AssetId, + fun: V3WildFungibility, + }), + AllOfCounted: sts.enumStruct({ + id: V3AssetId, + fun: V3WildFungibility, + count: sts.number(), + }), + } +}) + +export const V3WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V3WildFungibility = V3WildFungibility_Fungible | V3WildFungibility_NonFungible + +export interface V3WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V3WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export type V3WildMultiAsset = V3WildMultiAsset_All | V3WildMultiAsset_AllCounted | V3WildMultiAsset_AllOf | V3WildMultiAsset_AllOfCounted + +export interface V3WildMultiAsset_All { + __kind: 'All' +} + +export interface V3WildMultiAsset_AllCounted { + __kind: 'AllCounted' + value: number +} + +export interface V3WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V3AssetId + fun: V3WildFungibility +} + +export interface V3WildMultiAsset_AllOfCounted { + __kind: 'AllOfCounted' + id: V3AssetId + fun: V3WildFungibility + count: number +} + +export type V3MultiAssetFilter = V3MultiAssetFilter_Definite | V3MultiAssetFilter_Wild + +export interface V3MultiAssetFilter_Definite { + __kind: 'Definite' + value: V3MultiAsset[] +} + +export interface V3MultiAssetFilter_Wild { + __kind: 'Wild' + value: V3WildMultiAsset +} + +export const V3MultiAsset: sts.Type = sts.struct(() => { + return { + id: V3AssetId, + fun: V3Fungibility, + } +}) + +export const V3Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V3AssetInstance, + } +}) + +export const V3AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V3Instruction = V3Instruction_AliasOrigin | V3Instruction_BurnAsset | V3Instruction_BuyExecution | V3Instruction_ClaimAsset | V3Instruction_ClearError | V3Instruction_ClearOrigin | V3Instruction_ClearTopic | V3Instruction_ClearTransactStatus | V3Instruction_DepositAsset | V3Instruction_DepositReserveAsset | V3Instruction_DescendOrigin | V3Instruction_ExchangeAsset | V3Instruction_ExpectAsset | V3Instruction_ExpectError | V3Instruction_ExpectOrigin | V3Instruction_ExpectPallet | V3Instruction_ExpectTransactStatus | V3Instruction_ExportMessage | V3Instruction_HrmpChannelAccepted | V3Instruction_HrmpChannelClosing | V3Instruction_HrmpNewChannelOpenRequest | V3Instruction_InitiateReserveWithdraw | V3Instruction_InitiateTeleport | V3Instruction_LockAsset | V3Instruction_NoteUnlockable | V3Instruction_QueryPallet | V3Instruction_QueryResponse | V3Instruction_ReceiveTeleportedAsset | V3Instruction_RefundSurplus | V3Instruction_ReportError | V3Instruction_ReportHolding | V3Instruction_ReportTransactStatus | V3Instruction_RequestUnlock | V3Instruction_ReserveAssetDeposited | V3Instruction_SetAppendix | V3Instruction_SetErrorHandler | V3Instruction_SetFeesMode | V3Instruction_SetTopic | V3Instruction_SubscribeVersion | V3Instruction_Transact | V3Instruction_TransferAsset | V3Instruction_TransferReserveAsset | V3Instruction_Trap | V3Instruction_UniversalOrigin | V3Instruction_UnlockAsset | V3Instruction_UnpaidExecution | V3Instruction_UnsubscribeVersion | V3Instruction_WithdrawAsset + +export interface V3Instruction_AliasOrigin { + __kind: 'AliasOrigin' + value: V3MultiLocation +} + +export interface V3Instruction_BurnAsset { + __kind: 'BurnAsset' + value: V3MultiAsset[] +} + +export interface V3Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V3MultiAsset + weightLimit: V3WeightLimit +} + +export interface V3Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V3MultiAsset[] + ticket: V3MultiLocation +} + +export interface V3Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V3Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V3Instruction_ClearTopic { + __kind: 'ClearTopic' +} + +export interface V3Instruction_ClearTransactStatus { + __kind: 'ClearTransactStatus' +} + +export interface V3Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V3MultiAssetFilter + beneficiary: V3MultiLocation +} + +export interface V3Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V3Junctions +} + +export interface V3Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V3MultiAssetFilter + want: V3MultiAsset[] + maximal: boolean +} + +export interface V3Instruction_ExpectAsset { + __kind: 'ExpectAsset' + value: V3MultiAsset[] +} + +export interface V3Instruction_ExpectError { + __kind: 'ExpectError' + value?: ([number, V3Error] | undefined) +} + +export interface V3Instruction_ExpectOrigin { + __kind: 'ExpectOrigin' + value?: (V3MultiLocation | undefined) +} + +export interface V3Instruction_ExpectPallet { + __kind: 'ExpectPallet' + index: number + name: Bytes + moduleName: Bytes + crateMajor: number + minCrateMinor: number +} + +export interface V3Instruction_ExpectTransactStatus { + __kind: 'ExpectTransactStatus' + value: V3MaybeErrorCode +} + +export interface V3Instruction_ExportMessage { + __kind: 'ExportMessage' + network: V3NetworkId + destination: V3Junctions + xcm: V3Instruction[] +} + +export interface V3Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V3Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V3Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V3Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V3MultiAssetFilter + reserve: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_LockAsset { + __kind: 'LockAsset' + asset: V3MultiAsset + unlocker: V3MultiLocation +} + +export interface V3Instruction_NoteUnlockable { + __kind: 'NoteUnlockable' + asset: V3MultiAsset + owner: V3MultiLocation +} + +export interface V3Instruction_QueryPallet { + __kind: 'QueryPallet' + moduleName: Bytes + responseInfo: V3QueryResponseInfo +} + +export interface V3Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V3Response + maxWeight: Weight + querier?: (V3MultiLocation | undefined) +} + +export interface V3Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V3MultiAsset[] +} + +export interface V3Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V3Instruction_ReportError { + __kind: 'ReportError' + value: V3QueryResponseInfo +} + +export interface V3Instruction_ReportHolding { + __kind: 'ReportHolding' + responseInfo: V3QueryResponseInfo + assets: V3MultiAssetFilter +} + +export interface V3Instruction_ReportTransactStatus { + __kind: 'ReportTransactStatus' + value: V3QueryResponseInfo +} + +export interface V3Instruction_RequestUnlock { + __kind: 'RequestUnlock' + asset: V3MultiAsset + locker: V3MultiLocation +} + +export interface V3Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V3MultiAsset[] +} + +export interface V3Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V3Instruction[] +} + +export interface V3Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V3Instruction[] +} + +export interface V3Instruction_SetFeesMode { + __kind: 'SetFeesMode' + jitWithdraw: boolean +} + +export interface V3Instruction_SetTopic { + __kind: 'SetTopic' + value: Bytes +} + +export interface V3Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: Weight +} + +export interface V3Instruction_Transact { + __kind: 'Transact' + originKind: V2OriginKind + requireWeightAtMost: Weight + call: DoubleEncoded +} + +export interface V3Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V3MultiAsset[] + beneficiary: V3MultiLocation +} + +export interface V3Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V3MultiAsset[] + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V3Instruction_UniversalOrigin { + __kind: 'UniversalOrigin' + value: V3Junction +} + +export interface V3Instruction_UnlockAsset { + __kind: 'UnlockAsset' + asset: V3MultiAsset + target: V3MultiLocation +} + +export interface V3Instruction_UnpaidExecution { + __kind: 'UnpaidExecution' + weightLimit: V3WeightLimit + checkOrigin?: (V3MultiLocation | undefined) +} + +export interface V3Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V3Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V3MultiAsset[] +} + +export const V2Instruction: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V2MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + ticket: V2MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V2MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V2Junctions, + ExchangeAsset: sts.enumStruct({ + give: V2MultiAssetFilter, + receive: sts.array(() => V2MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V2MultiAssetFilter, + reserve: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V2MultiAssetFilter, + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + assets: V2MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V2MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V2MultiAsset), + SetAppendix: sts.array(() => V2Instruction), + SetErrorHandler: sts.array(() => V2Instruction), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V2OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + beneficiary: V2MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V2MultiAsset), + } +}) + +export const V2Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V2MultiAsset), + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V2Error])), + Null: sts.unit(), + Version: sts.number(), + } +}) + +export const V2Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + MaxWeightInvalid: sts.unit(), + MultiLocationFull: sts.unit(), + MultiLocationNotInvertible: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + WeightLimitReached: sts.bigint(), + WeightNotComputable: sts.unit(), + } +}) + +export type V2Error = V2Error_AssetNotFound | V2Error_BadOrigin | V2Error_Barrier | V2Error_DestinationUnsupported | V2Error_ExceedsMaxMessageSize | V2Error_FailedToDecode | V2Error_FailedToTransactAsset | V2Error_InvalidLocation | V2Error_LocationCannotHold | V2Error_MaxWeightInvalid | V2Error_MultiLocationFull | V2Error_MultiLocationNotInvertible | V2Error_NotHoldingFees | V2Error_NotWithdrawable | V2Error_Overflow | V2Error_TooExpensive | V2Error_Transport | V2Error_Trap | V2Error_UnhandledXcmVersion | V2Error_Unimplemented | V2Error_UnknownClaim | V2Error_Unroutable | V2Error_UntrustedReserveLocation | V2Error_UntrustedTeleportLocation | V2Error_WeightLimitReached | V2Error_WeightNotComputable + +export interface V2Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V2Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V2Error_Barrier { + __kind: 'Barrier' +} + +export interface V2Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V2Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V2Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V2Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V2Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V2Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V2Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V2Error_MultiLocationFull { + __kind: 'MultiLocationFull' +} + +export interface V2Error_MultiLocationNotInvertible { + __kind: 'MultiLocationNotInvertible' +} + +export interface V2Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V2Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V2Error_Overflow { + __kind: 'Overflow' +} + +export interface V2Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V2Error_Transport { + __kind: 'Transport' +} + +export interface V2Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V2Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V2Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V2Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V2Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V2Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V2Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: bigint +} + +export interface V2Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V2Response = V2Response_Assets | V2Response_ExecutionResult | V2Response_Null | V2Response_Version + +export interface V2Response_Assets { + __kind: 'Assets' + value: V2MultiAsset[] +} + +export interface V2Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V2Error] | undefined) +} + +export interface V2Response_Null { + __kind: 'Null' +} + +export interface V2Response_Version { + __kind: 'Version' + value: number +} + +export interface V2MultiAsset { + id: V2AssetId + fun: V2Fungibility +} + +export type V2Fungibility = V2Fungibility_Fungible | V2Fungibility_NonFungible + +export interface V2Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V2Fungibility_NonFungible { + __kind: 'NonFungible' + value: V2AssetInstance +} + +export type V2AssetInstance = V2AssetInstance_Array16 | V2AssetInstance_Array32 | V2AssetInstance_Array4 | V2AssetInstance_Array8 | V2AssetInstance_Blob | V2AssetInstance_Index | V2AssetInstance_Undefined + +export interface V2AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V2AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V2AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V2AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V2AssetInstance_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface V2AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V2AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V2AssetId = V2AssetId_Abstract | V2AssetId_Concrete + +export interface V2AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V2AssetId_Concrete { + __kind: 'Concrete' + value: V2MultiLocation +} + +export const V2Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V2Junction, + X2: sts.tuple(() => [V2Junction, V2Junction]), + X3: sts.tuple(() => [V2Junction, V2Junction, V2Junction]), + X4: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction]), + X5: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + X6: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + X7: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + X8: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + } +}) + +export const V2Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V2NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V2NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V2NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: WeakBoundedVec, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V2BodyId, + part: V2BodyPart, + }), + } +}) + +export const V2BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export const V2BodyId: sts.Type = sts.closedEnum(() => { + return { + Administration: sts.unit(), + Defense: sts.unit(), + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: WeakBoundedVec, + Technical: sts.unit(), + Treasury: sts.unit(), + Unit: sts.unit(), + } +}) + +export const WeakBoundedVec = sts.bytes() + +export const V2NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: WeakBoundedVec, + Polkadot: sts.unit(), + } +}) + +export const V2MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V2MultiAsset), + Wild: V2WildMultiAsset, + } +}) + +export const V2WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllOf: sts.enumStruct({ + id: V2AssetId, + fun: V2WildFungibility, + }), + } +}) + +export const V2WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V2WildFungibility = V2WildFungibility_Fungible | V2WildFungibility_NonFungible + +export interface V2WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V2WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V2AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V2MultiLocation, + } +}) + +export type V2WildMultiAsset = V2WildMultiAsset_All | V2WildMultiAsset_AllOf + +export interface V2WildMultiAsset_All { + __kind: 'All' +} + +export interface V2WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V2AssetId + fun: V2WildFungibility +} + +export type V2MultiAssetFilter = V2MultiAssetFilter_Definite | V2MultiAssetFilter_Wild + +export interface V2MultiAssetFilter_Definite { + __kind: 'Definite' + value: V2MultiAsset[] +} + +export interface V2MultiAssetFilter_Wild { + __kind: 'Wild' + value: V2WildMultiAsset +} + +export const V2MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V2Junctions, + } +}) + +export const V2WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: sts.bigint(), + Unlimited: sts.unit(), + } +}) + +export type V2WeightLimit = V2WeightLimit_Limited | V2WeightLimit_Unlimited + +export interface V2WeightLimit_Limited { + __kind: 'Limited' + value: bigint +} + +export interface V2WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V2MultiAsset: sts.Type = sts.struct(() => { + return { + id: V2AssetId, + fun: V2Fungibility, + } +}) + +export const V2Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V2AssetInstance, + } +}) + +export const V2AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V2Instruction = V2Instruction_BuyExecution | V2Instruction_ClaimAsset | V2Instruction_ClearError | V2Instruction_ClearOrigin | V2Instruction_DepositAsset | V2Instruction_DepositReserveAsset | V2Instruction_DescendOrigin | V2Instruction_ExchangeAsset | V2Instruction_HrmpChannelAccepted | V2Instruction_HrmpChannelClosing | V2Instruction_HrmpNewChannelOpenRequest | V2Instruction_InitiateReserveWithdraw | V2Instruction_InitiateTeleport | V2Instruction_QueryHolding | V2Instruction_QueryResponse | V2Instruction_ReceiveTeleportedAsset | V2Instruction_RefundSurplus | V2Instruction_ReportError | V2Instruction_ReserveAssetDeposited | V2Instruction_SetAppendix | V2Instruction_SetErrorHandler | V2Instruction_SubscribeVersion | V2Instruction_Transact | V2Instruction_TransferAsset | V2Instruction_TransferReserveAsset | V2Instruction_Trap | V2Instruction_UnsubscribeVersion | V2Instruction_WithdrawAsset + +export interface V2Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V2MultiAsset + weightLimit: V2WeightLimit +} + +export interface V2Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V2MultiAsset[] + ticket: V2MultiLocation +} + +export interface V2Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V2Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V2Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V2MultiAssetFilter + maxAssets: number + beneficiary: V2MultiLocation +} + +export interface V2Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V2MultiAssetFilter + maxAssets: number + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V2Junctions +} + +export interface V2Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V2MultiAssetFilter + receive: V2MultiAsset[] +} + +export interface V2Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V2Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V2Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V2Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V2MultiAssetFilter + reserve: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V2MultiAssetFilter + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V2MultiLocation + assets: V2MultiAssetFilter + maxResponseWeight: bigint +} + +export interface V2Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface V2Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V2MultiAsset[] +} + +export interface V2Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V2Instruction_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V2MultiLocation + maxResponseWeight: bigint +} + +export interface V2Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V2MultiAsset[] +} + +export interface V2Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V2Instruction[] +} + +export interface V2Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V2Instruction[] +} + +export interface V2Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V2Instruction_Transact { + __kind: 'Transact' + originType: V2OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V2Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V2MultiAsset[] + beneficiary: V2MultiLocation +} + +export interface V2Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V2MultiAsset[] + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V2Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V2MultiAsset[] +} + +export type VersionedXcm = VersionedXcm_V2 | VersionedXcm_V3 | VersionedXcm_V4 + +export interface VersionedXcm_V2 { + __kind: 'V2' + value: V2Instruction[] +} + +export interface VersionedXcm_V3 { + __kind: 'V3' + value: V3Instruction[] +} + +export interface VersionedXcm_V4 { + __kind: 'V4' + value: V4Instruction[] +} + +export const V3WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: Weight, + Unlimited: sts.unit(), + } +}) + +export const V4Location: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V4Junctions, + } +}) + +export const Type_441: sts.Type = sts.closedEnum(() => { + return { + V2: sts.array(() => Type_444), + V3: sts.array(() => Type_448), + V4: sts.array(() => Type_451), + } +}) + +export const Type_451: sts.Type = sts.closedEnum(() => { + return { + AliasOrigin: V4Location, + BurnAsset: sts.array(() => V4Asset), + BuyExecution: sts.enumStruct({ + fees: V4Asset, + weightLimit: V3WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V4Asset), + ticket: V4Location, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + ClearTopic: sts.unit(), + ClearTransactStatus: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V4AssetFilter, + beneficiary: V4Location, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V4AssetFilter, + dest: V4Location, + xcm: sts.array(() => V4Instruction), + }), + DescendOrigin: V4Junctions, + ExchangeAsset: sts.enumStruct({ + give: V4AssetFilter, + want: sts.array(() => V4Asset), + maximal: sts.boolean(), + }), + ExpectAsset: sts.array(() => V4Asset), + ExpectError: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + ExpectOrigin: sts.option(() => V4Location), + ExpectPallet: sts.enumStruct({ + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + crateMajor: sts.number(), + minCrateMinor: sts.number(), + }), + ExpectTransactStatus: V3MaybeErrorCode, + ExportMessage: sts.enumStruct({ + network: V4NetworkId, + destination: V4Junctions, + xcm: sts.array(() => V4Instruction), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V4AssetFilter, + reserve: V4Location, + xcm: sts.array(() => V4Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V4AssetFilter, + dest: V4Location, + xcm: sts.array(() => V4Instruction), + }), + LockAsset: sts.enumStruct({ + asset: V4Asset, + unlocker: V4Location, + }), + NoteUnlockable: sts.enumStruct({ + asset: V4Asset, + owner: V4Location, + }), + QueryPallet: sts.enumStruct({ + moduleName: sts.bytes(), + responseInfo: V4QueryResponseInfo, + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V4Response, + maxWeight: Weight, + querier: sts.option(() => V4Location), + }), + ReceiveTeleportedAsset: sts.array(() => V4Asset), + RefundSurplus: sts.unit(), + ReportError: V4QueryResponseInfo, + ReportHolding: sts.enumStruct({ + responseInfo: V4QueryResponseInfo, + assets: V4AssetFilter, + }), + ReportTransactStatus: V4QueryResponseInfo, + RequestUnlock: sts.enumStruct({ + asset: V4Asset, + locker: V4Location, + }), + ReserveAssetDeposited: sts.array(() => V4Asset), + SetAppendix: sts.array(() => Type_451), + SetErrorHandler: sts.array(() => Type_451), + SetFeesMode: sts.enumStruct({ + jitWithdraw: sts.boolean(), + }), + SetTopic: sts.bytes(), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: Weight, + }), + Transact: sts.enumStruct({ + originKind: V2OriginKind, + requireWeightAtMost: Weight, + call: Type_445, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V4Asset), + beneficiary: V4Location, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V4Asset), + dest: V4Location, + xcm: sts.array(() => V4Instruction), + }), + Trap: sts.bigint(), + UniversalOrigin: V4Junction, + UnlockAsset: sts.enumStruct({ + asset: V4Asset, + target: V4Location, + }), + UnpaidExecution: sts.enumStruct({ + weightLimit: V3WeightLimit, + checkOrigin: sts.option(() => V4Location), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V4Asset), + } +}) + +export const Type_445: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface Type_445 { + encoded: Bytes +} + +export type Type_451 = Type_451_AliasOrigin | Type_451_BurnAsset | Type_451_BuyExecution | Type_451_ClaimAsset | Type_451_ClearError | Type_451_ClearOrigin | Type_451_ClearTopic | Type_451_ClearTransactStatus | Type_451_DepositAsset | Type_451_DepositReserveAsset | Type_451_DescendOrigin | Type_451_ExchangeAsset | Type_451_ExpectAsset | Type_451_ExpectError | Type_451_ExpectOrigin | Type_451_ExpectPallet | Type_451_ExpectTransactStatus | Type_451_ExportMessage | Type_451_HrmpChannelAccepted | Type_451_HrmpChannelClosing | Type_451_HrmpNewChannelOpenRequest | Type_451_InitiateReserveWithdraw | Type_451_InitiateTeleport | Type_451_LockAsset | Type_451_NoteUnlockable | Type_451_QueryPallet | Type_451_QueryResponse | Type_451_ReceiveTeleportedAsset | Type_451_RefundSurplus | Type_451_ReportError | Type_451_ReportHolding | Type_451_ReportTransactStatus | Type_451_RequestUnlock | Type_451_ReserveAssetDeposited | Type_451_SetAppendix | Type_451_SetErrorHandler | Type_451_SetFeesMode | Type_451_SetTopic | Type_451_SubscribeVersion | Type_451_Transact | Type_451_TransferAsset | Type_451_TransferReserveAsset | Type_451_Trap | Type_451_UniversalOrigin | Type_451_UnlockAsset | Type_451_UnpaidExecution | Type_451_UnsubscribeVersion | Type_451_WithdrawAsset + +export interface Type_451_AliasOrigin { + __kind: 'AliasOrigin' + value: V4Location +} + +export interface Type_451_BurnAsset { + __kind: 'BurnAsset' + value: V4Asset[] +} + +export interface Type_451_BuyExecution { + __kind: 'BuyExecution' + fees: V4Asset + weightLimit: V3WeightLimit +} + +export interface Type_451_ClaimAsset { + __kind: 'ClaimAsset' + assets: V4Asset[] + ticket: V4Location +} + +export interface Type_451_ClearError { + __kind: 'ClearError' +} + +export interface Type_451_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_451_ClearTopic { + __kind: 'ClearTopic' +} + +export interface Type_451_ClearTransactStatus { + __kind: 'ClearTransactStatus' +} + +export interface Type_451_DepositAsset { + __kind: 'DepositAsset' + assets: V4AssetFilter + beneficiary: V4Location +} + +export interface Type_451_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V4AssetFilter + dest: V4Location + xcm: V4Instruction[] +} + +export interface Type_451_DescendOrigin { + __kind: 'DescendOrigin' + value: V4Junctions +} + +export interface Type_451_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V4AssetFilter + want: V4Asset[] + maximal: boolean +} + +export interface Type_451_ExpectAsset { + __kind: 'ExpectAsset' + value: V4Asset[] +} + +export interface Type_451_ExpectError { + __kind: 'ExpectError' + value?: ([number, V3Error] | undefined) +} + +export interface Type_451_ExpectOrigin { + __kind: 'ExpectOrigin' + value?: (V4Location | undefined) +} + +export interface Type_451_ExpectPallet { + __kind: 'ExpectPallet' + index: number + name: Bytes + moduleName: Bytes + crateMajor: number + minCrateMinor: number +} + +export interface Type_451_ExpectTransactStatus { + __kind: 'ExpectTransactStatus' + value: V3MaybeErrorCode +} + +export interface Type_451_ExportMessage { + __kind: 'ExportMessage' + network: V4NetworkId + destination: V4Junctions + xcm: V4Instruction[] +} + +export interface Type_451_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_451_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_451_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_451_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V4AssetFilter + reserve: V4Location + xcm: V4Instruction[] +} + +export interface Type_451_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V4AssetFilter + dest: V4Location + xcm: V4Instruction[] +} + +export interface Type_451_LockAsset { + __kind: 'LockAsset' + asset: V4Asset + unlocker: V4Location +} + +export interface Type_451_NoteUnlockable { + __kind: 'NoteUnlockable' + asset: V4Asset + owner: V4Location +} + +export interface Type_451_QueryPallet { + __kind: 'QueryPallet' + moduleName: Bytes + responseInfo: V4QueryResponseInfo +} + +export interface Type_451_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V4Response + maxWeight: Weight + querier?: (V4Location | undefined) +} + +export interface Type_451_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V4Asset[] +} + +export interface Type_451_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_451_ReportError { + __kind: 'ReportError' + value: V4QueryResponseInfo +} + +export interface Type_451_ReportHolding { + __kind: 'ReportHolding' + responseInfo: V4QueryResponseInfo + assets: V4AssetFilter +} + +export interface Type_451_ReportTransactStatus { + __kind: 'ReportTransactStatus' + value: V4QueryResponseInfo +} + +export interface Type_451_RequestUnlock { + __kind: 'RequestUnlock' + asset: V4Asset + locker: V4Location +} + +export interface Type_451_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V4Asset[] +} + +export interface Type_451_SetAppendix { + __kind: 'SetAppendix' + value: Type_451[] +} + +export interface Type_451_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_451[] +} + +export interface Type_451_SetFeesMode { + __kind: 'SetFeesMode' + jitWithdraw: boolean +} + +export interface Type_451_SetTopic { + __kind: 'SetTopic' + value: Bytes +} + +export interface Type_451_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: Weight +} + +export interface Type_451_Transact { + __kind: 'Transact' + originKind: V2OriginKind + requireWeightAtMost: Weight + call: Type_445 +} + +export interface Type_451_TransferAsset { + __kind: 'TransferAsset' + assets: V4Asset[] + beneficiary: V4Location +} + +export interface Type_451_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V4Asset[] + dest: V4Location + xcm: V4Instruction[] +} + +export interface Type_451_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_451_UniversalOrigin { + __kind: 'UniversalOrigin' + value: V4Junction +} + +export interface Type_451_UnlockAsset { + __kind: 'UnlockAsset' + asset: V4Asset + target: V4Location +} + +export interface Type_451_UnpaidExecution { + __kind: 'UnpaidExecution' + weightLimit: V3WeightLimit + checkOrigin?: (V4Location | undefined) +} + +export interface Type_451_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_451_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V4Asset[] +} + +export const Type_448: sts.Type = sts.closedEnum(() => { + return { + AliasOrigin: V3MultiLocation, + BurnAsset: sts.array(() => V3MultiAsset), + BuyExecution: sts.enumStruct({ + fees: V3MultiAsset, + weightLimit: V3WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + ticket: V3MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + ClearTopic: sts.unit(), + ClearTransactStatus: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + beneficiary: V3MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + DescendOrigin: V3Junctions, + ExchangeAsset: sts.enumStruct({ + give: V3MultiAssetFilter, + want: sts.array(() => V3MultiAsset), + maximal: sts.boolean(), + }), + ExpectAsset: sts.array(() => V3MultiAsset), + ExpectError: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + ExpectOrigin: sts.option(() => V3MultiLocation), + ExpectPallet: sts.enumStruct({ + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + crateMajor: sts.number(), + minCrateMinor: sts.number(), + }), + ExpectTransactStatus: V3MaybeErrorCode, + ExportMessage: sts.enumStruct({ + network: V3NetworkId, + destination: V3Junctions, + xcm: sts.array(() => V3Instruction), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V3MultiAssetFilter, + reserve: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + LockAsset: sts.enumStruct({ + asset: V3MultiAsset, + unlocker: V3MultiLocation, + }), + NoteUnlockable: sts.enumStruct({ + asset: V3MultiAsset, + owner: V3MultiLocation, + }), + QueryPallet: sts.enumStruct({ + moduleName: sts.bytes(), + responseInfo: V3QueryResponseInfo, + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V3Response, + maxWeight: Weight, + querier: sts.option(() => V3MultiLocation), + }), + ReceiveTeleportedAsset: sts.array(() => V3MultiAsset), + RefundSurplus: sts.unit(), + ReportError: V3QueryResponseInfo, + ReportHolding: sts.enumStruct({ + responseInfo: V3QueryResponseInfo, + assets: V3MultiAssetFilter, + }), + ReportTransactStatus: V3QueryResponseInfo, + RequestUnlock: sts.enumStruct({ + asset: V3MultiAsset, + locker: V3MultiLocation, + }), + ReserveAssetDeposited: sts.array(() => V3MultiAsset), + SetAppendix: sts.array(() => Type_448), + SetErrorHandler: sts.array(() => Type_448), + SetFeesMode: sts.enumStruct({ + jitWithdraw: sts.boolean(), + }), + SetTopic: sts.bytes(), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: Weight, + }), + Transact: sts.enumStruct({ + originKind: V2OriginKind, + requireWeightAtMost: Weight, + call: Type_445, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + beneficiary: V3MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + Trap: sts.bigint(), + UniversalOrigin: V3Junction, + UnlockAsset: sts.enumStruct({ + asset: V3MultiAsset, + target: V3MultiLocation, + }), + UnpaidExecution: sts.enumStruct({ + weightLimit: V3WeightLimit, + checkOrigin: sts.option(() => V3MultiLocation), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V3MultiAsset), + } +}) + +export type Type_448 = Type_448_AliasOrigin | Type_448_BurnAsset | Type_448_BuyExecution | Type_448_ClaimAsset | Type_448_ClearError | Type_448_ClearOrigin | Type_448_ClearTopic | Type_448_ClearTransactStatus | Type_448_DepositAsset | Type_448_DepositReserveAsset | Type_448_DescendOrigin | Type_448_ExchangeAsset | Type_448_ExpectAsset | Type_448_ExpectError | Type_448_ExpectOrigin | Type_448_ExpectPallet | Type_448_ExpectTransactStatus | Type_448_ExportMessage | Type_448_HrmpChannelAccepted | Type_448_HrmpChannelClosing | Type_448_HrmpNewChannelOpenRequest | Type_448_InitiateReserveWithdraw | Type_448_InitiateTeleport | Type_448_LockAsset | Type_448_NoteUnlockable | Type_448_QueryPallet | Type_448_QueryResponse | Type_448_ReceiveTeleportedAsset | Type_448_RefundSurplus | Type_448_ReportError | Type_448_ReportHolding | Type_448_ReportTransactStatus | Type_448_RequestUnlock | Type_448_ReserveAssetDeposited | Type_448_SetAppendix | Type_448_SetErrorHandler | Type_448_SetFeesMode | Type_448_SetTopic | Type_448_SubscribeVersion | Type_448_Transact | Type_448_TransferAsset | Type_448_TransferReserveAsset | Type_448_Trap | Type_448_UniversalOrigin | Type_448_UnlockAsset | Type_448_UnpaidExecution | Type_448_UnsubscribeVersion | Type_448_WithdrawAsset + +export interface Type_448_AliasOrigin { + __kind: 'AliasOrigin' + value: V3MultiLocation +} + +export interface Type_448_BurnAsset { + __kind: 'BurnAsset' + value: V3MultiAsset[] +} + +export interface Type_448_BuyExecution { + __kind: 'BuyExecution' + fees: V3MultiAsset + weightLimit: V3WeightLimit +} + +export interface Type_448_ClaimAsset { + __kind: 'ClaimAsset' + assets: V3MultiAsset[] + ticket: V3MultiLocation +} + +export interface Type_448_ClearError { + __kind: 'ClearError' +} + +export interface Type_448_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_448_ClearTopic { + __kind: 'ClearTopic' +} + +export interface Type_448_ClearTransactStatus { + __kind: 'ClearTransactStatus' +} + +export interface Type_448_DepositAsset { + __kind: 'DepositAsset' + assets: V3MultiAssetFilter + beneficiary: V3MultiLocation +} + +export interface Type_448_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_448_DescendOrigin { + __kind: 'DescendOrigin' + value: V3Junctions +} + +export interface Type_448_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V3MultiAssetFilter + want: V3MultiAsset[] + maximal: boolean +} + +export interface Type_448_ExpectAsset { + __kind: 'ExpectAsset' + value: V3MultiAsset[] +} + +export interface Type_448_ExpectError { + __kind: 'ExpectError' + value?: ([number, V3Error] | undefined) +} + +export interface Type_448_ExpectOrigin { + __kind: 'ExpectOrigin' + value?: (V3MultiLocation | undefined) +} + +export interface Type_448_ExpectPallet { + __kind: 'ExpectPallet' + index: number + name: Bytes + moduleName: Bytes + crateMajor: number + minCrateMinor: number +} + +export interface Type_448_ExpectTransactStatus { + __kind: 'ExpectTransactStatus' + value: V3MaybeErrorCode +} + +export interface Type_448_ExportMessage { + __kind: 'ExportMessage' + network: V3NetworkId + destination: V3Junctions + xcm: V3Instruction[] +} + +export interface Type_448_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_448_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_448_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_448_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V3MultiAssetFilter + reserve: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_448_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_448_LockAsset { + __kind: 'LockAsset' + asset: V3MultiAsset + unlocker: V3MultiLocation +} + +export interface Type_448_NoteUnlockable { + __kind: 'NoteUnlockable' + asset: V3MultiAsset + owner: V3MultiLocation +} + +export interface Type_448_QueryPallet { + __kind: 'QueryPallet' + moduleName: Bytes + responseInfo: V3QueryResponseInfo +} + +export interface Type_448_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V3Response + maxWeight: Weight + querier?: (V3MultiLocation | undefined) +} + +export interface Type_448_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V3MultiAsset[] +} + +export interface Type_448_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_448_ReportError { + __kind: 'ReportError' + value: V3QueryResponseInfo +} + +export interface Type_448_ReportHolding { + __kind: 'ReportHolding' + responseInfo: V3QueryResponseInfo + assets: V3MultiAssetFilter +} + +export interface Type_448_ReportTransactStatus { + __kind: 'ReportTransactStatus' + value: V3QueryResponseInfo +} + +export interface Type_448_RequestUnlock { + __kind: 'RequestUnlock' + asset: V3MultiAsset + locker: V3MultiLocation +} + +export interface Type_448_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V3MultiAsset[] +} + +export interface Type_448_SetAppendix { + __kind: 'SetAppendix' + value: Type_448[] +} + +export interface Type_448_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_448[] +} + +export interface Type_448_SetFeesMode { + __kind: 'SetFeesMode' + jitWithdraw: boolean +} + +export interface Type_448_SetTopic { + __kind: 'SetTopic' + value: Bytes +} + +export interface Type_448_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: Weight +} + +export interface Type_448_Transact { + __kind: 'Transact' + originKind: V2OriginKind + requireWeightAtMost: Weight + call: Type_445 +} + +export interface Type_448_TransferAsset { + __kind: 'TransferAsset' + assets: V3MultiAsset[] + beneficiary: V3MultiLocation +} + +export interface Type_448_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V3MultiAsset[] + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_448_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_448_UniversalOrigin { + __kind: 'UniversalOrigin' + value: V3Junction +} + +export interface Type_448_UnlockAsset { + __kind: 'UnlockAsset' + asset: V3MultiAsset + target: V3MultiLocation +} + +export interface Type_448_UnpaidExecution { + __kind: 'UnpaidExecution' + weightLimit: V3WeightLimit + checkOrigin?: (V3MultiLocation | undefined) +} + +export interface Type_448_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_448_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V3MultiAsset[] +} + +export const Type_444: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V2MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + ticket: V2MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V2MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V2Junctions, + ExchangeAsset: sts.enumStruct({ + give: V2MultiAssetFilter, + receive: sts.array(() => V2MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V2MultiAssetFilter, + reserve: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V2MultiAssetFilter, + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + assets: V2MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V2MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V2MultiAsset), + SetAppendix: sts.array(() => Type_444), + SetErrorHandler: sts.array(() => Type_444), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V2OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_445, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + beneficiary: V2MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V2MultiAsset), + } +}) + +export type Type_444 = Type_444_BuyExecution | Type_444_ClaimAsset | Type_444_ClearError | Type_444_ClearOrigin | Type_444_DepositAsset | Type_444_DepositReserveAsset | Type_444_DescendOrigin | Type_444_ExchangeAsset | Type_444_HrmpChannelAccepted | Type_444_HrmpChannelClosing | Type_444_HrmpNewChannelOpenRequest | Type_444_InitiateReserveWithdraw | Type_444_InitiateTeleport | Type_444_QueryHolding | Type_444_QueryResponse | Type_444_ReceiveTeleportedAsset | Type_444_RefundSurplus | Type_444_ReportError | Type_444_ReserveAssetDeposited | Type_444_SetAppendix | Type_444_SetErrorHandler | Type_444_SubscribeVersion | Type_444_Transact | Type_444_TransferAsset | Type_444_TransferReserveAsset | Type_444_Trap | Type_444_UnsubscribeVersion | Type_444_WithdrawAsset + +export interface Type_444_BuyExecution { + __kind: 'BuyExecution' + fees: V2MultiAsset + weightLimit: V2WeightLimit +} + +export interface Type_444_ClaimAsset { + __kind: 'ClaimAsset' + assets: V2MultiAsset[] + ticket: V2MultiLocation +} + +export interface Type_444_ClearError { + __kind: 'ClearError' +} + +export interface Type_444_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_444_DepositAsset { + __kind: 'DepositAsset' + assets: V2MultiAssetFilter + maxAssets: number + beneficiary: V2MultiLocation +} + +export interface Type_444_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V2MultiAssetFilter + maxAssets: number + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_444_DescendOrigin { + __kind: 'DescendOrigin' + value: V2Junctions +} + +export interface Type_444_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V2MultiAssetFilter + receive: V2MultiAsset[] +} + +export interface Type_444_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_444_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_444_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_444_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V2MultiAssetFilter + reserve: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_444_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V2MultiAssetFilter + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_444_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V2MultiLocation + assets: V2MultiAssetFilter + maxResponseWeight: bigint +} + +export interface Type_444_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface Type_444_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V2MultiAsset[] +} + +export interface Type_444_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_444_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V2MultiLocation + maxResponseWeight: bigint +} + +export interface Type_444_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V2MultiAsset[] +} + +export interface Type_444_SetAppendix { + __kind: 'SetAppendix' + value: Type_444[] +} + +export interface Type_444_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_444[] +} + +export interface Type_444_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_444_Transact { + __kind: 'Transact' + originType: V2OriginKind + requireWeightAtMost: bigint + call: Type_445 +} + +export interface Type_444_TransferAsset { + __kind: 'TransferAsset' + assets: V2MultiAsset[] + beneficiary: V2MultiLocation +} + +export interface Type_444_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V2MultiAsset[] + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_444_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_444_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_444_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V2MultiAsset[] +} + +export type Type_441 = Type_441_V2 | Type_441_V3 | Type_441_V4 + +export interface Type_441_V2 { + __kind: 'V2' + value: Type_444[] +} + +export interface Type_441_V3 { + __kind: 'V3' + value: Type_448[] +} + +export interface Type_441_V4 { + __kind: 'V4' + value: Type_451[] +} + +export const VersionedLocation: sts.Type = sts.closedEnum(() => { + return { + V2: V2MultiLocation, + V3: V3MultiLocation, + V4: V4Location, + } +}) + +export const VersionedAssets: sts.Type = sts.closedEnum(() => { + return { + V2: sts.array(() => V2MultiAsset), + V3: sts.array(() => V3MultiAsset), + V4: sts.array(() => V4Asset), + } +}) + +export type VersionedAssets = VersionedAssets_V2 | VersionedAssets_V3 | VersionedAssets_V4 + +export interface VersionedAssets_V2 { + __kind: 'V2' + value: V2MultiAsset[] +} + +export interface VersionedAssets_V3 { + __kind: 'V3' + value: V3MultiAsset[] +} + +export interface VersionedAssets_V4 { + __kind: 'V4' + value: V4Asset[] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type XcmPalletCall = XcmPalletCall_claim_assets | XcmPalletCall_execute | XcmPalletCall_force_default_xcm_version | XcmPalletCall_force_subscribe_version_notify | XcmPalletCall_force_suspension | XcmPalletCall_force_unsubscribe_version_notify | XcmPalletCall_force_xcm_version | XcmPalletCall_limited_reserve_transfer_assets | XcmPalletCall_limited_teleport_assets | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets | XcmPalletCall_transfer_assets | XcmPalletCall_transfer_assets_using_type_and_then + +/** + * See [`Pallet::claim_assets`]. + */ +export interface XcmPalletCall_claim_assets { + __kind: 'claim_assets' + assets: VersionedAssets + beneficiary: VersionedLocation +} + +/** + * See [`Pallet::execute`]. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Type_441 + maxWeight: Weight +} + +/** + * See [`Pallet::force_default_xcm_version`]. + */ +export interface XcmPalletCall_force_default_xcm_version { + __kind: 'force_default_xcm_version' + maybeXcmVersion?: (number | undefined) +} + +/** + * See [`Pallet::force_subscribe_version_notify`]. + */ +export interface XcmPalletCall_force_subscribe_version_notify { + __kind: 'force_subscribe_version_notify' + location: VersionedLocation +} + +/** + * See [`Pallet::force_suspension`]. + */ +export interface XcmPalletCall_force_suspension { + __kind: 'force_suspension' + suspended: boolean +} + +/** + * See [`Pallet::force_unsubscribe_version_notify`]. + */ +export interface XcmPalletCall_force_unsubscribe_version_notify { + __kind: 'force_unsubscribe_version_notify' + location: VersionedLocation +} + +/** + * See [`Pallet::force_xcm_version`]. + */ +export interface XcmPalletCall_force_xcm_version { + __kind: 'force_xcm_version' + location: V4Location + version: number +} + +/** + * See [`Pallet::limited_reserve_transfer_assets`]. + */ +export interface XcmPalletCall_limited_reserve_transfer_assets { + __kind: 'limited_reserve_transfer_assets' + dest: VersionedLocation + beneficiary: VersionedLocation + assets: VersionedAssets + feeAssetItem: number + weightLimit: V3WeightLimit +} + +/** + * See [`Pallet::limited_teleport_assets`]. + */ +export interface XcmPalletCall_limited_teleport_assets { + __kind: 'limited_teleport_assets' + dest: VersionedLocation + beneficiary: VersionedLocation + assets: VersionedAssets + feeAssetItem: number + weightLimit: V3WeightLimit +} + +/** + * See [`Pallet::reserve_transfer_assets`]. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: VersionedLocation + beneficiary: VersionedLocation + assets: VersionedAssets + feeAssetItem: number +} + +/** + * See [`Pallet::send`]. + */ +export interface XcmPalletCall_send { + __kind: 'send' + dest: VersionedLocation + message: VersionedXcm +} + +/** + * See [`Pallet::teleport_assets`]. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: VersionedLocation + beneficiary: VersionedLocation + assets: VersionedAssets + feeAssetItem: number +} + +/** + * See [`Pallet::transfer_assets`]. + */ +export interface XcmPalletCall_transfer_assets { + __kind: 'transfer_assets' + dest: VersionedLocation + beneficiary: VersionedLocation + assets: VersionedAssets + feeAssetItem: number + weightLimit: V3WeightLimit +} + +/** + * See [`Pallet::transfer_assets_using_type_and_then`]. + */ +export interface XcmPalletCall_transfer_assets_using_type_and_then { + __kind: 'transfer_assets_using_type_and_then' + dest: VersionedLocation + assets: VersionedAssets + assetsTransferType: TransferType + remoteFeesId: VersionedAssetId + feesTransferType: TransferType + customXcmOnDest: VersionedXcm + weightLimit: V3WeightLimit +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const WhitelistCall: sts.Type = sts.closedEnum(() => { + return { + dispatch_whitelisted_call: sts.enumStruct({ + callHash: H256, + callEncodedLen: sts.number(), + callWeightWitness: Weight, + }), + dispatch_whitelisted_call_with_preimage: sts.enumStruct({ + call: Call, + }), + remove_whitelisted_call: sts.enumStruct({ + callHash: H256, + }), + whitelist_call: sts.enumStruct({ + callHash: H256, + }), + } +}) + +export const H256 = sts.bytes() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type WhitelistCall = WhitelistCall_dispatch_whitelisted_call | WhitelistCall_dispatch_whitelisted_call_with_preimage | WhitelistCall_remove_whitelisted_call | WhitelistCall_whitelist_call + +/** + * See [`Pallet::dispatch_whitelisted_call`]. + */ +export interface WhitelistCall_dispatch_whitelisted_call { + __kind: 'dispatch_whitelisted_call' + callHash: H256 + callEncodedLen: number + callWeightWitness: Weight +} + +/** + * See [`Pallet::dispatch_whitelisted_call_with_preimage`]. + */ +export interface WhitelistCall_dispatch_whitelisted_call_with_preimage { + __kind: 'dispatch_whitelisted_call_with_preimage' + call: Call +} + +/** + * See [`Pallet::remove_whitelisted_call`]. + */ +export interface WhitelistCall_remove_whitelisted_call { + __kind: 'remove_whitelisted_call' + callHash: H256 +} + +/** + * See [`Pallet::whitelist_call`]. + */ +export interface WhitelistCall_whitelist_call { + __kind: 'whitelist_call' + callHash: H256 +} + +export type H256 = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const VoterListCall: sts.Type = sts.closedEnum(() => { + return { + put_in_front_of: sts.enumStruct({ + lighter: MultiAddress, + }), + put_in_front_of_other: sts.enumStruct({ + heavier: MultiAddress, + lighter: MultiAddress, + }), + rebag: sts.enumStruct({ + dislocated: MultiAddress, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type VoterListCall = VoterListCall_put_in_front_of | VoterListCall_put_in_front_of_other | VoterListCall_rebag + +/** + * See [`Pallet::put_in_front_of`]. + */ +export interface VoterListCall_put_in_front_of { + __kind: 'put_in_front_of' + lighter: MultiAddress +} + +/** + * See [`Pallet::put_in_front_of_other`]. + */ +export interface VoterListCall_put_in_front_of_other { + __kind: 'put_in_front_of_other' + heavier: MultiAddress + lighter: MultiAddress +} + +/** + * See [`Pallet::rebag`]. + */ +export interface VoterListCall_rebag { + __kind: 'rebag' + dislocated: MultiAddress +} + +export type MultiAddress = MultiAddress_Address20 | MultiAddress_Address32 | MultiAddress_Id | MultiAddress_Index | MultiAddress_Raw + +export interface MultiAddress_Address20 { + __kind: 'Address20' + value: Bytes +} + +export interface MultiAddress_Address32 { + __kind: 'Address32' + value: Bytes +} + +export interface MultiAddress_Id { + __kind: 'Id' + value: AccountId32 +} + +export interface MultiAddress_Index { + __kind: 'Index' +} + +export interface MultiAddress_Raw { + __kind: 'Raw' + value: Bytes +} + +export type AccountId32 = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_remove_vesting_schedule: sts.enumStruct({ + target: MultiAddress, + scheduleIndex: sts.number(), + }), + force_vested_transfer: sts.enumStruct({ + source: MultiAddress, + target: MultiAddress, + schedule: VestingInfo, + }), + merge_schedules: sts.enumStruct({ + schedule1Index: sts.number(), + schedule2Index: sts.number(), + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: MultiAddress, + }), + vested_transfer: sts.enumStruct({ + target: MultiAddress, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: sts.bigint(), + perBlock: sts.bigint(), + startingBlock: sts.number(), + } +}) + +export interface VestingInfo { + locked: bigint + perBlock: bigint + startingBlock: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type VestingCall = VestingCall_force_remove_vesting_schedule | VestingCall_force_vested_transfer | VestingCall_merge_schedules | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * See [`Pallet::force_remove_vesting_schedule`]. + */ +export interface VestingCall_force_remove_vesting_schedule { + __kind: 'force_remove_vesting_schedule' + target: MultiAddress + scheduleIndex: number +} + +/** + * See [`Pallet::force_vested_transfer`]. + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: MultiAddress + target: MultiAddress + schedule: VestingInfo +} + +/** + * See [`Pallet::merge_schedules`]. + */ +export interface VestingCall_merge_schedules { + __kind: 'merge_schedules' + schedule1Index: number + schedule2Index: number +} + +/** + * See [`Pallet::vest`]. + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * See [`Pallet::vest_other`]. + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: MultiAddress +} + +/** + * See [`Pallet::vested_transfer`]. + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: MultiAddress + schedule: VestingInfo +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Call, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Call), + }), + dispatch_as: sts.enumStruct({ + asOrigin: OriginCaller, + call: Call, + }), + force_batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + with_weight: sts.enumStruct({ + call: Call, + weight: Weight, + }), + } +}) + +export const OriginCaller: sts.Type = sts.closedEnum(() => { + return { + Origins: Origin, + ParachainsOrigin: Type_164, + Void: Void, + XcmPallet: Type_166, + system: RawOrigin, + } +}) + +export const RawOrigin: sts.Type = sts.closedEnum(() => { + return { + None: sts.unit(), + Root: sts.unit(), + Signed: AccountId32, + } +}) + +export type RawOrigin = RawOrigin_None | RawOrigin_Root | RawOrigin_Signed + +export interface RawOrigin_None { + __kind: 'None' +} + +export interface RawOrigin_Root { + __kind: 'Root' +} + +export interface RawOrigin_Signed { + __kind: 'Signed' + value: AccountId32 +} + +export const Type_166: sts.Type = sts.closedEnum(() => { + return { + Response: V4Location, + Xcm: V4Location, + } +}) + +export type Type_166 = Type_166_Response | Type_166_Xcm + +export interface Type_166_Response { + __kind: 'Response' + value: V4Location +} + +export interface Type_166_Xcm { + __kind: 'Xcm' + value: V4Location +} + +export const Void: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Void = never + +export const Type_164: sts.Type = sts.closedEnum(() => { + return { + Parachain: Id, + } +}) + +export const Id = sts.number() + +export type Type_164 = Type_164_Parachain + +export interface Type_164_Parachain { + __kind: 'Parachain' + value: Id +} + +export type Id = number + +export const Origin: sts.Type = sts.closedEnum(() => { + return { + AuctionAdmin: sts.unit(), + BigSpender: sts.unit(), + BigTipper: sts.unit(), + Fellows: sts.unit(), + Fellowship1Dan: sts.unit(), + Fellowship2Dan: sts.unit(), + Fellowship3Dan: sts.unit(), + Fellowship4Dan: sts.unit(), + Fellowship5Dan: sts.unit(), + Fellowship6Dan: sts.unit(), + Fellowship7Dan: sts.unit(), + Fellowship8Dan: sts.unit(), + Fellowship9Dan: sts.unit(), + FellowshipAdmin: sts.unit(), + FellowshipExperts: sts.unit(), + FellowshipInitiates: sts.unit(), + FellowshipMasters: sts.unit(), + GeneralAdmin: sts.unit(), + LeaseAdmin: sts.unit(), + MediumSpender: sts.unit(), + ReferendumCanceller: sts.unit(), + ReferendumKiller: sts.unit(), + SmallSpender: sts.unit(), + SmallTipper: sts.unit(), + StakingAdmin: sts.unit(), + Treasurer: sts.unit(), + WhitelistedCaller: sts.unit(), + WishForChange: sts.unit(), + } +}) + +export type Origin = Origin_AuctionAdmin | Origin_BigSpender | Origin_BigTipper | Origin_Fellows | Origin_Fellowship1Dan | Origin_Fellowship2Dan | Origin_Fellowship3Dan | Origin_Fellowship4Dan | Origin_Fellowship5Dan | Origin_Fellowship6Dan | Origin_Fellowship7Dan | Origin_Fellowship8Dan | Origin_Fellowship9Dan | Origin_FellowshipAdmin | Origin_FellowshipExperts | Origin_FellowshipInitiates | Origin_FellowshipMasters | Origin_GeneralAdmin | Origin_LeaseAdmin | Origin_MediumSpender | Origin_ReferendumCanceller | Origin_ReferendumKiller | Origin_SmallSpender | Origin_SmallTipper | Origin_StakingAdmin | Origin_Treasurer | Origin_WhitelistedCaller | Origin_WishForChange + +export interface Origin_AuctionAdmin { + __kind: 'AuctionAdmin' +} + +export interface Origin_BigSpender { + __kind: 'BigSpender' +} + +export interface Origin_BigTipper { + __kind: 'BigTipper' +} + +export interface Origin_Fellows { + __kind: 'Fellows' +} + +export interface Origin_Fellowship1Dan { + __kind: 'Fellowship1Dan' +} + +export interface Origin_Fellowship2Dan { + __kind: 'Fellowship2Dan' +} + +export interface Origin_Fellowship3Dan { + __kind: 'Fellowship3Dan' +} + +export interface Origin_Fellowship4Dan { + __kind: 'Fellowship4Dan' +} + +export interface Origin_Fellowship5Dan { + __kind: 'Fellowship5Dan' +} + +export interface Origin_Fellowship6Dan { + __kind: 'Fellowship6Dan' +} + +export interface Origin_Fellowship7Dan { + __kind: 'Fellowship7Dan' +} + +export interface Origin_Fellowship8Dan { + __kind: 'Fellowship8Dan' +} + +export interface Origin_Fellowship9Dan { + __kind: 'Fellowship9Dan' +} + +export interface Origin_FellowshipAdmin { + __kind: 'FellowshipAdmin' +} + +export interface Origin_FellowshipExperts { + __kind: 'FellowshipExperts' +} + +export interface Origin_FellowshipInitiates { + __kind: 'FellowshipInitiates' +} + +export interface Origin_FellowshipMasters { + __kind: 'FellowshipMasters' +} + +export interface Origin_GeneralAdmin { + __kind: 'GeneralAdmin' +} + +export interface Origin_LeaseAdmin { + __kind: 'LeaseAdmin' +} + +export interface Origin_MediumSpender { + __kind: 'MediumSpender' +} + +export interface Origin_ReferendumCanceller { + __kind: 'ReferendumCanceller' +} + +export interface Origin_ReferendumKiller { + __kind: 'ReferendumKiller' +} + +export interface Origin_SmallSpender { + __kind: 'SmallSpender' +} + +export interface Origin_SmallTipper { + __kind: 'SmallTipper' +} + +export interface Origin_StakingAdmin { + __kind: 'StakingAdmin' +} + +export interface Origin_Treasurer { + __kind: 'Treasurer' +} + +export interface Origin_WhitelistedCaller { + __kind: 'WhitelistedCaller' +} + +export interface Origin_WishForChange { + __kind: 'WishForChange' +} + +export type OriginCaller = OriginCaller_Origins | OriginCaller_ParachainsOrigin | OriginCaller_Void | OriginCaller_XcmPallet | OriginCaller_system + +export interface OriginCaller_Origins { + __kind: 'Origins' + value: Origin +} + +export interface OriginCaller_ParachainsOrigin { + __kind: 'ParachainsOrigin' + value: Type_164 +} + +export interface OriginCaller_Void { + __kind: 'Void' + value: Void +} + +export interface OriginCaller_XcmPallet { + __kind: 'XcmPallet' + value: Type_166 +} + +export interface OriginCaller_system { + __kind: 'system' + value: RawOrigin +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all | UtilityCall_dispatch_as | UtilityCall_force_batch | UtilityCall_with_weight + +/** + * See [`Pallet::as_derivative`]. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Call +} + +/** + * See [`Pallet::batch`]. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Call[] +} + +/** + * See [`Pallet::batch_all`]. + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Call[] +} + +/** + * See [`Pallet::dispatch_as`]. + */ +export interface UtilityCall_dispatch_as { + __kind: 'dispatch_as' + asOrigin: OriginCaller + call: Call +} + +/** + * See [`Pallet::force_batch`]. + */ +export interface UtilityCall_force_batch { + __kind: 'force_batch' + calls: Call[] +} + +/** + * See [`Pallet::with_weight`]. + */ +export interface UtilityCall_with_weight { + __kind: 'with_weight' + call: Call + weight: Weight +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + check_status: sts.enumStruct({ + index: sts.number(), + }), + payout: sts.enumStruct({ + index: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: MultiAddress, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + remove_approval: sts.enumStruct({ + proposalId: sts.number(), + }), + spend: sts.enumStruct({ + assetKind: VersionedLocatableAsset, + amount: sts.bigint(), + beneficiary: VersionedLocation, + validFrom: sts.option(() => sts.number()), + }), + spend_local: sts.enumStruct({ + amount: sts.bigint(), + beneficiary: MultiAddress, + }), + void_spend: sts.enumStruct({ + index: sts.number(), + }), + } +}) + +export const VersionedLocatableAsset: sts.Type = sts.closedEnum(() => { + return { + V3: sts.enumStruct({ + location: V3MultiLocation, + assetId: V3AssetId, + }), + V4: sts.enumStruct({ + location: V4Location, + assetId: V4AssetId, + }), + } +}) + +export type VersionedLocatableAsset = VersionedLocatableAsset_V3 | VersionedLocatableAsset_V4 + +export interface VersionedLocatableAsset_V3 { + __kind: 'V3' + location: V3MultiLocation + assetId: V3AssetId +} + +export interface VersionedLocatableAsset_V4 { + __kind: 'V4' + location: V4Location + assetId: V4AssetId +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_check_status | TreasuryCall_payout | TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_remove_approval | TreasuryCall_spend | TreasuryCall_spend_local | TreasuryCall_void_spend + +/** + * See [`Pallet::approve_proposal`]. + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * See [`Pallet::check_status`]. + */ +export interface TreasuryCall_check_status { + __kind: 'check_status' + index: number +} + +/** + * See [`Pallet::payout`]. + */ +export interface TreasuryCall_payout { + __kind: 'payout' + index: number +} + +/** + * See [`Pallet::propose_spend`]. + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: MultiAddress +} + +/** + * See [`Pallet::reject_proposal`]. + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * See [`Pallet::remove_approval`]. + */ +export interface TreasuryCall_remove_approval { + __kind: 'remove_approval' + proposalId: number +} + +/** + * See [`Pallet::spend`]. + */ +export interface TreasuryCall_spend { + __kind: 'spend' + assetKind: VersionedLocatableAsset + amount: bigint + beneficiary: VersionedLocation + validFrom?: (number | undefined) +} + +/** + * See [`Pallet::spend_local`]. + */ +export interface TreasuryCall_spend_local { + __kind: 'spend_local' + amount: bigint + beneficiary: MultiAddress +} + +/** + * See [`Pallet::void_spend`]. + */ +export interface TreasuryCall_void_spend { + __kind: 'void_spend' + index: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type TimestampCall = TimestampCall_set + +/** + * See [`Pallet::set`]. + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + apply_authorized_upgrade: sts.enumStruct({ + code: sts.bytes(), + }), + authorize_upgrade: sts.enumStruct({ + codeHash: H256, + }), + authorize_upgrade_without_checks: sts.enumStruct({ + codeHash: H256, + }), + kill_prefix: sts.enumStruct({ + prefix: sts.bytes(), + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => sts.bytes()), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SystemCall = SystemCall_apply_authorized_upgrade | SystemCall_authorize_upgrade | SystemCall_authorize_upgrade_without_checks | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * See [`Pallet::apply_authorized_upgrade`]. + */ +export interface SystemCall_apply_authorized_upgrade { + __kind: 'apply_authorized_upgrade' + code: Bytes +} + +/** + * See [`Pallet::authorize_upgrade`]. + */ +export interface SystemCall_authorize_upgrade { + __kind: 'authorize_upgrade' + codeHash: H256 +} + +/** + * See [`Pallet::authorize_upgrade_without_checks`]. + */ +export interface SystemCall_authorize_upgrade_without_checks { + __kind: 'authorize_upgrade_without_checks' + codeHash: H256 +} + +/** + * See [`Pallet::kill_prefix`]. + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Bytes + subkeys: number +} + +/** + * See [`Pallet::kill_storage`]. + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Bytes[] +} + +/** + * See [`Pallet::remark`]. + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * See [`Pallet::remark_with_event`]. + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * See [`Pallet::set_code`]. + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * See [`Pallet::set_code_without_checks`]. + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * See [`Pallet::set_heap_pages`]. + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * See [`Pallet::set_storage`]. + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: [Bytes, Bytes][] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: sts.number(), + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + stash: AccountId32, + }), + deprecate_controller_batch: sts.enumStruct({ + controllers: sts.array(() => AccountId32), + }), + force_apply_min_commission: sts.enumStruct({ + validatorStash: AccountId32, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => MultiAddress), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => MultiAddress), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + }), + payout_stakers_by_page: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + page: sts.number(), + }), + reap_stash: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + restore_ledger: sts.enumStruct({ + stash: AccountId32, + maybeController: sts.option(() => AccountId32), + maybeTotal: sts.option(() => sts.bigint()), + maybeUnlocking: sts.option(() => sts.array(() => UnlockChunk)), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.unit(), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId32), + }), + set_min_commission: sts.enumStruct({ + new: Perbill, + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_staking_configs: sts.enumStruct({ + minNominatorBond: ConfigOp, + minValidatorBond: ConfigOp, + maxNominatorCount: Type_123, + maxValidatorCount: Type_123, + chillThreshold: Type_124, + minCommission: Type_125, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + update_payee: sts.enumStruct({ + controller: AccountId32, + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export const Type_125: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export type Type_125 = Type_125_Noop | Type_125_Remove | Type_125_Set + +export interface Type_125_Noop { + __kind: 'Noop' +} + +export interface Type_125_Remove { + __kind: 'Remove' +} + +export interface Type_125_Set { + __kind: 'Set' + value: Perbill +} + +export type Perbill = number + +export const Type_124: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Percent, + } +}) + +export type Type_124 = Type_124_Noop | Type_124_Remove | Type_124_Set + +export interface Type_124_Noop { + __kind: 'Noop' +} + +export interface Type_124_Remove { + __kind: 'Remove' +} + +export interface Type_124_Set { + __kind: 'Set' + value: Percent +} + +export type Percent = number + +export const Type_123: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_123 = Type_123_Noop | Type_123_Remove | Type_123_Set + +export interface Type_123_Noop { + __kind: 'Noop' +} + +export interface Type_123_Remove { + __kind: 'Remove' +} + +export interface Type_123_Set { + __kind: 'Set' + value: number +} + +export const ConfigOp: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type ConfigOp = ConfigOp_Noop | ConfigOp_Remove | ConfigOp_Set + +export interface ConfigOp_Noop { + __kind: 'Noop' +} + +export interface ConfigOp_Remove { + __kind: 'Remove' +} + +export interface ConfigOp_Set { + __kind: 'Set' + value: bigint +} + +export const Perbill = sts.number() + +export const Percent = sts.number() + +export const UnlockChunk: sts.Type = sts.struct(() => { + return { + value: sts.bigint(), + era: sts.number(), + } +}) + +export interface UnlockChunk { + value: bigint + era: number +} + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_deprecate_controller_batch | StakingCall_force_apply_min_commission | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_payout_stakers_by_page | StakingCall_reap_stash | StakingCall_rebond | StakingCall_restore_ledger | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_invulnerables | StakingCall_set_min_commission | StakingCall_set_payee | StakingCall_set_staking_configs | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_update_payee | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * See [`Pallet::bond`]. + */ +export interface StakingCall_bond { + __kind: 'bond' + value: bigint + payee: RewardDestination +} + +/** + * See [`Pallet::bond_extra`]. + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * See [`Pallet::cancel_deferred_slash`]. + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: number + slashIndices: number[] +} + +/** + * See [`Pallet::chill`]. + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * See [`Pallet::chill_other`]. + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + stash: AccountId32 +} + +/** + * See [`Pallet::deprecate_controller_batch`]. + */ +export interface StakingCall_deprecate_controller_batch { + __kind: 'deprecate_controller_batch' + controllers: AccountId32[] +} + +/** + * See [`Pallet::force_apply_min_commission`]. + */ +export interface StakingCall_force_apply_min_commission { + __kind: 'force_apply_min_commission' + validatorStash: AccountId32 +} + +/** + * See [`Pallet::force_new_era`]. + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * See [`Pallet::force_new_era_always`]. + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * See [`Pallet::force_no_eras`]. + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * See [`Pallet::force_unstake`]. + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * See [`Pallet::increase_validator_count`]. + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * See [`Pallet::kick`]. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: MultiAddress[] +} + +/** + * See [`Pallet::nominate`]. + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: MultiAddress[] +} + +/** + * See [`Pallet::payout_stakers`]. + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId32 + era: number +} + +/** + * See [`Pallet::payout_stakers_by_page`]. + */ +export interface StakingCall_payout_stakers_by_page { + __kind: 'payout_stakers_by_page' + validatorStash: AccountId32 + era: number + page: number +} + +/** + * See [`Pallet::reap_stash`]. + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * See [`Pallet::rebond`]. + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * See [`Pallet::restore_ledger`]. + */ +export interface StakingCall_restore_ledger { + __kind: 'restore_ledger' + stash: AccountId32 + maybeController?: (AccountId32 | undefined) + maybeTotal?: (bigint | undefined) + maybeUnlocking?: (UnlockChunk[] | undefined) +} + +/** + * See [`Pallet::scale_validator_count`]. + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * See [`Pallet::set_controller`]. + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' +} + +/** + * See [`Pallet::set_invulnerables`]. + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId32[] +} + +/** + * See [`Pallet::set_min_commission`]. + */ +export interface StakingCall_set_min_commission { + __kind: 'set_min_commission' + new: Perbill +} + +/** + * See [`Pallet::set_payee`]. + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * See [`Pallet::set_staking_configs`]. + */ +export interface StakingCall_set_staking_configs { + __kind: 'set_staking_configs' + minNominatorBond: ConfigOp + minValidatorBond: ConfigOp + maxNominatorCount: Type_123 + maxValidatorCount: Type_123 + chillThreshold: Type_124 + minCommission: Type_125 +} + +/** + * See [`Pallet::set_validator_count`]. + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * See [`Pallet::unbond`]. + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * See [`Pallet::update_payee`]. + */ +export interface StakingCall_update_payee { + __kind: 'update_payee' + controller: AccountId32 +} + +/** + * See [`Pallet::validate`]. + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * See [`Pallet::withdraw_unbonded`]. + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bestow_membership: sts.enumStruct({ + candidate: AccountId32, + }), + bid: sts.enumStruct({ + value: sts.bigint(), + }), + claim_membership: sts.unit(), + cleanup_candidacy: sts.enumStruct({ + candidate: AccountId32, + max: sts.number(), + }), + cleanup_challenge: sts.enumStruct({ + challengeRound: sts.number(), + max: sts.number(), + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + dissolve: sts.unit(), + drop_candidate: sts.enumStruct({ + candidate: AccountId32, + }), + found_society: sts.enumStruct({ + founder: MultiAddress, + maxMembers: sts.number(), + maxIntake: sts.number(), + maxStrikes: sts.number(), + candidateDeposit: sts.bigint(), + rules: sts.bytes(), + }), + judge_suspended_member: sts.enumStruct({ + who: MultiAddress, + forgive: sts.boolean(), + }), + kick_candidate: sts.enumStruct({ + candidate: AccountId32, + }), + payout: sts.unit(), + punish_skeptic: sts.unit(), + resign_candidacy: sts.unit(), + set_parameters: sts.enumStruct({ + maxMembers: sts.number(), + maxIntake: sts.number(), + maxStrikes: sts.number(), + candidateDeposit: sts.bigint(), + }), + unbid: sts.unit(), + unvouch: sts.unit(), + vote: sts.enumStruct({ + candidate: MultiAddress, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: MultiAddress, + value: sts.bigint(), + tip: sts.bigint(), + }), + waive_repay: sts.enumStruct({ + amount: sts.bigint(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SocietyCall = SocietyCall_bestow_membership | SocietyCall_bid | SocietyCall_claim_membership | SocietyCall_cleanup_candidacy | SocietyCall_cleanup_challenge | SocietyCall_defender_vote | SocietyCall_dissolve | SocietyCall_drop_candidate | SocietyCall_found_society | SocietyCall_judge_suspended_member | SocietyCall_kick_candidate | SocietyCall_payout | SocietyCall_punish_skeptic | SocietyCall_resign_candidacy | SocietyCall_set_parameters | SocietyCall_unbid | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch | SocietyCall_waive_repay + +/** + * See [`Pallet::bestow_membership`]. + */ +export interface SocietyCall_bestow_membership { + __kind: 'bestow_membership' + candidate: AccountId32 +} + +/** + * See [`Pallet::bid`]. + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: bigint +} + +/** + * See [`Pallet::claim_membership`]. + */ +export interface SocietyCall_claim_membership { + __kind: 'claim_membership' +} + +/** + * See [`Pallet::cleanup_candidacy`]. + */ +export interface SocietyCall_cleanup_candidacy { + __kind: 'cleanup_candidacy' + candidate: AccountId32 + max: number +} + +/** + * See [`Pallet::cleanup_challenge`]. + */ +export interface SocietyCall_cleanup_challenge { + __kind: 'cleanup_challenge' + challengeRound: number + max: number +} + +/** + * See [`Pallet::defender_vote`]. + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * See [`Pallet::dissolve`]. + */ +export interface SocietyCall_dissolve { + __kind: 'dissolve' +} + +/** + * See [`Pallet::drop_candidate`]. + */ +export interface SocietyCall_drop_candidate { + __kind: 'drop_candidate' + candidate: AccountId32 +} + +/** + * See [`Pallet::found_society`]. + */ +export interface SocietyCall_found_society { + __kind: 'found_society' + founder: MultiAddress + maxMembers: number + maxIntake: number + maxStrikes: number + candidateDeposit: bigint + rules: Bytes +} + +/** + * See [`Pallet::judge_suspended_member`]. + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: MultiAddress + forgive: boolean +} + +/** + * See [`Pallet::kick_candidate`]. + */ +export interface SocietyCall_kick_candidate { + __kind: 'kick_candidate' + candidate: AccountId32 +} + +/** + * See [`Pallet::payout`]. + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * See [`Pallet::punish_skeptic`]. + */ +export interface SocietyCall_punish_skeptic { + __kind: 'punish_skeptic' +} + +/** + * See [`Pallet::resign_candidacy`]. + */ +export interface SocietyCall_resign_candidacy { + __kind: 'resign_candidacy' +} + +/** + * See [`Pallet::set_parameters`]. + */ +export interface SocietyCall_set_parameters { + __kind: 'set_parameters' + maxMembers: number + maxIntake: number + maxStrikes: number + candidateDeposit: bigint +} + +/** + * See [`Pallet::unbid`]. + */ +export interface SocietyCall_unbid { + __kind: 'unbid' +} + +/** + * See [`Pallet::unvouch`]. + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' +} + +/** + * See [`Pallet::vote`]. + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: MultiAddress + approve: boolean +} + +/** + * See [`Pallet::vouch`]. + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: MultiAddress + value: bigint + tip: bigint +} + +/** + * See [`Pallet::waive_repay`]. + */ +export interface SocietyCall_waive_repay { + __kind: 'waive_repay' + amount: bigint +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: Id, + }), + force_lease: sts.enumStruct({ + para: Id, + leaser: AccountId32, + amount: sts.bigint(), + periodBegin: sts.number(), + periodCount: sts.number(), + }), + trigger_onboard: sts.enumStruct({ + para: Id, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * See [`Pallet::clear_all_leases`]. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: Id +} + +/** + * See [`Pallet::force_lease`]. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: Id + leaser: AccountId32 + amount: bigint + periodBegin: number + periodCount: number +} + +/** + * See [`Pallet::trigger_onboard`]. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: Id +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: SessionKeys, + proof: sts.bytes(), + }), + } +}) + +export const SessionKeys: sts.Type = sts.struct(() => { + return { + grandpa: Public, + babe: sts.bytes(), + paraValidator: V6Public, + paraAssignment: sts.bytes(), + authorityDiscovery: sts.bytes(), + beefy: sts.bytes(), + } +}) + +export const V6Public = sts.bytes() + +export const Public = sts.bytes() + +export interface SessionKeys { + grandpa: Public + babe: Bytes + paraValidator: V6Public + paraAssignment: Bytes + authorityDiscovery: Bytes + beefy: Bytes +} + +export type V6Public = Bytes + +export type Public = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * See [`Pallet::purge_keys`]. + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * See [`Pallet::set_keys`]. + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: SessionKeys + proof: Bytes +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: sts.number(), + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_after: sts.enumStruct({ + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * See [`Pallet::cancel`]. + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: number + index: number +} + +/** + * See [`Pallet::cancel_named`]. + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * See [`Pallet::schedule`]. + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * See [`Pallet::schedule_after`]. + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * See [`Pallet::schedule_named`]. + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * See [`Pallet::schedule_named_after`]. + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + add_lock: sts.enumStruct({ + para: Id, + }), + deregister: sts.enumStruct({ + id: Id, + }), + force_register: sts.enumStruct({ + who: AccountId32, + deposit: sts.bigint(), + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + register: sts.enumStruct({ + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + remove_lock: sts.enumStruct({ + para: Id, + }), + reserve: sts.unit(), + schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + swap: sts.enumStruct({ + id: Id, + other: Id, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type RegistrarCall = RegistrarCall_add_lock | RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_register | RegistrarCall_remove_lock | RegistrarCall_reserve | RegistrarCall_schedule_code_upgrade | RegistrarCall_set_current_head | RegistrarCall_swap + +/** + * See [`Pallet::add_lock`]. + */ +export interface RegistrarCall_add_lock { + __kind: 'add_lock' + para: Id +} + +/** + * See [`Pallet::deregister`]. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: Id +} + +/** + * See [`Pallet::force_register`]. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId32 + deposit: bigint + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * See [`Pallet::register`]. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * See [`Pallet::remove_lock`]. + */ +export interface RegistrarCall_remove_lock { + __kind: 'remove_lock' + para: Id +} + +/** + * See [`Pallet::reserve`]. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * See [`Pallet::schedule_code_upgrade`]. + */ +export interface RegistrarCall_schedule_code_upgrade { + __kind: 'schedule_code_upgrade' + para: Id + newCode: ValidationCode +} + +/** + * See [`Pallet::set_current_head`]. + */ +export interface RegistrarCall_set_current_head { + __kind: 'set_current_head' + para: Id + newHead: HeadData +} + +/** + * See [`Pallet::swap`]. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: Id + other: Id +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ReferendaCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + index: sts.number(), + }), + kill: sts.enumStruct({ + index: sts.number(), + }), + nudge_referendum: sts.enumStruct({ + index: sts.number(), + }), + one_fewer_deciding: sts.enumStruct({ + track: sts.number(), + }), + place_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_submission_deposit: sts.enumStruct({ + index: sts.number(), + }), + set_metadata: sts.enumStruct({ + index: sts.number(), + maybeHash: sts.option(() => H256), + }), + submit: sts.enumStruct({ + proposalOrigin: OriginCaller, + proposal: Bounded, + enactmentMoment: DispatchTime, + }), + } +}) + +export const DispatchTime: sts.Type = sts.closedEnum(() => { + return { + After: sts.number(), + At: sts.number(), + } +}) + +export type DispatchTime = DispatchTime_After | DispatchTime_At + +export interface DispatchTime_After { + __kind: 'After' + value: number +} + +export interface DispatchTime_At { + __kind: 'At' + value: number +} + +export const Bounded: sts.Type = sts.closedEnum(() => { + return { + Inline: sts.bytes(), + Legacy: sts.enumStruct({ + hash: H256, + }), + Lookup: sts.enumStruct({ + hash: H256, + len: sts.number(), + }), + } +}) + +export type Bounded = Bounded_Inline | Bounded_Legacy | Bounded_Lookup + +export interface Bounded_Inline { + __kind: 'Inline' + value: Bytes +} + +export interface Bounded_Legacy { + __kind: 'Legacy' + hash: H256 +} + +export interface Bounded_Lookup { + __kind: 'Lookup' + hash: H256 + len: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ReferendaCall = ReferendaCall_cancel | ReferendaCall_kill | ReferendaCall_nudge_referendum | ReferendaCall_one_fewer_deciding | ReferendaCall_place_decision_deposit | ReferendaCall_refund_decision_deposit | ReferendaCall_refund_submission_deposit | ReferendaCall_set_metadata | ReferendaCall_submit + +/** + * See [`Pallet::cancel`]. + */ +export interface ReferendaCall_cancel { + __kind: 'cancel' + index: number +} + +/** + * See [`Pallet::kill`]. + */ +export interface ReferendaCall_kill { + __kind: 'kill' + index: number +} + +/** + * See [`Pallet::nudge_referendum`]. + */ +export interface ReferendaCall_nudge_referendum { + __kind: 'nudge_referendum' + index: number +} + +/** + * See [`Pallet::one_fewer_deciding`]. + */ +export interface ReferendaCall_one_fewer_deciding { + __kind: 'one_fewer_deciding' + track: number +} + +/** + * See [`Pallet::place_decision_deposit`]. + */ +export interface ReferendaCall_place_decision_deposit { + __kind: 'place_decision_deposit' + index: number +} + +/** + * See [`Pallet::refund_decision_deposit`]. + */ +export interface ReferendaCall_refund_decision_deposit { + __kind: 'refund_decision_deposit' + index: number +} + +/** + * See [`Pallet::refund_submission_deposit`]. + */ +export interface ReferendaCall_refund_submission_deposit { + __kind: 'refund_submission_deposit' + index: number +} + +/** + * See [`Pallet::set_metadata`]. + */ +export interface ReferendaCall_set_metadata { + __kind: 'set_metadata' + index: number + maybeHash?: (H256 | undefined) +} + +/** + * See [`Pallet::submit`]. + */ +export interface ReferendaCall_submit { + __kind: 'submit' + proposalOrigin: OriginCaller + proposal: Bounded + enactmentMoment: DispatchTime +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: MultiAddress, + call: Call, + }), + cancel_recovered: sts.enumStruct({ + account: MultiAddress, + }), + claim_recovery: sts.enumStruct({ + account: MultiAddress, + }), + close_recovery: sts.enumStruct({ + rescuer: MultiAddress, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId32), + threshold: sts.number(), + delayPeriod: sts.number(), + }), + initiate_recovery: sts.enumStruct({ + account: MultiAddress, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + vouch_recovery: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * See [`Pallet::as_recovered`]. + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: MultiAddress + call: Call +} + +/** + * See [`Pallet::cancel_recovered`]. + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: MultiAddress +} + +/** + * See [`Pallet::claim_recovery`]. + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: MultiAddress +} + +/** + * See [`Pallet::close_recovery`]. + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: MultiAddress +} + +/** + * See [`Pallet::create_recovery`]. + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId32[] + threshold: number + delayPeriod: number +} + +/** + * See [`Pallet::initiate_recovery`]. + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: MultiAddress +} + +/** + * See [`Pallet::remove_recovery`]. + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * See [`Pallet::set_recovered`]. + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * See [`Pallet::vouch_recovery`]. + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + announce: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + create_pure: sts.enumStruct({ + proxyType: ProxyType, + delay: sts.number(), + index: sts.number(), + }), + kill_pure: sts.enumStruct({ + spawner: MultiAddress, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + proxy_announced: sts.enumStruct({ + delegate: MultiAddress, + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + reject_announcement: sts.enumStruct({ + delegate: MultiAddress, + callHash: H256, + }), + remove_announcement: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_create_pure | ProxyCall_kill_pure | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * See [`Pallet::add_proxy`]. + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +/** + * See [`Pallet::announce`]. + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: MultiAddress + callHash: H256 +} + +/** + * See [`Pallet::create_pure`]. + */ +export interface ProxyCall_create_pure { + __kind: 'create_pure' + proxyType: ProxyType + delay: number + index: number +} + +/** + * See [`Pallet::kill_pure`]. + */ +export interface ProxyCall_kill_pure { + __kind: 'kill_pure' + spawner: MultiAddress + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * See [`Pallet::proxy`]. + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * See [`Pallet::proxy_announced`]. + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: MultiAddress + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * See [`Pallet::reject_announcement`]. + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: MultiAddress + callHash: H256 +} + +/** + * See [`Pallet::remove_announcement`]. + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: MultiAddress + callHash: H256 +} + +/** + * See [`Pallet::remove_proxies`]. + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * See [`Pallet::remove_proxy`]. + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_NominationPools | ProxyType_NonTransfer | ProxyType_Society | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_NominationPools { + __kind: 'NominationPools' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Society { + __kind: 'Society' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const PreimageCall: sts.Type = sts.closedEnum(() => { + return { + ensure_updated: sts.enumStruct({ + hashes: sts.array(() => H256), + }), + note_preimage: sts.enumStruct({ + bytes: sts.bytes(), + }), + request_preimage: sts.enumStruct({ + hash: H256, + }), + unnote_preimage: sts.enumStruct({ + hash: H256, + }), + unrequest_preimage: sts.enumStruct({ + hash: H256, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type PreimageCall = PreimageCall_ensure_updated | PreimageCall_note_preimage | PreimageCall_request_preimage | PreimageCall_unnote_preimage | PreimageCall_unrequest_preimage + +/** + * See [`Pallet::ensure_updated`]. + */ +export interface PreimageCall_ensure_updated { + __kind: 'ensure_updated' + hashes: H256[] +} + +/** + * See [`Pallet::note_preimage`]. + */ +export interface PreimageCall_note_preimage { + __kind: 'note_preimage' + bytes: Bytes +} + +/** + * See [`Pallet::request_preimage`]. + */ +export interface PreimageCall_request_preimage { + __kind: 'request_preimage' + hash: H256 +} + +/** + * See [`Pallet::unnote_preimage`]. + */ +export interface PreimageCall_unnote_preimage { + __kind: 'unnote_preimage' + hash: H256 +} + +/** + * See [`Pallet::unrequest_preimage`]. + */ +export interface PreimageCall_unrequest_preimage { + __kind: 'unrequest_preimage' + hash: H256 +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParasSlashingCall: sts.Type = sts.closedEnum(() => { + return { + report_dispute_lost_unsigned: sts.enumStruct({ + disputeProof: V6DisputeProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: sts.number(), + trieNodes: sts.array(() => sts.bytes()), + validatorCount: sts.number(), + } +}) + +export interface MembershipProof { + session: number + trieNodes: Bytes[] + validatorCount: number +} + +export const V6DisputeProof: sts.Type = sts.struct(() => { + return { + timeSlot: V6DisputesTimeSlot, + kind: V6SlashingOffenceKind, + validatorIndex: V6ValidatorIndex, + validatorId: V6Public, + } +}) + +export const V6ValidatorIndex = sts.number() + +export const V6SlashingOffenceKind: sts.Type = sts.closedEnum(() => { + return { + AgainstValid: sts.unit(), + ForInvalid: sts.unit(), + } +}) + +export type V6SlashingOffenceKind = V6SlashingOffenceKind_AgainstValid | V6SlashingOffenceKind_ForInvalid + +export interface V6SlashingOffenceKind_AgainstValid { + __kind: 'AgainstValid' +} + +export interface V6SlashingOffenceKind_ForInvalid { + __kind: 'ForInvalid' +} + +export const V6DisputesTimeSlot: sts.Type = sts.struct(() => { + return { + sessionIndex: sts.number(), + candidateHash: CandidateHash, + } +}) + +export const CandidateHash = sts.bytes() + +export interface V6DisputesTimeSlot { + sessionIndex: number + candidateHash: CandidateHash +} + +export type CandidateHash = Bytes + +export interface V6DisputeProof { + timeSlot: V6DisputesTimeSlot + kind: V6SlashingOffenceKind + validatorIndex: V6ValidatorIndex + validatorId: V6Public +} + +export type V6ValidatorIndex = number + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParasSlashingCall = ParasSlashingCall_report_dispute_lost_unsigned + +/** + * See [`Pallet::report_dispute_lost_unsigned`]. + */ +export interface ParasSlashingCall_report_dispute_lost_unsigned { + __kind: 'report_dispute_lost_unsigned' + disputeProof: V6DisputeProof + keyOwnerProof: MembershipProof +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParasSharedCall = never + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParasDisputesCall: sts.Type = sts.closedEnum(() => { + return { + force_unfreeze: sts.unit(), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParasDisputesCall = ParasDisputesCall_force_unfreeze + +/** + * See [`Pallet::force_unfreeze`]. + */ +export interface ParasDisputesCall_force_unfreeze { + __kind: 'force_unfreeze' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + add_trusted_validation_code: sts.enumStruct({ + validationCode: ValidationCode, + }), + force_note_new_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: Id, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + relayParentNumber: sts.number(), + }), + force_set_current_code: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_set_most_recent_context: sts.enumStruct({ + para: Id, + context: sts.number(), + }), + include_pvf_check_statement: sts.enumStruct({ + stmt: V6PvfCheckStatement, + signature: V6Signature, + }), + poke_unused_validation_code: sts.enumStruct({ + validationCodeHash: ValidationCodeHash, + }), + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const V6Signature = sts.bytes() + +export const V6PvfCheckStatement: sts.Type = sts.struct(() => { + return { + accept: sts.boolean(), + subject: ValidationCodeHash, + sessionIndex: sts.number(), + validatorIndex: V6ValidatorIndex, + } +}) + +export interface V6PvfCheckStatement { + accept: boolean + subject: ValidationCodeHash + sessionIndex: number + validatorIndex: V6ValidatorIndex +} + +export type ValidationCodeHash = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParasCall = ParasCall_add_trusted_validation_code | ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head | ParasCall_force_set_most_recent_context | ParasCall_include_pvf_check_statement | ParasCall_poke_unused_validation_code + +/** + * See [`Pallet::add_trusted_validation_code`]. + */ +export interface ParasCall_add_trusted_validation_code { + __kind: 'add_trusted_validation_code' + validationCode: ValidationCode +} + +/** + * See [`Pallet::force_note_new_head`]. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: Id + newHead: HeadData +} + +/** + * See [`Pallet::force_queue_action`]. + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: Id +} + +/** + * See [`Pallet::force_schedule_code_upgrade`]. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: Id + newCode: ValidationCode + relayParentNumber: number +} + +/** + * See [`Pallet::force_set_current_code`]. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: Id + newCode: ValidationCode +} + +/** + * See [`Pallet::force_set_current_head`]. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: Id + newHead: HeadData +} + +/** + * See [`Pallet::force_set_most_recent_context`]. + */ +export interface ParasCall_force_set_most_recent_context { + __kind: 'force_set_most_recent_context' + para: Id + context: number +} + +/** + * See [`Pallet::include_pvf_check_statement`]. + */ +export interface ParasCall_include_pvf_check_statement { + __kind: 'include_pvf_check_statement' + stmt: V6PvfCheckStatement + signature: V6Signature +} + +/** + * See [`Pallet::poke_unused_validation_code`]. + */ +export interface ParasCall_poke_unused_validation_code { + __kind: 'poke_unused_validation_code' + validationCodeHash: ValidationCodeHash +} + +export type V6Signature = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParaInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: V6InherentData, + }), + } +}) + +export const V6InherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => V6UncheckedSigned), + backedCandidates: sts.array(() => V6BackedCandidate), + disputes: sts.array(() => V6DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: H256, + number: sts.number(), + stateRoot: H256, + extrinsicsRoot: H256, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + Consensus: sts.tuple(() => [sts.bytes(), sts.bytes()]), + Other: sts.bytes(), + PreRuntime: sts.tuple(() => [sts.bytes(), sts.bytes()]), + RuntimeEnvironmentUpdated: sts.unit(), + Seal: sts.tuple(() => [sts.bytes(), sts.bytes()]), + } +}) + +export type DigestItem = DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: [Bytes, Bytes] +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: [Bytes, Bytes] +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: [Bytes, Bytes] +} + +export interface Digest { + logs: DigestItem[] +} + +export interface Header { + parentHash: H256 + number: number + stateRoot: H256 + extrinsicsRoot: H256 + digest: Digest +} + +export const V6DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: sts.number(), + statements: sts.array(() => sts.tuple(() => [V6DisputeStatement, V6ValidatorIndex, V6Signature])), + } +}) + +export const V6DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: V6InvalidDisputeStatementKind, + Valid: V6ValidDisputeStatementKind, + } +}) + +export const V6ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + ApprovalCheckingMultipleCandidates: sts.array(() => CandidateHash), + BackingSeconded: H256, + BackingValid: H256, + Explicit: sts.unit(), + } +}) + +export type V6ValidDisputeStatementKind = V6ValidDisputeStatementKind_ApprovalChecking | V6ValidDisputeStatementKind_ApprovalCheckingMultipleCandidates | V6ValidDisputeStatementKind_BackingSeconded | V6ValidDisputeStatementKind_BackingValid | V6ValidDisputeStatementKind_Explicit + +export interface V6ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface V6ValidDisputeStatementKind_ApprovalCheckingMultipleCandidates { + __kind: 'ApprovalCheckingMultipleCandidates' + value: CandidateHash[] +} + +export interface V6ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: H256 +} + +export interface V6ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: H256 +} + +export interface V6ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export const V6InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export type V6InvalidDisputeStatementKind = V6InvalidDisputeStatementKind_Explicit + +export interface V6InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type V6DisputeStatement = V6DisputeStatement_Invalid | V6DisputeStatement_Valid + +export interface V6DisputeStatement_Invalid { + __kind: 'Invalid' + value: V6InvalidDisputeStatementKind +} + +export interface V6DisputeStatement_Valid { + __kind: 'Valid' + value: V6ValidDisputeStatementKind +} + +export interface V6DisputeStatementSet { + candidateHash: CandidateHash + session: number + statements: [V6DisputeStatement, V6ValidatorIndex, V6Signature][] +} + +export const V6BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: V6CommittedCandidateReceipt, + validityVotes: sts.array(() => V6ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const V6ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: V6Signature, + Implicit: V6Signature, + } +}) + +export type V6ValidityAttestation = V6ValidityAttestation_Explicit | V6ValidityAttestation_Implicit + +export interface V6ValidityAttestation_Explicit { + __kind: 'Explicit' + value: V6Signature +} + +export interface V6ValidityAttestation_Implicit { + __kind: 'Implicit' + value: V6Signature +} + +export const V6CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: V6CandidateDescriptor, + commitments: V6CandidateCommitments, + } +}) + +export const V6CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => sts.bytes()), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: sts.number(), + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: Id, + data: sts.bytes(), + } +}) + +export interface OutboundHrmpMessage { + recipient: Id + data: Bytes +} + +export interface V6CandidateCommitments { + upwardMessages: Bytes[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: number +} + +export const V6CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: Id, + relayParent: H256, + collator: sts.bytes(), + persistedValidationDataHash: H256, + povHash: H256, + erasureRoot: H256, + signature: sts.bytes(), + paraHead: H256, + validationCodeHash: ValidationCodeHash, + } +}) + +export interface V6CandidateDescriptor { + paraId: Id + relayParent: H256 + collator: Bytes + persistedValidationDataHash: H256 + povHash: H256 + erasureRoot: H256 + signature: Bytes + paraHead: H256 + validationCodeHash: ValidationCodeHash +} + +export interface V6CommittedCandidateReceipt { + descriptor: V6CandidateDescriptor + commitments: V6CandidateCommitments +} + +export interface V6BackedCandidate { + candidate: V6CommittedCandidateReceipt + validityVotes: V6ValidityAttestation[] + validatorIndices: BitSequence +} + +export const V6UncheckedSigned: sts.Type = sts.struct(() => { + return { + payload: V6AvailabilityBitfield, + validatorIndex: V6ValidatorIndex, + signature: V6Signature, + } +}) + +export const V6AvailabilityBitfield = sts.bitseq() + +export interface V6UncheckedSigned { + payload: V6AvailabilityBitfield + validatorIndex: V6ValidatorIndex + signature: V6Signature +} + +export type V6AvailabilityBitfield = BitSequence + +export interface V6InherentData { + bitfields: V6UncheckedSigned[] + backedCandidates: V6BackedCandidate[] + disputes: V6DisputeStatementSet[] + parentHeader: Header +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParaInherentCall = ParaInherentCall_enter + +/** + * See [`Pallet::enter`]. + */ +export interface ParaInherentCall_enter { + __kind: 'enter' + data: V6InherentData +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParaInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParaInclusionCall = never + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const OnDemandAssignmentProviderCall: sts.Type = sts.closedEnum(() => { + return { + place_order_allow_death: sts.enumStruct({ + maxAmount: sts.bigint(), + paraId: Id, + }), + place_order_keep_alive: sts.enumStruct({ + maxAmount: sts.bigint(), + paraId: Id, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type OnDemandAssignmentProviderCall = OnDemandAssignmentProviderCall_place_order_allow_death | OnDemandAssignmentProviderCall_place_order_keep_alive + +/** + * See [`Pallet::place_order_allow_death`]. + */ +export interface OnDemandAssignmentProviderCall_place_order_allow_death { + __kind: 'place_order_allow_death' + maxAmount: bigint + paraId: Id +} + +/** + * See [`Pallet::place_order_keep_alive`]. + */ +export interface OnDemandAssignmentProviderCall_place_order_keep_alive { + __kind: 'place_order_keep_alive' + maxAmount: bigint + paraId: Id +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const NominationPoolsCall: sts.Type = sts.closedEnum(() => { + return { + adjust_pool_deposit: sts.enumStruct({ + poolId: sts.number(), + }), + bond_extra: sts.enumStruct({ + extra: BondExtra, + }), + bond_extra_other: sts.enumStruct({ + member: MultiAddress, + extra: BondExtra, + }), + chill: sts.enumStruct({ + poolId: sts.number(), + }), + claim_commission: sts.enumStruct({ + poolId: sts.number(), + }), + claim_payout: sts.unit(), + claim_payout_other: sts.enumStruct({ + other: AccountId32, + }), + create: sts.enumStruct({ + amount: sts.bigint(), + root: MultiAddress, + nominator: MultiAddress, + bouncer: MultiAddress, + }), + create_with_pool_id: sts.enumStruct({ + amount: sts.bigint(), + root: MultiAddress, + nominator: MultiAddress, + bouncer: MultiAddress, + poolId: sts.number(), + }), + join: sts.enumStruct({ + amount: sts.bigint(), + poolId: sts.number(), + }), + nominate: sts.enumStruct({ + poolId: sts.number(), + validators: sts.array(() => AccountId32), + }), + pool_withdraw_unbonded: sts.enumStruct({ + poolId: sts.number(), + numSlashingSpans: sts.number(), + }), + set_claim_permission: sts.enumStruct({ + permission: ClaimPermission, + }), + set_commission: sts.enumStruct({ + poolId: sts.number(), + newCommission: sts.option(() => sts.tuple(() => [Perbill, AccountId32])), + }), + set_commission_change_rate: sts.enumStruct({ + poolId: sts.number(), + changeRate: CommissionChangeRate, + }), + set_commission_claim_permission: sts.enumStruct({ + poolId: sts.number(), + permission: sts.option(() => CommissionClaimPermission), + }), + set_commission_max: sts.enumStruct({ + poolId: sts.number(), + maxCommission: Perbill, + }), + set_configs: sts.enumStruct({ + minJoinBond: Type_293, + minCreateBond: Type_293, + maxPools: Type_294, + maxMembers: Type_294, + maxMembersPerPool: Type_294, + globalMaxCommission: Type_295, + }), + set_metadata: sts.enumStruct({ + poolId: sts.number(), + metadata: sts.bytes(), + }), + set_state: sts.enumStruct({ + poolId: sts.number(), + state: PoolState, + }), + unbond: sts.enumStruct({ + memberAccount: MultiAddress, + unbondingPoints: sts.bigint(), + }), + update_roles: sts.enumStruct({ + poolId: sts.number(), + newRoot: Type_296, + newNominator: Type_296, + newBouncer: Type_296, + }), + withdraw_unbonded: sts.enumStruct({ + memberAccount: MultiAddress, + numSlashingSpans: sts.number(), + }), + } +}) + +export const Type_296: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: AccountId32, + } +}) + +export type Type_296 = Type_296_Noop | Type_296_Remove | Type_296_Set + +export interface Type_296_Noop { + __kind: 'Noop' +} + +export interface Type_296_Remove { + __kind: 'Remove' +} + +export interface Type_296_Set { + __kind: 'Set' + value: AccountId32 +} + +export const PoolState: sts.Type = sts.closedEnum(() => { + return { + Blocked: sts.unit(), + Destroying: sts.unit(), + Open: sts.unit(), + } +}) + +export type PoolState = PoolState_Blocked | PoolState_Destroying | PoolState_Open + +export interface PoolState_Blocked { + __kind: 'Blocked' +} + +export interface PoolState_Destroying { + __kind: 'Destroying' +} + +export interface PoolState_Open { + __kind: 'Open' +} + +export const Type_295: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export type Type_295 = Type_295_Noop | Type_295_Remove | Type_295_Set + +export interface Type_295_Noop { + __kind: 'Noop' +} + +export interface Type_295_Remove { + __kind: 'Remove' +} + +export interface Type_295_Set { + __kind: 'Set' + value: Perbill +} + +export const Type_294: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_294 = Type_294_Noop | Type_294_Remove | Type_294_Set + +export interface Type_294_Noop { + __kind: 'Noop' +} + +export interface Type_294_Remove { + __kind: 'Remove' +} + +export interface Type_294_Set { + __kind: 'Set' + value: number +} + +export const Type_293: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type Type_293 = Type_293_Noop | Type_293_Remove | Type_293_Set + +export interface Type_293_Noop { + __kind: 'Noop' +} + +export interface Type_293_Remove { + __kind: 'Remove' +} + +export interface Type_293_Set { + __kind: 'Set' + value: bigint +} + +export const CommissionClaimPermission: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Permissionless: sts.unit(), + } +}) + +export type CommissionClaimPermission = CommissionClaimPermission_Account | CommissionClaimPermission_Permissionless + +export interface CommissionClaimPermission_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface CommissionClaimPermission_Permissionless { + __kind: 'Permissionless' +} + +export const CommissionChangeRate: sts.Type = sts.struct(() => { + return { + maxIncrease: Perbill, + minDelay: sts.number(), + } +}) + +export interface CommissionChangeRate { + maxIncrease: Perbill + minDelay: number +} + +export const ClaimPermission: sts.Type = sts.closedEnum(() => { + return { + Permissioned: sts.unit(), + PermissionlessAll: sts.unit(), + PermissionlessCompound: sts.unit(), + PermissionlessWithdraw: sts.unit(), + } +}) + +export type ClaimPermission = ClaimPermission_Permissioned | ClaimPermission_PermissionlessAll | ClaimPermission_PermissionlessCompound | ClaimPermission_PermissionlessWithdraw + +export interface ClaimPermission_Permissioned { + __kind: 'Permissioned' +} + +export interface ClaimPermission_PermissionlessAll { + __kind: 'PermissionlessAll' +} + +export interface ClaimPermission_PermissionlessCompound { + __kind: 'PermissionlessCompound' +} + +export interface ClaimPermission_PermissionlessWithdraw { + __kind: 'PermissionlessWithdraw' +} + +export const BondExtra: sts.Type = sts.closedEnum(() => { + return { + FreeBalance: sts.bigint(), + Rewards: sts.unit(), + } +}) + +export type BondExtra = BondExtra_FreeBalance | BondExtra_Rewards + +export interface BondExtra_FreeBalance { + __kind: 'FreeBalance' + value: bigint +} + +export interface BondExtra_Rewards { + __kind: 'Rewards' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type NominationPoolsCall = NominationPoolsCall_adjust_pool_deposit | NominationPoolsCall_bond_extra | NominationPoolsCall_bond_extra_other | NominationPoolsCall_chill | NominationPoolsCall_claim_commission | NominationPoolsCall_claim_payout | NominationPoolsCall_claim_payout_other | NominationPoolsCall_create | NominationPoolsCall_create_with_pool_id | NominationPoolsCall_join | NominationPoolsCall_nominate | NominationPoolsCall_pool_withdraw_unbonded | NominationPoolsCall_set_claim_permission | NominationPoolsCall_set_commission | NominationPoolsCall_set_commission_change_rate | NominationPoolsCall_set_commission_claim_permission | NominationPoolsCall_set_commission_max | NominationPoolsCall_set_configs | NominationPoolsCall_set_metadata | NominationPoolsCall_set_state | NominationPoolsCall_unbond | NominationPoolsCall_update_roles | NominationPoolsCall_withdraw_unbonded + +/** + * See [`Pallet::adjust_pool_deposit`]. + */ +export interface NominationPoolsCall_adjust_pool_deposit { + __kind: 'adjust_pool_deposit' + poolId: number +} + +/** + * See [`Pallet::bond_extra`]. + */ +export interface NominationPoolsCall_bond_extra { + __kind: 'bond_extra' + extra: BondExtra +} + +/** + * See [`Pallet::bond_extra_other`]. + */ +export interface NominationPoolsCall_bond_extra_other { + __kind: 'bond_extra_other' + member: MultiAddress + extra: BondExtra +} + +/** + * See [`Pallet::chill`]. + */ +export interface NominationPoolsCall_chill { + __kind: 'chill' + poolId: number +} + +/** + * See [`Pallet::claim_commission`]. + */ +export interface NominationPoolsCall_claim_commission { + __kind: 'claim_commission' + poolId: number +} + +/** + * See [`Pallet::claim_payout`]. + */ +export interface NominationPoolsCall_claim_payout { + __kind: 'claim_payout' +} + +/** + * See [`Pallet::claim_payout_other`]. + */ +export interface NominationPoolsCall_claim_payout_other { + __kind: 'claim_payout_other' + other: AccountId32 +} + +/** + * See [`Pallet::create`]. + */ +export interface NominationPoolsCall_create { + __kind: 'create' + amount: bigint + root: MultiAddress + nominator: MultiAddress + bouncer: MultiAddress +} + +/** + * See [`Pallet::create_with_pool_id`]. + */ +export interface NominationPoolsCall_create_with_pool_id { + __kind: 'create_with_pool_id' + amount: bigint + root: MultiAddress + nominator: MultiAddress + bouncer: MultiAddress + poolId: number +} + +/** + * See [`Pallet::join`]. + */ +export interface NominationPoolsCall_join { + __kind: 'join' + amount: bigint + poolId: number +} + +/** + * See [`Pallet::nominate`]. + */ +export interface NominationPoolsCall_nominate { + __kind: 'nominate' + poolId: number + validators: AccountId32[] +} + +/** + * See [`Pallet::pool_withdraw_unbonded`]. + */ +export interface NominationPoolsCall_pool_withdraw_unbonded { + __kind: 'pool_withdraw_unbonded' + poolId: number + numSlashingSpans: number +} + +/** + * See [`Pallet::set_claim_permission`]. + */ +export interface NominationPoolsCall_set_claim_permission { + __kind: 'set_claim_permission' + permission: ClaimPermission +} + +/** + * See [`Pallet::set_commission`]. + */ +export interface NominationPoolsCall_set_commission { + __kind: 'set_commission' + poolId: number + newCommission?: ([Perbill, AccountId32] | undefined) +} + +/** + * See [`Pallet::set_commission_change_rate`]. + */ +export interface NominationPoolsCall_set_commission_change_rate { + __kind: 'set_commission_change_rate' + poolId: number + changeRate: CommissionChangeRate +} + +/** + * See [`Pallet::set_commission_claim_permission`]. + */ +export interface NominationPoolsCall_set_commission_claim_permission { + __kind: 'set_commission_claim_permission' + poolId: number + permission?: (CommissionClaimPermission | undefined) +} + +/** + * See [`Pallet::set_commission_max`]. + */ +export interface NominationPoolsCall_set_commission_max { + __kind: 'set_commission_max' + poolId: number + maxCommission: Perbill +} + +/** + * See [`Pallet::set_configs`]. + */ +export interface NominationPoolsCall_set_configs { + __kind: 'set_configs' + minJoinBond: Type_293 + minCreateBond: Type_293 + maxPools: Type_294 + maxMembers: Type_294 + maxMembersPerPool: Type_294 + globalMaxCommission: Type_295 +} + +/** + * See [`Pallet::set_metadata`]. + */ +export interface NominationPoolsCall_set_metadata { + __kind: 'set_metadata' + poolId: number + metadata: Bytes +} + +/** + * See [`Pallet::set_state`]. + */ +export interface NominationPoolsCall_set_state { + __kind: 'set_state' + poolId: number + state: PoolState +} + +/** + * See [`Pallet::unbond`]. + */ +export interface NominationPoolsCall_unbond { + __kind: 'unbond' + memberAccount: MultiAddress + unbondingPoints: bigint +} + +/** + * See [`Pallet::update_roles`]. + */ +export interface NominationPoolsCall_update_roles { + __kind: 'update_roles' + poolId: number + newRoot: Type_296 + newNominator: Type_296 + newBouncer: Type_296 +} + +/** + * See [`Pallet::withdraw_unbonded`]. + */ +export interface NominationPoolsCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + memberAccount: MultiAddress + numSlashingSpans: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const NisCounterpartBalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_adjust_total_issuance: sts.enumStruct({ + direction: AdjustmentDirection, + delta: sts.bigint(), + }), + force_set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + }), + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_allow_death: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + upgrade_accounts: sts.enumStruct({ + who: sts.array(() => AccountId32), + }), + } +}) + +export const AdjustmentDirection: sts.Type = sts.closedEnum(() => { + return { + Decrease: sts.unit(), + Increase: sts.unit(), + } +}) + +export type AdjustmentDirection = AdjustmentDirection_Decrease | AdjustmentDirection_Increase + +export interface AdjustmentDirection_Decrease { + __kind: 'Decrease' +} + +export interface AdjustmentDirection_Increase { + __kind: 'Increase' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type NisCounterpartBalancesCall = NisCounterpartBalancesCall_force_adjust_total_issuance | NisCounterpartBalancesCall_force_set_balance | NisCounterpartBalancesCall_force_transfer | NisCounterpartBalancesCall_force_unreserve | NisCounterpartBalancesCall_transfer_all | NisCounterpartBalancesCall_transfer_allow_death | NisCounterpartBalancesCall_transfer_keep_alive | NisCounterpartBalancesCall_upgrade_accounts + +/** + * See [`Pallet::force_adjust_total_issuance`]. + */ +export interface NisCounterpartBalancesCall_force_adjust_total_issuance { + __kind: 'force_adjust_total_issuance' + direction: AdjustmentDirection + delta: bigint +} + +/** + * See [`Pallet::force_set_balance`]. + */ +export interface NisCounterpartBalancesCall_force_set_balance { + __kind: 'force_set_balance' + who: MultiAddress + newFree: bigint +} + +/** + * See [`Pallet::force_transfer`]. + */ +export interface NisCounterpartBalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::force_unreserve`]. + */ +export interface NisCounterpartBalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * See [`Pallet::transfer_all`]. + */ +export interface NisCounterpartBalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * See [`Pallet::transfer_allow_death`]. + */ +export interface NisCounterpartBalancesCall_transfer_allow_death { + __kind: 'transfer_allow_death' + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::transfer_keep_alive`]. + */ +export interface NisCounterpartBalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::upgrade_accounts`]. + */ +export interface NisCounterpartBalancesCall_upgrade_accounts { + __kind: 'upgrade_accounts' + who: AccountId32[] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const NisCall: sts.Type = sts.closedEnum(() => { + return { + communify: sts.enumStruct({ + index: sts.number(), + }), + fund_deficit: sts.unit(), + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + privatize: sts.enumStruct({ + index: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + thaw_communal: sts.enumStruct({ + index: sts.number(), + }), + thaw_private: sts.enumStruct({ + index: sts.number(), + maybeProportion: sts.option(() => Perquintill), + }), + } +}) + +export const Perquintill = sts.bigint() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type NisCall = NisCall_communify | NisCall_fund_deficit | NisCall_place_bid | NisCall_privatize | NisCall_retract_bid | NisCall_thaw_communal | NisCall_thaw_private + +/** + * See [`Pallet::communify`]. + */ +export interface NisCall_communify { + __kind: 'communify' + index: number +} + +/** + * See [`Pallet::fund_deficit`]. + */ +export interface NisCall_fund_deficit { + __kind: 'fund_deficit' +} + +/** + * See [`Pallet::place_bid`]. + */ +export interface NisCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * See [`Pallet::privatize`]. + */ +export interface NisCall_privatize { + __kind: 'privatize' + index: number +} + +/** + * See [`Pallet::retract_bid`]. + */ +export interface NisCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * See [`Pallet::thaw_communal`]. + */ +export interface NisCall_thaw_communal { + __kind: 'thaw_communal' + index: number +} + +/** + * See [`Pallet::thaw_private`]. + */ +export interface NisCall_thaw_private { + __kind: 'thaw_private' + index: number + maybeProportion?: (Perquintill | undefined) +} + +export type Perquintill = bigint + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + call: Call, + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId32), + call: Call, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * See [`Pallet::approve_as_multi`]. + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * See [`Pallet::as_multi`]. + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + call: Call + maxWeight: Weight +} + +/** + * See [`Pallet::as_multi_threshold_1`]. + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId32[] + call: Call +} + +/** + * See [`Pallet::cancel_as_multi`]. + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId32[] + timepoint: Timepoint + callHash: Bytes +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const MessageQueueCall: sts.Type = sts.closedEnum(() => { + return { + execute_overweight: sts.enumStruct({ + messageOrigin: AggregateMessageOrigin, + page: sts.number(), + index: sts.number(), + weightLimit: Weight, + }), + reap_page: sts.enumStruct({ + messageOrigin: AggregateMessageOrigin, + pageIndex: sts.number(), + }), + } +}) + +export const AggregateMessageOrigin: sts.Type = sts.closedEnum(() => { + return { + Ump: UmpQueueId, + } +}) + +export const UmpQueueId: sts.Type = sts.closedEnum(() => { + return { + Para: Id, + } +}) + +export type UmpQueueId = UmpQueueId_Para + +export interface UmpQueueId_Para { + __kind: 'Para' + value: Id +} + +export type AggregateMessageOrigin = AggregateMessageOrigin_Ump + +export interface AggregateMessageOrigin_Ump { + __kind: 'Ump' + value: UmpQueueId +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type MessageQueueCall = MessageQueueCall_execute_overweight | MessageQueueCall_reap_page + +/** + * See [`Pallet::execute_overweight`]. + */ +export interface MessageQueueCall_execute_overweight { + __kind: 'execute_overweight' + messageOrigin: AggregateMessageOrigin + page: number + index: number + weightLimit: Weight +} + +/** + * See [`Pallet::reap_page`]. + */ +export interface MessageQueueCall_reap_page { + __kind: 'reap_page' + messageOrigin: AggregateMessageOrigin + pageIndex: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const InitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type InitializerCall = InitializerCall_force_approve + +/** + * See [`Pallet::force_approve`]. + */ +export interface InitializerCall_force_approve { + __kind: 'force_approve' + upTo: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: sts.number(), + }), + force_transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: sts.number(), + }), + freeze: sts.enumStruct({ + index: sts.number(), + }), + transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * See [`Pallet::claim`]. + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: number +} + +/** + * See [`Pallet::force_transfer`]. + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: MultiAddress + index: number + freeze: boolean +} + +/** + * See [`Pallet::free`]. + */ +export interface IndicesCall_free { + __kind: 'free' + index: number +} + +/** + * See [`Pallet::freeze`]. + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: number +} + +/** + * See [`Pallet::transfer`]. + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: MultiAddress + index: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const HrmpCall: sts.Type = sts.closedEnum(() => { + return { + establish_channel_with_system: sts.enumStruct({ + targetSystemChain: Id, + }), + establish_system_channel: sts.enumStruct({ + sender: Id, + recipient: Id, + }), + force_clean_hrmp: sts.enumStruct({ + para: Id, + numInbound: sts.number(), + numOutbound: sts.number(), + }), + force_open_hrmp_channel: sts.enumStruct({ + sender: Id, + recipient: Id, + maxCapacity: sts.number(), + maxMessageSize: sts.number(), + }), + force_process_hrmp_close: sts.enumStruct({ + channels: sts.number(), + }), + force_process_hrmp_open: sts.enumStruct({ + channels: sts.number(), + }), + hrmp_accept_open_channel: sts.enumStruct({ + sender: Id, + }), + hrmp_cancel_open_request: sts.enumStruct({ + channelId: HrmpChannelId, + openRequests: sts.number(), + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: Id, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + poke_channel_deposits: sts.enumStruct({ + sender: Id, + recipient: Id, + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: Id, + recipient: Id, + } +}) + +export interface HrmpChannelId { + sender: Id + recipient: Id +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type HrmpCall = HrmpCall_establish_channel_with_system | HrmpCall_establish_system_channel | HrmpCall_force_clean_hrmp | HrmpCall_force_open_hrmp_channel | HrmpCall_force_process_hrmp_close | HrmpCall_force_process_hrmp_open | HrmpCall_hrmp_accept_open_channel | HrmpCall_hrmp_cancel_open_request | HrmpCall_hrmp_close_channel | HrmpCall_hrmp_init_open_channel | HrmpCall_poke_channel_deposits + +/** + * See [`Pallet::establish_channel_with_system`]. + */ +export interface HrmpCall_establish_channel_with_system { + __kind: 'establish_channel_with_system' + targetSystemChain: Id +} + +/** + * See [`Pallet::establish_system_channel`]. + */ +export interface HrmpCall_establish_system_channel { + __kind: 'establish_system_channel' + sender: Id + recipient: Id +} + +/** + * See [`Pallet::force_clean_hrmp`]. + */ +export interface HrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: Id + numInbound: number + numOutbound: number +} + +/** + * See [`Pallet::force_open_hrmp_channel`]. + */ +export interface HrmpCall_force_open_hrmp_channel { + __kind: 'force_open_hrmp_channel' + sender: Id + recipient: Id + maxCapacity: number + maxMessageSize: number +} + +/** + * See [`Pallet::force_process_hrmp_close`]. + */ +export interface HrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' + channels: number +} + +/** + * See [`Pallet::force_process_hrmp_open`]. + */ +export interface HrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' + channels: number +} + +/** + * See [`Pallet::hrmp_accept_open_channel`]. + */ +export interface HrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: Id +} + +/** + * See [`Pallet::hrmp_cancel_open_request`]. + */ +export interface HrmpCall_hrmp_cancel_open_request { + __kind: 'hrmp_cancel_open_request' + channelId: HrmpChannelId + openRequests: number +} + +/** + * See [`Pallet::hrmp_close_channel`]. + */ +export interface HrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * See [`Pallet::hrmp_init_open_channel`]. + */ +export interface HrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: Id + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +/** + * See [`Pallet::poke_channel_deposits`]. + */ +export interface HrmpCall_poke_channel_deposits { + __kind: 'poke_channel_deposits' + sender: Id + recipient: Id +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: sts.number(), + bestFinalizedBlockNumber: sts.number(), + }), + report_equivocation: sts.enumStruct({ + equivocationProof: Type_142, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_142, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const Type_142: sts.Type = sts.struct(() => { + return { + setId: sts.bigint(), + equivocation: Equivocation, + } +}) + +export const Equivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: Type_150, + Prevote: Type_144, + } +}) + +export const Type_144: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Prevote, Signature]), + second: sts.tuple(() => [Prevote, Signature]), + } +}) + +export const Signature = sts.bytes() + +export const Prevote: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Prevote { + targetHash: H256 + targetNumber: number +} + +export interface Type_144 { + roundNumber: bigint + identity: Public + first: [Prevote, Signature] + second: [Prevote, Signature] +} + +export type Signature = Bytes + +export const Type_150: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Precommit, Signature]), + second: sts.tuple(() => [Precommit, Signature]), + } +}) + +export const Precommit: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Precommit { + targetHash: H256 + targetNumber: number +} + +export interface Type_150 { + roundNumber: bigint + identity: Public + first: [Precommit, Signature] + second: [Precommit, Signature] +} + +export type Equivocation = Equivocation_Precommit | Equivocation_Prevote + +export interface Equivocation_Precommit { + __kind: 'Precommit' + value: Type_150 +} + +export interface Equivocation_Prevote { + __kind: 'Prevote' + value: Type_144 +} + +export interface Type_142 { + setId: bigint + equivocation: Equivocation +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * See [`Pallet::note_stalled`]. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: number + bestFinalizedBlockNumber: number +} + +/** + * See [`Pallet::report_equivocation`]. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_142 + keyOwnerProof: MembershipProof +} + +/** + * See [`Pallet::report_equivocation_unsigned`]. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_142 + keyOwnerProof: MembershipProof +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const FellowshipReferendaCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + index: sts.number(), + }), + kill: sts.enumStruct({ + index: sts.number(), + }), + nudge_referendum: sts.enumStruct({ + index: sts.number(), + }), + one_fewer_deciding: sts.enumStruct({ + track: sts.number(), + }), + place_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_submission_deposit: sts.enumStruct({ + index: sts.number(), + }), + set_metadata: sts.enumStruct({ + index: sts.number(), + maybeHash: sts.option(() => H256), + }), + submit: sts.enumStruct({ + proposalOrigin: OriginCaller, + proposal: Bounded, + enactmentMoment: DispatchTime, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type FellowshipReferendaCall = FellowshipReferendaCall_cancel | FellowshipReferendaCall_kill | FellowshipReferendaCall_nudge_referendum | FellowshipReferendaCall_one_fewer_deciding | FellowshipReferendaCall_place_decision_deposit | FellowshipReferendaCall_refund_decision_deposit | FellowshipReferendaCall_refund_submission_deposit | FellowshipReferendaCall_set_metadata | FellowshipReferendaCall_submit + +/** + * See [`Pallet::cancel`]. + */ +export interface FellowshipReferendaCall_cancel { + __kind: 'cancel' + index: number +} + +/** + * See [`Pallet::kill`]. + */ +export interface FellowshipReferendaCall_kill { + __kind: 'kill' + index: number +} + +/** + * See [`Pallet::nudge_referendum`]. + */ +export interface FellowshipReferendaCall_nudge_referendum { + __kind: 'nudge_referendum' + index: number +} + +/** + * See [`Pallet::one_fewer_deciding`]. + */ +export interface FellowshipReferendaCall_one_fewer_deciding { + __kind: 'one_fewer_deciding' + track: number +} + +/** + * See [`Pallet::place_decision_deposit`]. + */ +export interface FellowshipReferendaCall_place_decision_deposit { + __kind: 'place_decision_deposit' + index: number +} + +/** + * See [`Pallet::refund_decision_deposit`]. + */ +export interface FellowshipReferendaCall_refund_decision_deposit { + __kind: 'refund_decision_deposit' + index: number +} + +/** + * See [`Pallet::refund_submission_deposit`]. + */ +export interface FellowshipReferendaCall_refund_submission_deposit { + __kind: 'refund_submission_deposit' + index: number +} + +/** + * See [`Pallet::set_metadata`]. + */ +export interface FellowshipReferendaCall_set_metadata { + __kind: 'set_metadata' + index: number + maybeHash?: (H256 | undefined) +} + +/** + * See [`Pallet::submit`]. + */ +export interface FellowshipReferendaCall_submit { + __kind: 'submit' + proposalOrigin: OriginCaller + proposal: Bounded + enactmentMoment: DispatchTime +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const FellowshipCollectiveCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: MultiAddress, + }), + cleanup_poll: sts.enumStruct({ + pollIndex: sts.number(), + max: sts.number(), + }), + demote_member: sts.enumStruct({ + who: MultiAddress, + }), + exchange_member: sts.enumStruct({ + who: MultiAddress, + newWho: MultiAddress, + }), + promote_member: sts.enumStruct({ + who: MultiAddress, + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + minRank: sts.number(), + }), + vote: sts.enumStruct({ + poll: sts.number(), + aye: sts.boolean(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type FellowshipCollectiveCall = FellowshipCollectiveCall_add_member | FellowshipCollectiveCall_cleanup_poll | FellowshipCollectiveCall_demote_member | FellowshipCollectiveCall_exchange_member | FellowshipCollectiveCall_promote_member | FellowshipCollectiveCall_remove_member | FellowshipCollectiveCall_vote + +/** + * See [`Pallet::add_member`]. + */ +export interface FellowshipCollectiveCall_add_member { + __kind: 'add_member' + who: MultiAddress +} + +/** + * See [`Pallet::cleanup_poll`]. + */ +export interface FellowshipCollectiveCall_cleanup_poll { + __kind: 'cleanup_poll' + pollIndex: number + max: number +} + +/** + * See [`Pallet::demote_member`]. + */ +export interface FellowshipCollectiveCall_demote_member { + __kind: 'demote_member' + who: MultiAddress +} + +/** + * See [`Pallet::exchange_member`]. + */ +export interface FellowshipCollectiveCall_exchange_member { + __kind: 'exchange_member' + who: MultiAddress + newWho: MultiAddress +} + +/** + * See [`Pallet::promote_member`]. + */ +export interface FellowshipCollectiveCall_promote_member { + __kind: 'promote_member' + who: MultiAddress +} + +/** + * See [`Pallet::remove_member`]. + */ +export interface FellowshipCollectiveCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + minRank: number +} + +/** + * See [`Pallet::vote`]. + */ +export interface FellowshipCollectiveCall_vote { + __kind: 'vote' + poll: number + aye: boolean +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const FastUnstakeCall: sts.Type = sts.closedEnum(() => { + return { + control: sts.enumStruct({ + erasToCheck: sts.number(), + }), + deregister: sts.unit(), + register_fast_unstake: sts.unit(), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type FastUnstakeCall = FastUnstakeCall_control | FastUnstakeCall_deregister | FastUnstakeCall_register_fast_unstake + +/** + * See [`Pallet::control`]. + */ +export interface FastUnstakeCall_control { + __kind: 'control' + erasToCheck: number +} + +/** + * See [`Pallet::deregister`]. + */ +export interface FastUnstakeCall_deregister { + __kind: 'deregister' +} + +/** + * See [`Pallet::register_fast_unstake`]. + */ +export interface FastUnstakeCall_register_fast_unstake { + __kind: 'register_fast_unstake' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + governance_fallback: sts.enumStruct({ + maybeMaxVoters: sts.option(() => sts.number()), + maybeMaxTargets: sts.option(() => sts.number()), + }), + set_emergency_election_result: sts.enumStruct({ + supports: sts.array(() => sts.tuple(() => [AccountId32, Support])), + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => ElectionScore), + }), + submit: sts.enumStruct({ + rawSolution: RawSolution, + }), + submit_unsigned: sts.enumStruct({ + rawSolution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export const RawSolution: sts.Type = sts.struct(() => { + return { + solution: NposCompactSolution24, + score: ElectionScore, + round: sts.number(), + } +}) + +export const NposCompactSolution24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), + votes2: sts.array(() => sts.tuple(() => [sts.number(), sts.tuple(() => [sts.number(), sts.number()]), sts.number()])), + votes3: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes4: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes5: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes6: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes7: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes8: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes9: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes10: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes11: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes12: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes13: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes14: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes15: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes16: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes17: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes18: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes19: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes20: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes21: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes22: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes23: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes24: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + } +}) + +export interface NposCompactSolution24 { + votes1: [number, number][] + votes2: [number, [number, number], number][] + votes3: [number, [number, number][], number][] + votes4: [number, [number, number][], number][] + votes5: [number, [number, number][], number][] + votes6: [number, [number, number][], number][] + votes7: [number, [number, number][], number][] + votes8: [number, [number, number][], number][] + votes9: [number, [number, number][], number][] + votes10: [number, [number, number][], number][] + votes11: [number, [number, number][], number][] + votes12: [number, [number, number][], number][] + votes13: [number, [number, number][], number][] + votes14: [number, [number, number][], number][] + votes15: [number, [number, number][], number][] + votes16: [number, [number, number][], number][] + votes17: [number, [number, number][], number][] + votes18: [number, [number, number][], number][] + votes19: [number, [number, number][], number][] + votes20: [number, [number, number][], number][] + votes21: [number, [number, number][], number][] + votes22: [number, [number, number][], number][] + votes23: [number, [number, number][], number][] + votes24: [number, [number, number][], number][] +} + +export interface RawSolution { + solution: NposCompactSolution24 + score: ElectionScore + round: number +} + +export interface ElectionScore { + minimalStake: bigint + sumStake: bigint + sumStakeSquared: bigint +} + +export const ElectionScore: sts.Type = sts.struct(() => { + return { + minimalStake: sts.bigint(), + sumStake: sts.bigint(), + sumStakeSquared: sts.bigint(), + } +}) + +export const Support: sts.Type = sts.struct(() => { + return { + total: sts.bigint(), + voters: sts.array(() => sts.tuple(() => [AccountId32, sts.bigint()])), + } +}) + +export interface Support { + total: bigint + voters: [AccountId32, bigint][] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_governance_fallback | ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * See [`Pallet::governance_fallback`]. + */ +export interface ElectionProviderMultiPhaseCall_governance_fallback { + __kind: 'governance_fallback' + maybeMaxVoters?: (number | undefined) + maybeMaxTargets?: (number | undefined) +} + +/** + * See [`Pallet::set_emergency_election_result`]. + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + supports: [AccountId32, Support][] +} + +/** + * See [`Pallet::set_minimum_untrusted_score`]. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (ElectionScore | undefined) +} + +/** + * See [`Pallet::submit`]. + */ +export interface ElectionProviderMultiPhaseCall_submit { + __kind: 'submit' + rawSolution: RawSolution +} + +/** + * See [`Pallet::submit_unsigned`]. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + rawSolution: RawSolution + witness: SolutionOrSnapshotSize +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: Id, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + contribute_all: sts.enumStruct({ + index: sts.number(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: Id, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId32, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_contribute_all | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * See [`Pallet::add_memo`]. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: Id + memo: Bytes +} + +/** + * See [`Pallet::contribute`]. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * See [`Pallet::contribute_all`]. + */ +export interface CrowdloanCall_contribute_all { + __kind: 'contribute_all' + index: number + signature?: (MultiSignature | undefined) +} + +/** + * See [`Pallet::create`]. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * See [`Pallet::dissolve`]. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * See [`Pallet::edit`]. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * See [`Pallet::poke`]. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: Id +} + +/** + * See [`Pallet::refund`]. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * See [`Pallet::withdraw`]. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId32 + index: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const CoretimeCall: sts.Type = sts.closedEnum(() => { + return { + assign_core: sts.enumStruct({ + core: sts.number(), + begin: sts.number(), + assignment: sts.array(() => sts.tuple(() => [CoreAssignment, PartsOf57600])), + endHint: sts.option(() => sts.number()), + }), + request_core_count: sts.enumStruct({ + count: sts.number(), + }), + } +}) + +export const PartsOf57600 = sts.number() + +export const CoreAssignment: sts.Type = sts.closedEnum(() => { + return { + Idle: sts.unit(), + Pool: sts.unit(), + Task: sts.number(), + } +}) + +export type CoreAssignment = CoreAssignment_Idle | CoreAssignment_Pool | CoreAssignment_Task + +export interface CoreAssignment_Idle { + __kind: 'Idle' +} + +export interface CoreAssignment_Pool { + __kind: 'Pool' +} + +export interface CoreAssignment_Task { + __kind: 'Task' + value: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type CoretimeCall = CoretimeCall_assign_core | CoretimeCall_request_core_count + +/** + * See [`Pallet::assign_core`]. + */ +export interface CoretimeCall_assign_core { + __kind: 'assign_core' + core: number + begin: number + assignment: [CoreAssignment, PartsOf57600][] + endHint?: (number | undefined) +} + +/** + * See [`Pallet::request_core_count`]. + */ +export interface CoretimeCall_request_core_count { + __kind: 'request_core_count' + count: number +} + +export type PartsOf57600 = number + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ConvictionVotingCall: sts.Type = sts.closedEnum(() => { + return { + delegate: sts.enumStruct({ + class: sts.number(), + to: MultiAddress, + conviction: Conviction, + balance: sts.bigint(), + }), + remove_other_vote: sts.enumStruct({ + target: MultiAddress, + class: sts.number(), + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + class: sts.option(() => sts.number()), + index: sts.number(), + }), + undelegate: sts.enumStruct({ + class: sts.number(), + }), + unlock: sts.enumStruct({ + class: sts.number(), + target: MultiAddress, + }), + vote: sts.enumStruct({ + pollIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + SplitAbstain: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + abstain: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type AccountVote = AccountVote_Split | AccountVote_SplitAbstain | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface AccountVote_SplitAbstain { + __kind: 'SplitAbstain' + aye: bigint + nay: bigint + abstain: bigint +} + +export interface AccountVote_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ConvictionVotingCall = ConvictionVotingCall_delegate | ConvictionVotingCall_remove_other_vote | ConvictionVotingCall_remove_vote | ConvictionVotingCall_undelegate | ConvictionVotingCall_unlock | ConvictionVotingCall_vote + +/** + * See [`Pallet::delegate`]. + */ +export interface ConvictionVotingCall_delegate { + __kind: 'delegate' + class: number + to: MultiAddress + conviction: Conviction + balance: bigint +} + +/** + * See [`Pallet::remove_other_vote`]. + */ +export interface ConvictionVotingCall_remove_other_vote { + __kind: 'remove_other_vote' + target: MultiAddress + class: number + index: number +} + +/** + * See [`Pallet::remove_vote`]. + */ +export interface ConvictionVotingCall_remove_vote { + __kind: 'remove_vote' + class?: (number | undefined) + index: number +} + +/** + * See [`Pallet::undelegate`]. + */ +export interface ConvictionVotingCall_undelegate { + __kind: 'undelegate' + class: number +} + +/** + * See [`Pallet::unlock`]. + */ +export interface ConvictionVotingCall_unlock { + __kind: 'unlock' + class: number + target: MultiAddress +} + +/** + * See [`Pallet::vote`]. + */ +export interface ConvictionVotingCall_vote { + __kind: 'vote' + pollIndex: number + vote: AccountVote +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_approval_voting_params: sts.enumStruct({ + new: ApprovalVotingParams, + }), + set_async_backing_params: sts.enumStruct({ + new: V6AsyncBackingParams, + }), + set_bypass_consistency_check: sts.enumStruct({ + new: sts.boolean(), + }), + set_code_retention_period: sts.enumStruct({ + new: sts.number(), + }), + set_coretime_cores: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: sts.number(), + }), + set_executor_params: sts.enumStruct({ + new: sts.array(() => V6ExecutorParam), + }), + set_group_rotation_frequency: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_minimum_backing_votes: sts.enumStruct({ + new: sts.number(), + }), + set_minimum_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_node_feature: sts.enumStruct({ + index: sts.number(), + value: sts.boolean(), + }), + set_on_demand_base_fee: sts.enumStruct({ + new: sts.bigint(), + }), + set_on_demand_fee_variability: sts.enumStruct({ + new: Perbill, + }), + set_on_demand_queue_max_size: sts.enumStruct({ + new: sts.number(), + }), + set_on_demand_retries: sts.enumStruct({ + new: sts.number(), + }), + set_on_demand_target_queue_utilization: sts.enumStruct({ + new: Perbill, + }), + set_on_demand_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_paras_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_pvf_voting_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_cooldown: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +export const V6ExecutorParam: sts.Type = sts.closedEnum(() => { + return { + MaxMemoryPages: sts.number(), + PrecheckingMaxMemory: sts.bigint(), + PvfExecTimeout: sts.tuple(() => [V6PvfExecKind, sts.bigint()]), + PvfPrepTimeout: sts.tuple(() => [V6PvfPrepKind, sts.bigint()]), + StackLogicalMax: sts.number(), + StackNativeMax: sts.number(), + WasmExtBulkMemory: sts.unit(), + } +}) + +export const V6PvfPrepKind: sts.Type = sts.closedEnum(() => { + return { + Precheck: sts.unit(), + Prepare: sts.unit(), + } +}) + +export type V6PvfPrepKind = V6PvfPrepKind_Precheck | V6PvfPrepKind_Prepare + +export interface V6PvfPrepKind_Precheck { + __kind: 'Precheck' +} + +export interface V6PvfPrepKind_Prepare { + __kind: 'Prepare' +} + +export const V6PvfExecKind: sts.Type = sts.closedEnum(() => { + return { + Approval: sts.unit(), + Backing: sts.unit(), + } +}) + +export type V6PvfExecKind = V6PvfExecKind_Approval | V6PvfExecKind_Backing + +export interface V6PvfExecKind_Approval { + __kind: 'Approval' +} + +export interface V6PvfExecKind_Backing { + __kind: 'Backing' +} + +export type V6ExecutorParam = V6ExecutorParam_MaxMemoryPages | V6ExecutorParam_PrecheckingMaxMemory | V6ExecutorParam_PvfExecTimeout | V6ExecutorParam_PvfPrepTimeout | V6ExecutorParam_StackLogicalMax | V6ExecutorParam_StackNativeMax | V6ExecutorParam_WasmExtBulkMemory + +export interface V6ExecutorParam_MaxMemoryPages { + __kind: 'MaxMemoryPages' + value: number +} + +export interface V6ExecutorParam_PrecheckingMaxMemory { + __kind: 'PrecheckingMaxMemory' + value: bigint +} + +export interface V6ExecutorParam_PvfExecTimeout { + __kind: 'PvfExecTimeout' + value: [V6PvfExecKind, bigint] +} + +export interface V6ExecutorParam_PvfPrepTimeout { + __kind: 'PvfPrepTimeout' + value: [V6PvfPrepKind, bigint] +} + +export interface V6ExecutorParam_StackLogicalMax { + __kind: 'StackLogicalMax' + value: number +} + +export interface V6ExecutorParam_StackNativeMax { + __kind: 'StackNativeMax' + value: number +} + +export interface V6ExecutorParam_WasmExtBulkMemory { + __kind: 'WasmExtBulkMemory' +} + +export const V6AsyncBackingParams: sts.Type = sts.struct(() => { + return { + maxCandidateDepth: sts.number(), + allowedAncestryLen: sts.number(), + } +}) + +export interface V6AsyncBackingParams { + maxCandidateDepth: number + allowedAncestryLen: number +} + +export const ApprovalVotingParams: sts.Type = sts.struct(() => { + return { + maxApprovalCoalesceCount: sts.number(), + } +}) + +export interface ApprovalVotingParams { + maxApprovalCoalesceCount: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ConfigurationCall = ConfigurationCall_set_approval_voting_params | ConfigurationCall_set_async_backing_params | ConfigurationCall_set_bypass_consistency_check | ConfigurationCall_set_code_retention_period | ConfigurationCall_set_coretime_cores | ConfigurationCall_set_dispute_period | ConfigurationCall_set_dispute_post_conclusion_acceptance_period | ConfigurationCall_set_executor_params | ConfigurationCall_set_group_rotation_frequency | ConfigurationCall_set_hrmp_channel_max_capacity | ConfigurationCall_set_hrmp_channel_max_message_size | ConfigurationCall_set_hrmp_channel_max_total_size | ConfigurationCall_set_hrmp_max_message_num_per_candidate | ConfigurationCall_set_hrmp_max_parachain_inbound_channels | ConfigurationCall_set_hrmp_max_parachain_outbound_channels | ConfigurationCall_set_hrmp_open_request_ttl | ConfigurationCall_set_hrmp_recipient_deposit | ConfigurationCall_set_hrmp_sender_deposit | ConfigurationCall_set_max_code_size | ConfigurationCall_set_max_downward_message_size | ConfigurationCall_set_max_head_data_size | ConfigurationCall_set_max_pov_size | ConfigurationCall_set_max_upward_message_num_per_candidate | ConfigurationCall_set_max_upward_message_size | ConfigurationCall_set_max_upward_queue_count | ConfigurationCall_set_max_upward_queue_size | ConfigurationCall_set_max_validators | ConfigurationCall_set_max_validators_per_core | ConfigurationCall_set_minimum_backing_votes | ConfigurationCall_set_minimum_validation_upgrade_delay | ConfigurationCall_set_n_delay_tranches | ConfigurationCall_set_needed_approvals | ConfigurationCall_set_no_show_slots | ConfigurationCall_set_node_feature | ConfigurationCall_set_on_demand_base_fee | ConfigurationCall_set_on_demand_fee_variability | ConfigurationCall_set_on_demand_queue_max_size | ConfigurationCall_set_on_demand_retries | ConfigurationCall_set_on_demand_target_queue_utilization | ConfigurationCall_set_on_demand_ttl | ConfigurationCall_set_paras_availability_period | ConfigurationCall_set_pvf_voting_ttl | ConfigurationCall_set_relay_vrf_modulo_samples | ConfigurationCall_set_scheduling_lookahead | ConfigurationCall_set_validation_upgrade_cooldown | ConfigurationCall_set_validation_upgrade_delay | ConfigurationCall_set_zeroth_delay_tranche_width + +/** + * See [`Pallet::set_approval_voting_params`]. + */ +export interface ConfigurationCall_set_approval_voting_params { + __kind: 'set_approval_voting_params' + new: ApprovalVotingParams +} + +/** + * See [`Pallet::set_async_backing_params`]. + */ +export interface ConfigurationCall_set_async_backing_params { + __kind: 'set_async_backing_params' + new: V6AsyncBackingParams +} + +/** + * See [`Pallet::set_bypass_consistency_check`]. + */ +export interface ConfigurationCall_set_bypass_consistency_check { + __kind: 'set_bypass_consistency_check' + new: boolean +} + +/** + * See [`Pallet::set_code_retention_period`]. + */ +export interface ConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: number +} + +/** + * See [`Pallet::set_coretime_cores`]. + */ +export interface ConfigurationCall_set_coretime_cores { + __kind: 'set_coretime_cores' + new: number +} + +/** + * See [`Pallet::set_dispute_period`]. + */ +export interface ConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: number +} + +/** + * See [`Pallet::set_dispute_post_conclusion_acceptance_period`]. + */ +export interface ConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: number +} + +/** + * See [`Pallet::set_executor_params`]. + */ +export interface ConfigurationCall_set_executor_params { + __kind: 'set_executor_params' + new: V6ExecutorParam[] +} + +/** + * See [`Pallet::set_group_rotation_frequency`]. + */ +export interface ConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: number +} + +/** + * See [`Pallet::set_hrmp_channel_max_capacity`]. + */ +export interface ConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * See [`Pallet::set_hrmp_channel_max_message_size`]. + */ +export interface ConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * See [`Pallet::set_hrmp_channel_max_total_size`]. + */ +export interface ConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * See [`Pallet::set_hrmp_max_message_num_per_candidate`]. + */ +export interface ConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * See [`Pallet::set_hrmp_max_parachain_inbound_channels`]. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * See [`Pallet::set_hrmp_max_parachain_outbound_channels`]. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * See [`Pallet::set_hrmp_open_request_ttl`]. + */ +export interface ConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * See [`Pallet::set_hrmp_recipient_deposit`]. + */ +export interface ConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: bigint +} + +/** + * See [`Pallet::set_hrmp_sender_deposit`]. + */ +export interface ConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: bigint +} + +/** + * See [`Pallet::set_max_code_size`]. + */ +export interface ConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * See [`Pallet::set_max_downward_message_size`]. + */ +export interface ConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * See [`Pallet::set_max_head_data_size`]. + */ +export interface ConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * See [`Pallet::set_max_pov_size`]. + */ +export interface ConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * See [`Pallet::set_max_upward_message_num_per_candidate`]. + */ +export interface ConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * See [`Pallet::set_max_upward_message_size`]. + */ +export interface ConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * See [`Pallet::set_max_upward_queue_count`]. + */ +export interface ConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * See [`Pallet::set_max_upward_queue_size`]. + */ +export interface ConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * See [`Pallet::set_max_validators`]. + */ +export interface ConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * See [`Pallet::set_max_validators_per_core`]. + */ +export interface ConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * See [`Pallet::set_minimum_backing_votes`]. + */ +export interface ConfigurationCall_set_minimum_backing_votes { + __kind: 'set_minimum_backing_votes' + new: number +} + +/** + * See [`Pallet::set_minimum_validation_upgrade_delay`]. + */ +export interface ConfigurationCall_set_minimum_validation_upgrade_delay { + __kind: 'set_minimum_validation_upgrade_delay' + new: number +} + +/** + * See [`Pallet::set_n_delay_tranches`]. + */ +export interface ConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * See [`Pallet::set_needed_approvals`]. + */ +export interface ConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * See [`Pallet::set_no_show_slots`]. + */ +export interface ConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * See [`Pallet::set_node_feature`]. + */ +export interface ConfigurationCall_set_node_feature { + __kind: 'set_node_feature' + index: number + value: boolean +} + +/** + * See [`Pallet::set_on_demand_base_fee`]. + */ +export interface ConfigurationCall_set_on_demand_base_fee { + __kind: 'set_on_demand_base_fee' + new: bigint +} + +/** + * See [`Pallet::set_on_demand_fee_variability`]. + */ +export interface ConfigurationCall_set_on_demand_fee_variability { + __kind: 'set_on_demand_fee_variability' + new: Perbill +} + +/** + * See [`Pallet::set_on_demand_queue_max_size`]. + */ +export interface ConfigurationCall_set_on_demand_queue_max_size { + __kind: 'set_on_demand_queue_max_size' + new: number +} + +/** + * See [`Pallet::set_on_demand_retries`]. + */ +export interface ConfigurationCall_set_on_demand_retries { + __kind: 'set_on_demand_retries' + new: number +} + +/** + * See [`Pallet::set_on_demand_target_queue_utilization`]. + */ +export interface ConfigurationCall_set_on_demand_target_queue_utilization { + __kind: 'set_on_demand_target_queue_utilization' + new: Perbill +} + +/** + * See [`Pallet::set_on_demand_ttl`]. + */ +export interface ConfigurationCall_set_on_demand_ttl { + __kind: 'set_on_demand_ttl' + new: number +} + +/** + * See [`Pallet::set_paras_availability_period`]. + */ +export interface ConfigurationCall_set_paras_availability_period { + __kind: 'set_paras_availability_period' + new: number +} + +/** + * See [`Pallet::set_pvf_voting_ttl`]. + */ +export interface ConfigurationCall_set_pvf_voting_ttl { + __kind: 'set_pvf_voting_ttl' + new: number +} + +/** + * See [`Pallet::set_relay_vrf_modulo_samples`]. + */ +export interface ConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * See [`Pallet::set_scheduling_lookahead`]. + */ +export interface ConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * See [`Pallet::set_validation_upgrade_cooldown`]. + */ +export interface ConfigurationCall_set_validation_upgrade_cooldown { + __kind: 'set_validation_upgrade_cooldown' + new: number +} + +/** + * See [`Pallet::set_validation_upgrade_delay`]. + */ +export interface ConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: number +} + +/** + * See [`Pallet::set_zeroth_delay_tranche_width`]. + */ +export interface ConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: sts.bigint(), + vestingSchedule: sts.option(() => sts.tuple(() => [sts.bigint(), sts.bigint(), sts.number()])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId32), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * See [`Pallet::attest`]. + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * See [`Pallet::claim`]. + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId32 + ethereumSignature: EcdsaSignature +} + +/** + * See [`Pallet::claim_attest`]. + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId32 + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * See [`Pallet::mint_claim`]. + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: bigint + vestingSchedule?: ([bigint, bigint, number] | undefined) + statement?: (StatementKind | undefined) +} + +/** + * See [`Pallet::move_claim`]. + */ +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId32 | undefined) +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ChildBountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + add_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + value: sts.bigint(), + description: sts.bytes(), + }), + award_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + close_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + propose_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ChildBountiesCall = ChildBountiesCall_accept_curator | ChildBountiesCall_add_child_bounty | ChildBountiesCall_award_child_bounty | ChildBountiesCall_claim_child_bounty | ChildBountiesCall_close_child_bounty | ChildBountiesCall_propose_curator | ChildBountiesCall_unassign_curator + +/** + * See [`Pallet::accept_curator`]. + */ +export interface ChildBountiesCall_accept_curator { + __kind: 'accept_curator' + parentBountyId: number + childBountyId: number +} + +/** + * See [`Pallet::add_child_bounty`]. + */ +export interface ChildBountiesCall_add_child_bounty { + __kind: 'add_child_bounty' + parentBountyId: number + value: bigint + description: Bytes +} + +/** + * See [`Pallet::award_child_bounty`]. + */ +export interface ChildBountiesCall_award_child_bounty { + __kind: 'award_child_bounty' + parentBountyId: number + childBountyId: number + beneficiary: MultiAddress +} + +/** + * See [`Pallet::claim_child_bounty`]. + */ +export interface ChildBountiesCall_claim_child_bounty { + __kind: 'claim_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * See [`Pallet::close_child_bounty`]. + */ +export interface ChildBountiesCall_close_child_bounty { + __kind: 'close_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * See [`Pallet::propose_curator`]. + */ +export interface ChildBountiesCall_propose_curator { + __kind: 'propose_curator' + parentBountyId: number + childBountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * See [`Pallet::unassign_curator`]. + */ +export interface ChildBountiesCall_unassign_curator { + __kind: 'unassign_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * See [`Pallet::accept_curator`]. + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * See [`Pallet::approve_bounty`]. + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * See [`Pallet::award_bounty`]. + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: MultiAddress +} + +/** + * See [`Pallet::claim_bounty`]. + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * See [`Pallet::close_bounty`]. + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * See [`Pallet::extend_bounty_expiry`]. + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * See [`Pallet::propose_bounty`]. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * See [`Pallet::propose_curator`]. + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * See [`Pallet::unassign_curator`]. + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const BeefyCall: sts.Type = sts.closedEnum(() => { + return { + report_equivocation: sts.enumStruct({ + equivocationProof: Type_460, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_460, + keyOwnerProof: MembershipProof, + }), + set_new_genesis: sts.enumStruct({ + delayInBlocks: sts.number(), + }), + } +}) + +export const Type_460: sts.Type = sts.struct(() => { + return { + first: VoteMessage, + second: VoteMessage, + } +}) + +export const VoteMessage: sts.Type = sts.struct(() => { + return { + commitment: Commitment, + id: sts.bytes(), + signature: sts.bytes(), + } +}) + +export const Commitment: sts.Type = sts.struct(() => { + return { + payload: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + blockNumber: sts.number(), + validatorSetId: sts.bigint(), + } +}) + +export interface Commitment { + payload: [Bytes, Bytes][] + blockNumber: number + validatorSetId: bigint +} + +export interface VoteMessage { + commitment: Commitment + id: Bytes + signature: Bytes +} + +export interface Type_460 { + first: VoteMessage + second: VoteMessage +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type BeefyCall = BeefyCall_report_equivocation | BeefyCall_report_equivocation_unsigned | BeefyCall_set_new_genesis + +/** + * See [`Pallet::report_equivocation`]. + */ +export interface BeefyCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_460 + keyOwnerProof: MembershipProof +} + +/** + * See [`Pallet::report_equivocation_unsigned`]. + */ +export interface BeefyCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_460 + keyOwnerProof: MembershipProof +} + +/** + * See [`Pallet::set_new_genesis`]. + */ +export interface BeefyCall_set_new_genesis { + __kind: 'set_new_genesis' + delayInBlocks: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_adjust_total_issuance: sts.enumStruct({ + direction: AdjustmentDirection, + delta: sts.bigint(), + }), + force_set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + }), + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_allow_death: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + upgrade_accounts: sts.enumStruct({ + who: sts.array(() => AccountId32), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type BalancesCall = BalancesCall_force_adjust_total_issuance | BalancesCall_force_set_balance | BalancesCall_force_transfer | BalancesCall_force_unreserve | BalancesCall_transfer_all | BalancesCall_transfer_allow_death | BalancesCall_transfer_keep_alive | BalancesCall_upgrade_accounts + +/** + * See [`Pallet::force_adjust_total_issuance`]. + */ +export interface BalancesCall_force_adjust_total_issuance { + __kind: 'force_adjust_total_issuance' + direction: AdjustmentDirection + delta: bigint +} + +/** + * See [`Pallet::force_set_balance`]. + */ +export interface BalancesCall_force_set_balance { + __kind: 'force_set_balance' + who: MultiAddress + newFree: bigint +} + +/** + * See [`Pallet::force_transfer`]. + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::force_unreserve`]. + */ +export interface BalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * See [`Pallet::transfer_all`]. + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * See [`Pallet::transfer_allow_death`]. + */ +export interface BalancesCall_transfer_allow_death { + __kind: 'transfer_allow_death' + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::transfer_keep_alive`]. + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * See [`Pallet::upgrade_accounts`]. + */ +export interface BalancesCall_upgrade_accounts { + __kind: 'upgrade_accounts' + who: AccountId32[] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const EquivocationProof: sts.Type = sts.struct(() => { + return { + offender: sts.bytes(), + slot: Slot, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Slot = sts.bigint() + +export interface EquivocationProof { + offender: Bytes + slot: Slot + firstHeader: Header + secondHeader: Header +} + +export type Slot = bigint + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V1: sts.enumStruct({ + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + }), + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type NextConfigDescriptor = NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * See [`Pallet::plan_config_change`]. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * See [`Pallet::report_equivocation`]. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * See [`Pallet::report_equivocation_unsigned`]. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * See [`Pallet::bid`]. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * See [`Pallet::cancel_auction`]. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * See [`Pallet::new_auction`]. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const AssetRateCall: sts.Type = sts.closedEnum(() => { + return { + create: sts.enumStruct({ + assetKind: VersionedLocatableAsset, + rate: FixedU128, + }), + remove: sts.enumStruct({ + assetKind: VersionedLocatableAsset, + }), + update: sts.enumStruct({ + assetKind: VersionedLocatableAsset, + rate: FixedU128, + }), + } +}) + +export const FixedU128 = sts.bigint() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type AssetRateCall = AssetRateCall_create | AssetRateCall_remove | AssetRateCall_update + +/** + * See [`Pallet::create`]. + */ +export interface AssetRateCall_create { + __kind: 'create' + assetKind: VersionedLocatableAsset + rate: FixedU128 +} + +/** + * See [`Pallet::remove`]. + */ +export interface AssetRateCall_remove { + __kind: 'remove' + assetKind: VersionedLocatableAsset +} + +/** + * See [`Pallet::update`]. + */ +export interface AssetRateCall_update { + __kind: 'update' + assetKind: VersionedLocatableAsset + rate: FixedU128 +} + +export type FixedU128 = bigint + +export type Call = Call_AssetRate | Call_Auctions | Call_Babe | Call_Balances | Call_Beefy | Call_Bounties | Call_ChildBounties | Call_Claims | Call_Configuration | Call_ConvictionVoting | Call_Coretime | Call_Crowdloan | Call_ElectionProviderMultiPhase | Call_FastUnstake | Call_FellowshipCollective | Call_FellowshipReferenda | Call_Grandpa | Call_Hrmp | Call_Indices | Call_Initializer | Call_MessageQueue | Call_Multisig | Call_Nis | Call_NisCounterpartBalances | Call_NominationPools | Call_OnDemandAssignmentProvider | Call_ParaInclusion | Call_ParaInherent | Call_Paras | Call_ParasDisputes | Call_ParasShared | Call_ParasSlashing | Call_Preimage | Call_Proxy | Call_Recovery | Call_Referenda | Call_Registrar | Call_Scheduler | Call_Session | Call_Slots | Call_Society | Call_Staking | Call_System | Call_Timestamp | Call_Treasury | Call_Utility | Call_Vesting | Call_VoterList | Call_Whitelist | Call_XcmPallet + +export interface Call_AssetRate { + __kind: 'AssetRate' + value: AssetRateCall +} + +export interface Call_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Call_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Call_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Call_Beefy { + __kind: 'Beefy' + value: BeefyCall +} + +export interface Call_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Call_ChildBounties { + __kind: 'ChildBounties' + value: ChildBountiesCall +} + +export interface Call_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Call_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Call_ConvictionVoting { + __kind: 'ConvictionVoting' + value: ConvictionVotingCall +} + +export interface Call_Coretime { + __kind: 'Coretime' + value: CoretimeCall +} + +export interface Call_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Call_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Call_FastUnstake { + __kind: 'FastUnstake' + value: FastUnstakeCall +} + +export interface Call_FellowshipCollective { + __kind: 'FellowshipCollective' + value: FellowshipCollectiveCall +} + +export interface Call_FellowshipReferenda { + __kind: 'FellowshipReferenda' + value: FellowshipReferendaCall +} + +export interface Call_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Call_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Call_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Call_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Call_MessageQueue { + __kind: 'MessageQueue' + value: MessageQueueCall +} + +export interface Call_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Call_Nis { + __kind: 'Nis' + value: NisCall +} + +export interface Call_NisCounterpartBalances { + __kind: 'NisCounterpartBalances' + value: NisCounterpartBalancesCall +} + +export interface Call_NominationPools { + __kind: 'NominationPools' + value: NominationPoolsCall +} + +export interface Call_OnDemandAssignmentProvider { + __kind: 'OnDemandAssignmentProvider' + value: OnDemandAssignmentProviderCall +} + +export interface Call_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Call_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Call_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Call_ParasDisputes { + __kind: 'ParasDisputes' + value: ParasDisputesCall +} + +export interface Call_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Call_ParasSlashing { + __kind: 'ParasSlashing' + value: ParasSlashingCall +} + +export interface Call_Preimage { + __kind: 'Preimage' + value: PreimageCall +} + +export interface Call_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Call_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Call_Referenda { + __kind: 'Referenda' + value: ReferendaCall +} + +export interface Call_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Call_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Call_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Call_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Call_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Call_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Call_System { + __kind: 'System' + value: SystemCall +} + +export interface Call_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Call_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Call_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Call_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Call_VoterList { + __kind: 'VoterList' + value: VoterListCall +} + +export interface Call_Whitelist { + __kind: 'Whitelist' + value: WhitelistCall +} + +export interface Call_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const MultiAddress: sts.Type = sts.closedEnum(() => { + return { + Address20: sts.bytes(), + Address32: sts.bytes(), + Id: AccountId32, + Index: sts.unit(), + Raw: sts.bytes(), + } +}) + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + NominationPools: sts.unit(), + NonTransfer: sts.unit(), + Society: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId32 = sts.bytes() diff --git a/squid/src/types/v1003000.ts b/squid/src/types/v1003000.ts new file mode 100644 index 00000000..b51798fa --- /dev/null +++ b/squid/src/types/v1003000.ts @@ -0,0 +1,14532 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Weight: sts.Type = sts.struct(() => { + return { + refTime: sts.bigint(), + proofSize: sts.bigint(), + } +}) + +export interface Weight { + refTime: bigint + proofSize: bigint +} + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: sts.number(), + index: sts.number(), + } +}) + +export interface Timepoint { + height: number + index: number +} + +export const Call: sts.Type = sts.closedEnum(() => { + return { + AssetRate: AssetRateCall, + Auctions: AuctionsCall, + Babe: BabeCall, + Balances: BalancesCall, + Beefy: BeefyCall, + Bounties: BountiesCall, + ChildBounties: ChildBountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + ConvictionVoting: ConvictionVotingCall, + Coretime: CoretimeCall, + Crowdloan: CrowdloanCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + FastUnstake: FastUnstakeCall, + FellowshipCollective: FellowshipCollectiveCall, + FellowshipReferenda: FellowshipReferendaCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Indices: IndicesCall, + Initializer: InitializerCall, + MessageQueue: MessageQueueCall, + Multisig: MultisigCall, + Nis: NisCall, + NisCounterpartBalances: NisCounterpartBalancesCall, + NominationPools: NominationPoolsCall, + OnDemandAssignmentProvider: OnDemandAssignmentProviderCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Parameters: ParametersCall, + Paras: ParasCall, + ParasDisputes: ParasDisputesCall, + ParasShared: ParasSharedCall, + ParasSlashing: ParasSlashingCall, + Preimage: PreimageCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Referenda: ReferendaCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + Timestamp: TimestampCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + VoterList: VoterListCall, + Whitelist: WhitelistCall, + XcmPallet: XcmPalletCall, + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + claim_assets: sts.enumStruct({ + assets: VersionedAssets, + beneficiary: VersionedLocation, + }), + execute: sts.enumStruct({ + message: Type_439, + maxWeight: Weight, + }), + force_default_xcm_version: sts.enumStruct({ + maybeXcmVersion: sts.option(() => sts.number()), + }), + force_subscribe_version_notify: sts.enumStruct({ + location: VersionedLocation, + }), + force_suspension: sts.enumStruct({ + suspended: sts.boolean(), + }), + force_unsubscribe_version_notify: sts.enumStruct({ + location: VersionedLocation, + }), + force_xcm_version: sts.enumStruct({ + location: V4Location, + version: sts.number(), + }), + limited_reserve_transfer_assets: sts.enumStruct({ + dest: VersionedLocation, + beneficiary: VersionedLocation, + assets: VersionedAssets, + feeAssetItem: sts.number(), + weightLimit: V3WeightLimit, + }), + limited_teleport_assets: sts.enumStruct({ + dest: VersionedLocation, + beneficiary: VersionedLocation, + assets: VersionedAssets, + feeAssetItem: sts.number(), + weightLimit: V3WeightLimit, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: VersionedLocation, + beneficiary: VersionedLocation, + assets: VersionedAssets, + feeAssetItem: sts.number(), + }), + send: sts.enumStruct({ + dest: VersionedLocation, + message: VersionedXcm, + }), + teleport_assets: sts.enumStruct({ + dest: VersionedLocation, + beneficiary: VersionedLocation, + assets: VersionedAssets, + feeAssetItem: sts.number(), + }), + transfer_assets: sts.enumStruct({ + dest: VersionedLocation, + beneficiary: VersionedLocation, + assets: VersionedAssets, + feeAssetItem: sts.number(), + weightLimit: V3WeightLimit, + }), + transfer_assets_using_type_and_then: sts.enumStruct({ + dest: VersionedLocation, + assets: VersionedAssets, + assetsTransferType: TransferType, + remoteFeesId: VersionedAssetId, + feesTransferType: TransferType, + customXcmOnDest: VersionedXcm, + weightLimit: V3WeightLimit, + }), + } +}) + +export const VersionedAssetId: sts.Type = sts.closedEnum(() => { + return { + V3: V3AssetId, + V4: V4AssetId, + } +}) + +export const V4AssetId: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V4Junctions, + } +}) + +export const V4Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: sts.array(() => V4Junction), + X2: sts.array(() => V4Junction), + X3: sts.array(() => V4Junction), + X4: sts.array(() => V4Junction), + X5: sts.array(() => V4Junction), + X6: sts.array(() => V4Junction), + X7: sts.array(() => V4Junction), + X8: sts.array(() => V4Junction), + } +}) + +export const V4Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: sts.option(() => V4NetworkId), + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: sts.option(() => V4NetworkId), + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: sts.option(() => V4NetworkId), + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.enumStruct({ + length: sts.number(), + data: sts.bytes(), + }), + GlobalConsensus: V4NetworkId, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V3BodyId, + part: V3BodyPart, + }), + } +}) + +export const V3BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export type V3BodyPart = V3BodyPart_AtLeastProportion | V3BodyPart_Fraction | V3BodyPart_Members | V3BodyPart_MoreThanProportion | V3BodyPart_Voice + +export interface V3BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V3BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V3BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V3BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V3BodyPart_Voice { + __kind: 'Voice' +} + +export const V3BodyId: sts.Type = sts.closedEnum(() => { + return { + Administration: sts.unit(), + Defense: sts.unit(), + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Moniker: sts.bytes(), + Technical: sts.unit(), + Treasury: sts.unit(), + Unit: sts.unit(), + } +}) + +export type V3BodyId = V3BodyId_Administration | V3BodyId_Defense | V3BodyId_Executive | V3BodyId_Index | V3BodyId_Judicial | V3BodyId_Legislative | V3BodyId_Moniker | V3BodyId_Technical | V3BodyId_Treasury | V3BodyId_Unit + +export interface V3BodyId_Administration { + __kind: 'Administration' +} + +export interface V3BodyId_Defense { + __kind: 'Defense' +} + +export interface V3BodyId_Executive { + __kind: 'Executive' +} + +export interface V3BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V3BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V3BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V3BodyId_Moniker { + __kind: 'Moniker' + value: Bytes +} + +export interface V3BodyId_Technical { + __kind: 'Technical' +} + +export interface V3BodyId_Treasury { + __kind: 'Treasury' +} + +export interface V3BodyId_Unit { + __kind: 'Unit' +} + +export const V4NetworkId: sts.Type = sts.closedEnum(() => { + return { + BitcoinCash: sts.unit(), + BitcoinCore: sts.unit(), + ByFork: sts.enumStruct({ + blockNumber: sts.bigint(), + blockHash: sts.bytes(), + }), + ByGenesis: sts.bytes(), + Ethereum: sts.enumStruct({ + chainId: sts.bigint(), + }), + Kusama: sts.unit(), + Polkadot: sts.unit(), + PolkadotBulletin: sts.unit(), + Rococo: sts.unit(), + Westend: sts.unit(), + Wococo: sts.unit(), + } +}) + +export type V4NetworkId = V4NetworkId_BitcoinCash | V4NetworkId_BitcoinCore | V4NetworkId_ByFork | V4NetworkId_ByGenesis | V4NetworkId_Ethereum | V4NetworkId_Kusama | V4NetworkId_Polkadot | V4NetworkId_PolkadotBulletin | V4NetworkId_Rococo | V4NetworkId_Westend | V4NetworkId_Wococo + +export interface V4NetworkId_BitcoinCash { + __kind: 'BitcoinCash' +} + +export interface V4NetworkId_BitcoinCore { + __kind: 'BitcoinCore' +} + +export interface V4NetworkId_ByFork { + __kind: 'ByFork' + blockNumber: bigint + blockHash: Bytes +} + +export interface V4NetworkId_ByGenesis { + __kind: 'ByGenesis' + value: Bytes +} + +export interface V4NetworkId_Ethereum { + __kind: 'Ethereum' + chainId: bigint +} + +export interface V4NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V4NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export interface V4NetworkId_PolkadotBulletin { + __kind: 'PolkadotBulletin' +} + +export interface V4NetworkId_Rococo { + __kind: 'Rococo' +} + +export interface V4NetworkId_Westend { + __kind: 'Westend' +} + +export interface V4NetworkId_Wococo { + __kind: 'Wococo' +} + +export type V4Junction = V4Junction_AccountId32 | V4Junction_AccountIndex64 | V4Junction_AccountKey20 | V4Junction_GeneralIndex | V4Junction_GeneralKey | V4Junction_GlobalConsensus | V4Junction_OnlyChild | V4Junction_PalletInstance | V4Junction_Parachain | V4Junction_Plurality + +export interface V4Junction_AccountId32 { + __kind: 'AccountId32' + network?: (V4NetworkId | undefined) + id: Bytes +} + +export interface V4Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network?: (V4NetworkId | undefined) + index: bigint +} + +export interface V4Junction_AccountKey20 { + __kind: 'AccountKey20' + network?: (V4NetworkId | undefined) + key: Bytes +} + +export interface V4Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V4Junction_GeneralKey { + __kind: 'GeneralKey' + length: number + data: Bytes +} + +export interface V4Junction_GlobalConsensus { + __kind: 'GlobalConsensus' + value: V4NetworkId +} + +export interface V4Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V4Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V4Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V4Junction_Plurality { + __kind: 'Plurality' + id: V3BodyId + part: V3BodyPart +} + +export type V4Junctions = V4Junctions_Here | V4Junctions_X1 | V4Junctions_X2 | V4Junctions_X3 | V4Junctions_X4 | V4Junctions_X5 | V4Junctions_X6 | V4Junctions_X7 | V4Junctions_X8 + +export interface V4Junctions_Here { + __kind: 'Here' +} + +export interface V4Junctions_X1 { + __kind: 'X1' + value: V4Junction[] +} + +export interface V4Junctions_X2 { + __kind: 'X2' + value: V4Junction[] +} + +export interface V4Junctions_X3 { + __kind: 'X3' + value: V4Junction[] +} + +export interface V4Junctions_X4 { + __kind: 'X4' + value: V4Junction[] +} + +export interface V4Junctions_X5 { + __kind: 'X5' + value: V4Junction[] +} + +export interface V4Junctions_X6 { + __kind: 'X6' + value: V4Junction[] +} + +export interface V4Junctions_X7 { + __kind: 'X7' + value: V4Junction[] +} + +export interface V4Junctions_X8 { + __kind: 'X8' + value: V4Junction[] +} + +export interface V4AssetId { + parents: number + interior: V4Junctions +} + +export const V3AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V3MultiLocation, + } +}) + +export const V3MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V3Junctions, + } +}) + +export const V3Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V3Junction, + X2: sts.tuple(() => [V3Junction, V3Junction]), + X3: sts.tuple(() => [V3Junction, V3Junction, V3Junction]), + X4: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction]), + X5: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + X6: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + X7: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + X8: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + } +}) + +export const V3Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: sts.option(() => V3NetworkId), + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: sts.option(() => V3NetworkId), + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: sts.option(() => V3NetworkId), + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.enumStruct({ + length: sts.number(), + data: sts.bytes(), + }), + GlobalConsensus: V3NetworkId, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V3BodyId, + part: V3BodyPart, + }), + } +}) + +export const V3NetworkId: sts.Type = sts.closedEnum(() => { + return { + BitcoinCash: sts.unit(), + BitcoinCore: sts.unit(), + ByFork: sts.enumStruct({ + blockNumber: sts.bigint(), + blockHash: sts.bytes(), + }), + ByGenesis: sts.bytes(), + Ethereum: sts.enumStruct({ + chainId: sts.bigint(), + }), + Kusama: sts.unit(), + Polkadot: sts.unit(), + PolkadotBulletin: sts.unit(), + Rococo: sts.unit(), + Westend: sts.unit(), + Wococo: sts.unit(), + } +}) + +export type V3NetworkId = V3NetworkId_BitcoinCash | V3NetworkId_BitcoinCore | V3NetworkId_ByFork | V3NetworkId_ByGenesis | V3NetworkId_Ethereum | V3NetworkId_Kusama | V3NetworkId_Polkadot | V3NetworkId_PolkadotBulletin | V3NetworkId_Rococo | V3NetworkId_Westend | V3NetworkId_Wococo + +export interface V3NetworkId_BitcoinCash { + __kind: 'BitcoinCash' +} + +export interface V3NetworkId_BitcoinCore { + __kind: 'BitcoinCore' +} + +export interface V3NetworkId_ByFork { + __kind: 'ByFork' + blockNumber: bigint + blockHash: Bytes +} + +export interface V3NetworkId_ByGenesis { + __kind: 'ByGenesis' + value: Bytes +} + +export interface V3NetworkId_Ethereum { + __kind: 'Ethereum' + chainId: bigint +} + +export interface V3NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V3NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export interface V3NetworkId_PolkadotBulletin { + __kind: 'PolkadotBulletin' +} + +export interface V3NetworkId_Rococo { + __kind: 'Rococo' +} + +export interface V3NetworkId_Westend { + __kind: 'Westend' +} + +export interface V3NetworkId_Wococo { + __kind: 'Wococo' +} + +export type V3Junction = V3Junction_AccountId32 | V3Junction_AccountIndex64 | V3Junction_AccountKey20 | V3Junction_GeneralIndex | V3Junction_GeneralKey | V3Junction_GlobalConsensus | V3Junction_OnlyChild | V3Junction_PalletInstance | V3Junction_Parachain | V3Junction_Plurality + +export interface V3Junction_AccountId32 { + __kind: 'AccountId32' + network?: (V3NetworkId | undefined) + id: Bytes +} + +export interface V3Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network?: (V3NetworkId | undefined) + index: bigint +} + +export interface V3Junction_AccountKey20 { + __kind: 'AccountKey20' + network?: (V3NetworkId | undefined) + key: Bytes +} + +export interface V3Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V3Junction_GeneralKey { + __kind: 'GeneralKey' + length: number + data: Bytes +} + +export interface V3Junction_GlobalConsensus { + __kind: 'GlobalConsensus' + value: V3NetworkId +} + +export interface V3Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V3Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V3Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V3Junction_Plurality { + __kind: 'Plurality' + id: V3BodyId + part: V3BodyPart +} + +export type V3Junctions = V3Junctions_Here | V3Junctions_X1 | V3Junctions_X2 | V3Junctions_X3 | V3Junctions_X4 | V3Junctions_X5 | V3Junctions_X6 | V3Junctions_X7 | V3Junctions_X8 + +export interface V3Junctions_Here { + __kind: 'Here' +} + +export interface V3Junctions_X1 { + __kind: 'X1' + value: V3Junction +} + +export interface V3Junctions_X2 { + __kind: 'X2' + value: [V3Junction, V3Junction] +} + +export interface V3Junctions_X3 { + __kind: 'X3' + value: [V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X4 { + __kind: 'X4' + value: [V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X5 { + __kind: 'X5' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X6 { + __kind: 'X6' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X7 { + __kind: 'X7' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X8 { + __kind: 'X8' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3MultiLocation { + parents: number + interior: V3Junctions +} + +export type V3AssetId = V3AssetId_Abstract | V3AssetId_Concrete + +export interface V3AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V3AssetId_Concrete { + __kind: 'Concrete' + value: V3MultiLocation +} + +export type VersionedAssetId = VersionedAssetId_V3 | VersionedAssetId_V4 + +export interface VersionedAssetId_V3 { + __kind: 'V3' + value: V3AssetId +} + +export interface VersionedAssetId_V4 { + __kind: 'V4' + value: V4AssetId +} + +export const TransferType: sts.Type = sts.closedEnum(() => { + return { + DestinationReserve: sts.unit(), + LocalReserve: sts.unit(), + RemoteReserve: VersionedLocation, + Teleport: sts.unit(), + } +}) + +export type TransferType = TransferType_DestinationReserve | TransferType_LocalReserve | TransferType_RemoteReserve | TransferType_Teleport + +export interface TransferType_DestinationReserve { + __kind: 'DestinationReserve' +} + +export interface TransferType_LocalReserve { + __kind: 'LocalReserve' +} + +export interface TransferType_RemoteReserve { + __kind: 'RemoteReserve' + value: VersionedLocation +} + +export interface TransferType_Teleport { + __kind: 'Teleport' +} + +export type VersionedLocation = VersionedLocation_V2 | VersionedLocation_V3 | VersionedLocation_V4 + +export interface VersionedLocation_V2 { + __kind: 'V2' + value: V2MultiLocation +} + +export interface VersionedLocation_V3 { + __kind: 'V3' + value: V3MultiLocation +} + +export interface VersionedLocation_V4 { + __kind: 'V4' + value: V4Location +} + +export interface V4Location { + parents: number + interior: V4Junctions +} + +export interface V2MultiLocation { + parents: number + interior: V2Junctions +} + +export type V2Junctions = V2Junctions_Here | V2Junctions_X1 | V2Junctions_X2 | V2Junctions_X3 | V2Junctions_X4 | V2Junctions_X5 | V2Junctions_X6 | V2Junctions_X7 | V2Junctions_X8 + +export interface V2Junctions_Here { + __kind: 'Here' +} + +export interface V2Junctions_X1 { + __kind: 'X1' + value: V2Junction +} + +export interface V2Junctions_X2 { + __kind: 'X2' + value: [V2Junction, V2Junction] +} + +export interface V2Junctions_X3 { + __kind: 'X3' + value: [V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X4 { + __kind: 'X4' + value: [V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X5 { + __kind: 'X5' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X6 { + __kind: 'X6' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X7 { + __kind: 'X7' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X8 { + __kind: 'X8' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export type V2Junction = V2Junction_AccountId32 | V2Junction_AccountIndex64 | V2Junction_AccountKey20 | V2Junction_GeneralIndex | V2Junction_GeneralKey | V2Junction_OnlyChild | V2Junction_PalletInstance | V2Junction_Parachain | V2Junction_Plurality + +export interface V2Junction_AccountId32 { + __kind: 'AccountId32' + network: V2NetworkId + id: Bytes +} + +export interface V2Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V2NetworkId + index: bigint +} + +export interface V2Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V2NetworkId + key: Bytes +} + +export interface V2Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V2Junction_GeneralKey { + __kind: 'GeneralKey' + value: WeakBoundedVec +} + +export interface V2Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V2Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V2Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V2Junction_Plurality { + __kind: 'Plurality' + id: V2BodyId + part: V2BodyPart +} + +export type V2BodyPart = V2BodyPart_AtLeastProportion | V2BodyPart_Fraction | V2BodyPart_Members | V2BodyPart_MoreThanProportion | V2BodyPart_Voice + +export interface V2BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V2BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V2BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V2BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V2BodyPart_Voice { + __kind: 'Voice' +} + +export type V2BodyId = V2BodyId_Administration | V2BodyId_Defense | V2BodyId_Executive | V2BodyId_Index | V2BodyId_Judicial | V2BodyId_Legislative | V2BodyId_Named | V2BodyId_Technical | V2BodyId_Treasury | V2BodyId_Unit + +export interface V2BodyId_Administration { + __kind: 'Administration' +} + +export interface V2BodyId_Defense { + __kind: 'Defense' +} + +export interface V2BodyId_Executive { + __kind: 'Executive' +} + +export interface V2BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V2BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V2BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V2BodyId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V2BodyId_Technical { + __kind: 'Technical' +} + +export interface V2BodyId_Treasury { + __kind: 'Treasury' +} + +export interface V2BodyId_Unit { + __kind: 'Unit' +} + +export type WeakBoundedVec = Bytes + +export type V2NetworkId = V2NetworkId_Any | V2NetworkId_Kusama | V2NetworkId_Named | V2NetworkId_Polkadot + +export interface V2NetworkId_Any { + __kind: 'Any' +} + +export interface V2NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V2NetworkId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V2NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export const VersionedXcm: sts.Type = sts.closedEnum(() => { + return { + V2: sts.array(() => V2Instruction), + V3: sts.array(() => V3Instruction), + V4: sts.array(() => V4Instruction), + } +}) + +export const V4Instruction: sts.Type = sts.closedEnum(() => { + return { + AliasOrigin: V4Location, + BurnAsset: sts.array(() => V4Asset), + BuyExecution: sts.enumStruct({ + fees: V4Asset, + weightLimit: V3WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V4Asset), + ticket: V4Location, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + ClearTopic: sts.unit(), + ClearTransactStatus: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V4AssetFilter, + beneficiary: V4Location, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V4AssetFilter, + dest: V4Location, + xcm: sts.array(() => V4Instruction), + }), + DescendOrigin: V4Junctions, + ExchangeAsset: sts.enumStruct({ + give: V4AssetFilter, + want: sts.array(() => V4Asset), + maximal: sts.boolean(), + }), + ExpectAsset: sts.array(() => V4Asset), + ExpectError: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + ExpectOrigin: sts.option(() => V4Location), + ExpectPallet: sts.enumStruct({ + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + crateMajor: sts.number(), + minCrateMinor: sts.number(), + }), + ExpectTransactStatus: V3MaybeErrorCode, + ExportMessage: sts.enumStruct({ + network: V4NetworkId, + destination: V4Junctions, + xcm: sts.array(() => V4Instruction), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V4AssetFilter, + reserve: V4Location, + xcm: sts.array(() => V4Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V4AssetFilter, + dest: V4Location, + xcm: sts.array(() => V4Instruction), + }), + LockAsset: sts.enumStruct({ + asset: V4Asset, + unlocker: V4Location, + }), + NoteUnlockable: sts.enumStruct({ + asset: V4Asset, + owner: V4Location, + }), + QueryPallet: sts.enumStruct({ + moduleName: sts.bytes(), + responseInfo: V4QueryResponseInfo, + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V4Response, + maxWeight: Weight, + querier: sts.option(() => V4Location), + }), + ReceiveTeleportedAsset: sts.array(() => V4Asset), + RefundSurplus: sts.unit(), + ReportError: V4QueryResponseInfo, + ReportHolding: sts.enumStruct({ + responseInfo: V4QueryResponseInfo, + assets: V4AssetFilter, + }), + ReportTransactStatus: V4QueryResponseInfo, + RequestUnlock: sts.enumStruct({ + asset: V4Asset, + locker: V4Location, + }), + ReserveAssetDeposited: sts.array(() => V4Asset), + SetAppendix: sts.array(() => V4Instruction), + SetErrorHandler: sts.array(() => V4Instruction), + SetFeesMode: sts.enumStruct({ + jitWithdraw: sts.boolean(), + }), + SetTopic: sts.bytes(), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: Weight, + }), + Transact: sts.enumStruct({ + originKind: V3OriginKind, + requireWeightAtMost: Weight, + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V4Asset), + beneficiary: V4Location, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V4Asset), + dest: V4Location, + xcm: sts.array(() => V4Instruction), + }), + Trap: sts.bigint(), + UniversalOrigin: V4Junction, + UnlockAsset: sts.enumStruct({ + asset: V4Asset, + target: V4Location, + }), + UnpaidExecution: sts.enumStruct({ + weightLimit: V3WeightLimit, + checkOrigin: sts.option(() => V4Location), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V4Asset), + } +}) + +export const DoubleEncoded: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncoded { + encoded: Bytes +} + +export const V3OriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type V3OriginKind = V3OriginKind_Native | V3OriginKind_SovereignAccount | V3OriginKind_Superuser | V3OriginKind_Xcm + +export interface V3OriginKind_Native { + __kind: 'Native' +} + +export interface V3OriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface V3OriginKind_Superuser { + __kind: 'Superuser' +} + +export interface V3OriginKind_Xcm { + __kind: 'Xcm' +} + +export const V4Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V4Asset), + DispatchResult: V3MaybeErrorCode, + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + Null: sts.unit(), + PalletsInfo: sts.array(() => V4PalletInfo), + Version: sts.number(), + } +}) + +export const V4PalletInfo: sts.Type = sts.struct(() => { + return { + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + major: sts.number(), + minor: sts.number(), + patch: sts.number(), + } +}) + +export interface V4PalletInfo { + index: number + name: Bytes + moduleName: Bytes + major: number + minor: number + patch: number +} + +export type V4Response = V4Response_Assets | V4Response_DispatchResult | V4Response_ExecutionResult | V4Response_Null | V4Response_PalletsInfo | V4Response_Version + +export interface V4Response_Assets { + __kind: 'Assets' + value: V4Asset[] +} + +export interface V4Response_DispatchResult { + __kind: 'DispatchResult' + value: V3MaybeErrorCode +} + +export interface V4Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V3Error] | undefined) +} + +export interface V4Response_Null { + __kind: 'Null' +} + +export interface V4Response_PalletsInfo { + __kind: 'PalletsInfo' + value: V4PalletInfo[] +} + +export interface V4Response_Version { + __kind: 'Version' + value: number +} + +export type V3Error = V3Error_AssetNotFound | V3Error_BadOrigin | V3Error_Barrier | V3Error_DestinationUnsupported | V3Error_ExceedsMaxMessageSize | V3Error_ExceedsStackLimit | V3Error_ExpectationFalse | V3Error_ExportError | V3Error_FailedToDecode | V3Error_FailedToTransactAsset | V3Error_FeesNotMet | V3Error_HoldingWouldOverflow | V3Error_InvalidLocation | V3Error_LocationCannotHold | V3Error_LocationFull | V3Error_LocationNotInvertible | V3Error_LockError | V3Error_MaxWeightInvalid | V3Error_NameMismatch | V3Error_NoDeal | V3Error_NoPermission | V3Error_NotDepositable | V3Error_NotHoldingFees | V3Error_NotWithdrawable | V3Error_Overflow | V3Error_PalletNotFound | V3Error_ReanchorFailed | V3Error_TooExpensive | V3Error_Transport | V3Error_Trap | V3Error_Unanchored | V3Error_UnhandledXcmVersion | V3Error_Unimplemented | V3Error_UnknownClaim | V3Error_Unroutable | V3Error_UntrustedReserveLocation | V3Error_UntrustedTeleportLocation | V3Error_VersionIncompatible | V3Error_WeightLimitReached | V3Error_WeightNotComputable + +export interface V3Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V3Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V3Error_Barrier { + __kind: 'Barrier' +} + +export interface V3Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V3Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V3Error_ExceedsStackLimit { + __kind: 'ExceedsStackLimit' +} + +export interface V3Error_ExpectationFalse { + __kind: 'ExpectationFalse' +} + +export interface V3Error_ExportError { + __kind: 'ExportError' +} + +export interface V3Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V3Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V3Error_FeesNotMet { + __kind: 'FeesNotMet' +} + +export interface V3Error_HoldingWouldOverflow { + __kind: 'HoldingWouldOverflow' +} + +export interface V3Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V3Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V3Error_LocationFull { + __kind: 'LocationFull' +} + +export interface V3Error_LocationNotInvertible { + __kind: 'LocationNotInvertible' +} + +export interface V3Error_LockError { + __kind: 'LockError' +} + +export interface V3Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V3Error_NameMismatch { + __kind: 'NameMismatch' +} + +export interface V3Error_NoDeal { + __kind: 'NoDeal' +} + +export interface V3Error_NoPermission { + __kind: 'NoPermission' +} + +export interface V3Error_NotDepositable { + __kind: 'NotDepositable' +} + +export interface V3Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V3Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V3Error_Overflow { + __kind: 'Overflow' +} + +export interface V3Error_PalletNotFound { + __kind: 'PalletNotFound' +} + +export interface V3Error_ReanchorFailed { + __kind: 'ReanchorFailed' +} + +export interface V3Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V3Error_Transport { + __kind: 'Transport' +} + +export interface V3Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V3Error_Unanchored { + __kind: 'Unanchored' +} + +export interface V3Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V3Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V3Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V3Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V3Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V3Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V3Error_VersionIncompatible { + __kind: 'VersionIncompatible' +} + +export interface V3Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: Weight +} + +export interface V3Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V3MaybeErrorCode = V3MaybeErrorCode_Error | V3MaybeErrorCode_Success | V3MaybeErrorCode_TruncatedError + +export interface V3MaybeErrorCode_Error { + __kind: 'Error' + value: Bytes +} + +export interface V3MaybeErrorCode_Success { + __kind: 'Success' +} + +export interface V3MaybeErrorCode_TruncatedError { + __kind: 'TruncatedError' + value: Bytes +} + +export interface V4Asset { + id: V4AssetId + fun: V4Fungibility +} + +export type V4Fungibility = V4Fungibility_Fungible | V4Fungibility_NonFungible + +export interface V4Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V4Fungibility_NonFungible { + __kind: 'NonFungible' + value: V4AssetInstance +} + +export type V4AssetInstance = V4AssetInstance_Array16 | V4AssetInstance_Array32 | V4AssetInstance_Array4 | V4AssetInstance_Array8 | V4AssetInstance_Index | V4AssetInstance_Undefined + +export interface V4AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V4AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V4AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V4AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V4AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V4AssetInstance_Undefined { + __kind: 'Undefined' +} + +export const V4QueryResponseInfo: sts.Type = sts.struct(() => { + return { + destination: V4Location, + queryId: sts.bigint(), + maxWeight: Weight, + } +}) + +export interface V4QueryResponseInfo { + destination: V4Location + queryId: bigint + maxWeight: Weight +} + +export const V3MaybeErrorCode: sts.Type = sts.closedEnum(() => { + return { + Error: sts.bytes(), + Success: sts.unit(), + TruncatedError: sts.bytes(), + } +}) + +export const V3Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + ExceedsStackLimit: sts.unit(), + ExpectationFalse: sts.unit(), + ExportError: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + FeesNotMet: sts.unit(), + HoldingWouldOverflow: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + LocationFull: sts.unit(), + LocationNotInvertible: sts.unit(), + LockError: sts.unit(), + MaxWeightInvalid: sts.unit(), + NameMismatch: sts.unit(), + NoDeal: sts.unit(), + NoPermission: sts.unit(), + NotDepositable: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + PalletNotFound: sts.unit(), + ReanchorFailed: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + Unanchored: sts.unit(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + VersionIncompatible: sts.unit(), + WeightLimitReached: Weight, + WeightNotComputable: sts.unit(), + } +}) + +export const V4AssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V4Asset), + Wild: V4WildAsset, + } +}) + +export const V4WildAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllCounted: sts.number(), + AllOf: sts.enumStruct({ + id: V4AssetId, + fun: V4WildFungibility, + }), + AllOfCounted: sts.enumStruct({ + id: V4AssetId, + fun: V4WildFungibility, + count: sts.number(), + }), + } +}) + +export const V4WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V4WildFungibility = V4WildFungibility_Fungible | V4WildFungibility_NonFungible + +export interface V4WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V4WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export type V4WildAsset = V4WildAsset_All | V4WildAsset_AllCounted | V4WildAsset_AllOf | V4WildAsset_AllOfCounted + +export interface V4WildAsset_All { + __kind: 'All' +} + +export interface V4WildAsset_AllCounted { + __kind: 'AllCounted' + value: number +} + +export interface V4WildAsset_AllOf { + __kind: 'AllOf' + id: V4AssetId + fun: V4WildFungibility +} + +export interface V4WildAsset_AllOfCounted { + __kind: 'AllOfCounted' + id: V4AssetId + fun: V4WildFungibility + count: number +} + +export type V4AssetFilter = V4AssetFilter_Definite | V4AssetFilter_Wild + +export interface V4AssetFilter_Definite { + __kind: 'Definite' + value: V4Asset[] +} + +export interface V4AssetFilter_Wild { + __kind: 'Wild' + value: V4WildAsset +} + +export const V4Asset: sts.Type = sts.struct(() => { + return { + id: V4AssetId, + fun: V4Fungibility, + } +}) + +export const V4Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V4AssetInstance, + } +}) + +export const V4AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V4Instruction = V4Instruction_AliasOrigin | V4Instruction_BurnAsset | V4Instruction_BuyExecution | V4Instruction_ClaimAsset | V4Instruction_ClearError | V4Instruction_ClearOrigin | V4Instruction_ClearTopic | V4Instruction_ClearTransactStatus | V4Instruction_DepositAsset | V4Instruction_DepositReserveAsset | V4Instruction_DescendOrigin | V4Instruction_ExchangeAsset | V4Instruction_ExpectAsset | V4Instruction_ExpectError | V4Instruction_ExpectOrigin | V4Instruction_ExpectPallet | V4Instruction_ExpectTransactStatus | V4Instruction_ExportMessage | V4Instruction_HrmpChannelAccepted | V4Instruction_HrmpChannelClosing | V4Instruction_HrmpNewChannelOpenRequest | V4Instruction_InitiateReserveWithdraw | V4Instruction_InitiateTeleport | V4Instruction_LockAsset | V4Instruction_NoteUnlockable | V4Instruction_QueryPallet | V4Instruction_QueryResponse | V4Instruction_ReceiveTeleportedAsset | V4Instruction_RefundSurplus | V4Instruction_ReportError | V4Instruction_ReportHolding | V4Instruction_ReportTransactStatus | V4Instruction_RequestUnlock | V4Instruction_ReserveAssetDeposited | V4Instruction_SetAppendix | V4Instruction_SetErrorHandler | V4Instruction_SetFeesMode | V4Instruction_SetTopic | V4Instruction_SubscribeVersion | V4Instruction_Transact | V4Instruction_TransferAsset | V4Instruction_TransferReserveAsset | V4Instruction_Trap | V4Instruction_UniversalOrigin | V4Instruction_UnlockAsset | V4Instruction_UnpaidExecution | V4Instruction_UnsubscribeVersion | V4Instruction_WithdrawAsset + +export interface V4Instruction_AliasOrigin { + __kind: 'AliasOrigin' + value: V4Location +} + +export interface V4Instruction_BurnAsset { + __kind: 'BurnAsset' + value: V4Asset[] +} + +export interface V4Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V4Asset + weightLimit: V3WeightLimit +} + +export interface V4Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V4Asset[] + ticket: V4Location +} + +export interface V4Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V4Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V4Instruction_ClearTopic { + __kind: 'ClearTopic' +} + +export interface V4Instruction_ClearTransactStatus { + __kind: 'ClearTransactStatus' +} + +export interface V4Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V4AssetFilter + beneficiary: V4Location +} + +export interface V4Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V4AssetFilter + dest: V4Location + xcm: V4Instruction[] +} + +export interface V4Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V4Junctions +} + +export interface V4Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V4AssetFilter + want: V4Asset[] + maximal: boolean +} + +export interface V4Instruction_ExpectAsset { + __kind: 'ExpectAsset' + value: V4Asset[] +} + +export interface V4Instruction_ExpectError { + __kind: 'ExpectError' + value?: ([number, V3Error] | undefined) +} + +export interface V4Instruction_ExpectOrigin { + __kind: 'ExpectOrigin' + value?: (V4Location | undefined) +} + +export interface V4Instruction_ExpectPallet { + __kind: 'ExpectPallet' + index: number + name: Bytes + moduleName: Bytes + crateMajor: number + minCrateMinor: number +} + +export interface V4Instruction_ExpectTransactStatus { + __kind: 'ExpectTransactStatus' + value: V3MaybeErrorCode +} + +export interface V4Instruction_ExportMessage { + __kind: 'ExportMessage' + network: V4NetworkId + destination: V4Junctions + xcm: V4Instruction[] +} + +export interface V4Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V4Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V4Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V4Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V4AssetFilter + reserve: V4Location + xcm: V4Instruction[] +} + +export interface V4Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V4AssetFilter + dest: V4Location + xcm: V4Instruction[] +} + +export interface V4Instruction_LockAsset { + __kind: 'LockAsset' + asset: V4Asset + unlocker: V4Location +} + +export interface V4Instruction_NoteUnlockable { + __kind: 'NoteUnlockable' + asset: V4Asset + owner: V4Location +} + +export interface V4Instruction_QueryPallet { + __kind: 'QueryPallet' + moduleName: Bytes + responseInfo: V4QueryResponseInfo +} + +export interface V4Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V4Response + maxWeight: Weight + querier?: (V4Location | undefined) +} + +export interface V4Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V4Asset[] +} + +export interface V4Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V4Instruction_ReportError { + __kind: 'ReportError' + value: V4QueryResponseInfo +} + +export interface V4Instruction_ReportHolding { + __kind: 'ReportHolding' + responseInfo: V4QueryResponseInfo + assets: V4AssetFilter +} + +export interface V4Instruction_ReportTransactStatus { + __kind: 'ReportTransactStatus' + value: V4QueryResponseInfo +} + +export interface V4Instruction_RequestUnlock { + __kind: 'RequestUnlock' + asset: V4Asset + locker: V4Location +} + +export interface V4Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V4Asset[] +} + +export interface V4Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V4Instruction[] +} + +export interface V4Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V4Instruction[] +} + +export interface V4Instruction_SetFeesMode { + __kind: 'SetFeesMode' + jitWithdraw: boolean +} + +export interface V4Instruction_SetTopic { + __kind: 'SetTopic' + value: Bytes +} + +export interface V4Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: Weight +} + +export interface V4Instruction_Transact { + __kind: 'Transact' + originKind: V3OriginKind + requireWeightAtMost: Weight + call: DoubleEncoded +} + +export interface V4Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V4Asset[] + beneficiary: V4Location +} + +export interface V4Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V4Asset[] + dest: V4Location + xcm: V4Instruction[] +} + +export interface V4Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V4Instruction_UniversalOrigin { + __kind: 'UniversalOrigin' + value: V4Junction +} + +export interface V4Instruction_UnlockAsset { + __kind: 'UnlockAsset' + asset: V4Asset + target: V4Location +} + +export interface V4Instruction_UnpaidExecution { + __kind: 'UnpaidExecution' + weightLimit: V3WeightLimit + checkOrigin?: (V4Location | undefined) +} + +export interface V4Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V4Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V4Asset[] +} + +export type V3WeightLimit = V3WeightLimit_Limited | V3WeightLimit_Unlimited + +export interface V3WeightLimit_Limited { + __kind: 'Limited' + value: Weight +} + +export interface V3WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V3Instruction: sts.Type = sts.closedEnum(() => { + return { + AliasOrigin: V3MultiLocation, + BurnAsset: sts.array(() => V3MultiAsset), + BuyExecution: sts.enumStruct({ + fees: V3MultiAsset, + weightLimit: V3WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + ticket: V3MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + ClearTopic: sts.unit(), + ClearTransactStatus: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + beneficiary: V3MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + DescendOrigin: V3Junctions, + ExchangeAsset: sts.enumStruct({ + give: V3MultiAssetFilter, + want: sts.array(() => V3MultiAsset), + maximal: sts.boolean(), + }), + ExpectAsset: sts.array(() => V3MultiAsset), + ExpectError: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + ExpectOrigin: sts.option(() => V3MultiLocation), + ExpectPallet: sts.enumStruct({ + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + crateMajor: sts.number(), + minCrateMinor: sts.number(), + }), + ExpectTransactStatus: V3MaybeErrorCode, + ExportMessage: sts.enumStruct({ + network: V3NetworkId, + destination: V3Junctions, + xcm: sts.array(() => V3Instruction), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V3MultiAssetFilter, + reserve: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + LockAsset: sts.enumStruct({ + asset: V3MultiAsset, + unlocker: V3MultiLocation, + }), + NoteUnlockable: sts.enumStruct({ + asset: V3MultiAsset, + owner: V3MultiLocation, + }), + QueryPallet: sts.enumStruct({ + moduleName: sts.bytes(), + responseInfo: V3QueryResponseInfo, + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V3Response, + maxWeight: Weight, + querier: sts.option(() => V3MultiLocation), + }), + ReceiveTeleportedAsset: sts.array(() => V3MultiAsset), + RefundSurplus: sts.unit(), + ReportError: V3QueryResponseInfo, + ReportHolding: sts.enumStruct({ + responseInfo: V3QueryResponseInfo, + assets: V3MultiAssetFilter, + }), + ReportTransactStatus: V3QueryResponseInfo, + RequestUnlock: sts.enumStruct({ + asset: V3MultiAsset, + locker: V3MultiLocation, + }), + ReserveAssetDeposited: sts.array(() => V3MultiAsset), + SetAppendix: sts.array(() => V3Instruction), + SetErrorHandler: sts.array(() => V3Instruction), + SetFeesMode: sts.enumStruct({ + jitWithdraw: sts.boolean(), + }), + SetTopic: sts.bytes(), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: Weight, + }), + Transact: sts.enumStruct({ + originKind: V3OriginKind, + requireWeightAtMost: Weight, + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + beneficiary: V3MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + Trap: sts.bigint(), + UniversalOrigin: V3Junction, + UnlockAsset: sts.enumStruct({ + asset: V3MultiAsset, + target: V3MultiLocation, + }), + UnpaidExecution: sts.enumStruct({ + weightLimit: V3WeightLimit, + checkOrigin: sts.option(() => V3MultiLocation), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V3MultiAsset), + } +}) + +export const V3Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V3MultiAsset), + DispatchResult: V3MaybeErrorCode, + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + Null: sts.unit(), + PalletsInfo: sts.array(() => V3PalletInfo), + Version: sts.number(), + } +}) + +export const V3PalletInfo: sts.Type = sts.struct(() => { + return { + index: sts.number(), + name: BoundedVec, + moduleName: BoundedVec, + major: sts.number(), + minor: sts.number(), + patch: sts.number(), + } +}) + +export const BoundedVec = sts.bytes() + +export interface V3PalletInfo { + index: number + name: BoundedVec + moduleName: BoundedVec + major: number + minor: number + patch: number +} + +export type BoundedVec = Bytes + +export type V3Response = V3Response_Assets | V3Response_DispatchResult | V3Response_ExecutionResult | V3Response_Null | V3Response_PalletsInfo | V3Response_Version + +export interface V3Response_Assets { + __kind: 'Assets' + value: V3MultiAsset[] +} + +export interface V3Response_DispatchResult { + __kind: 'DispatchResult' + value: V3MaybeErrorCode +} + +export interface V3Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V3Error] | undefined) +} + +export interface V3Response_Null { + __kind: 'Null' +} + +export interface V3Response_PalletsInfo { + __kind: 'PalletsInfo' + value: V3PalletInfo[] +} + +export interface V3Response_Version { + __kind: 'Version' + value: number +} + +export interface V3MultiAsset { + id: V3AssetId + fun: V3Fungibility +} + +export type V3Fungibility = V3Fungibility_Fungible | V3Fungibility_NonFungible + +export interface V3Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V3Fungibility_NonFungible { + __kind: 'NonFungible' + value: V3AssetInstance +} + +export type V3AssetInstance = V3AssetInstance_Array16 | V3AssetInstance_Array32 | V3AssetInstance_Array4 | V3AssetInstance_Array8 | V3AssetInstance_Index | V3AssetInstance_Undefined + +export interface V3AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V3AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V3AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V3AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V3AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V3AssetInstance_Undefined { + __kind: 'Undefined' +} + +export const V3QueryResponseInfo: sts.Type = sts.struct(() => { + return { + destination: V3MultiLocation, + queryId: sts.bigint(), + maxWeight: Weight, + } +}) + +export interface V3QueryResponseInfo { + destination: V3MultiLocation + queryId: bigint + maxWeight: Weight +} + +export const V3MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V3MultiAsset), + Wild: V3WildMultiAsset, + } +}) + +export const V3WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllCounted: sts.number(), + AllOf: sts.enumStruct({ + id: V3AssetId, + fun: V3WildFungibility, + }), + AllOfCounted: sts.enumStruct({ + id: V3AssetId, + fun: V3WildFungibility, + count: sts.number(), + }), + } +}) + +export const V3WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V3WildFungibility = V3WildFungibility_Fungible | V3WildFungibility_NonFungible + +export interface V3WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V3WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export type V3WildMultiAsset = V3WildMultiAsset_All | V3WildMultiAsset_AllCounted | V3WildMultiAsset_AllOf | V3WildMultiAsset_AllOfCounted + +export interface V3WildMultiAsset_All { + __kind: 'All' +} + +export interface V3WildMultiAsset_AllCounted { + __kind: 'AllCounted' + value: number +} + +export interface V3WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V3AssetId + fun: V3WildFungibility +} + +export interface V3WildMultiAsset_AllOfCounted { + __kind: 'AllOfCounted' + id: V3AssetId + fun: V3WildFungibility + count: number +} + +export type V3MultiAssetFilter = V3MultiAssetFilter_Definite | V3MultiAssetFilter_Wild + +export interface V3MultiAssetFilter_Definite { + __kind: 'Definite' + value: V3MultiAsset[] +} + +export interface V3MultiAssetFilter_Wild { + __kind: 'Wild' + value: V3WildMultiAsset +} + +export const V3MultiAsset: sts.Type = sts.struct(() => { + return { + id: V3AssetId, + fun: V3Fungibility, + } +}) + +export const V3Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V3AssetInstance, + } +}) + +export const V3AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V3Instruction = V3Instruction_AliasOrigin | V3Instruction_BurnAsset | V3Instruction_BuyExecution | V3Instruction_ClaimAsset | V3Instruction_ClearError | V3Instruction_ClearOrigin | V3Instruction_ClearTopic | V3Instruction_ClearTransactStatus | V3Instruction_DepositAsset | V3Instruction_DepositReserveAsset | V3Instruction_DescendOrigin | V3Instruction_ExchangeAsset | V3Instruction_ExpectAsset | V3Instruction_ExpectError | V3Instruction_ExpectOrigin | V3Instruction_ExpectPallet | V3Instruction_ExpectTransactStatus | V3Instruction_ExportMessage | V3Instruction_HrmpChannelAccepted | V3Instruction_HrmpChannelClosing | V3Instruction_HrmpNewChannelOpenRequest | V3Instruction_InitiateReserveWithdraw | V3Instruction_InitiateTeleport | V3Instruction_LockAsset | V3Instruction_NoteUnlockable | V3Instruction_QueryPallet | V3Instruction_QueryResponse | V3Instruction_ReceiveTeleportedAsset | V3Instruction_RefundSurplus | V3Instruction_ReportError | V3Instruction_ReportHolding | V3Instruction_ReportTransactStatus | V3Instruction_RequestUnlock | V3Instruction_ReserveAssetDeposited | V3Instruction_SetAppendix | V3Instruction_SetErrorHandler | V3Instruction_SetFeesMode | V3Instruction_SetTopic | V3Instruction_SubscribeVersion | V3Instruction_Transact | V3Instruction_TransferAsset | V3Instruction_TransferReserveAsset | V3Instruction_Trap | V3Instruction_UniversalOrigin | V3Instruction_UnlockAsset | V3Instruction_UnpaidExecution | V3Instruction_UnsubscribeVersion | V3Instruction_WithdrawAsset + +export interface V3Instruction_AliasOrigin { + __kind: 'AliasOrigin' + value: V3MultiLocation +} + +export interface V3Instruction_BurnAsset { + __kind: 'BurnAsset' + value: V3MultiAsset[] +} + +export interface V3Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V3MultiAsset + weightLimit: V3WeightLimit +} + +export interface V3Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V3MultiAsset[] + ticket: V3MultiLocation +} + +export interface V3Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V3Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V3Instruction_ClearTopic { + __kind: 'ClearTopic' +} + +export interface V3Instruction_ClearTransactStatus { + __kind: 'ClearTransactStatus' +} + +export interface V3Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V3MultiAssetFilter + beneficiary: V3MultiLocation +} + +export interface V3Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V3Junctions +} + +export interface V3Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V3MultiAssetFilter + want: V3MultiAsset[] + maximal: boolean +} + +export interface V3Instruction_ExpectAsset { + __kind: 'ExpectAsset' + value: V3MultiAsset[] +} + +export interface V3Instruction_ExpectError { + __kind: 'ExpectError' + value?: ([number, V3Error] | undefined) +} + +export interface V3Instruction_ExpectOrigin { + __kind: 'ExpectOrigin' + value?: (V3MultiLocation | undefined) +} + +export interface V3Instruction_ExpectPallet { + __kind: 'ExpectPallet' + index: number + name: Bytes + moduleName: Bytes + crateMajor: number + minCrateMinor: number +} + +export interface V3Instruction_ExpectTransactStatus { + __kind: 'ExpectTransactStatus' + value: V3MaybeErrorCode +} + +export interface V3Instruction_ExportMessage { + __kind: 'ExportMessage' + network: V3NetworkId + destination: V3Junctions + xcm: V3Instruction[] +} + +export interface V3Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V3Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V3Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V3Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V3MultiAssetFilter + reserve: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_LockAsset { + __kind: 'LockAsset' + asset: V3MultiAsset + unlocker: V3MultiLocation +} + +export interface V3Instruction_NoteUnlockable { + __kind: 'NoteUnlockable' + asset: V3MultiAsset + owner: V3MultiLocation +} + +export interface V3Instruction_QueryPallet { + __kind: 'QueryPallet' + moduleName: Bytes + responseInfo: V3QueryResponseInfo +} + +export interface V3Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V3Response + maxWeight: Weight + querier?: (V3MultiLocation | undefined) +} + +export interface V3Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V3MultiAsset[] +} + +export interface V3Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V3Instruction_ReportError { + __kind: 'ReportError' + value: V3QueryResponseInfo +} + +export interface V3Instruction_ReportHolding { + __kind: 'ReportHolding' + responseInfo: V3QueryResponseInfo + assets: V3MultiAssetFilter +} + +export interface V3Instruction_ReportTransactStatus { + __kind: 'ReportTransactStatus' + value: V3QueryResponseInfo +} + +export interface V3Instruction_RequestUnlock { + __kind: 'RequestUnlock' + asset: V3MultiAsset + locker: V3MultiLocation +} + +export interface V3Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V3MultiAsset[] +} + +export interface V3Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V3Instruction[] +} + +export interface V3Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V3Instruction[] +} + +export interface V3Instruction_SetFeesMode { + __kind: 'SetFeesMode' + jitWithdraw: boolean +} + +export interface V3Instruction_SetTopic { + __kind: 'SetTopic' + value: Bytes +} + +export interface V3Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: Weight +} + +export interface V3Instruction_Transact { + __kind: 'Transact' + originKind: V3OriginKind + requireWeightAtMost: Weight + call: DoubleEncoded +} + +export interface V3Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V3MultiAsset[] + beneficiary: V3MultiLocation +} + +export interface V3Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V3MultiAsset[] + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V3Instruction_UniversalOrigin { + __kind: 'UniversalOrigin' + value: V3Junction +} + +export interface V3Instruction_UnlockAsset { + __kind: 'UnlockAsset' + asset: V3MultiAsset + target: V3MultiLocation +} + +export interface V3Instruction_UnpaidExecution { + __kind: 'UnpaidExecution' + weightLimit: V3WeightLimit + checkOrigin?: (V3MultiLocation | undefined) +} + +export interface V3Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V3Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V3MultiAsset[] +} + +export const V2Instruction: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V2MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + ticket: V2MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V2MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V2Junctions, + ExchangeAsset: sts.enumStruct({ + give: V2MultiAssetFilter, + receive: sts.array(() => V2MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V2MultiAssetFilter, + reserve: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V2MultiAssetFilter, + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + assets: V2MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V2MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V2MultiAsset), + SetAppendix: sts.array(() => V2Instruction), + SetErrorHandler: sts.array(() => V2Instruction), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V2OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + beneficiary: V2MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V2MultiAsset), + } +}) + +export const V2OriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type V2OriginKind = V2OriginKind_Native | V2OriginKind_SovereignAccount | V2OriginKind_Superuser | V2OriginKind_Xcm + +export interface V2OriginKind_Native { + __kind: 'Native' +} + +export interface V2OriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface V2OriginKind_Superuser { + __kind: 'Superuser' +} + +export interface V2OriginKind_Xcm { + __kind: 'Xcm' +} + +export const V2Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V2MultiAsset), + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V2Error])), + Null: sts.unit(), + Version: sts.number(), + } +}) + +export const V2Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + MaxWeightInvalid: sts.unit(), + MultiLocationFull: sts.unit(), + MultiLocationNotInvertible: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + WeightLimitReached: sts.bigint(), + WeightNotComputable: sts.unit(), + } +}) + +export type V2Error = V2Error_AssetNotFound | V2Error_BadOrigin | V2Error_Barrier | V2Error_DestinationUnsupported | V2Error_ExceedsMaxMessageSize | V2Error_FailedToDecode | V2Error_FailedToTransactAsset | V2Error_InvalidLocation | V2Error_LocationCannotHold | V2Error_MaxWeightInvalid | V2Error_MultiLocationFull | V2Error_MultiLocationNotInvertible | V2Error_NotHoldingFees | V2Error_NotWithdrawable | V2Error_Overflow | V2Error_TooExpensive | V2Error_Transport | V2Error_Trap | V2Error_UnhandledXcmVersion | V2Error_Unimplemented | V2Error_UnknownClaim | V2Error_Unroutable | V2Error_UntrustedReserveLocation | V2Error_UntrustedTeleportLocation | V2Error_WeightLimitReached | V2Error_WeightNotComputable + +export interface V2Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V2Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V2Error_Barrier { + __kind: 'Barrier' +} + +export interface V2Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V2Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V2Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V2Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V2Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V2Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V2Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V2Error_MultiLocationFull { + __kind: 'MultiLocationFull' +} + +export interface V2Error_MultiLocationNotInvertible { + __kind: 'MultiLocationNotInvertible' +} + +export interface V2Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V2Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V2Error_Overflow { + __kind: 'Overflow' +} + +export interface V2Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V2Error_Transport { + __kind: 'Transport' +} + +export interface V2Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V2Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V2Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V2Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V2Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V2Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V2Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: bigint +} + +export interface V2Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V2Response = V2Response_Assets | V2Response_ExecutionResult | V2Response_Null | V2Response_Version + +export interface V2Response_Assets { + __kind: 'Assets' + value: V2MultiAsset[] +} + +export interface V2Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V2Error] | undefined) +} + +export interface V2Response_Null { + __kind: 'Null' +} + +export interface V2Response_Version { + __kind: 'Version' + value: number +} + +export interface V2MultiAsset { + id: V2AssetId + fun: V2Fungibility +} + +export type V2Fungibility = V2Fungibility_Fungible | V2Fungibility_NonFungible + +export interface V2Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V2Fungibility_NonFungible { + __kind: 'NonFungible' + value: V2AssetInstance +} + +export type V2AssetInstance = V2AssetInstance_Array16 | V2AssetInstance_Array32 | V2AssetInstance_Array4 | V2AssetInstance_Array8 | V2AssetInstance_Blob | V2AssetInstance_Index | V2AssetInstance_Undefined + +export interface V2AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V2AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V2AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V2AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V2AssetInstance_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface V2AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V2AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V2AssetId = V2AssetId_Abstract | V2AssetId_Concrete + +export interface V2AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V2AssetId_Concrete { + __kind: 'Concrete' + value: V2MultiLocation +} + +export const V2Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V2Junction, + X2: sts.tuple(() => [V2Junction, V2Junction]), + X3: sts.tuple(() => [V2Junction, V2Junction, V2Junction]), + X4: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction]), + X5: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + X6: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + X7: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + X8: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + } +}) + +export const V2Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V2NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V2NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V2NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: WeakBoundedVec, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V2BodyId, + part: V2BodyPart, + }), + } +}) + +export const V2BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export const V2BodyId: sts.Type = sts.closedEnum(() => { + return { + Administration: sts.unit(), + Defense: sts.unit(), + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: WeakBoundedVec, + Technical: sts.unit(), + Treasury: sts.unit(), + Unit: sts.unit(), + } +}) + +export const WeakBoundedVec = sts.bytes() + +export const V2NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: WeakBoundedVec, + Polkadot: sts.unit(), + } +}) + +export const V2MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V2MultiAsset), + Wild: V2WildMultiAsset, + } +}) + +export const V2WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllOf: sts.enumStruct({ + id: V2AssetId, + fun: V2WildFungibility, + }), + } +}) + +export const V2WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V2WildFungibility = V2WildFungibility_Fungible | V2WildFungibility_NonFungible + +export interface V2WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V2WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V2AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V2MultiLocation, + } +}) + +export type V2WildMultiAsset = V2WildMultiAsset_All | V2WildMultiAsset_AllOf + +export interface V2WildMultiAsset_All { + __kind: 'All' +} + +export interface V2WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V2AssetId + fun: V2WildFungibility +} + +export type V2MultiAssetFilter = V2MultiAssetFilter_Definite | V2MultiAssetFilter_Wild + +export interface V2MultiAssetFilter_Definite { + __kind: 'Definite' + value: V2MultiAsset[] +} + +export interface V2MultiAssetFilter_Wild { + __kind: 'Wild' + value: V2WildMultiAsset +} + +export const V2MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V2Junctions, + } +}) + +export const V2WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: sts.bigint(), + Unlimited: sts.unit(), + } +}) + +export type V2WeightLimit = V2WeightLimit_Limited | V2WeightLimit_Unlimited + +export interface V2WeightLimit_Limited { + __kind: 'Limited' + value: bigint +} + +export interface V2WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V2MultiAsset: sts.Type = sts.struct(() => { + return { + id: V2AssetId, + fun: V2Fungibility, + } +}) + +export const V2Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V2AssetInstance, + } +}) + +export const V2AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V2Instruction = V2Instruction_BuyExecution | V2Instruction_ClaimAsset | V2Instruction_ClearError | V2Instruction_ClearOrigin | V2Instruction_DepositAsset | V2Instruction_DepositReserveAsset | V2Instruction_DescendOrigin | V2Instruction_ExchangeAsset | V2Instruction_HrmpChannelAccepted | V2Instruction_HrmpChannelClosing | V2Instruction_HrmpNewChannelOpenRequest | V2Instruction_InitiateReserveWithdraw | V2Instruction_InitiateTeleport | V2Instruction_QueryHolding | V2Instruction_QueryResponse | V2Instruction_ReceiveTeleportedAsset | V2Instruction_RefundSurplus | V2Instruction_ReportError | V2Instruction_ReserveAssetDeposited | V2Instruction_SetAppendix | V2Instruction_SetErrorHandler | V2Instruction_SubscribeVersion | V2Instruction_Transact | V2Instruction_TransferAsset | V2Instruction_TransferReserveAsset | V2Instruction_Trap | V2Instruction_UnsubscribeVersion | V2Instruction_WithdrawAsset + +export interface V2Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V2MultiAsset + weightLimit: V2WeightLimit +} + +export interface V2Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V2MultiAsset[] + ticket: V2MultiLocation +} + +export interface V2Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V2Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V2Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V2MultiAssetFilter + maxAssets: number + beneficiary: V2MultiLocation +} + +export interface V2Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V2MultiAssetFilter + maxAssets: number + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V2Junctions +} + +export interface V2Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V2MultiAssetFilter + receive: V2MultiAsset[] +} + +export interface V2Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V2Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V2Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V2Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V2MultiAssetFilter + reserve: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V2MultiAssetFilter + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V2MultiLocation + assets: V2MultiAssetFilter + maxResponseWeight: bigint +} + +export interface V2Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface V2Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V2MultiAsset[] +} + +export interface V2Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V2Instruction_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V2MultiLocation + maxResponseWeight: bigint +} + +export interface V2Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V2MultiAsset[] +} + +export interface V2Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V2Instruction[] +} + +export interface V2Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V2Instruction[] +} + +export interface V2Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V2Instruction_Transact { + __kind: 'Transact' + originType: V2OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V2Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V2MultiAsset[] + beneficiary: V2MultiLocation +} + +export interface V2Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V2MultiAsset[] + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V2Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V2MultiAsset[] +} + +export type VersionedXcm = VersionedXcm_V2 | VersionedXcm_V3 | VersionedXcm_V4 + +export interface VersionedXcm_V2 { + __kind: 'V2' + value: V2Instruction[] +} + +export interface VersionedXcm_V3 { + __kind: 'V3' + value: V3Instruction[] +} + +export interface VersionedXcm_V4 { + __kind: 'V4' + value: V4Instruction[] +} + +export const V3WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: Weight, + Unlimited: sts.unit(), + } +}) + +export const V4Location: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V4Junctions, + } +}) + +export const Type_439: sts.Type = sts.closedEnum(() => { + return { + V2: sts.array(() => Type_442), + V3: sts.array(() => Type_446), + V4: sts.array(() => Type_449), + } +}) + +export const Type_449: sts.Type = sts.closedEnum(() => { + return { + AliasOrigin: V4Location, + BurnAsset: sts.array(() => V4Asset), + BuyExecution: sts.enumStruct({ + fees: V4Asset, + weightLimit: V3WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V4Asset), + ticket: V4Location, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + ClearTopic: sts.unit(), + ClearTransactStatus: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V4AssetFilter, + beneficiary: V4Location, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V4AssetFilter, + dest: V4Location, + xcm: sts.array(() => V4Instruction), + }), + DescendOrigin: V4Junctions, + ExchangeAsset: sts.enumStruct({ + give: V4AssetFilter, + want: sts.array(() => V4Asset), + maximal: sts.boolean(), + }), + ExpectAsset: sts.array(() => V4Asset), + ExpectError: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + ExpectOrigin: sts.option(() => V4Location), + ExpectPallet: sts.enumStruct({ + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + crateMajor: sts.number(), + minCrateMinor: sts.number(), + }), + ExpectTransactStatus: V3MaybeErrorCode, + ExportMessage: sts.enumStruct({ + network: V4NetworkId, + destination: V4Junctions, + xcm: sts.array(() => V4Instruction), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V4AssetFilter, + reserve: V4Location, + xcm: sts.array(() => V4Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V4AssetFilter, + dest: V4Location, + xcm: sts.array(() => V4Instruction), + }), + LockAsset: sts.enumStruct({ + asset: V4Asset, + unlocker: V4Location, + }), + NoteUnlockable: sts.enumStruct({ + asset: V4Asset, + owner: V4Location, + }), + QueryPallet: sts.enumStruct({ + moduleName: sts.bytes(), + responseInfo: V4QueryResponseInfo, + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V4Response, + maxWeight: Weight, + querier: sts.option(() => V4Location), + }), + ReceiveTeleportedAsset: sts.array(() => V4Asset), + RefundSurplus: sts.unit(), + ReportError: V4QueryResponseInfo, + ReportHolding: sts.enumStruct({ + responseInfo: V4QueryResponseInfo, + assets: V4AssetFilter, + }), + ReportTransactStatus: V4QueryResponseInfo, + RequestUnlock: sts.enumStruct({ + asset: V4Asset, + locker: V4Location, + }), + ReserveAssetDeposited: sts.array(() => V4Asset), + SetAppendix: sts.array(() => Type_449), + SetErrorHandler: sts.array(() => Type_449), + SetFeesMode: sts.enumStruct({ + jitWithdraw: sts.boolean(), + }), + SetTopic: sts.bytes(), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: Weight, + }), + Transact: sts.enumStruct({ + originKind: V3OriginKind, + requireWeightAtMost: Weight, + call: Type_443, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V4Asset), + beneficiary: V4Location, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V4Asset), + dest: V4Location, + xcm: sts.array(() => V4Instruction), + }), + Trap: sts.bigint(), + UniversalOrigin: V4Junction, + UnlockAsset: sts.enumStruct({ + asset: V4Asset, + target: V4Location, + }), + UnpaidExecution: sts.enumStruct({ + weightLimit: V3WeightLimit, + checkOrigin: sts.option(() => V4Location), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V4Asset), + } +}) + +export const Type_443: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface Type_443 { + encoded: Bytes +} + +export type Type_449 = Type_449_AliasOrigin | Type_449_BurnAsset | Type_449_BuyExecution | Type_449_ClaimAsset | Type_449_ClearError | Type_449_ClearOrigin | Type_449_ClearTopic | Type_449_ClearTransactStatus | Type_449_DepositAsset | Type_449_DepositReserveAsset | Type_449_DescendOrigin | Type_449_ExchangeAsset | Type_449_ExpectAsset | Type_449_ExpectError | Type_449_ExpectOrigin | Type_449_ExpectPallet | Type_449_ExpectTransactStatus | Type_449_ExportMessage | Type_449_HrmpChannelAccepted | Type_449_HrmpChannelClosing | Type_449_HrmpNewChannelOpenRequest | Type_449_InitiateReserveWithdraw | Type_449_InitiateTeleport | Type_449_LockAsset | Type_449_NoteUnlockable | Type_449_QueryPallet | Type_449_QueryResponse | Type_449_ReceiveTeleportedAsset | Type_449_RefundSurplus | Type_449_ReportError | Type_449_ReportHolding | Type_449_ReportTransactStatus | Type_449_RequestUnlock | Type_449_ReserveAssetDeposited | Type_449_SetAppendix | Type_449_SetErrorHandler | Type_449_SetFeesMode | Type_449_SetTopic | Type_449_SubscribeVersion | Type_449_Transact | Type_449_TransferAsset | Type_449_TransferReserveAsset | Type_449_Trap | Type_449_UniversalOrigin | Type_449_UnlockAsset | Type_449_UnpaidExecution | Type_449_UnsubscribeVersion | Type_449_WithdrawAsset + +export interface Type_449_AliasOrigin { + __kind: 'AliasOrigin' + value: V4Location +} + +export interface Type_449_BurnAsset { + __kind: 'BurnAsset' + value: V4Asset[] +} + +export interface Type_449_BuyExecution { + __kind: 'BuyExecution' + fees: V4Asset + weightLimit: V3WeightLimit +} + +export interface Type_449_ClaimAsset { + __kind: 'ClaimAsset' + assets: V4Asset[] + ticket: V4Location +} + +export interface Type_449_ClearError { + __kind: 'ClearError' +} + +export interface Type_449_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_449_ClearTopic { + __kind: 'ClearTopic' +} + +export interface Type_449_ClearTransactStatus { + __kind: 'ClearTransactStatus' +} + +export interface Type_449_DepositAsset { + __kind: 'DepositAsset' + assets: V4AssetFilter + beneficiary: V4Location +} + +export interface Type_449_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V4AssetFilter + dest: V4Location + xcm: V4Instruction[] +} + +export interface Type_449_DescendOrigin { + __kind: 'DescendOrigin' + value: V4Junctions +} + +export interface Type_449_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V4AssetFilter + want: V4Asset[] + maximal: boolean +} + +export interface Type_449_ExpectAsset { + __kind: 'ExpectAsset' + value: V4Asset[] +} + +export interface Type_449_ExpectError { + __kind: 'ExpectError' + value?: ([number, V3Error] | undefined) +} + +export interface Type_449_ExpectOrigin { + __kind: 'ExpectOrigin' + value?: (V4Location | undefined) +} + +export interface Type_449_ExpectPallet { + __kind: 'ExpectPallet' + index: number + name: Bytes + moduleName: Bytes + crateMajor: number + minCrateMinor: number +} + +export interface Type_449_ExpectTransactStatus { + __kind: 'ExpectTransactStatus' + value: V3MaybeErrorCode +} + +export interface Type_449_ExportMessage { + __kind: 'ExportMessage' + network: V4NetworkId + destination: V4Junctions + xcm: V4Instruction[] +} + +export interface Type_449_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_449_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_449_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_449_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V4AssetFilter + reserve: V4Location + xcm: V4Instruction[] +} + +export interface Type_449_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V4AssetFilter + dest: V4Location + xcm: V4Instruction[] +} + +export interface Type_449_LockAsset { + __kind: 'LockAsset' + asset: V4Asset + unlocker: V4Location +} + +export interface Type_449_NoteUnlockable { + __kind: 'NoteUnlockable' + asset: V4Asset + owner: V4Location +} + +export interface Type_449_QueryPallet { + __kind: 'QueryPallet' + moduleName: Bytes + responseInfo: V4QueryResponseInfo +} + +export interface Type_449_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V4Response + maxWeight: Weight + querier?: (V4Location | undefined) +} + +export interface Type_449_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V4Asset[] +} + +export interface Type_449_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_449_ReportError { + __kind: 'ReportError' + value: V4QueryResponseInfo +} + +export interface Type_449_ReportHolding { + __kind: 'ReportHolding' + responseInfo: V4QueryResponseInfo + assets: V4AssetFilter +} + +export interface Type_449_ReportTransactStatus { + __kind: 'ReportTransactStatus' + value: V4QueryResponseInfo +} + +export interface Type_449_RequestUnlock { + __kind: 'RequestUnlock' + asset: V4Asset + locker: V4Location +} + +export interface Type_449_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V4Asset[] +} + +export interface Type_449_SetAppendix { + __kind: 'SetAppendix' + value: Type_449[] +} + +export interface Type_449_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_449[] +} + +export interface Type_449_SetFeesMode { + __kind: 'SetFeesMode' + jitWithdraw: boolean +} + +export interface Type_449_SetTopic { + __kind: 'SetTopic' + value: Bytes +} + +export interface Type_449_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: Weight +} + +export interface Type_449_Transact { + __kind: 'Transact' + originKind: V3OriginKind + requireWeightAtMost: Weight + call: Type_443 +} + +export interface Type_449_TransferAsset { + __kind: 'TransferAsset' + assets: V4Asset[] + beneficiary: V4Location +} + +export interface Type_449_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V4Asset[] + dest: V4Location + xcm: V4Instruction[] +} + +export interface Type_449_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_449_UniversalOrigin { + __kind: 'UniversalOrigin' + value: V4Junction +} + +export interface Type_449_UnlockAsset { + __kind: 'UnlockAsset' + asset: V4Asset + target: V4Location +} + +export interface Type_449_UnpaidExecution { + __kind: 'UnpaidExecution' + weightLimit: V3WeightLimit + checkOrigin?: (V4Location | undefined) +} + +export interface Type_449_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_449_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V4Asset[] +} + +export const Type_446: sts.Type = sts.closedEnum(() => { + return { + AliasOrigin: V3MultiLocation, + BurnAsset: sts.array(() => V3MultiAsset), + BuyExecution: sts.enumStruct({ + fees: V3MultiAsset, + weightLimit: V3WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + ticket: V3MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + ClearTopic: sts.unit(), + ClearTransactStatus: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + beneficiary: V3MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + DescendOrigin: V3Junctions, + ExchangeAsset: sts.enumStruct({ + give: V3MultiAssetFilter, + want: sts.array(() => V3MultiAsset), + maximal: sts.boolean(), + }), + ExpectAsset: sts.array(() => V3MultiAsset), + ExpectError: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + ExpectOrigin: sts.option(() => V3MultiLocation), + ExpectPallet: sts.enumStruct({ + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + crateMajor: sts.number(), + minCrateMinor: sts.number(), + }), + ExpectTransactStatus: V3MaybeErrorCode, + ExportMessage: sts.enumStruct({ + network: V3NetworkId, + destination: V3Junctions, + xcm: sts.array(() => V3Instruction), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V3MultiAssetFilter, + reserve: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + LockAsset: sts.enumStruct({ + asset: V3MultiAsset, + unlocker: V3MultiLocation, + }), + NoteUnlockable: sts.enumStruct({ + asset: V3MultiAsset, + owner: V3MultiLocation, + }), + QueryPallet: sts.enumStruct({ + moduleName: sts.bytes(), + responseInfo: V3QueryResponseInfo, + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V3Response, + maxWeight: Weight, + querier: sts.option(() => V3MultiLocation), + }), + ReceiveTeleportedAsset: sts.array(() => V3MultiAsset), + RefundSurplus: sts.unit(), + ReportError: V3QueryResponseInfo, + ReportHolding: sts.enumStruct({ + responseInfo: V3QueryResponseInfo, + assets: V3MultiAssetFilter, + }), + ReportTransactStatus: V3QueryResponseInfo, + RequestUnlock: sts.enumStruct({ + asset: V3MultiAsset, + locker: V3MultiLocation, + }), + ReserveAssetDeposited: sts.array(() => V3MultiAsset), + SetAppendix: sts.array(() => Type_446), + SetErrorHandler: sts.array(() => Type_446), + SetFeesMode: sts.enumStruct({ + jitWithdraw: sts.boolean(), + }), + SetTopic: sts.bytes(), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: Weight, + }), + Transact: sts.enumStruct({ + originKind: V3OriginKind, + requireWeightAtMost: Weight, + call: Type_443, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + beneficiary: V3MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + Trap: sts.bigint(), + UniversalOrigin: V3Junction, + UnlockAsset: sts.enumStruct({ + asset: V3MultiAsset, + target: V3MultiLocation, + }), + UnpaidExecution: sts.enumStruct({ + weightLimit: V3WeightLimit, + checkOrigin: sts.option(() => V3MultiLocation), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V3MultiAsset), + } +}) + +export type Type_446 = Type_446_AliasOrigin | Type_446_BurnAsset | Type_446_BuyExecution | Type_446_ClaimAsset | Type_446_ClearError | Type_446_ClearOrigin | Type_446_ClearTopic | Type_446_ClearTransactStatus | Type_446_DepositAsset | Type_446_DepositReserveAsset | Type_446_DescendOrigin | Type_446_ExchangeAsset | Type_446_ExpectAsset | Type_446_ExpectError | Type_446_ExpectOrigin | Type_446_ExpectPallet | Type_446_ExpectTransactStatus | Type_446_ExportMessage | Type_446_HrmpChannelAccepted | Type_446_HrmpChannelClosing | Type_446_HrmpNewChannelOpenRequest | Type_446_InitiateReserveWithdraw | Type_446_InitiateTeleport | Type_446_LockAsset | Type_446_NoteUnlockable | Type_446_QueryPallet | Type_446_QueryResponse | Type_446_ReceiveTeleportedAsset | Type_446_RefundSurplus | Type_446_ReportError | Type_446_ReportHolding | Type_446_ReportTransactStatus | Type_446_RequestUnlock | Type_446_ReserveAssetDeposited | Type_446_SetAppendix | Type_446_SetErrorHandler | Type_446_SetFeesMode | Type_446_SetTopic | Type_446_SubscribeVersion | Type_446_Transact | Type_446_TransferAsset | Type_446_TransferReserveAsset | Type_446_Trap | Type_446_UniversalOrigin | Type_446_UnlockAsset | Type_446_UnpaidExecution | Type_446_UnsubscribeVersion | Type_446_WithdrawAsset + +export interface Type_446_AliasOrigin { + __kind: 'AliasOrigin' + value: V3MultiLocation +} + +export interface Type_446_BurnAsset { + __kind: 'BurnAsset' + value: V3MultiAsset[] +} + +export interface Type_446_BuyExecution { + __kind: 'BuyExecution' + fees: V3MultiAsset + weightLimit: V3WeightLimit +} + +export interface Type_446_ClaimAsset { + __kind: 'ClaimAsset' + assets: V3MultiAsset[] + ticket: V3MultiLocation +} + +export interface Type_446_ClearError { + __kind: 'ClearError' +} + +export interface Type_446_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_446_ClearTopic { + __kind: 'ClearTopic' +} + +export interface Type_446_ClearTransactStatus { + __kind: 'ClearTransactStatus' +} + +export interface Type_446_DepositAsset { + __kind: 'DepositAsset' + assets: V3MultiAssetFilter + beneficiary: V3MultiLocation +} + +export interface Type_446_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_446_DescendOrigin { + __kind: 'DescendOrigin' + value: V3Junctions +} + +export interface Type_446_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V3MultiAssetFilter + want: V3MultiAsset[] + maximal: boolean +} + +export interface Type_446_ExpectAsset { + __kind: 'ExpectAsset' + value: V3MultiAsset[] +} + +export interface Type_446_ExpectError { + __kind: 'ExpectError' + value?: ([number, V3Error] | undefined) +} + +export interface Type_446_ExpectOrigin { + __kind: 'ExpectOrigin' + value?: (V3MultiLocation | undefined) +} + +export interface Type_446_ExpectPallet { + __kind: 'ExpectPallet' + index: number + name: Bytes + moduleName: Bytes + crateMajor: number + minCrateMinor: number +} + +export interface Type_446_ExpectTransactStatus { + __kind: 'ExpectTransactStatus' + value: V3MaybeErrorCode +} + +export interface Type_446_ExportMessage { + __kind: 'ExportMessage' + network: V3NetworkId + destination: V3Junctions + xcm: V3Instruction[] +} + +export interface Type_446_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_446_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_446_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_446_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V3MultiAssetFilter + reserve: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_446_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_446_LockAsset { + __kind: 'LockAsset' + asset: V3MultiAsset + unlocker: V3MultiLocation +} + +export interface Type_446_NoteUnlockable { + __kind: 'NoteUnlockable' + asset: V3MultiAsset + owner: V3MultiLocation +} + +export interface Type_446_QueryPallet { + __kind: 'QueryPallet' + moduleName: Bytes + responseInfo: V3QueryResponseInfo +} + +export interface Type_446_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V3Response + maxWeight: Weight + querier?: (V3MultiLocation | undefined) +} + +export interface Type_446_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V3MultiAsset[] +} + +export interface Type_446_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_446_ReportError { + __kind: 'ReportError' + value: V3QueryResponseInfo +} + +export interface Type_446_ReportHolding { + __kind: 'ReportHolding' + responseInfo: V3QueryResponseInfo + assets: V3MultiAssetFilter +} + +export interface Type_446_ReportTransactStatus { + __kind: 'ReportTransactStatus' + value: V3QueryResponseInfo +} + +export interface Type_446_RequestUnlock { + __kind: 'RequestUnlock' + asset: V3MultiAsset + locker: V3MultiLocation +} + +export interface Type_446_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V3MultiAsset[] +} + +export interface Type_446_SetAppendix { + __kind: 'SetAppendix' + value: Type_446[] +} + +export interface Type_446_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_446[] +} + +export interface Type_446_SetFeesMode { + __kind: 'SetFeesMode' + jitWithdraw: boolean +} + +export interface Type_446_SetTopic { + __kind: 'SetTopic' + value: Bytes +} + +export interface Type_446_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: Weight +} + +export interface Type_446_Transact { + __kind: 'Transact' + originKind: V3OriginKind + requireWeightAtMost: Weight + call: Type_443 +} + +export interface Type_446_TransferAsset { + __kind: 'TransferAsset' + assets: V3MultiAsset[] + beneficiary: V3MultiLocation +} + +export interface Type_446_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V3MultiAsset[] + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_446_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_446_UniversalOrigin { + __kind: 'UniversalOrigin' + value: V3Junction +} + +export interface Type_446_UnlockAsset { + __kind: 'UnlockAsset' + asset: V3MultiAsset + target: V3MultiLocation +} + +export interface Type_446_UnpaidExecution { + __kind: 'UnpaidExecution' + weightLimit: V3WeightLimit + checkOrigin?: (V3MultiLocation | undefined) +} + +export interface Type_446_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_446_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V3MultiAsset[] +} + +export const Type_442: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V2MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + ticket: V2MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V2MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V2Junctions, + ExchangeAsset: sts.enumStruct({ + give: V2MultiAssetFilter, + receive: sts.array(() => V2MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V2MultiAssetFilter, + reserve: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V2MultiAssetFilter, + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + assets: V2MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V2MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V2MultiAsset), + SetAppendix: sts.array(() => Type_442), + SetErrorHandler: sts.array(() => Type_442), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V2OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_443, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + beneficiary: V2MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V2MultiAsset), + } +}) + +export type Type_442 = Type_442_BuyExecution | Type_442_ClaimAsset | Type_442_ClearError | Type_442_ClearOrigin | Type_442_DepositAsset | Type_442_DepositReserveAsset | Type_442_DescendOrigin | Type_442_ExchangeAsset | Type_442_HrmpChannelAccepted | Type_442_HrmpChannelClosing | Type_442_HrmpNewChannelOpenRequest | Type_442_InitiateReserveWithdraw | Type_442_InitiateTeleport | Type_442_QueryHolding | Type_442_QueryResponse | Type_442_ReceiveTeleportedAsset | Type_442_RefundSurplus | Type_442_ReportError | Type_442_ReserveAssetDeposited | Type_442_SetAppendix | Type_442_SetErrorHandler | Type_442_SubscribeVersion | Type_442_Transact | Type_442_TransferAsset | Type_442_TransferReserveAsset | Type_442_Trap | Type_442_UnsubscribeVersion | Type_442_WithdrawAsset + +export interface Type_442_BuyExecution { + __kind: 'BuyExecution' + fees: V2MultiAsset + weightLimit: V2WeightLimit +} + +export interface Type_442_ClaimAsset { + __kind: 'ClaimAsset' + assets: V2MultiAsset[] + ticket: V2MultiLocation +} + +export interface Type_442_ClearError { + __kind: 'ClearError' +} + +export interface Type_442_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_442_DepositAsset { + __kind: 'DepositAsset' + assets: V2MultiAssetFilter + maxAssets: number + beneficiary: V2MultiLocation +} + +export interface Type_442_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V2MultiAssetFilter + maxAssets: number + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_442_DescendOrigin { + __kind: 'DescendOrigin' + value: V2Junctions +} + +export interface Type_442_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V2MultiAssetFilter + receive: V2MultiAsset[] +} + +export interface Type_442_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_442_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_442_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_442_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V2MultiAssetFilter + reserve: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_442_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V2MultiAssetFilter + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_442_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V2MultiLocation + assets: V2MultiAssetFilter + maxResponseWeight: bigint +} + +export interface Type_442_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface Type_442_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V2MultiAsset[] +} + +export interface Type_442_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_442_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V2MultiLocation + maxResponseWeight: bigint +} + +export interface Type_442_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V2MultiAsset[] +} + +export interface Type_442_SetAppendix { + __kind: 'SetAppendix' + value: Type_442[] +} + +export interface Type_442_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_442[] +} + +export interface Type_442_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_442_Transact { + __kind: 'Transact' + originType: V2OriginKind + requireWeightAtMost: bigint + call: Type_443 +} + +export interface Type_442_TransferAsset { + __kind: 'TransferAsset' + assets: V2MultiAsset[] + beneficiary: V2MultiLocation +} + +export interface Type_442_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V2MultiAsset[] + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_442_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_442_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_442_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V2MultiAsset[] +} + +export type Type_439 = Type_439_V2 | Type_439_V3 | Type_439_V4 + +export interface Type_439_V2 { + __kind: 'V2' + value: Type_442[] +} + +export interface Type_439_V3 { + __kind: 'V3' + value: Type_446[] +} + +export interface Type_439_V4 { + __kind: 'V4' + value: Type_449[] +} + +export const VersionedLocation: sts.Type = sts.closedEnum(() => { + return { + V2: V2MultiLocation, + V3: V3MultiLocation, + V4: V4Location, + } +}) + +export const VersionedAssets: sts.Type = sts.closedEnum(() => { + return { + V2: sts.array(() => V2MultiAsset), + V3: sts.array(() => V3MultiAsset), + V4: sts.array(() => V4Asset), + } +}) + +export type VersionedAssets = VersionedAssets_V2 | VersionedAssets_V3 | VersionedAssets_V4 + +export interface VersionedAssets_V2 { + __kind: 'V2' + value: V2MultiAsset[] +} + +export interface VersionedAssets_V3 { + __kind: 'V3' + value: V3MultiAsset[] +} + +export interface VersionedAssets_V4 { + __kind: 'V4' + value: V4Asset[] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type XcmPalletCall = XcmPalletCall_claim_assets | XcmPalletCall_execute | XcmPalletCall_force_default_xcm_version | XcmPalletCall_force_subscribe_version_notify | XcmPalletCall_force_suspension | XcmPalletCall_force_unsubscribe_version_notify | XcmPalletCall_force_xcm_version | XcmPalletCall_limited_reserve_transfer_assets | XcmPalletCall_limited_teleport_assets | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets | XcmPalletCall_transfer_assets | XcmPalletCall_transfer_assets_using_type_and_then + +/** + * Claims assets trapped on this pallet because of leftover assets during XCM execution. + * + * - `origin`: Anyone can call this extrinsic. + * - `assets`: The exact assets that were trapped. Use the version to specify what version + * was the latest when they were trapped. + * - `beneficiary`: The location/account where the claimed assets will be deposited. + */ +export interface XcmPalletCall_claim_assets { + __kind: 'claim_assets' + assets: VersionedAssets + beneficiary: VersionedLocation +} + +/** + * Execute an XCM message from a local, signed, origin. + * + * An event is deposited indicating whether `msg` could be executed completely or only + * partially. + * + * No more than `max_weight` will be used in its attempted execution. If this is less than + * the maximum amount of weight that the message could take to be executed, then no + * execution attempt will be made. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Type_439 + maxWeight: Weight +} + +/** + * Set a safe XCM version (the version that XCM should be encoded with if the most recent + * version a destination can accept is unknown). + * + * - `origin`: Must be an origin specified by AdminOrigin. + * - `maybe_xcm_version`: The default XCM encoding version, or `None` to disable. + */ +export interface XcmPalletCall_force_default_xcm_version { + __kind: 'force_default_xcm_version' + maybeXcmVersion?: (number | undefined) +} + +/** + * Ask a location to notify us regarding their XCM version and any changes to it. + * + * - `origin`: Must be an origin specified by AdminOrigin. + * - `location`: The location to which we should subscribe for XCM version notifications. + */ +export interface XcmPalletCall_force_subscribe_version_notify { + __kind: 'force_subscribe_version_notify' + location: VersionedLocation +} + +/** + * Set or unset the global suspension state of the XCM executor. + * + * - `origin`: Must be an origin specified by AdminOrigin. + * - `suspended`: `true` to suspend, `false` to resume. + */ +export interface XcmPalletCall_force_suspension { + __kind: 'force_suspension' + suspended: boolean +} + +/** + * Require that a particular destination should no longer notify us regarding any XCM + * version changes. + * + * - `origin`: Must be an origin specified by AdminOrigin. + * - `location`: The location to which we are currently subscribed for XCM version + * notifications which we no longer desire. + */ +export interface XcmPalletCall_force_unsubscribe_version_notify { + __kind: 'force_unsubscribe_version_notify' + location: VersionedLocation +} + +/** + * Extoll that a particular destination can be communicated with through a particular + * version of XCM. + * + * - `origin`: Must be an origin specified by AdminOrigin. + * - `location`: The destination that is being described. + * - `xcm_version`: The latest version of XCM that `location` supports. + */ +export interface XcmPalletCall_force_xcm_version { + __kind: 'force_xcm_version' + location: V4Location + version: number +} + +/** + * Transfer some assets from the local chain to the destination chain through their local, + * destination or remote reserve. + * + * `assets` must have same reserve location and may not be teleportable to `dest`. + * - `assets` have local reserve: transfer assets to sovereign account of destination + * chain and forward a notification XCM to `dest` to mint and deposit reserve-based + * assets to `beneficiary`. + * - `assets` have destination reserve: burn local assets and forward a notification to + * `dest` chain to withdraw the reserve assets from this chain's sovereign account and + * deposit them to `beneficiary`. + * - `assets` have remote reserve: burn local assets, forward XCM to reserve chain to move + * reserves from this chain's SA to `dest` chain's SA, and forward another XCM to `dest` + * to mint and deposit reserve-based assets to `beneficiary`. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight + * is needed than `weight_limit`, then the operation will fail and the sent assets may be + * at risk. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `[Parent, + * Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from + * relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will + * generally be an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the + * fee on the `dest` (and possibly reserve) chains. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_reserve_transfer_assets { + __kind: 'limited_reserve_transfer_assets' + dest: VersionedLocation + beneficiary: VersionedLocation + assets: VersionedAssets + feeAssetItem: number + weightLimit: V3WeightLimit +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight + * is needed than `weight_limit`, then the operation will fail and the sent assets may be + * at risk. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `[Parent, + * Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from + * relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will + * generally be an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the + * fee on the `dest` chain. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_teleport_assets { + __kind: 'limited_teleport_assets' + dest: VersionedLocation + beneficiary: VersionedLocation + assets: VersionedAssets + feeAssetItem: number + weightLimit: V3WeightLimit +} + +/** + * Transfer some assets from the local chain to the destination chain through their local, + * destination or remote reserve. + * + * `assets` must have same reserve location and may not be teleportable to `dest`. + * - `assets` have local reserve: transfer assets to sovereign account of destination + * chain and forward a notification XCM to `dest` to mint and deposit reserve-based + * assets to `beneficiary`. + * - `assets` have destination reserve: burn local assets and forward a notification to + * `dest` chain to withdraw the reserve assets from this chain's sovereign account and + * deposit them to `beneficiary`. + * - `assets` have remote reserve: burn local assets, forward XCM to reserve chain to move + * reserves from this chain's SA to `dest` chain's SA, and forward another XCM to `dest` + * to mint and deposit reserve-based assets to `beneficiary`. + * + * **This function is deprecated: Use `limited_reserve_transfer_assets` instead.** + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, + * with all fees taken as needed from the asset. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `[Parent, + * Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from + * relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will + * generally be an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the + * fee on the `dest` (and possibly reserve) chains. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: VersionedLocation + beneficiary: VersionedLocation + assets: VersionedAssets + feeAssetItem: number +} + +export interface XcmPalletCall_send { + __kind: 'send' + dest: VersionedLocation + message: VersionedXcm +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * **This function is deprecated: Use `limited_teleport_assets` instead.** + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, + * with all fees taken as needed from the asset. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `[Parent, + * Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from + * relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will + * generally be an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the + * fee on the `dest` chain. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: VersionedLocation + beneficiary: VersionedLocation + assets: VersionedAssets + feeAssetItem: number +} + +/** + * Transfer some assets from the local chain to the destination chain through their local, + * destination or remote reserve, or through teleports. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item` (hence referred to as `fees`), up to enough to pay for + * `weight_limit` of weight. If more weight is needed than `weight_limit`, then the + * operation will fail and the sent assets may be at risk. + * + * `assets` (excluding `fees`) must have same reserve location or otherwise be teleportable + * to `dest`, no limitations imposed on `fees`. + * - for local reserve: transfer assets to sovereign account of destination chain and + * forward a notification XCM to `dest` to mint and deposit reserve-based assets to + * `beneficiary`. + * - for destination reserve: burn local assets and forward a notification to `dest` chain + * to withdraw the reserve assets from this chain's sovereign account and deposit them + * to `beneficiary`. + * - for remote reserve: burn local assets, forward XCM to reserve chain to move reserves + * from this chain's SA to `dest` chain's SA, and forward another XCM to `dest` to mint + * and deposit reserve-based assets to `beneficiary`. + * - for teleports: burn local assets and forward XCM to `dest` chain to mint/teleport + * assets and deposit them to `beneficiary`. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, + * Parachain(..))` to send from parachain to parachain, or `X1(Parachain(..))` to send + * from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will + * generally be an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the + * fee on the `dest` (and possibly reserve) chains. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_transfer_assets { + __kind: 'transfer_assets' + dest: VersionedLocation + beneficiary: VersionedLocation + assets: VersionedAssets + feeAssetItem: number + weightLimit: V3WeightLimit +} + +/** + * Transfer assets from the local chain to the destination chain using explicit transfer + * types for assets and fees. + * + * `assets` must have same reserve location or may be teleportable to `dest`. Caller must + * provide the `assets_transfer_type` to be used for `assets`: + * - `TransferType::LocalReserve`: transfer assets to sovereign account of destination + * chain and forward a notification XCM to `dest` to mint and deposit reserve-based + * assets to `beneficiary`. + * - `TransferType::DestinationReserve`: burn local assets and forward a notification to + * `dest` chain to withdraw the reserve assets from this chain's sovereign account and + * deposit them to `beneficiary`. + * - `TransferType::RemoteReserve(reserve)`: burn local assets, forward XCM to `reserve` + * chain to move reserves from this chain's SA to `dest` chain's SA, and forward another + * XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. Typically + * the remote `reserve` is Asset Hub. + * - `TransferType::Teleport`: burn local assets and forward XCM to `dest` chain to + * mint/teleport assets and deposit them to `beneficiary`. + * + * On the destination chain, as well as any intermediary hops, `BuyExecution` is used to + * buy execution using transferred `assets` identified by `remote_fees_id`. + * Make sure enough of the specified `remote_fees_id` asset is included in the given list + * of `assets`. `remote_fees_id` should be enough to pay for `weight_limit`. If more weight + * is needed than `weight_limit`, then the operation will fail and the sent assets may be + * at risk. + * + * `remote_fees_id` may use different transfer type than rest of `assets` and can be + * specified through `fees_transfer_type`. + * + * The caller needs to specify what should happen to the transferred assets once they reach + * the `dest` chain. This is done through the `custom_xcm_on_dest` parameter, which + * contains the instructions to execute on `dest` as a final step. + * This is usually as simple as: + * `Xcm(vec![DepositAsset { assets: Wild(AllCounted(assets.len())), beneficiary }])`, + * but could be something more exotic like sending the `assets` even further. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `[Parent, + * Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from + * relay to parachain, or `(parents: 2, (GlobalConsensus(..), ..))` to send from + * parachain across a bridge to another ecosystem destination. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the + * fee on the `dest` (and possibly reserve) chains. + * - `assets_transfer_type`: The XCM `TransferType` used to transfer the `assets`. + * - `remote_fees_id`: One of the included `assets` to be used to pay fees. + * - `fees_transfer_type`: The XCM `TransferType` used to transfer the `fees` assets. + * - `custom_xcm_on_dest`: The XCM to be executed on `dest` chain as the last step of the + * transfer, which also determines what happens to the assets on the destination chain. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_transfer_assets_using_type_and_then { + __kind: 'transfer_assets_using_type_and_then' + dest: VersionedLocation + assets: VersionedAssets + assetsTransferType: TransferType + remoteFeesId: VersionedAssetId + feesTransferType: TransferType + customXcmOnDest: VersionedXcm + weightLimit: V3WeightLimit +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const WhitelistCall: sts.Type = sts.closedEnum(() => { + return { + dispatch_whitelisted_call: sts.enumStruct({ + callHash: H256, + callEncodedLen: sts.number(), + callWeightWitness: Weight, + }), + dispatch_whitelisted_call_with_preimage: sts.enumStruct({ + call: Call, + }), + remove_whitelisted_call: sts.enumStruct({ + callHash: H256, + }), + whitelist_call: sts.enumStruct({ + callHash: H256, + }), + } +}) + +export const H256 = sts.bytes() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type WhitelistCall = WhitelistCall_dispatch_whitelisted_call | WhitelistCall_dispatch_whitelisted_call_with_preimage | WhitelistCall_remove_whitelisted_call | WhitelistCall_whitelist_call + +export interface WhitelistCall_dispatch_whitelisted_call { + __kind: 'dispatch_whitelisted_call' + callHash: H256 + callEncodedLen: number + callWeightWitness: Weight +} + +export interface WhitelistCall_dispatch_whitelisted_call_with_preimage { + __kind: 'dispatch_whitelisted_call_with_preimage' + call: Call +} + +export interface WhitelistCall_remove_whitelisted_call { + __kind: 'remove_whitelisted_call' + callHash: H256 +} + +export interface WhitelistCall_whitelist_call { + __kind: 'whitelist_call' + callHash: H256 +} + +export type H256 = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const VoterListCall: sts.Type = sts.closedEnum(() => { + return { + put_in_front_of: sts.enumStruct({ + lighter: MultiAddress, + }), + put_in_front_of_other: sts.enumStruct({ + heavier: MultiAddress, + lighter: MultiAddress, + }), + rebag: sts.enumStruct({ + dislocated: MultiAddress, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type VoterListCall = VoterListCall_put_in_front_of | VoterListCall_put_in_front_of_other | VoterListCall_rebag + +/** + * Move the caller's Id directly in front of `lighter`. + * + * The dispatch origin for this call must be _Signed_ and can only be called by the Id of + * the account going in front of `lighter`. Fee is payed by the origin under all + * circumstances. + * + * Only works if: + * + * - both nodes are within the same bag, + * - and `origin` has a greater `Score` than `lighter`. + */ +export interface VoterListCall_put_in_front_of { + __kind: 'put_in_front_of' + lighter: MultiAddress +} + +/** + * Same as [`Pallet::put_in_front_of`], but it can be called by anyone. + * + * Fee is paid by the origin under all circumstances. + */ +export interface VoterListCall_put_in_front_of_other { + __kind: 'put_in_front_of_other' + heavier: MultiAddress + lighter: MultiAddress +} + +/** + * Declare that some `dislocated` account has, through rewards or penalties, sufficiently + * changed its score that it should properly fall into a different bag than its current + * one. + * + * Anyone can call this function about any potentially dislocated account. + * + * Will always update the stored score of `dislocated` to the correct score, based on + * `ScoreProvider`. + * + * If `dislocated` does not exists, it returns an error. + */ +export interface VoterListCall_rebag { + __kind: 'rebag' + dislocated: MultiAddress +} + +export type MultiAddress = MultiAddress_Address20 | MultiAddress_Address32 | MultiAddress_Id | MultiAddress_Index | MultiAddress_Raw + +export interface MultiAddress_Address20 { + __kind: 'Address20' + value: Bytes +} + +export interface MultiAddress_Address32 { + __kind: 'Address32' + value: Bytes +} + +export interface MultiAddress_Id { + __kind: 'Id' + value: AccountId32 +} + +export interface MultiAddress_Index { + __kind: 'Index' +} + +export interface MultiAddress_Raw { + __kind: 'Raw' + value: Bytes +} + +export type AccountId32 = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_remove_vesting_schedule: sts.enumStruct({ + target: MultiAddress, + scheduleIndex: sts.number(), + }), + force_vested_transfer: sts.enumStruct({ + source: MultiAddress, + target: MultiAddress, + schedule: VestingInfo, + }), + merge_schedules: sts.enumStruct({ + schedule1Index: sts.number(), + schedule2Index: sts.number(), + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: MultiAddress, + }), + vested_transfer: sts.enumStruct({ + target: MultiAddress, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: sts.bigint(), + perBlock: sts.bigint(), + startingBlock: sts.number(), + } +}) + +export interface VestingInfo { + locked: bigint + perBlock: bigint + startingBlock: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type VestingCall = VestingCall_force_remove_vesting_schedule | VestingCall_force_vested_transfer | VestingCall_merge_schedules | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force remove a vesting schedule + * + * The dispatch origin for this call must be _Root_. + * + * - `target`: An account that has a vesting schedule + * - `schedule_index`: The vesting schedule index that should be removed + */ +export interface VestingCall_force_remove_vesting_schedule { + __kind: 'force_remove_vesting_schedule' + target: MultiAddress + scheduleIndex: number +} + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * ## Complexity + * - `O(1)`. + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: MultiAddress + target: MultiAddress + schedule: VestingInfo +} + +/** + * Merge two vesting schedules together, creating a new vesting schedule that unlocks over + * the highest possible start and end blocks. If both schedules have already started the + * current block will be used as the schedule start; with the caveat that if one schedule + * is finished by the current block, the other will be treated as the new merged schedule, + * unmodified. + * + * NOTE: If `schedule1_index == schedule2_index` this is a no-op. + * NOTE: This will unlock all schedules through the current block prior to merging. + * NOTE: If both schedules have ended by the current block, no new schedule will be created + * and both will be removed. + * + * Merged schedule attributes: + * - `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block, + * current_block)`. + * - `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`. + * - `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`. + * + * The dispatch origin for this call must be _Signed_. + * + * - `schedule1_index`: index of the first schedule to merge. + * - `schedule2_index`: index of the second schedule to merge. + */ +export interface VestingCall_merge_schedules { + __kind: 'merge_schedules' + schedule1Index: number + schedule2Index: number +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * ## Complexity + * - `O(1)`. + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * ## Complexity + * - `O(1)`. + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: MultiAddress +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account receiving the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * ## Complexity + * - `O(1)`. + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: MultiAddress + schedule: VestingInfo +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Call, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Call), + }), + dispatch_as: sts.enumStruct({ + asOrigin: OriginCaller, + call: Call, + }), + force_batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + with_weight: sts.enumStruct({ + call: Call, + weight: Weight, + }), + } +}) + +export const OriginCaller: sts.Type = sts.closedEnum(() => { + return { + Origins: Origin, + ParachainsOrigin: Type_153, + Void: Void, + XcmPallet: Type_155, + system: RawOrigin, + } +}) + +export const RawOrigin: sts.Type = sts.closedEnum(() => { + return { + None: sts.unit(), + Root: sts.unit(), + Signed: AccountId32, + } +}) + +export type RawOrigin = RawOrigin_None | RawOrigin_Root | RawOrigin_Signed + +export interface RawOrigin_None { + __kind: 'None' +} + +export interface RawOrigin_Root { + __kind: 'Root' +} + +export interface RawOrigin_Signed { + __kind: 'Signed' + value: AccountId32 +} + +export const Type_155: sts.Type = sts.closedEnum(() => { + return { + Response: V4Location, + Xcm: V4Location, + } +}) + +export type Type_155 = Type_155_Response | Type_155_Xcm + +export interface Type_155_Response { + __kind: 'Response' + value: V4Location +} + +export interface Type_155_Xcm { + __kind: 'Xcm' + value: V4Location +} + +export const Void: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Void = never + +export const Type_153: sts.Type = sts.closedEnum(() => { + return { + Parachain: Id, + } +}) + +export const Id = sts.number() + +export type Type_153 = Type_153_Parachain + +export interface Type_153_Parachain { + __kind: 'Parachain' + value: Id +} + +export type Id = number + +export const Origin: sts.Type = sts.closedEnum(() => { + return { + AuctionAdmin: sts.unit(), + BigSpender: sts.unit(), + BigTipper: sts.unit(), + Fellows: sts.unit(), + Fellowship1Dan: sts.unit(), + Fellowship2Dan: sts.unit(), + Fellowship3Dan: sts.unit(), + Fellowship4Dan: sts.unit(), + Fellowship5Dan: sts.unit(), + Fellowship6Dan: sts.unit(), + Fellowship7Dan: sts.unit(), + Fellowship8Dan: sts.unit(), + Fellowship9Dan: sts.unit(), + FellowshipAdmin: sts.unit(), + FellowshipExperts: sts.unit(), + FellowshipInitiates: sts.unit(), + FellowshipMasters: sts.unit(), + GeneralAdmin: sts.unit(), + LeaseAdmin: sts.unit(), + MediumSpender: sts.unit(), + ReferendumCanceller: sts.unit(), + ReferendumKiller: sts.unit(), + SmallSpender: sts.unit(), + SmallTipper: sts.unit(), + StakingAdmin: sts.unit(), + Treasurer: sts.unit(), + WhitelistedCaller: sts.unit(), + WishForChange: sts.unit(), + } +}) + +export type Origin = Origin_AuctionAdmin | Origin_BigSpender | Origin_BigTipper | Origin_Fellows | Origin_Fellowship1Dan | Origin_Fellowship2Dan | Origin_Fellowship3Dan | Origin_Fellowship4Dan | Origin_Fellowship5Dan | Origin_Fellowship6Dan | Origin_Fellowship7Dan | Origin_Fellowship8Dan | Origin_Fellowship9Dan | Origin_FellowshipAdmin | Origin_FellowshipExperts | Origin_FellowshipInitiates | Origin_FellowshipMasters | Origin_GeneralAdmin | Origin_LeaseAdmin | Origin_MediumSpender | Origin_ReferendumCanceller | Origin_ReferendumKiller | Origin_SmallSpender | Origin_SmallTipper | Origin_StakingAdmin | Origin_Treasurer | Origin_WhitelistedCaller | Origin_WishForChange + +export interface Origin_AuctionAdmin { + __kind: 'AuctionAdmin' +} + +export interface Origin_BigSpender { + __kind: 'BigSpender' +} + +export interface Origin_BigTipper { + __kind: 'BigTipper' +} + +export interface Origin_Fellows { + __kind: 'Fellows' +} + +export interface Origin_Fellowship1Dan { + __kind: 'Fellowship1Dan' +} + +export interface Origin_Fellowship2Dan { + __kind: 'Fellowship2Dan' +} + +export interface Origin_Fellowship3Dan { + __kind: 'Fellowship3Dan' +} + +export interface Origin_Fellowship4Dan { + __kind: 'Fellowship4Dan' +} + +export interface Origin_Fellowship5Dan { + __kind: 'Fellowship5Dan' +} + +export interface Origin_Fellowship6Dan { + __kind: 'Fellowship6Dan' +} + +export interface Origin_Fellowship7Dan { + __kind: 'Fellowship7Dan' +} + +export interface Origin_Fellowship8Dan { + __kind: 'Fellowship8Dan' +} + +export interface Origin_Fellowship9Dan { + __kind: 'Fellowship9Dan' +} + +export interface Origin_FellowshipAdmin { + __kind: 'FellowshipAdmin' +} + +export interface Origin_FellowshipExperts { + __kind: 'FellowshipExperts' +} + +export interface Origin_FellowshipInitiates { + __kind: 'FellowshipInitiates' +} + +export interface Origin_FellowshipMasters { + __kind: 'FellowshipMasters' +} + +export interface Origin_GeneralAdmin { + __kind: 'GeneralAdmin' +} + +export interface Origin_LeaseAdmin { + __kind: 'LeaseAdmin' +} + +export interface Origin_MediumSpender { + __kind: 'MediumSpender' +} + +export interface Origin_ReferendumCanceller { + __kind: 'ReferendumCanceller' +} + +export interface Origin_ReferendumKiller { + __kind: 'ReferendumKiller' +} + +export interface Origin_SmallSpender { + __kind: 'SmallSpender' +} + +export interface Origin_SmallTipper { + __kind: 'SmallTipper' +} + +export interface Origin_StakingAdmin { + __kind: 'StakingAdmin' +} + +export interface Origin_Treasurer { + __kind: 'Treasurer' +} + +export interface Origin_WhitelistedCaller { + __kind: 'WhitelistedCaller' +} + +export interface Origin_WishForChange { + __kind: 'WishForChange' +} + +export type OriginCaller = OriginCaller_Origins | OriginCaller_ParachainsOrigin | OriginCaller_Void | OriginCaller_XcmPallet | OriginCaller_system + +export interface OriginCaller_Origins { + __kind: 'Origins' + value: Origin +} + +export interface OriginCaller_ParachainsOrigin { + __kind: 'ParachainsOrigin' + value: Type_153 +} + +export interface OriginCaller_Void { + __kind: 'Void' + value: Void +} + +export interface OriginCaller_XcmPallet { + __kind: 'XcmPallet' + value: Type_155 +} + +export interface OriginCaller_system { + __kind: 'system' + value: RawOrigin +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all | UtilityCall_dispatch_as | UtilityCall_force_batch | UtilityCall_with_weight + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Call +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin except `None`. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then the calls are dispatched without checking origin filter. (This + * includes bypassing `frame_system::Config::BaseCallFilter`). + * + * ## Complexity + * - O(C) where C is the number of calls to be batched. + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Call[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin except `None`. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then the calls are dispatched without checking origin filter. (This + * includes bypassing `frame_system::Config::BaseCallFilter`). + * + * ## Complexity + * - O(C) where C is the number of calls to be batched. + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Call[] +} + +/** + * Dispatches a function call with a provided origin. + * + * The dispatch origin for this call must be _Root_. + * + * ## Complexity + * - O(1). + */ +export interface UtilityCall_dispatch_as { + __kind: 'dispatch_as' + asOrigin: OriginCaller + call: Call +} + +/** + * Send a batch of dispatch calls. + * Unlike `batch`, it allows errors and won't interrupt. + * + * May be called from any origin except `None`. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then the calls are dispatch without checking origin filter. (This + * includes bypassing `frame_system::Config::BaseCallFilter`). + * + * ## Complexity + * - O(C) where C is the number of calls to be batched. + */ +export interface UtilityCall_force_batch { + __kind: 'force_batch' + calls: Call[] +} + +/** + * Dispatch a function call with a specified weight. + * + * This function does not check the weight of the call, and instead allows the + * Root origin to specify the weight of the call. + * + * The dispatch origin for this call must be _Root_. + */ +export interface UtilityCall_with_weight { + __kind: 'with_weight' + call: Call + weight: Weight +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + check_status: sts.enumStruct({ + index: sts.number(), + }), + payout: sts.enumStruct({ + index: sts.number(), + }), + remove_approval: sts.enumStruct({ + proposalId: sts.number(), + }), + spend: sts.enumStruct({ + assetKind: VersionedLocatableAsset, + amount: sts.bigint(), + beneficiary: VersionedLocation, + validFrom: sts.option(() => sts.number()), + }), + spend_local: sts.enumStruct({ + amount: sts.bigint(), + beneficiary: MultiAddress, + }), + void_spend: sts.enumStruct({ + index: sts.number(), + }), + } +}) + +export const VersionedLocatableAsset: sts.Type = sts.closedEnum(() => { + return { + V3: sts.enumStruct({ + location: V3MultiLocation, + assetId: V3AssetId, + }), + V4: sts.enumStruct({ + location: V4Location, + assetId: V4AssetId, + }), + } +}) + +export type VersionedLocatableAsset = VersionedLocatableAsset_V3 | VersionedLocatableAsset_V4 + +export interface VersionedLocatableAsset_V3 { + __kind: 'V3' + location: V3MultiLocation + assetId: V3AssetId +} + +export interface VersionedLocatableAsset_V4 { + __kind: 'V4' + location: V4Location + assetId: V4AssetId +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type TreasuryCall = TreasuryCall_check_status | TreasuryCall_payout | TreasuryCall_remove_approval | TreasuryCall_spend | TreasuryCall_spend_local | TreasuryCall_void_spend + +/** + * Check the status of the spend and remove it from the storage if processed. + * + * ## Dispatch Origin + * + * Must be signed. + * + * ## Details + * + * The status check is a prerequisite for retrying a failed payout. + * If a spend has either succeeded or expired, it is removed from the storage by this + * function. In such instances, transaction fees are refunded. + * + * ### Parameters + * - `index`: The spend index. + * + * ## Events + * + * Emits [`Event::PaymentFailed`] if the spend payout has failed. + * Emits [`Event::SpendProcessed`] if the spend payout has succeed. + */ +export interface TreasuryCall_check_status { + __kind: 'check_status' + index: number +} + +/** + * Claim a spend. + * + * ## Dispatch Origin + * + * Must be signed + * + * ## Details + * + * Spends must be claimed within some temporal bounds. A spend may be claimed within one + * [`Config::PayoutPeriod`] from the `valid_from` block. + * In case of a payout failure, the spend status must be updated with the `check_status` + * dispatchable before retrying with the current function. + * + * ### Parameters + * - `index`: The spend index. + * + * ## Events + * + * Emits [`Event::Paid`] if successful. + */ +export interface TreasuryCall_payout { + __kind: 'payout' + index: number +} + +/** + * Force a previously approved proposal to be removed from the approval queue. + * + * ## Dispatch Origin + * + * Must be [`Config::RejectOrigin`]. + * + * ## Details + * + * The original deposit will no longer be returned. + * + * ### Parameters + * - `proposal_id`: The index of a proposal + * + * ### Complexity + * - O(A) where `A` is the number of approvals + * + * ### Errors + * - [`Error::ProposalNotApproved`]: The `proposal_id` supplied was not found in the + * approval queue, i.e., the proposal has not been approved. This could also mean the + * proposal does not exist altogether, thus there is no way it would have been approved + * in the first place. + */ +export interface TreasuryCall_remove_approval { + __kind: 'remove_approval' + proposalId: number +} + +/** + * Propose and approve a spend of treasury funds. + * + * ## Dispatch Origin + * + * Must be [`Config::SpendOrigin`] with the `Success` value being at least + * `amount` of `asset_kind` in the native asset. The amount of `asset_kind` is converted + * for assertion using the [`Config::BalanceConverter`]. + * + * ## Details + * + * Create an approved spend for transferring a specific `amount` of `asset_kind` to a + * designated beneficiary. The spend must be claimed using the `payout` dispatchable within + * the [`Config::PayoutPeriod`]. + * + * ### Parameters + * - `asset_kind`: An indicator of the specific asset class to be spent. + * - `amount`: The amount to be transferred from the treasury to the `beneficiary`. + * - `beneficiary`: The beneficiary of the spend. + * - `valid_from`: The block number from which the spend can be claimed. It can refer to + * the past if the resulting spend has not yet expired according to the + * [`Config::PayoutPeriod`]. If `None`, the spend can be claimed immediately after + * approval. + * + * ## Events + * + * Emits [`Event::AssetSpendApproved`] if successful. + */ +export interface TreasuryCall_spend { + __kind: 'spend' + assetKind: VersionedLocatableAsset + amount: bigint + beneficiary: VersionedLocation + validFrom?: (number | undefined) +} + +/** + * Propose and approve a spend of treasury funds. + * + * ## Dispatch Origin + * + * Must be [`Config::SpendOrigin`] with the `Success` value being at least `amount`. + * + * ### Details + * NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the + * beneficiary. + * + * ### Parameters + * - `amount`: The amount to be transferred from the treasury to the `beneficiary`. + * - `beneficiary`: The destination account for the transfer. + * + * ## Events + * + * Emits [`Event::SpendApproved`] if successful. + */ +export interface TreasuryCall_spend_local { + __kind: 'spend_local' + amount: bigint + beneficiary: MultiAddress +} + +/** + * Void previously approved spend. + * + * ## Dispatch Origin + * + * Must be [`Config::RejectOrigin`]. + * + * ## Details + * + * A spend void is only possible if the payout has not been attempted yet. + * + * ### Parameters + * - `index`: The spend index. + * + * ## Events + * + * Emits [`Event::AssetSpendVoided`] if successful. + */ +export interface TreasuryCall_void_spend { + __kind: 'void_spend' + index: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * [`Config::MinimumPeriod`]. + * + * The dispatch origin for this call must be _None_. + * + * This dispatch class is _Mandatory_ to ensure it gets executed in the block. Be aware + * that changing the complexity of this call could result exhausting the resources in a + * block to execute any other calls. + * + * ## Complexity + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)` because of `DidUpdate::take` in + * `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + apply_authorized_upgrade: sts.enumStruct({ + code: sts.bytes(), + }), + authorize_upgrade: sts.enumStruct({ + codeHash: H256, + }), + authorize_upgrade_without_checks: sts.enumStruct({ + codeHash: H256, + }), + kill_prefix: sts.enumStruct({ + prefix: sts.bytes(), + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => sts.bytes()), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SystemCall = SystemCall_apply_authorized_upgrade | SystemCall_authorize_upgrade | SystemCall_authorize_upgrade_without_checks | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * Provide the preimage (runtime binary) `code` for an upgrade that has been authorized. + * + * If the authorization required a version check, this call will ensure the spec name + * remains unchanged and that the spec version has increased. + * + * Depending on the runtime's `OnSetCode` configuration, this function may directly apply + * the new `code` in the same block or attempt to schedule the upgrade. + * + * All origins are allowed. + */ +export interface SystemCall_apply_authorized_upgrade { + __kind: 'apply_authorized_upgrade' + code: Bytes +} + +/** + * Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied + * later. + * + * This call requires Root origin. + */ +export interface SystemCall_authorize_upgrade { + __kind: 'authorize_upgrade' + codeHash: H256 +} + +/** + * Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied + * later. + * + * WARNING: This authorizes an upgrade that will take place without any safety checks, for + * example that the spec name remains the same and that the version number increases. Not + * recommended for normal use. Use `authorize_upgrade` instead. + * + * This call requires Root origin. + */ +export interface SystemCall_authorize_upgrade_without_checks { + __kind: 'authorize_upgrade_without_checks' + codeHash: H256 +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Bytes + subkeys: number +} + +/** + * Kill some items from storage. + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Bytes[] +} + +/** + * Make some on-chain remark. + * + * Can be executed by every `origin`. + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Make some on-chain remark and emit event. + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * Set the new runtime code. + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * Note that runtime upgrades will not run if this is called with a not-increasing spec + * version! + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: [Bytes, Bytes][] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: sts.number(), + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + stash: AccountId32, + }), + deprecate_controller_batch: sts.enumStruct({ + controllers: sts.array(() => AccountId32), + }), + force_apply_min_commission: sts.enumStruct({ + validatorStash: AccountId32, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => MultiAddress), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => MultiAddress), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + }), + payout_stakers_by_page: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + page: sts.number(), + }), + reap_stash: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + restore_ledger: sts.enumStruct({ + stash: AccountId32, + maybeController: sts.option(() => AccountId32), + maybeTotal: sts.option(() => sts.bigint()), + maybeUnlocking: sts.option(() => sts.array(() => UnlockChunk)), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.unit(), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId32), + }), + set_min_commission: sts.enumStruct({ + new: Perbill, + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_staking_configs: sts.enumStruct({ + minNominatorBond: ConfigOp, + minValidatorBond: ConfigOp, + maxNominatorCount: Type_114, + maxValidatorCount: Type_114, + chillThreshold: Type_115, + minCommission: Type_116, + maxStakedRewards: Type_115, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + update_payee: sts.enumStruct({ + controller: AccountId32, + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export const Type_116: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export type Type_116 = Type_116_Noop | Type_116_Remove | Type_116_Set + +export interface Type_116_Noop { + __kind: 'Noop' +} + +export interface Type_116_Remove { + __kind: 'Remove' +} + +export interface Type_116_Set { + __kind: 'Set' + value: Perbill +} + +export type Perbill = number + +export const Type_115: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Percent, + } +}) + +export type Type_115 = Type_115_Noop | Type_115_Remove | Type_115_Set + +export interface Type_115_Noop { + __kind: 'Noop' +} + +export interface Type_115_Remove { + __kind: 'Remove' +} + +export interface Type_115_Set { + __kind: 'Set' + value: Percent +} + +export type Percent = number + +export const Type_114: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_114 = Type_114_Noop | Type_114_Remove | Type_114_Set + +export interface Type_114_Noop { + __kind: 'Noop' +} + +export interface Type_114_Remove { + __kind: 'Remove' +} + +export interface Type_114_Set { + __kind: 'Set' + value: number +} + +export const ConfigOp: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type ConfigOp = ConfigOp_Noop | ConfigOp_Remove | ConfigOp_Set + +export interface ConfigOp_Noop { + __kind: 'Noop' +} + +export interface ConfigOp_Remove { + __kind: 'Remove' +} + +export interface ConfigOp_Set { + __kind: 'Set' + value: bigint +} + +export const Perbill = sts.number() + +export const Percent = sts.number() + +export const UnlockChunk: sts.Type = sts.struct(() => { + return { + value: sts.bigint(), + era: sts.number(), + } +}) + +export interface UnlockChunk { + value: bigint + era: number +} + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_deprecate_controller_batch | StakingCall_force_apply_min_commission | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_payout_stakers_by_page | StakingCall_reap_stash | StakingCall_rebond | StakingCall_restore_ledger | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_invulnerables | StakingCall_set_min_commission | StakingCall_set_payee | StakingCall_set_staking_configs | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_update_payee | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * ## Complexity + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ (or equal to 0) and gets removed + * as dust. + */ +export interface StakingCall_bond { + __kind: 'bond' + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose + * any limitation on the amount that can be added. + * + * Emits `Bonded`. + * + * ## Complexity + * - Independent of the arguments. Insignificant complexity. + * - O(1). + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::AdminOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: number + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * ## Complexity + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Declare a `controller` to stop participating as either a validator or nominator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_, but can be called by anyone. + * + * If the caller is the same as the controller being targeted, then no further checks are + * enforced, and this function behaves just like `chill`. + * + * If the caller is different than the controller being targeted, the following conditions + * must be met: + * + * * `controller` must belong to a nominator who has become non-decodable, + * + * Or: + * + * * A `ChillThreshold` must be set and checked which defines how close to the max + * nominators or validators we must reach before users can start chilling one-another. + * * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine + * how close we are to the threshold. + * * A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines + * if this is a person that should be chilled because they have not met the threshold + * bond required. + * + * This can be helpful if bond requirements are updated, and we need to remove old users + * who do not satisfy these requirements. + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + stash: AccountId32 +} + +/** + * Updates a batch of controller accounts to their corresponding stash account if they are + * not the same. Ignores any controller accounts that do not exist, and does not operate if + * the stash and controller are already the same. + * + * Effects will be felt instantly (as soon as this function is completed successfully). + * + * The dispatch origin must be `T::AdminOrigin`. + */ +export interface StakingCall_deprecate_controller_batch { + __kind: 'deprecate_controller_batch' + controllers: AccountId32[] +} + +/** + * Force a validator to have at least the minimum commission. This will not affect a + * validator who already has a commission greater than or equal to the minimum. Any account + * can call this. + */ +export interface StakingCall_force_apply_min_commission { + __kind: 'force_apply_min_commission' + validatorStash: AccountId32 +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * ## Complexity + * - No arguments. + * - Weight: O(1) + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * Thus the election process may be ongoing when this is called. In this case the + * election will continue until the next era is triggered. + * + * ## Complexity + * - No arguments. + * - Weight: O(1) + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + * + * ## Parameters + * + * - `num_slashing_spans`: Refer to comments on [`Call::withdraw_unbonded`] for more + * details. + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators up to maximum of + * `ElectionProviderBase::MaxWinners`. + * + * The dispatch origin must be Root. + * + * ## Complexity + * Same as [`Self::set_validator_count`]. + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: MultiAddress[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * ## Complexity + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (T::MaxNominations). + * - Both the reads and writes follow a similar pattern. + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: MultiAddress[] +} + +/** + * Pay out next page of the stakers behind a validator for the given era. + * + * - `validator_stash` is the stash account of the validator. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * The reward payout could be paged in case there are too many nominators backing the + * `validator_stash`. This call will payout unpaid pages in an ascending order. To claim a + * specific page, use `payout_stakers_by_page`.` + * + * If all pages are claimed, it returns an error `InvalidPage`. + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId32 + era: number +} + +/** + * Pay out a page of the stakers behind a validator for the given era and page. + * + * - `validator_stash` is the stash account of the validator. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * - `page` is the page index of nominators to pay out with value between 0 and + * `num_nominators / T::MaxExposurePageSize`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * If a validator has more than [`Config::MaxExposurePageSize`] nominators backing + * them, then the list of nominators is paged, with each page being capped at + * [`Config::MaxExposurePageSize`.] If a validator has more than one page of nominators, + * the call needs to be made for each page separately in order for all the nominators + * backing a validator to receive the reward. The nominators are not sorted across pages + * and so it should not be assumed the highest staker would be on the topmost page and vice + * versa. If rewards are not claimed in [`Config::HistoryDepth`] eras, they are lost. + */ +export interface StakingCall_payout_stakers_by_page { + __kind: 'payout_stakers_by_page' + validatorStash: AccountId32 + era: number + page: number +} + +/** + * Remove all data structures concerning a staker/stash once it is at a state where it can + * be considered `dust` in the staking system. The requirements are: + * + * 1. the `total_balance` of the stash is below existential deposit. + * 2. or, the `ledger.total` of the stash is below existential deposit. + * 3. or, existential deposit is zero and either `total_balance` or `ledger.total` is zero. + * + * The former can happen in cases like a slash; the latter when a fully unbonded account + * is still receiving staking rewards in `RewardDestination::Staked`. + * + * It can be called by anyone, as long as `stash` meets the above requirements. + * + * Refunds the transaction fees upon successful execution. + * + * ## Parameters + * + * - `num_slashing_spans`: Refer to comments on [`Call::withdraw_unbonded`] for more + * details. + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller. + * + * ## Complexity + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MaxUnlockingChunks`. + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Restores the state of a ledger which is in an inconsistent state. + * + * The requirements to restore a ledger are the following: + * * The stash is bonded; or + * * The stash is not bonded but it has a staking lock left behind; or + * * If the stash has an associated ledger and its state is inconsistent; or + * * If the ledger is not corrupted *but* its staking lock is out of sync. + * + * The `maybe_*` input parameters will overwrite the corresponding data and metadata of the + * ledger associated with the stash. If the input parameters are not set, the ledger will + * be reset values from on-chain state. + */ +export interface StakingCall_restore_ledger { + __kind: 'restore_ledger' + stash: AccountId32 + maybeController?: (AccountId32 | undefined) + maybeTotal?: (bigint | undefined) + maybeUnlocking?: (UnlockChunk[] | undefined) +} + +/** + * Scale up the ideal number of validators by a factor up to maximum of + * `ElectionProviderBase::MaxWinners`. + * + * The dispatch origin must be Root. + * + * ## Complexity + * Same as [`Self::set_validator_count`]. + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)sets the controller of a stash to the stash itself. This function previously + * accepted a `controller` argument to set the controller to an account other than the + * stash itself. This functionality has now been removed, now only setting the controller + * to the stash, if it is not already. + * + * Effects will be felt instantly (as soon as this function is completed successfully). + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * ## Complexity + * O(1) + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId32[] +} + +/** + * Sets the minimum amount of commission that each validators must maintain. + * + * This call has lower privilege requirements than `set_staking_config` and can be called + * by the `T::AdminOrigin`. Root can always call this. + */ +export interface StakingCall_set_min_commission { + __kind: 'set_min_commission' + new: Perbill +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt instantly (as soon as this function is completed successfully). + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * ## Complexity + * - O(1) + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Update the various staking configurations . + * + * * `min_nominator_bond`: The minimum active bond needed to be a nominator. + * * `min_validator_bond`: The minimum active bond needed to be a validator. + * * `max_nominator_count`: The max number of users who can be a nominator at once. When + * set to `None`, no limit is enforced. + * * `max_validator_count`: The max number of users who can be a validator at once. When + * set to `None`, no limit is enforced. + * * `chill_threshold`: The ratio of `max_nominator_count` or `max_validator_count` which + * should be filled in order for the `chill_other` transaction to work. + * * `min_commission`: The minimum amount of commission that each validators must maintain. + * This is checked only upon calling `validate`. Existing validators are not affected. + * + * RuntimeOrigin must be Root to call this function. + * + * NOTE: Existing nominators and validators will not be affected by this update. + * to kick people under the new limits, `chill_other` should be called. + */ +export interface StakingCall_set_staking_configs { + __kind: 'set_staking_configs' + minNominatorBond: ConfigOp + minValidatorBond: ConfigOp + maxNominatorCount: Type_114 + maxValidatorCount: Type_114 + chillThreshold: Type_115 + minCommission: Type_116 + maxStakedRewards: Type_115 +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * ## Complexity + * O(1) + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`) + * can co-exists at the same time. If there are no unlocking chunks slots available + * [`Call::withdraw_unbonded`] is called to remove some of the chunks (if possible). + * + * If a user encounters the `InsufficientBond` error when calling this extrinsic, + * they should call `chill` first in order to free up their bonded funds. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Migrates an account's `RewardDestination::Controller` to + * `RewardDestination::Account(controller)`. + * + * Effects will be felt instantly (as soon as this function is completed successfully). + * + * This will waive the transaction fee if the `payee` is successfully migrated. + */ +export interface StakingCall_update_payee { + __kind: 'update_payee' + controller: AccountId32 +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do whatever + * it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * ## Parameters + * + * - `num_slashing_spans` indicates the number of metadata slashing spans to clear when + * this call results in a complete removal of all the data related to the stash account. + * In this case, the `num_slashing_spans` must be larger or equal to the number of + * slashing spans associated with the stash account in the [`SlashingSpans`] storage type, + * otherwise the call will fail. The call weight is directly proportional to + * `num_slashing_spans`. + * + * ## Complexity + * O(S) where S is the number of slashing spans to remove + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bestow_membership: sts.enumStruct({ + candidate: AccountId32, + }), + bid: sts.enumStruct({ + value: sts.bigint(), + }), + claim_membership: sts.unit(), + cleanup_candidacy: sts.enumStruct({ + candidate: AccountId32, + max: sts.number(), + }), + cleanup_challenge: sts.enumStruct({ + challengeRound: sts.number(), + max: sts.number(), + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + dissolve: sts.unit(), + drop_candidate: sts.enumStruct({ + candidate: AccountId32, + }), + found_society: sts.enumStruct({ + founder: MultiAddress, + maxMembers: sts.number(), + maxIntake: sts.number(), + maxStrikes: sts.number(), + candidateDeposit: sts.bigint(), + rules: sts.bytes(), + }), + judge_suspended_member: sts.enumStruct({ + who: MultiAddress, + forgive: sts.boolean(), + }), + kick_candidate: sts.enumStruct({ + candidate: AccountId32, + }), + payout: sts.unit(), + punish_skeptic: sts.unit(), + resign_candidacy: sts.unit(), + set_parameters: sts.enumStruct({ + maxMembers: sts.number(), + maxIntake: sts.number(), + maxStrikes: sts.number(), + candidateDeposit: sts.bigint(), + }), + unbid: sts.unit(), + unvouch: sts.unit(), + vote: sts.enumStruct({ + candidate: MultiAddress, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: MultiAddress, + value: sts.bigint(), + tip: sts.bigint(), + }), + waive_repay: sts.enumStruct({ + amount: sts.bigint(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SocietyCall = SocietyCall_bestow_membership | SocietyCall_bid | SocietyCall_claim_membership | SocietyCall_cleanup_candidacy | SocietyCall_cleanup_challenge | SocietyCall_defender_vote | SocietyCall_dissolve | SocietyCall_drop_candidate | SocietyCall_found_society | SocietyCall_judge_suspended_member | SocietyCall_kick_candidate | SocietyCall_payout | SocietyCall_punish_skeptic | SocietyCall_resign_candidacy | SocietyCall_set_parameters | SocietyCall_unbid | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch | SocietyCall_waive_repay + +/** + * Transform an approved candidate into a member. Callable only by the Signed origin of the + * Founder, only after the period for voting has ended and only when the candidate is not + * clearly rejected. + */ +export interface SocietyCall_bestow_membership { + __kind: 'bestow_membership' + candidate: AccountId32 +} + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: The group's Candidate Deposit will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: bigint +} + +/** + * Transform an approved candidate into a member. Callable only by the + * the candidate, and only after the period for voting has ended. + */ +export interface SocietyCall_claim_membership { + __kind: 'claim_membership' +} + +/** + * Remove up to `max` stale votes for the given `candidate`. + * + * May be called by any Signed origin, but only after the candidate's candidacy is ended. + */ +export interface SocietyCall_cleanup_candidacy { + __kind: 'cleanup_candidacy' + candidate: AccountId32 + max: number +} + +/** + * Remove up to `max` stale votes for the defender in the given `challenge_round`. + * + * May be called by any Signed origin, but only after the challenge round is ended. + */ +export interface SocietyCall_cleanup_challenge { + __kind: 'cleanup_challenge' + challengeRound: number + max: number +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Dissolve the society and remove all members. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + */ +export interface SocietyCall_dissolve { + __kind: 'dissolve' +} + +/** + * Remove a `candidate`'s failed application from the society. Callable by any + * signed origin but only at the end of the subsequent round and only for + * a candidate with more rejections than approvals. + * + * The bid deposit is lost and the voucher is banned. + */ +export interface SocietyCall_drop_candidate { + __kind: 'drop_candidate' + candidate: AccountId32 +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * pallet to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `max_intake` - The maximum number of candidates per intake period. + * - `max_strikes`: The maximum number of strikes a member may get before they become + * suspended and may only be reinstated by the founder. + * - `candidate_deposit`: The deposit required to make a bid for membership of the group. + * - `rules` - The rules of this society concerning membership. + * + * Complexity: O(1) + */ +export interface SocietyCall_found_society { + __kind: 'found_society' + founder: MultiAddress + maxMembers: number + maxIntake: number + maxStrikes: number + candidateDeposit: bigint + rules: Bytes +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be Signed from the Founder. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin forgives + * (`true`) or rejects (`false`) a suspended member. + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: MultiAddress + forgive: boolean +} + +/** + * Remove the candidate's application from the society. Callable only by the Signed origin + * of the Founder, only after the period for voting has ended, and only when they do not + * have a clear approval. + * + * Any bid deposit is lost and voucher is banned. + */ +export interface SocietyCall_kick_candidate { + __kind: 'kick_candidate' + candidate: AccountId32 +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured + * payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Punish the skeptic with a strike if they did not vote on a candidate. Callable by the + * candidate. + */ +export interface SocietyCall_punish_skeptic { + __kind: 'punish_skeptic' +} + +/** + * Remove the candidate's application from the society. Callable only by the candidate. + * + * Any bid deposit is lost and voucher is banned. + */ +export interface SocietyCall_resign_candidacy { + __kind: 'resign_candidacy' +} + +/** + * Change the maximum number of members in society and the maximum number of new candidates + * in a single intake period. + * + * The dispatch origin for this call must be Signed by the Founder. + * + * Parameters: + * - `max_members` - The maximum number of members for the society. This must be no less + * than the current number of members. + * - `max_intake` - The maximum number of candidates per intake period. + * - `max_strikes`: The maximum number of strikes a member may get before they become + * suspended and may only be reinstated by the founder. + * - `candidate_deposit`: The deposit required to make a bid for membership of the group. + */ +export interface SocietyCall_set_parameters { + __kind: 'set_parameters' + maxMembers: number + maxIntake: number + maxStrikes: number + candidateDeposit: bigint +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + */ +export interface SocietyCall_unbid { + __kind: 'unbid' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be approved (`true`) or + * rejected (`false`). + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: MultiAddress + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: MultiAddress + value: bigint + tip: bigint +} + +/** + * Repay the payment previously given to the member with the signed origin, remove any + * pending payments, and elevate them from rank 0 to rank 1. + */ +export interface SocietyCall_waive_repay { + __kind: 'waive_repay' + amount: bigint +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: Id, + }), + force_lease: sts.enumStruct({ + para: Id, + leaser: AccountId32, + amount: sts.bigint(), + periodBegin: sts.number(), + periodCount: sts.number(), + }), + trigger_onboard: sts.enumStruct({ + para: Id, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * Clear all leases for a Para Id, refunding any deposits back to the original owners. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: Id +} + +/** + * Just a connect into the `lease_out` call, in case Root wants to force some lease to + * happen independently of any other on-chain mechanism to use it. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: Id + leaser: AccountId32 + amount: bigint + periodBegin: number + periodCount: number +} + +/** + * Try to onboard a parachain that has a lease for the current lease period. + * + * This function can be useful if there was some state issue with a para that should + * have onboarded, but was unable to. As long as they have a lease period, we can + * let them onboard from here. + * + * Origin must be signed, but can be called by anyone. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: Id +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: SessionKeys, + proof: sts.bytes(), + }), + } +}) + +export const SessionKeys: sts.Type = sts.struct(() => { + return { + grandpa: Public, + babe: sts.bytes(), + paraValidator: V7Public, + paraAssignment: sts.bytes(), + authorityDiscovery: sts.bytes(), + beefy: sts.bytes(), + } +}) + +export const V7Public = sts.bytes() + +export const Public = sts.bytes() + +export interface SessionKeys { + grandpa: Public + babe: Bytes + paraValidator: V7Public + paraAssignment: Bytes + authorityDiscovery: Bytes + beefy: Bytes +} + +export type V7Public = Bytes + +export type Public = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be Signed and the account must be either be + * convertible to a validator ID using the chain's typical addressing system (this usually + * means being a controller account) or directly convertible into a validator ID (which + * usually means being a stash account). + * + * ## Complexity + * - `O(1)` in number of key types. Actual cost depends on the number of length of + * `T::Keys::key_ids()` which is fixed. + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * ## Complexity + * - `O(1)`. Actual cost depends on the number of length of `T::Keys::key_ids()` which is + * fixed. + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: SessionKeys + proof: Bytes +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: sts.number(), + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + cancel_retry: sts.enumStruct({ + task: sts.tuple(() => [sts.number(), sts.number()]), + }), + cancel_retry_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_after: sts.enumStruct({ + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + set_retry: sts.enumStruct({ + task: sts.tuple(() => [sts.number(), sts.number()]), + retries: sts.number(), + period: sts.number(), + }), + set_retry_named: sts.enumStruct({ + id: sts.bytes(), + retries: sts.number(), + period: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_cancel_retry | SchedulerCall_cancel_retry_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after | SchedulerCall_set_retry | SchedulerCall_set_retry_named + +/** + * Cancel an anonymously scheduled task. + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: number + index: number +} + +/** + * Cancel a named scheduled task. + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Removes the retry configuration of a task. + */ +export interface SchedulerCall_cancel_retry { + __kind: 'cancel_retry' + task: [number, number] +} + +/** + * Cancel the retry configuration of a named task. + */ +export interface SchedulerCall_cancel_retry_named { + __kind: 'cancel_retry_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Anonymously schedule a task after a delay. + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Schedule a named task. + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Schedule a named task after a delay. + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Set a retry configuration for a task so that, in case its scheduled run fails, it will + * be retried after `period` blocks, for a total amount of `retries` retries or until it + * succeeds. + * + * Tasks which need to be scheduled for a retry are still subject to weight metering and + * agenda space, same as a regular task. If a periodic task fails, it will be scheduled + * normally while the task is retrying. + * + * Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic + * clones of the original task. Their retry configuration will be derived from the + * original task's configuration, but will have a lower value for `remaining` than the + * original `total_retries`. + */ +export interface SchedulerCall_set_retry { + __kind: 'set_retry' + task: [number, number] + retries: number + period: number +} + +/** + * Set a retry configuration for a named task so that, in case its scheduled run fails, it + * will be retried after `period` blocks, for a total amount of `retries` retries or until + * it succeeds. + * + * Tasks which need to be scheduled for a retry are still subject to weight metering and + * agenda space, same as a regular task. If a periodic task fails, it will be scheduled + * normally while the task is retrying. + * + * Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic + * clones of the original task. Their retry configuration will be derived from the + * original task's configuration, but will have a lower value for `remaining` than the + * original `total_retries`. + */ +export interface SchedulerCall_set_retry_named { + __kind: 'set_retry_named' + id: Bytes + retries: number + period: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + add_lock: sts.enumStruct({ + para: Id, + }), + deregister: sts.enumStruct({ + id: Id, + }), + force_register: sts.enumStruct({ + who: AccountId32, + deposit: sts.bigint(), + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + register: sts.enumStruct({ + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + remove_lock: sts.enumStruct({ + para: Id, + }), + reserve: sts.unit(), + schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + swap: sts.enumStruct({ + id: Id, + other: Id, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type RegistrarCall = RegistrarCall_add_lock | RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_register | RegistrarCall_remove_lock | RegistrarCall_reserve | RegistrarCall_schedule_code_upgrade | RegistrarCall_set_current_head | RegistrarCall_swap + +/** + * Add a manager lock from a para. This will prevent the manager of a + * para to deregister or swap a para. + * + * Can be called by Root, the parachain, or the parachain manager if the parachain is + * unlocked. + */ +export interface RegistrarCall_add_lock { + __kind: 'add_lock' + para: Id +} + +/** + * Deregister a Para Id, freeing all data and returning any deposit. + * + * The caller must be Root, the `para` owner, or the `para` itself. The para must be an + * on-demand parachain. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: Id +} + +/** + * Force the registration of a Para Id on the relay chain. + * + * This function must be called by a Root origin. + * + * The deposit taken can be specified for this registration. Any `ParaId` + * can be registered, including sub-1000 IDs which are System Parachains. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId32 + deposit: bigint + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Register head data and validation code for a reserved Para Id. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. + * - `id`: The para ID. Must be owned/managed by the `origin` signing account. + * - `genesis_head`: The genesis head data of the parachain/thread. + * - `validation_code`: The initial validation code of the parachain/thread. + * + * ## Deposits/Fees + * The account with the originating signature must reserve a deposit. + * + * The deposit is required to cover the costs associated with storing the genesis head + * data and the validation code. + * This accounts for the potential to store validation code of a size up to the + * `max_code_size`, as defined in the configuration pallet + * + * Anything already reserved previously for this para ID is accounted for. + * + * ## Events + * The `Registered` event is emitted in case of success. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Remove a manager lock from a para. This will allow the manager of a + * previously locked para to deregister or swap a para without using governance. + * + * Can only be called by the Root origin or the parachain. + */ +export interface RegistrarCall_remove_lock { + __kind: 'remove_lock' + para: Id +} + +/** + * Reserve a Para Id on the relay chain. + * + * This function will reserve a new Para Id to be owned/managed by the origin account. + * The origin account is able to register head data and validation code using `register` to + * create an on-demand parachain. Using the Slots pallet, an on-demand parachain can then + * be upgraded to a lease holding parachain. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new + * para ID. + * + * ## Deposits/Fees + * The origin must reserve a deposit of `ParaDeposit` for the registration. + * + * ## Events + * The `Reserved` event is emitted in case of success, which provides the ID reserved for + * use. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * Schedule a parachain upgrade. + * + * This will kick off a check of `new_code` by all validators. After the majority of the + * validators have reported on the validity of the code, the code will either be enacted + * or the upgrade will be rejected. If the code will be enacted, the current code of the + * parachain will be overwritten directly. This means that any PoV will be checked by this + * new code. The parachain itself will not be informed explicitly that the validation code + * has changed. + * + * Can be called by Root, the parachain, or the parachain manager if the parachain is + * unlocked. + */ +export interface RegistrarCall_schedule_code_upgrade { + __kind: 'schedule_code_upgrade' + para: Id + newCode: ValidationCode +} + +/** + * Set the parachain's current head. + * + * Can be called by Root, the parachain, or the parachain manager if the parachain is + * unlocked. + */ +export interface RegistrarCall_set_current_head { + __kind: 'set_current_head' + para: Id + newHead: HeadData +} + +/** + * Swap a lease holding parachain with another parachain, either on-demand or lease + * holding. + * + * The origin must be Root, the `para` owner, or the `para` itself. + * + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're an on-demand parachain or lease holding + * parachain), auction information and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: Id + other: Id +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ReferendaCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + index: sts.number(), + }), + kill: sts.enumStruct({ + index: sts.number(), + }), + nudge_referendum: sts.enumStruct({ + index: sts.number(), + }), + one_fewer_deciding: sts.enumStruct({ + track: sts.number(), + }), + place_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_submission_deposit: sts.enumStruct({ + index: sts.number(), + }), + set_metadata: sts.enumStruct({ + index: sts.number(), + maybeHash: sts.option(() => H256), + }), + submit: sts.enumStruct({ + proposalOrigin: OriginCaller, + proposal: Bounded, + enactmentMoment: DispatchTime, + }), + } +}) + +export const DispatchTime: sts.Type = sts.closedEnum(() => { + return { + After: sts.number(), + At: sts.number(), + } +}) + +export type DispatchTime = DispatchTime_After | DispatchTime_At + +export interface DispatchTime_After { + __kind: 'After' + value: number +} + +export interface DispatchTime_At { + __kind: 'At' + value: number +} + +export const Bounded: sts.Type = sts.closedEnum(() => { + return { + Inline: sts.bytes(), + Legacy: sts.enumStruct({ + hash: H256, + }), + Lookup: sts.enumStruct({ + hash: H256, + len: sts.number(), + }), + } +}) + +export type Bounded = Bounded_Inline | Bounded_Legacy | Bounded_Lookup + +export interface Bounded_Inline { + __kind: 'Inline' + value: Bytes +} + +export interface Bounded_Legacy { + __kind: 'Legacy' + hash: H256 +} + +export interface Bounded_Lookup { + __kind: 'Lookup' + hash: H256 + len: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ReferendaCall = ReferendaCall_cancel | ReferendaCall_kill | ReferendaCall_nudge_referendum | ReferendaCall_one_fewer_deciding | ReferendaCall_place_decision_deposit | ReferendaCall_refund_decision_deposit | ReferendaCall_refund_submission_deposit | ReferendaCall_set_metadata | ReferendaCall_submit + +/** + * Cancel an ongoing referendum. + * + * - `origin`: must be the `CancelOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Cancelled`. + */ +export interface ReferendaCall_cancel { + __kind: 'cancel' + index: number +} + +/** + * Cancel an ongoing referendum and slash the deposits. + * + * - `origin`: must be the `KillOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Killed` and `DepositSlashed`. + */ +export interface ReferendaCall_kill { + __kind: 'kill' + index: number +} + +/** + * Advance a referendum onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `index`: the referendum to be advanced. + */ +export interface ReferendaCall_nudge_referendum { + __kind: 'nudge_referendum' + index: number +} + +/** + * Advance a track onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `track`: the track to be advanced. + * + * Action item for when there is now one fewer referendum in the deciding phase and the + * `DecidingCount` is not yet updated. This means that we should either: + * - begin deciding another referendum (and leave `DecidingCount` alone); or + * - decrement `DecidingCount`. + */ +export interface ReferendaCall_one_fewer_deciding { + __kind: 'one_fewer_deciding' + track: number +} + +/** + * Post the Decision Deposit for a referendum. + * + * - `origin`: must be `Signed` and the account must have funds available for the + * referendum's track's Decision Deposit. + * - `index`: The index of the submitted referendum whose Decision Deposit is yet to be + * posted. + * + * Emits `DecisionDepositPlaced`. + */ +export interface ReferendaCall_place_decision_deposit { + __kind: 'place_decision_deposit' + index: number +} + +/** + * Refund the Decision Deposit for a closed referendum back to the depositor. + * + * - `origin`: must be `Signed` or `Root`. + * - `index`: The index of a closed referendum whose Decision Deposit has not yet been + * refunded. + * + * Emits `DecisionDepositRefunded`. + */ +export interface ReferendaCall_refund_decision_deposit { + __kind: 'refund_decision_deposit' + index: number +} + +/** + * Refund the Submission Deposit for a closed referendum back to the depositor. + * + * - `origin`: must be `Signed` or `Root`. + * - `index`: The index of a closed referendum whose Submission Deposit has not yet been + * refunded. + * + * Emits `SubmissionDepositRefunded`. + */ +export interface ReferendaCall_refund_submission_deposit { + __kind: 'refund_submission_deposit' + index: number +} + +/** + * Set or clear metadata of a referendum. + * + * Parameters: + * - `origin`: Must be `Signed` by a creator of a referendum or by anyone to clear a + * metadata of a finished referendum. + * - `index`: The index of a referendum to set or clear metadata for. + * - `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata. + */ +export interface ReferendaCall_set_metadata { + __kind: 'set_metadata' + index: number + maybeHash?: (H256 | undefined) +} + +/** + * Propose a referendum on a privileged action. + * + * - `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds + * available. + * - `proposal_origin`: The origin from which the proposal should be executed. + * - `proposal`: The proposal. + * - `enactment_moment`: The moment that the proposal should be enacted. + * + * Emits `Submitted`. + */ +export interface ReferendaCall_submit { + __kind: 'submit' + proposalOrigin: OriginCaller + proposal: Bounded + enactmentMoment: DispatchTime +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: MultiAddress, + call: Call, + }), + cancel_recovered: sts.enumStruct({ + account: MultiAddress, + }), + claim_recovery: sts.enumStruct({ + account: MultiAddress, + }), + close_recovery: sts.enumStruct({ + rescuer: MultiAddress, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId32), + threshold: sts.number(), + delayPeriod: sts.number(), + }), + initiate_recovery: sts.enumStruct({ + account: MultiAddress, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + vouch_recovery: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: MultiAddress + call: Call +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: MultiAddress +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully recovered by + * you. + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: MultiAddress +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: MultiAddress +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. Should be + * ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt before the + * account can be recovered. Should be less than or equal to the length of the list of + * friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized that + * needs to pass before the account can be recovered. + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId32[] + threshold: number + delayPeriod: number +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account needs to be + * recoverable (i.e. have a recovery configuration). + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: MultiAddress +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + announce: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + create_pure: sts.enumStruct({ + proxyType: ProxyType, + delay: sts.number(), + index: sts.number(), + }), + kill_pure: sts.enumStruct({ + spawner: MultiAddress, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + proxy_announced: sts.enumStruct({ + delegate: MultiAddress, + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + reject_announcement: sts.enumStruct({ + delegate: MultiAddress, + callHash: H256, + }), + remove_announcement: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_create_pure | ProxyCall_kill_pure | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: MultiAddress + callHash: H256 +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + */ +export interface ProxyCall_create_pure { + __kind: 'create_pure' + proxyType: ProxyType + delay: number + index: number +} + +/** + * Removes a previously spawned pure proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `pure` with corresponding parameters. + * + * - `spawner`: The account that originally called `pure` to create this account. + * - `index`: The disambiguation index originally passed to `pure`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `pure`. + * - `height`: The height of the chain when the call to `pure` was processed. + * - `ext_index`: The extrinsic index in which the call to `pure` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created pure + * account whose `pure` call has corresponding parameters. + */ +export interface ProxyCall_kill_pure { + __kind: 'kill_pure' + spawner: MultiAddress + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Dispatch the given `call` from an account that the sender is authorized for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: MultiAddress + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: MultiAddress + callHash: H256 +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: MultiAddress + callHash: H256 +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `pure`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_NominationPools | ProxyType_NonTransfer | ProxyType_Society | ProxyType_Spokesperson | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_NominationPools { + __kind: 'NominationPools' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Society { + __kind: 'Society' +} + +export interface ProxyType_Spokesperson { + __kind: 'Spokesperson' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const PreimageCall: sts.Type = sts.closedEnum(() => { + return { + ensure_updated: sts.enumStruct({ + hashes: sts.array(() => H256), + }), + note_preimage: sts.enumStruct({ + bytes: sts.bytes(), + }), + request_preimage: sts.enumStruct({ + hash: H256, + }), + unnote_preimage: sts.enumStruct({ + hash: H256, + }), + unrequest_preimage: sts.enumStruct({ + hash: H256, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type PreimageCall = PreimageCall_ensure_updated | PreimageCall_note_preimage | PreimageCall_request_preimage | PreimageCall_unnote_preimage | PreimageCall_unrequest_preimage + +/** + * Ensure that the a bulk of pre-images is upgraded. + * + * The caller pays no fee if at least 90% of pre-images were successfully updated. + */ +export interface PreimageCall_ensure_updated { + __kind: 'ensure_updated' + hashes: H256[] +} + +/** + * Register a preimage on-chain. + * + * If the preimage was previously requested, no fees or deposits are taken for providing + * the preimage. Otherwise, a deposit is taken proportional to the size of the preimage. + */ +export interface PreimageCall_note_preimage { + __kind: 'note_preimage' + bytes: Bytes +} + +/** + * Request a preimage be uploaded to the chain without paying any fees or deposits. + * + * If the preimage requests has already been provided on-chain, we unreserve any deposit + * a user may have paid, and take the control of the preimage out of their hands. + */ +export interface PreimageCall_request_preimage { + __kind: 'request_preimage' + hash: H256 +} + +/** + * Clear an unrequested preimage from the runtime storage. + * + * If `len` is provided, then it will be a much cheaper operation. + * + * - `hash`: The hash of the preimage to be removed from the store. + * - `len`: The length of the preimage of `hash`. + */ +export interface PreimageCall_unnote_preimage { + __kind: 'unnote_preimage' + hash: H256 +} + +/** + * Clear a previously made request for a preimage. + * + * NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. + */ +export interface PreimageCall_unrequest_preimage { + __kind: 'unrequest_preimage' + hash: H256 +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParasSlashingCall: sts.Type = sts.closedEnum(() => { + return { + report_dispute_lost_unsigned: sts.enumStruct({ + disputeProof: V7DisputeProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: sts.number(), + trieNodes: sts.array(() => sts.bytes()), + validatorCount: sts.number(), + } +}) + +export interface MembershipProof { + session: number + trieNodes: Bytes[] + validatorCount: number +} + +export const V7DisputeProof: sts.Type = sts.struct(() => { + return { + timeSlot: V7DisputesTimeSlot, + kind: V7SlashingOffenceKind, + validatorIndex: V7ValidatorIndex, + validatorId: V7Public, + } +}) + +export const V7ValidatorIndex = sts.number() + +export const V7SlashingOffenceKind: sts.Type = sts.closedEnum(() => { + return { + AgainstValid: sts.unit(), + ForInvalid: sts.unit(), + } +}) + +export type V7SlashingOffenceKind = V7SlashingOffenceKind_AgainstValid | V7SlashingOffenceKind_ForInvalid + +export interface V7SlashingOffenceKind_AgainstValid { + __kind: 'AgainstValid' +} + +export interface V7SlashingOffenceKind_ForInvalid { + __kind: 'ForInvalid' +} + +export const V7DisputesTimeSlot: sts.Type = sts.struct(() => { + return { + sessionIndex: sts.number(), + candidateHash: CandidateHash, + } +}) + +export const CandidateHash = sts.bytes() + +export interface V7DisputesTimeSlot { + sessionIndex: number + candidateHash: CandidateHash +} + +export type CandidateHash = Bytes + +export interface V7DisputeProof { + timeSlot: V7DisputesTimeSlot + kind: V7SlashingOffenceKind + validatorIndex: V7ValidatorIndex + validatorId: V7Public +} + +export type V7ValidatorIndex = number + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParasSlashingCall = ParasSlashingCall_report_dispute_lost_unsigned + +export interface ParasSlashingCall_report_dispute_lost_unsigned { + __kind: 'report_dispute_lost_unsigned' + disputeProof: V7DisputeProof + keyOwnerProof: MembershipProof +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParasSharedCall = never + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParasDisputesCall: sts.Type = sts.closedEnum(() => { + return { + force_unfreeze: sts.unit(), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParasDisputesCall = ParasDisputesCall_force_unfreeze + +export interface ParasDisputesCall_force_unfreeze { + __kind: 'force_unfreeze' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + add_trusted_validation_code: sts.enumStruct({ + validationCode: ValidationCode, + }), + force_note_new_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: Id, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + relayParentNumber: sts.number(), + }), + force_set_current_code: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_set_most_recent_context: sts.enumStruct({ + para: Id, + context: sts.number(), + }), + include_pvf_check_statement: sts.enumStruct({ + stmt: V7PvfCheckStatement, + signature: V7Signature, + }), + poke_unused_validation_code: sts.enumStruct({ + validationCodeHash: ValidationCodeHash, + }), + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const V7Signature = sts.bytes() + +export const V7PvfCheckStatement: sts.Type = sts.struct(() => { + return { + accept: sts.boolean(), + subject: ValidationCodeHash, + sessionIndex: sts.number(), + validatorIndex: V7ValidatorIndex, + } +}) + +export interface V7PvfCheckStatement { + accept: boolean + subject: ValidationCodeHash + sessionIndex: number + validatorIndex: V7ValidatorIndex +} + +export type ValidationCodeHash = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParasCall = ParasCall_add_trusted_validation_code | ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head | ParasCall_force_set_most_recent_context | ParasCall_include_pvf_check_statement | ParasCall_poke_unused_validation_code + +/** + * Adds the validation code to the storage. + * + * The code will not be added if it is already present. Additionally, if PVF pre-checking + * is running for that code, it will be instantly accepted. + * + * Otherwise, the code will be added into the storage. Note that the code will be added + * into storage with reference count 0. This is to account the fact that there are no users + * for this code yet. The caller will have to make sure that this code eventually gets + * used by some parachain or removed from the storage to avoid storage leaks. For the + * latter prefer to use the `poke_unused_validation_code` dispatchable to raw storage + * manipulation. + * + * This function is mainly meant to be used for upgrading parachains that do not follow + * the go-ahead signal while the PVF pre-checking feature is enabled. + */ +export interface ParasCall_add_trusted_validation_code { + __kind: 'add_trusted_validation_code' + validationCode: ValidationCode +} + +/** + * Note a new block head for para within the context of the current block. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: Id + newHead: HeadData +} + +/** + * Put a parachain directly into the next session's action queue. + * We can't queue it any sooner than this without going into the + * initializer... + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: Id +} + +/** + * Schedule an upgrade as if it was scheduled in the given relay parent block. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: Id + newCode: ValidationCode + relayParentNumber: number +} + +/** + * Set the storage for the parachain validation code immediately. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: Id + newCode: ValidationCode +} + +/** + * Set the storage for the current parachain head data immediately. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: Id + newHead: HeadData +} + +/** + * Set the storage for the current parachain head data immediately. + */ +export interface ParasCall_force_set_most_recent_context { + __kind: 'force_set_most_recent_context' + para: Id + context: number +} + +/** + * Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and + * enacts the results if that was the last vote before achieving the supermajority. + */ +export interface ParasCall_include_pvf_check_statement { + __kind: 'include_pvf_check_statement' + stmt: V7PvfCheckStatement + signature: V7Signature +} + +/** + * Remove the validation code from the storage iff the reference count is 0. + * + * This is better than removing the storage directly, because it will not remove the code + * that was suddenly got used by some parachain while this dispatchable was pending + * dispatching. + */ +export interface ParasCall_poke_unused_validation_code { + __kind: 'poke_unused_validation_code' + validationCodeHash: ValidationCodeHash +} + +export type V7Signature = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParametersCall: sts.Type = sts.closedEnum(() => { + return { + set_parameter: sts.enumStruct({ + keyValue: RuntimeParameters, + }), + } +}) + +export const RuntimeParameters: sts.Type = sts.closedEnum(() => { + return { + Inflation: Parameters, + } +}) + +export const Parameters: sts.Type = sts.closedEnum(() => { + return { + Falloff: sts.tuple(() => [Falloff, sts.option(() => Perquintill)]), + IdealStake: sts.tuple(() => [IdealStake, sts.option(() => Perquintill)]), + MaxInflation: sts.tuple(() => [MaxInflation, sts.option(() => Perquintill)]), + MinInflation: sts.tuple(() => [MinInflation, sts.option(() => Perquintill)]), + UseAuctionSlots: sts.tuple(() => [UseAuctionSlots, sts.option(() => sts.boolean())]), + } +}) + +export const UseAuctionSlots = sts.unit() + +export const MinInflation = sts.unit() + +export const MaxInflation = sts.unit() + +export const IdealStake = sts.unit() + +export const Perquintill = sts.bigint() + +export const Falloff = sts.unit() + +export type Parameters = Parameters_Falloff | Parameters_IdealStake | Parameters_MaxInflation | Parameters_MinInflation | Parameters_UseAuctionSlots + +export interface Parameters_Falloff { + __kind: 'Falloff' + value: [Falloff, (Perquintill | undefined)] +} + +export interface Parameters_IdealStake { + __kind: 'IdealStake' + value: [IdealStake, (Perquintill | undefined)] +} + +export interface Parameters_MaxInflation { + __kind: 'MaxInflation' + value: [MaxInflation, (Perquintill | undefined)] +} + +export interface Parameters_MinInflation { + __kind: 'MinInflation' + value: [MinInflation, (Perquintill | undefined)] +} + +export interface Parameters_UseAuctionSlots { + __kind: 'UseAuctionSlots' + value: [UseAuctionSlots, (boolean | undefined)] +} + +export type UseAuctionSlots = null + +export type MinInflation = null + +export type MaxInflation = null + +export type IdealStake = null + +export type Perquintill = bigint + +export type Falloff = null + +export type RuntimeParameters = RuntimeParameters_Inflation + +export interface RuntimeParameters_Inflation { + __kind: 'Inflation' + value: Parameters +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParametersCall = ParametersCall_set_parameter + +/** + * Set the value of a parameter. + * + * The dispatch origin of this call must be `AdminOrigin` for the given `key`. Values be + * deleted by setting them to `None`. + */ +export interface ParametersCall_set_parameter { + __kind: 'set_parameter' + keyValue: RuntimeParameters +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParaInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: V7InherentData, + }), + } +}) + +export const V7InherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => V7UncheckedSigned), + backedCandidates: sts.array(() => V7BackedCandidate), + disputes: sts.array(() => V7DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: H256, + number: sts.number(), + stateRoot: H256, + extrinsicsRoot: H256, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + Consensus: sts.tuple(() => [sts.bytes(), sts.bytes()]), + Other: sts.bytes(), + PreRuntime: sts.tuple(() => [sts.bytes(), sts.bytes()]), + RuntimeEnvironmentUpdated: sts.unit(), + Seal: sts.tuple(() => [sts.bytes(), sts.bytes()]), + } +}) + +export type DigestItem = DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: [Bytes, Bytes] +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: [Bytes, Bytes] +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: [Bytes, Bytes] +} + +export interface Digest { + logs: DigestItem[] +} + +export interface Header { + parentHash: H256 + number: number + stateRoot: H256 + extrinsicsRoot: H256 + digest: Digest +} + +export const V7DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: sts.number(), + statements: sts.array(() => sts.tuple(() => [V7DisputeStatement, V7ValidatorIndex, V7Signature])), + } +}) + +export const V7DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: V7InvalidDisputeStatementKind, + Valid: V7ValidDisputeStatementKind, + } +}) + +export const V7ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + ApprovalCheckingMultipleCandidates: sts.array(() => CandidateHash), + BackingSeconded: H256, + BackingValid: H256, + Explicit: sts.unit(), + } +}) + +export type V7ValidDisputeStatementKind = V7ValidDisputeStatementKind_ApprovalChecking | V7ValidDisputeStatementKind_ApprovalCheckingMultipleCandidates | V7ValidDisputeStatementKind_BackingSeconded | V7ValidDisputeStatementKind_BackingValid | V7ValidDisputeStatementKind_Explicit + +export interface V7ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface V7ValidDisputeStatementKind_ApprovalCheckingMultipleCandidates { + __kind: 'ApprovalCheckingMultipleCandidates' + value: CandidateHash[] +} + +export interface V7ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: H256 +} + +export interface V7ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: H256 +} + +export interface V7ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export const V7InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export type V7InvalidDisputeStatementKind = V7InvalidDisputeStatementKind_Explicit + +export interface V7InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type V7DisputeStatement = V7DisputeStatement_Invalid | V7DisputeStatement_Valid + +export interface V7DisputeStatement_Invalid { + __kind: 'Invalid' + value: V7InvalidDisputeStatementKind +} + +export interface V7DisputeStatement_Valid { + __kind: 'Valid' + value: V7ValidDisputeStatementKind +} + +export interface V7DisputeStatementSet { + candidateHash: CandidateHash + session: number + statements: [V7DisputeStatement, V7ValidatorIndex, V7Signature][] +} + +export const V7BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: V7CommittedCandidateReceipt, + validityVotes: sts.array(() => V7ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const V7ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: V7Signature, + Implicit: V7Signature, + } +}) + +export type V7ValidityAttestation = V7ValidityAttestation_Explicit | V7ValidityAttestation_Implicit + +export interface V7ValidityAttestation_Explicit { + __kind: 'Explicit' + value: V7Signature +} + +export interface V7ValidityAttestation_Implicit { + __kind: 'Implicit' + value: V7Signature +} + +export const V7CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: V7CandidateDescriptor, + commitments: V7CandidateCommitments, + } +}) + +export const V7CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => sts.bytes()), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: sts.number(), + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: Id, + data: sts.bytes(), + } +}) + +export interface OutboundHrmpMessage { + recipient: Id + data: Bytes +} + +export interface V7CandidateCommitments { + upwardMessages: Bytes[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: number +} + +export const V7CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: Id, + relayParent: H256, + collator: sts.bytes(), + persistedValidationDataHash: H256, + povHash: H256, + erasureRoot: H256, + signature: sts.bytes(), + paraHead: H256, + validationCodeHash: ValidationCodeHash, + } +}) + +export interface V7CandidateDescriptor { + paraId: Id + relayParent: H256 + collator: Bytes + persistedValidationDataHash: H256 + povHash: H256 + erasureRoot: H256 + signature: Bytes + paraHead: H256 + validationCodeHash: ValidationCodeHash +} + +export interface V7CommittedCandidateReceipt { + descriptor: V7CandidateDescriptor + commitments: V7CandidateCommitments +} + +export interface V7BackedCandidate { + candidate: V7CommittedCandidateReceipt + validityVotes: V7ValidityAttestation[] + validatorIndices: BitSequence +} + +export const V7UncheckedSigned: sts.Type = sts.struct(() => { + return { + payload: V7AvailabilityBitfield, + validatorIndex: V7ValidatorIndex, + signature: V7Signature, + } +}) + +export const V7AvailabilityBitfield = sts.bitseq() + +export interface V7UncheckedSigned { + payload: V7AvailabilityBitfield + validatorIndex: V7ValidatorIndex + signature: V7Signature +} + +export type V7AvailabilityBitfield = BitSequence + +export interface V7InherentData { + bitfields: V7UncheckedSigned[] + backedCandidates: V7BackedCandidate[] + disputes: V7DisputeStatementSet[] + parentHeader: Header +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParaInherentCall = ParaInherentCall_enter + +/** + * Enter the paras inherent. This will process bitfields and backed candidates. + */ +export interface ParaInherentCall_enter { + __kind: 'enter' + data: V7InherentData +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ParaInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ParaInclusionCall = never + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const OnDemandAssignmentProviderCall: sts.Type = sts.closedEnum(() => { + return { + place_order_allow_death: sts.enumStruct({ + maxAmount: sts.bigint(), + paraId: Id, + }), + place_order_keep_alive: sts.enumStruct({ + maxAmount: sts.bigint(), + paraId: Id, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type OnDemandAssignmentProviderCall = OnDemandAssignmentProviderCall_place_order_allow_death | OnDemandAssignmentProviderCall_place_order_keep_alive + +/** + * Create a single on demand core order. + * Will use the spot price for the current block and will reap the account if needed. + * + * Parameters: + * - `origin`: The sender of the call, funds will be withdrawn from this account. + * - `max_amount`: The maximum balance to withdraw from the origin to place an order. + * - `para_id`: A `ParaId` the origin wants to provide blockspace for. + * + * Errors: + * - `InsufficientBalance`: from the Currency implementation + * - `QueueFull` + * - `SpotPriceHigherThanMaxAmount` + * + * Events: + * - `OnDemandOrderPlaced` + */ +export interface OnDemandAssignmentProviderCall_place_order_allow_death { + __kind: 'place_order_allow_death' + maxAmount: bigint + paraId: Id +} + +/** + * Same as the [`place_order_allow_death`](Self::place_order_allow_death) call , but with a + * check that placing the order will not reap the account. + * + * Parameters: + * - `origin`: The sender of the call, funds will be withdrawn from this account. + * - `max_amount`: The maximum balance to withdraw from the origin to place an order. + * - `para_id`: A `ParaId` the origin wants to provide blockspace for. + * + * Errors: + * - `InsufficientBalance`: from the Currency implementation + * - `QueueFull` + * - `SpotPriceHigherThanMaxAmount` + * + * Events: + * - `OnDemandOrderPlaced` + */ +export interface OnDemandAssignmentProviderCall_place_order_keep_alive { + __kind: 'place_order_keep_alive' + maxAmount: bigint + paraId: Id +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const NominationPoolsCall: sts.Type = sts.closedEnum(() => { + return { + adjust_pool_deposit: sts.enumStruct({ + poolId: sts.number(), + }), + apply_slash: sts.enumStruct({ + memberAccount: MultiAddress, + }), + bond_extra: sts.enumStruct({ + extra: BondExtra, + }), + bond_extra_other: sts.enumStruct({ + member: MultiAddress, + extra: BondExtra, + }), + chill: sts.enumStruct({ + poolId: sts.number(), + }), + claim_commission: sts.enumStruct({ + poolId: sts.number(), + }), + claim_payout: sts.unit(), + claim_payout_other: sts.enumStruct({ + other: AccountId32, + }), + create: sts.enumStruct({ + amount: sts.bigint(), + root: MultiAddress, + nominator: MultiAddress, + bouncer: MultiAddress, + }), + create_with_pool_id: sts.enumStruct({ + amount: sts.bigint(), + root: MultiAddress, + nominator: MultiAddress, + bouncer: MultiAddress, + poolId: sts.number(), + }), + join: sts.enumStruct({ + amount: sts.bigint(), + poolId: sts.number(), + }), + migrate_delegation: sts.enumStruct({ + memberAccount: MultiAddress, + }), + migrate_pool_to_delegate_stake: sts.enumStruct({ + poolId: sts.number(), + }), + nominate: sts.enumStruct({ + poolId: sts.number(), + validators: sts.array(() => AccountId32), + }), + pool_withdraw_unbonded: sts.enumStruct({ + poolId: sts.number(), + numSlashingSpans: sts.number(), + }), + set_claim_permission: sts.enumStruct({ + permission: ClaimPermission, + }), + set_commission: sts.enumStruct({ + poolId: sts.number(), + newCommission: sts.option(() => sts.tuple(() => [Perbill, AccountId32])), + }), + set_commission_change_rate: sts.enumStruct({ + poolId: sts.number(), + changeRate: CommissionChangeRate, + }), + set_commission_claim_permission: sts.enumStruct({ + poolId: sts.number(), + permission: sts.option(() => CommissionClaimPermission), + }), + set_commission_max: sts.enumStruct({ + poolId: sts.number(), + maxCommission: Perbill, + }), + set_configs: sts.enumStruct({ + minJoinBond: Type_291, + minCreateBond: Type_291, + maxPools: Type_292, + maxMembers: Type_292, + maxMembersPerPool: Type_292, + globalMaxCommission: Type_293, + }), + set_metadata: sts.enumStruct({ + poolId: sts.number(), + metadata: sts.bytes(), + }), + set_state: sts.enumStruct({ + poolId: sts.number(), + state: PoolState, + }), + unbond: sts.enumStruct({ + memberAccount: MultiAddress, + unbondingPoints: sts.bigint(), + }), + update_roles: sts.enumStruct({ + poolId: sts.number(), + newRoot: Type_294, + newNominator: Type_294, + newBouncer: Type_294, + }), + withdraw_unbonded: sts.enumStruct({ + memberAccount: MultiAddress, + numSlashingSpans: sts.number(), + }), + } +}) + +export const Type_294: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: AccountId32, + } +}) + +export type Type_294 = Type_294_Noop | Type_294_Remove | Type_294_Set + +export interface Type_294_Noop { + __kind: 'Noop' +} + +export interface Type_294_Remove { + __kind: 'Remove' +} + +export interface Type_294_Set { + __kind: 'Set' + value: AccountId32 +} + +export const PoolState: sts.Type = sts.closedEnum(() => { + return { + Blocked: sts.unit(), + Destroying: sts.unit(), + Open: sts.unit(), + } +}) + +export type PoolState = PoolState_Blocked | PoolState_Destroying | PoolState_Open + +export interface PoolState_Blocked { + __kind: 'Blocked' +} + +export interface PoolState_Destroying { + __kind: 'Destroying' +} + +export interface PoolState_Open { + __kind: 'Open' +} + +export const Type_293: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export type Type_293 = Type_293_Noop | Type_293_Remove | Type_293_Set + +export interface Type_293_Noop { + __kind: 'Noop' +} + +export interface Type_293_Remove { + __kind: 'Remove' +} + +export interface Type_293_Set { + __kind: 'Set' + value: Perbill +} + +export const Type_292: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_292 = Type_292_Noop | Type_292_Remove | Type_292_Set + +export interface Type_292_Noop { + __kind: 'Noop' +} + +export interface Type_292_Remove { + __kind: 'Remove' +} + +export interface Type_292_Set { + __kind: 'Set' + value: number +} + +export const Type_291: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type Type_291 = Type_291_Noop | Type_291_Remove | Type_291_Set + +export interface Type_291_Noop { + __kind: 'Noop' +} + +export interface Type_291_Remove { + __kind: 'Remove' +} + +export interface Type_291_Set { + __kind: 'Set' + value: bigint +} + +export const CommissionClaimPermission: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Permissionless: sts.unit(), + } +}) + +export type CommissionClaimPermission = CommissionClaimPermission_Account | CommissionClaimPermission_Permissionless + +export interface CommissionClaimPermission_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface CommissionClaimPermission_Permissionless { + __kind: 'Permissionless' +} + +export const CommissionChangeRate: sts.Type = sts.struct(() => { + return { + maxIncrease: Perbill, + minDelay: sts.number(), + } +}) + +export interface CommissionChangeRate { + maxIncrease: Perbill + minDelay: number +} + +export const ClaimPermission: sts.Type = sts.closedEnum(() => { + return { + Permissioned: sts.unit(), + PermissionlessAll: sts.unit(), + PermissionlessCompound: sts.unit(), + PermissionlessWithdraw: sts.unit(), + } +}) + +export type ClaimPermission = ClaimPermission_Permissioned | ClaimPermission_PermissionlessAll | ClaimPermission_PermissionlessCompound | ClaimPermission_PermissionlessWithdraw + +export interface ClaimPermission_Permissioned { + __kind: 'Permissioned' +} + +export interface ClaimPermission_PermissionlessAll { + __kind: 'PermissionlessAll' +} + +export interface ClaimPermission_PermissionlessCompound { + __kind: 'PermissionlessCompound' +} + +export interface ClaimPermission_PermissionlessWithdraw { + __kind: 'PermissionlessWithdraw' +} + +export const BondExtra: sts.Type = sts.closedEnum(() => { + return { + FreeBalance: sts.bigint(), + Rewards: sts.unit(), + } +}) + +export type BondExtra = BondExtra_FreeBalance | BondExtra_Rewards + +export interface BondExtra_FreeBalance { + __kind: 'FreeBalance' + value: bigint +} + +export interface BondExtra_Rewards { + __kind: 'Rewards' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type NominationPoolsCall = NominationPoolsCall_adjust_pool_deposit | NominationPoolsCall_apply_slash | NominationPoolsCall_bond_extra | NominationPoolsCall_bond_extra_other | NominationPoolsCall_chill | NominationPoolsCall_claim_commission | NominationPoolsCall_claim_payout | NominationPoolsCall_claim_payout_other | NominationPoolsCall_create | NominationPoolsCall_create_with_pool_id | NominationPoolsCall_join | NominationPoolsCall_migrate_delegation | NominationPoolsCall_migrate_pool_to_delegate_stake | NominationPoolsCall_nominate | NominationPoolsCall_pool_withdraw_unbonded | NominationPoolsCall_set_claim_permission | NominationPoolsCall_set_commission | NominationPoolsCall_set_commission_change_rate | NominationPoolsCall_set_commission_claim_permission | NominationPoolsCall_set_commission_max | NominationPoolsCall_set_configs | NominationPoolsCall_set_metadata | NominationPoolsCall_set_state | NominationPoolsCall_unbond | NominationPoolsCall_update_roles | NominationPoolsCall_withdraw_unbonded + +/** + * Top up the deficit or withdraw the excess ED from the pool. + * + * When a pool is created, the pool depositor transfers ED to the reward account of the + * pool. ED is subject to change and over time, the deposit in the reward account may be + * insufficient to cover the ED deficit of the pool or vice-versa where there is excess + * deposit to the pool. This call allows anyone to adjust the ED deposit of the + * pool by either topping up the deficit or claiming the excess. + */ +export interface NominationPoolsCall_adjust_pool_deposit { + __kind: 'adjust_pool_deposit' + poolId: number +} + +/** + * Apply a pending slash on a member. + * + * Fails unless [`crate::pallet::Config::StakeAdapter`] is of strategy type: + * [`adapter::StakeStrategyType::Delegate`]. + * + * This call can be dispatched permissionlessly (i.e. by any account). If the member has + * slash to be applied, caller may be rewarded with the part of the slash. + */ +export interface NominationPoolsCall_apply_slash { + __kind: 'apply_slash' + memberAccount: MultiAddress +} + +/** + * Bond `extra` more funds from `origin` into the pool to which they already belong. + * + * Additional funds can come from either the free balance of the account, of from the + * accumulated rewards, see [`BondExtra`]. + * + * Bonding extra funds implies an automatic payout of all pending rewards as well. + * See `bond_extra_other` to bond pending rewards of `other` members. + */ +export interface NominationPoolsCall_bond_extra { + __kind: 'bond_extra' + extra: BondExtra +} + +/** + * `origin` bonds funds from `extra` for some pool member `member` into their respective + * pools. + * + * `origin` can bond extra funds from free balance or pending rewards when `origin == + * other`. + * + * In the case of `origin != other`, `origin` can only bond extra pending rewards of + * `other` members assuming set_claim_permission for the given member is + * `PermissionlessCompound` or `PermissionlessAll`. + */ +export interface NominationPoolsCall_bond_extra_other { + __kind: 'bond_extra_other' + member: MultiAddress + extra: BondExtra +} + +/** + * Chill on behalf of the pool. + * + * The dispatch origin of this call can be signed by the pool nominator or the pool + * root role, same as [`Pallet::nominate`]. + * + * Under certain conditions, this call can be dispatched permissionlessly (i.e. by any + * account). + * + * # Conditions for a permissionless dispatch: + * * When pool depositor has less than `MinNominatorBond` staked, otherwise pool members + * are unable to unbond. + * + * # Conditions for permissioned dispatch: + * * The caller has a nominator or root role of the pool. + * This directly forward the call to the staking pallet, on behalf of the pool bonded + * account. + */ +export interface NominationPoolsCall_chill { + __kind: 'chill' + poolId: number +} + +/** + * Claim pending commission. + * + * The dispatch origin of this call must be signed by the `root` role of the pool. Pending + * commission is paid out and added to total claimed commission`. Total pending commission + * is reset to zero. the current. + */ +export interface NominationPoolsCall_claim_commission { + __kind: 'claim_commission' + poolId: number +} + +/** + * A bonded member can use this to claim their payout based on the rewards that the pool + * has accumulated since their last claimed payout (OR since joining if this is their first + * time claiming rewards). The payout will be transferred to the member's account. + * + * The member will earn rewards pro rata based on the members stake vs the sum of the + * members in the pools stake. Rewards do not "expire". + * + * See `claim_payout_other` to claim rewards on behalf of some `other` pool member. + */ +export interface NominationPoolsCall_claim_payout { + __kind: 'claim_payout' +} + +/** + * `origin` can claim payouts on some pool member `other`'s behalf. + * + * Pool member `other` must have a `PermissionlessWithdraw` or `PermissionlessAll` claim + * permission for this call to be successful. + */ +export interface NominationPoolsCall_claim_payout_other { + __kind: 'claim_payout_other' + other: AccountId32 +} + +/** + * Create a new delegation pool. + * + * # Arguments + * + * * `amount` - The amount of funds to delegate to the pool. This also acts of a sort of + * deposit since the pools creator cannot fully unbond funds until the pool is being + * destroyed. + * * `index` - A disambiguation index for creating the account. Likely only useful when + * creating multiple pools in the same extrinsic. + * * `root` - The account to set as [`PoolRoles::root`]. + * * `nominator` - The account to set as the [`PoolRoles::nominator`]. + * * `bouncer` - The account to set as the [`PoolRoles::bouncer`]. + * + * # Note + * + * In addition to `amount`, the caller will transfer the existential deposit; so the caller + * needs at have at least `amount + existential_deposit` transferable. + */ +export interface NominationPoolsCall_create { + __kind: 'create' + amount: bigint + root: MultiAddress + nominator: MultiAddress + bouncer: MultiAddress +} + +/** + * Create a new delegation pool with a previously used pool id + * + * # Arguments + * + * same as `create` with the inclusion of + * * `pool_id` - `A valid PoolId. + */ +export interface NominationPoolsCall_create_with_pool_id { + __kind: 'create_with_pool_id' + amount: bigint + root: MultiAddress + nominator: MultiAddress + bouncer: MultiAddress + poolId: number +} + +/** + * Stake funds with a pool. The amount to bond is transferred from the member to the + * pools account and immediately increases the pools bond. + * + * # Note + * + * * An account can only be a member of a single pool. + * * An account cannot join the same pool multiple times. + * * This call will *not* dust the member account, so the member must have at least + * `existential deposit + amount` in their account. + * * Only a pool with [`PoolState::Open`] can be joined + */ +export interface NominationPoolsCall_join { + __kind: 'join' + amount: bigint + poolId: number +} + +/** + * Migrates delegated funds from the pool account to the `member_account`. + * + * Fails unless [`crate::pallet::Config::StakeAdapter`] is of strategy type: + * [`adapter::StakeStrategyType::Delegate`]. + * + * This is a permission-less call and refunds any fee if claim is successful. + * + * If the pool has migrated to delegation based staking, the staked tokens of pool members + * can be moved and held in their own account. See [`adapter::DelegateStake`] + */ +export interface NominationPoolsCall_migrate_delegation { + __kind: 'migrate_delegation' + memberAccount: MultiAddress +} + +/** + * Migrate pool from [`adapter::StakeStrategyType::Transfer`] to + * [`adapter::StakeStrategyType::Delegate`]. + * + * Fails unless [`crate::pallet::Config::StakeAdapter`] is of strategy type: + * [`adapter::StakeStrategyType::Delegate`]. + * + * This call can be dispatched permissionlessly, and refunds any fee if successful. + * + * If the pool has already migrated to delegation based staking, this call will fail. + */ +export interface NominationPoolsCall_migrate_pool_to_delegate_stake { + __kind: 'migrate_pool_to_delegate_stake' + poolId: number +} + +/** + * Nominate on behalf of the pool. + * + * The dispatch origin of this call must be signed by the pool nominator or the pool + * root role. + * + * This directly forward the call to the staking pallet, on behalf of the pool bonded + * account. + * + * # Note + * + * In addition to a `root` or `nominator` role of `origin`, pool's depositor needs to have + * at least `depositor_min_bond` in the pool to start nominating. + */ +export interface NominationPoolsCall_nominate { + __kind: 'nominate' + poolId: number + validators: AccountId32[] +} + +/** + * Call `withdraw_unbonded` for the pools account. This call can be made by any account. + * + * This is useful if there are too many unlocking chunks to call `unbond`, and some + * can be cleared by withdrawing. In the case there are too many unlocking chunks, the user + * would probably see an error like `NoMoreChunks` emitted from the staking system when + * they attempt to unbond. + */ +export interface NominationPoolsCall_pool_withdraw_unbonded { + __kind: 'pool_withdraw_unbonded' + poolId: number + numSlashingSpans: number +} + +/** + * Allows a pool member to set a claim permission to allow or disallow permissionless + * bonding and withdrawing. + * + * # Arguments + * + * * `origin` - Member of a pool. + * * `permission` - The permission to be applied. + */ +export interface NominationPoolsCall_set_claim_permission { + __kind: 'set_claim_permission' + permission: ClaimPermission +} + +/** + * Set the commission of a pool. + * Both a commission percentage and a commission payee must be provided in the `current` + * tuple. Where a `current` of `None` is provided, any current commission will be removed. + * + * - If a `None` is supplied to `new_commission`, existing commission will be removed. + */ +export interface NominationPoolsCall_set_commission { + __kind: 'set_commission' + poolId: number + newCommission?: ([Perbill, AccountId32] | undefined) +} + +/** + * Set the commission change rate for a pool. + * + * Initial change rate is not bounded, whereas subsequent updates can only be more + * restrictive than the current. + */ +export interface NominationPoolsCall_set_commission_change_rate { + __kind: 'set_commission_change_rate' + poolId: number + changeRate: CommissionChangeRate +} + +/** + * Set or remove a pool's commission claim permission. + * + * Determines who can claim the pool's pending commission. Only the `Root` role of the pool + * is able to configure commission claim permissions. + */ +export interface NominationPoolsCall_set_commission_claim_permission { + __kind: 'set_commission_claim_permission' + poolId: number + permission?: (CommissionClaimPermission | undefined) +} + +/** + * Set the maximum commission of a pool. + * + * - Initial max can be set to any `Perbill`, and only smaller values thereafter. + * - Current commission will be lowered in the event it is higher than a new max + * commission. + */ +export interface NominationPoolsCall_set_commission_max { + __kind: 'set_commission_max' + poolId: number + maxCommission: Perbill +} + +/** + * Update configurations for the nomination pools. The origin for this call must be + * [`Config::AdminOrigin`]. + * + * # Arguments + * + * * `min_join_bond` - Set [`MinJoinBond`]. + * * `min_create_bond` - Set [`MinCreateBond`]. + * * `max_pools` - Set [`MaxPools`]. + * * `max_members` - Set [`MaxPoolMembers`]. + * * `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]. + * * `global_max_commission` - Set [`GlobalMaxCommission`]. + */ +export interface NominationPoolsCall_set_configs { + __kind: 'set_configs' + minJoinBond: Type_291 + minCreateBond: Type_291 + maxPools: Type_292 + maxMembers: Type_292 + maxMembersPerPool: Type_292 + globalMaxCommission: Type_293 +} + +/** + * Set a new metadata for the pool. + * + * The dispatch origin of this call must be signed by the bouncer, or the root role of the + * pool. + */ +export interface NominationPoolsCall_set_metadata { + __kind: 'set_metadata' + poolId: number + metadata: Bytes +} + +/** + * Set a new state for the pool. + * + * If a pool is already in the `Destroying` state, then under no condition can its state + * change again. + * + * The dispatch origin of this call must be either: + * + * 1. signed by the bouncer, or the root role of the pool, + * 2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and + * then the state of the pool can be permissionlessly changed to `Destroying`. + */ +export interface NominationPoolsCall_set_state { + __kind: 'set_state' + poolId: number + state: PoolState +} + +/** + * Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It + * implicitly collects the rewards one last time, since not doing so would mean some + * rewards would be forfeited. + * + * Under certain conditions, this call can be dispatched permissionlessly (i.e. by any + * account). + * + * # Conditions for a permissionless dispatch. + * + * * The pool is blocked and the caller is either the root or bouncer. This is refereed to + * as a kick. + * * The pool is destroying and the member is not the depositor. + * * The pool is destroying, the member is the depositor and no other members are in the + * pool. + * + * ## Conditions for permissioned dispatch (i.e. the caller is also the + * `member_account`): + * + * * The caller is not the depositor. + * * The caller is the depositor, the pool is destroying and no other members are in the + * pool. + * + * # Note + * + * If there are too many unlocking chunks to unbond with the pool account, + * [`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks. + * The [`StakingInterface::unbond`] will implicitly call [`Call::pool_withdraw_unbonded`] + * to try to free chunks if necessary (ie. if unbound was called and no unlocking chunks + * are available). However, it may not be possible to release the current unlocking chunks, + * in which case, the result of this call will likely be the `NoMoreChunks` error from the + * staking system. + */ +export interface NominationPoolsCall_unbond { + __kind: 'unbond' + memberAccount: MultiAddress + unbondingPoints: bigint +} + +/** + * Update the roles of the pool. + * + * The root is the only entity that can change any of the roles, including itself, + * excluding the depositor, who can never change. + * + * It emits an event, notifying UIs of the role change. This event is quite relevant to + * most pool members and they should be informed of changes to pool roles. + */ +export interface NominationPoolsCall_update_roles { + __kind: 'update_roles' + poolId: number + newRoot: Type_294 + newNominator: Type_294 + newBouncer: Type_294 +} + +/** + * Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an + * error is returned. + * + * Under certain conditions, this call can be dispatched permissionlessly (i.e. by any + * account). + * + * # Conditions for a permissionless dispatch + * + * * The pool is in destroy mode and the target is not the depositor. + * * The target is the depositor and they are the only member in the sub pools. + * * The pool is blocked and the caller is either the root or bouncer. + * + * # Conditions for permissioned dispatch + * + * * The caller is the target and they are not the depositor. + * + * # Note + * + * - If the target is the depositor, the pool will be destroyed. + * - If the pool has any pending slash, we also try to slash the member before letting them + * withdraw. This calculation adds some weight overhead and is only defensive. In reality, + * pool slashes must have been already applied via permissionless [`Call::apply_slash`]. + */ +export interface NominationPoolsCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + memberAccount: MultiAddress + numSlashingSpans: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const NisCounterpartBalancesCall: sts.Type = sts.closedEnum(() => { + return { + burn: sts.enumStruct({ + value: sts.bigint(), + keepAlive: sts.boolean(), + }), + force_adjust_total_issuance: sts.enumStruct({ + direction: AdjustmentDirection, + delta: sts.bigint(), + }), + force_set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + }), + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_allow_death: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + upgrade_accounts: sts.enumStruct({ + who: sts.array(() => AccountId32), + }), + } +}) + +export const AdjustmentDirection: sts.Type = sts.closedEnum(() => { + return { + Decrease: sts.unit(), + Increase: sts.unit(), + } +}) + +export type AdjustmentDirection = AdjustmentDirection_Decrease | AdjustmentDirection_Increase + +export interface AdjustmentDirection_Decrease { + __kind: 'Decrease' +} + +export interface AdjustmentDirection_Increase { + __kind: 'Increase' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type NisCounterpartBalancesCall = NisCounterpartBalancesCall_burn | NisCounterpartBalancesCall_force_adjust_total_issuance | NisCounterpartBalancesCall_force_set_balance | NisCounterpartBalancesCall_force_transfer | NisCounterpartBalancesCall_force_unreserve | NisCounterpartBalancesCall_transfer_all | NisCounterpartBalancesCall_transfer_allow_death | NisCounterpartBalancesCall_transfer_keep_alive | NisCounterpartBalancesCall_upgrade_accounts + +/** + * Burn the specified liquid free balance from the origin account. + * + * If the origin's account ends up below the existential deposit as a result + * of the burn and `keep_alive` is false, the account will be reaped. + * + * Unlike sending funds to a _burn_ address, which merely makes the funds inaccessible, + * this `burn` operation will reduce total issuance by the amount _burned_. + */ +export interface NisCounterpartBalancesCall_burn { + __kind: 'burn' + value: bigint + keepAlive: boolean +} + +/** + * Adjust the total issuance in a saturating way. + * + * Can only be called by root and always needs a positive `delta`. + * + * # Example + */ +export interface NisCounterpartBalancesCall_force_adjust_total_issuance { + __kind: 'force_adjust_total_issuance' + direction: AdjustmentDirection + delta: bigint +} + +/** + * Set the regular balance of a given account. + * + * The dispatch origin for this call is `root`. + */ +export interface NisCounterpartBalancesCall_force_set_balance { + __kind: 'force_set_balance' + who: MultiAddress + newFree: bigint +} + +/** + * Exactly as `transfer_allow_death`, except the origin must be root and the source account + * may be specified. + */ +export interface NisCounterpartBalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * Unreserve some balance from a user by force. + * + * Can only be called by ROOT. + */ +export interface NisCounterpartBalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). + */ +export interface NisCounterpartBalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer_allow_death` will set the `FreeBalance` of the sender and receiver. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + */ +export interface NisCounterpartBalancesCall_transfer_allow_death { + __kind: 'transfer_allow_death' + dest: MultiAddress + value: bigint +} + +/** + * Same as the [`transfer_allow_death`] call, but with a check that the transfer will not + * kill the origin account. + * + * 99% of the time you want [`transfer_allow_death`] instead. + * + * [`transfer_allow_death`]: struct.Pallet.html#method.transfer + */ +export interface NisCounterpartBalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * Upgrade a specified account. + * + * - `origin`: Must be `Signed`. + * - `who`: The account to be upgraded. + * + * This will waive the transaction fee if at least all but 10% of the accounts needed to + * be upgraded. (We let some not have to be upgraded just in order to allow for the + * possibility of churn). + */ +export interface NisCounterpartBalancesCall_upgrade_accounts { + __kind: 'upgrade_accounts' + who: AccountId32[] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const NisCall: sts.Type = sts.closedEnum(() => { + return { + communify: sts.enumStruct({ + index: sts.number(), + }), + fund_deficit: sts.unit(), + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + privatize: sts.enumStruct({ + index: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + thaw_communal: sts.enumStruct({ + index: sts.number(), + }), + thaw_private: sts.enumStruct({ + index: sts.number(), + maybeProportion: sts.option(() => Perquintill), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type NisCall = NisCall_communify | NisCall_fund_deficit | NisCall_place_bid | NisCall_privatize | NisCall_retract_bid | NisCall_thaw_communal | NisCall_thaw_private + +/** + * Make a private receipt communal and create fungible counterparts for its owner. + */ +export interface NisCall_communify { + __kind: 'communify' + index: number +} + +/** + * Ensure we have sufficient funding for all potential payouts. + * + * - `origin`: Must be accepted by `FundOrigin`. + */ +export interface NisCall_fund_deficit { + __kind: 'fund_deficit' +} + +/** + * Place a bid. + * + * Origin must be Signed, and account must have at least `amount` in free balance. + * + * - `amount`: The amount of the bid; these funds will be reserved, and if/when + * consolidated, removed. Must be at least `MinBid`. + * - `duration`: The number of periods before which the newly consolidated bid may be + * thawed. Must be greater than 1 and no more than `QueueCount`. + * + * Complexities: + * - `Queues[duration].len()` (just take max). + */ +export interface NisCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * Make a communal receipt private and burn fungible counterparts from its owner. + */ +export interface NisCall_privatize { + __kind: 'privatize' + index: number +} + +/** + * Retract a previously placed bid. + * + * Origin must be Signed, and the account should have previously issued a still-active bid + * of `amount` for `duration`. + * + * - `amount`: The amount of the previous bid. + * - `duration`: The duration of the previous bid. + */ +export interface NisCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * Reduce or remove an outstanding receipt, placing the according proportion of funds into + * the account of the owner. + * + * - `origin`: Must be Signed and the account must be the owner of the fungible counterpart + * for receipt `index`. + * - `index`: The index of the receipt. + */ +export interface NisCall_thaw_communal { + __kind: 'thaw_communal' + index: number +} + +/** + * Reduce or remove an outstanding receipt, placing the according proportion of funds into + * the account of the owner. + * + * - `origin`: Must be Signed and the account must be the owner of the receipt `index` as + * well as any fungible counterpart. + * - `index`: The index of the receipt. + * - `portion`: If `Some`, then only the given portion of the receipt should be thawed. If + * `None`, then all of it should be. + */ +export interface NisCall_thaw_private { + __kind: 'thaw_private' + index: number + maybeProportion?: (Perquintill | undefined) +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + call: Call, + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId32), + call: Call, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * ## Complexity + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * ## Complexity + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + call: Call + maxWeight: Weight +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * ## Complexity + * O(Z + C) where Z is the length of the call and C its execution weight. + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId32[] + call: Call +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * ## Complexity + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId32[] + timepoint: Timepoint + callHash: Bytes +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const MessageQueueCall: sts.Type = sts.closedEnum(() => { + return { + execute_overweight: sts.enumStruct({ + messageOrigin: AggregateMessageOrigin, + page: sts.number(), + index: sts.number(), + weightLimit: Weight, + }), + reap_page: sts.enumStruct({ + messageOrigin: AggregateMessageOrigin, + pageIndex: sts.number(), + }), + } +}) + +export const AggregateMessageOrigin: sts.Type = sts.closedEnum(() => { + return { + Ump: UmpQueueId, + } +}) + +export const UmpQueueId: sts.Type = sts.closedEnum(() => { + return { + Para: Id, + } +}) + +export type UmpQueueId = UmpQueueId_Para + +export interface UmpQueueId_Para { + __kind: 'Para' + value: Id +} + +export type AggregateMessageOrigin = AggregateMessageOrigin_Ump + +export interface AggregateMessageOrigin_Ump { + __kind: 'Ump' + value: UmpQueueId +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type MessageQueueCall = MessageQueueCall_execute_overweight | MessageQueueCall_reap_page + +/** + * Execute an overweight message. + * + * Temporary processing errors will be propagated whereas permanent errors are treated + * as success condition. + * + * - `origin`: Must be `Signed`. + * - `message_origin`: The origin from which the message to be executed arrived. + * - `page`: The page in the queue in which the message to be executed is sitting. + * - `index`: The index into the queue of the message to be executed. + * - `weight_limit`: The maximum amount of weight allowed to be consumed in the execution + * of the message. + * + * Benchmark complexity considerations: O(index + weight_limit). + */ +export interface MessageQueueCall_execute_overweight { + __kind: 'execute_overweight' + messageOrigin: AggregateMessageOrigin + page: number + index: number + weightLimit: Weight +} + +/** + * Remove a page which has no more messages remaining to be processed or is stale. + */ +export interface MessageQueueCall_reap_page { + __kind: 'reap_page' + messageOrigin: AggregateMessageOrigin + pageIndex: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const InitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type InitializerCall = InitializerCall_force_approve + +/** + * Issue a signal to the consensus engine to forcibly act as though all parachain + * blocks in all relay chain blocks up to and including the given number in the current + * chain are valid and should be finalized. + */ +export interface InitializerCall_force_approve { + __kind: 'force_approve' + upTo: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: sts.number(), + }), + force_transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: sts.number(), + }), + freeze: sts.enumStruct({ + index: sts.number(), + }), + transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * ## Complexity + * - `O(1)`. + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: number +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * ## Complexity + * - `O(1)`. + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: MultiAddress + index: number + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * ## Complexity + * - `O(1)`. + */ +export interface IndicesCall_free { + __kind: 'free' + index: number +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the + * deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * ## Complexity + * - `O(1)`. + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: number +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * ## Complexity + * - `O(1)`. + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: MultiAddress + index: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const HrmpCall: sts.Type = sts.closedEnum(() => { + return { + establish_channel_with_system: sts.enumStruct({ + targetSystemChain: Id, + }), + establish_system_channel: sts.enumStruct({ + sender: Id, + recipient: Id, + }), + force_clean_hrmp: sts.enumStruct({ + para: Id, + numInbound: sts.number(), + numOutbound: sts.number(), + }), + force_open_hrmp_channel: sts.enumStruct({ + sender: Id, + recipient: Id, + maxCapacity: sts.number(), + maxMessageSize: sts.number(), + }), + force_process_hrmp_close: sts.enumStruct({ + channels: sts.number(), + }), + force_process_hrmp_open: sts.enumStruct({ + channels: sts.number(), + }), + hrmp_accept_open_channel: sts.enumStruct({ + sender: Id, + }), + hrmp_cancel_open_request: sts.enumStruct({ + channelId: HrmpChannelId, + openRequests: sts.number(), + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: Id, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + poke_channel_deposits: sts.enumStruct({ + sender: Id, + recipient: Id, + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: Id, + recipient: Id, + } +}) + +export interface HrmpChannelId { + sender: Id + recipient: Id +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type HrmpCall = HrmpCall_establish_channel_with_system | HrmpCall_establish_system_channel | HrmpCall_force_clean_hrmp | HrmpCall_force_open_hrmp_channel | HrmpCall_force_process_hrmp_close | HrmpCall_force_process_hrmp_open | HrmpCall_hrmp_accept_open_channel | HrmpCall_hrmp_cancel_open_request | HrmpCall_hrmp_close_channel | HrmpCall_hrmp_init_open_channel | HrmpCall_poke_channel_deposits + +/** + * Establish a bidirectional HRMP channel between a parachain and a system chain. + * + * Arguments: + * + * - `target_system_chain`: A system chain, `ParaId`. + * + * The origin needs to be the parachain origin. + */ +export interface HrmpCall_establish_channel_with_system { + __kind: 'establish_channel_with_system' + targetSystemChain: Id +} + +/** + * Establish an HRMP channel between two system chains. If the channel does not already + * exist, the transaction fees will be refunded to the caller. The system does not take + * deposits for channels between system chains, and automatically sets the message number + * and size limits to the maximum allowed by the network's configuration. + * + * Arguments: + * + * - `sender`: A system chain, `ParaId`. + * - `recipient`: A system chain, `ParaId`. + * + * Any signed origin can call this function, but _both_ inputs MUST be system chains. If + * the channel does not exist yet, there is no fee. + */ +export interface HrmpCall_establish_system_channel { + __kind: 'establish_system_channel' + sender: Id + recipient: Id +} + +/** + * This extrinsic triggers the cleanup of all the HRMP storage items that a para may have. + * Normally this happens once per session, but this allows you to trigger the cleanup + * immediately for a specific parachain. + * + * Number of inbound and outbound channels for `para` must be provided as witness data. + * + * Origin must be the `ChannelManager`. + */ +export interface HrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: Id + numInbound: number + numOutbound: number +} + +/** + * Open a channel from a `sender` to a `recipient` `ParaId`. Although opened by governance, + * the `max_capacity` and `max_message_size` are still subject to the Relay Chain's + * configured limits. + * + * Expected use is when one (and only one) of the `ParaId`s involved in the channel is + * governed by the system, e.g. a system parachain. + * + * Origin must be the `ChannelManager`. + */ +export interface HrmpCall_force_open_hrmp_channel { + __kind: 'force_open_hrmp_channel' + sender: Id + recipient: Id + maxCapacity: number + maxMessageSize: number +} + +/** + * Force process HRMP close channel requests. + * + * If there are pending HRMP close channel requests, you can use this function to process + * all of those requests immediately. + * + * Total number of closing channels must be provided as witness data. + * + * Origin must be the `ChannelManager`. + */ +export interface HrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' + channels: number +} + +/** + * Force process HRMP open channel requests. + * + * If there are pending HRMP open channel requests, you can use this function to process + * all of those requests immediately. + * + * Total number of opening channels must be provided as witness data. + * + * Origin must be the `ChannelManager`. + */ +export interface HrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' + channels: number +} + +/** + * Accept a pending open channel request from the given sender. + * + * The channel will be opened only on the next session boundary. + */ +export interface HrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: Id +} + +/** + * This cancels a pending open channel request. It can be canceled by either of the sender + * or the recipient for that request. The origin must be either of those. + * + * The cancellation happens immediately. It is not possible to cancel the request if it is + * already accepted. + * + * Total number of open requests (i.e. `HrmpOpenChannelRequestsList`) must be provided as + * witness data. + */ +export interface HrmpCall_hrmp_cancel_open_request { + __kind: 'hrmp_cancel_open_request' + channelId: HrmpChannelId + openRequests: number +} + +/** + * Initiate unilateral closing of a channel. The origin must be either the sender or the + * recipient in the channel being closed. + * + * The closure can only happen on a session change. + */ +export interface HrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * Initiate opening a channel from a parachain to a given recipient with given channel + * parameters. + * + * - `proposed_max_capacity` - specifies how many messages can be in the channel at once. + * - `proposed_max_message_size` - specifies the maximum size of the messages. + * + * These numbers are a subject to the relay-chain configuration limits. + * + * The channel can be opened only after the recipient confirms it and only on a session + * change. + */ +export interface HrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: Id + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +/** + * Update the deposits held for an HRMP channel to the latest `Configuration`. Channels + * with system chains do not require a deposit. + * + * Arguments: + * + * - `sender`: A chain, `ParaId`. + * - `recipient`: A chain, `ParaId`. + * + * Any signed origin can call this function. + */ +export interface HrmpCall_poke_channel_deposits { + __kind: 'poke_channel_deposits' + sender: Id + recipient: Id +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: sts.number(), + bestFinalizedBlockNumber: sts.number(), + }), + report_equivocation: sts.enumStruct({ + equivocationProof: Type_132, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_132, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const Type_132: sts.Type = sts.struct(() => { + return { + setId: sts.bigint(), + equivocation: Equivocation, + } +}) + +export const Equivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: Type_139, + Prevote: Type_134, + } +}) + +export const Type_134: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Prevote, Signature]), + second: sts.tuple(() => [Prevote, Signature]), + } +}) + +export const Signature = sts.bytes() + +export const Prevote: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Prevote { + targetHash: H256 + targetNumber: number +} + +export interface Type_134 { + roundNumber: bigint + identity: Public + first: [Prevote, Signature] + second: [Prevote, Signature] +} + +export type Signature = Bytes + +export const Type_139: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Precommit, Signature]), + second: sts.tuple(() => [Precommit, Signature]), + } +}) + +export const Precommit: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Precommit { + targetHash: H256 + targetNumber: number +} + +export interface Type_139 { + roundNumber: bigint + identity: Public + first: [Precommit, Signature] + second: [Precommit, Signature] +} + +export type Equivocation = Equivocation_Precommit | Equivocation_Prevote + +export interface Equivocation_Precommit { + __kind: 'Precommit' + value: Type_139 +} + +export interface Equivocation_Prevote { + __kind: 'Prevote' + value: Type_134 +} + +export interface Type_132 { + setId: bigint + equivocation: Equivocation +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has stalled. + * + * This will trigger a forced authority set change at the beginning of the next session, to + * be enacted `delay` blocks after that. The `delay` should be high enough to safely assume + * that the block signalling the forced change will not be re-orged e.g. 1000 blocks. + * The block production rate (which may be slowed down because of finality lagging) should + * be taken into account when choosing the `delay`. The GRANDPA voters based on the new + * authority will start voting on top of `best_finalized_block_number` for new finalized + * blocks. `best_finalized_block_number` should be the highest of the latest finalized + * block of all validators of the new authority set. + * + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: number + bestFinalizedBlockNumber: number +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_132 + keyOwnerProof: MembershipProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_132 + keyOwnerProof: MembershipProof +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const FellowshipReferendaCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + index: sts.number(), + }), + kill: sts.enumStruct({ + index: sts.number(), + }), + nudge_referendum: sts.enumStruct({ + index: sts.number(), + }), + one_fewer_deciding: sts.enumStruct({ + track: sts.number(), + }), + place_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_submission_deposit: sts.enumStruct({ + index: sts.number(), + }), + set_metadata: sts.enumStruct({ + index: sts.number(), + maybeHash: sts.option(() => H256), + }), + submit: sts.enumStruct({ + proposalOrigin: OriginCaller, + proposal: Bounded, + enactmentMoment: DispatchTime, + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type FellowshipReferendaCall = FellowshipReferendaCall_cancel | FellowshipReferendaCall_kill | FellowshipReferendaCall_nudge_referendum | FellowshipReferendaCall_one_fewer_deciding | FellowshipReferendaCall_place_decision_deposit | FellowshipReferendaCall_refund_decision_deposit | FellowshipReferendaCall_refund_submission_deposit | FellowshipReferendaCall_set_metadata | FellowshipReferendaCall_submit + +/** + * Cancel an ongoing referendum. + * + * - `origin`: must be the `CancelOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Cancelled`. + */ +export interface FellowshipReferendaCall_cancel { + __kind: 'cancel' + index: number +} + +/** + * Cancel an ongoing referendum and slash the deposits. + * + * - `origin`: must be the `KillOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Killed` and `DepositSlashed`. + */ +export interface FellowshipReferendaCall_kill { + __kind: 'kill' + index: number +} + +/** + * Advance a referendum onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `index`: the referendum to be advanced. + */ +export interface FellowshipReferendaCall_nudge_referendum { + __kind: 'nudge_referendum' + index: number +} + +/** + * Advance a track onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `track`: the track to be advanced. + * + * Action item for when there is now one fewer referendum in the deciding phase and the + * `DecidingCount` is not yet updated. This means that we should either: + * - begin deciding another referendum (and leave `DecidingCount` alone); or + * - decrement `DecidingCount`. + */ +export interface FellowshipReferendaCall_one_fewer_deciding { + __kind: 'one_fewer_deciding' + track: number +} + +/** + * Post the Decision Deposit for a referendum. + * + * - `origin`: must be `Signed` and the account must have funds available for the + * referendum's track's Decision Deposit. + * - `index`: The index of the submitted referendum whose Decision Deposit is yet to be + * posted. + * + * Emits `DecisionDepositPlaced`. + */ +export interface FellowshipReferendaCall_place_decision_deposit { + __kind: 'place_decision_deposit' + index: number +} + +/** + * Refund the Decision Deposit for a closed referendum back to the depositor. + * + * - `origin`: must be `Signed` or `Root`. + * - `index`: The index of a closed referendum whose Decision Deposit has not yet been + * refunded. + * + * Emits `DecisionDepositRefunded`. + */ +export interface FellowshipReferendaCall_refund_decision_deposit { + __kind: 'refund_decision_deposit' + index: number +} + +/** + * Refund the Submission Deposit for a closed referendum back to the depositor. + * + * - `origin`: must be `Signed` or `Root`. + * - `index`: The index of a closed referendum whose Submission Deposit has not yet been + * refunded. + * + * Emits `SubmissionDepositRefunded`. + */ +export interface FellowshipReferendaCall_refund_submission_deposit { + __kind: 'refund_submission_deposit' + index: number +} + +/** + * Set or clear metadata of a referendum. + * + * Parameters: + * - `origin`: Must be `Signed` by a creator of a referendum or by anyone to clear a + * metadata of a finished referendum. + * - `index`: The index of a referendum to set or clear metadata for. + * - `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata. + */ +export interface FellowshipReferendaCall_set_metadata { + __kind: 'set_metadata' + index: number + maybeHash?: (H256 | undefined) +} + +/** + * Propose a referendum on a privileged action. + * + * - `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds + * available. + * - `proposal_origin`: The origin from which the proposal should be executed. + * - `proposal`: The proposal. + * - `enactment_moment`: The moment that the proposal should be enacted. + * + * Emits `Submitted`. + */ +export interface FellowshipReferendaCall_submit { + __kind: 'submit' + proposalOrigin: OriginCaller + proposal: Bounded + enactmentMoment: DispatchTime +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const FellowshipCollectiveCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: MultiAddress, + }), + cleanup_poll: sts.enumStruct({ + pollIndex: sts.number(), + max: sts.number(), + }), + demote_member: sts.enumStruct({ + who: MultiAddress, + }), + exchange_member: sts.enumStruct({ + who: MultiAddress, + newWho: MultiAddress, + }), + promote_member: sts.enumStruct({ + who: MultiAddress, + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + minRank: sts.number(), + }), + vote: sts.enumStruct({ + poll: sts.number(), + aye: sts.boolean(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type FellowshipCollectiveCall = FellowshipCollectiveCall_add_member | FellowshipCollectiveCall_cleanup_poll | FellowshipCollectiveCall_demote_member | FellowshipCollectiveCall_exchange_member | FellowshipCollectiveCall_promote_member | FellowshipCollectiveCall_remove_member | FellowshipCollectiveCall_vote + +/** + * Introduce a new member. + * + * - `origin`: Must be the `AddOrigin`. + * - `who`: Account of non-member which will become a member. + * + * Weight: `O(1)` + */ +export interface FellowshipCollectiveCall_add_member { + __kind: 'add_member' + who: MultiAddress +} + +/** + * Remove votes from the given poll. It must have ended. + * + * - `origin`: Must be `Signed` by any account. + * - `poll_index`: Index of a poll which is completed and for which votes continue to + * exist. + * - `max`: Maximum number of vote items from remove in this call. + * + * Transaction fees are waived if the operation is successful. + * + * Weight `O(max)` (less if there are fewer items to remove than `max`). + */ +export interface FellowshipCollectiveCall_cleanup_poll { + __kind: 'cleanup_poll' + pollIndex: number + max: number +} + +/** + * Decrement the rank of an existing member by one. If the member is already at rank zero, + * then they are removed entirely. + * + * - `origin`: Must be the `DemoteOrigin`. + * - `who`: Account of existing member of rank greater than zero. + * + * Weight: `O(1)`, less if the member's index is highest in its rank. + */ +export interface FellowshipCollectiveCall_demote_member { + __kind: 'demote_member' + who: MultiAddress +} + +/** + * Exchanges a member with a new account and the same existing rank. + * + * - `origin`: Must be the `ExchangeOrigin`. + * - `who`: Account of existing member of rank greater than zero to be exchanged. + * - `new_who`: New Account of existing member of rank greater than zero to exchanged to. + */ +export interface FellowshipCollectiveCall_exchange_member { + __kind: 'exchange_member' + who: MultiAddress + newWho: MultiAddress +} + +/** + * Increment the rank of an existing member by one. + * + * - `origin`: Must be the `PromoteOrigin`. + * - `who`: Account of existing member. + * + * Weight: `O(1)` + */ +export interface FellowshipCollectiveCall_promote_member { + __kind: 'promote_member' + who: MultiAddress +} + +/** + * Remove the member entirely. + * + * - `origin`: Must be the `RemoveOrigin`. + * - `who`: Account of existing member of rank greater than zero. + * - `min_rank`: The rank of the member or greater. + * + * Weight: `O(min_rank)`. + */ +export interface FellowshipCollectiveCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + minRank: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * - `origin`: Must be `Signed` by a member account. + * - `poll`: Index of a poll which is ongoing. + * - `aye`: `true` if the vote is to approve the proposal, `false` otherwise. + * + * Transaction fees are be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * + * Weight: `O(1)`, less if there was no previous vote on the poll by the member. + */ +export interface FellowshipCollectiveCall_vote { + __kind: 'vote' + poll: number + aye: boolean +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const FastUnstakeCall: sts.Type = sts.closedEnum(() => { + return { + control: sts.enumStruct({ + erasToCheck: sts.number(), + }), + deregister: sts.unit(), + register_fast_unstake: sts.unit(), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type FastUnstakeCall = FastUnstakeCall_control | FastUnstakeCall_deregister | FastUnstakeCall_register_fast_unstake + +/** + * Control the operation of this pallet. + * + * ## Dispatch Origin + * + * The dispatch origin of this call must be [`Config::ControlOrigin`]. + * + * ## Details + * + * Can set the number of eras to check per block, and potentially other admin work. + * + * ## Events + * + * No events are emitted from this dispatch. + */ +export interface FastUnstakeCall_control { + __kind: 'control' + erasToCheck: number +} + +/** + * Deregister oneself from the fast-unstake. + * + * ## Dispatch Origin + * + * The dispatch origin of this call must be *signed* by whoever is permitted to call + * unbond funds by the staking system. See [`Config::Staking`]. + * + * ## Details + * + * This is useful if one is registered, they are still waiting, and they change their mind. + * + * Note that the associated stash is still fully unbonded and chilled as a consequence of + * calling [`Pallet::register_fast_unstake`]. Therefore, this should probably be followed + * by a call to `rebond` in the staking system. + * + * ## Events + * + * Some events from the staking and currency system might be emitted. + */ +export interface FastUnstakeCall_deregister { + __kind: 'deregister' +} + +/** + * Register oneself for fast-unstake. + * + * ## Dispatch Origin + * + * The dispatch origin of this call must be *signed* by whoever is permitted to call + * unbond funds by the staking system. See [`Config::Staking`]. + * + * ## Details + * + * The stash associated with the origin must have no ongoing unlocking chunks. If + * successful, this will fully unbond and chill the stash. Then, it will enqueue the stash + * to be checked in further blocks. + * + * If by the time this is called, the stash is actually eligible for fast-unstake, then + * they are guaranteed to remain eligible, because the call will chill them as well. + * + * If the check works, the entire staking data is removed, i.e. the stash is fully + * unstaked. + * + * If the check fails, the stash remains chilled and waiting for being unbonded as in with + * the normal staking system, but they lose part of their unbonding chunks due to consuming + * the chain's resources. + * + * ## Events + * + * Some events from the staking and currency system might be emitted. + */ +export interface FastUnstakeCall_register_fast_unstake { + __kind: 'register_fast_unstake' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + governance_fallback: sts.enumStruct({ + maybeMaxVoters: sts.option(() => sts.number()), + maybeMaxTargets: sts.option(() => sts.number()), + }), + set_emergency_election_result: sts.enumStruct({ + supports: sts.array(() => sts.tuple(() => [AccountId32, Support])), + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => ElectionScore), + }), + submit: sts.enumStruct({ + rawSolution: RawSolution, + }), + submit_unsigned: sts.enumStruct({ + rawSolution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export const RawSolution: sts.Type = sts.struct(() => { + return { + solution: NposCompactSolution24, + score: ElectionScore, + round: sts.number(), + } +}) + +export const NposCompactSolution24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), + votes2: sts.array(() => sts.tuple(() => [sts.number(), sts.tuple(() => [sts.number(), sts.number()]), sts.number()])), + votes3: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes4: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes5: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes6: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes7: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes8: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes9: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes10: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes11: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes12: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes13: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes14: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes15: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes16: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes17: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes18: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes19: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes20: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes21: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes22: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes23: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes24: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + } +}) + +export interface NposCompactSolution24 { + votes1: [number, number][] + votes2: [number, [number, number], number][] + votes3: [number, [number, number][], number][] + votes4: [number, [number, number][], number][] + votes5: [number, [number, number][], number][] + votes6: [number, [number, number][], number][] + votes7: [number, [number, number][], number][] + votes8: [number, [number, number][], number][] + votes9: [number, [number, number][], number][] + votes10: [number, [number, number][], number][] + votes11: [number, [number, number][], number][] + votes12: [number, [number, number][], number][] + votes13: [number, [number, number][], number][] + votes14: [number, [number, number][], number][] + votes15: [number, [number, number][], number][] + votes16: [number, [number, number][], number][] + votes17: [number, [number, number][], number][] + votes18: [number, [number, number][], number][] + votes19: [number, [number, number][], number][] + votes20: [number, [number, number][], number][] + votes21: [number, [number, number][], number][] + votes22: [number, [number, number][], number][] + votes23: [number, [number, number][], number][] + votes24: [number, [number, number][], number][] +} + +export interface RawSolution { + solution: NposCompactSolution24 + score: ElectionScore + round: number +} + +export interface ElectionScore { + minimalStake: bigint + sumStake: bigint + sumStakeSquared: bigint +} + +export const ElectionScore: sts.Type = sts.struct(() => { + return { + minimalStake: sts.bigint(), + sumStake: sts.bigint(), + sumStakeSquared: sts.bigint(), + } +}) + +export const Support: sts.Type = sts.struct(() => { + return { + total: sts.bigint(), + voters: sts.array(() => sts.tuple(() => [AccountId32, sts.bigint()])), + } +}) + +export interface Support { + total: bigint + voters: [AccountId32, bigint][] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_governance_fallback | ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * Trigger the governance fallback. + * + * This can only be called when [`Phase::Emergency`] is enabled, as an alternative to + * calling [`Call::set_emergency_election_result`]. + */ +export interface ElectionProviderMultiPhaseCall_governance_fallback { + __kind: 'governance_fallback' + maybeMaxVoters?: (number | undefined) + maybeMaxTargets?: (number | undefined) +} + +/** + * Set a solution in the queue, to be handed out to the client of this pallet in the next + * call to `ElectionProvider::elect`. + * + * This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`. + * + * The solution is not checked for any feasibility and is assumed to be trustworthy, as any + * feasibility check itself can in principle cause the election process to fail (due to + * memory/weight constrains). + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + supports: [AccountId32, Support][] +} + +/** + * Set a new value for `MinimumUntrustedScore`. + * + * Dispatch origin must be aligned with `T::ForceOrigin`. + * + * This check can be turned off by setting the value to `None`. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (ElectionScore | undefined) +} + +/** + * Submit a solution for the signed phase. + * + * The dispatch origin fo this call must be __signed__. + * + * The solution is potentially queued, based on the claimed score and processed at the end + * of the signed phase. + * + * A deposit is reserved and recorded for the solution. Based on the outcome, the solution + * might be rewarded, slashed, or get all or a part of the deposit back. + */ +export interface ElectionProviderMultiPhaseCall_submit { + __kind: 'submit' + rawSolution: RawSolution +} + +/** + * Submit a solution for the unsigned phase. + * + * The dispatch origin fo this call must be __none__. + * + * This submission is checked on the fly. Moreover, this unsigned solution is only + * validated when submitted to the pool from the **local** node. Effectively, this means + * that only active validators can submit this transaction when authoring a block (similar + * to an inherent). + * + * To prevent any incorrect solution (and thus wasted time/weight), this transaction will + * panic if the solution submitted by the validator is invalid in any way, effectively + * putting their authoring reward at risk. + * + * No deposit or reward is associated with this submission. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + rawSolution: RawSolution + witness: SolutionOrSnapshotSize +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: Id, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + contribute_all: sts.enumStruct({ + index: sts.number(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: Id, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId32, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_contribute_all | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * Add an optional memo to an existing crowdloan contribution. + * + * Origin must be Signed, and the user must have contributed to the crowdloan. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: Id + memo: Bytes +} + +/** + * Contribute to a crowd sale. This will transfer some balance over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * Contribute your entire balance to a crowd sale. This will transfer the entire balance of + * a user over to fund a parachain slot. It will be withdrawable when the crowdloan has + * ended and the funds are unused. + */ +export interface CrowdloanCall_contribute_all { + __kind: 'contribute_all' + index: number + signature?: (MultiSignature | undefined) +} + +/** + * Create a new crowdloaning campaign for a parachain slot with the given lease period + * range. + * + * This applies a lock to your parachain configuration, ensuring that it cannot be changed + * by the parachain manager. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Remove a fund after the retirement period has ended and all funds have been returned. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * Edit the configuration for an in-progress crowdloan. + * + * Can only be called by Root origin. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Poke the fund into `NewRaise` + * + * Origin must be Signed, and the fund has non-zero raise. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: Id +} + +/** + * Automatically refund contributors of an ended crowdloan. + * Due to weight restrictions, this function may need to be called multiple + * times to fully refund all users. We will refund `RemoveKeysLimit` users at a time. + * + * Origin must be signed, but can come from anyone. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * Withdraw full balance of a specific contributor. + * + * Origin must be signed, but can come from anyone. + * + * The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, + * then the retirement flag must be set. For a fund to be ready for retirement, then: + * - it must not already be in retirement; + * - the amount of raised funds must be bigger than the _free_ balance of the account; + * - and either: + * - the block number must be at least `end`; or + * - the current lease period must be greater than the fund's `last_period`. + * + * In this case, the fund's retirement flag is set and its `end` is reset to the current + * block number. + * + * - `who`: The account whose contribution should be withdrawn. + * - `index`: The parachain to whose crowdloan the contribution was made. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId32 + index: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const CoretimeCall: sts.Type = sts.closedEnum(() => { + return { + assign_core: sts.enumStruct({ + core: sts.number(), + begin: sts.number(), + assignment: sts.array(() => sts.tuple(() => [CoreAssignment, PartsOf57600])), + endHint: sts.option(() => sts.number()), + }), + request_core_count: sts.enumStruct({ + count: sts.number(), + }), + request_revenue_at: sts.enumStruct({ + when: sts.number(), + }), + } +}) + +export const PartsOf57600 = sts.number() + +export const CoreAssignment: sts.Type = sts.closedEnum(() => { + return { + Idle: sts.unit(), + Pool: sts.unit(), + Task: sts.number(), + } +}) + +export type CoreAssignment = CoreAssignment_Idle | CoreAssignment_Pool | CoreAssignment_Task + +export interface CoreAssignment_Idle { + __kind: 'Idle' +} + +export interface CoreAssignment_Pool { + __kind: 'Pool' +} + +export interface CoreAssignment_Task { + __kind: 'Task' + value: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type CoretimeCall = CoretimeCall_assign_core | CoretimeCall_request_core_count | CoretimeCall_request_revenue_at + +/** + * Receive instructions from the `ExternalBrokerOrigin`, detailing how a specific core is + * to be used. + * + * Parameters: + * -`origin`: The `ExternalBrokerOrigin`, assumed to be the coretime chain. + * -`core`: The core that should be scheduled. + * -`begin`: The starting blockheight of the instruction. + * -`assignment`: How the blockspace should be utilised. + * -`end_hint`: An optional hint as to when this particular set of instructions will end. + */ +export interface CoretimeCall_assign_core { + __kind: 'assign_core' + core: number + begin: number + assignment: [CoreAssignment, PartsOf57600][] + endHint?: (number | undefined) +} + +/** + * Request the configuration to be updated with the specified number of cores. Warning: + * Since this only schedules a configuration update, it takes two sessions to come into + * effect. + * + * - `origin`: Root or the Coretime Chain + * - `count`: total number of cores + */ +export interface CoretimeCall_request_core_count { + __kind: 'request_core_count' + count: number +} + +/** + * Request to claim the instantaneous coretime sales revenue starting from the block it was + * last claimed until and up to the block specified. The claimed amount value is sent back + * to the Coretime chain in a `notify_revenue` message. At the same time, the amount is + * teleported to the Coretime chain. + */ +export interface CoretimeCall_request_revenue_at { + __kind: 'request_revenue_at' + when: number +} + +export type PartsOf57600 = number + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ConvictionVotingCall: sts.Type = sts.closedEnum(() => { + return { + delegate: sts.enumStruct({ + class: sts.number(), + to: MultiAddress, + conviction: Conviction, + balance: sts.bigint(), + }), + remove_other_vote: sts.enumStruct({ + target: MultiAddress, + class: sts.number(), + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + class: sts.option(() => sts.number()), + index: sts.number(), + }), + undelegate: sts.enumStruct({ + class: sts.number(), + }), + unlock: sts.enumStruct({ + class: sts.number(), + target: MultiAddress, + }), + vote: sts.enumStruct({ + pollIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + SplitAbstain: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + abstain: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type AccountVote = AccountVote_Split | AccountVote_SplitAbstain | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface AccountVote_SplitAbstain { + __kind: 'SplitAbstain' + aye: bigint + nay: bigint + abstain: bigint +} + +export interface AccountVote_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ConvictionVotingCall = ConvictionVotingCall_delegate | ConvictionVotingCall_remove_other_vote | ConvictionVotingCall_remove_vote | ConvictionVotingCall_undelegate | ConvictionVotingCall_unlock | ConvictionVotingCall_vote + +/** + * Delegate the voting power (with some given conviction) of the sending account for a + * particular class of polls. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed through + * `remove_vote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `class`: The class of polls to delegate. To delegate multiple classes, multiple calls + * to this function are required. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must not + * be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of polls the voter delegating to has + * voted on. Weight is initially charged as if maximum votes, but is refunded later. + */ +export interface ConvictionVotingCall_delegate { + __kind: 'delegate' + class: number + to: MultiAddress + conviction: Conviction + balance: bigint +} + +/** + * Remove a vote for a poll. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the poll was cancelled, because the voter lost the poll or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for poll + * `index`. + * - `index`: The index of poll of the vote to be removed. + * - `class`: The class of the poll. + * + * Weight: `O(R + log R)` where R is the number of polls that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface ConvictionVotingCall_remove_other_vote { + __kind: 'remove_other_vote' + target: MultiAddress + class: number + index: number +} + +/** + * Remove a vote for a poll. + * + * If: + * - the poll was cancelled, or + * - the poll is ongoing, or + * - the poll has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the poll has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for poll `index`. + * + * - `index`: The index of poll of the vote to be removed. + * - `class`: Optional parameter, if given it indicates the class of the poll. For polls + * which have finished or are cancelled, this must be `Some`. + * + * Weight: `O(R + log R)` where R is the number of polls that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface ConvictionVotingCall_remove_vote { + __kind: 'remove_vote' + class?: (number | undefined) + index: number +} + +/** + * Undelegate the voting power of the sending account for a particular class of polls. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued has passed. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * - `class`: The class of polls to remove the delegation from. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of polls the voter delegating to has + * voted on. Weight is initially charged as if maximum votes, but is refunded later. + */ +export interface ConvictionVotingCall_undelegate { + __kind: 'undelegate' + class: number +} + +/** + * Remove the lock caused by prior voting/delegating which has expired within a particular + * class. + * + * The dispatch origin of this call must be _Signed_. + * + * - `class`: The class of polls to unlock. + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface ConvictionVotingCall_unlock { + __kind: 'unlock' + class: number + target: MultiAddress +} + +/** + * Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `poll_index`: The index of the poll to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of polls the voter has voted on. + */ +export interface ConvictionVotingCall_vote { + __kind: 'vote' + pollIndex: number + vote: AccountVote +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_approval_voting_params: sts.enumStruct({ + new: V7ApprovalVotingParams, + }), + set_async_backing_params: sts.enumStruct({ + new: V7AsyncBackingParams, + }), + set_bypass_consistency_check: sts.enumStruct({ + new: sts.boolean(), + }), + set_code_retention_period: sts.enumStruct({ + new: sts.number(), + }), + set_coretime_cores: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: sts.number(), + }), + set_executor_params: sts.enumStruct({ + new: sts.array(() => V7ExecutorParam), + }), + set_group_rotation_frequency: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_max_availability_timeouts: sts.enumStruct({ + new: sts.number(), + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_minimum_backing_votes: sts.enumStruct({ + new: sts.number(), + }), + set_minimum_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_node_feature: sts.enumStruct({ + index: sts.number(), + value: sts.boolean(), + }), + set_on_demand_base_fee: sts.enumStruct({ + new: sts.bigint(), + }), + set_on_demand_fee_variability: sts.enumStruct({ + new: Perbill, + }), + set_on_demand_queue_max_size: sts.enumStruct({ + new: sts.number(), + }), + set_on_demand_target_queue_utilization: sts.enumStruct({ + new: Perbill, + }), + set_on_demand_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_paras_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_pvf_voting_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduler_params: sts.enumStruct({ + new: SchedulerParams, + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_cooldown: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +export const SchedulerParams: sts.Type = sts.struct(() => { + return { + groupRotationFrequency: sts.number(), + parasAvailabilityPeriod: sts.number(), + maxValidatorsPerCore: sts.option(() => sts.number()), + lookahead: sts.number(), + numCores: sts.number(), + maxAvailabilityTimeouts: sts.number(), + onDemandQueueMaxSize: sts.number(), + onDemandTargetQueueUtilization: Perbill, + onDemandFeeVariability: Perbill, + onDemandBaseFee: sts.bigint(), + ttl: sts.number(), + } +}) + +export interface SchedulerParams { + groupRotationFrequency: number + parasAvailabilityPeriod: number + maxValidatorsPerCore?: (number | undefined) + lookahead: number + numCores: number + maxAvailabilityTimeouts: number + onDemandQueueMaxSize: number + onDemandTargetQueueUtilization: Perbill + onDemandFeeVariability: Perbill + onDemandBaseFee: bigint + ttl: number +} + +export const V7ExecutorParam: sts.Type = sts.closedEnum(() => { + return { + MaxMemoryPages: sts.number(), + PrecheckingMaxMemory: sts.bigint(), + PvfExecTimeout: sts.tuple(() => [V7PvfExecKind, sts.bigint()]), + PvfPrepTimeout: sts.tuple(() => [V7PvfPrepKind, sts.bigint()]), + StackLogicalMax: sts.number(), + StackNativeMax: sts.number(), + WasmExtBulkMemory: sts.unit(), + } +}) + +export const V7PvfPrepKind: sts.Type = sts.closedEnum(() => { + return { + Precheck: sts.unit(), + Prepare: sts.unit(), + } +}) + +export type V7PvfPrepKind = V7PvfPrepKind_Precheck | V7PvfPrepKind_Prepare + +export interface V7PvfPrepKind_Precheck { + __kind: 'Precheck' +} + +export interface V7PvfPrepKind_Prepare { + __kind: 'Prepare' +} + +export const V7PvfExecKind: sts.Type = sts.closedEnum(() => { + return { + Approval: sts.unit(), + Backing: sts.unit(), + } +}) + +export type V7PvfExecKind = V7PvfExecKind_Approval | V7PvfExecKind_Backing + +export interface V7PvfExecKind_Approval { + __kind: 'Approval' +} + +export interface V7PvfExecKind_Backing { + __kind: 'Backing' +} + +export type V7ExecutorParam = V7ExecutorParam_MaxMemoryPages | V7ExecutorParam_PrecheckingMaxMemory | V7ExecutorParam_PvfExecTimeout | V7ExecutorParam_PvfPrepTimeout | V7ExecutorParam_StackLogicalMax | V7ExecutorParam_StackNativeMax | V7ExecutorParam_WasmExtBulkMemory + +export interface V7ExecutorParam_MaxMemoryPages { + __kind: 'MaxMemoryPages' + value: number +} + +export interface V7ExecutorParam_PrecheckingMaxMemory { + __kind: 'PrecheckingMaxMemory' + value: bigint +} + +export interface V7ExecutorParam_PvfExecTimeout { + __kind: 'PvfExecTimeout' + value: [V7PvfExecKind, bigint] +} + +export interface V7ExecutorParam_PvfPrepTimeout { + __kind: 'PvfPrepTimeout' + value: [V7PvfPrepKind, bigint] +} + +export interface V7ExecutorParam_StackLogicalMax { + __kind: 'StackLogicalMax' + value: number +} + +export interface V7ExecutorParam_StackNativeMax { + __kind: 'StackNativeMax' + value: number +} + +export interface V7ExecutorParam_WasmExtBulkMemory { + __kind: 'WasmExtBulkMemory' +} + +export const V7AsyncBackingParams: sts.Type = sts.struct(() => { + return { + maxCandidateDepth: sts.number(), + allowedAncestryLen: sts.number(), + } +}) + +export interface V7AsyncBackingParams { + maxCandidateDepth: number + allowedAncestryLen: number +} + +export const V7ApprovalVotingParams: sts.Type = sts.struct(() => { + return { + maxApprovalCoalesceCount: sts.number(), + } +}) + +export interface V7ApprovalVotingParams { + maxApprovalCoalesceCount: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ConfigurationCall = ConfigurationCall_set_approval_voting_params | ConfigurationCall_set_async_backing_params | ConfigurationCall_set_bypass_consistency_check | ConfigurationCall_set_code_retention_period | ConfigurationCall_set_coretime_cores | ConfigurationCall_set_dispute_period | ConfigurationCall_set_dispute_post_conclusion_acceptance_period | ConfigurationCall_set_executor_params | ConfigurationCall_set_group_rotation_frequency | ConfigurationCall_set_hrmp_channel_max_capacity | ConfigurationCall_set_hrmp_channel_max_message_size | ConfigurationCall_set_hrmp_channel_max_total_size | ConfigurationCall_set_hrmp_max_message_num_per_candidate | ConfigurationCall_set_hrmp_max_parachain_inbound_channels | ConfigurationCall_set_hrmp_max_parachain_outbound_channels | ConfigurationCall_set_hrmp_open_request_ttl | ConfigurationCall_set_hrmp_recipient_deposit | ConfigurationCall_set_hrmp_sender_deposit | ConfigurationCall_set_max_availability_timeouts | ConfigurationCall_set_max_code_size | ConfigurationCall_set_max_downward_message_size | ConfigurationCall_set_max_head_data_size | ConfigurationCall_set_max_pov_size | ConfigurationCall_set_max_upward_message_num_per_candidate | ConfigurationCall_set_max_upward_message_size | ConfigurationCall_set_max_upward_queue_count | ConfigurationCall_set_max_upward_queue_size | ConfigurationCall_set_max_validators | ConfigurationCall_set_max_validators_per_core | ConfigurationCall_set_minimum_backing_votes | ConfigurationCall_set_minimum_validation_upgrade_delay | ConfigurationCall_set_n_delay_tranches | ConfigurationCall_set_needed_approvals | ConfigurationCall_set_no_show_slots | ConfigurationCall_set_node_feature | ConfigurationCall_set_on_demand_base_fee | ConfigurationCall_set_on_demand_fee_variability | ConfigurationCall_set_on_demand_queue_max_size | ConfigurationCall_set_on_demand_target_queue_utilization | ConfigurationCall_set_on_demand_ttl | ConfigurationCall_set_paras_availability_period | ConfigurationCall_set_pvf_voting_ttl | ConfigurationCall_set_relay_vrf_modulo_samples | ConfigurationCall_set_scheduler_params | ConfigurationCall_set_scheduling_lookahead | ConfigurationCall_set_validation_upgrade_cooldown | ConfigurationCall_set_validation_upgrade_delay | ConfigurationCall_set_zeroth_delay_tranche_width + +/** + * Set approval-voting-params. + */ +export interface ConfigurationCall_set_approval_voting_params { + __kind: 'set_approval_voting_params' + new: V7ApprovalVotingParams +} + +/** + * Set the asynchronous backing parameters. + */ +export interface ConfigurationCall_set_async_backing_params { + __kind: 'set_async_backing_params' + new: V7AsyncBackingParams +} + +/** + * Setting this to true will disable consistency checks for the configuration setters. + * Use with caution. + */ +export interface ConfigurationCall_set_bypass_consistency_check { + __kind: 'set_bypass_consistency_check' + new: boolean +} + +/** + * Set the acceptance period for an included candidate. + */ +export interface ConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: number +} + +/** + * Set the number of coretime execution cores. + * + * NOTE: that this configuration is managed by the coretime chain. Only manually change + * this, if you really know what you are doing! + */ +export interface ConfigurationCall_set_coretime_cores { + __kind: 'set_coretime_cores' + new: number +} + +/** + * Set the dispute period, in number of sessions to keep for disputes. + */ +export interface ConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: number +} + +/** + * Set the dispute post conclusion acceptance period. + */ +export interface ConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: number +} + +/** + * Set PVF executor parameters. + */ +export interface ConfigurationCall_set_executor_params { + __kind: 'set_executor_params' + new: V7ExecutorParam[] +} + +/** + * Set the parachain validator-group rotation frequency + */ +export interface ConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: number +} + +/** + * Sets the maximum number of messages allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * Sets the maximum size of a message that could ever be put into an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * Sets the maximum total size of messages in bytes allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * Sets the maximum number of outbound HRMP messages can be sent by a candidate. + */ +export interface ConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parachain is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parachain is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * Sets the number of sessions after which an HRMP open channel request expires. + */ +export interface ConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * Sets the amount of funds that the recipient should provide for accepting opening an HRMP + * channel. + */ +export interface ConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: bigint +} + +/** + * Sets the amount of funds that the sender should provide for opening an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: bigint +} + +/** + * Set the max number of times a claim may timeout on a core before it is abandoned + */ +export interface ConfigurationCall_set_max_availability_timeouts { + __kind: 'set_max_availability_timeouts' + new: number +} + +/** + * Set the max validation code size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * Set the critical downward message size. + */ +export interface ConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * Set the max head data size for paras. + */ +export interface ConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * Set the max POV block size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * Sets the maximum number of messages that a candidate can contain. + */ +export interface ConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum size of an upward message that can be sent by a candidate. + */ +export interface ConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * Sets the maximum items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * Sets the maximum total size of items that can present in a upward dispatch queue at + * once. + */ +export interface ConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * Set the maximum number of validators to use in parachain consensus. + */ +export interface ConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * Set the maximum number of validators to assign to any core. + */ +export interface ConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * Set the minimum backing votes threshold. + */ +export interface ConfigurationCall_set_minimum_backing_votes { + __kind: 'set_minimum_backing_votes' + new: number +} + +/** + * Sets the minimum delay between announcing the upgrade block for a parachain until the + * upgrade taking place. + * + * See the field documentation for information and constraints for the new value. + */ +export interface ConfigurationCall_set_minimum_validation_upgrade_delay { + __kind: 'set_minimum_validation_upgrade_delay' + new: number +} + +/** + * Set the total number of delay tranches. + */ +export interface ConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * Set the number of validators needed to approve a block. + */ +export interface ConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * Set the no show slots, in number of number of consensus slots. + * Must be at least 1. + */ +export interface ConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * Set/Unset a node feature. + */ +export interface ConfigurationCall_set_node_feature { + __kind: 'set_node_feature' + index: number + value: boolean +} + +/** + * Set the on demand (parathreads) base fee. + */ +export interface ConfigurationCall_set_on_demand_base_fee { + __kind: 'set_on_demand_base_fee' + new: bigint +} + +/** + * Set the on demand (parathreads) fee variability. + */ +export interface ConfigurationCall_set_on_demand_fee_variability { + __kind: 'set_on_demand_fee_variability' + new: Perbill +} + +/** + * Set the on demand (parathreads) queue max size. + */ +export interface ConfigurationCall_set_on_demand_queue_max_size { + __kind: 'set_on_demand_queue_max_size' + new: number +} + +/** + * Set the on demand (parathreads) fee variability. + */ +export interface ConfigurationCall_set_on_demand_target_queue_utilization { + __kind: 'set_on_demand_target_queue_utilization' + new: Perbill +} + +/** + * Set the on demand (parathreads) ttl in the claimqueue. + */ +export interface ConfigurationCall_set_on_demand_ttl { + __kind: 'set_on_demand_ttl' + new: number +} + +/** + * Set the availability period for paras. + */ +export interface ConfigurationCall_set_paras_availability_period { + __kind: 'set_paras_availability_period' + new: number +} + +/** + * Set the number of session changes after which a PVF pre-checking voting is rejected. + */ +export interface ConfigurationCall_set_pvf_voting_ttl { + __kind: 'set_pvf_voting_ttl' + new: number +} + +/** + * Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion. + */ +export interface ConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * Set scheduler-params. + */ +export interface ConfigurationCall_set_scheduler_params { + __kind: 'set_scheduler_params' + new: SchedulerParams +} + +/** + * Set the scheduling lookahead, in expected number of blocks at peak throughput. + */ +export interface ConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * Set the validation upgrade cooldown. + */ +export interface ConfigurationCall_set_validation_upgrade_cooldown { + __kind: 'set_validation_upgrade_cooldown' + new: number +} + +/** + * Set the validation upgrade delay. + */ +export interface ConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: number +} + +/** + * Set the zeroth delay tranche width. + */ +export interface ConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: sts.bigint(), + vestingSchedule: sts.option(() => sts.tuple(() => [sts.bigint(), sts.bigint(), sts.number()])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId32), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a + * `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the + * signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message matching the format + * described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId32 + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message matching the format + * described above. + * - `statement`: The identity of the statement which is being attested to in the + * signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId32 + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: bigint + vestingSchedule?: ([bigint, bigint, number] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId32 | undefined) +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const ChildBountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + add_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + value: sts.bigint(), + description: sts.bytes(), + }), + award_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + close_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + propose_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type ChildBountiesCall = ChildBountiesCall_accept_curator | ChildBountiesCall_add_child_bounty | ChildBountiesCall_award_child_bounty | ChildBountiesCall_claim_child_bounty | ChildBountiesCall_close_child_bounty | ChildBountiesCall_propose_curator | ChildBountiesCall_unassign_curator + +/** + * Accept the curator role for the child-bounty. + * + * The dispatch origin for this call must be the curator of this + * child-bounty. + * + * A deposit will be reserved from the curator and refund upon + * successful payout or cancellation. + * + * Fee for curator is deducted from curator fee of parent bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in "CuratorProposed" state, for processing the + * call. And state of child-bounty is moved to "Active" on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_accept_curator { + __kind: 'accept_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Add a new child-bounty. + * + * The dispatch origin for this call must be the curator of parent + * bounty and the parent bounty must be in "active" state. + * + * Child-bounty gets added successfully & fund gets transferred from + * parent bounty to child-bounty account, if parent bounty has enough + * funds, else the call fails. + * + * Upper bound to maximum number of active child bounties that can be + * added are managed via runtime trait config + * [`Config::MaxActiveChildBountyCount`]. + * + * If the call is success, the status of child-bounty is updated to + * "Added". + * + * - `parent_bounty_id`: Index of parent bounty for which child-bounty is being added. + * - `value`: Value for executing the proposal. + * - `description`: Text description for the child-bounty. + */ +export interface ChildBountiesCall_add_child_bounty { + __kind: 'add_child_bounty' + parentBountyId: number + value: bigint + description: Bytes +} + +/** + * Award child-bounty to a beneficiary. + * + * The beneficiary will be able to claim the funds after a delay. + * + * The dispatch origin for this call must be the parent curator or + * curator of this child-bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in active state, for processing the call. And + * state of child-bounty is moved to "PendingPayout" on successful call + * completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + * - `beneficiary`: Beneficiary account. + */ +export interface ChildBountiesCall_award_child_bounty { + __kind: 'award_child_bounty' + parentBountyId: number + childBountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded child-bounty after payout delay. + * + * The dispatch origin for this call may be any signed origin. + * + * Call works independent of parent bounty state, No need for parent + * bounty to be in active state. + * + * The Beneficiary is paid out with agreed bounty value. Curator fee is + * paid & curator deposit is unreserved. + * + * Child-bounty must be in "PendingPayout" state, for processing the + * call. And instance of child-bounty is removed from the state on + * successful call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_claim_child_bounty { + __kind: 'claim_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * Cancel a proposed or active child-bounty. Child-bounty account funds + * are transferred to parent bounty account. The child-bounty curator + * deposit may be unreserved if possible. + * + * The dispatch origin for this call must be either parent curator or + * `T::RejectOrigin`. + * + * If the state of child-bounty is `Active`, curator deposit is + * unreserved. + * + * If the state of child-bounty is `PendingPayout`, call fails & + * returns `PendingPayout` error. + * + * For the origin other than T::RejectOrigin, parent bounty must be in + * active state, for this child-bounty call to work. For origin + * T::RejectOrigin execution is forced. + * + * Instance of child-bounty is removed from the state on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_close_child_bounty { + __kind: 'close_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * Propose curator for funded child-bounty. + * + * The dispatch origin for this call must be curator of parent bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in "Added" state, for processing the call. And + * state of child-bounty is moved to "CuratorProposed" on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + * - `curator`: Address of child-bounty curator. + * - `fee`: payment fee to child-bounty curator for execution. + */ +export interface ChildBountiesCall_propose_curator { + __kind: 'propose_curator' + parentBountyId: number + childBountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a child-bounty. + * + * The dispatch origin for this call can be either `RejectOrigin`, or + * the curator of the parent bounty, or any signed origin. + * + * For the origin other than T::RejectOrigin and the child-bounty + * curator, parent bounty must be in active state, for this call to + * work. We allow child-bounty curator and T::RejectOrigin to execute + * this call irrespective of the parent bounty state. + * + * If this function is called by the `RejectOrigin` or the + * parent bounty curator, we assume that the child-bounty curator is + * malicious or inactive. As a result, child-bounty curator deposit is + * slashed. + * + * If the origin is the child-bounty curator, we take this as a sign + * that they are unable to do their job, and are willingly giving up. + * We could slash the deposit, but for now we allow them to unreserve + * their deposit and exit without issue. (We may want to change this if + * it is abused.) + * + * Finally, the origin can be anyone iff the child-bounty curator is + * "inactive". Expiry update due of parent bounty is used to estimate + * inactive state of child-bounty curator. + * + * This allows anyone in the community to call out that a child-bounty + * curator is not doing their due diligence, and we should pick a new + * one. In this case the child-bounty curator deposit is slashed. + * + * State of child-bounty is moved to Added state on successful call + * completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_unassign_curator { + __kind: 'unassign_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * ## Complexity + * - O(1). + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::SpendOrigin`. + * + * ## Complexity + * - O(1). + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds + * after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * ## Complexity + * - O(1). + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * ## Complexity + * - O(1). + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * ## Complexity + * - O(1). + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * ## Complexity + * - O(1). + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Propose a curator to a funded bounty. + * + * May only be called from `T::SpendOrigin`. + * + * ## Complexity + * - O(1). + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is + * malicious or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * ## Complexity + * - O(1). + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const BeefyCall: sts.Type = sts.closedEnum(() => { + return { + report_equivocation: sts.enumStruct({ + equivocationProof: DoubleVotingProof, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: DoubleVotingProof, + keyOwnerProof: MembershipProof, + }), + set_new_genesis: sts.enumStruct({ + delayInBlocks: sts.number(), + }), + } +}) + +export const DoubleVotingProof: sts.Type = sts.struct(() => { + return { + first: VoteMessage, + second: VoteMessage, + } +}) + +export const VoteMessage: sts.Type = sts.struct(() => { + return { + commitment: Commitment, + id: sts.bytes(), + signature: sts.bytes(), + } +}) + +export const Commitment: sts.Type = sts.struct(() => { + return { + payload: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + blockNumber: sts.number(), + validatorSetId: sts.bigint(), + } +}) + +export interface Commitment { + payload: [Bytes, Bytes][] + blockNumber: number + validatorSetId: bigint +} + +export interface VoteMessage { + commitment: Commitment + id: Bytes + signature: Bytes +} + +export interface DoubleVotingProof { + first: VoteMessage + second: VoteMessage +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type BeefyCall = BeefyCall_report_equivocation | BeefyCall_report_equivocation_unsigned | BeefyCall_set_new_genesis + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface BeefyCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: DoubleVotingProof + keyOwnerProof: MembershipProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BeefyCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: DoubleVotingProof + keyOwnerProof: MembershipProof +} + +/** + * Reset BEEFY consensus by setting a new BEEFY genesis at `delay_in_blocks` blocks in the + * future. + * + * Note: `delay_in_blocks` has to be at least 1. + */ +export interface BeefyCall_set_new_genesis { + __kind: 'set_new_genesis' + delayInBlocks: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + burn: sts.enumStruct({ + value: sts.bigint(), + keepAlive: sts.boolean(), + }), + force_adjust_total_issuance: sts.enumStruct({ + direction: AdjustmentDirection, + delta: sts.bigint(), + }), + force_set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + }), + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_allow_death: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + upgrade_accounts: sts.enumStruct({ + who: sts.array(() => AccountId32), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type BalancesCall = BalancesCall_burn | BalancesCall_force_adjust_total_issuance | BalancesCall_force_set_balance | BalancesCall_force_transfer | BalancesCall_force_unreserve | BalancesCall_transfer_all | BalancesCall_transfer_allow_death | BalancesCall_transfer_keep_alive | BalancesCall_upgrade_accounts + +/** + * Burn the specified liquid free balance from the origin account. + * + * If the origin's account ends up below the existential deposit as a result + * of the burn and `keep_alive` is false, the account will be reaped. + * + * Unlike sending funds to a _burn_ address, which merely makes the funds inaccessible, + * this `burn` operation will reduce total issuance by the amount _burned_. + */ +export interface BalancesCall_burn { + __kind: 'burn' + value: bigint + keepAlive: boolean +} + +/** + * Adjust the total issuance in a saturating way. + * + * Can only be called by root and always needs a positive `delta`. + * + * # Example + */ +export interface BalancesCall_force_adjust_total_issuance { + __kind: 'force_adjust_total_issuance' + direction: AdjustmentDirection + delta: bigint +} + +/** + * Set the regular balance of a given account. + * + * The dispatch origin for this call is `root`. + */ +export interface BalancesCall_force_set_balance { + __kind: 'force_set_balance' + who: MultiAddress + newFree: bigint +} + +/** + * Exactly as `transfer_allow_death`, except the origin must be root and the source account + * may be specified. + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * Unreserve some balance from a user by force. + * + * Can only be called by ROOT. + */ +export interface BalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer_allow_death` will set the `FreeBalance` of the sender and receiver. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + */ +export interface BalancesCall_transfer_allow_death { + __kind: 'transfer_allow_death' + dest: MultiAddress + value: bigint +} + +/** + * Same as the [`transfer_allow_death`] call, but with a check that the transfer will not + * kill the origin account. + * + * 99% of the time you want [`transfer_allow_death`] instead. + * + * [`transfer_allow_death`]: struct.Pallet.html#method.transfer + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * Upgrade a specified account. + * + * - `origin`: Must be `Signed`. + * - `who`: The account to be upgraded. + * + * This will waive the transaction fee if at least all but 10% of the accounts needed to + * be upgraded. (We let some not have to be upgraded just in order to allow for the + * possibility of churn). + */ +export interface BalancesCall_upgrade_accounts { + __kind: 'upgrade_accounts' + who: AccountId32[] +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const EquivocationProof: sts.Type = sts.struct(() => { + return { + offender: sts.bytes(), + slot: Slot, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Slot = sts.bigint() + +export interface EquivocationProof { + offender: Bytes + slot: Slot + firstHeader: Header + secondHeader: Header +} + +export type Slot = bigint + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V1: sts.enumStruct({ + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + }), + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type NextConfigDescriptor = NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Plan an epoch config change. The epoch config change is recorded and will be enacted on + * the next call to `enact_epoch_change`. The config will be activated one epoch after. + * Multiple calls to this method will replace any existing planned config change that had + * not been enacted yet. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Cancel an in-progress auction. + * + * Can only be called by Root origin. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export const AssetRateCall: sts.Type = sts.closedEnum(() => { + return { + create: sts.enumStruct({ + assetKind: VersionedLocatableAsset, + rate: FixedU128, + }), + remove: sts.enumStruct({ + assetKind: VersionedLocatableAsset, + }), + update: sts.enumStruct({ + assetKind: VersionedLocatableAsset, + rate: FixedU128, + }), + } +}) + +export const FixedU128 = sts.bigint() + +/** + * Contains a variant per dispatchable extrinsic that this pallet has. + */ +export type AssetRateCall = AssetRateCall_create | AssetRateCall_remove | AssetRateCall_update + +/** + * Initialize a conversion rate to native balance for the given asset. + * + * ## Complexity + * - O(1) + */ +export interface AssetRateCall_create { + __kind: 'create' + assetKind: VersionedLocatableAsset + rate: FixedU128 +} + +/** + * Remove an existing conversion rate to native balance for the given asset. + * + * ## Complexity + * - O(1) + */ +export interface AssetRateCall_remove { + __kind: 'remove' + assetKind: VersionedLocatableAsset +} + +/** + * Update the conversion rate to native balance for the given asset. + * + * ## Complexity + * - O(1) + */ +export interface AssetRateCall_update { + __kind: 'update' + assetKind: VersionedLocatableAsset + rate: FixedU128 +} + +export type FixedU128 = bigint + +export type Call = Call_AssetRate | Call_Auctions | Call_Babe | Call_Balances | Call_Beefy | Call_Bounties | Call_ChildBounties | Call_Claims | Call_Configuration | Call_ConvictionVoting | Call_Coretime | Call_Crowdloan | Call_ElectionProviderMultiPhase | Call_FastUnstake | Call_FellowshipCollective | Call_FellowshipReferenda | Call_Grandpa | Call_Hrmp | Call_Indices | Call_Initializer | Call_MessageQueue | Call_Multisig | Call_Nis | Call_NisCounterpartBalances | Call_NominationPools | Call_OnDemandAssignmentProvider | Call_ParaInclusion | Call_ParaInherent | Call_Parameters | Call_Paras | Call_ParasDisputes | Call_ParasShared | Call_ParasSlashing | Call_Preimage | Call_Proxy | Call_Recovery | Call_Referenda | Call_Registrar | Call_Scheduler | Call_Session | Call_Slots | Call_Society | Call_Staking | Call_System | Call_Timestamp | Call_Treasury | Call_Utility | Call_Vesting | Call_VoterList | Call_Whitelist | Call_XcmPallet + +export interface Call_AssetRate { + __kind: 'AssetRate' + value: AssetRateCall +} + +export interface Call_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Call_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Call_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Call_Beefy { + __kind: 'Beefy' + value: BeefyCall +} + +export interface Call_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Call_ChildBounties { + __kind: 'ChildBounties' + value: ChildBountiesCall +} + +export interface Call_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Call_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Call_ConvictionVoting { + __kind: 'ConvictionVoting' + value: ConvictionVotingCall +} + +export interface Call_Coretime { + __kind: 'Coretime' + value: CoretimeCall +} + +export interface Call_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Call_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Call_FastUnstake { + __kind: 'FastUnstake' + value: FastUnstakeCall +} + +export interface Call_FellowshipCollective { + __kind: 'FellowshipCollective' + value: FellowshipCollectiveCall +} + +export interface Call_FellowshipReferenda { + __kind: 'FellowshipReferenda' + value: FellowshipReferendaCall +} + +export interface Call_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Call_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Call_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Call_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Call_MessageQueue { + __kind: 'MessageQueue' + value: MessageQueueCall +} + +export interface Call_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Call_Nis { + __kind: 'Nis' + value: NisCall +} + +export interface Call_NisCounterpartBalances { + __kind: 'NisCounterpartBalances' + value: NisCounterpartBalancesCall +} + +export interface Call_NominationPools { + __kind: 'NominationPools' + value: NominationPoolsCall +} + +export interface Call_OnDemandAssignmentProvider { + __kind: 'OnDemandAssignmentProvider' + value: OnDemandAssignmentProviderCall +} + +export interface Call_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Call_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Call_Parameters { + __kind: 'Parameters' + value: ParametersCall +} + +export interface Call_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Call_ParasDisputes { + __kind: 'ParasDisputes' + value: ParasDisputesCall +} + +export interface Call_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Call_ParasSlashing { + __kind: 'ParasSlashing' + value: ParasSlashingCall +} + +export interface Call_Preimage { + __kind: 'Preimage' + value: PreimageCall +} + +export interface Call_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Call_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Call_Referenda { + __kind: 'Referenda' + value: ReferendaCall +} + +export interface Call_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Call_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Call_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Call_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Call_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Call_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Call_System { + __kind: 'System' + value: SystemCall +} + +export interface Call_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Call_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Call_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Call_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Call_VoterList { + __kind: 'VoterList' + value: VoterListCall +} + +export interface Call_Whitelist { + __kind: 'Whitelist' + value: WhitelistCall +} + +export interface Call_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const MultiAddress: sts.Type = sts.closedEnum(() => { + return { + Address20: sts.bytes(), + Address32: sts.bytes(), + Id: AccountId32, + Index: sts.unit(), + Raw: sts.bytes(), + } +}) + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + NominationPools: sts.unit(), + NonTransfer: sts.unit(), + Society: sts.unit(), + Spokesperson: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId32 = sts.bytes() diff --git a/squid/src/types/v2005.ts b/squid/src/types/v2005.ts new file mode 100644 index 00000000..f1e80a88 --- /dev/null +++ b/squid/src/types/v2005.ts @@ -0,0 +1,6572 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: BlockNumber, + index: sts.number(), + } +}) + +export const BlockNumber = sts.number() + +export interface Timepoint { + height: BlockNumber + index: number +} + +export type BlockNumber = number + +export const Type_188: sts.Type = sts.closedEnum(() => { + return { + Attestations: AttestationsCall, + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Democracy: DemocracyCall, + ElectionsPhragmen: ElectionsPhragmenCall, + FinalityTracker: FinalityTrackerCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + Parachains: ParachainsCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + } +}) + +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: LookupSource, + }), + vested_transfer: sts.enumStruct({ + target: LookupSource, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: Balance, + perBlock: Balance, + startingBlock: BlockNumber, + } +}) + +export const Balance = sts.bigint() + +export interface VestingInfo { + locked: Balance + perBlock: Balance + startingBlock: BlockNumber +} + +export type Balance = bigint + +export const LookupSource = sts.bytes() + +export type VestingCall = VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this module. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * - Benchmark: + * - Unlocked: 48.76 + .048 * l µs (min square analysis) + * - Locked: 44.43 + .284 * l µs (min square analysis) + * - Using 50 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks. + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this module. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * - Benchmark: + * - Unlocked: 44.3 + .294 * l µs (min square analysis) + * - Locked: 48.16 + .103 * l µs (min square analysis) + * - Using 50 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks. + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: LookupSource +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Benchmark: 100.3 + .365 * l µs (min square analysis) + * - Using 100 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks. + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: LookupSource + schedule: VestingInfo +} + +export type LookupSource = Bytes + +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_limited_sub: sts.enumStruct({ + index: sts.number(), + call: Type_188, + }), + as_sub: sts.enumStruct({ + index: sts.number(), + call: Type_188, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Type_188), + }), + } +}) + +export type UtilityCall = UtilityCall_as_limited_sub | UtilityCall_as_sub | UtilityCall_batch + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Calls must each fulfil the `IsCallable` filter; it is not cleared before. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_sub` instead. + * + * The dispatch origin for this call must be _Signed_. + * + * # + * - Base weight: 2.861 µs + * - Plus the weight of the `call` + * # + */ +export interface UtilityCall_as_limited_sub { + __kind: 'as_limited_sub' + index: number + call: Type_188 +} + +/** + * Send a call through an indexed pseudonym of the sender. + * + * The call must fulfil only the pre-cleared `IsCallable` filter (i.e. only the level of + * filtering that remains after calling `take()`). + * + * NOTE: If you need to ensure that any account-based filtering is honored (i.e. because + * you expect `proxy` to have been used prior in the call stack and you want it to apply to + * any sub-accounts), then use `as_limited_sub` instead. + * + * The dispatch origin for this call must be _Signed_. + * + * # + * - Base weight: 2.861 µs + * - Plus the weight of the `call` + * # + */ +export interface UtilityCall_as_sub { + __kind: 'as_sub' + index: number + call: Type_188 +} + +/** + * Send a batch of dispatch calls. + * + * This will execute until the first one fails and then stop. Calls must fulfil the + * `IsCallable` filter unless the origin is `Root`. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. + * + * # + * - Base weight: 14.39 + .987 * c µs + * - Plus the sum of the weights of the `calls`. + * - Plus one additional event. (repeat read/write) + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Type_188[] +} + +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + close_tip: sts.enumStruct({ + hash: Hash, + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: LookupSource, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + }), + retract_tip: sts.enumStruct({ + hash: Hash, + }), + tip: sts.enumStruct({ + hash: Hash, + tipValue: BalanceOf, + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + tipValue: BalanceOf, + }), + } +}) + +export const BalanceOf = sts.bigint() + +export const Hash = sts.bytes() + +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_close_tip | TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_report_awesome | TreasuryCall_retract_tip | TreasuryCall_tip | TreasuryCall_tip_new + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`. + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TreasuryCall_close_tip { + __kind: 'close_tip' + hash: Hash +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: LookupSource +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `TipReportDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips`, `who account data` + * - DbWrites: `Tips`, `who account data` + * # + */ +export interface TreasuryCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TreasuryCall_retract_tip { + __kind: 'retract_tip' + hash: Hash +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`, insert tip and check closing, + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TreasuryCall_tip { + __kind: 'tip' + hash: Hash + tipValue: BalanceOf +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T` + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TreasuryCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId + tipValue: BalanceOf +} + +export type BalanceOf = bigint + +export type AccountId = Bytes + +export type Hash = Bytes + +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(T)` where `T` complexity of `on_timestamp_set` + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in `on_finalize`) + * - 1 event handler `on_timestamp_set` `O(T)`. + * - Benchmark: 7.678 (min squares analysis) + * - NOTE: This benchmark was done for a runtime with insignificant `on_timestamp_set` handlers. + * New benchmarking is needed when adding new handlers. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId, + }), + change_key: sts.enumStruct({ + new: AccountId, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId), + }), + set_prime: sts.enumStruct({ + who: AccountId, + }), + swap_member: sts.enumStruct({ + remove: AccountId, + add: AccountId, + }), + } +}) + +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `AddOrigin` or root. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId +} + +/** + * Remove the prime member if it exists. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `RemoveOrigin` or root. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `ResetOrigin` or root. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId[] +} + +/** + * Set the prime member. Must be a current member. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `SwapOrigin` or root. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId + add: AccountId +} + +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const MemberCount = sts.number() + +export const Proposal: sts.Type = sts.closedEnum(() => { + return { + Attestations: AttestationsCall, + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Democracy: DemocracyCall, + ElectionsPhragmen: ElectionsPhragmenCall, + FinalityTracker: FinalityTrackerCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + Parachains: ParachainsCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + } +}) + +export type Proposal = Proposal_Attestations | Proposal_AuthorityDiscovery | Proposal_Authorship | Proposal_Babe | Proposal_Balances | Proposal_Claims | Proposal_Council | Proposal_Democracy | Proposal_ElectionsPhragmen | Proposal_FinalityTracker | Proposal_Grandpa | Proposal_Identity | Proposal_ImOnline | Proposal_Indices | Proposal_Multisig | Proposal_Offences | Proposal_Parachains | Proposal_Proxy | Proposal_Recovery | Proposal_Registrar | Proposal_Scheduler | Proposal_Session | Proposal_Slots | Proposal_Society | Proposal_Staking | Proposal_System | Proposal_TechnicalCommittee | Proposal_TechnicalMembership | Proposal_Timestamp | Proposal_Treasury | Proposal_Utility | Proposal_Vesting + +export interface Proposal_Attestations { + __kind: 'Attestations' + value: AttestationsCall +} + +export interface Proposal_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Proposal_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Proposal_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Proposal_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Proposal_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Proposal_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Proposal_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Proposal_ElectionsPhragmen { + __kind: 'ElectionsPhragmen' + value: ElectionsPhragmenCall +} + +export interface Proposal_FinalityTracker { + __kind: 'FinalityTracker' + value: FinalityTrackerCall +} + +export interface Proposal_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Proposal_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Proposal_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Proposal_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Proposal_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Proposal_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Proposal_Parachains { + __kind: 'Parachains' + value: ParachainsCall +} + +export interface Proposal_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Proposal_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Proposal_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Proposal_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Proposal_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Proposal_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Proposal_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Proposal_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Proposal_System { + __kind: 'System' + value: SystemCall +} + +export interface Proposal_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Proposal_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Proposal_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Proposal_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Proposal_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Proposal_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_set_changes_trie_config | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage | SystemCall_suicide + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + * + * # + * - `O(P)` where `P` amount of keys with prefix `prefix` + * - `P` storage deletions. + * - Base Weight: 0.834 * P µs + * - Writes: Number of subkeys + 1 + * # + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Key + subkeys: number +} + +/** + * Kill some items from storage. + * + * # + * - `O(IK)` where `I` length of `keys` and `K` length of one key + * - `I` storage deletions. + * - Base Weight: .378 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Key[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * - Base Weight: 0.665 µs, independent of remark length. + * - No DB operations. + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Set the new changes trie configuration. + * + * # + * - `O(1)` + * - 1 storage write or delete (codec `O(1)`). + * - 1 call to `deposit_log`: Uses `append` API, so O(1) + * - Base Weight: 7.218 µs + * - DB Weight: + * - Writes: Changes Trie, System Digest + * # + */ +export interface SystemCall_set_changes_trie_config { + __kind: 'set_changes_trie_config' + changesTrieConfig?: (ChangesTrieConfiguration | undefined) +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 storage write (codec `O(C)`). + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is expensive). + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very expensive. + * We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + * + * # + * - `O(1)` + * - 1 storage write. + * - Base Weight: 1.405 µs + * - 1 write to HEAP_PAGES + * # + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + * + * # + * - `O(I)` where `I` length of `items` + * - `I` storage writes (`O(1)`). + * - Base Weight: 0.568 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: KeyValue[] +} + +/** + * Kill the sending account, assuming there are no references outstanding and the composite + * data is equal to its default value. + * + * # + * - `O(1)` + * - 1 storage read and deletion. + * -------------------- + * Base Weight: 8.626 µs + * No DB Read or Write operations because caller is already in overlay + * # + */ +export interface SystemCall_suicide { + __kind: 'suicide' +} + +export type KeyValue = [StorageKey, StorageData] + +export type StorageData = Bytes + +export type StorageKey = Bytes + +export interface ChangesTrieConfiguration { + digestInterval: number + digestLevels: number +} + +export type Key = Bytes + +export type Perbill = number + +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_validator_count | StakingCall_submit_election_solution | StakingCall_submit_election_solution_unsigned | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * Base Weight: 67.87 µs + * DB Weight: + * - Read: Bonded, Ledger, [Origin Account], Current Era, History Depth, Locks + * - Write: Bonded, Payee, [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: LookupSource + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount + * that can be added. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller and + * it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * - One DB entry. + * ------------ + * Base Weight: 54.88 µs + * DB Weight: + * - Read: Era Election Status, Bonded, Ledger, [Origin Account], Locks + * - Write: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by either the root origin or the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + * + * # + * Complexity: O(U + S) + * with U unapplied slashes weighted with U=1000 + * and S is the number of slash indices to be canceled. + * - Base: 5870 + 34.61 * S µs + * - Read: Unapplied Slashes + * - Write: Unapplied Slashes + * # + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: EraIndex + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * -------- + * Base Weight: 16.53 µs + * DB Weight: + * - Read: EraElectionStatus, Ledger + * - Write: Validators, Nominators + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Base Weight: 1.959 µs + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - Base Weight: 2.05 µs + * - Write: ForceEra + * # + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Base Weight: 1.857 µs + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + * + * # + * O(S) where S is the number of slashing spans to be removed + * Base Weight: 53.07 + 2.365 * S µs + * Reads: Bonded, Slashing Spans, Account, Locks + * Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Account, Locks + * Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId + numSlashingSpans: number +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. This can only be called when + * [`EraElectionStatus`] is `Closed`. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS). + * - Both the reads and writes follow a similar pattern. + * --------- + * Base Weight: 22.34 + .36 * N µs + * where N is the number of targets + * DB Weight: + * - Reads: Era Election Status, Ledger, Current Era + * - Writes: Validators, Nominators + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: LookupSource[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * This can only be called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Base Weight: 110 + 54.2 * N µs (Median Slopes) + * DB Weight: + * - Read: EraElectionStatus, CurrentEra, HistoryDepth, ErasValidatorReward, + * ErasStakersClipped, ErasRewardPoints, ErasValidatorPrefs (8 items) + * - Read Each: Bonded, Ledger, Payee, Locks, System Account (5 items) + * - Write Each: System Account, Locks, Ledger (3 items) + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId + era: EraIndex +} + +/** + * Remove all data structure concerning a staker/stash once its balance is zero. + * This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone + * and the target `stash` must have no funds left. + * + * This can be called from any origin. + * + * - `stash`: The stash account to reap. Its balance must be zero. + * + * # + * Complexity: O(S) where S is the number of slashing spans on the account. + * Base Weight: 75.94 + 2.396 * S µs + * DB Weight: + * - Reads: Stash Account, Bonded, Slashing Spans, Locks + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Stash Account, Locks + * - Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller, and it can be only called when + * [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MAX_UNLOCKING_CHUNKS`. + * - Storage changes: Can't increase storage, only decrease it. + * --------------- + * - Base Weight: 34.51 µs * .048 L µs + * - DB Weight: + * - Reads: EraElectionStatus, Ledger, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Base Weight: 25.22 µs + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: LookupSource +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. + * This should report all the storage items that will be deleted by clearing old + * era history. Needed to report an accurate weight for the dispatch. Trusted by + * `Root` to report an accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Base Weight: 29.13 * E µs + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + * + * # + * - O(V) + * - Base Weight: 2.208 + .006 * V µs + * - Write: Invulnerables + * # + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + validators: AccountId[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Base Weight: 11.33 µs + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Base Weight: 1.717 µs + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Submit an election result to the chain. If the solution: + * + * 1. is valid. + * 2. has a better score than a potentially existing solution on chain. + * + * then, it will be _put_ on chain. + * + * A solution consists of two pieces of data: + * + * 1. `winners`: a flat vector of all the winners of the round. + * 2. `assignments`: the compact version of an assignment vector that encodes the edge + * weights. + * + * Both of which may be computed using _phragmen_, or any other algorithm. + * + * Additionally, the submitter must provide: + * + * - The `score` that they claim their solution has. + * + * Both validators and nominators will be represented by indices in the solution. The + * indices should respect the corresponding types ([`ValidatorIndex`] and + * [`NominatorIndex`]). Moreover, they should be valid when used to index into + * [`SnapshotValidators`] and [`SnapshotNominators`]. Any invalid index will cause the + * solution to be rejected. These two storage items are set during the election window and + * may be used to determine the indices. + * + * A solution is valid if: + * + * 0. It is submitted when [`EraElectionStatus`] is `Open`. + * 1. Its claimed score is equal to the score computed on-chain. + * 2. Presents the correct number of winners. + * 3. All indexes must be value according to the snapshot vectors. All edge values must + * also be correct and should not overflow the granularity of the ratio type (i.e. 256 + * or billion). + * 4. For each edge, all targets are actually nominated by the voter. + * 5. Has correct self-votes. + * + * A solutions score is consisted of 3 parameters: + * + * 1. `min { support.total }` for each support of a winner. This value should be maximized. + * 2. `sum { support.total }` for each support of a winner. This value should be minimized. + * 3. `sum { support.total^2 }` for each support of a winner. This value should be + * minimized (to ensure less variance) + * + * # + * See `crate::weight` module. + * # + */ +export interface StakingCall_submit_election_solution { + __kind: 'submit_election_solution' + winners: ValidatorIndex[] + compact: CompactAssignments + score: ElectionScore + era: EraIndex + size: ElectionSize +} + +/** + * Unsigned version of `submit_election_solution`. + * + * Note that this must pass the [`ValidateUnsigned`] check which only allows transactions + * from the local node to be included. In other words, only the block author can include a + * transaction in the block. + * + * # + * See `crate::weight` module. + * # + */ +export interface StakingCall_submit_election_solution_unsigned { + __kind: 'submit_election_solution_unsigned' + winners: ValidatorIndex[] + compact: CompactAssignments + score: ElectionScore + era: EraIndex + size: ElectionSize +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + * + * # + * - Independent of the arguments. Limited but potentially exploitable complexity. + * - Contains a limited number of reads. + * - Each call (requires the remainder of the bonded balance to be above `minimum_balance`) + * will cause a new entry to be inserted into a vector (`Ledger.unlocking`) kept in storage. + * The only way to clean the aforementioned storage item is also user-controlled via + * `withdraw_unbonded`. + * - One DB entry. + * ---------- + * Base Weight: 50.34 µs + * DB Weight: + * - Read: Era Election Status, Ledger, Current Era, Locks, [Origin Account] + * - Write: [Origin Account], Locks, Ledger + * + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ----------- + * Base Weight: 17.13 µs + * DB Weight: + * - Read: Era Election Status, Ledger + * - Write: Nominators, Validators + * # + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * - Could be dependent on the `origin` argument and how much `unlocking` chunks exist. + * It implies `consolidate_unlocked` which loops over `Ledger.unlocking`, which is + * indirectly user-controlled. See [`unbond`] for more detail. + * - Contains a limited number of reads, yet the size of which could be large based on `ledger`. + * - Writes are limited to the `origin` account key. + * --------------- + * Complexity O(S) where S is the number of slashing spans to remove + * Base Weight: + * Update: 50.52 + .028 * S µs + * - Reads: EraElectionStatus, Ledger, Current Era, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * Kill: 79.41 + 2.366 * S µs + * - Reads: EraElectionStatus, Ledger, Current Era, Bonded, Slashing Spans, [Origin Account], Locks + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, [Origin Account], Locks + * - Writes Each: SpanSlash * S + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +export interface ValidatorPrefs { + commission: number +} + +export interface ElectionSize { + validators: number + nominators: number +} + +export type ElectionScore = bigint[] + +export interface CompactAssignments { + votes1: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes2: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes3: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes4: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes5: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes6: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes7: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes8: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes9: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes10: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes11: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes12: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes13: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes14: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes15: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes16: [NominatorIndex, CompactScore[], ValidatorIndex][] +} + +export type CompactScore = [ValidatorIndex, OffchainAccuracy] + +export type OffchainAccuracy = number + +export type NominatorIndex = number + +export type ValidatorIndex = number + +export type EraIndex = number + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: BalanceOf +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * module to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId + judgement: SocietyJudgement +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin + * forgives (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: LookupSource + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId + value: BalanceOf + tip: BalanceOf +} + +export type SocietyJudgement = SocietyJudgement_Approve | SocietyJudgement_Rebid | SocietyJudgement_Reject + +export interface SocietyJudgement_Approve { + __kind: 'Approve' +} + +export interface SocietyJudgement_Rebid { + __kind: 'Rebid' +} + +export interface SocietyJudgement_Reject { + __kind: 'Reject' +} + +export type SlotsCall = SlotsCall_bid | SlotsCall_bid_renew | SlotsCall_elaborate_deploy_data | SlotsCall_fix_deploy_data | SlotsCall_new_auction | SlotsCall_set_offboarding + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface SlotsCall_bid { + __kind: 'bid' + sub: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Make a new bid from a parachain account for renewing that (pre-existing) parachain. + * + * The origin *must* be a parachain account. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface SlotsCall_bid_renew { + __kind: 'bid_renew' + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Note a new parachain's code. + * + * This must be called after `fix_deploy_data` and `code` must be the preimage of the + * `code_hash` passed there for the same `para_id`. + * + * This may be called before or after the beginning of the parachain's first lease period. + * If called before then the parachain will become active at the first block of its + * starting lease period. If after, then it will become active immediately after this call. + * + * - `_origin` is irrelevant. + * - `para_id` is the parachain ID whose code will be elaborated. + * - `code` is the preimage of the registered `code_hash` of `para_id`. + */ +export interface SlotsCall_elaborate_deploy_data { + __kind: 'elaborate_deploy_data' + paraId: number + code: ValidationCode +} + +/** + * Set the deploy information for a successful bid to deploy a new parachain. + * + * - `origin` must be the successful bidder account. + * - `sub` is the sub-bidder ID of the bidder. + * - `para_id` is the parachain ID allotted to the winning bidder. + * - `code_hash` is the hash of the parachain's Wasm validation function. + * - `initial_head_data` is the parachain's initial head data. + */ +export interface SlotsCall_fix_deploy_data { + __kind: 'fix_deploy_data' + sub: number + paraId: number + codeHash: Hash + codeSize: number + initialHeadData: HeadData +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface SlotsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +/** + * Set the off-boarding information for a parachain. + * + * The origin *must* be a parachain account. + * + * - `dest` is the destination account to receive the parachain's deposit. + */ +export interface SlotsCall_set_offboarding { + __kind: 'set_offboarding' + dest: LookupSource +} + +export type HeadData = Bytes + +export type ValidationCode = Bytes + +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` in number of key types. + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwnder` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: Keys + proof: Bytes +} + +export type Keys = [AccountId, AccountId, AccountId, AccountId, AccountId] + +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_named + +/** + * Cancel an anonymously scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.15 + 2.869 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: BlockNumber + index: number +} + +/** + * Cancel a named scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 24.91 + 2.907 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.29 + .126 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda + * - Will use base weight of 25 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_188 +} + +/** + * Schedule a named task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 29.6 + .159 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 35 which should be good for more than 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_188 +} + +export type Priority = number + +export type Period = [BlockNumber, number] + +export type RegistrarCall = RegistrarCall_deregister_para | RegistrarCall_deregister_parathread | RegistrarCall_register_para | RegistrarCall_register_parathread | RegistrarCall_select_parathread | RegistrarCall_set_thread_count | RegistrarCall_swap + +/** + * Deregister a parachain with given id + */ +export interface RegistrarCall_deregister_para { + __kind: 'deregister_para' + id: number +} + +/** + * Deregister a parathread and retrieve the deposit. + * + * Must be sent from a `Parachain` origin which is currently a parathread. + * + * Ensure that before calling this that any funds you want emptied from the parathread's + * account is moved out; after this it will be impossible to retrieve them (without + * governance intervention). + */ +export interface RegistrarCall_deregister_parathread { + __kind: 'deregister_parathread' +} + +/** + * Register a parachain with given code. Must be called by root. + * Fails if given ID is already used. + * + * Unlike the `Registrar` trait function of the same name, this + * checks the code and head data against size limits. + */ +export interface RegistrarCall_register_para { + __kind: 'register_para' + id: number + info: ParaInfo + code: ValidationCode + initialHeadData: HeadData +} + +/** + * Register a parathread for immediate use. + * + * Must be sent from a Signed origin that is able to have ParathreadDeposit reserved. + * `code` and `initial_head_data` are used to initialize the parathread's state. + * + * Unlike `register_para`, this function does check that the maximum code size + * and head data size are respected, as parathread registration is an atomic + * action. + */ +export interface RegistrarCall_register_parathread { + __kind: 'register_parathread' + code: ValidationCode + initialHeadData: HeadData +} + +/** + * Place a bid for a parathread to be progressed in the next block. + * + * This is a kind of special transaction that should be heavily prioritized in the + * transaction pool according to the `value`; only `ThreadCount` of them may be presented + * in any single block. + */ +export interface RegistrarCall_select_parathread { + __kind: 'select_parathread' + id: number + collator: CollatorId + headHash: Hash +} + +/** + * Reset the number of parathreads that can pay to be scheduled in a single block. + * + * - `count`: The number of parathreads. + * + * Must be called from Root origin. + */ +export interface RegistrarCall_set_thread_count { + __kind: 'set_thread_count' + count: number +} + +/** + * Swap a parachain with another parachain or parathread. The origin must be a `Parachain`. + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + other: number +} + +export type CollatorId = Bytes + +export interface ParaInfo { + manager: AccountId + deposit: Balance + locked: boolean +} + +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + * + * # + * - The weight of the `call` + 10,000. + * - One storage lookup to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId + call: Type_188 +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + * + * # + * - One storage mutation to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully + * recovered by you. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + V) + * # + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + * + * # + * Key: V (len of vouching friends) + * - One storage read/remove to get the active recovery process. O(1), Codec O(V) + * - One balance call to repatriate reserved. O(X) + * - One event. + * + * Total Complexity: O(V + X) + * # + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. + * Should be ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt + * before the account can be recovered. Should be less than or equal to + * the length of the list of friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized + * that needs to pass before the account can be recovered. + * + * # + * - Key: F (len of friends) + * - One storage read to check that account is not already recoverable. O(1). + * - A check that the friends list is sorted and unique. O(F) + * - One currency reserve operation. O(X) + * - One storage write. O(1). Codec O(F). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId[] + threshold: number + delayPeriod: BlockNumber +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account + * needs to be recoverable (i.e. have a recovery configuration). + * + * # + * - One storage read to check that account is recoverable. O(F) + * - One storage read to check that this recovery process hasn't already started. O(1) + * - One currency reserve operation. O(X) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + * + * # + * Key: F (len of friends) + * - One storage read to get the prefix iterator for active recoveries. O(1) + * - One storage read/remove to get the recovery configuration. O(1), Codec O(F) + * - One balance call to unreserved. O(X) + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + * + * # + * - One storage write O(1) + * - One event + * # + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId + rescuer: AccountId +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you + * want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One binary search to confirm caller is a friend. O(logF) + * - One binary search to confirm caller has not already vouched. O(logV) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + logF + V + logV) + * # + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId + rescuer: AccountId +} + +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * + * # + * P is the number of proxies the user has + * - Base weight: 17.48 + .176 * P µs + * - DB weight: 1 storage read and write. + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + proxy: AccountId + proxyType: ProxyType +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * P is the number of proxies the user has + * - Base weight: 36.48 + .039 * P µs + * - DB weight: 1 storage read and write. + * # + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * P is the number of proxies the user has + * - Base weight: 15.65 + .137 * P µs + * - DB weight: 1 storage read and write. + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * P is the number of proxies the user has + * - Base weight: 19.87 + .141 * P µs + * - DB weight: 1 storage read. + * - Plus the weight of the `call` + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_188 +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * P is the number of proxies the user has + * - Base weight: 13.73 + .129 * P µs + * - DB weight: 1 storage read and write. + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * P is the number of proxies the user has + * - Base weight: 14.37 + .164 * P µs + * - DB weight: 1 storage read and write. + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + proxy: AccountId + proxyType: ProxyType +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +export type ParachainsCall = ParachainsCall_report_double_vote | ParachainsCall_set_heads + +/** + * Provide a proof that some validator has commited a double-vote. + * + * The weight is 0; in order to avoid DoS a `SignedExtension` validation + * is implemented. + */ +export interface ParachainsCall_report_double_vote { + __kind: 'report_double_vote' + report: DoubleVoteReport +} + +/** + * Provide candidate receipts for parachains, in ascending order by id. + */ +export interface ParachainsCall_set_heads { + __kind: 'set_heads' + heads: AttestedCandidate[] +} + +export interface AttestedCandidate { + candidate: AbridgedCandidateReceipt + validityVotes: ValidityAttestation[] + validatorIndices: BitSequence +} + +export type ValidityAttestation = ValidityAttestation_Explicit | ValidityAttestation_Implicit | ValidityAttestation_Never + +export interface ValidityAttestation_Explicit { + __kind: 'Explicit' + value: ValidatorSignature +} + +export interface ValidityAttestation_Implicit { + __kind: 'Implicit' + value: ValidatorSignature +} + +export interface ValidityAttestation_Never { + __kind: 'Never' +} + +export type ValidatorSignature = Bytes + +export interface AbridgedCandidateReceipt { + parachainIndex: ParaId + relayParent: Hash + headData: HeadData + collator: CollatorId + signature: CollatorSignature + povBlockHash: Hash + commitments: CandidateCommitments +} + +export interface CandidateCommitments { + upwardMessages: UpwardMessage[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: BlockNumber +} + +export interface OutboundHrmpMessage { + recipient: number + data: Bytes +} + +export type UpwardMessage = Bytes + +export type CollatorSignature = Bytes + +export type ParaId = number + +export interface DoubleVoteReport { + identity: ValidatorId + first: [Statement, ValidatorSignature] + second: [Statement, ValidatorSignature] + proof: MembershipProof + signingContext: SigningContext +} + +export interface SigningContext { + sessionIndex: SessionIndex + parentHash: Hash +} + +export type SessionIndex = number + +export interface MembershipProof { + session: SessionIndex + trieNodes: Bytes[] + validatorCount: ValidatorCount +} + +export type ValidatorCount = number + +export type Statement = Statement_Candidate | Statement_Invalid | Statement_Never | Statement_Valid + +export interface Statement_Candidate { + __kind: 'Candidate' + value: Hash +} + +export interface Statement_Invalid { + __kind: 'Invalid' + value: Hash +} + +export interface Statement_Never { + __kind: 'Never' +} + +export interface Statement_Valid { + __kind: 'Valid' + value: Hash +} + +export type ValidatorId = Bytes + +export type OffencesCall = never + +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - Base Weight: + * - Create: 44.71 + 0.088 * S + * - Approve: 31.48 + 0.116 * S + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. Calls must each fulfil the `IsCallable` + * filter. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - Base Weight: + * - Create: 46.55 + 0.089 * S µs + * - Approve: 34.03 + .112 * S µs + * - Complete: 40.36 + .225 * S µs + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account] + * - Writes: Multisig Storage, [Caller Account] + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + call: Type_188 +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - Base Weight: 37.6 + 0.084 * S + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId[] + timepoint: Timepoint + callHash: Bytes +} + +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - Base Weight: 28.69 µs + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: AccountIndex +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - Base Weight: 26.83 µs + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId + index: AccountIndex +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - Base Weight: 25.53 µs + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: AccountIndex +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - Base Weight: 33.74 µs + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId + index: AccountIndex +} + +export type AccountIndex = number + +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` and E is length of + * `Heartbeat.network_state.external_address` + * + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Signature +} + +export type Signature = Bytes + +export interface Heartbeat { + blockNumber: BlockNumber + networkState: OpaqueNetworkState + sessionIndex: SessionIndex + authorityIndex: AuthIndex + validatorsLen: number +} + +export type AuthIndex = number + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `RegistrarOrigin` or `Root`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: RegistrarIndex +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must be _Root_ or match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: LookupSource +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: LookupSource + judgement: IdentityJudgement +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: bigint +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId, Data][] +} + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: H256 +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: H256 +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: H256 +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: H256 +} + +export type H256 = Bytes + +export interface IdentityInfo { + additional: IdentityInfoAdditional[] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (H160 | undefined) + image: Data + twitter: Data +} + +export type H160 = Bytes + +export type IdentityInfoAdditional = [Data, Data] + +export type IdentityJudgement = IdentityJudgement_Erroneous | IdentityJudgement_FeePaid | IdentityJudgement_KnownGood | IdentityJudgement_LowQuality | IdentityJudgement_OutOfDate | IdentityJudgement_Reasonable | IdentityJudgement_Unknown + +export interface IdentityJudgement_Erroneous { + __kind: 'Erroneous' +} + +export interface IdentityJudgement_FeePaid { + __kind: 'FeePaid' + value: Balance +} + +export interface IdentityJudgement_KnownGood { + __kind: 'KnownGood' +} + +export interface IdentityJudgement_LowQuality { + __kind: 'LowQuality' +} + +export interface IdentityJudgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface IdentityJudgement_Reasonable { + __kind: 'Reasonable' +} + +export interface IdentityJudgement_Unknown { + __kind: 'Unknown' +} + +export type RegistrarIndex = number + +export type GrandpaCall = GrandpaCall_report_equivocation + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * Since the weight of the extrinsic is 0, in order to avoid DoS by + * submission of invalid equivocation reports, a mandatory pre-validation of + * the extrinsic is implemented in a `SignedExtension`. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface KeyOwnerProof { + session: SessionIndex + trieNodes: Bytes[] + validatorCount: ValidatorCount +} + +export interface GrandpaEquivocationProof { + setId: SetId + equivocation: GrandpaEquivocation +} + +export type GrandpaEquivocation = GrandpaEquivocation_Precommit | GrandpaEquivocation_Prevote + +export interface GrandpaEquivocation_Precommit { + __kind: 'Precommit' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocation_Prevote { + __kind: 'Prevote' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocationValue { + roundNumber: bigint + identity: AuthorityId + first: [GrandpaPrevote, AuthoritySignature] + second: [GrandpaPrevote, AuthoritySignature] +} + +export type AuthoritySignature = Bytes + +export interface GrandpaPrevote { + targetHash: Hash + targetNumber: BlockNumber +} + +export type AuthorityId = Bytes + +export type SetId = bigint + +export type FinalityTrackerCall = FinalityTrackerCall_final_hint + +/** + * Hint that the author of this block thinks the best finalized + * block is the given number. + */ +export interface FinalityTrackerCall_final_hint { + __kind: 'final_hint' + hint: number +} + +export type ElectionsPhragmenCall = ElectionsPhragmenCall_remove_member | ElectionsPhragmenCall_remove_voter | ElectionsPhragmenCall_renounce_candidacy | ElectionsPhragmenCall_report_defunct_voter | ElectionsPhragmenCall_submit_candidacy | ElectionsPhragmenCall_vote + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, a new phragmen election is started. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement: + * - Base weight: 50.93 µs + * - State reads: + * - RunnersUp.len() + * - Members, RunnersUp (remove_and_replace_member) + * - State writes: + * - Members, RunnersUp (remove_and_replace_member) + * Else, since this is a root call and will go into phragmen, we assume full block for now. + * # + */ +export interface ElectionsPhragmenCall_remove_member { + __kind: 'remove_member' + who: LookupSource + hasReplacement: boolean +} + +/** + * Remove `origin` as a voter. This removes the lock and returns the bond. + * + * # + * Base weight: 36.8 µs + * All state access is from do_remove_voter. + * State reads: + * - Voting + * - [AccountData(who)] + * State writes: + * - Voting + * - Locks + * - [AccountData(who)] + * # + */ +export interface ElectionsPhragmenCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * - `origin` is a candidate and not elected in any set. In this case, the bond is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the bond is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the bond is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_voter`], if replacement runners exists, they are immediately used. + * + * If a candidate is renouncing: + * Base weight: 17.28 µs + * Complexity of candidate_count: 0.235 µs + * State reads: + * - Candidates + * - [AccountBalance(who) (unreserve)] + * State writes: + * - Candidates + * - [AccountBalance(who) (unreserve)] + * If member is renouncing: + * Base weight: 46.25 µs + * State reads: + * - Members, RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * State writes: + * - Members, RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * If runner is renouncing: + * Base weight: 46.25 µs + * State reads: + * - RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * State writes: + * - RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * + * Weight note: The call into changeMembers need to be accounted for. + * + */ +export interface ElectionsPhragmenCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Report `target` for being an defunct voter. In case of a valid report, the reporter is + * rewarded by the bond amount of `target`. Otherwise, the reporter itself is removed and + * their bond is slashed. + * + * A defunct voter is defined to be: + * - a voter whose current submitted votes are all invalid. i.e. all of them are no + * longer a candidate nor an active member or a runner-up. + * + * + * The origin must provide the number of current candidates and votes of the reported target + * for the purpose of accurate weight calculation. + * + * # + * No Base weight based on min square analysis. + * Complexity of candidate_count: 1.755 µs + * Complexity of vote_count: 18.51 µs + * State reads: + * - Voting(reporter) + * - Candidate.len() + * - Voting(Target) + * - Candidates, Members, RunnersUp (is_defunct_voter) + * State writes: + * - Lock(reporter || target) + * - [AccountBalance(reporter)] + AccountBalance(target) + * - Voting(reporter || target) + * Note: the db access is worse with respect to db, which is when the report is correct. + * # + */ +export interface ElectionsPhragmenCall_report_defunct_voter { + __kind: 'report_defunct_voter' + defunct: DefunctVoter +} + +/** + * Submit oneself for candidacy. + * + * A candidate will either: + * - Lose at the end of the term and forfeit their deposit. + * - Win and become a member. Members will eventually get their stash back. + * - Become a runner-up. Runners-ups are reserved members in case one gets forcefully + * removed. + * + * # + * Base weight = 33.33 µs + * Complexity of candidate_count: 0.375 µs + * State reads: + * - Candidates.len() + * - Candidates + * - Members + * - RunnersUp + * - [AccountBalance(who)] + * State writes: + * - [AccountBalance(who)] + * - Candidates + * # + */ +export interface ElectionsPhragmenCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a bond amount is + * reserved. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * It is the responsibility of the caller to not place all of their balance into the lock + * and keep some for further transactions. + * + * # + * Base weight: 47.93 µs + * State reads: + * - Candidates.len() + Members.len() + RunnersUp.len() + * - Voting (is_voter) + * - [AccountBalance(who) (unreserve + total_balance)] + * State writes: + * - Voting + * - Lock + * - [AccountBalance(who) (unreserve -- only when creating a new voter)] + * # + */ +export interface ElectionsPhragmenCall_vote { + __kind: 'vote' + votes: AccountId[] + value: bigint +} + +export interface DefunctVoter { + who: AccountId + voteCount: number + candidateCount: number +} + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +export type DemocracyCall = DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * # + * - `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + * - Db reads: `scheduler lookup`, scheduler agenda` + * - Db writes: `scheduler lookup`, scheduler agenda` + * - Base Weight: 36.78 + 3.277 * D µs + * # + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: ReferendumIndex +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # + * - Complexity: `O(1)`. + * - Db writes: `ReferendumInfoOf` + * - Base Weight: 21.57 µs + * # + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * # + * - `O(1)`. + * - Db writes: `PublicProps` + * - Base Weight: 2.505 µs + * # + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must + * not be more than the account's current balance. + * + * Emits `Delegated`. + * + * # + * - Complexity: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + * - Db reads: 2*`VotingOf`, `balances locks` + * - Db writes: 2*`VotingOf`, `balances locks` + * - Db reads per votes: `ReferendumInfoOf` + * - Db writes per votes: `ReferendumInfoOf` + * - Base Weight: 65.78 + 8.229 * R µs + * # + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId + conviction: Conviction + balance: BalanceOf +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * # + * - Complexity: `O(1)`. + * - Db reads: `ReferendumInfoOf`, `Cancellations` + * - Db writes: `ReferendumInfoOf`, `Cancellations` + * ------------- + * - Base Weight: 34.25 µs + * # + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: ReferendumIndex +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: Hash + index: ReferendumIndex +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * # + * - Complexity `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + * - Db reads: `NextExternal`, `Blacklist` + * - Db writes: `NextExternal` + * - Base Weight: 13.8 + .106 * V µs + * # + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: Hash +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * # + * - Complexity: `O(1)` + * - Db write: `NextExternal` + * - Base Weight: 3.087 µs + * # + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: Hash +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * # + * - Complexity: `O(1)` + * - Db write: `NextExternal` + * - Base Weight: 3.065 µs + * # + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: Hash +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * `FastTrackVotingPeriod` if too low. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * # + * - Complexity: `O(1)` + * - Db reads: `NextExternal`, `ReferendumCount` + * - Db writes: `NextExternal`, `ReferendumCount`, `ReferendumInfoOf` + * - Base Weight: 30.1 µs + * # + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: Hash + votingPeriod: BlockNumber + delay: BlockNumber +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * # + * see `weight_for::note_preimage` + * # + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * # + * see `weight_for::note_preimage` + * # + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * # + * - Complexity: `O(1)` + * - Db reads: `PublicPropCount`, `PublicProps` + * - Db writes: `PublicPropCount`, `PublicProps`, `DepositOf` + * ------------------- + * Base Weight: 42.58 + .127 * P µs with `P` the number of proposals `PublicProps` + * # + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: Hash + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. + * Extrinsic is weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * # + * - Complexity: `O(D)` where D is length of proposal. + * - Db reads: `Preimages` + * - Db writes: `Preimages` + * - Base Weight: 39.31 + .003 * b µs + * # + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: Hash + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * # + * - `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + * - Db reads: `ReferendumInfoOf`, `VotingOf` + * - Db writes: `ReferendumInfoOf`, `VotingOf` + * - Base Weight: 19.15 + .372 * R + * # + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId + index: ReferendumIndex +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * # + * - `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + * - Db reads: `ReferendumInfoOf`, `VotingOf` + * - Db writes: `ReferendumInfoOf`, `VotingOf` + * - Base Weight: 21.03 + .359 * R + * # + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: ReferendumIndex +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * # + * - Complexity: `O(S)` where S is the number of seconds a proposal already has. + * - Db reads: `DepositOf` + * - Db writes: `DepositOf` + * --------- + * - Base Weight: 22.28 + .229 * S µs + * # + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * # + * - Complexity: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + * - Db reads: 2*`VotingOf` + * - Db writes: 2*`VotingOf` + * - Db reads per votes: `ReferendumInfoOf` + * - Db writes per votes: `ReferendumInfoOf` + * - Base Weight: 33.29 + 8.104 * R µs + * # + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * # + * - Complexity `O(R)` with R number of vote of target. + * - Db reads: `VotingOf`, `balances locks`, `target account` + * - Db writes: `VotingOf`, `balances locks`, `target account` + * - Base Weight: + * - Unlock Remove: 42.96 + .048 * R + * - Unlock Set: 37.63 + .327 * R + * # + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * # + * - Complexity: `O(V + log(V))` where V is number of `existing vetoers` + * Performs a binary search on `existing_vetoers` which should not be very large. + * - Db reads: `NextExternal`, `Blacklist` + * - Db writes: `NextExternal`, `Blacklist` + * - Base Weight: 29.87 + .188 * V µs + * # + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: Hash +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * # + * - Complexity: `O(R)` where R is the number of referendums the voter has voted on. + * weight is charged as if maximum votes. + * - Db reads: `ReferendumInfoOf`, `VotingOf`, `balances locks` + * - Db writes: `ReferendumInfoOf`, `VotingOf`, `balances locks` + * -------------------- + * - Base Weight: + * - Vote New: 49.24 + .333 * R µs + * - Vote Existing: 49.94 + .343 * R µs + * # + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + value: AccountVoteSplit +} + +export interface AccountVote_Standard { + __kind: 'Standard' + value: AccountVoteStandard +} + +export interface AccountVoteStandard { + vote: Vote + balance: Balance +} + +export type Vote = number + +export interface AccountVoteSplit { + aye: Balance + nay: Balance +} + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +export type ReferendumIndex = number + +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * Base Weight: .49 * P + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MAX_MEMBERS` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export type MemberCount = number + +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * Total Complexity: O(1) + * ---------------------------- + * Base Weight: 93.3 µs + * DB Weight: + * - Read: Preclaims, Signing, Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + * - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting, Signing, Preclaims + * Validate PreValidateAttests: +8.631 µs + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * - One `eth_recover` operation which involves a keccak hash and a + * ecdsa recover. + * - Three storage reads to check if a claim exists for the user, to + * get the current pot size, to see if there exists a vesting schedule. + * - Up to one storage write for adding a new vesting schedule. + * - One `deposit_creating` Currency call. + * - One storage write to update the total. + * - Two storage removals for vesting and claims information. + * - One deposit event. + * + * Total Complexity: O(1) + * ---------------------------- + * Base Weight: 269.7 µs + * DB Weight: + * - Read: Signing, Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + * - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting, Signing + * Validate Unsigned: +188.7 µs + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * - One `eth_recover` operation which involves a keccak hash and a + * ecdsa recover. + * - Four storage reads to check if a claim exists for the user, to + * get the current pot size, to see if there exists a vesting schedule, to get the + * required statement. + * - Up to one storage write for adding a new vesting schedule. + * - One `deposit_creating` Currency call. + * - One storage write to update the total. + * - Two storage removals for vesting and claims information. + * - One deposit event. + * + * Total Complexity: O(1) + * ---------------------------- + * Base Weight: 270.2 µs + * DB Weight: + * - Read: Signing, Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + * - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting, Signing + * Validate Unsigned: +190.1 µs + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * - One storage mutate to increase the total claims available. + * - One storage write to add a new claim. + * - Up to one storage write to add a new vesting schedule. + * + * Total Complexity: O(1) + * --------------------- + * Base Weight: 10.46 µs + * DB Weight: + * - Reads: Total + * - Writes: Total, Claims + * - Maybe Write: Vesting, Statement + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: BalanceOf + vestingSchedule?: ([BalanceOf, BalanceOf, BlockNumber] | undefined) + statement?: (StatementKind | undefined) +} + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is + * not assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: LookupSource + dest: LookupSource + value: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also decrease the total issuance of the system (`TotalIssuance`). + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + * + * # + * - Independent of the arguments. + * - Contains a limited number of reads and writes. + * --------------------- + * - Base Weight: + * - Creating: 27.56 µs + * - Killing: 35.11 µs + * - DB Weight: 1 Read, 1 Write to `who` + * # + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: LookupSource + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * It will decrease the total issuance of the system by the `TransferFee`. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for + * input config types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional + * check that the transfer will not kill the origin account. + * --------------------------------- + * - Base Weight: 73.64 µs, worst case scenario (account created, account removed) + * - DB Weight: 1 Read and 1 Write to destination account + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: LookupSource + value: bigint +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Module.html#method.transfer + * # + * - Cheaper than transfer because account cannot be killed. + * - Base Weight: 51.4 µs + * - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already) + * # + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: LookupSource + value: bigint +} + +export type BabeCall = never + +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +export interface Header { + parentHash: Hash + number: number + stateRoot: Hash + extrinsicsRoot: Hash + digest: Digest +} + +export interface Digest { + logs: DigestItem[] +} + +export type DigestItem = DigestItem_AuthoritiesChange | DigestItem_ChangesTrieRoot | DigestItem_ChangesTrieSignal | DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal | DigestItem_SealV0 + +export interface DigestItem_AuthoritiesChange { + __kind: 'AuthoritiesChange' + value: AuthorityId[] +} + +export interface DigestItem_ChangesTrieRoot { + __kind: 'ChangesTrieRoot' + value: Hash +} + +export interface DigestItem_ChangesTrieSignal { + __kind: 'ChangesTrieSignal' + value: ChangesTrieSignal +} + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: Consensus +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: PreRuntime +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: Seal +} + +export interface DigestItem_SealV0 { + __kind: 'SealV0' + value: SealV0 +} + +export type SealV0 = [bigint, Signature] + +export type Seal = [ConsensusEngineId, Bytes] + +export type PreRuntime = [ConsensusEngineId, Bytes] + +export type Consensus = [ConsensusEngineId, Bytes] + +export type ConsensusEngineId = Bytes + +export type ChangesTrieSignal = ChangesTrieSignal_NewConfiguration + +export interface ChangesTrieSignal_NewConfiguration { + __kind: 'NewConfiguration' + value?: (ChangesTrieConfiguration | undefined) +} + +export type AuthorityDiscoveryCall = never + +export type AttestationsCall = AttestationsCall_more_attestations + +/** + * Provide candidate receipts for parachains, in ascending order by id. + */ +export interface AttestationsCall_more_attestations { + __kind: 'more_attestations' +} + +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * Base Weight: .49 * P + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MAX_MEMBERS` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: Key, + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => Key), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + set_changes_trie_config: sts.enumStruct({ + changesTrieConfig: sts.option(() => ChangesTrieConfiguration), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => KeyValue), + }), + suicide: sts.unit(), + } +}) + +export const KeyValue = sts.tuple(() => [StorageKey, StorageData]) + +export const StorageData = sts.bytes() + +export const StorageKey = sts.bytes() + +export const ChangesTrieConfiguration: sts.Type = sts.struct(() => { + return { + digestInterval: sts.number(), + digestLevels: sts.number(), + } +}) + +export const Key = sts.bytes() + +export const Perbill = sts.number() + +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: LookupSource, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: EraIndex, + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => LookupSource), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId, + era: EraIndex, + }), + reap_stash: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + set_controller: sts.enumStruct({ + controller: LookupSource, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + validators: sts.array(() => AccountId), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + submit_election_solution: sts.enumStruct({ + winners: sts.array(() => ValidatorIndex), + compact: CompactAssignments, + score: ElectionScore, + era: EraIndex, + size: ElectionSize, + }), + submit_election_solution_unsigned: sts.enumStruct({ + winners: sts.array(() => ValidatorIndex), + compact: CompactAssignments, + score: ElectionScore, + era: EraIndex, + size: ElectionSize, + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + } +}) + +export const ElectionSize: sts.Type = sts.struct(() => { + return { + validators: sts.number(), + nominators: sts.number(), + } +}) + +export const ElectionScore = sts.array(() => sts.bigint()) + +export const CompactAssignments: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes2: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes3: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes4: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes5: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes6: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes7: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes8: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes9: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes10: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes11: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes12: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes13: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes14: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes15: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes16: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + } +}) + +export const CompactScore = sts.tuple(() => [ValidatorIndex, OffchainAccuracy]) + +export const OffchainAccuracy = sts.number() + +export const NominatorIndex = sts.number() + +export const ValidatorIndex = sts.number() + +export const EraIndex = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: BalanceOf, + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId, + judgement: SocietyJudgement, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: LookupSource, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId, + value: BalanceOf, + tip: BalanceOf, + }), + } +}) + +export const SocietyJudgement: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + sub: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + bid_renew: sts.enumStruct({ + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + elaborate_deploy_data: sts.enumStruct({ + paraId: sts.number(), + code: ValidationCode, + }), + fix_deploy_data: sts.enumStruct({ + sub: sts.number(), + paraId: sts.number(), + codeHash: Hash, + codeSize: sts.number(), + initialHeadData: HeadData, + }), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + set_offboarding: sts.enumStruct({ + dest: LookupSource, + }), + } +}) + +export const HeadData = sts.bytes() + +export const ValidationCode = sts.bytes() + +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: Keys, + proof: sts.bytes(), + }), + } +}) + +export const Keys = sts.tuple(() => [AccountId, AccountId, AccountId, AccountId, AccountId]) + +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: BlockNumber, + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_188, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_188, + }), + } +}) + +export const Priority = sts.number() + +export const Period = sts.tuple(() => [BlockNumber, sts.number()]) + +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + deregister_para: sts.enumStruct({ + id: sts.number(), + }), + deregister_parathread: sts.unit(), + register_para: sts.enumStruct({ + id: sts.number(), + info: ParaInfo, + code: ValidationCode, + initialHeadData: HeadData, + }), + register_parathread: sts.enumStruct({ + code: ValidationCode, + initialHeadData: HeadData, + }), + select_parathread: sts.enumStruct({ + id: sts.number(), + collator: CollatorId, + headHash: Hash, + }), + set_thread_count: sts.enumStruct({ + count: sts.number(), + }), + swap: sts.enumStruct({ + other: sts.number(), + }), + } +}) + +export const CollatorId = sts.bytes() + +export const ParaInfo: sts.Type = sts.struct(() => { + return { + manager: AccountId, + deposit: Balance, + locked: sts.boolean(), + } +}) + +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId, + call: Type_188, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId, + }), + claim_recovery: sts.enumStruct({ + account: AccountId, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId), + threshold: sts.number(), + delayPeriod: BlockNumber, + }), + initiate_recovery: sts.enumStruct({ + account: AccountId, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + } +}) + +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + proxy: AccountId, + proxyType: ProxyType, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_188, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + proxy: AccountId, + proxyType: ProxyType, + }), + } +}) + +export const ParachainsCall: sts.Type = sts.closedEnum(() => { + return { + report_double_vote: sts.enumStruct({ + report: DoubleVoteReport, + }), + set_heads: sts.enumStruct({ + heads: sts.array(() => AttestedCandidate), + }), + } +}) + +export const AttestedCandidate: sts.Type = sts.struct(() => { + return { + candidate: AbridgedCandidateReceipt, + validityVotes: sts.array(() => ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: ValidatorSignature, + Implicit: ValidatorSignature, + Never: sts.unit(), + } +}) + +export const ValidatorSignature = sts.bytes() + +export const AbridgedCandidateReceipt: sts.Type = sts.struct(() => { + return { + parachainIndex: ParaId, + relayParent: Hash, + headData: HeadData, + collator: CollatorId, + signature: CollatorSignature, + povBlockHash: Hash, + commitments: CandidateCommitments, + } +}) + +export const CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => UpwardMessage), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: BlockNumber, + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: sts.number(), + data: sts.bytes(), + } +}) + +export const UpwardMessage = sts.bytes() + +export const CollatorSignature = sts.bytes() + +export const ParaId = sts.number() + +export const DoubleVoteReport: sts.Type = sts.struct(() => { + return { + identity: ValidatorId, + first: sts.tuple(() => [Statement, ValidatorSignature]), + second: sts.tuple(() => [Statement, ValidatorSignature]), + proof: MembershipProof, + signingContext: SigningContext, + } +}) + +export const SigningContext: sts.Type = sts.struct(() => { + return { + sessionIndex: SessionIndex, + parentHash: Hash, + } +}) + +export const SessionIndex = sts.number() + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: SessionIndex, + trieNodes: sts.array(() => sts.bytes()), + validatorCount: ValidatorCount, + } +}) + +export const ValidatorCount = sts.number() + +export const Statement: sts.Type = sts.closedEnum(() => { + return { + Candidate: Hash, + Invalid: Hash, + Never: sts.unit(), + Valid: Hash, + } +}) + +export const ValidatorId = sts.bytes() + +export const OffencesCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + call: Type_188, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: AccountIndex, + }), + force_transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + }), + free: sts.enumStruct({ + index: AccountIndex, + }), + transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + }), + } +}) + +export const AccountIndex = sts.number() + +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: Signature, + }), + } +}) + +export const Signature = sts.bytes() + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: BlockNumber, + networkState: OpaqueNetworkState, + sessionIndex: SessionIndex, + authorityIndex: AuthIndex, + validatorsLen: sts.number(), + } +}) + +export const AuthIndex = sts.number() + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId, + }), + cancel_request: sts.enumStruct({ + regIndex: RegistrarIndex, + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: LookupSource, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: LookupSource, + judgement: IdentityJudgement, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: sts.bigint(), + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId, Data])), + }), + } +}) + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: H256, + Keccak256: H256, + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: H256, + ShaThree256: H256, + } +}) + +export const H256 = sts.bytes() + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => IdentityInfoAdditional), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => H160), + image: Data, + twitter: Data, + } +}) + +export const H160 = sts.bytes() + +export const IdentityInfoAdditional = sts.tuple(() => [Data, Data]) + +export const IdentityJudgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: Balance, + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export const RegistrarIndex = sts.number() + +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + report_equivocation: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const KeyOwnerProof: sts.Type = sts.struct(() => { + return { + session: SessionIndex, + trieNodes: sts.array(() => sts.bytes()), + validatorCount: ValidatorCount, + } +}) + +export const GrandpaEquivocationProof: sts.Type = sts.struct(() => { + return { + setId: SetId, + equivocation: GrandpaEquivocation, + } +}) + +export const GrandpaEquivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: GrandpaEquivocationValue, + Prevote: GrandpaEquivocationValue, + } +}) + +export const GrandpaEquivocationValue: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: AuthorityId, + first: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + second: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + } +}) + +export const AuthoritySignature = sts.bytes() + +export const GrandpaPrevote: sts.Type = sts.struct(() => { + return { + targetHash: Hash, + targetNumber: BlockNumber, + } +}) + +export const AuthorityId = sts.bytes() + +export const SetId = sts.bigint() + +export const FinalityTrackerCall: sts.Type = sts.closedEnum(() => { + return { + final_hint: sts.enumStruct({ + hint: sts.number(), + }), + } +}) + +export const ElectionsPhragmenCall: sts.Type = sts.closedEnum(() => { + return { + remove_member: sts.enumStruct({ + who: LookupSource, + hasReplacement: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + report_defunct_voter: sts.enumStruct({ + defunct: DefunctVoter, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId), + value: sts.bigint(), + }), + } +}) + +export const DefunctVoter: sts.Type = sts.struct(() => { + return { + who: AccountId, + voteCount: sts.number(), + candidateCount: sts.number(), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + cancel_queued: sts.enumStruct({ + which: ReferendumIndex, + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId, + conviction: Conviction, + balance: BalanceOf, + }), + emergency_cancel: sts.enumStruct({ + refIndex: ReferendumIndex, + }), + enact_proposal: sts.enumStruct({ + proposalHash: Hash, + index: ReferendumIndex, + }), + external_propose: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_default: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: Hash, + }), + fast_track: sts.enumStruct({ + proposalHash: Hash, + votingPeriod: BlockNumber, + delay: BlockNumber, + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: Hash, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: Hash, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId, + index: ReferendumIndex, + }), + remove_vote: sts.enumStruct({ + index: ReferendumIndex, + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId, + }), + veto_external: sts.enumStruct({ + proposalHash: Hash, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: AccountVoteSplit, + Standard: AccountVoteStandard, + } +}) + +export const AccountVoteStandard: sts.Type = sts.struct(() => { + return { + vote: Vote, + balance: Balance, + } +}) + +export const Vote = sts.number() + +export const AccountVoteSplit: sts.Type = sts.struct(() => { + return { + aye: Balance, + nay: Balance, + } +}) + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export const ReferendumIndex = sts.number() + +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: BalanceOf, + vestingSchedule: sts.option(() => sts.tuple(() => [BalanceOf, BalanceOf, BlockNumber])), + statement: sts.option(() => StatementKind), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: LookupSource, + dest: LookupSource, + value: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: LookupSource, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + } +}) + +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: Hash, + number: sts.number(), + stateRoot: Hash, + extrinsicsRoot: Hash, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + AuthoritiesChange: sts.array(() => AuthorityId), + ChangesTrieRoot: Hash, + ChangesTrieSignal: ChangesTrieSignal, + Consensus: Consensus, + Other: sts.bytes(), + PreRuntime: PreRuntime, + RuntimeEnvironmentUpdated: sts.unit(), + Seal: Seal, + SealV0: SealV0, + } +}) + +export const SealV0 = sts.tuple(() => [sts.bigint(), Signature]) + +export const Seal = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const PreRuntime = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const Consensus = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const ConsensusEngineId = sts.bytes() + +export const ChangesTrieSignal: sts.Type = sts.closedEnum(() => { + return { + NewConfiguration: sts.option(() => ChangesTrieConfiguration), + } +}) + +export const AuthorityDiscoveryCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const AttestationsCall: sts.Type = sts.closedEnum(() => { + return { + more_attestations: sts.unit(), + } +}) + +export type Type_188 = Type_188_Attestations | Type_188_AuthorityDiscovery | Type_188_Authorship | Type_188_Babe | Type_188_Balances | Type_188_Claims | Type_188_Council | Type_188_Democracy | Type_188_ElectionsPhragmen | Type_188_FinalityTracker | Type_188_Grandpa | Type_188_Identity | Type_188_ImOnline | Type_188_Indices | Type_188_Multisig | Type_188_Offences | Type_188_Parachains | Type_188_Proxy | Type_188_Recovery | Type_188_Registrar | Type_188_Scheduler | Type_188_Session | Type_188_Slots | Type_188_Society | Type_188_Staking | Type_188_System | Type_188_TechnicalCommittee | Type_188_TechnicalMembership | Type_188_Timestamp | Type_188_Treasury | Type_188_Utility | Type_188_Vesting + +export interface Type_188_Attestations { + __kind: 'Attestations' + value: AttestationsCall +} + +export interface Type_188_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Type_188_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Type_188_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Type_188_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Type_188_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Type_188_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Type_188_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Type_188_ElectionsPhragmen { + __kind: 'ElectionsPhragmen' + value: ElectionsPhragmenCall +} + +export interface Type_188_FinalityTracker { + __kind: 'FinalityTracker' + value: FinalityTrackerCall +} + +export interface Type_188_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Type_188_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Type_188_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Type_188_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Type_188_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Type_188_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Type_188_Parachains { + __kind: 'Parachains' + value: ParachainsCall +} + +export interface Type_188_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Type_188_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Type_188_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Type_188_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Type_188_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Type_188_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Type_188_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Type_188_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Type_188_System { + __kind: 'System' + value: SystemCall +} + +export interface Type_188_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Type_188_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Type_188_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Type_188_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Type_188_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Type_188_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId = sts.bytes() diff --git a/squid/src/types/v2007.ts b/squid/src/types/v2007.ts new file mode 100644 index 00000000..b9718734 --- /dev/null +++ b/squid/src/types/v2007.ts @@ -0,0 +1,6615 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: BlockNumber, + index: sts.number(), + } +}) + +export const BlockNumber = sts.number() + +export interface Timepoint { + height: BlockNumber + index: number +} + +export type BlockNumber = number + +export const Type_189: sts.Type = sts.closedEnum(() => { + return { + Attestations: AttestationsCall, + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Democracy: DemocracyCall, + ElectionsPhragmen: ElectionsPhragmenCall, + FinalityTracker: FinalityTrackerCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + Parachains: ParachainsCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + } +}) + +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: LookupSource, + }), + vested_transfer: sts.enumStruct({ + target: LookupSource, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: Balance, + perBlock: Balance, + startingBlock: BlockNumber, + } +}) + +export const Balance = sts.bigint() + +export interface VestingInfo { + locked: Balance + perBlock: Balance + startingBlock: BlockNumber +} + +export type Balance = bigint + +export const LookupSource = sts.bytes() + +export type VestingCall = VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this module. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * - Benchmark: + * - Unlocked: 48.76 + .048 * l µs (min square analysis) + * - Locked: 44.43 + .284 * l µs (min square analysis) + * - Using 50 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks. + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this module. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * - Benchmark: + * - Unlocked: 44.3 + .294 * l µs (min square analysis) + * - Locked: 48.16 + .103 * l µs (min square analysis) + * - Using 50 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks. + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: LookupSource +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Benchmark: 100.3 + .365 * l µs (min square analysis) + * - Using 100 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks. + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: LookupSource + schedule: VestingInfo +} + +export type LookupSource = Bytes + +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_limited_sub: sts.enumStruct({ + index: sts.number(), + call: Type_189, + }), + as_sub: sts.enumStruct({ + index: sts.number(), + call: Type_189, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Type_189), + }), + } +}) + +export type UtilityCall = UtilityCall_as_limited_sub | UtilityCall_as_sub | UtilityCall_batch + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Calls must each fulfil the `IsCallable` filter; it is not cleared before. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_sub` instead. + * + * The dispatch origin for this call must be _Signed_. + * + * # + * - Base weight: 2.861 µs + * - Plus the weight of the `call` + * # + */ +export interface UtilityCall_as_limited_sub { + __kind: 'as_limited_sub' + index: number + call: Type_189 +} + +/** + * Send a call through an indexed pseudonym of the sender. + * + * The call must fulfil only the pre-cleared `IsCallable` filter (i.e. only the level of + * filtering that remains after calling `take()`). + * + * NOTE: If you need to ensure that any account-based filtering is honored (i.e. because + * you expect `proxy` to have been used prior in the call stack and you want it to apply to + * any sub-accounts), then use `as_limited_sub` instead. + * + * The dispatch origin for this call must be _Signed_. + * + * # + * - Base weight: 2.861 µs + * - Plus the weight of the `call` + * # + */ +export interface UtilityCall_as_sub { + __kind: 'as_sub' + index: number + call: Type_189 +} + +/** + * Send a batch of dispatch calls. + * + * This will execute until the first one fails and then stop. Calls must fulfil the + * `IsCallable` filter unless the origin is `Root`. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. + * + * # + * - Base weight: 14.39 + .987 * c µs + * - Plus the sum of the weights of the `calls`. + * - Plus one additional event. (repeat read/write) + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Type_189[] +} + +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + close_tip: sts.enumStruct({ + hash: Hash, + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: LookupSource, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + }), + retract_tip: sts.enumStruct({ + hash: Hash, + }), + tip: sts.enumStruct({ + hash: Hash, + tipValue: BalanceOf, + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + tipValue: BalanceOf, + }), + } +}) + +export const BalanceOf = sts.bigint() + +export const Hash = sts.bytes() + +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_close_tip | TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_report_awesome | TreasuryCall_retract_tip | TreasuryCall_tip | TreasuryCall_tip_new + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`. + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TreasuryCall_close_tip { + __kind: 'close_tip' + hash: Hash +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: LookupSource +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `TipReportDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips`, `who account data` + * - DbWrites: `Tips`, `who account data` + * # + */ +export interface TreasuryCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TreasuryCall_retract_tip { + __kind: 'retract_tip' + hash: Hash +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`, insert tip and check closing, + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TreasuryCall_tip { + __kind: 'tip' + hash: Hash + tipValue: BalanceOf +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T` + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TreasuryCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId + tipValue: BalanceOf +} + +export type BalanceOf = bigint + +export type AccountId = Bytes + +export type Hash = Bytes + +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(T)` where `T` complexity of `on_timestamp_set` + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in `on_finalize`) + * - 1 event handler `on_timestamp_set` `O(T)`. + * - Benchmark: 7.678 (min squares analysis) + * - NOTE: This benchmark was done for a runtime with insignificant `on_timestamp_set` handlers. + * New benchmarking is needed when adding new handlers. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId, + }), + change_key: sts.enumStruct({ + new: AccountId, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId), + }), + set_prime: sts.enumStruct({ + who: AccountId, + }), + swap_member: sts.enumStruct({ + remove: AccountId, + add: AccountId, + }), + } +}) + +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `AddOrigin` or root. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId +} + +/** + * Remove the prime member if it exists. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `RemoveOrigin` or root. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `ResetOrigin` or root. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId[] +} + +/** + * Set the prime member. Must be a current member. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `SwapOrigin` or root. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId + add: AccountId +} + +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const MemberCount = sts.number() + +export const Proposal: sts.Type = sts.closedEnum(() => { + return { + Attestations: AttestationsCall, + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Democracy: DemocracyCall, + ElectionsPhragmen: ElectionsPhragmenCall, + FinalityTracker: FinalityTrackerCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + Parachains: ParachainsCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + } +}) + +export type Proposal = Proposal_Attestations | Proposal_AuthorityDiscovery | Proposal_Authorship | Proposal_Babe | Proposal_Balances | Proposal_Claims | Proposal_Council | Proposal_Democracy | Proposal_ElectionsPhragmen | Proposal_FinalityTracker | Proposal_Grandpa | Proposal_Identity | Proposal_ImOnline | Proposal_Indices | Proposal_Multisig | Proposal_Offences | Proposal_Parachains | Proposal_Proxy | Proposal_Recovery | Proposal_Registrar | Proposal_Scheduler | Proposal_Session | Proposal_Slots | Proposal_Society | Proposal_Staking | Proposal_System | Proposal_TechnicalCommittee | Proposal_TechnicalMembership | Proposal_Timestamp | Proposal_Treasury | Proposal_Utility | Proposal_Vesting + +export interface Proposal_Attestations { + __kind: 'Attestations' + value: AttestationsCall +} + +export interface Proposal_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Proposal_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Proposal_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Proposal_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Proposal_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Proposal_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Proposal_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Proposal_ElectionsPhragmen { + __kind: 'ElectionsPhragmen' + value: ElectionsPhragmenCall +} + +export interface Proposal_FinalityTracker { + __kind: 'FinalityTracker' + value: FinalityTrackerCall +} + +export interface Proposal_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Proposal_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Proposal_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Proposal_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Proposal_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Proposal_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Proposal_Parachains { + __kind: 'Parachains' + value: ParachainsCall +} + +export interface Proposal_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Proposal_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Proposal_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Proposal_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Proposal_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Proposal_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Proposal_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Proposal_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Proposal_System { + __kind: 'System' + value: SystemCall +} + +export interface Proposal_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Proposal_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Proposal_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Proposal_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Proposal_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Proposal_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_set_changes_trie_config | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage | SystemCall_suicide + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + * + * # + * - `O(P)` where `P` amount of keys with prefix `prefix` + * - `P` storage deletions. + * - Base Weight: 0.834 * P µs + * - Writes: Number of subkeys + 1 + * # + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Key + subkeys: number +} + +/** + * Kill some items from storage. + * + * # + * - `O(IK)` where `I` length of `keys` and `K` length of one key + * - `I` storage deletions. + * - Base Weight: .378 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Key[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * - Base Weight: 0.665 µs, independent of remark length. + * - No DB operations. + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Set the new changes trie configuration. + * + * # + * - `O(1)` + * - 1 storage write or delete (codec `O(1)`). + * - 1 call to `deposit_log`: Uses `append` API, so O(1) + * - Base Weight: 7.218 µs + * - DB Weight: + * - Writes: Changes Trie, System Digest + * # + */ +export interface SystemCall_set_changes_trie_config { + __kind: 'set_changes_trie_config' + changesTrieConfig?: (ChangesTrieConfiguration | undefined) +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 storage write (codec `O(C)`). + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is expensive). + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very expensive. + * We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + * + * # + * - `O(1)` + * - 1 storage write. + * - Base Weight: 1.405 µs + * - 1 write to HEAP_PAGES + * # + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + * + * # + * - `O(I)` where `I` length of `items` + * - `I` storage writes (`O(1)`). + * - Base Weight: 0.568 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: KeyValue[] +} + +/** + * Kill the sending account, assuming there are no references outstanding and the composite + * data is equal to its default value. + * + * # + * - `O(1)` + * - 1 storage read and deletion. + * -------------------- + * Base Weight: 8.626 µs + * No DB Read or Write operations because caller is already in overlay + * # + */ +export interface SystemCall_suicide { + __kind: 'suicide' +} + +export type KeyValue = [StorageKey, StorageData] + +export type StorageData = Bytes + +export type StorageKey = Bytes + +export interface ChangesTrieConfiguration { + digestInterval: number + digestLevels: number +} + +export type Key = Bytes + +export type Perbill = number + +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_validator_count | StakingCall_submit_election_solution | StakingCall_submit_election_solution_unsigned | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * Base Weight: 67.87 µs + * DB Weight: + * - Read: Bonded, Ledger, [Origin Account], Current Era, History Depth, Locks + * - Write: Bonded, Payee, [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: LookupSource + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount + * that can be added. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller and + * it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * - One DB entry. + * ------------ + * Base Weight: 54.88 µs + * DB Weight: + * - Read: Era Election Status, Bonded, Ledger, [Origin Account], Locks + * - Write: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by either the root origin or the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + * + * # + * Complexity: O(U + S) + * with U unapplied slashes weighted with U=1000 + * and S is the number of slash indices to be canceled. + * - Base: 5870 + 34.61 * S µs + * - Read: Unapplied Slashes + * - Write: Unapplied Slashes + * # + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: EraIndex + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * -------- + * Base Weight: 16.53 µs + * DB Weight: + * - Read: EraElectionStatus, Ledger + * - Write: Validators, Nominators + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Base Weight: 1.959 µs + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - Base Weight: 2.05 µs + * - Write: ForceEra + * # + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Base Weight: 1.857 µs + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + * + * # + * O(S) where S is the number of slashing spans to be removed + * Base Weight: 53.07 + 2.365 * S µs + * Reads: Bonded, Slashing Spans, Account, Locks + * Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Account, Locks + * Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId + numSlashingSpans: number +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. This can only be called when + * [`EraElectionStatus`] is `Closed`. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS). + * - Both the reads and writes follow a similar pattern. + * --------- + * Base Weight: 22.34 + .36 * N µs + * where N is the number of targets + * DB Weight: + * - Reads: Era Election Status, Ledger, Current Era + * - Writes: Validators, Nominators + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: LookupSource[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * This can only be called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Base Weight: 110 + 54.2 * N µs (Median Slopes) + * DB Weight: + * - Read: EraElectionStatus, CurrentEra, HistoryDepth, ErasValidatorReward, + * ErasStakersClipped, ErasRewardPoints, ErasValidatorPrefs (8 items) + * - Read Each: Bonded, Ledger, Payee, Locks, System Account (5 items) + * - Write Each: System Account, Locks, Ledger (3 items) + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId + era: EraIndex +} + +/** + * Remove all data structure concerning a staker/stash once its balance is zero. + * This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone + * and the target `stash` must have no funds left. + * + * This can be called from any origin. + * + * - `stash`: The stash account to reap. Its balance must be zero. + * + * # + * Complexity: O(S) where S is the number of slashing spans on the account. + * Base Weight: 75.94 + 2.396 * S µs + * DB Weight: + * - Reads: Stash Account, Bonded, Slashing Spans, Locks + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Stash Account, Locks + * - Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller, and it can be only called when + * [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MAX_UNLOCKING_CHUNKS`. + * - Storage changes: Can't increase storage, only decrease it. + * --------------- + * - Base Weight: 34.51 µs * .048 L µs + * - DB Weight: + * - Reads: EraElectionStatus, Ledger, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Base Weight: 25.22 µs + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: LookupSource +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. + * This should report all the storage items that will be deleted by clearing old + * era history. Needed to report an accurate weight for the dispatch. Trusted by + * `Root` to report an accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Base Weight: 29.13 * E µs + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + * + * # + * - O(V) + * - Base Weight: 2.208 + .006 * V µs + * - Write: Invulnerables + * # + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + validators: AccountId[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Base Weight: 11.33 µs + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Base Weight: 1.717 µs + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Submit an election result to the chain. If the solution: + * + * 1. is valid. + * 2. has a better score than a potentially existing solution on chain. + * + * then, it will be _put_ on chain. + * + * A solution consists of two pieces of data: + * + * 1. `winners`: a flat vector of all the winners of the round. + * 2. `assignments`: the compact version of an assignment vector that encodes the edge + * weights. + * + * Both of which may be computed using _phragmen_, or any other algorithm. + * + * Additionally, the submitter must provide: + * + * - The `score` that they claim their solution has. + * + * Both validators and nominators will be represented by indices in the solution. The + * indices should respect the corresponding types ([`ValidatorIndex`] and + * [`NominatorIndex`]). Moreover, they should be valid when used to index into + * [`SnapshotValidators`] and [`SnapshotNominators`]. Any invalid index will cause the + * solution to be rejected. These two storage items are set during the election window and + * may be used to determine the indices. + * + * A solution is valid if: + * + * 0. It is submitted when [`EraElectionStatus`] is `Open`. + * 1. Its claimed score is equal to the score computed on-chain. + * 2. Presents the correct number of winners. + * 3. All indexes must be value according to the snapshot vectors. All edge values must + * also be correct and should not overflow the granularity of the ratio type (i.e. 256 + * or billion). + * 4. For each edge, all targets are actually nominated by the voter. + * 5. Has correct self-votes. + * + * A solutions score is consisted of 3 parameters: + * + * 1. `min { support.total }` for each support of a winner. This value should be maximized. + * 2. `sum { support.total }` for each support of a winner. This value should be minimized. + * 3. `sum { support.total^2 }` for each support of a winner. This value should be + * minimized (to ensure less variance) + * + * # + * See `crate::weight` module. + * # + */ +export interface StakingCall_submit_election_solution { + __kind: 'submit_election_solution' + winners: ValidatorIndex[] + compact: CompactAssignments + score: ElectionScore + era: EraIndex + size: ElectionSize +} + +/** + * Unsigned version of `submit_election_solution`. + * + * Note that this must pass the [`ValidateUnsigned`] check which only allows transactions + * from the local node to be included. In other words, only the block author can include a + * transaction in the block. + * + * # + * See `crate::weight` module. + * # + */ +export interface StakingCall_submit_election_solution_unsigned { + __kind: 'submit_election_solution_unsigned' + winners: ValidatorIndex[] + compact: CompactAssignments + score: ElectionScore + era: EraIndex + size: ElectionSize +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + * + * # + * - Independent of the arguments. Limited but potentially exploitable complexity. + * - Contains a limited number of reads. + * - Each call (requires the remainder of the bonded balance to be above `minimum_balance`) + * will cause a new entry to be inserted into a vector (`Ledger.unlocking`) kept in storage. + * The only way to clean the aforementioned storage item is also user-controlled via + * `withdraw_unbonded`. + * - One DB entry. + * ---------- + * Base Weight: 50.34 µs + * DB Weight: + * - Read: Era Election Status, Ledger, Current Era, Locks, [Origin Account] + * - Write: [Origin Account], Locks, Ledger + * + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ----------- + * Base Weight: 17.13 µs + * DB Weight: + * - Read: Era Election Status, Ledger + * - Write: Nominators, Validators + * # + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * - Could be dependent on the `origin` argument and how much `unlocking` chunks exist. + * It implies `consolidate_unlocked` which loops over `Ledger.unlocking`, which is + * indirectly user-controlled. See [`unbond`] for more detail. + * - Contains a limited number of reads, yet the size of which could be large based on `ledger`. + * - Writes are limited to the `origin` account key. + * --------------- + * Complexity O(S) where S is the number of slashing spans to remove + * Base Weight: + * Update: 50.52 + .028 * S µs + * - Reads: EraElectionStatus, Ledger, Current Era, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * Kill: 79.41 + 2.366 * S µs + * - Reads: EraElectionStatus, Ledger, Current Era, Bonded, Slashing Spans, [Origin Account], Locks + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, [Origin Account], Locks + * - Writes Each: SpanSlash * S + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +export interface ValidatorPrefs { + commission: number +} + +export interface ElectionSize { + validators: number + nominators: number +} + +export type ElectionScore = bigint[] + +export interface CompactAssignments { + votes1: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes2: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes3: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes4: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes5: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes6: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes7: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes8: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes9: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes10: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes11: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes12: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes13: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes14: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes15: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes16: [NominatorIndex, CompactScore[], ValidatorIndex][] +} + +export type CompactScore = [ValidatorIndex, OffchainAccuracy] + +export type OffchainAccuracy = number + +export type NominatorIndex = number + +export type ValidatorIndex = number + +export type EraIndex = number + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: BalanceOf +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * module to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId + judgement: SocietyJudgement +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin + * forgives (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: LookupSource + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId + value: BalanceOf + tip: BalanceOf +} + +export type SocietyJudgement = SocietyJudgement_Approve | SocietyJudgement_Rebid | SocietyJudgement_Reject + +export interface SocietyJudgement_Approve { + __kind: 'Approve' +} + +export interface SocietyJudgement_Rebid { + __kind: 'Rebid' +} + +export interface SocietyJudgement_Reject { + __kind: 'Reject' +} + +export type SlotsCall = SlotsCall_bid | SlotsCall_bid_renew | SlotsCall_elaborate_deploy_data | SlotsCall_fix_deploy_data | SlotsCall_new_auction | SlotsCall_set_offboarding + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface SlotsCall_bid { + __kind: 'bid' + sub: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Make a new bid from a parachain account for renewing that (pre-existing) parachain. + * + * The origin *must* be a parachain account. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface SlotsCall_bid_renew { + __kind: 'bid_renew' + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Note a new parachain's code. + * + * This must be called after `fix_deploy_data` and `code` must be the preimage of the + * `code_hash` passed there for the same `para_id`. + * + * This may be called before or after the beginning of the parachain's first lease period. + * If called before then the parachain will become active at the first block of its + * starting lease period. If after, then it will become active immediately after this call. + * + * - `_origin` is irrelevant. + * - `para_id` is the parachain ID whose code will be elaborated. + * - `code` is the preimage of the registered `code_hash` of `para_id`. + */ +export interface SlotsCall_elaborate_deploy_data { + __kind: 'elaborate_deploy_data' + paraId: number + code: ValidationCode +} + +/** + * Set the deploy information for a successful bid to deploy a new parachain. + * + * - `origin` must be the successful bidder account. + * - `sub` is the sub-bidder ID of the bidder. + * - `para_id` is the parachain ID allotted to the winning bidder. + * - `code_hash` is the hash of the parachain's Wasm validation function. + * - `initial_head_data` is the parachain's initial head data. + */ +export interface SlotsCall_fix_deploy_data { + __kind: 'fix_deploy_data' + sub: number + paraId: number + codeHash: Hash + codeSize: number + initialHeadData: HeadData +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface SlotsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +/** + * Set the off-boarding information for a parachain. + * + * The origin *must* be a parachain account. + * + * - `dest` is the destination account to receive the parachain's deposit. + */ +export interface SlotsCall_set_offboarding { + __kind: 'set_offboarding' + dest: LookupSource +} + +export type HeadData = Bytes + +export type ValidationCode = Bytes + +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` in number of key types. + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwnder` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: Keys + proof: Bytes +} + +export type Keys = [AccountId, AccountId, AccountId, AccountId, AccountId] + +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_named + +/** + * Cancel an anonymously scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.15 + 2.869 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: BlockNumber + index: number +} + +/** + * Cancel a named scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 24.91 + 2.907 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.29 + .126 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda + * - Will use base weight of 25 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_189 +} + +/** + * Schedule a named task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 29.6 + .159 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 35 which should be good for more than 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_189 +} + +export type Priority = number + +export type Period = [BlockNumber, number] + +export type RegistrarCall = RegistrarCall_deregister_para | RegistrarCall_deregister_parathread | RegistrarCall_register_para | RegistrarCall_register_parathread | RegistrarCall_select_parathread | RegistrarCall_set_thread_count | RegistrarCall_swap + +/** + * Deregister a parachain with given id + */ +export interface RegistrarCall_deregister_para { + __kind: 'deregister_para' + id: number +} + +/** + * Deregister a parathread and retrieve the deposit. + * + * Must be sent from a `Parachain` origin which is currently a parathread. + * + * Ensure that before calling this that any funds you want emptied from the parathread's + * account is moved out; after this it will be impossible to retrieve them (without + * governance intervention). + */ +export interface RegistrarCall_deregister_parathread { + __kind: 'deregister_parathread' +} + +/** + * Register a parachain with given code. Must be called by root. + * Fails if given ID is already used. + * + * Unlike the `Registrar` trait function of the same name, this + * checks the code and head data against size limits. + */ +export interface RegistrarCall_register_para { + __kind: 'register_para' + id: number + info: ParaInfo + code: ValidationCode + initialHeadData: HeadData +} + +/** + * Register a parathread for immediate use. + * + * Must be sent from a Signed origin that is able to have ParathreadDeposit reserved. + * `code` and `initial_head_data` are used to initialize the parathread's state. + * + * Unlike `register_para`, this function does check that the maximum code size + * and head data size are respected, as parathread registration is an atomic + * action. + */ +export interface RegistrarCall_register_parathread { + __kind: 'register_parathread' + code: ValidationCode + initialHeadData: HeadData +} + +/** + * Place a bid for a parathread to be progressed in the next block. + * + * This is a kind of special transaction that should be heavily prioritized in the + * transaction pool according to the `value`; only `ThreadCount` of them may be presented + * in any single block. + */ +export interface RegistrarCall_select_parathread { + __kind: 'select_parathread' + id: number + collator: CollatorId + headHash: Hash +} + +/** + * Reset the number of parathreads that can pay to be scheduled in a single block. + * + * - `count`: The number of parathreads. + * + * Must be called from Root origin. + */ +export interface RegistrarCall_set_thread_count { + __kind: 'set_thread_count' + count: number +} + +/** + * Swap a parachain with another parachain or parathread. The origin must be a `Parachain`. + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + other: number +} + +export type CollatorId = Bytes + +export interface ParaInfo { + manager: AccountId + deposit: Balance + locked: boolean +} + +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + * + * # + * - The weight of the `call` + 10,000. + * - One storage lookup to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId + call: Type_189 +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + * + * # + * - One storage mutation to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully + * recovered by you. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + V) + * # + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + * + * # + * Key: V (len of vouching friends) + * - One storage read/remove to get the active recovery process. O(1), Codec O(V) + * - One balance call to repatriate reserved. O(X) + * - One event. + * + * Total Complexity: O(V + X) + * # + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. + * Should be ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt + * before the account can be recovered. Should be less than or equal to + * the length of the list of friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized + * that needs to pass before the account can be recovered. + * + * # + * - Key: F (len of friends) + * - One storage read to check that account is not already recoverable. O(1). + * - A check that the friends list is sorted and unique. O(F) + * - One currency reserve operation. O(X) + * - One storage write. O(1). Codec O(F). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId[] + threshold: number + delayPeriod: BlockNumber +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account + * needs to be recoverable (i.e. have a recovery configuration). + * + * # + * - One storage read to check that account is recoverable. O(F) + * - One storage read to check that this recovery process hasn't already started. O(1) + * - One currency reserve operation. O(X) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + * + * # + * Key: F (len of friends) + * - One storage read to get the prefix iterator for active recoveries. O(1) + * - One storage read/remove to get the recovery configuration. O(1), Codec O(F) + * - One balance call to unreserved. O(X) + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + * + * # + * - One storage write O(1) + * - One event + * # + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId + rescuer: AccountId +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you + * want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One binary search to confirm caller is a friend. O(logF) + * - One binary search to confirm caller has not already vouched. O(logV) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + logF + V + logV) + * # + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId + rescuer: AccountId +} + +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * + * # + * P is the number of proxies the user has + * - Base weight: 17.48 + .176 * P µs + * - DB weight: 1 storage read and write. + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + proxy: AccountId + proxyType: ProxyType +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * P is the number of proxies the user has + * - Base weight: 36.48 + .039 * P µs + * - DB weight: 1 storage read and write. + * # + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * P is the number of proxies the user has + * - Base weight: 15.65 + .137 * P µs + * - DB weight: 1 storage read and write. + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * P is the number of proxies the user has + * - Base weight: 19.87 + .141 * P µs + * - DB weight: 1 storage read. + * - Plus the weight of the `call` + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_189 +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * P is the number of proxies the user has + * - Base weight: 13.73 + .129 * P µs + * - DB weight: 1 storage read and write. + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * P is the number of proxies the user has + * - Base weight: 14.37 + .164 * P µs + * - DB weight: 1 storage read and write. + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + proxy: AccountId + proxyType: ProxyType +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +export type ParachainsCall = ParachainsCall_report_double_vote | ParachainsCall_set_heads + +/** + * Provide a proof that some validator has commited a double-vote. + * + * The weight is 0; in order to avoid DoS a `SignedExtension` validation + * is implemented. + */ +export interface ParachainsCall_report_double_vote { + __kind: 'report_double_vote' + report: DoubleVoteReport +} + +/** + * Provide candidate receipts for parachains, in ascending order by id. + */ +export interface ParachainsCall_set_heads { + __kind: 'set_heads' + heads: AttestedCandidate[] +} + +export interface AttestedCandidate { + candidate: AbridgedCandidateReceipt + validityVotes: ValidityAttestation[] + validatorIndices: BitSequence +} + +export type ValidityAttestation = ValidityAttestation_Explicit | ValidityAttestation_Implicit | ValidityAttestation_Never + +export interface ValidityAttestation_Explicit { + __kind: 'Explicit' + value: ValidatorSignature +} + +export interface ValidityAttestation_Implicit { + __kind: 'Implicit' + value: ValidatorSignature +} + +export interface ValidityAttestation_Never { + __kind: 'Never' +} + +export type ValidatorSignature = Bytes + +export interface AbridgedCandidateReceipt { + parachainIndex: ParaId + relayParent: Hash + headData: HeadData + collator: CollatorId + signature: CollatorSignature + povBlockHash: Hash + commitments: CandidateCommitments +} + +export interface CandidateCommitments { + upwardMessages: UpwardMessage[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: BlockNumber +} + +export interface OutboundHrmpMessage { + recipient: number + data: Bytes +} + +export type UpwardMessage = Bytes + +export type CollatorSignature = Bytes + +export type ParaId = number + +export interface DoubleVoteReport { + identity: ValidatorId + first: [Statement, ValidatorSignature] + second: [Statement, ValidatorSignature] + proof: MembershipProof + signingContext: SigningContext +} + +export interface SigningContext { + sessionIndex: SessionIndex + parentHash: Hash +} + +export type SessionIndex = number + +export interface MembershipProof { + session: SessionIndex + trieNodes: Bytes[] + validatorCount: ValidatorCount +} + +export type ValidatorCount = number + +export type Statement = Statement_Candidate | Statement_Invalid | Statement_Never | Statement_Valid + +export interface Statement_Candidate { + __kind: 'Candidate' + value: Hash +} + +export interface Statement_Invalid { + __kind: 'Invalid' + value: Hash +} + +export interface Statement_Never { + __kind: 'Never' +} + +export interface Statement_Valid { + __kind: 'Valid' + value: Hash +} + +export type ValidatorId = Bytes + +export type OffencesCall = never + +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - Base Weight: + * - Create: 44.71 + 0.088 * S + * - Approve: 31.48 + 0.116 * S + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. Calls must each fulfil the `IsCallable` + * filter. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - Base Weight: + * - Create: 46.55 + 0.089 * S µs + * - Approve: 34.03 + .112 * S µs + * - Complete: 40.36 + .225 * S µs + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account] + * - Writes: Multisig Storage, [Caller Account] + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + call: Type_189 +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - Base Weight: 37.6 + 0.084 * S + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId[] + timepoint: Timepoint + callHash: Bytes +} + +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - Base Weight: 28.69 µs + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: AccountIndex +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - Base Weight: 26.83 µs + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId + index: AccountIndex + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - Base Weight: 25.53 µs + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: AccountIndex +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - Base Weight: 30.86 µs + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: AccountIndex +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - Base Weight: 33.74 µs + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId + index: AccountIndex +} + +export type AccountIndex = number + +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` and E is length of + * `Heartbeat.network_state.external_address` + * + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Signature +} + +export type Signature = Bytes + +export interface Heartbeat { + blockNumber: BlockNumber + networkState: OpaqueNetworkState + sessionIndex: SessionIndex + authorityIndex: AuthIndex + validatorsLen: number +} + +export type AuthIndex = number + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `RegistrarOrigin` or `Root`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: RegistrarIndex +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must be _Root_ or match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: LookupSource +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: LookupSource + judgement: IdentityJudgement +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: bigint +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId, Data][] +} + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: H256 +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: H256 +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: H256 +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: H256 +} + +export type H256 = Bytes + +export interface IdentityInfo { + additional: IdentityInfoAdditional[] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (H160 | undefined) + image: Data + twitter: Data +} + +export type H160 = Bytes + +export type IdentityInfoAdditional = [Data, Data] + +export type IdentityJudgement = IdentityJudgement_Erroneous | IdentityJudgement_FeePaid | IdentityJudgement_KnownGood | IdentityJudgement_LowQuality | IdentityJudgement_OutOfDate | IdentityJudgement_Reasonable | IdentityJudgement_Unknown + +export interface IdentityJudgement_Erroneous { + __kind: 'Erroneous' +} + +export interface IdentityJudgement_FeePaid { + __kind: 'FeePaid' + value: Balance +} + +export interface IdentityJudgement_KnownGood { + __kind: 'KnownGood' +} + +export interface IdentityJudgement_LowQuality { + __kind: 'LowQuality' +} + +export interface IdentityJudgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface IdentityJudgement_Reasonable { + __kind: 'Reasonable' +} + +export interface IdentityJudgement_Unknown { + __kind: 'Unknown' +} + +export type RegistrarIndex = number + +export type GrandpaCall = GrandpaCall_report_equivocation + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * Since the weight of the extrinsic is 0, in order to avoid DoS by + * submission of invalid equivocation reports, a mandatory pre-validation of + * the extrinsic is implemented in a `SignedExtension`. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface KeyOwnerProof { + session: SessionIndex + trieNodes: Bytes[] + validatorCount: ValidatorCount +} + +export interface GrandpaEquivocationProof { + setId: SetId + equivocation: GrandpaEquivocation +} + +export type GrandpaEquivocation = GrandpaEquivocation_Precommit | GrandpaEquivocation_Prevote + +export interface GrandpaEquivocation_Precommit { + __kind: 'Precommit' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocation_Prevote { + __kind: 'Prevote' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocationValue { + roundNumber: bigint + identity: AuthorityId + first: [GrandpaPrevote, AuthoritySignature] + second: [GrandpaPrevote, AuthoritySignature] +} + +export type AuthoritySignature = Bytes + +export interface GrandpaPrevote { + targetHash: Hash + targetNumber: BlockNumber +} + +export type AuthorityId = Bytes + +export type SetId = bigint + +export type FinalityTrackerCall = FinalityTrackerCall_final_hint + +/** + * Hint that the author of this block thinks the best finalized + * block is the given number. + */ +export interface FinalityTrackerCall_final_hint { + __kind: 'final_hint' + hint: number +} + +export type ElectionsPhragmenCall = ElectionsPhragmenCall_remove_member | ElectionsPhragmenCall_remove_voter | ElectionsPhragmenCall_renounce_candidacy | ElectionsPhragmenCall_report_defunct_voter | ElectionsPhragmenCall_submit_candidacy | ElectionsPhragmenCall_vote + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, a new phragmen election is started. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement: + * - Base weight: 50.93 µs + * - State reads: + * - RunnersUp.len() + * - Members, RunnersUp (remove_and_replace_member) + * - State writes: + * - Members, RunnersUp (remove_and_replace_member) + * Else, since this is a root call and will go into phragmen, we assume full block for now. + * # + */ +export interface ElectionsPhragmenCall_remove_member { + __kind: 'remove_member' + who: LookupSource + hasReplacement: boolean +} + +/** + * Remove `origin` as a voter. This removes the lock and returns the bond. + * + * # + * Base weight: 36.8 µs + * All state access is from do_remove_voter. + * State reads: + * - Voting + * - [AccountData(who)] + * State writes: + * - Voting + * - Locks + * - [AccountData(who)] + * # + */ +export interface ElectionsPhragmenCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * - `origin` is a candidate and not elected in any set. In this case, the bond is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the bond is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the bond is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_voter`], if replacement runners exists, they are immediately used. + * + * If a candidate is renouncing: + * Base weight: 17.28 µs + * Complexity of candidate_count: 0.235 µs + * State reads: + * - Candidates + * - [AccountBalance(who) (unreserve)] + * State writes: + * - Candidates + * - [AccountBalance(who) (unreserve)] + * If member is renouncing: + * Base weight: 46.25 µs + * State reads: + * - Members, RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * State writes: + * - Members, RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * If runner is renouncing: + * Base weight: 46.25 µs + * State reads: + * - RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * State writes: + * - RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * + * Weight note: The call into changeMembers need to be accounted for. + * + */ +export interface ElectionsPhragmenCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Report `target` for being an defunct voter. In case of a valid report, the reporter is + * rewarded by the bond amount of `target`. Otherwise, the reporter itself is removed and + * their bond is slashed. + * + * A defunct voter is defined to be: + * - a voter whose current submitted votes are all invalid. i.e. all of them are no + * longer a candidate nor an active member or a runner-up. + * + * + * The origin must provide the number of current candidates and votes of the reported target + * for the purpose of accurate weight calculation. + * + * # + * No Base weight based on min square analysis. + * Complexity of candidate_count: 1.755 µs + * Complexity of vote_count: 18.51 µs + * State reads: + * - Voting(reporter) + * - Candidate.len() + * - Voting(Target) + * - Candidates, Members, RunnersUp (is_defunct_voter) + * State writes: + * - Lock(reporter || target) + * - [AccountBalance(reporter)] + AccountBalance(target) + * - Voting(reporter || target) + * Note: the db access is worse with respect to db, which is when the report is correct. + * # + */ +export interface ElectionsPhragmenCall_report_defunct_voter { + __kind: 'report_defunct_voter' + defunct: DefunctVoter +} + +/** + * Submit oneself for candidacy. + * + * A candidate will either: + * - Lose at the end of the term and forfeit their deposit. + * - Win and become a member. Members will eventually get their stash back. + * - Become a runner-up. Runners-ups are reserved members in case one gets forcefully + * removed. + * + * # + * Base weight = 33.33 µs + * Complexity of candidate_count: 0.375 µs + * State reads: + * - Candidates.len() + * - Candidates + * - Members + * - RunnersUp + * - [AccountBalance(who)] + * State writes: + * - [AccountBalance(who)] + * - Candidates + * # + */ +export interface ElectionsPhragmenCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a bond amount is + * reserved. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * It is the responsibility of the caller to not place all of their balance into the lock + * and keep some for further transactions. + * + * # + * Base weight: 47.93 µs + * State reads: + * - Candidates.len() + Members.len() + RunnersUp.len() + * - Voting (is_voter) + * - [AccountBalance(who) (unreserve + total_balance)] + * State writes: + * - Voting + * - Lock + * - [AccountBalance(who) (unreserve -- only when creating a new voter)] + * # + */ +export interface ElectionsPhragmenCall_vote { + __kind: 'vote' + votes: AccountId[] + value: bigint +} + +export interface DefunctVoter { + who: AccountId + voteCount: number + candidateCount: number +} + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +export type DemocracyCall = DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * # + * - `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + * - Db reads: `scheduler lookup`, scheduler agenda` + * - Db writes: `scheduler lookup`, scheduler agenda` + * - Base Weight: 36.78 + 3.277 * D µs + * # + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: ReferendumIndex +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # + * - Complexity: `O(1)`. + * - Db writes: `ReferendumInfoOf` + * - Base Weight: 21.57 µs + * # + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * # + * - `O(1)`. + * - Db writes: `PublicProps` + * - Base Weight: 2.505 µs + * # + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must + * not be more than the account's current balance. + * + * Emits `Delegated`. + * + * # + * - Complexity: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + * - Db reads: 2*`VotingOf`, `balances locks` + * - Db writes: 2*`VotingOf`, `balances locks` + * - Db reads per votes: `ReferendumInfoOf` + * - Db writes per votes: `ReferendumInfoOf` + * - Base Weight: 65.78 + 8.229 * R µs + * # + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId + conviction: Conviction + balance: BalanceOf +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * # + * - Complexity: `O(1)`. + * - Db reads: `ReferendumInfoOf`, `Cancellations` + * - Db writes: `ReferendumInfoOf`, `Cancellations` + * ------------- + * - Base Weight: 34.25 µs + * # + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: ReferendumIndex +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: Hash + index: ReferendumIndex +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * # + * - Complexity `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + * - Db reads: `NextExternal`, `Blacklist` + * - Db writes: `NextExternal` + * - Base Weight: 13.8 + .106 * V µs + * # + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: Hash +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * # + * - Complexity: `O(1)` + * - Db write: `NextExternal` + * - Base Weight: 3.087 µs + * # + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: Hash +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * # + * - Complexity: `O(1)` + * - Db write: `NextExternal` + * - Base Weight: 3.065 µs + * # + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: Hash +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * `FastTrackVotingPeriod` if too low. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * # + * - Complexity: `O(1)` + * - Db reads: `NextExternal`, `ReferendumCount` + * - Db writes: `NextExternal`, `ReferendumCount`, `ReferendumInfoOf` + * - Base Weight: 30.1 µs + * # + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: Hash + votingPeriod: BlockNumber + delay: BlockNumber +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * # + * see `weight_for::note_preimage` + * # + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * # + * see `weight_for::note_preimage` + * # + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * # + * - Complexity: `O(1)` + * - Db reads: `PublicPropCount`, `PublicProps` + * - Db writes: `PublicPropCount`, `PublicProps`, `DepositOf` + * ------------------- + * Base Weight: 42.58 + .127 * P µs with `P` the number of proposals `PublicProps` + * # + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: Hash + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. + * Extrinsic is weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * # + * - Complexity: `O(D)` where D is length of proposal. + * - Db reads: `Preimages` + * - Db writes: `Preimages` + * - Base Weight: 39.31 + .003 * b µs + * # + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: Hash + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * # + * - `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + * - Db reads: `ReferendumInfoOf`, `VotingOf` + * - Db writes: `ReferendumInfoOf`, `VotingOf` + * - Base Weight: 19.15 + .372 * R + * # + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId + index: ReferendumIndex +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * # + * - `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + * - Db reads: `ReferendumInfoOf`, `VotingOf` + * - Db writes: `ReferendumInfoOf`, `VotingOf` + * - Base Weight: 21.03 + .359 * R + * # + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: ReferendumIndex +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * # + * - Complexity: `O(S)` where S is the number of seconds a proposal already has. + * - Db reads: `DepositOf` + * - Db writes: `DepositOf` + * --------- + * - Base Weight: 22.28 + .229 * S µs + * # + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * # + * - Complexity: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + * - Db reads: 2*`VotingOf` + * - Db writes: 2*`VotingOf` + * - Db reads per votes: `ReferendumInfoOf` + * - Db writes per votes: `ReferendumInfoOf` + * - Base Weight: 33.29 + 8.104 * R µs + * # + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * # + * - Complexity `O(R)` with R number of vote of target. + * - Db reads: `VotingOf`, `balances locks`, `target account` + * - Db writes: `VotingOf`, `balances locks`, `target account` + * - Base Weight: + * - Unlock Remove: 42.96 + .048 * R + * - Unlock Set: 37.63 + .327 * R + * # + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * # + * - Complexity: `O(V + log(V))` where V is number of `existing vetoers` + * Performs a binary search on `existing_vetoers` which should not be very large. + * - Db reads: `NextExternal`, `Blacklist` + * - Db writes: `NextExternal`, `Blacklist` + * - Base Weight: 29.87 + .188 * V µs + * # + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: Hash +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * # + * - Complexity: `O(R)` where R is the number of referendums the voter has voted on. + * weight is charged as if maximum votes. + * - Db reads: `ReferendumInfoOf`, `VotingOf`, `balances locks` + * - Db writes: `ReferendumInfoOf`, `VotingOf`, `balances locks` + * -------------------- + * - Base Weight: + * - Vote New: 49.24 + .333 * R µs + * - Vote Existing: 49.94 + .343 * R µs + * # + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + value: AccountVoteSplit +} + +export interface AccountVote_Standard { + __kind: 'Standard' + value: AccountVoteStandard +} + +export interface AccountVoteStandard { + vote: Vote + balance: Balance +} + +export type Vote = number + +export interface AccountVoteSplit { + aye: Balance + nay: Balance +} + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +export type ReferendumIndex = number + +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * Base Weight: .49 * P + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MAX_MEMBERS` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export type MemberCount = number + +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * Total Complexity: O(1) + * ---------------------------- + * Base Weight: 93.3 µs + * DB Weight: + * - Read: Preclaims, Signing, Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + * - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting, Signing, Preclaims + * Validate PreValidateAttests: +8.631 µs + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * - One `eth_recover` operation which involves a keccak hash and a + * ecdsa recover. + * - Three storage reads to check if a claim exists for the user, to + * get the current pot size, to see if there exists a vesting schedule. + * - Up to one storage write for adding a new vesting schedule. + * - One `deposit_creating` Currency call. + * - One storage write to update the total. + * - Two storage removals for vesting and claims information. + * - One deposit event. + * + * Total Complexity: O(1) + * ---------------------------- + * Base Weight: 269.7 µs + * DB Weight: + * - Read: Signing, Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + * - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting, Signing + * Validate Unsigned: +188.7 µs + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * - One `eth_recover` operation which involves a keccak hash and a + * ecdsa recover. + * - Four storage reads to check if a claim exists for the user, to + * get the current pot size, to see if there exists a vesting schedule, to get the + * required statement. + * - Up to one storage write for adding a new vesting schedule. + * - One `deposit_creating` Currency call. + * - One storage write to update the total. + * - Two storage removals for vesting and claims information. + * - One deposit event. + * + * Total Complexity: O(1) + * ---------------------------- + * Base Weight: 270.2 µs + * DB Weight: + * - Read: Signing, Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + * - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting, Signing + * Validate Unsigned: +190.1 µs + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * - One storage mutate to increase the total claims available. + * - One storage write to add a new claim. + * - Up to one storage write to add a new vesting schedule. + * + * Total Complexity: O(1) + * --------------------- + * Base Weight: 10.46 µs + * DB Weight: + * - Reads: Total + * - Writes: Total, Claims + * - Maybe Write: Vesting, Statement + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: BalanceOf + vestingSchedule?: ([BalanceOf, BalanceOf, BlockNumber] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId | undefined) +} + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is + * not assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: LookupSource + dest: LookupSource + value: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also decrease the total issuance of the system (`TotalIssuance`). + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + * + * # + * - Independent of the arguments. + * - Contains a limited number of reads and writes. + * --------------------- + * - Base Weight: + * - Creating: 27.56 µs + * - Killing: 35.11 µs + * - DB Weight: 1 Read, 1 Write to `who` + * # + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: LookupSource + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * It will decrease the total issuance of the system by the `TransferFee`. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for + * input config types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional + * check that the transfer will not kill the origin account. + * --------------------------------- + * - Base Weight: 73.64 µs, worst case scenario (account created, account removed) + * - DB Weight: 1 Read and 1 Write to destination account + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: LookupSource + value: bigint +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Module.html#method.transfer + * # + * - Cheaper than transfer because account cannot be killed. + * - Base Weight: 51.4 µs + * - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already) + * # + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: LookupSource + value: bigint +} + +export type BabeCall = never + +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +export interface Header { + parentHash: Hash + number: number + stateRoot: Hash + extrinsicsRoot: Hash + digest: Digest +} + +export interface Digest { + logs: DigestItem[] +} + +export type DigestItem = DigestItem_AuthoritiesChange | DigestItem_ChangesTrieRoot | DigestItem_ChangesTrieSignal | DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal | DigestItem_SealV0 + +export interface DigestItem_AuthoritiesChange { + __kind: 'AuthoritiesChange' + value: AuthorityId[] +} + +export interface DigestItem_ChangesTrieRoot { + __kind: 'ChangesTrieRoot' + value: Hash +} + +export interface DigestItem_ChangesTrieSignal { + __kind: 'ChangesTrieSignal' + value: ChangesTrieSignal +} + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: Consensus +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: PreRuntime +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: Seal +} + +export interface DigestItem_SealV0 { + __kind: 'SealV0' + value: SealV0 +} + +export type SealV0 = [bigint, Signature] + +export type Seal = [ConsensusEngineId, Bytes] + +export type PreRuntime = [ConsensusEngineId, Bytes] + +export type Consensus = [ConsensusEngineId, Bytes] + +export type ConsensusEngineId = Bytes + +export type ChangesTrieSignal = ChangesTrieSignal_NewConfiguration + +export interface ChangesTrieSignal_NewConfiguration { + __kind: 'NewConfiguration' + value?: (ChangesTrieConfiguration | undefined) +} + +export type AuthorityDiscoveryCall = never + +export type AttestationsCall = AttestationsCall_more_attestations + +/** + * Provide candidate receipts for parachains, in ascending order by id. + */ +export interface AttestationsCall_more_attestations { + __kind: 'more_attestations' +} + +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * Base Weight: .49 * P + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MAX_MEMBERS` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: Key, + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => Key), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + set_changes_trie_config: sts.enumStruct({ + changesTrieConfig: sts.option(() => ChangesTrieConfiguration), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => KeyValue), + }), + suicide: sts.unit(), + } +}) + +export const KeyValue = sts.tuple(() => [StorageKey, StorageData]) + +export const StorageData = sts.bytes() + +export const StorageKey = sts.bytes() + +export const ChangesTrieConfiguration: sts.Type = sts.struct(() => { + return { + digestInterval: sts.number(), + digestLevels: sts.number(), + } +}) + +export const Key = sts.bytes() + +export const Perbill = sts.number() + +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: LookupSource, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: EraIndex, + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => LookupSource), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId, + era: EraIndex, + }), + reap_stash: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + set_controller: sts.enumStruct({ + controller: LookupSource, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + validators: sts.array(() => AccountId), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + submit_election_solution: sts.enumStruct({ + winners: sts.array(() => ValidatorIndex), + compact: CompactAssignments, + score: ElectionScore, + era: EraIndex, + size: ElectionSize, + }), + submit_election_solution_unsigned: sts.enumStruct({ + winners: sts.array(() => ValidatorIndex), + compact: CompactAssignments, + score: ElectionScore, + era: EraIndex, + size: ElectionSize, + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + } +}) + +export const ElectionSize: sts.Type = sts.struct(() => { + return { + validators: sts.number(), + nominators: sts.number(), + } +}) + +export const ElectionScore = sts.array(() => sts.bigint()) + +export const CompactAssignments: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes2: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes3: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes4: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes5: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes6: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes7: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes8: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes9: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes10: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes11: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes12: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes13: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes14: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes15: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes16: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + } +}) + +export const CompactScore = sts.tuple(() => [ValidatorIndex, OffchainAccuracy]) + +export const OffchainAccuracy = sts.number() + +export const NominatorIndex = sts.number() + +export const ValidatorIndex = sts.number() + +export const EraIndex = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: BalanceOf, + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId, + judgement: SocietyJudgement, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: LookupSource, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId, + value: BalanceOf, + tip: BalanceOf, + }), + } +}) + +export const SocietyJudgement: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + sub: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + bid_renew: sts.enumStruct({ + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + elaborate_deploy_data: sts.enumStruct({ + paraId: sts.number(), + code: ValidationCode, + }), + fix_deploy_data: sts.enumStruct({ + sub: sts.number(), + paraId: sts.number(), + codeHash: Hash, + codeSize: sts.number(), + initialHeadData: HeadData, + }), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + set_offboarding: sts.enumStruct({ + dest: LookupSource, + }), + } +}) + +export const HeadData = sts.bytes() + +export const ValidationCode = sts.bytes() + +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: Keys, + proof: sts.bytes(), + }), + } +}) + +export const Keys = sts.tuple(() => [AccountId, AccountId, AccountId, AccountId, AccountId]) + +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: BlockNumber, + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_189, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_189, + }), + } +}) + +export const Priority = sts.number() + +export const Period = sts.tuple(() => [BlockNumber, sts.number()]) + +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + deregister_para: sts.enumStruct({ + id: sts.number(), + }), + deregister_parathread: sts.unit(), + register_para: sts.enumStruct({ + id: sts.number(), + info: ParaInfo, + code: ValidationCode, + initialHeadData: HeadData, + }), + register_parathread: sts.enumStruct({ + code: ValidationCode, + initialHeadData: HeadData, + }), + select_parathread: sts.enumStruct({ + id: sts.number(), + collator: CollatorId, + headHash: Hash, + }), + set_thread_count: sts.enumStruct({ + count: sts.number(), + }), + swap: sts.enumStruct({ + other: sts.number(), + }), + } +}) + +export const CollatorId = sts.bytes() + +export const ParaInfo: sts.Type = sts.struct(() => { + return { + manager: AccountId, + deposit: Balance, + locked: sts.boolean(), + } +}) + +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId, + call: Type_189, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId, + }), + claim_recovery: sts.enumStruct({ + account: AccountId, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId), + threshold: sts.number(), + delayPeriod: BlockNumber, + }), + initiate_recovery: sts.enumStruct({ + account: AccountId, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + } +}) + +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + proxy: AccountId, + proxyType: ProxyType, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_189, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + proxy: AccountId, + proxyType: ProxyType, + }), + } +}) + +export const ParachainsCall: sts.Type = sts.closedEnum(() => { + return { + report_double_vote: sts.enumStruct({ + report: DoubleVoteReport, + }), + set_heads: sts.enumStruct({ + heads: sts.array(() => AttestedCandidate), + }), + } +}) + +export const AttestedCandidate: sts.Type = sts.struct(() => { + return { + candidate: AbridgedCandidateReceipt, + validityVotes: sts.array(() => ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: ValidatorSignature, + Implicit: ValidatorSignature, + Never: sts.unit(), + } +}) + +export const ValidatorSignature = sts.bytes() + +export const AbridgedCandidateReceipt: sts.Type = sts.struct(() => { + return { + parachainIndex: ParaId, + relayParent: Hash, + headData: HeadData, + collator: CollatorId, + signature: CollatorSignature, + povBlockHash: Hash, + commitments: CandidateCommitments, + } +}) + +export const CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => UpwardMessage), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: BlockNumber, + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: sts.number(), + data: sts.bytes(), + } +}) + +export const UpwardMessage = sts.bytes() + +export const CollatorSignature = sts.bytes() + +export const ParaId = sts.number() + +export const DoubleVoteReport: sts.Type = sts.struct(() => { + return { + identity: ValidatorId, + first: sts.tuple(() => [Statement, ValidatorSignature]), + second: sts.tuple(() => [Statement, ValidatorSignature]), + proof: MembershipProof, + signingContext: SigningContext, + } +}) + +export const SigningContext: sts.Type = sts.struct(() => { + return { + sessionIndex: SessionIndex, + parentHash: Hash, + } +}) + +export const SessionIndex = sts.number() + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: SessionIndex, + trieNodes: sts.array(() => sts.bytes()), + validatorCount: ValidatorCount, + } +}) + +export const ValidatorCount = sts.number() + +export const Statement: sts.Type = sts.closedEnum(() => { + return { + Candidate: Hash, + Invalid: Hash, + Never: sts.unit(), + Valid: Hash, + } +}) + +export const ValidatorId = sts.bytes() + +export const OffencesCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + call: Type_189, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: AccountIndex, + }), + force_transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: AccountIndex, + }), + freeze: sts.enumStruct({ + index: AccountIndex, + }), + transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + }), + } +}) + +export const AccountIndex = sts.number() + +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: Signature, + }), + } +}) + +export const Signature = sts.bytes() + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: BlockNumber, + networkState: OpaqueNetworkState, + sessionIndex: SessionIndex, + authorityIndex: AuthIndex, + validatorsLen: sts.number(), + } +}) + +export const AuthIndex = sts.number() + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId, + }), + cancel_request: sts.enumStruct({ + regIndex: RegistrarIndex, + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: LookupSource, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: LookupSource, + judgement: IdentityJudgement, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: sts.bigint(), + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId, Data])), + }), + } +}) + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: H256, + Keccak256: H256, + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: H256, + ShaThree256: H256, + } +}) + +export const H256 = sts.bytes() + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => IdentityInfoAdditional), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => H160), + image: Data, + twitter: Data, + } +}) + +export const H160 = sts.bytes() + +export const IdentityInfoAdditional = sts.tuple(() => [Data, Data]) + +export const IdentityJudgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: Balance, + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export const RegistrarIndex = sts.number() + +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + report_equivocation: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const KeyOwnerProof: sts.Type = sts.struct(() => { + return { + session: SessionIndex, + trieNodes: sts.array(() => sts.bytes()), + validatorCount: ValidatorCount, + } +}) + +export const GrandpaEquivocationProof: sts.Type = sts.struct(() => { + return { + setId: SetId, + equivocation: GrandpaEquivocation, + } +}) + +export const GrandpaEquivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: GrandpaEquivocationValue, + Prevote: GrandpaEquivocationValue, + } +}) + +export const GrandpaEquivocationValue: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: AuthorityId, + first: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + second: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + } +}) + +export const AuthoritySignature = sts.bytes() + +export const GrandpaPrevote: sts.Type = sts.struct(() => { + return { + targetHash: Hash, + targetNumber: BlockNumber, + } +}) + +export const AuthorityId = sts.bytes() + +export const SetId = sts.bigint() + +export const FinalityTrackerCall: sts.Type = sts.closedEnum(() => { + return { + final_hint: sts.enumStruct({ + hint: sts.number(), + }), + } +}) + +export const ElectionsPhragmenCall: sts.Type = sts.closedEnum(() => { + return { + remove_member: sts.enumStruct({ + who: LookupSource, + hasReplacement: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + report_defunct_voter: sts.enumStruct({ + defunct: DefunctVoter, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId), + value: sts.bigint(), + }), + } +}) + +export const DefunctVoter: sts.Type = sts.struct(() => { + return { + who: AccountId, + voteCount: sts.number(), + candidateCount: sts.number(), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + cancel_queued: sts.enumStruct({ + which: ReferendumIndex, + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId, + conviction: Conviction, + balance: BalanceOf, + }), + emergency_cancel: sts.enumStruct({ + refIndex: ReferendumIndex, + }), + enact_proposal: sts.enumStruct({ + proposalHash: Hash, + index: ReferendumIndex, + }), + external_propose: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_default: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: Hash, + }), + fast_track: sts.enumStruct({ + proposalHash: Hash, + votingPeriod: BlockNumber, + delay: BlockNumber, + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: Hash, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: Hash, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId, + index: ReferendumIndex, + }), + remove_vote: sts.enumStruct({ + index: ReferendumIndex, + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId, + }), + veto_external: sts.enumStruct({ + proposalHash: Hash, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: AccountVoteSplit, + Standard: AccountVoteStandard, + } +}) + +export const AccountVoteStandard: sts.Type = sts.struct(() => { + return { + vote: Vote, + balance: Balance, + } +}) + +export const Vote = sts.number() + +export const AccountVoteSplit: sts.Type = sts.struct(() => { + return { + aye: Balance, + nay: Balance, + } +}) + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export const ReferendumIndex = sts.number() + +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: BalanceOf, + vestingSchedule: sts.option(() => sts.tuple(() => [BalanceOf, BalanceOf, BlockNumber])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: LookupSource, + dest: LookupSource, + value: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: LookupSource, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + } +}) + +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: Hash, + number: sts.number(), + stateRoot: Hash, + extrinsicsRoot: Hash, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + AuthoritiesChange: sts.array(() => AuthorityId), + ChangesTrieRoot: Hash, + ChangesTrieSignal: ChangesTrieSignal, + Consensus: Consensus, + Other: sts.bytes(), + PreRuntime: PreRuntime, + RuntimeEnvironmentUpdated: sts.unit(), + Seal: Seal, + SealV0: SealV0, + } +}) + +export const SealV0 = sts.tuple(() => [sts.bigint(), Signature]) + +export const Seal = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const PreRuntime = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const Consensus = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const ConsensusEngineId = sts.bytes() + +export const ChangesTrieSignal: sts.Type = sts.closedEnum(() => { + return { + NewConfiguration: sts.option(() => ChangesTrieConfiguration), + } +}) + +export const AuthorityDiscoveryCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const AttestationsCall: sts.Type = sts.closedEnum(() => { + return { + more_attestations: sts.unit(), + } +}) + +export type Type_189 = Type_189_Attestations | Type_189_AuthorityDiscovery | Type_189_Authorship | Type_189_Babe | Type_189_Balances | Type_189_Claims | Type_189_Council | Type_189_Democracy | Type_189_ElectionsPhragmen | Type_189_FinalityTracker | Type_189_Grandpa | Type_189_Identity | Type_189_ImOnline | Type_189_Indices | Type_189_Multisig | Type_189_Offences | Type_189_Parachains | Type_189_Proxy | Type_189_Recovery | Type_189_Registrar | Type_189_Scheduler | Type_189_Session | Type_189_Slots | Type_189_Society | Type_189_Staking | Type_189_System | Type_189_TechnicalCommittee | Type_189_TechnicalMembership | Type_189_Timestamp | Type_189_Treasury | Type_189_Utility | Type_189_Vesting + +export interface Type_189_Attestations { + __kind: 'Attestations' + value: AttestationsCall +} + +export interface Type_189_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Type_189_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Type_189_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Type_189_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Type_189_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Type_189_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Type_189_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Type_189_ElectionsPhragmen { + __kind: 'ElectionsPhragmen' + value: ElectionsPhragmenCall +} + +export interface Type_189_FinalityTracker { + __kind: 'FinalityTracker' + value: FinalityTrackerCall +} + +export interface Type_189_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Type_189_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Type_189_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Type_189_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Type_189_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Type_189_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Type_189_Parachains { + __kind: 'Parachains' + value: ParachainsCall +} + +export interface Type_189_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Type_189_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Type_189_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Type_189_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Type_189_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Type_189_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Type_189_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Type_189_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Type_189_System { + __kind: 'System' + value: SystemCall +} + +export interface Type_189_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Type_189_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Type_189_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Type_189_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Type_189_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Type_189_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId = sts.bytes() diff --git a/squid/src/types/v2011.ts b/squid/src/types/v2011.ts new file mode 100644 index 00000000..a22e5425 --- /dev/null +++ b/squid/src/types/v2011.ts @@ -0,0 +1,6725 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Weight = sts.bigint() + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: BlockNumber, + index: sts.number(), + } +}) + +export const BlockNumber = sts.number() + +export interface Timepoint { + height: BlockNumber + index: number +} + +export type BlockNumber = number + +export const Type_190: sts.Type = sts.closedEnum(() => { + return { + Attestations: AttestationsCall, + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Democracy: DemocracyCall, + ElectionsPhragmen: ElectionsPhragmenCall, + FinalityTracker: FinalityTrackerCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + Parachains: ParachainsCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + } +}) + +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: LookupSource, + target: LookupSource, + schedule: VestingInfo, + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: LookupSource, + }), + vested_transfer: sts.enumStruct({ + target: LookupSource, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: Balance, + perBlock: Balance, + startingBlock: BlockNumber, + } +}) + +export const Balance = sts.bigint() + +export interface VestingInfo { + locked: Balance + perBlock: Balance + startingBlock: BlockNumber +} + +export type Balance = bigint + +export const LookupSource = sts.bytes() + +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * - Benchmark: 100.3 + .365 * l µs (min square analysis) + * - Using 100 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks. + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: LookupSource + target: LookupSource + schedule: VestingInfo +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this module. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * - Benchmark: + * - Unlocked: 48.76 + .048 * l µs (min square analysis) + * - Locked: 44.43 + .284 * l µs (min square analysis) + * - Using 50 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks. + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this module. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * - Benchmark: + * - Unlocked: 44.3 + .294 * l µs (min square analysis) + * - Locked: 48.16 + .103 * l µs (min square analysis) + * - Using 50 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks. + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: LookupSource +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Benchmark: 100.3 + .365 * l µs (min square analysis) + * - Using 100 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks. + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: LookupSource + schedule: VestingInfo +} + +export type LookupSource = Bytes + +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_limited_sub: sts.enumStruct({ + index: sts.number(), + call: Type_190, + }), + as_sub: sts.enumStruct({ + index: sts.number(), + call: Type_190, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Type_190), + }), + } +}) + +export type UtilityCall = UtilityCall_as_limited_sub | UtilityCall_as_sub | UtilityCall_batch + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_sub` instead. + * + * The dispatch origin for this call must be _Signed_. + * + * # + * - Base weight: 2.861 µs + * - Plus the weight of the `call` + * # + */ +export interface UtilityCall_as_limited_sub { + __kind: 'as_limited_sub' + index: number + call: Type_190 +} + +/** + * Send a call through an indexed pseudonym of the sender. + * + * NOTE: If you need to ensure that any account-based filtering is honored (i.e. because + * you expect `proxy` to have been used prior in the call stack and you want it to apply to + * any sub-accounts), then use `as_limited_sub` instead. + * + * The dispatch origin for this call must be _Signed_. + * + * # + * - Base weight: 2.861 µs + * - Plus the weight of the `call` + * # + */ +export interface UtilityCall_as_sub { + __kind: 'as_sub' + index: number + call: Type_190 +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Trait::BaseCallFilter`). + * + * # + * - Base weight: 14.39 + .987 * c µs + * - Plus the sum of the weights of the `calls`. + * - Plus one additional event. (repeat read/write) + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Type_190[] +} + +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + close_tip: sts.enumStruct({ + hash: Hash, + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: LookupSource, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + }), + retract_tip: sts.enumStruct({ + hash: Hash, + }), + tip: sts.enumStruct({ + hash: Hash, + tipValue: BalanceOf, + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + tipValue: BalanceOf, + }), + } +}) + +export const BalanceOf = sts.bigint() + +export const Hash = sts.bytes() + +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_close_tip | TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_report_awesome | TreasuryCall_retract_tip | TreasuryCall_tip | TreasuryCall_tip_new + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`. + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TreasuryCall_close_tip { + __kind: 'close_tip' + hash: Hash +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: LookupSource +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `TipReportDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips`, `who account data` + * - DbWrites: `Tips`, `who account data` + * # + */ +export interface TreasuryCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TreasuryCall_retract_tip { + __kind: 'retract_tip' + hash: Hash +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`, insert tip and check closing, + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TreasuryCall_tip { + __kind: 'tip' + hash: Hash + tipValue: BalanceOf +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T` + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TreasuryCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId + tipValue: BalanceOf +} + +export type BalanceOf = bigint + +export type AccountId = Bytes + +export type Hash = Bytes + +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(T)` where `T` complexity of `on_timestamp_set` + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in `on_finalize`) + * - 1 event handler `on_timestamp_set` `O(T)`. + * - Benchmark: 7.678 (min squares analysis) + * - NOTE: This benchmark was done for a runtime with insignificant `on_timestamp_set` handlers. + * New benchmarking is needed when adding new handlers. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId, + }), + change_key: sts.enumStruct({ + new: AccountId, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId), + }), + set_prime: sts.enumStruct({ + who: AccountId, + }), + swap_member: sts.enumStruct({ + remove: AccountId, + add: AccountId, + }), + } +}) + +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `AddOrigin` or root. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId +} + +/** + * Remove the prime member if it exists. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `RemoveOrigin` or root. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `ResetOrigin` or root. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId[] +} + +/** + * Set the prime member. Must be a current member. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `SwapOrigin` or root. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId + add: AccountId +} + +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const MemberCount = sts.number() + +export const Proposal: sts.Type = sts.closedEnum(() => { + return { + Attestations: AttestationsCall, + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Democracy: DemocracyCall, + ElectionsPhragmen: ElectionsPhragmenCall, + FinalityTracker: FinalityTrackerCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + Parachains: ParachainsCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + } +}) + +export type Proposal = Proposal_Attestations | Proposal_AuthorityDiscovery | Proposal_Authorship | Proposal_Babe | Proposal_Balances | Proposal_Claims | Proposal_Council | Proposal_Democracy | Proposal_ElectionsPhragmen | Proposal_FinalityTracker | Proposal_Grandpa | Proposal_Identity | Proposal_ImOnline | Proposal_Indices | Proposal_Multisig | Proposal_Offences | Proposal_Parachains | Proposal_Proxy | Proposal_Recovery | Proposal_Registrar | Proposal_Scheduler | Proposal_Session | Proposal_Slots | Proposal_Society | Proposal_Staking | Proposal_System | Proposal_TechnicalCommittee | Proposal_TechnicalMembership | Proposal_Timestamp | Proposal_Treasury | Proposal_Utility | Proposal_Vesting + +export interface Proposal_Attestations { + __kind: 'Attestations' + value: AttestationsCall +} + +export interface Proposal_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Proposal_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Proposal_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Proposal_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Proposal_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Proposal_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Proposal_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Proposal_ElectionsPhragmen { + __kind: 'ElectionsPhragmen' + value: ElectionsPhragmenCall +} + +export interface Proposal_FinalityTracker { + __kind: 'FinalityTracker' + value: FinalityTrackerCall +} + +export interface Proposal_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Proposal_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Proposal_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Proposal_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Proposal_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Proposal_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Proposal_Parachains { + __kind: 'Parachains' + value: ParachainsCall +} + +export interface Proposal_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Proposal_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Proposal_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Proposal_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Proposal_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Proposal_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Proposal_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Proposal_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Proposal_System { + __kind: 'System' + value: SystemCall +} + +export interface Proposal_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Proposal_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Proposal_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Proposal_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Proposal_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Proposal_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_set_changes_trie_config | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage | SystemCall_suicide + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + * + * # + * - `O(P)` where `P` amount of keys with prefix `prefix` + * - `P` storage deletions. + * - Base Weight: 0.834 * P µs + * - Writes: Number of subkeys + 1 + * # + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Key + subkeys: number +} + +/** + * Kill some items from storage. + * + * # + * - `O(IK)` where `I` length of `keys` and `K` length of one key + * - `I` storage deletions. + * - Base Weight: .378 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Key[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * - Base Weight: 0.665 µs, independent of remark length. + * - No DB operations. + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Set the new changes trie configuration. + * + * # + * - `O(1)` + * - 1 storage write or delete (codec `O(1)`). + * - 1 call to `deposit_log`: Uses `append` API, so O(1) + * - Base Weight: 7.218 µs + * - DB Weight: + * - Writes: Changes Trie, System Digest + * # + */ +export interface SystemCall_set_changes_trie_config { + __kind: 'set_changes_trie_config' + changesTrieConfig?: (ChangesTrieConfiguration | undefined) +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 storage write (codec `O(C)`). + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is expensive). + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very expensive. + * We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + * + * # + * - `O(1)` + * - 1 storage write. + * - Base Weight: 1.405 µs + * - 1 write to HEAP_PAGES + * # + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + * + * # + * - `O(I)` where `I` length of `items` + * - `I` storage writes (`O(1)`). + * - Base Weight: 0.568 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: KeyValue[] +} + +/** + * Kill the sending account, assuming there are no references outstanding and the composite + * data is equal to its default value. + * + * # + * - `O(1)` + * - 1 storage read and deletion. + * -------------------- + * Base Weight: 8.626 µs + * No DB Read or Write operations because caller is already in overlay + * # + */ +export interface SystemCall_suicide { + __kind: 'suicide' +} + +export type KeyValue = [StorageKey, StorageData] + +export type StorageData = Bytes + +export type StorageKey = Bytes + +export interface ChangesTrieConfiguration { + digestInterval: number + digestLevels: number +} + +export type Key = Bytes + +export type Perbill = number + +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_validator_count | StakingCall_submit_election_solution | StakingCall_submit_election_solution_unsigned | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * Base Weight: 67.87 µs + * DB Weight: + * - Read: Bonded, Ledger, [Origin Account], Current Era, History Depth, Locks + * - Write: Bonded, Payee, [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: LookupSource + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount + * that can be added. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller and + * it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * - One DB entry. + * ------------ + * Base Weight: 54.88 µs + * DB Weight: + * - Read: Era Election Status, Bonded, Ledger, [Origin Account], Locks + * - Write: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by either the root origin or the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + * + * # + * Complexity: O(U + S) + * with U unapplied slashes weighted with U=1000 + * and S is the number of slash indices to be canceled. + * - Base: 5870 + 34.61 * S µs + * - Read: Unapplied Slashes + * - Write: Unapplied Slashes + * # + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: EraIndex + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * -------- + * Base Weight: 16.53 µs + * DB Weight: + * - Read: EraElectionStatus, Ledger + * - Write: Validators, Nominators + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Base Weight: 1.959 µs + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - Base Weight: 2.05 µs + * - Write: ForceEra + * # + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Base Weight: 1.857 µs + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + * + * # + * O(S) where S is the number of slashing spans to be removed + * Base Weight: 53.07 + 2.365 * S µs + * Reads: Bonded, Slashing Spans, Account, Locks + * Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Account, Locks + * Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Base Weight: 1.717 µs + * Read/Write: Validator Count + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. This can only be called when + * [`EraElectionStatus`] is `Closed`. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS). + * - Both the reads and writes follow a similar pattern. + * --------- + * Base Weight: 22.34 + .36 * N µs + * where N is the number of targets + * DB Weight: + * - Reads: Era Election Status, Ledger, Current Era + * - Writes: Validators, Nominators + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: LookupSource[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * This can only be called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Base Weight: 110 + 54.2 * N µs (Median Slopes) + * DB Weight: + * - Read: EraElectionStatus, CurrentEra, HistoryDepth, ErasValidatorReward, + * ErasStakersClipped, ErasRewardPoints, ErasValidatorPrefs (8 items) + * - Read Each: Bonded, Ledger, Payee, Locks, System Account (5 items) + * - Write Each: System Account, Locks, Ledger (3 items) + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId + era: EraIndex +} + +/** + * Remove all data structure concerning a staker/stash once its balance is zero. + * This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone + * and the target `stash` must have no funds left. + * + * This can be called from any origin. + * + * - `stash`: The stash account to reap. Its balance must be zero. + * + * # + * Complexity: O(S) where S is the number of slashing spans on the account. + * Base Weight: 75.94 + 2.396 * S µs + * DB Weight: + * - Reads: Stash Account, Bonded, Slashing Spans, Locks + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Stash Account, Locks + * - Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller, and it can be only called when + * [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MAX_UNLOCKING_CHUNKS`. + * - Storage changes: Can't increase storage, only decrease it. + * --------------- + * - Base Weight: 34.51 µs * .048 L µs + * - DB Weight: + * - Reads: EraElectionStatus, Ledger, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Base Weight: 1.717 µs + * Read/Write: Validator Count + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Base Weight: 25.22 µs + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: LookupSource +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. + * This should report all the storage items that will be deleted by clearing old + * era history. Needed to report an accurate weight for the dispatch. Trusted by + * `Root` to report an accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Base Weight: 29.13 * E µs + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + * + * # + * - O(V) + * - Base Weight: 2.208 + .006 * V µs + * - Write: Invulnerables + * # + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + validators: AccountId[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Base Weight: 11.33 µs + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Base Weight: 1.717 µs + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Submit an election result to the chain. If the solution: + * + * 1. is valid. + * 2. has a better score than a potentially existing solution on chain. + * + * then, it will be _put_ on chain. + * + * A solution consists of two pieces of data: + * + * 1. `winners`: a flat vector of all the winners of the round. + * 2. `assignments`: the compact version of an assignment vector that encodes the edge + * weights. + * + * Both of which may be computed using _phragmen_, or any other algorithm. + * + * Additionally, the submitter must provide: + * + * - The `score` that they claim their solution has. + * + * Both validators and nominators will be represented by indices in the solution. The + * indices should respect the corresponding types ([`ValidatorIndex`] and + * [`NominatorIndex`]). Moreover, they should be valid when used to index into + * [`SnapshotValidators`] and [`SnapshotNominators`]. Any invalid index will cause the + * solution to be rejected. These two storage items are set during the election window and + * may be used to determine the indices. + * + * A solution is valid if: + * + * 0. It is submitted when [`EraElectionStatus`] is `Open`. + * 1. Its claimed score is equal to the score computed on-chain. + * 2. Presents the correct number of winners. + * 3. All indexes must be value according to the snapshot vectors. All edge values must + * also be correct and should not overflow the granularity of the ratio type (i.e. 256 + * or billion). + * 4. For each edge, all targets are actually nominated by the voter. + * 5. Has correct self-votes. + * + * A solutions score is consisted of 3 parameters: + * + * 1. `min { support.total }` for each support of a winner. This value should be maximized. + * 2. `sum { support.total }` for each support of a winner. This value should be minimized. + * 3. `sum { support.total^2 }` for each support of a winner. This value should be + * minimized (to ensure less variance) + * + * # + * See `crate::weight` module. + * # + */ +export interface StakingCall_submit_election_solution { + __kind: 'submit_election_solution' + winners: ValidatorIndex[] + compact: CompactAssignments + score: ElectionScore + era: EraIndex + size: ElectionSize +} + +/** + * Unsigned version of `submit_election_solution`. + * + * Note that this must pass the [`ValidateUnsigned`] check which only allows transactions + * from the local node to be included. In other words, only the block author can include a + * transaction in the block. + * + * # + * See `crate::weight` module. + * # + */ +export interface StakingCall_submit_election_solution_unsigned { + __kind: 'submit_election_solution_unsigned' + winners: ValidatorIndex[] + compact: CompactAssignments + score: ElectionScore + era: EraIndex + size: ElectionSize +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + * + * # + * - Independent of the arguments. Limited but potentially exploitable complexity. + * - Contains a limited number of reads. + * - Each call (requires the remainder of the bonded balance to be above `minimum_balance`) + * will cause a new entry to be inserted into a vector (`Ledger.unlocking`) kept in storage. + * The only way to clean the aforementioned storage item is also user-controlled via + * `withdraw_unbonded`. + * - One DB entry. + * ---------- + * Base Weight: 50.34 µs + * DB Weight: + * - Read: Era Election Status, Ledger, Current Era, Locks, [Origin Account] + * - Write: [Origin Account], Locks, Ledger + * + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ----------- + * Base Weight: 17.13 µs + * DB Weight: + * - Read: Era Election Status, Ledger + * - Write: Nominators, Validators + * # + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * - Could be dependent on the `origin` argument and how much `unlocking` chunks exist. + * It implies `consolidate_unlocked` which loops over `Ledger.unlocking`, which is + * indirectly user-controlled. See [`unbond`] for more detail. + * - Contains a limited number of reads, yet the size of which could be large based on `ledger`. + * - Writes are limited to the `origin` account key. + * --------------- + * Complexity O(S) where S is the number of slashing spans to remove + * Base Weight: + * Update: 50.52 + .028 * S µs + * - Reads: EraElectionStatus, Ledger, Current Era, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * Kill: 79.41 + 2.366 * S µs + * - Reads: EraElectionStatus, Ledger, Current Era, Bonded, Slashing Spans, [Origin Account], Locks + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, [Origin Account], Locks + * - Writes Each: SpanSlash * S + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +export interface ValidatorPrefs { + commission: number +} + +export interface ElectionSize { + validators: number + nominators: number +} + +export type ElectionScore = bigint[] + +export interface CompactAssignments { + votes1: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes2: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes3: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes4: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes5: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes6: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes7: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes8: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes9: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes10: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes11: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes12: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes13: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes14: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes15: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes16: [NominatorIndex, CompactScore[], ValidatorIndex][] +} + +export type CompactScore = [ValidatorIndex, OffchainAccuracy] + +export type OffchainAccuracy = number + +export type NominatorIndex = number + +export type ValidatorIndex = number + +export type Percent = number + +export type EraIndex = number + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: BalanceOf +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * module to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId + judgement: SocietyJudgement +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin + * forgives (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: LookupSource + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId + value: BalanceOf + tip: BalanceOf +} + +export type SocietyJudgement = SocietyJudgement_Approve | SocietyJudgement_Rebid | SocietyJudgement_Reject + +export interface SocietyJudgement_Approve { + __kind: 'Approve' +} + +export interface SocietyJudgement_Rebid { + __kind: 'Rebid' +} + +export interface SocietyJudgement_Reject { + __kind: 'Reject' +} + +export type SlotsCall = SlotsCall_bid | SlotsCall_bid_renew | SlotsCall_elaborate_deploy_data | SlotsCall_fix_deploy_data | SlotsCall_new_auction | SlotsCall_set_offboarding + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface SlotsCall_bid { + __kind: 'bid' + sub: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Make a new bid from a parachain account for renewing that (pre-existing) parachain. + * + * The origin *must* be a parachain account. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface SlotsCall_bid_renew { + __kind: 'bid_renew' + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Note a new parachain's code. + * + * This must be called after `fix_deploy_data` and `code` must be the preimage of the + * `code_hash` passed there for the same `para_id`. + * + * This may be called before or after the beginning of the parachain's first lease period. + * If called before then the parachain will become active at the first block of its + * starting lease period. If after, then it will become active immediately after this call. + * + * - `_origin` is irrelevant. + * - `para_id` is the parachain ID whose code will be elaborated. + * - `code` is the preimage of the registered `code_hash` of `para_id`. + */ +export interface SlotsCall_elaborate_deploy_data { + __kind: 'elaborate_deploy_data' + paraId: number + code: ValidationCode +} + +/** + * Set the deploy information for a successful bid to deploy a new parachain. + * + * - `origin` must be the successful bidder account. + * - `sub` is the sub-bidder ID of the bidder. + * - `para_id` is the parachain ID allotted to the winning bidder. + * - `code_hash` is the hash of the parachain's Wasm validation function. + * - `initial_head_data` is the parachain's initial head data. + */ +export interface SlotsCall_fix_deploy_data { + __kind: 'fix_deploy_data' + sub: number + paraId: number + codeHash: Hash + codeSize: number + initialHeadData: HeadData +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface SlotsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +/** + * Set the off-boarding information for a parachain. + * + * The origin *must* be a parachain account. + * + * - `dest` is the destination account to receive the parachain's deposit. + */ +export interface SlotsCall_set_offboarding { + __kind: 'set_offboarding' + dest: LookupSource +} + +export type HeadData = Bytes + +export type ValidationCode = Bytes + +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` in number of key types. + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwnder` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: Keys + proof: Bytes +} + +export type Keys = [AccountId, AccountId, AccountId, AccountId, AccountId] + +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_named + +/** + * Cancel an anonymously scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.15 + 2.869 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: BlockNumber + index: number +} + +/** + * Cancel a named scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 24.91 + 2.907 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.29 + .126 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda + * - Will use base weight of 25 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_190 +} + +/** + * Schedule a named task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 29.6 + .159 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 35 which should be good for more than 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_190 +} + +export type Priority = number + +export type Period = [BlockNumber, number] + +export type RegistrarCall = RegistrarCall_deregister_para | RegistrarCall_deregister_parathread | RegistrarCall_register_para | RegistrarCall_register_parathread | RegistrarCall_select_parathread | RegistrarCall_set_thread_count | RegistrarCall_swap + +/** + * Deregister a parachain with given id + */ +export interface RegistrarCall_deregister_para { + __kind: 'deregister_para' + id: number +} + +/** + * Deregister a parathread and retrieve the deposit. + * + * Must be sent from a `Parachain` origin which is currently a parathread. + * + * Ensure that before calling this that any funds you want emptied from the parathread's + * account is moved out; after this it will be impossible to retrieve them (without + * governance intervention). + */ +export interface RegistrarCall_deregister_parathread { + __kind: 'deregister_parathread' +} + +/** + * Register a parachain with given code. Must be called by root. + * Fails if given ID is already used. + * + * Unlike the `Registrar` trait function of the same name, this + * checks the code and head data against size limits. + */ +export interface RegistrarCall_register_para { + __kind: 'register_para' + id: number + info: ParaInfo + code: ValidationCode + initialHeadData: HeadData +} + +/** + * Register a parathread for immediate use. + * + * Must be sent from a Signed origin that is able to have ParathreadDeposit reserved. + * `code` and `initial_head_data` are used to initialize the parathread's state. + * + * Unlike `register_para`, this function does check that the maximum code size + * and head data size are respected, as parathread registration is an atomic + * action. + */ +export interface RegistrarCall_register_parathread { + __kind: 'register_parathread' + code: ValidationCode + initialHeadData: HeadData +} + +/** + * Place a bid for a parathread to be progressed in the next block. + * + * This is a kind of special transaction that should be heavily prioritized in the + * transaction pool according to the `value`; only `ThreadCount` of them may be presented + * in any single block. + */ +export interface RegistrarCall_select_parathread { + __kind: 'select_parathread' + id: number + collator: CollatorId + headHash: Hash +} + +/** + * Reset the number of parathreads that can pay to be scheduled in a single block. + * + * - `count`: The number of parathreads. + * + * Must be called from Root origin. + */ +export interface RegistrarCall_set_thread_count { + __kind: 'set_thread_count' + count: number +} + +/** + * Swap a parachain with another parachain or parathread. The origin must be a `Parachain`. + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + other: number +} + +export type CollatorId = Bytes + +export interface ParaInfo { + manager: AccountId + deposit: Balance + locked: boolean +} + +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + * + * # + * - The weight of the `call` + 10,000. + * - One storage lookup to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId + call: Type_190 +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + * + * # + * - One storage mutation to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully + * recovered by you. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + V) + * # + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + * + * # + * Key: V (len of vouching friends) + * - One storage read/remove to get the active recovery process. O(1), Codec O(V) + * - One balance call to repatriate reserved. O(X) + * - One event. + * + * Total Complexity: O(V + X) + * # + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. + * Should be ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt + * before the account can be recovered. Should be less than or equal to + * the length of the list of friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized + * that needs to pass before the account can be recovered. + * + * # + * - Key: F (len of friends) + * - One storage read to check that account is not already recoverable. O(1). + * - A check that the friends list is sorted and unique. O(F) + * - One currency reserve operation. O(X) + * - One storage write. O(1). Codec O(F). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId[] + threshold: number + delayPeriod: BlockNumber +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account + * needs to be recoverable (i.e. have a recovery configuration). + * + * # + * - One storage read to check that account is recoverable. O(F) + * - One storage read to check that this recovery process hasn't already started. O(1) + * - One currency reserve operation. O(X) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + * + * # + * Key: F (len of friends) + * - One storage read to get the prefix iterator for active recoveries. O(1) + * - One storage read/remove to get the recovery configuration. O(1), Codec O(F) + * - One balance call to unreserved. O(X) + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + * + * # + * - One storage write O(1) + * - One event + * # + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId + rescuer: AccountId +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you + * want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One binary search to confirm caller is a friend. O(logF) + * - One binary search to confirm caller has not already vouched. O(logV) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + logF + V + logV) + * # + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId + rescuer: AccountId +} + +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * + * # + * P is the number of proxies the user has + * - Base weight: 17.48 + .176 * P µs + * - DB weight: 1 storage read and write. + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + proxy: AccountId + proxyType: ProxyType +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * P is the number of proxies the user has + * - Base weight: 36.48 + .039 * P µs + * - DB weight: 1 storage read and write. + * # + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * P is the number of proxies the user has + * - Base weight: 15.65 + .137 * P µs + * - DB weight: 1 storage read and write. + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * P is the number of proxies the user has + * - Base weight: 19.87 + .141 * P µs + * - DB weight: 1 storage read. + * - Plus the weight of the `call` + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_190 +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * P is the number of proxies the user has + * - Base weight: 13.73 + .129 * P µs + * - DB weight: 1 storage read and write. + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * P is the number of proxies the user has + * - Base weight: 14.37 + .164 * P µs + * - DB weight: 1 storage read and write. + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + proxy: AccountId + proxyType: ProxyType +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +export type ParachainsCall = ParachainsCall_report_double_vote | ParachainsCall_set_heads + +/** + * Provide a proof that some validator has commited a double-vote. + * + * The weight is 0; in order to avoid DoS a `SignedExtension` validation + * is implemented. + */ +export interface ParachainsCall_report_double_vote { + __kind: 'report_double_vote' + report: DoubleVoteReport +} + +/** + * Provide candidate receipts for parachains, in ascending order by id. + */ +export interface ParachainsCall_set_heads { + __kind: 'set_heads' + heads: AttestedCandidate[] +} + +export interface AttestedCandidate { + candidate: AbridgedCandidateReceipt + validityVotes: ValidityAttestation[] + validatorIndices: BitSequence +} + +export type ValidityAttestation = ValidityAttestation_Explicit | ValidityAttestation_Implicit | ValidityAttestation_Never + +export interface ValidityAttestation_Explicit { + __kind: 'Explicit' + value: ValidatorSignature +} + +export interface ValidityAttestation_Implicit { + __kind: 'Implicit' + value: ValidatorSignature +} + +export interface ValidityAttestation_Never { + __kind: 'Never' +} + +export type ValidatorSignature = Bytes + +export interface AbridgedCandidateReceipt { + parachainIndex: ParaId + relayParent: Hash + headData: HeadData + collator: CollatorId + signature: CollatorSignature + povBlockHash: Hash + commitments: CandidateCommitments +} + +export interface CandidateCommitments { + upwardMessages: UpwardMessage[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: BlockNumber +} + +export interface OutboundHrmpMessage { + recipient: number + data: Bytes +} + +export type UpwardMessage = Bytes + +export type CollatorSignature = Bytes + +export type ParaId = number + +export interface DoubleVoteReport { + identity: ValidatorId + first: [Statement, ValidatorSignature] + second: [Statement, ValidatorSignature] + proof: MembershipProof + signingContext: SigningContext +} + +export interface SigningContext { + sessionIndex: SessionIndex + parentHash: Hash +} + +export type SessionIndex = number + +export interface MembershipProof { + session: SessionIndex + trieNodes: Bytes[] + validatorCount: ValidatorCount +} + +export type ValidatorCount = number + +export type Statement = Statement_Candidate | Statement_Invalid | Statement_Never | Statement_Valid + +export interface Statement_Candidate { + __kind: 'Candidate' + value: Hash +} + +export interface Statement_Invalid { + __kind: 'Invalid' + value: Hash +} + +export interface Statement_Never { + __kind: 'Never' +} + +export interface Statement_Valid { + __kind: 'Valid' + value: Hash +} + +export type ValidatorId = Bytes + +export type OffencesCall = never + +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - Base Weight: + * - Create: 44.71 + 0.088 * S + * - Approve: 31.48 + 0.116 * S + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - Base Weight: + * - Create: 41.89 + 0.118 * S + .002 * Z µs + * - Create w/ Store: 53.57 + 0.119 * S + .003 * Z µs + * - Approve: 31.39 + 0.136 * S + .002 * Z µs + * - Complete: 39.94 + 0.26 * S + .002 * Z µs + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + call: Bytes + storeCall: boolean + maxWeight: Weight +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - Base Weight: 33.72 + 0.002 * Z µs + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId[] + call: Type_190 +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - Base Weight: 36.07 + 0.124 * S + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId[] + timepoint: Timepoint + callHash: Bytes +} + +export type Weight = bigint + +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - Base Weight: 28.69 µs + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: AccountIndex +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - Base Weight: 26.83 µs + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId + index: AccountIndex + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - Base Weight: 25.53 µs + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: AccountIndex +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - Base Weight: 30.86 µs + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: AccountIndex +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - Base Weight: 33.74 µs + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId + index: AccountIndex +} + +export type AccountIndex = number + +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` and E is length of + * `Heartbeat.network_state.external_address` + * + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Signature +} + +export type Signature = Bytes + +export interface Heartbeat { + blockNumber: BlockNumber + networkState: OpaqueNetworkState + sessionIndex: SessionIndex + authorityIndex: AuthIndex + validatorsLen: number +} + +export type AuthIndex = number + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `RegistrarOrigin` or `Root`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: RegistrarIndex +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must be _Root_ or match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: LookupSource +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: LookupSource + judgement: IdentityJudgement +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: bigint +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId, Data][] +} + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: H256 +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: H256 +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: H256 +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: H256 +} + +export type H256 = Bytes + +export interface IdentityInfo { + additional: IdentityInfoAdditional[] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (H160 | undefined) + image: Data + twitter: Data +} + +export type H160 = Bytes + +export type IdentityInfoAdditional = [Data, Data] + +export type IdentityJudgement = IdentityJudgement_Erroneous | IdentityJudgement_FeePaid | IdentityJudgement_KnownGood | IdentityJudgement_LowQuality | IdentityJudgement_OutOfDate | IdentityJudgement_Reasonable | IdentityJudgement_Unknown + +export interface IdentityJudgement_Erroneous { + __kind: 'Erroneous' +} + +export interface IdentityJudgement_FeePaid { + __kind: 'FeePaid' + value: Balance +} + +export interface IdentityJudgement_KnownGood { + __kind: 'KnownGood' +} + +export interface IdentityJudgement_LowQuality { + __kind: 'LowQuality' +} + +export interface IdentityJudgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface IdentityJudgement_Reasonable { + __kind: 'Reasonable' +} + +export interface IdentityJudgement_Unknown { + __kind: 'Unknown' +} + +export type RegistrarIndex = number + +export type GrandpaCall = GrandpaCall_report_equivocation + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * Since the weight of the extrinsic is 0, in order to avoid DoS by + * submission of invalid equivocation reports, a mandatory pre-validation of + * the extrinsic is implemented in a `SignedExtension`. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface KeyOwnerProof { + session: SessionIndex + trieNodes: Bytes[] + validatorCount: ValidatorCount +} + +export interface GrandpaEquivocationProof { + setId: SetId + equivocation: GrandpaEquivocation +} + +export type GrandpaEquivocation = GrandpaEquivocation_Precommit | GrandpaEquivocation_Prevote + +export interface GrandpaEquivocation_Precommit { + __kind: 'Precommit' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocation_Prevote { + __kind: 'Prevote' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocationValue { + roundNumber: bigint + identity: AuthorityId + first: [GrandpaPrevote, AuthoritySignature] + second: [GrandpaPrevote, AuthoritySignature] +} + +export type AuthoritySignature = Bytes + +export interface GrandpaPrevote { + targetHash: Hash + targetNumber: BlockNumber +} + +export type AuthorityId = Bytes + +export type SetId = bigint + +export type FinalityTrackerCall = FinalityTrackerCall_final_hint + +/** + * Hint that the author of this block thinks the best finalized + * block is the given number. + */ +export interface FinalityTrackerCall_final_hint { + __kind: 'final_hint' + hint: number +} + +export type ElectionsPhragmenCall = ElectionsPhragmenCall_remove_member | ElectionsPhragmenCall_remove_voter | ElectionsPhragmenCall_renounce_candidacy | ElectionsPhragmenCall_report_defunct_voter | ElectionsPhragmenCall_submit_candidacy | ElectionsPhragmenCall_vote + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, a new phragmen election is started. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement: + * - Base weight: 50.93 µs + * - State reads: + * - RunnersUp.len() + * - Members, RunnersUp (remove_and_replace_member) + * - State writes: + * - Members, RunnersUp (remove_and_replace_member) + * Else, since this is a root call and will go into phragmen, we assume full block for now. + * # + */ +export interface ElectionsPhragmenCall_remove_member { + __kind: 'remove_member' + who: LookupSource + hasReplacement: boolean +} + +/** + * Remove `origin` as a voter. This removes the lock and returns the bond. + * + * # + * Base weight: 36.8 µs + * All state access is from do_remove_voter. + * State reads: + * - Voting + * - [AccountData(who)] + * State writes: + * - Voting + * - Locks + * - [AccountData(who)] + * # + */ +export interface ElectionsPhragmenCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * - `origin` is a candidate and not elected in any set. In this case, the bond is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the bond is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the bond is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_voter`], if replacement runners exists, they are immediately used. + * + * If a candidate is renouncing: + * Base weight: 17.28 µs + * Complexity of candidate_count: 0.235 µs + * State reads: + * - Candidates + * - [AccountBalance(who) (unreserve)] + * State writes: + * - Candidates + * - [AccountBalance(who) (unreserve)] + * If member is renouncing: + * Base weight: 46.25 µs + * State reads: + * - Members, RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * State writes: + * - Members, RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * If runner is renouncing: + * Base weight: 46.25 µs + * State reads: + * - RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * State writes: + * - RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * + * Weight note: The call into changeMembers need to be accounted for. + * + */ +export interface ElectionsPhragmenCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Report `target` for being an defunct voter. In case of a valid report, the reporter is + * rewarded by the bond amount of `target`. Otherwise, the reporter itself is removed and + * their bond is slashed. + * + * A defunct voter is defined to be: + * - a voter whose current submitted votes are all invalid. i.e. all of them are no + * longer a candidate nor an active member or a runner-up. + * + * + * The origin must provide the number of current candidates and votes of the reported target + * for the purpose of accurate weight calculation. + * + * # + * No Base weight based on min square analysis. + * Complexity of candidate_count: 1.755 µs + * Complexity of vote_count: 18.51 µs + * State reads: + * - Voting(reporter) + * - Candidate.len() + * - Voting(Target) + * - Candidates, Members, RunnersUp (is_defunct_voter) + * State writes: + * - Lock(reporter || target) + * - [AccountBalance(reporter)] + AccountBalance(target) + * - Voting(reporter || target) + * Note: the db access is worse with respect to db, which is when the report is correct. + * # + */ +export interface ElectionsPhragmenCall_report_defunct_voter { + __kind: 'report_defunct_voter' + defunct: DefunctVoter +} + +/** + * Submit oneself for candidacy. + * + * A candidate will either: + * - Lose at the end of the term and forfeit their deposit. + * - Win and become a member. Members will eventually get their stash back. + * - Become a runner-up. Runners-ups are reserved members in case one gets forcefully + * removed. + * + * # + * Base weight = 33.33 µs + * Complexity of candidate_count: 0.375 µs + * State reads: + * - Candidates.len() + * - Candidates + * - Members + * - RunnersUp + * - [AccountBalance(who)] + * State writes: + * - [AccountBalance(who)] + * - Candidates + * # + */ +export interface ElectionsPhragmenCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a bond amount is + * reserved. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * It is the responsibility of the caller to not place all of their balance into the lock + * and keep some for further transactions. + * + * # + * Base weight: 47.93 µs + * State reads: + * - Candidates.len() + Members.len() + RunnersUp.len() + * - Voting (is_voter) + * - [AccountBalance(who) (unreserve + total_balance)] + * State writes: + * - Voting + * - Lock + * - [AccountBalance(who) (unreserve -- only when creating a new voter)] + * # + */ +export interface ElectionsPhragmenCall_vote { + __kind: 'vote' + votes: AccountId[] + value: bigint +} + +export interface DefunctVoter { + who: AccountId + voteCount: number + candidateCount: number +} + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +export type DemocracyCall = DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * # + * - `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + * - Db reads: `scheduler lookup`, scheduler agenda` + * - Db writes: `scheduler lookup`, scheduler agenda` + * - Base Weight: 36.78 + 3.277 * D µs + * # + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: ReferendumIndex +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # + * - Complexity: `O(1)`. + * - Db writes: `ReferendumInfoOf` + * - Base Weight: 21.57 µs + * # + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * # + * - `O(1)`. + * - Db writes: `PublicProps` + * - Base Weight: 2.505 µs + * # + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must + * not be more than the account's current balance. + * + * Emits `Delegated`. + * + * # + * - Complexity: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + * - Db reads: 2*`VotingOf`, `balances locks` + * - Db writes: 2*`VotingOf`, `balances locks` + * - Db reads per votes: `ReferendumInfoOf` + * - Db writes per votes: `ReferendumInfoOf` + * - Base Weight: 65.78 + 8.229 * R µs + * # + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId + conviction: Conviction + balance: BalanceOf +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * # + * - Complexity: `O(1)`. + * - Db reads: `ReferendumInfoOf`, `Cancellations` + * - Db writes: `ReferendumInfoOf`, `Cancellations` + * ------------- + * - Base Weight: 34.25 µs + * # + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: ReferendumIndex +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: Hash + index: ReferendumIndex +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * # + * - Complexity `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + * - Db reads: `NextExternal`, `Blacklist` + * - Db writes: `NextExternal` + * - Base Weight: 13.8 + .106 * V µs + * # + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: Hash +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * # + * - Complexity: `O(1)` + * - Db write: `NextExternal` + * - Base Weight: 3.087 µs + * # + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: Hash +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * # + * - Complexity: `O(1)` + * - Db write: `NextExternal` + * - Base Weight: 3.065 µs + * # + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: Hash +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * `FastTrackVotingPeriod` if too low. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * # + * - Complexity: `O(1)` + * - Db reads: `NextExternal`, `ReferendumCount` + * - Db writes: `NextExternal`, `ReferendumCount`, `ReferendumInfoOf` + * - Base Weight: 30.1 µs + * # + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: Hash + votingPeriod: BlockNumber + delay: BlockNumber +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * # + * see `weight_for::note_preimage` + * # + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * # + * see `weight_for::note_preimage` + * # + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * # + * - Complexity: `O(1)` + * - Db reads: `PublicPropCount`, `PublicProps` + * - Db writes: `PublicPropCount`, `PublicProps`, `DepositOf` + * ------------------- + * Base Weight: 42.58 + .127 * P µs with `P` the number of proposals `PublicProps` + * # + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: Hash + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. + * Extrinsic is weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * # + * - Complexity: `O(D)` where D is length of proposal. + * - Db reads: `Preimages` + * - Db writes: `Preimages` + * - Base Weight: 39.31 + .003 * b µs + * # + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: Hash + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * # + * - `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + * - Db reads: `ReferendumInfoOf`, `VotingOf` + * - Db writes: `ReferendumInfoOf`, `VotingOf` + * - Base Weight: 19.15 + .372 * R + * # + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId + index: ReferendumIndex +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * # + * - `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + * - Db reads: `ReferendumInfoOf`, `VotingOf` + * - Db writes: `ReferendumInfoOf`, `VotingOf` + * - Base Weight: 21.03 + .359 * R + * # + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: ReferendumIndex +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * # + * - Complexity: `O(S)` where S is the number of seconds a proposal already has. + * - Db reads: `DepositOf` + * - Db writes: `DepositOf` + * --------- + * - Base Weight: 22.28 + .229 * S µs + * # + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * # + * - Complexity: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + * - Db reads: 2*`VotingOf` + * - Db writes: 2*`VotingOf` + * - Db reads per votes: `ReferendumInfoOf` + * - Db writes per votes: `ReferendumInfoOf` + * - Base Weight: 33.29 + 8.104 * R µs + * # + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * # + * - Complexity `O(R)` with R number of vote of target. + * - Db reads: `VotingOf`, `balances locks`, `target account` + * - Db writes: `VotingOf`, `balances locks`, `target account` + * - Base Weight: + * - Unlock Remove: 42.96 + .048 * R + * - Unlock Set: 37.63 + .327 * R + * # + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * # + * - Complexity: `O(V + log(V))` where V is number of `existing vetoers` + * Performs a binary search on `existing_vetoers` which should not be very large. + * - Db reads: `NextExternal`, `Blacklist` + * - Db writes: `NextExternal`, `Blacklist` + * - Base Weight: 29.87 + .188 * V µs + * # + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: Hash +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * # + * - Complexity: `O(R)` where R is the number of referendums the voter has voted on. + * weight is charged as if maximum votes. + * - Db reads: `ReferendumInfoOf`, `VotingOf`, `balances locks` + * - Db writes: `ReferendumInfoOf`, `VotingOf`, `balances locks` + * -------------------- + * - Base Weight: + * - Vote New: 49.24 + .333 * R µs + * - Vote Existing: 49.94 + .343 * R µs + * # + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + value: AccountVoteSplit +} + +export interface AccountVote_Standard { + __kind: 'Standard' + value: AccountVoteStandard +} + +export interface AccountVoteStandard { + vote: Vote + balance: Balance +} + +export type Vote = number + +export interface AccountVoteSplit { + aye: Balance + nay: Balance +} + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +export type ReferendumIndex = number + +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * Base Weight: .49 * P + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MAX_MEMBERS` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export type MemberCount = number + +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * Total Complexity: O(1) + * ---------------------------- + * Base Weight: 93.3 µs + * DB Weight: + * - Read: Preclaims, Signing, Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + * - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting, Signing, Preclaims + * Validate PreValidateAttests: +8.631 µs + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * - One `eth_recover` operation which involves a keccak hash and a + * ecdsa recover. + * - Three storage reads to check if a claim exists for the user, to + * get the current pot size, to see if there exists a vesting schedule. + * - Up to one storage write for adding a new vesting schedule. + * - One `deposit_creating` Currency call. + * - One storage write to update the total. + * - Two storage removals for vesting and claims information. + * - One deposit event. + * + * Total Complexity: O(1) + * ---------------------------- + * Base Weight: 269.7 µs + * DB Weight: + * - Read: Signing, Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + * - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting, Signing + * Validate Unsigned: +188.7 µs + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * - One `eth_recover` operation which involves a keccak hash and a + * ecdsa recover. + * - Four storage reads to check if a claim exists for the user, to + * get the current pot size, to see if there exists a vesting schedule, to get the + * required statement. + * - Up to one storage write for adding a new vesting schedule. + * - One `deposit_creating` Currency call. + * - One storage write to update the total. + * - Two storage removals for vesting and claims information. + * - One deposit event. + * + * Total Complexity: O(1) + * ---------------------------- + * Base Weight: 270.2 µs + * DB Weight: + * - Read: Signing, Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + * - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting, Signing + * Validate Unsigned: +190.1 µs + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * - One storage mutate to increase the total claims available. + * - One storage write to add a new claim. + * - Up to one storage write to add a new vesting schedule. + * + * Total Complexity: O(1) + * --------------------- + * Base Weight: 10.46 µs + * DB Weight: + * - Reads: Total + * - Writes: Total, Claims + * - Maybe Write: Vesting, Statement + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: BalanceOf + vestingSchedule?: ([BalanceOf, BalanceOf, BlockNumber] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId | undefined) +} + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is + * not assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: LookupSource + dest: LookupSource + value: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also decrease the total issuance of the system (`TotalIssuance`). + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + * + * # + * - Independent of the arguments. + * - Contains a limited number of reads and writes. + * --------------------- + * - Base Weight: + * - Creating: 27.56 µs + * - Killing: 35.11 µs + * - DB Weight: 1 Read, 1 Write to `who` + * # + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: LookupSource + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * It will decrease the total issuance of the system by the `TransferFee`. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for + * input config types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional + * check that the transfer will not kill the origin account. + * --------------------------------- + * - Base Weight: 73.64 µs, worst case scenario (account created, account removed) + * - DB Weight: 1 Read and 1 Write to destination account + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: LookupSource + value: bigint +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Module.html#method.transfer + * # + * - Cheaper than transfer because account cannot be killed. + * - Base Weight: 51.4 µs + * - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already) + * # + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: LookupSource + value: bigint +} + +export type BabeCall = never + +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +export interface Header { + parentHash: Hash + number: number + stateRoot: Hash + extrinsicsRoot: Hash + digest: Digest +} + +export interface Digest { + logs: DigestItem[] +} + +export type DigestItem = DigestItem_AuthoritiesChange | DigestItem_ChangesTrieRoot | DigestItem_ChangesTrieSignal | DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal | DigestItem_SealV0 + +export interface DigestItem_AuthoritiesChange { + __kind: 'AuthoritiesChange' + value: AuthorityId[] +} + +export interface DigestItem_ChangesTrieRoot { + __kind: 'ChangesTrieRoot' + value: Hash +} + +export interface DigestItem_ChangesTrieSignal { + __kind: 'ChangesTrieSignal' + value: ChangesTrieSignal +} + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: Consensus +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: PreRuntime +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: Seal +} + +export interface DigestItem_SealV0 { + __kind: 'SealV0' + value: SealV0 +} + +export type SealV0 = [bigint, Signature] + +export type Seal = [ConsensusEngineId, Bytes] + +export type PreRuntime = [ConsensusEngineId, Bytes] + +export type Consensus = [ConsensusEngineId, Bytes] + +export type ConsensusEngineId = Bytes + +export type ChangesTrieSignal = ChangesTrieSignal_NewConfiguration + +export interface ChangesTrieSignal_NewConfiguration { + __kind: 'NewConfiguration' + value?: (ChangesTrieConfiguration | undefined) +} + +export type AuthorityDiscoveryCall = never + +export type AttestationsCall = AttestationsCall_more_attestations + +/** + * Provide candidate receipts for parachains, in ascending order by id. + */ +export interface AttestationsCall_more_attestations { + __kind: 'more_attestations' +} + +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * Base Weight: .49 * P + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MAX_MEMBERS` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: Key, + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => Key), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + set_changes_trie_config: sts.enumStruct({ + changesTrieConfig: sts.option(() => ChangesTrieConfiguration), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => KeyValue), + }), + suicide: sts.unit(), + } +}) + +export const KeyValue = sts.tuple(() => [StorageKey, StorageData]) + +export const StorageData = sts.bytes() + +export const StorageKey = sts.bytes() + +export const ChangesTrieConfiguration: sts.Type = sts.struct(() => { + return { + digestInterval: sts.number(), + digestLevels: sts.number(), + } +}) + +export const Key = sts.bytes() + +export const Perbill = sts.number() + +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: LookupSource, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: EraIndex, + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => LookupSource), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId, + era: EraIndex, + }), + reap_stash: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: LookupSource, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + validators: sts.array(() => AccountId), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + submit_election_solution: sts.enumStruct({ + winners: sts.array(() => ValidatorIndex), + compact: CompactAssignments, + score: ElectionScore, + era: EraIndex, + size: ElectionSize, + }), + submit_election_solution_unsigned: sts.enumStruct({ + winners: sts.array(() => ValidatorIndex), + compact: CompactAssignments, + score: ElectionScore, + era: EraIndex, + size: ElectionSize, + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + } +}) + +export const ElectionSize: sts.Type = sts.struct(() => { + return { + validators: sts.number(), + nominators: sts.number(), + } +}) + +export const ElectionScore = sts.array(() => sts.bigint()) + +export const CompactAssignments: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes2: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes3: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes4: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes5: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes6: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes7: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes8: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes9: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes10: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes11: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes12: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes13: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes14: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes15: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes16: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + } +}) + +export const CompactScore = sts.tuple(() => [ValidatorIndex, OffchainAccuracy]) + +export const OffchainAccuracy = sts.number() + +export const NominatorIndex = sts.number() + +export const ValidatorIndex = sts.number() + +export const Percent = sts.number() + +export const EraIndex = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: BalanceOf, + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId, + judgement: SocietyJudgement, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: LookupSource, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId, + value: BalanceOf, + tip: BalanceOf, + }), + } +}) + +export const SocietyJudgement: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + sub: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + bid_renew: sts.enumStruct({ + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + elaborate_deploy_data: sts.enumStruct({ + paraId: sts.number(), + code: ValidationCode, + }), + fix_deploy_data: sts.enumStruct({ + sub: sts.number(), + paraId: sts.number(), + codeHash: Hash, + codeSize: sts.number(), + initialHeadData: HeadData, + }), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + set_offboarding: sts.enumStruct({ + dest: LookupSource, + }), + } +}) + +export const HeadData = sts.bytes() + +export const ValidationCode = sts.bytes() + +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: Keys, + proof: sts.bytes(), + }), + } +}) + +export const Keys = sts.tuple(() => [AccountId, AccountId, AccountId, AccountId, AccountId]) + +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: BlockNumber, + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_190, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_190, + }), + } +}) + +export const Priority = sts.number() + +export const Period = sts.tuple(() => [BlockNumber, sts.number()]) + +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + deregister_para: sts.enumStruct({ + id: sts.number(), + }), + deregister_parathread: sts.unit(), + register_para: sts.enumStruct({ + id: sts.number(), + info: ParaInfo, + code: ValidationCode, + initialHeadData: HeadData, + }), + register_parathread: sts.enumStruct({ + code: ValidationCode, + initialHeadData: HeadData, + }), + select_parathread: sts.enumStruct({ + id: sts.number(), + collator: CollatorId, + headHash: Hash, + }), + set_thread_count: sts.enumStruct({ + count: sts.number(), + }), + swap: sts.enumStruct({ + other: sts.number(), + }), + } +}) + +export const CollatorId = sts.bytes() + +export const ParaInfo: sts.Type = sts.struct(() => { + return { + manager: AccountId, + deposit: Balance, + locked: sts.boolean(), + } +}) + +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId, + call: Type_190, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId, + }), + claim_recovery: sts.enumStruct({ + account: AccountId, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId), + threshold: sts.number(), + delayPeriod: BlockNumber, + }), + initiate_recovery: sts.enumStruct({ + account: AccountId, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + } +}) + +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + proxy: AccountId, + proxyType: ProxyType, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_190, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + proxy: AccountId, + proxyType: ProxyType, + }), + } +}) + +export const ParachainsCall: sts.Type = sts.closedEnum(() => { + return { + report_double_vote: sts.enumStruct({ + report: DoubleVoteReport, + }), + set_heads: sts.enumStruct({ + heads: sts.array(() => AttestedCandidate), + }), + } +}) + +export const AttestedCandidate: sts.Type = sts.struct(() => { + return { + candidate: AbridgedCandidateReceipt, + validityVotes: sts.array(() => ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: ValidatorSignature, + Implicit: ValidatorSignature, + Never: sts.unit(), + } +}) + +export const ValidatorSignature = sts.bytes() + +export const AbridgedCandidateReceipt: sts.Type = sts.struct(() => { + return { + parachainIndex: ParaId, + relayParent: Hash, + headData: HeadData, + collator: CollatorId, + signature: CollatorSignature, + povBlockHash: Hash, + commitments: CandidateCommitments, + } +}) + +export const CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => UpwardMessage), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: BlockNumber, + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: sts.number(), + data: sts.bytes(), + } +}) + +export const UpwardMessage = sts.bytes() + +export const CollatorSignature = sts.bytes() + +export const ParaId = sts.number() + +export const DoubleVoteReport: sts.Type = sts.struct(() => { + return { + identity: ValidatorId, + first: sts.tuple(() => [Statement, ValidatorSignature]), + second: sts.tuple(() => [Statement, ValidatorSignature]), + proof: MembershipProof, + signingContext: SigningContext, + } +}) + +export const SigningContext: sts.Type = sts.struct(() => { + return { + sessionIndex: SessionIndex, + parentHash: Hash, + } +}) + +export const SessionIndex = sts.number() + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: SessionIndex, + trieNodes: sts.array(() => sts.bytes()), + validatorCount: ValidatorCount, + } +}) + +export const ValidatorCount = sts.number() + +export const Statement: sts.Type = sts.closedEnum(() => { + return { + Candidate: Hash, + Invalid: Hash, + Never: sts.unit(), + Valid: Hash, + } +}) + +export const ValidatorId = sts.bytes() + +export const OffencesCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + call: sts.bytes(), + storeCall: sts.boolean(), + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId), + call: Type_190, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: AccountIndex, + }), + force_transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: AccountIndex, + }), + freeze: sts.enumStruct({ + index: AccountIndex, + }), + transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + }), + } +}) + +export const AccountIndex = sts.number() + +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: Signature, + }), + } +}) + +export const Signature = sts.bytes() + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: BlockNumber, + networkState: OpaqueNetworkState, + sessionIndex: SessionIndex, + authorityIndex: AuthIndex, + validatorsLen: sts.number(), + } +}) + +export const AuthIndex = sts.number() + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId, + }), + cancel_request: sts.enumStruct({ + regIndex: RegistrarIndex, + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: LookupSource, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: LookupSource, + judgement: IdentityJudgement, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: sts.bigint(), + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId, Data])), + }), + } +}) + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: H256, + Keccak256: H256, + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: H256, + ShaThree256: H256, + } +}) + +export const H256 = sts.bytes() + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => IdentityInfoAdditional), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => H160), + image: Data, + twitter: Data, + } +}) + +export const H160 = sts.bytes() + +export const IdentityInfoAdditional = sts.tuple(() => [Data, Data]) + +export const IdentityJudgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: Balance, + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export const RegistrarIndex = sts.number() + +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + report_equivocation: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const KeyOwnerProof: sts.Type = sts.struct(() => { + return { + session: SessionIndex, + trieNodes: sts.array(() => sts.bytes()), + validatorCount: ValidatorCount, + } +}) + +export const GrandpaEquivocationProof: sts.Type = sts.struct(() => { + return { + setId: SetId, + equivocation: GrandpaEquivocation, + } +}) + +export const GrandpaEquivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: GrandpaEquivocationValue, + Prevote: GrandpaEquivocationValue, + } +}) + +export const GrandpaEquivocationValue: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: AuthorityId, + first: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + second: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + } +}) + +export const AuthoritySignature = sts.bytes() + +export const GrandpaPrevote: sts.Type = sts.struct(() => { + return { + targetHash: Hash, + targetNumber: BlockNumber, + } +}) + +export const AuthorityId = sts.bytes() + +export const SetId = sts.bigint() + +export const FinalityTrackerCall: sts.Type = sts.closedEnum(() => { + return { + final_hint: sts.enumStruct({ + hint: sts.number(), + }), + } +}) + +export const ElectionsPhragmenCall: sts.Type = sts.closedEnum(() => { + return { + remove_member: sts.enumStruct({ + who: LookupSource, + hasReplacement: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + report_defunct_voter: sts.enumStruct({ + defunct: DefunctVoter, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId), + value: sts.bigint(), + }), + } +}) + +export const DefunctVoter: sts.Type = sts.struct(() => { + return { + who: AccountId, + voteCount: sts.number(), + candidateCount: sts.number(), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + cancel_queued: sts.enumStruct({ + which: ReferendumIndex, + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId, + conviction: Conviction, + balance: BalanceOf, + }), + emergency_cancel: sts.enumStruct({ + refIndex: ReferendumIndex, + }), + enact_proposal: sts.enumStruct({ + proposalHash: Hash, + index: ReferendumIndex, + }), + external_propose: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_default: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: Hash, + }), + fast_track: sts.enumStruct({ + proposalHash: Hash, + votingPeriod: BlockNumber, + delay: BlockNumber, + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: Hash, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: Hash, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId, + index: ReferendumIndex, + }), + remove_vote: sts.enumStruct({ + index: ReferendumIndex, + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId, + }), + veto_external: sts.enumStruct({ + proposalHash: Hash, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: AccountVoteSplit, + Standard: AccountVoteStandard, + } +}) + +export const AccountVoteStandard: sts.Type = sts.struct(() => { + return { + vote: Vote, + balance: Balance, + } +}) + +export const Vote = sts.number() + +export const AccountVoteSplit: sts.Type = sts.struct(() => { + return { + aye: Balance, + nay: Balance, + } +}) + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export const ReferendumIndex = sts.number() + +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: BalanceOf, + vestingSchedule: sts.option(() => sts.tuple(() => [BalanceOf, BalanceOf, BlockNumber])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: LookupSource, + dest: LookupSource, + value: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: LookupSource, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + } +}) + +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: Hash, + number: sts.number(), + stateRoot: Hash, + extrinsicsRoot: Hash, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + AuthoritiesChange: sts.array(() => AuthorityId), + ChangesTrieRoot: Hash, + ChangesTrieSignal: ChangesTrieSignal, + Consensus: Consensus, + Other: sts.bytes(), + PreRuntime: PreRuntime, + RuntimeEnvironmentUpdated: sts.unit(), + Seal: Seal, + SealV0: SealV0, + } +}) + +export const SealV0 = sts.tuple(() => [sts.bigint(), Signature]) + +export const Seal = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const PreRuntime = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const Consensus = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const ConsensusEngineId = sts.bytes() + +export const ChangesTrieSignal: sts.Type = sts.closedEnum(() => { + return { + NewConfiguration: sts.option(() => ChangesTrieConfiguration), + } +}) + +export const AuthorityDiscoveryCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const AttestationsCall: sts.Type = sts.closedEnum(() => { + return { + more_attestations: sts.unit(), + } +}) + +export type Type_190 = Type_190_Attestations | Type_190_AuthorityDiscovery | Type_190_Authorship | Type_190_Babe | Type_190_Balances | Type_190_Claims | Type_190_Council | Type_190_Democracy | Type_190_ElectionsPhragmen | Type_190_FinalityTracker | Type_190_Grandpa | Type_190_Identity | Type_190_ImOnline | Type_190_Indices | Type_190_Multisig | Type_190_Offences | Type_190_Parachains | Type_190_Proxy | Type_190_Recovery | Type_190_Registrar | Type_190_Scheduler | Type_190_Session | Type_190_Slots | Type_190_Society | Type_190_Staking | Type_190_System | Type_190_TechnicalCommittee | Type_190_TechnicalMembership | Type_190_Timestamp | Type_190_Treasury | Type_190_Utility | Type_190_Vesting + +export interface Type_190_Attestations { + __kind: 'Attestations' + value: AttestationsCall +} + +export interface Type_190_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Type_190_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Type_190_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Type_190_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Type_190_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Type_190_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Type_190_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Type_190_ElectionsPhragmen { + __kind: 'ElectionsPhragmen' + value: ElectionsPhragmenCall +} + +export interface Type_190_FinalityTracker { + __kind: 'FinalityTracker' + value: FinalityTrackerCall +} + +export interface Type_190_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Type_190_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Type_190_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Type_190_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Type_190_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Type_190_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Type_190_Parachains { + __kind: 'Parachains' + value: ParachainsCall +} + +export interface Type_190_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Type_190_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Type_190_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Type_190_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Type_190_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Type_190_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Type_190_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Type_190_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Type_190_System { + __kind: 'System' + value: SystemCall +} + +export interface Type_190_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Type_190_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Type_190_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Type_190_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Type_190_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Type_190_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId = sts.bytes() diff --git a/squid/src/types/v2013.ts b/squid/src/types/v2013.ts new file mode 100644 index 00000000..f5788774 --- /dev/null +++ b/squid/src/types/v2013.ts @@ -0,0 +1,6748 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Type_190: sts.Type = sts.closedEnum(() => { + return { + Attestations: AttestationsCall, + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Democracy: DemocracyCall, + ElectionsPhragmen: ElectionsPhragmenCall, + FinalityTracker: FinalityTrackerCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + Parachains: ParachainsCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + } +}) + +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: LookupSource, + target: LookupSource, + schedule: VestingInfo, + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: LookupSource, + }), + vested_transfer: sts.enumStruct({ + target: LookupSource, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: Balance, + perBlock: Balance, + startingBlock: BlockNumber, + } +}) + +export const BlockNumber = sts.number() + +export const Balance = sts.bigint() + +export interface VestingInfo { + locked: Balance + perBlock: Balance + startingBlock: BlockNumber +} + +export type BlockNumber = number + +export type Balance = bigint + +export const LookupSource = sts.bytes() + +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * - Benchmark: 100.3 + .365 * l µs (min square analysis) + * - Using 100 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks. + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: LookupSource + target: LookupSource + schedule: VestingInfo +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this module. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * - Benchmark: + * - Unlocked: 48.76 + .048 * l µs (min square analysis) + * - Locked: 44.43 + .284 * l µs (min square analysis) + * - Using 50 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks. + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this module. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * - Benchmark: + * - Unlocked: 44.3 + .294 * l µs (min square analysis) + * - Locked: 48.16 + .103 * l µs (min square analysis) + * - Using 50 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks. + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: LookupSource +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Benchmark: 100.3 + .365 * l µs (min square analysis) + * - Using 100 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks. + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: LookupSource + schedule: VestingInfo +} + +export type LookupSource = Bytes + +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Type_190, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Type_190), + }), + } +}) + +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + * + * # + * - Base weight: 2.861 µs + * - Plus the weight of the `call` + * # + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Type_190 +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Trait::BaseCallFilter`). + * + * # + * - Base weight: 14.39 + .987 * c µs + * - Plus the sum of the weights of the `calls`. + * - Plus one additional event. (repeat read/write) + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Type_190[] +} + +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + close_tip: sts.enumStruct({ + hash: Hash, + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: LookupSource, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + }), + retract_tip: sts.enumStruct({ + hash: Hash, + }), + tip: sts.enumStruct({ + hash: Hash, + tipValue: BalanceOf, + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + tipValue: BalanceOf, + }), + } +}) + +export const BalanceOf = sts.bigint() + +export const Hash = sts.bytes() + +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_close_tip | TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_report_awesome | TreasuryCall_retract_tip | TreasuryCall_tip | TreasuryCall_tip_new + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`. + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TreasuryCall_close_tip { + __kind: 'close_tip' + hash: Hash +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: LookupSource +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `TipReportDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips`, `who account data` + * - DbWrites: `Tips`, `who account data` + * # + */ +export interface TreasuryCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TreasuryCall_retract_tip { + __kind: 'retract_tip' + hash: Hash +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`, insert tip and check closing, + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TreasuryCall_tip { + __kind: 'tip' + hash: Hash + tipValue: BalanceOf +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T` + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TreasuryCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId + tipValue: BalanceOf +} + +export type BalanceOf = bigint + +export type AccountId = Bytes + +export type Hash = Bytes + +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(T)` where `T` complexity of `on_timestamp_set` + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in `on_finalize`) + * - 1 event handler `on_timestamp_set` `O(T)`. + * - Benchmark: 7.678 (min squares analysis) + * - NOTE: This benchmark was done for a runtime with insignificant `on_timestamp_set` handlers. + * New benchmarking is needed when adding new handlers. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId, + }), + change_key: sts.enumStruct({ + new: AccountId, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId), + }), + set_prime: sts.enumStruct({ + who: AccountId, + }), + swap_member: sts.enumStruct({ + remove: AccountId, + add: AccountId, + }), + } +}) + +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId + add: AccountId +} + +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const MemberCount = sts.number() + +export const Proposal: sts.Type = sts.closedEnum(() => { + return { + Attestations: AttestationsCall, + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Democracy: DemocracyCall, + ElectionsPhragmen: ElectionsPhragmenCall, + FinalityTracker: FinalityTrackerCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + Parachains: ParachainsCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + } +}) + +export type Proposal = Proposal_Attestations | Proposal_AuthorityDiscovery | Proposal_Authorship | Proposal_Babe | Proposal_Balances | Proposal_Claims | Proposal_Council | Proposal_Democracy | Proposal_ElectionsPhragmen | Proposal_FinalityTracker | Proposal_Grandpa | Proposal_Identity | Proposal_ImOnline | Proposal_Indices | Proposal_Multisig | Proposal_Offences | Proposal_Parachains | Proposal_Proxy | Proposal_Recovery | Proposal_Registrar | Proposal_Scheduler | Proposal_Session | Proposal_Slots | Proposal_Society | Proposal_Staking | Proposal_System | Proposal_TechnicalCommittee | Proposal_TechnicalMembership | Proposal_Timestamp | Proposal_Treasury | Proposal_Utility | Proposal_Vesting + +export interface Proposal_Attestations { + __kind: 'Attestations' + value: AttestationsCall +} + +export interface Proposal_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Proposal_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Proposal_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Proposal_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Proposal_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Proposal_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Proposal_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Proposal_ElectionsPhragmen { + __kind: 'ElectionsPhragmen' + value: ElectionsPhragmenCall +} + +export interface Proposal_FinalityTracker { + __kind: 'FinalityTracker' + value: FinalityTrackerCall +} + +export interface Proposal_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Proposal_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Proposal_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Proposal_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Proposal_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Proposal_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Proposal_Parachains { + __kind: 'Parachains' + value: ParachainsCall +} + +export interface Proposal_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Proposal_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Proposal_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Proposal_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Proposal_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Proposal_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Proposal_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Proposal_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Proposal_System { + __kind: 'System' + value: SystemCall +} + +export interface Proposal_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Proposal_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Proposal_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Proposal_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Proposal_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Proposal_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_set_changes_trie_config | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage | SystemCall_suicide + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + * + * # + * - `O(P)` where `P` amount of keys with prefix `prefix` + * - `P` storage deletions. + * - Base Weight: 0.834 * P µs + * - Writes: Number of subkeys + 1 + * # + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Key + subkeys: number +} + +/** + * Kill some items from storage. + * + * # + * - `O(IK)` where `I` length of `keys` and `K` length of one key + * - `I` storage deletions. + * - Base Weight: .378 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Key[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * - Base Weight: 0.665 µs, independent of remark length. + * - No DB operations. + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Set the new changes trie configuration. + * + * # + * - `O(1)` + * - 1 storage write or delete (codec `O(1)`). + * - 1 call to `deposit_log`: Uses `append` API, so O(1) + * - Base Weight: 7.218 µs + * - DB Weight: + * - Writes: Changes Trie, System Digest + * # + */ +export interface SystemCall_set_changes_trie_config { + __kind: 'set_changes_trie_config' + changesTrieConfig?: (ChangesTrieConfiguration | undefined) +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 storage write (codec `O(C)`). + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is expensive). + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very expensive. + * We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + * + * # + * - `O(1)` + * - 1 storage write. + * - Base Weight: 1.405 µs + * - 1 write to HEAP_PAGES + * # + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + * + * # + * - `O(I)` where `I` length of `items` + * - `I` storage writes (`O(1)`). + * - Base Weight: 0.568 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: KeyValue[] +} + +/** + * Kill the sending account, assuming there are no references outstanding and the composite + * data is equal to its default value. + * + * # + * - `O(1)` + * - 1 storage read and deletion. + * -------------------- + * Base Weight: 8.626 µs + * No DB Read or Write operations because caller is already in overlay + * # + */ +export interface SystemCall_suicide { + __kind: 'suicide' +} + +export type KeyValue = [StorageKey, StorageData] + +export type StorageData = Bytes + +export type StorageKey = Bytes + +export interface ChangesTrieConfiguration { + digestInterval: number + digestLevels: number +} + +export type Key = Bytes + +export type Perbill = number + +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_validator_count | StakingCall_submit_election_solution | StakingCall_submit_election_solution_unsigned | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * Base Weight: 67.87 µs + * DB Weight: + * - Read: Bonded, Ledger, [Origin Account], Current Era, History Depth, Locks + * - Write: Bonded, Payee, [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: LookupSource + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount + * that can be added. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller and + * it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * - One DB entry. + * ------------ + * Base Weight: 54.88 µs + * DB Weight: + * - Read: Era Election Status, Bonded, Ledger, [Origin Account], Locks + * - Write: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + * + * # + * Complexity: O(U + S) + * with U unapplied slashes weighted with U=1000 + * and S is the number of slash indices to be canceled. + * - Base: 5870 + 34.61 * S µs + * - Read: Unapplied Slashes + * - Write: Unapplied Slashes + * # + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: EraIndex + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * -------- + * Base Weight: 16.53 µs + * DB Weight: + * - Read: EraElectionStatus, Ledger + * - Write: Validators, Nominators + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Base Weight: 1.959 µs + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - Base Weight: 2.05 µs + * - Write: ForceEra + * # + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Base Weight: 1.857 µs + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + * + * # + * O(S) where S is the number of slashing spans to be removed + * Base Weight: 53.07 + 2.365 * S µs + * Reads: Bonded, Slashing Spans, Account, Locks + * Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Account, Locks + * Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Base Weight: 1.717 µs + * Read/Write: Validator Count + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. This can only be called when + * [`EraElectionStatus`] is `Closed`. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS). + * - Both the reads and writes follow a similar pattern. + * --------- + * Base Weight: 22.34 + .36 * N µs + * where N is the number of targets + * DB Weight: + * - Reads: Era Election Status, Ledger, Current Era + * - Writes: Validators, Nominators + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: LookupSource[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * This can only be called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Base Weight: + * - Reward Destination Staked: 110 + 54.2 * N µs (Median Slopes) + * - Reward Destination Controller (Creating): 120 + 41.95 * N µs (Median Slopes) + * DB Weight: + * - Read: EraElectionStatus, CurrentEra, HistoryDepth, ErasValidatorReward, + * ErasStakersClipped, ErasRewardPoints, ErasValidatorPrefs (8 items) + * - Read Each: Bonded, Ledger, Payee, Locks, System Account (5 items) + * - Write Each: System Account, Locks, Ledger (3 items) + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId + era: EraIndex +} + +/** + * Remove all data structure concerning a staker/stash once its balance is zero. + * This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone + * and the target `stash` must have no funds left. + * + * This can be called from any origin. + * + * - `stash`: The stash account to reap. Its balance must be zero. + * + * # + * Complexity: O(S) where S is the number of slashing spans on the account. + * Base Weight: 75.94 + 2.396 * S µs + * DB Weight: + * - Reads: Stash Account, Bonded, Slashing Spans, Locks + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Stash Account, Locks + * - Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller, and it can be only called when + * [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MAX_UNLOCKING_CHUNKS`. + * - Storage changes: Can't increase storage, only decrease it. + * --------------- + * - Base Weight: 34.51 µs * .048 L µs + * - DB Weight: + * - Reads: EraElectionStatus, Ledger, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Base Weight: 1.717 µs + * Read/Write: Validator Count + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Base Weight: 25.22 µs + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: LookupSource +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. + * This should report all the storage items that will be deleted by clearing old + * era history. Needed to report an accurate weight for the dispatch. Trusted by + * `Root` to report an accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Base Weight: 29.13 * E µs + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + * + * # + * - O(V) + * - Base Weight: 2.208 + .006 * V µs + * - Write: Invulnerables + * # + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + validators: AccountId[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Base Weight: 11.33 µs + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Base Weight: 1.717 µs + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Submit an election result to the chain. If the solution: + * + * 1. is valid. + * 2. has a better score than a potentially existing solution on chain. + * + * then, it will be _put_ on chain. + * + * A solution consists of two pieces of data: + * + * 1. `winners`: a flat vector of all the winners of the round. + * 2. `assignments`: the compact version of an assignment vector that encodes the edge + * weights. + * + * Both of which may be computed using _phragmen_, or any other algorithm. + * + * Additionally, the submitter must provide: + * + * - The `score` that they claim their solution has. + * + * Both validators and nominators will be represented by indices in the solution. The + * indices should respect the corresponding types ([`ValidatorIndex`] and + * [`NominatorIndex`]). Moreover, they should be valid when used to index into + * [`SnapshotValidators`] and [`SnapshotNominators`]. Any invalid index will cause the + * solution to be rejected. These two storage items are set during the election window and + * may be used to determine the indices. + * + * A solution is valid if: + * + * 0. It is submitted when [`EraElectionStatus`] is `Open`. + * 1. Its claimed score is equal to the score computed on-chain. + * 2. Presents the correct number of winners. + * 3. All indexes must be value according to the snapshot vectors. All edge values must + * also be correct and should not overflow the granularity of the ratio type (i.e. 256 + * or billion). + * 4. For each edge, all targets are actually nominated by the voter. + * 5. Has correct self-votes. + * + * A solutions score is consisted of 3 parameters: + * + * 1. `min { support.total }` for each support of a winner. This value should be maximized. + * 2. `sum { support.total }` for each support of a winner. This value should be minimized. + * 3. `sum { support.total^2 }` for each support of a winner. This value should be + * minimized (to ensure less variance) + * + * # + * See `crate::weight` module. + * # + */ +export interface StakingCall_submit_election_solution { + __kind: 'submit_election_solution' + winners: ValidatorIndex[] + compact: CompactAssignments + score: ElectionScore + era: EraIndex + size: ElectionSize +} + +/** + * Unsigned version of `submit_election_solution`. + * + * Note that this must pass the [`ValidateUnsigned`] check which only allows transactions + * from the local node to be included. In other words, only the block author can include a + * transaction in the block. + * + * # + * See `crate::weight` module. + * # + */ +export interface StakingCall_submit_election_solution_unsigned { + __kind: 'submit_election_solution_unsigned' + winners: ValidatorIndex[] + compact: CompactAssignments + score: ElectionScore + era: EraIndex + size: ElectionSize +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + * + * # + * - Independent of the arguments. Limited but potentially exploitable complexity. + * - Contains a limited number of reads. + * - Each call (requires the remainder of the bonded balance to be above `minimum_balance`) + * will cause a new entry to be inserted into a vector (`Ledger.unlocking`) kept in storage. + * The only way to clean the aforementioned storage item is also user-controlled via + * `withdraw_unbonded`. + * - One DB entry. + * ---------- + * Base Weight: 50.34 µs + * DB Weight: + * - Read: Era Election Status, Ledger, Current Era, Locks, [Origin Account] + * - Write: [Origin Account], Locks, Ledger + * + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ----------- + * Base Weight: 17.13 µs + * DB Weight: + * - Read: Era Election Status, Ledger + * - Write: Nominators, Validators + * # + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * - Could be dependent on the `origin` argument and how much `unlocking` chunks exist. + * It implies `consolidate_unlocked` which loops over `Ledger.unlocking`, which is + * indirectly user-controlled. See [`unbond`] for more detail. + * - Contains a limited number of reads, yet the size of which could be large based on `ledger`. + * - Writes are limited to the `origin` account key. + * --------------- + * Complexity O(S) where S is the number of slashing spans to remove + * Base Weight: + * Update: 50.52 + .028 * S µs + * - Reads: EraElectionStatus, Ledger, Current Era, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * Kill: 79.41 + 2.366 * S µs + * - Reads: EraElectionStatus, Ledger, Current Era, Bonded, Slashing Spans, [Origin Account], Locks + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, [Origin Account], Locks + * - Writes Each: SpanSlash * S + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +export interface ValidatorPrefs { + commission: number +} + +export interface ElectionSize { + validators: number + nominators: number +} + +export type ElectionScore = bigint[] + +export interface CompactAssignments { + votes1: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes2: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes3: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes4: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes5: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes6: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes7: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes8: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes9: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes10: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes11: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes12: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes13: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes14: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes15: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes16: [NominatorIndex, CompactScore[], ValidatorIndex][] +} + +export type CompactScore = [ValidatorIndex, OffchainAccuracy] + +export type OffchainAccuracy = number + +export type NominatorIndex = number + +export type ValidatorIndex = number + +export type Percent = number + +export type EraIndex = number + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: BalanceOf +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * module to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId + judgement: SocietyJudgement +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin + * forgives (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: LookupSource + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId + value: BalanceOf + tip: BalanceOf +} + +export type SocietyJudgement = SocietyJudgement_Approve | SocietyJudgement_Rebid | SocietyJudgement_Reject + +export interface SocietyJudgement_Approve { + __kind: 'Approve' +} + +export interface SocietyJudgement_Rebid { + __kind: 'Rebid' +} + +export interface SocietyJudgement_Reject { + __kind: 'Reject' +} + +export type SlotsCall = SlotsCall_bid | SlotsCall_bid_renew | SlotsCall_elaborate_deploy_data | SlotsCall_fix_deploy_data | SlotsCall_new_auction | SlotsCall_set_offboarding + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface SlotsCall_bid { + __kind: 'bid' + sub: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Make a new bid from a parachain account for renewing that (pre-existing) parachain. + * + * The origin *must* be a parachain account. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface SlotsCall_bid_renew { + __kind: 'bid_renew' + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Note a new parachain's code. + * + * This must be called after `fix_deploy_data` and `code` must be the preimage of the + * `code_hash` passed there for the same `para_id`. + * + * This may be called before or after the beginning of the parachain's first lease period. + * If called before then the parachain will become active at the first block of its + * starting lease period. If after, then it will become active immediately after this call. + * + * - `_origin` is irrelevant. + * - `para_id` is the parachain ID whose code will be elaborated. + * - `code` is the preimage of the registered `code_hash` of `para_id`. + */ +export interface SlotsCall_elaborate_deploy_data { + __kind: 'elaborate_deploy_data' + paraId: number + code: ValidationCode +} + +/** + * Set the deploy information for a successful bid to deploy a new parachain. + * + * - `origin` must be the successful bidder account. + * - `sub` is the sub-bidder ID of the bidder. + * - `para_id` is the parachain ID allotted to the winning bidder. + * - `code_hash` is the hash of the parachain's Wasm validation function. + * - `initial_head_data` is the parachain's initial head data. + */ +export interface SlotsCall_fix_deploy_data { + __kind: 'fix_deploy_data' + sub: number + paraId: number + codeHash: Hash + codeSize: number + initialHeadData: HeadData +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface SlotsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +/** + * Set the off-boarding information for a parachain. + * + * The origin *must* be a parachain account. + * + * - `dest` is the destination account to receive the parachain's deposit. + */ +export interface SlotsCall_set_offboarding { + __kind: 'set_offboarding' + dest: LookupSource +} + +export type HeadData = Bytes + +export type ValidationCode = Bytes + +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` in number of key types. + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwnder` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: Keys + proof: Bytes +} + +export type Keys = [AccountId, AccountId, AccountId, AccountId, AccountId] + +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_named + +/** + * Cancel an anonymously scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.15 + 2.869 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: BlockNumber + index: number +} + +/** + * Cancel a named scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 24.91 + 2.907 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.29 + .126 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda + * - Will use base weight of 25 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_190 +} + +/** + * Schedule a named task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 29.6 + .159 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 35 which should be good for more than 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_190 +} + +export type Priority = number + +export type Period = [BlockNumber, number] + +export type RegistrarCall = RegistrarCall_deregister_para | RegistrarCall_deregister_parathread | RegistrarCall_register_para | RegistrarCall_register_parathread | RegistrarCall_select_parathread | RegistrarCall_set_thread_count | RegistrarCall_swap + +/** + * Deregister a parachain with given id + */ +export interface RegistrarCall_deregister_para { + __kind: 'deregister_para' + id: number +} + +/** + * Deregister a parathread and retrieve the deposit. + * + * Must be sent from a `Parachain` origin which is currently a parathread. + * + * Ensure that before calling this that any funds you want emptied from the parathread's + * account is moved out; after this it will be impossible to retrieve them (without + * governance intervention). + */ +export interface RegistrarCall_deregister_parathread { + __kind: 'deregister_parathread' +} + +/** + * Register a parachain with given code. Must be called by root. + * Fails if given ID is already used. + * + * Unlike the `Registrar` trait function of the same name, this + * checks the code and head data against size limits. + */ +export interface RegistrarCall_register_para { + __kind: 'register_para' + id: number + info: ParaInfo + code: ValidationCode + initialHeadData: HeadData +} + +/** + * Register a parathread for immediate use. + * + * Must be sent from a Signed origin that is able to have ParathreadDeposit reserved. + * `code` and `initial_head_data` are used to initialize the parathread's state. + * + * Unlike `register_para`, this function does check that the maximum code size + * and head data size are respected, as parathread registration is an atomic + * action. + */ +export interface RegistrarCall_register_parathread { + __kind: 'register_parathread' + code: ValidationCode + initialHeadData: HeadData +} + +/** + * Place a bid for a parathread to be progressed in the next block. + * + * This is a kind of special transaction that should be heavily prioritized in the + * transaction pool according to the `value`; only `ThreadCount` of them may be presented + * in any single block. + */ +export interface RegistrarCall_select_parathread { + __kind: 'select_parathread' + id: number + collator: CollatorId + headHash: Hash +} + +/** + * Reset the number of parathreads that can pay to be scheduled in a single block. + * + * - `count`: The number of parathreads. + * + * Must be called from Root origin. + */ +export interface RegistrarCall_set_thread_count { + __kind: 'set_thread_count' + count: number +} + +/** + * Swap a parachain with another parachain or parathread. The origin must be a `Parachain`. + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + other: number +} + +export type CollatorId = Bytes + +export interface ParaInfo { + manager: AccountId + deposit: Balance + locked: boolean +} + +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + * + * # + * - The weight of the `call` + 10,000. + * - One storage lookup to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId + call: Type_190 +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + * + * # + * - One storage mutation to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully + * recovered by you. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + V) + * # + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + * + * # + * Key: V (len of vouching friends) + * - One storage read/remove to get the active recovery process. O(1), Codec O(V) + * - One balance call to repatriate reserved. O(X) + * - One event. + * + * Total Complexity: O(V + X) + * # + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. + * Should be ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt + * before the account can be recovered. Should be less than or equal to + * the length of the list of friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized + * that needs to pass before the account can be recovered. + * + * # + * - Key: F (len of friends) + * - One storage read to check that account is not already recoverable. O(1). + * - A check that the friends list is sorted and unique. O(F) + * - One currency reserve operation. O(X) + * - One storage write. O(1). Codec O(F). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId[] + threshold: number + delayPeriod: BlockNumber +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account + * needs to be recoverable (i.e. have a recovery configuration). + * + * # + * - One storage read to check that account is recoverable. O(F) + * - One storage read to check that this recovery process hasn't already started. O(1) + * - One currency reserve operation. O(X) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + * + * # + * Key: F (len of friends) + * - One storage read to get the prefix iterator for active recoveries. O(1) + * - One storage read/remove to get the recovery configuration. O(1), Codec O(F) + * - One balance call to unreserved. O(X) + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + * + * # + * - One storage write O(1) + * - One event + * # + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId + rescuer: AccountId +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you + * want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One binary search to confirm caller is a friend. O(logF) + * - One binary search to confirm caller has not already vouched. O(logV) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + logF + V + logV) + * # + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId + rescuer: AccountId +} + +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * + * # + * P is the number of proxies the user has + * - Base weight: 17.48 + .176 * P µs + * - DB weight: 1 storage read and write. + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + proxy: AccountId + proxyType: ProxyType +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * P is the number of proxies the user has + * - Base weight: 36.48 + .039 * P µs + * - DB weight: 1 storage read and write. + * # + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * P is the number of proxies the user has + * - Base weight: 15.65 + .137 * P µs + * - DB weight: 1 storage read and write. + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * P is the number of proxies the user has + * - Base weight: 19.87 + .141 * P µs + * - DB weight: 1 storage read. + * - Plus the weight of the `call` + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_190 +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * P is the number of proxies the user has + * - Base weight: 13.73 + .129 * P µs + * - DB weight: 1 storage read and write. + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * P is the number of proxies the user has + * - Base weight: 14.37 + .164 * P µs + * - DB weight: 1 storage read and write. + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + proxy: AccountId + proxyType: ProxyType +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +export type ParachainsCall = ParachainsCall_report_double_vote | ParachainsCall_send_xcmp_message | ParachainsCall_set_heads | ParachainsCall_transfer_to_parachain + +/** + * Provide a proof that some validator has commited a double-vote. + * + * The weight is 0; in order to avoid DoS a `SignedExtension` validation + * is implemented. + */ +export interface ParachainsCall_report_double_vote { + __kind: 'report_double_vote' + report: DoubleVoteReport +} + +/** + * Send a XCMP message to the given parachain. + * + * The origin must be another parachain. + */ +export interface ParachainsCall_send_xcmp_message { + __kind: 'send_xcmp_message' + to: ParaId + msg: Bytes +} + +/** + * Provide candidate receipts for parachains, in ascending order by id. + */ +export interface ParachainsCall_set_heads { + __kind: 'set_heads' + heads: AttestedCandidate[] +} + +/** + * Transfer some tokens into a parachain and leave a message in the downward queue for it. + */ +export interface ParachainsCall_transfer_to_parachain { + __kind: 'transfer_to_parachain' + to: ParaId + amount: Balance + remark: Remark +} + +export type Remark = Bytes + +export interface AttestedCandidate { + candidate: AbridgedCandidateReceipt + validityVotes: ValidityAttestation[] + validatorIndices: BitSequence +} + +export type ValidityAttestation = ValidityAttestation_Explicit | ValidityAttestation_Implicit | ValidityAttestation_Never + +export interface ValidityAttestation_Explicit { + __kind: 'Explicit' + value: ValidatorSignature +} + +export interface ValidityAttestation_Implicit { + __kind: 'Implicit' + value: ValidatorSignature +} + +export interface ValidityAttestation_Never { + __kind: 'Never' +} + +export type ValidatorSignature = Bytes + +export interface AbridgedCandidateReceipt { + parachainIndex: ParaId + relayParent: Hash + headData: HeadData + collator: CollatorId + signature: CollatorSignature + povBlockHash: Hash + commitments: CandidateCommitments +} + +export interface CandidateCommitments { + upwardMessages: UpwardMessage[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: BlockNumber +} + +export interface OutboundHrmpMessage { + recipient: number + data: Bytes +} + +export type UpwardMessage = Bytes + +export type CollatorSignature = Bytes + +export type ParaId = number + +export interface DoubleVoteReport { + identity: ValidatorId + first: [Statement, ValidatorSignature] + second: [Statement, ValidatorSignature] + proof: MembershipProof + signingContext: SigningContext +} + +export interface SigningContext { + sessionIndex: SessionIndex + parentHash: Hash +} + +export type SessionIndex = number + +export interface MembershipProof { + session: SessionIndex + trieNodes: Bytes[] + validatorCount: ValidatorCount +} + +export type ValidatorCount = number + +export type Statement = Statement_Candidate | Statement_Invalid | Statement_Never | Statement_Valid + +export interface Statement_Candidate { + __kind: 'Candidate' + value: Hash +} + +export interface Statement_Invalid { + __kind: 'Invalid' + value: Hash +} + +export interface Statement_Never { + __kind: 'Never' +} + +export interface Statement_Valid { + __kind: 'Valid' + value: Hash +} + +export type ValidatorId = Bytes + +export type OffencesCall = never + +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - Base Weight: + * - Create: 44.71 + 0.088 * S + * - Approve: 31.48 + 0.116 * S + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - Base Weight: + * - Create: 41.89 + 0.118 * S + .002 * Z µs + * - Create w/ Store: 53.57 + 0.119 * S + .003 * Z µs + * - Approve: 31.39 + 0.136 * S + .002 * Z µs + * - Complete: 39.94 + 0.26 * S + .002 * Z µs + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + call: Bytes + storeCall: boolean + maxWeight: Weight +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - Base Weight: 33.72 + 0.002 * Z µs + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId[] + call: Type_190 +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - Base Weight: 36.07 + 0.124 * S + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId[] + timepoint: Timepoint + callHash: Bytes +} + +export type Weight = bigint + +export interface Timepoint { + height: BlockNumber + index: number +} + +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - Base Weight: 28.69 µs + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: AccountIndex +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - Base Weight: 26.83 µs + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId + index: AccountIndex + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - Base Weight: 25.53 µs + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: AccountIndex +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - Base Weight: 30.86 µs + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: AccountIndex +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - Base Weight: 33.74 µs + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId + index: AccountIndex +} + +export type AccountIndex = number + +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` and E is length of + * `Heartbeat.network_state.external_address` + * + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Signature +} + +export type Signature = Bytes + +export interface Heartbeat { + blockNumber: BlockNumber + networkState: OpaqueNetworkState + sessionIndex: SessionIndex + authorityIndex: AuthIndex + validatorsLen: number +} + +export type AuthIndex = number + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: RegistrarIndex +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: LookupSource +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: LookupSource + judgement: IdentityJudgement +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: bigint +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId, Data][] +} + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: H256 +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: H256 +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: H256 +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: H256 +} + +export type H256 = Bytes + +export interface IdentityInfo { + additional: IdentityInfoAdditional[] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (H160 | undefined) + image: Data + twitter: Data +} + +export type H160 = Bytes + +export type IdentityInfoAdditional = [Data, Data] + +export type IdentityJudgement = IdentityJudgement_Erroneous | IdentityJudgement_FeePaid | IdentityJudgement_KnownGood | IdentityJudgement_LowQuality | IdentityJudgement_OutOfDate | IdentityJudgement_Reasonable | IdentityJudgement_Unknown + +export interface IdentityJudgement_Erroneous { + __kind: 'Erroneous' +} + +export interface IdentityJudgement_FeePaid { + __kind: 'FeePaid' + value: Balance +} + +export interface IdentityJudgement_KnownGood { + __kind: 'KnownGood' +} + +export interface IdentityJudgement_LowQuality { + __kind: 'LowQuality' +} + +export interface IdentityJudgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface IdentityJudgement_Reasonable { + __kind: 'Reasonable' +} + +export interface IdentityJudgement_Unknown { + __kind: 'Unknown' +} + +export type RegistrarIndex = number + +export type GrandpaCall = GrandpaCall_report_equivocation + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * Since the weight of the extrinsic is 0, in order to avoid DoS by + * submission of invalid equivocation reports, a mandatory pre-validation of + * the extrinsic is implemented in a `SignedExtension`. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface KeyOwnerProof { + session: SessionIndex + trieNodes: Bytes[] + validatorCount: ValidatorCount +} + +export interface GrandpaEquivocationProof { + setId: SetId + equivocation: GrandpaEquivocation +} + +export type GrandpaEquivocation = GrandpaEquivocation_Precommit | GrandpaEquivocation_Prevote + +export interface GrandpaEquivocation_Precommit { + __kind: 'Precommit' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocation_Prevote { + __kind: 'Prevote' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocationValue { + roundNumber: bigint + identity: AuthorityId + first: [GrandpaPrevote, AuthoritySignature] + second: [GrandpaPrevote, AuthoritySignature] +} + +export type AuthoritySignature = Bytes + +export interface GrandpaPrevote { + targetHash: Hash + targetNumber: BlockNumber +} + +export type AuthorityId = Bytes + +export type SetId = bigint + +export type FinalityTrackerCall = FinalityTrackerCall_final_hint + +/** + * Hint that the author of this block thinks the best finalized + * block is the given number. + */ +export interface FinalityTrackerCall_final_hint { + __kind: 'final_hint' + hint: number +} + +export type ElectionsPhragmenCall = ElectionsPhragmenCall_remove_member | ElectionsPhragmenCall_remove_voter | ElectionsPhragmenCall_renounce_candidacy | ElectionsPhragmenCall_report_defunct_voter | ElectionsPhragmenCall_submit_candidacy | ElectionsPhragmenCall_vote + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, a new phragmen election is started. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement: + * - Base weight: 50.93 µs + * - State reads: + * - RunnersUp.len() + * - Members, RunnersUp (remove_and_replace_member) + * - State writes: + * - Members, RunnersUp (remove_and_replace_member) + * Else, since this is a root call and will go into phragmen, we assume full block for now. + * # + */ +export interface ElectionsPhragmenCall_remove_member { + __kind: 'remove_member' + who: LookupSource + hasReplacement: boolean +} + +/** + * Remove `origin` as a voter. This removes the lock and returns the bond. + * + * # + * Base weight: 36.8 µs + * All state access is from do_remove_voter. + * State reads: + * - Voting + * - [AccountData(who)] + * State writes: + * - Voting + * - Locks + * - [AccountData(who)] + * # + */ +export interface ElectionsPhragmenCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * - `origin` is a candidate and not elected in any set. In this case, the bond is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the bond is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the bond is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_voter`], if replacement runners exists, they are immediately used. + * + * If a candidate is renouncing: + * Base weight: 17.28 µs + * Complexity of candidate_count: 0.235 µs + * State reads: + * - Candidates + * - [AccountBalance(who) (unreserve)] + * State writes: + * - Candidates + * - [AccountBalance(who) (unreserve)] + * If member is renouncing: + * Base weight: 46.25 µs + * State reads: + * - Members, RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * State writes: + * - Members, RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * If runner is renouncing: + * Base weight: 46.25 µs + * State reads: + * - RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * State writes: + * - RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * + * Weight note: The call into changeMembers need to be accounted for. + * + */ +export interface ElectionsPhragmenCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Report `target` for being an defunct voter. In case of a valid report, the reporter is + * rewarded by the bond amount of `target`. Otherwise, the reporter itself is removed and + * their bond is slashed. + * + * A defunct voter is defined to be: + * - a voter whose current submitted votes are all invalid. i.e. all of them are no + * longer a candidate nor an active member or a runner-up. + * + * + * The origin must provide the number of current candidates and votes of the reported target + * for the purpose of accurate weight calculation. + * + * # + * No Base weight based on min square analysis. + * Complexity of candidate_count: 1.755 µs + * Complexity of vote_count: 18.51 µs + * State reads: + * - Voting(reporter) + * - Candidate.len() + * - Voting(Target) + * - Candidates, Members, RunnersUp (is_defunct_voter) + * State writes: + * - Lock(reporter || target) + * - [AccountBalance(reporter)] + AccountBalance(target) + * - Voting(reporter || target) + * Note: the db access is worse with respect to db, which is when the report is correct. + * # + */ +export interface ElectionsPhragmenCall_report_defunct_voter { + __kind: 'report_defunct_voter' + defunct: DefunctVoter +} + +/** + * Submit oneself for candidacy. + * + * A candidate will either: + * - Lose at the end of the term and forfeit their deposit. + * - Win and become a member. Members will eventually get their stash back. + * - Become a runner-up. Runners-ups are reserved members in case one gets forcefully + * removed. + * + * # + * Base weight = 33.33 µs + * Complexity of candidate_count: 0.375 µs + * State reads: + * - Candidates.len() + * - Candidates + * - Members + * - RunnersUp + * - [AccountBalance(who)] + * State writes: + * - [AccountBalance(who)] + * - Candidates + * # + */ +export interface ElectionsPhragmenCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a bond amount is + * reserved. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * It is the responsibility of the caller to not place all of their balance into the lock + * and keep some for further transactions. + * + * # + * Base weight: 47.93 µs + * State reads: + * - Candidates.len() + Members.len() + RunnersUp.len() + * - Voting (is_voter) + * - [AccountBalance(who) (unreserve + total_balance)] + * State writes: + * - Voting + * - Lock + * - [AccountBalance(who) (unreserve -- only when creating a new voter)] + * # + */ +export interface ElectionsPhragmenCall_vote { + __kind: 'vote' + votes: AccountId[] + value: bigint +} + +export interface DefunctVoter { + who: AccountId + voteCount: number + candidateCount: number +} + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +export type DemocracyCall = DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * # + * - `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + * - Db reads: `scheduler lookup`, scheduler agenda` + * - Db writes: `scheduler lookup`, scheduler agenda` + * - Base Weight: 36.78 + 3.277 * D µs + * # + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: ReferendumIndex +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # + * - Complexity: `O(1)`. + * - Db writes: `ReferendumInfoOf` + * - Base Weight: 21.57 µs + * # + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * # + * - `O(1)`. + * - Db writes: `PublicProps` + * - Base Weight: 2.505 µs + * # + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must + * not be more than the account's current balance. + * + * Emits `Delegated`. + * + * # + * - Complexity: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + * - Db reads: 2*`VotingOf`, `balances locks` + * - Db writes: 2*`VotingOf`, `balances locks` + * - Db reads per votes: `ReferendumInfoOf` + * - Db writes per votes: `ReferendumInfoOf` + * - Base Weight: 65.78 + 8.229 * R µs + * # + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId + conviction: Conviction + balance: BalanceOf +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * # + * - Complexity: `O(1)`. + * - Db reads: `ReferendumInfoOf`, `Cancellations` + * - Db writes: `ReferendumInfoOf`, `Cancellations` + * ------------- + * - Base Weight: 34.25 µs + * # + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: ReferendumIndex +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: Hash + index: ReferendumIndex +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * # + * - Complexity `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + * - Db reads: `NextExternal`, `Blacklist` + * - Db writes: `NextExternal` + * - Base Weight: 13.8 + .106 * V µs + * # + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: Hash +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * # + * - Complexity: `O(1)` + * - Db write: `NextExternal` + * - Base Weight: 3.087 µs + * # + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: Hash +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * # + * - Complexity: `O(1)` + * - Db write: `NextExternal` + * - Base Weight: 3.065 µs + * # + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: Hash +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * `FastTrackVotingPeriod` if too low. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * # + * - Complexity: `O(1)` + * - Db reads: `NextExternal`, `ReferendumCount` + * - Db writes: `NextExternal`, `ReferendumCount`, `ReferendumInfoOf` + * - Base Weight: 30.1 µs + * # + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: Hash + votingPeriod: BlockNumber + delay: BlockNumber +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * # + * see `weight_for::note_preimage` + * # + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * # + * see `weight_for::note_preimage` + * # + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * # + * - Complexity: `O(1)` + * - Db reads: `PublicPropCount`, `PublicProps` + * - Db writes: `PublicPropCount`, `PublicProps`, `DepositOf` + * ------------------- + * Base Weight: 42.58 + .127 * P µs with `P` the number of proposals `PublicProps` + * # + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: Hash + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. + * Extrinsic is weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * # + * - Complexity: `O(D)` where D is length of proposal. + * - Db reads: `Preimages` + * - Db writes: `Preimages` + * - Base Weight: 39.31 + .003 * b µs + * # + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: Hash + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * # + * - `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + * - Db reads: `ReferendumInfoOf`, `VotingOf` + * - Db writes: `ReferendumInfoOf`, `VotingOf` + * - Base Weight: 19.15 + .372 * R + * # + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId + index: ReferendumIndex +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * # + * - `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + * - Db reads: `ReferendumInfoOf`, `VotingOf` + * - Db writes: `ReferendumInfoOf`, `VotingOf` + * - Base Weight: 21.03 + .359 * R + * # + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: ReferendumIndex +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * # + * - Complexity: `O(S)` where S is the number of seconds a proposal already has. + * - Db reads: `DepositOf` + * - Db writes: `DepositOf` + * --------- + * - Base Weight: 22.28 + .229 * S µs + * # + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * # + * - Complexity: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + * - Db reads: 2*`VotingOf` + * - Db writes: 2*`VotingOf` + * - Db reads per votes: `ReferendumInfoOf` + * - Db writes per votes: `ReferendumInfoOf` + * - Base Weight: 33.29 + 8.104 * R µs + * # + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * # + * - Complexity `O(R)` with R number of vote of target. + * - Db reads: `VotingOf`, `balances locks`, `target account` + * - Db writes: `VotingOf`, `balances locks`, `target account` + * - Base Weight: + * - Unlock Remove: 42.96 + .048 * R + * - Unlock Set: 37.63 + .327 * R + * # + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * # + * - Complexity: `O(V + log(V))` where V is number of `existing vetoers` + * Performs a binary search on `existing_vetoers` which should not be very large. + * - Db reads: `NextExternal`, `Blacklist` + * - Db writes: `NextExternal`, `Blacklist` + * - Base Weight: 29.87 + .188 * V µs + * # + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: Hash +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * # + * - Complexity: `O(R)` where R is the number of referendums the voter has voted on. + * weight is charged as if maximum votes. + * - Db reads: `ReferendumInfoOf`, `VotingOf`, `balances locks` + * - Db writes: `ReferendumInfoOf`, `VotingOf`, `balances locks` + * -------------------- + * - Base Weight: + * - Vote New: 49.24 + .333 * R µs + * - Vote Existing: 49.94 + .343 * R µs + * # + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + value: AccountVoteSplit +} + +export interface AccountVote_Standard { + __kind: 'Standard' + value: AccountVoteStandard +} + +export interface AccountVoteStandard { + vote: Vote + balance: Balance +} + +export type Vote = number + +export interface AccountVoteSplit { + aye: Balance + nay: Balance +} + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +export type ReferendumIndex = number + +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * Base Weight: .49 * P + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MAX_MEMBERS` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export type MemberCount = number + +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * Total Complexity: O(1) + * ---------------------------- + * Base Weight: 93.3 µs + * DB Weight: + * - Read: Preclaims, Signing, Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + * - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting, Signing, Preclaims + * Validate PreValidateAttests: +8.631 µs + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * - One `eth_recover` operation which involves a keccak hash and a + * ecdsa recover. + * - Three storage reads to check if a claim exists for the user, to + * get the current pot size, to see if there exists a vesting schedule. + * - Up to one storage write for adding a new vesting schedule. + * - One `deposit_creating` Currency call. + * - One storage write to update the total. + * - Two storage removals for vesting and claims information. + * - One deposit event. + * + * Total Complexity: O(1) + * ---------------------------- + * Base Weight: 269.7 µs + * DB Weight: + * - Read: Signing, Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + * - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting, Signing + * Validate Unsigned: +188.7 µs + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * - One `eth_recover` operation which involves a keccak hash and a + * ecdsa recover. + * - Four storage reads to check if a claim exists for the user, to + * get the current pot size, to see if there exists a vesting schedule, to get the + * required statement. + * - Up to one storage write for adding a new vesting schedule. + * - One `deposit_creating` Currency call. + * - One storage write to update the total. + * - Two storage removals for vesting and claims information. + * - One deposit event. + * + * Total Complexity: O(1) + * ---------------------------- + * Base Weight: 270.2 µs + * DB Weight: + * - Read: Signing, Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + * - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting, Signing + * Validate Unsigned: +190.1 µs + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * - One storage mutate to increase the total claims available. + * - One storage write to add a new claim. + * - Up to one storage write to add a new vesting schedule. + * + * Total Complexity: O(1) + * --------------------- + * Base Weight: 10.46 µs + * DB Weight: + * - Reads: Total + * - Writes: Total, Claims + * - Maybe Write: Vesting, Statement + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: BalanceOf + vestingSchedule?: ([BalanceOf, BalanceOf, BlockNumber] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId | undefined) +} + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is + * not assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: LookupSource + dest: LookupSource + value: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also decrease the total issuance of the system (`TotalIssuance`). + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + * + * # + * - Independent of the arguments. + * - Contains a limited number of reads and writes. + * --------------------- + * - Base Weight: + * - Creating: 27.56 µs + * - Killing: 35.11 µs + * - DB Weight: 1 Read, 1 Write to `who` + * # + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: LookupSource + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * It will decrease the total issuance of the system by the `TransferFee`. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for + * input config types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional + * check that the transfer will not kill the origin account. + * --------------------------------- + * - Base Weight: 73.64 µs, worst case scenario (account created, account removed) + * - DB Weight: 1 Read and 1 Write to destination account + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: LookupSource + value: bigint +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Module.html#method.transfer + * # + * - Cheaper than transfer because account cannot be killed. + * - Base Weight: 51.4 µs + * - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already) + * # + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: LookupSource + value: bigint +} + +export type BabeCall = never + +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +export interface Header { + parentHash: Hash + number: number + stateRoot: Hash + extrinsicsRoot: Hash + digest: Digest +} + +export interface Digest { + logs: DigestItem[] +} + +export type DigestItem = DigestItem_AuthoritiesChange | DigestItem_ChangesTrieRoot | DigestItem_ChangesTrieSignal | DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal | DigestItem_SealV0 + +export interface DigestItem_AuthoritiesChange { + __kind: 'AuthoritiesChange' + value: AuthorityId[] +} + +export interface DigestItem_ChangesTrieRoot { + __kind: 'ChangesTrieRoot' + value: Hash +} + +export interface DigestItem_ChangesTrieSignal { + __kind: 'ChangesTrieSignal' + value: ChangesTrieSignal +} + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: Consensus +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: PreRuntime +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: Seal +} + +export interface DigestItem_SealV0 { + __kind: 'SealV0' + value: SealV0 +} + +export type SealV0 = [bigint, Signature] + +export type Seal = [ConsensusEngineId, Bytes] + +export type PreRuntime = [ConsensusEngineId, Bytes] + +export type Consensus = [ConsensusEngineId, Bytes] + +export type ConsensusEngineId = Bytes + +export type ChangesTrieSignal = ChangesTrieSignal_NewConfiguration + +export interface ChangesTrieSignal_NewConfiguration { + __kind: 'NewConfiguration' + value?: (ChangesTrieConfiguration | undefined) +} + +export type AuthorityDiscoveryCall = never + +export type AttestationsCall = AttestationsCall_more_attestations + +/** + * Provide candidate receipts for parachains, in ascending order by id. + */ +export interface AttestationsCall_more_attestations { + __kind: 'more_attestations' +} + +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * Base Weight: .49 * P + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MAX_MEMBERS` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: Key, + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => Key), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + set_changes_trie_config: sts.enumStruct({ + changesTrieConfig: sts.option(() => ChangesTrieConfiguration), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => KeyValue), + }), + suicide: sts.unit(), + } +}) + +export const KeyValue = sts.tuple(() => [StorageKey, StorageData]) + +export const StorageData = sts.bytes() + +export const StorageKey = sts.bytes() + +export const ChangesTrieConfiguration: sts.Type = sts.struct(() => { + return { + digestInterval: sts.number(), + digestLevels: sts.number(), + } +}) + +export const Key = sts.bytes() + +export const Perbill = sts.number() + +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: LookupSource, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: EraIndex, + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => LookupSource), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId, + era: EraIndex, + }), + reap_stash: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: LookupSource, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + validators: sts.array(() => AccountId), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + submit_election_solution: sts.enumStruct({ + winners: sts.array(() => ValidatorIndex), + compact: CompactAssignments, + score: ElectionScore, + era: EraIndex, + size: ElectionSize, + }), + submit_election_solution_unsigned: sts.enumStruct({ + winners: sts.array(() => ValidatorIndex), + compact: CompactAssignments, + score: ElectionScore, + era: EraIndex, + size: ElectionSize, + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + } +}) + +export const ElectionSize: sts.Type = sts.struct(() => { + return { + validators: sts.number(), + nominators: sts.number(), + } +}) + +export const ElectionScore = sts.array(() => sts.bigint()) + +export const CompactAssignments: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes2: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes3: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes4: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes5: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes6: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes7: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes8: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes9: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes10: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes11: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes12: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes13: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes14: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes15: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes16: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + } +}) + +export const CompactScore = sts.tuple(() => [ValidatorIndex, OffchainAccuracy]) + +export const OffchainAccuracy = sts.number() + +export const NominatorIndex = sts.number() + +export const ValidatorIndex = sts.number() + +export const Percent = sts.number() + +export const EraIndex = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: BalanceOf, + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId, + judgement: SocietyJudgement, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: LookupSource, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId, + value: BalanceOf, + tip: BalanceOf, + }), + } +}) + +export const SocietyJudgement: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + sub: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + bid_renew: sts.enumStruct({ + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + elaborate_deploy_data: sts.enumStruct({ + paraId: sts.number(), + code: ValidationCode, + }), + fix_deploy_data: sts.enumStruct({ + sub: sts.number(), + paraId: sts.number(), + codeHash: Hash, + codeSize: sts.number(), + initialHeadData: HeadData, + }), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + set_offboarding: sts.enumStruct({ + dest: LookupSource, + }), + } +}) + +export const HeadData = sts.bytes() + +export const ValidationCode = sts.bytes() + +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: Keys, + proof: sts.bytes(), + }), + } +}) + +export const Keys = sts.tuple(() => [AccountId, AccountId, AccountId, AccountId, AccountId]) + +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: BlockNumber, + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_190, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_190, + }), + } +}) + +export const Priority = sts.number() + +export const Period = sts.tuple(() => [BlockNumber, sts.number()]) + +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + deregister_para: sts.enumStruct({ + id: sts.number(), + }), + deregister_parathread: sts.unit(), + register_para: sts.enumStruct({ + id: sts.number(), + info: ParaInfo, + code: ValidationCode, + initialHeadData: HeadData, + }), + register_parathread: sts.enumStruct({ + code: ValidationCode, + initialHeadData: HeadData, + }), + select_parathread: sts.enumStruct({ + id: sts.number(), + collator: CollatorId, + headHash: Hash, + }), + set_thread_count: sts.enumStruct({ + count: sts.number(), + }), + swap: sts.enumStruct({ + other: sts.number(), + }), + } +}) + +export const CollatorId = sts.bytes() + +export const ParaInfo: sts.Type = sts.struct(() => { + return { + manager: AccountId, + deposit: Balance, + locked: sts.boolean(), + } +}) + +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId, + call: Type_190, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId, + }), + claim_recovery: sts.enumStruct({ + account: AccountId, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId), + threshold: sts.number(), + delayPeriod: BlockNumber, + }), + initiate_recovery: sts.enumStruct({ + account: AccountId, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + } +}) + +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + proxy: AccountId, + proxyType: ProxyType, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_190, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + proxy: AccountId, + proxyType: ProxyType, + }), + } +}) + +export const ParachainsCall: sts.Type = sts.closedEnum(() => { + return { + report_double_vote: sts.enumStruct({ + report: DoubleVoteReport, + }), + send_xcmp_message: sts.enumStruct({ + to: ParaId, + msg: sts.bytes(), + }), + set_heads: sts.enumStruct({ + heads: sts.array(() => AttestedCandidate), + }), + transfer_to_parachain: sts.enumStruct({ + to: ParaId, + amount: Balance, + remark: Remark, + }), + } +}) + +export const Remark = sts.bytes() + +export const AttestedCandidate: sts.Type = sts.struct(() => { + return { + candidate: AbridgedCandidateReceipt, + validityVotes: sts.array(() => ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: ValidatorSignature, + Implicit: ValidatorSignature, + Never: sts.unit(), + } +}) + +export const ValidatorSignature = sts.bytes() + +export const AbridgedCandidateReceipt: sts.Type = sts.struct(() => { + return { + parachainIndex: ParaId, + relayParent: Hash, + headData: HeadData, + collator: CollatorId, + signature: CollatorSignature, + povBlockHash: Hash, + commitments: CandidateCommitments, + } +}) + +export const CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => UpwardMessage), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: BlockNumber, + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: sts.number(), + data: sts.bytes(), + } +}) + +export const UpwardMessage = sts.bytes() + +export const CollatorSignature = sts.bytes() + +export const ParaId = sts.number() + +export const DoubleVoteReport: sts.Type = sts.struct(() => { + return { + identity: ValidatorId, + first: sts.tuple(() => [Statement, ValidatorSignature]), + second: sts.tuple(() => [Statement, ValidatorSignature]), + proof: MembershipProof, + signingContext: SigningContext, + } +}) + +export const SigningContext: sts.Type = sts.struct(() => { + return { + sessionIndex: SessionIndex, + parentHash: Hash, + } +}) + +export const SessionIndex = sts.number() + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: SessionIndex, + trieNodes: sts.array(() => sts.bytes()), + validatorCount: ValidatorCount, + } +}) + +export const ValidatorCount = sts.number() + +export const Statement: sts.Type = sts.closedEnum(() => { + return { + Candidate: Hash, + Invalid: Hash, + Never: sts.unit(), + Valid: Hash, + } +}) + +export const ValidatorId = sts.bytes() + +export const OffencesCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + call: sts.bytes(), + storeCall: sts.boolean(), + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId), + call: Type_190, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const Weight = sts.bigint() + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: BlockNumber, + index: sts.number(), + } +}) + +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: AccountIndex, + }), + force_transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: AccountIndex, + }), + freeze: sts.enumStruct({ + index: AccountIndex, + }), + transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + }), + } +}) + +export const AccountIndex = sts.number() + +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: Signature, + }), + } +}) + +export const Signature = sts.bytes() + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: BlockNumber, + networkState: OpaqueNetworkState, + sessionIndex: SessionIndex, + authorityIndex: AuthIndex, + validatorsLen: sts.number(), + } +}) + +export const AuthIndex = sts.number() + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId, + }), + cancel_request: sts.enumStruct({ + regIndex: RegistrarIndex, + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: LookupSource, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: LookupSource, + judgement: IdentityJudgement, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: sts.bigint(), + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId, Data])), + }), + } +}) + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: H256, + Keccak256: H256, + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: H256, + ShaThree256: H256, + } +}) + +export const H256 = sts.bytes() + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => IdentityInfoAdditional), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => H160), + image: Data, + twitter: Data, + } +}) + +export const H160 = sts.bytes() + +export const IdentityInfoAdditional = sts.tuple(() => [Data, Data]) + +export const IdentityJudgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: Balance, + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export const RegistrarIndex = sts.number() + +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + report_equivocation: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const KeyOwnerProof: sts.Type = sts.struct(() => { + return { + session: SessionIndex, + trieNodes: sts.array(() => sts.bytes()), + validatorCount: ValidatorCount, + } +}) + +export const GrandpaEquivocationProof: sts.Type = sts.struct(() => { + return { + setId: SetId, + equivocation: GrandpaEquivocation, + } +}) + +export const GrandpaEquivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: GrandpaEquivocationValue, + Prevote: GrandpaEquivocationValue, + } +}) + +export const GrandpaEquivocationValue: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: AuthorityId, + first: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + second: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + } +}) + +export const AuthoritySignature = sts.bytes() + +export const GrandpaPrevote: sts.Type = sts.struct(() => { + return { + targetHash: Hash, + targetNumber: BlockNumber, + } +}) + +export const AuthorityId = sts.bytes() + +export const SetId = sts.bigint() + +export const FinalityTrackerCall: sts.Type = sts.closedEnum(() => { + return { + final_hint: sts.enumStruct({ + hint: sts.number(), + }), + } +}) + +export const ElectionsPhragmenCall: sts.Type = sts.closedEnum(() => { + return { + remove_member: sts.enumStruct({ + who: LookupSource, + hasReplacement: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + report_defunct_voter: sts.enumStruct({ + defunct: DefunctVoter, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId), + value: sts.bigint(), + }), + } +}) + +export const DefunctVoter: sts.Type = sts.struct(() => { + return { + who: AccountId, + voteCount: sts.number(), + candidateCount: sts.number(), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + cancel_queued: sts.enumStruct({ + which: ReferendumIndex, + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId, + conviction: Conviction, + balance: BalanceOf, + }), + emergency_cancel: sts.enumStruct({ + refIndex: ReferendumIndex, + }), + enact_proposal: sts.enumStruct({ + proposalHash: Hash, + index: ReferendumIndex, + }), + external_propose: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_default: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: Hash, + }), + fast_track: sts.enumStruct({ + proposalHash: Hash, + votingPeriod: BlockNumber, + delay: BlockNumber, + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: Hash, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: Hash, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId, + index: ReferendumIndex, + }), + remove_vote: sts.enumStruct({ + index: ReferendumIndex, + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId, + }), + veto_external: sts.enumStruct({ + proposalHash: Hash, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: AccountVoteSplit, + Standard: AccountVoteStandard, + } +}) + +export const AccountVoteStandard: sts.Type = sts.struct(() => { + return { + vote: Vote, + balance: Balance, + } +}) + +export const Vote = sts.number() + +export const AccountVoteSplit: sts.Type = sts.struct(() => { + return { + aye: Balance, + nay: Balance, + } +}) + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export const ReferendumIndex = sts.number() + +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: BalanceOf, + vestingSchedule: sts.option(() => sts.tuple(() => [BalanceOf, BalanceOf, BlockNumber])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: LookupSource, + dest: LookupSource, + value: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: LookupSource, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + } +}) + +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: Hash, + number: sts.number(), + stateRoot: Hash, + extrinsicsRoot: Hash, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + AuthoritiesChange: sts.array(() => AuthorityId), + ChangesTrieRoot: Hash, + ChangesTrieSignal: ChangesTrieSignal, + Consensus: Consensus, + Other: sts.bytes(), + PreRuntime: PreRuntime, + RuntimeEnvironmentUpdated: sts.unit(), + Seal: Seal, + SealV0: SealV0, + } +}) + +export const SealV0 = sts.tuple(() => [sts.bigint(), Signature]) + +export const Seal = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const PreRuntime = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const Consensus = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const ConsensusEngineId = sts.bytes() + +export const ChangesTrieSignal: sts.Type = sts.closedEnum(() => { + return { + NewConfiguration: sts.option(() => ChangesTrieConfiguration), + } +}) + +export const AuthorityDiscoveryCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const AttestationsCall: sts.Type = sts.closedEnum(() => { + return { + more_attestations: sts.unit(), + } +}) + +export type Type_190 = Type_190_Attestations | Type_190_AuthorityDiscovery | Type_190_Authorship | Type_190_Babe | Type_190_Balances | Type_190_Claims | Type_190_Council | Type_190_Democracy | Type_190_ElectionsPhragmen | Type_190_FinalityTracker | Type_190_Grandpa | Type_190_Identity | Type_190_ImOnline | Type_190_Indices | Type_190_Multisig | Type_190_Offences | Type_190_Parachains | Type_190_Proxy | Type_190_Recovery | Type_190_Registrar | Type_190_Scheduler | Type_190_Session | Type_190_Slots | Type_190_Society | Type_190_Staking | Type_190_System | Type_190_TechnicalCommittee | Type_190_TechnicalMembership | Type_190_Timestamp | Type_190_Treasury | Type_190_Utility | Type_190_Vesting + +export interface Type_190_Attestations { + __kind: 'Attestations' + value: AttestationsCall +} + +export interface Type_190_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Type_190_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Type_190_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Type_190_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Type_190_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Type_190_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Type_190_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Type_190_ElectionsPhragmen { + __kind: 'ElectionsPhragmen' + value: ElectionsPhragmenCall +} + +export interface Type_190_FinalityTracker { + __kind: 'FinalityTracker' + value: FinalityTrackerCall +} + +export interface Type_190_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Type_190_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Type_190_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Type_190_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Type_190_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Type_190_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Type_190_Parachains { + __kind: 'Parachains' + value: ParachainsCall +} + +export interface Type_190_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Type_190_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Type_190_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Type_190_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Type_190_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Type_190_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Type_190_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Type_190_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Type_190_System { + __kind: 'System' + value: SystemCall +} + +export interface Type_190_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Type_190_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Type_190_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Type_190_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Type_190_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Type_190_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId = sts.bytes() diff --git a/squid/src/types/v2015.ts b/squid/src/types/v2015.ts new file mode 100644 index 00000000..706a31cd --- /dev/null +++ b/squid/src/types/v2015.ts @@ -0,0 +1,6938 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Type_192: sts.Type = sts.closedEnum(() => { + return { + Attestations: AttestationsCall, + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Democracy: DemocracyCall, + ElectionsPhragmen: ElectionsPhragmenCall, + FinalityTracker: FinalityTrackerCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + Parachains: ParachainsCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + } +}) + +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: LookupSource, + target: LookupSource, + schedule: VestingInfo, + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: LookupSource, + }), + vested_transfer: sts.enumStruct({ + target: LookupSource, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: Balance, + perBlock: Balance, + startingBlock: BlockNumber, + } +}) + +export const BlockNumber = sts.number() + +export const Balance = sts.bigint() + +export interface VestingInfo { + locked: Balance + perBlock: Balance + startingBlock: BlockNumber +} + +export type BlockNumber = number + +export type Balance = bigint + +export const LookupSource = sts.bytes() + +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * - Benchmark: 100.3 + .365 * l µs (min square analysis) + * - Using 100 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks. + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: LookupSource + target: LookupSource + schedule: VestingInfo +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this module. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * - Benchmark: + * - Unlocked: 48.76 + .048 * l µs (min square analysis) + * - Locked: 44.43 + .284 * l µs (min square analysis) + * - Using 50 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks. + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this module. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * - Benchmark: + * - Unlocked: 44.3 + .294 * l µs (min square analysis) + * - Locked: 48.16 + .103 * l µs (min square analysis) + * - Using 50 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks. + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: LookupSource +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Benchmark: 100.3 + .365 * l µs (min square analysis) + * - Using 100 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks. + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: LookupSource + schedule: VestingInfo +} + +export type LookupSource = Bytes + +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Type_192, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Type_192), + }), + } +}) + +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + * + * # + * - Base weight: 2.861 µs + * - Plus the weight of the `call` + * # + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Type_192 +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Trait::BaseCallFilter`). + * + * # + * - Base weight: 14.39 + .987 * c µs + * - Plus the sum of the weights of the `calls`. + * - Plus one additional event. (repeat read/write) + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Type_192[] +} + +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + close_tip: sts.enumStruct({ + hash: Hash, + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: LookupSource, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + }), + retract_tip: sts.enumStruct({ + hash: Hash, + }), + tip: sts.enumStruct({ + hash: Hash, + tipValue: BalanceOf, + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + tipValue: BalanceOf, + }), + } +}) + +export const BalanceOf = sts.bigint() + +export const Hash = sts.bytes() + +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_close_tip | TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_report_awesome | TreasuryCall_retract_tip | TreasuryCall_tip | TreasuryCall_tip_new + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`. + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TreasuryCall_close_tip { + __kind: 'close_tip' + hash: Hash +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: LookupSource +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `TipReportDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips`, `who account data` + * - DbWrites: `Tips`, `who account data` + * # + */ +export interface TreasuryCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TreasuryCall_retract_tip { + __kind: 'retract_tip' + hash: Hash +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`, insert tip and check closing, + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TreasuryCall_tip { + __kind: 'tip' + hash: Hash + tipValue: BalanceOf +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T` + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TreasuryCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId + tipValue: BalanceOf +} + +export type BalanceOf = bigint + +export type AccountId = Bytes + +export type Hash = Bytes + +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(T)` where `T` complexity of `on_timestamp_set` + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in `on_finalize`) + * - 1 event handler `on_timestamp_set` `O(T)`. + * - Benchmark: 7.678 (min squares analysis) + * - NOTE: This benchmark was done for a runtime with insignificant `on_timestamp_set` handlers. + * New benchmarking is needed when adding new handlers. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId, + }), + change_key: sts.enumStruct({ + new: AccountId, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId), + }), + set_prime: sts.enumStruct({ + who: AccountId, + }), + swap_member: sts.enumStruct({ + remove: AccountId, + add: AccountId, + }), + } +}) + +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId + add: AccountId +} + +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const MemberCount = sts.number() + +export const Proposal: sts.Type = sts.closedEnum(() => { + return { + Attestations: AttestationsCall, + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Democracy: DemocracyCall, + ElectionsPhragmen: ElectionsPhragmenCall, + FinalityTracker: FinalityTrackerCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + Parachains: ParachainsCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + } +}) + +export type Proposal = Proposal_Attestations | Proposal_AuthorityDiscovery | Proposal_Authorship | Proposal_Babe | Proposal_Balances | Proposal_Claims | Proposal_Council | Proposal_Democracy | Proposal_ElectionsPhragmen | Proposal_FinalityTracker | Proposal_Grandpa | Proposal_Identity | Proposal_ImOnline | Proposal_Indices | Proposal_Multisig | Proposal_Offences | Proposal_Parachains | Proposal_Proxy | Proposal_Recovery | Proposal_Registrar | Proposal_Scheduler | Proposal_Session | Proposal_Slots | Proposal_Society | Proposal_Staking | Proposal_System | Proposal_TechnicalCommittee | Proposal_TechnicalMembership | Proposal_Timestamp | Proposal_Treasury | Proposal_Utility | Proposal_Vesting + +export interface Proposal_Attestations { + __kind: 'Attestations' + value: AttestationsCall +} + +export interface Proposal_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Proposal_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Proposal_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Proposal_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Proposal_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Proposal_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Proposal_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Proposal_ElectionsPhragmen { + __kind: 'ElectionsPhragmen' + value: ElectionsPhragmenCall +} + +export interface Proposal_FinalityTracker { + __kind: 'FinalityTracker' + value: FinalityTrackerCall +} + +export interface Proposal_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Proposal_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Proposal_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Proposal_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Proposal_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Proposal_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Proposal_Parachains { + __kind: 'Parachains' + value: ParachainsCall +} + +export interface Proposal_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Proposal_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Proposal_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Proposal_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Proposal_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Proposal_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Proposal_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Proposal_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Proposal_System { + __kind: 'System' + value: SystemCall +} + +export interface Proposal_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Proposal_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Proposal_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Proposal_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Proposal_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Proposal_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_set_changes_trie_config | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage | SystemCall_suicide + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + * + * # + * - `O(P)` where `P` amount of keys with prefix `prefix` + * - `P` storage deletions. + * - Base Weight: 0.834 * P µs + * - Writes: Number of subkeys + 1 + * # + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Key + subkeys: number +} + +/** + * Kill some items from storage. + * + * # + * - `O(IK)` where `I` length of `keys` and `K` length of one key + * - `I` storage deletions. + * - Base Weight: .378 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Key[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * - Base Weight: 0.665 µs, independent of remark length. + * - No DB operations. + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Set the new changes trie configuration. + * + * # + * - `O(1)` + * - 1 storage write or delete (codec `O(1)`). + * - 1 call to `deposit_log`: Uses `append` API, so O(1) + * - Base Weight: 7.218 µs + * - DB Weight: + * - Writes: Changes Trie, System Digest + * # + */ +export interface SystemCall_set_changes_trie_config { + __kind: 'set_changes_trie_config' + changesTrieConfig?: (ChangesTrieConfiguration | undefined) +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 storage write (codec `O(C)`). + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is expensive). + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very expensive. + * We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + * + * # + * - `O(1)` + * - 1 storage write. + * - Base Weight: 1.405 µs + * - 1 write to HEAP_PAGES + * # + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + * + * # + * - `O(I)` where `I` length of `items` + * - `I` storage writes (`O(1)`). + * - Base Weight: 0.568 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: KeyValue[] +} + +/** + * Kill the sending account, assuming there are no references outstanding and the composite + * data is equal to its default value. + * + * # + * - `O(1)` + * - 1 storage read and deletion. + * -------------------- + * Base Weight: 8.626 µs + * No DB Read or Write operations because caller is already in overlay + * # + */ +export interface SystemCall_suicide { + __kind: 'suicide' +} + +export type KeyValue = [StorageKey, StorageData] + +export type StorageData = Bytes + +export type StorageKey = Bytes + +export interface ChangesTrieConfiguration { + digestInterval: number + digestLevels: number +} + +export type Key = Bytes + +export type Perbill = number + +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_validator_count | StakingCall_submit_election_solution | StakingCall_submit_election_solution_unsigned | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * Base Weight: 67.87 µs + * DB Weight: + * - Read: Bonded, Ledger, [Origin Account], Current Era, History Depth, Locks + * - Write: Bonded, Payee, [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: LookupSource + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount + * that can be added. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller and + * it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * - One DB entry. + * ------------ + * Base Weight: 54.88 µs + * DB Weight: + * - Read: Era Election Status, Bonded, Ledger, [Origin Account], Locks + * - Write: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + * + * # + * Complexity: O(U + S) + * with U unapplied slashes weighted with U=1000 + * and S is the number of slash indices to be canceled. + * - Base: 5870 + 34.61 * S µs + * - Read: Unapplied Slashes + * - Write: Unapplied Slashes + * # + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: EraIndex + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * -------- + * Base Weight: 16.53 µs + * DB Weight: + * - Read: EraElectionStatus, Ledger + * - Write: Validators, Nominators + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Base Weight: 1.959 µs + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - Base Weight: 2.05 µs + * - Write: ForceEra + * # + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Base Weight: 1.857 µs + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + * + * # + * O(S) where S is the number of slashing spans to be removed + * Base Weight: 53.07 + 2.365 * S µs + * Reads: Bonded, Slashing Spans, Account, Locks + * Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Account, Locks + * Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Base Weight: 1.717 µs + * Read/Write: Validator Count + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. This can only be called when + * [`EraElectionStatus`] is `Closed`. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS). + * - Both the reads and writes follow a similar pattern. + * --------- + * Base Weight: 22.34 + .36 * N µs + * where N is the number of targets + * DB Weight: + * - Reads: Era Election Status, Ledger, Current Era + * - Writes: Validators, Nominators + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: LookupSource[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * This can only be called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Base Weight: + * - Reward Destination Staked: 110 + 54.2 * N µs (Median Slopes) + * - Reward Destination Controller (Creating): 120 + 41.95 * N µs (Median Slopes) + * DB Weight: + * - Read: EraElectionStatus, CurrentEra, HistoryDepth, ErasValidatorReward, + * ErasStakersClipped, ErasRewardPoints, ErasValidatorPrefs (8 items) + * - Read Each: Bonded, Ledger, Payee, Locks, System Account (5 items) + * - Write Each: System Account, Locks, Ledger (3 items) + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId + era: EraIndex +} + +/** + * Remove all data structure concerning a staker/stash once its balance is zero. + * This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone + * and the target `stash` must have no funds left. + * + * This can be called from any origin. + * + * - `stash`: The stash account to reap. Its balance must be zero. + * + * # + * Complexity: O(S) where S is the number of slashing spans on the account. + * Base Weight: 75.94 + 2.396 * S µs + * DB Weight: + * - Reads: Stash Account, Bonded, Slashing Spans, Locks + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Stash Account, Locks + * - Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller, and it can be only called when + * [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MAX_UNLOCKING_CHUNKS`. + * - Storage changes: Can't increase storage, only decrease it. + * --------------- + * - Base Weight: 34.51 µs * .048 L µs + * - DB Weight: + * - Reads: EraElectionStatus, Ledger, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Base Weight: 1.717 µs + * Read/Write: Validator Count + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Base Weight: 25.22 µs + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: LookupSource +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. + * This should report all the storage items that will be deleted by clearing old + * era history. Needed to report an accurate weight for the dispatch. Trusted by + * `Root` to report an accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Base Weight: 29.13 * E µs + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + * + * # + * - O(V) + * - Base Weight: 2.208 + .006 * V µs + * - Write: Invulnerables + * # + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + validators: AccountId[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Base Weight: 11.33 µs + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Base Weight: 1.717 µs + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Submit an election result to the chain. If the solution: + * + * 1. is valid. + * 2. has a better score than a potentially existing solution on chain. + * + * then, it will be _put_ on chain. + * + * A solution consists of two pieces of data: + * + * 1. `winners`: a flat vector of all the winners of the round. + * 2. `assignments`: the compact version of an assignment vector that encodes the edge + * weights. + * + * Both of which may be computed using _phragmen_, or any other algorithm. + * + * Additionally, the submitter must provide: + * + * - The `score` that they claim their solution has. + * + * Both validators and nominators will be represented by indices in the solution. The + * indices should respect the corresponding types ([`ValidatorIndex`] and + * [`NominatorIndex`]). Moreover, they should be valid when used to index into + * [`SnapshotValidators`] and [`SnapshotNominators`]. Any invalid index will cause the + * solution to be rejected. These two storage items are set during the election window and + * may be used to determine the indices. + * + * A solution is valid if: + * + * 0. It is submitted when [`EraElectionStatus`] is `Open`. + * 1. Its claimed score is equal to the score computed on-chain. + * 2. Presents the correct number of winners. + * 3. All indexes must be value according to the snapshot vectors. All edge values must + * also be correct and should not overflow the granularity of the ratio type (i.e. 256 + * or billion). + * 4. For each edge, all targets are actually nominated by the voter. + * 5. Has correct self-votes. + * + * A solutions score is consisted of 3 parameters: + * + * 1. `min { support.total }` for each support of a winner. This value should be maximized. + * 2. `sum { support.total }` for each support of a winner. This value should be minimized. + * 3. `sum { support.total^2 }` for each support of a winner. This value should be + * minimized (to ensure less variance) + * + * # + * See `crate::weight` module. + * # + */ +export interface StakingCall_submit_election_solution { + __kind: 'submit_election_solution' + winners: ValidatorIndex[] + compact: CompactAssignments + score: ElectionScore + era: EraIndex + size: ElectionSize +} + +/** + * Unsigned version of `submit_election_solution`. + * + * Note that this must pass the [`ValidateUnsigned`] check which only allows transactions + * from the local node to be included. In other words, only the block author can include a + * transaction in the block. + * + * # + * See `crate::weight` module. + * # + */ +export interface StakingCall_submit_election_solution_unsigned { + __kind: 'submit_election_solution_unsigned' + winners: ValidatorIndex[] + compact: CompactAssignments + score: ElectionScore + era: EraIndex + size: ElectionSize +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + * + * # + * - Independent of the arguments. Limited but potentially exploitable complexity. + * - Contains a limited number of reads. + * - Each call (requires the remainder of the bonded balance to be above `minimum_balance`) + * will cause a new entry to be inserted into a vector (`Ledger.unlocking`) kept in storage. + * The only way to clean the aforementioned storage item is also user-controlled via + * `withdraw_unbonded`. + * - One DB entry. + * ---------- + * Base Weight: 50.34 µs + * DB Weight: + * - Read: Era Election Status, Ledger, Current Era, Locks, [Origin Account] + * - Write: [Origin Account], Locks, Ledger + * + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ----------- + * Base Weight: 17.13 µs + * DB Weight: + * - Read: Era Election Status, Ledger + * - Write: Nominators, Validators + * # + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * - Could be dependent on the `origin` argument and how much `unlocking` chunks exist. + * It implies `consolidate_unlocked` which loops over `Ledger.unlocking`, which is + * indirectly user-controlled. See [`unbond`] for more detail. + * - Contains a limited number of reads, yet the size of which could be large based on `ledger`. + * - Writes are limited to the `origin` account key. + * --------------- + * Complexity O(S) where S is the number of slashing spans to remove + * Base Weight: + * Update: 50.52 + .028 * S µs + * - Reads: EraElectionStatus, Ledger, Current Era, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * Kill: 79.41 + 2.366 * S µs + * - Reads: EraElectionStatus, Ledger, Current Era, Bonded, Slashing Spans, [Origin Account], Locks + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, [Origin Account], Locks + * - Writes Each: SpanSlash * S + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +export interface ValidatorPrefs { + commission: number +} + +export interface ElectionSize { + validators: number + nominators: number +} + +export type ElectionScore = bigint[] + +export interface CompactAssignments { + votes1: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes2: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes3: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes4: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes5: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes6: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes7: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes8: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes9: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes10: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes11: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes12: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes13: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes14: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes15: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes16: [NominatorIndex, CompactScore[], ValidatorIndex][] +} + +export type CompactScore = [ValidatorIndex, OffchainAccuracy] + +export type OffchainAccuracy = number + +export type NominatorIndex = number + +export type ValidatorIndex = number + +export type Percent = number + +export type EraIndex = number + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: BalanceOf +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * module to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId + judgement: SocietyJudgement +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin + * forgives (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: LookupSource + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId + value: BalanceOf + tip: BalanceOf +} + +export type SocietyJudgement = SocietyJudgement_Approve | SocietyJudgement_Rebid | SocietyJudgement_Reject + +export interface SocietyJudgement_Approve { + __kind: 'Approve' +} + +export interface SocietyJudgement_Rebid { + __kind: 'Rebid' +} + +export interface SocietyJudgement_Reject { + __kind: 'Reject' +} + +export type SlotsCall = SlotsCall_bid | SlotsCall_bid_renew | SlotsCall_elaborate_deploy_data | SlotsCall_fix_deploy_data | SlotsCall_new_auction | SlotsCall_set_offboarding + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface SlotsCall_bid { + __kind: 'bid' + sub: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Make a new bid from a parachain account for renewing that (pre-existing) parachain. + * + * The origin *must* be a parachain account. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface SlotsCall_bid_renew { + __kind: 'bid_renew' + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Note a new parachain's code. + * + * This must be called after `fix_deploy_data` and `code` must be the preimage of the + * `code_hash` passed there for the same `para_id`. + * + * This may be called before or after the beginning of the parachain's first lease period. + * If called before then the parachain will become active at the first block of its + * starting lease period. If after, then it will become active immediately after this call. + * + * - `_origin` is irrelevant. + * - `para_id` is the parachain ID whose code will be elaborated. + * - `code` is the preimage of the registered `code_hash` of `para_id`. + */ +export interface SlotsCall_elaborate_deploy_data { + __kind: 'elaborate_deploy_data' + paraId: number + code: ValidationCode +} + +/** + * Set the deploy information for a successful bid to deploy a new parachain. + * + * - `origin` must be the successful bidder account. + * - `sub` is the sub-bidder ID of the bidder. + * - `para_id` is the parachain ID allotted to the winning bidder. + * - `code_hash` is the hash of the parachain's Wasm validation function. + * - `initial_head_data` is the parachain's initial head data. + */ +export interface SlotsCall_fix_deploy_data { + __kind: 'fix_deploy_data' + sub: number + paraId: number + codeHash: Hash + codeSize: number + initialHeadData: HeadData +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface SlotsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +/** + * Set the off-boarding information for a parachain. + * + * The origin *must* be a parachain account. + * + * - `dest` is the destination account to receive the parachain's deposit. + */ +export interface SlotsCall_set_offboarding { + __kind: 'set_offboarding' + dest: LookupSource +} + +export type HeadData = Bytes + +export type ValidationCode = Bytes + +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` in number of key types. + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwnder` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: Keys + proof: Bytes +} + +export type Keys = [AccountId, AccountId, AccountId, AccountId, AccountId] + +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.15 + 2.869 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: BlockNumber + index: number +} + +/** + * Cancel a named scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 24.91 + 2.907 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.29 + .126 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda + * - Will use base weight of 25 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_192 +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_192 +} + +/** + * Schedule a named task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 29.6 + .159 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 35 which should be good for more than 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_192 +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`]. + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_192 +} + +export type Priority = number + +export type Period = [BlockNumber, number] + +export type RegistrarCall = RegistrarCall_deregister_para | RegistrarCall_deregister_parathread | RegistrarCall_register_para | RegistrarCall_register_parathread | RegistrarCall_select_parathread | RegistrarCall_set_thread_count | RegistrarCall_swap + +/** + * Deregister a parachain with given id + */ +export interface RegistrarCall_deregister_para { + __kind: 'deregister_para' + id: number +} + +/** + * Deregister a parathread and retrieve the deposit. + * + * Must be sent from a `Parachain` origin which is currently a parathread. + * + * Ensure that before calling this that any funds you want emptied from the parathread's + * account is moved out; after this it will be impossible to retrieve them (without + * governance intervention). + */ +export interface RegistrarCall_deregister_parathread { + __kind: 'deregister_parathread' +} + +/** + * Register a parachain with given code. Must be called by root. + * Fails if given ID is already used. + * + * Unlike the `Registrar` trait function of the same name, this + * checks the code and head data against size limits. + */ +export interface RegistrarCall_register_para { + __kind: 'register_para' + id: number + info: ParaInfo + code: ValidationCode + initialHeadData: HeadData +} + +/** + * Register a parathread for immediate use. + * + * Must be sent from a Signed origin that is able to have ParathreadDeposit reserved. + * `code` and `initial_head_data` are used to initialize the parathread's state. + * + * Unlike `register_para`, this function does check that the maximum code size + * and head data size are respected, as parathread registration is an atomic + * action. + */ +export interface RegistrarCall_register_parathread { + __kind: 'register_parathread' + code: ValidationCode + initialHeadData: HeadData +} + +/** + * Place a bid for a parathread to be progressed in the next block. + * + * This is a kind of special transaction that should be heavily prioritized in the + * transaction pool according to the `value`; only `ThreadCount` of them may be presented + * in any single block. + */ +export interface RegistrarCall_select_parathread { + __kind: 'select_parathread' + id: number + collator: CollatorId + headHash: Hash +} + +/** + * Reset the number of parathreads that can pay to be scheduled in a single block. + * + * - `count`: The number of parathreads. + * + * Must be called from Root origin. + */ +export interface RegistrarCall_set_thread_count { + __kind: 'set_thread_count' + count: number +} + +/** + * Swap a parachain with another parachain or parathread. The origin must be a `Parachain`. + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + other: number +} + +export type CollatorId = Bytes + +export interface ParaInfo { + manager: AccountId + deposit: Balance + locked: boolean +} + +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + * + * # + * - The weight of the `call` + 10,000. + * - One storage lookup to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId + call: Type_192 +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + * + * # + * - One storage mutation to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully + * recovered by you. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + V) + * # + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + * + * # + * Key: V (len of vouching friends) + * - One storage read/remove to get the active recovery process. O(1), Codec O(V) + * - One balance call to repatriate reserved. O(X) + * - One event. + * + * Total Complexity: O(V + X) + * # + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. + * Should be ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt + * before the account can be recovered. Should be less than or equal to + * the length of the list of friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized + * that needs to pass before the account can be recovered. + * + * # + * - Key: F (len of friends) + * - One storage read to check that account is not already recoverable. O(1). + * - A check that the friends list is sorted and unique. O(F) + * - One currency reserve operation. O(X) + * - One storage write. O(1). Codec O(F). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId[] + threshold: number + delayPeriod: BlockNumber +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account + * needs to be recoverable (i.e. have a recovery configuration). + * + * # + * - One storage read to check that account is recoverable. O(F) + * - One storage read to check that this recovery process hasn't already started. O(1) + * - One currency reserve operation. O(X) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + * + * # + * Key: F (len of friends) + * - One storage read to get the prefix iterator for active recoveries. O(1) + * - One storage read/remove to get the recovery configuration. O(1), Codec O(F) + * - One balance call to unreserved. O(X) + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + * + * # + * - One storage write O(1) + * - One event + * # + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId + rescuer: AccountId +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you + * want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One binary search to confirm caller is a friend. O(logF) + * - One binary search to confirm caller has not already vouched. O(logV) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + logF + V + logV) + * # + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId + rescuer: AccountId +} + +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * + * # + * P is the number of proxies the user has + * - Base weight: 17.48 + .176 * P µs + * - DB weight: 1 storage read and write. + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + proxy: AccountId + proxyType: ProxyType +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * P is the number of proxies the user has + * - Base weight: 36.48 + .039 * P µs + * - DB weight: 1 storage read and write. + * # + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * P is the number of proxies the user has + * - Base weight: 15.65 + .137 * P µs + * - DB weight: 1 storage read and write. + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * P is the number of proxies the user has + * - Base weight: 19.87 + .141 * P µs + * - DB weight: 1 storage read. + * - Plus the weight of the `call` + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_192 +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * P is the number of proxies the user has + * - Base weight: 13.73 + .129 * P µs + * - DB weight: 1 storage read and write. + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * P is the number of proxies the user has + * - Base weight: 14.37 + .164 * P µs + * - DB weight: 1 storage read and write. + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + proxy: AccountId + proxyType: ProxyType +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +export type ParachainsCall = ParachainsCall_report_double_vote | ParachainsCall_send_xcmp_message | ParachainsCall_set_heads | ParachainsCall_transfer_to_parachain + +/** + * Provide a proof that some validator has commited a double-vote. + * + * The weight is 0; in order to avoid DoS a `SignedExtension` validation + * is implemented. + */ +export interface ParachainsCall_report_double_vote { + __kind: 'report_double_vote' + report: DoubleVoteReport +} + +/** + * Send a XCMP message to the given parachain. + * + * The origin must be another parachain. + */ +export interface ParachainsCall_send_xcmp_message { + __kind: 'send_xcmp_message' + to: ParaId + msg: Bytes +} + +/** + * Provide candidate receipts for parachains, in ascending order by id. + */ +export interface ParachainsCall_set_heads { + __kind: 'set_heads' + heads: AttestedCandidate[] +} + +/** + * Transfer some tokens into a parachain and leave a message in the downward queue for it. + */ +export interface ParachainsCall_transfer_to_parachain { + __kind: 'transfer_to_parachain' + to: ParaId + amount: Balance + remark: Remark +} + +export type Remark = Bytes + +export interface AttestedCandidate { + candidate: AbridgedCandidateReceipt + validityVotes: ValidityAttestation[] + validatorIndices: BitSequence +} + +export type ValidityAttestation = ValidityAttestation_Explicit | ValidityAttestation_Implicit | ValidityAttestation_Never + +export interface ValidityAttestation_Explicit { + __kind: 'Explicit' + value: ValidatorSignature +} + +export interface ValidityAttestation_Implicit { + __kind: 'Implicit' + value: ValidatorSignature +} + +export interface ValidityAttestation_Never { + __kind: 'Never' +} + +export type ValidatorSignature = Bytes + +export interface AbridgedCandidateReceipt { + parachainIndex: ParaId + relayParent: Hash + headData: HeadData + collator: CollatorId + signature: CollatorSignature + povBlockHash: Hash + commitments: CandidateCommitments +} + +export interface CandidateCommitments { + upwardMessages: UpwardMessage[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: BlockNumber +} + +export interface OutboundHrmpMessage { + recipient: number + data: Bytes +} + +export type UpwardMessage = Bytes + +export type CollatorSignature = Bytes + +export type ParaId = number + +export interface DoubleVoteReport { + identity: ValidatorId + first: [Statement, ValidatorSignature] + second: [Statement, ValidatorSignature] + proof: MembershipProof + signingContext: SigningContext +} + +export interface SigningContext { + sessionIndex: SessionIndex + parentHash: Hash +} + +export type SessionIndex = number + +export interface MembershipProof { + session: SessionIndex + trieNodes: Bytes[] + validatorCount: ValidatorCount +} + +export type ValidatorCount = number + +export type Statement = Statement_Candidate | Statement_Invalid | Statement_Never | Statement_Valid + +export interface Statement_Candidate { + __kind: 'Candidate' + value: Hash +} + +export interface Statement_Invalid { + __kind: 'Invalid' + value: Hash +} + +export interface Statement_Never { + __kind: 'Never' +} + +export interface Statement_Valid { + __kind: 'Valid' + value: Hash +} + +export type ValidatorId = Bytes + +export type OffencesCall = never + +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - Base Weight: + * - Create: 44.71 + 0.088 * S + * - Approve: 31.48 + 0.116 * S + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - Base Weight: + * - Create: 41.89 + 0.118 * S + .002 * Z µs + * - Create w/ Store: 53.57 + 0.119 * S + .003 * Z µs + * - Approve: 31.39 + 0.136 * S + .002 * Z µs + * - Complete: 39.94 + 0.26 * S + .002 * Z µs + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + call: OpaqueCall + storeCall: boolean + maxWeight: Weight +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - Base Weight: 33.72 + 0.002 * Z µs + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId[] + call: Type_192 +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - Base Weight: 36.07 + 0.124 * S + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId[] + timepoint: Timepoint + callHash: Bytes +} + +export type OpaqueCall = Bytes + +export type Weight = bigint + +export interface Timepoint { + height: BlockNumber + index: number +} + +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - Base Weight: 28.69 µs + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: AccountIndex +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - Base Weight: 26.83 µs + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId + index: AccountIndex + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - Base Weight: 25.53 µs + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: AccountIndex +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - Base Weight: 30.86 µs + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: AccountIndex +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - Base Weight: 33.74 µs + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId + index: AccountIndex +} + +export type AccountIndex = number + +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` and E is length of + * `Heartbeat.network_state.external_address` + * + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Signature +} + +export type Signature = Bytes + +export interface Heartbeat { + blockNumber: BlockNumber + networkState: OpaqueNetworkState + sessionIndex: SessionIndex + authorityIndex: AuthIndex + validatorsLen: number +} + +export type AuthIndex = number + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: LookupSource + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: RegistrarIndex +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: LookupSource +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: LookupSource + judgement: IdentityJudgement +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: LookupSource +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: LookupSource + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: bigint +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId, Data][] +} + +export interface IdentityInfo { + additional: IdentityInfoAdditional[] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (H160 | undefined) + image: Data + twitter: Data +} + +export type H160 = Bytes + +export type IdentityInfoAdditional = [Data, Data] + +export type IdentityJudgement = IdentityJudgement_Erroneous | IdentityJudgement_FeePaid | IdentityJudgement_KnownGood | IdentityJudgement_LowQuality | IdentityJudgement_OutOfDate | IdentityJudgement_Reasonable | IdentityJudgement_Unknown + +export interface IdentityJudgement_Erroneous { + __kind: 'Erroneous' +} + +export interface IdentityJudgement_FeePaid { + __kind: 'FeePaid' + value: Balance +} + +export interface IdentityJudgement_KnownGood { + __kind: 'KnownGood' +} + +export interface IdentityJudgement_LowQuality { + __kind: 'LowQuality' +} + +export interface IdentityJudgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface IdentityJudgement_Reasonable { + __kind: 'Reasonable' +} + +export interface IdentityJudgement_Unknown { + __kind: 'Unknown' +} + +export type RegistrarIndex = number + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: H256 +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: H256 +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: H256 +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: H256 +} + +export type H256 = Bytes + +export type GrandpaCall = GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface KeyOwnerProof { + session: SessionIndex + trieNodes: Bytes[] + validatorCount: ValidatorCount +} + +export interface GrandpaEquivocationProof { + setId: SetId + equivocation: GrandpaEquivocation +} + +export type GrandpaEquivocation = GrandpaEquivocation_Precommit | GrandpaEquivocation_Prevote + +export interface GrandpaEquivocation_Precommit { + __kind: 'Precommit' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocation_Prevote { + __kind: 'Prevote' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocationValue { + roundNumber: bigint + identity: AuthorityId + first: [GrandpaPrevote, AuthoritySignature] + second: [GrandpaPrevote, AuthoritySignature] +} + +export type AuthoritySignature = Bytes + +export interface GrandpaPrevote { + targetHash: Hash + targetNumber: BlockNumber +} + +export type AuthorityId = Bytes + +export type SetId = bigint + +export type FinalityTrackerCall = FinalityTrackerCall_final_hint + +/** + * Hint that the author of this block thinks the best finalized + * block is the given number. + */ +export interface FinalityTrackerCall_final_hint { + __kind: 'final_hint' + hint: number +} + +export type ElectionsPhragmenCall = ElectionsPhragmenCall_remove_member | ElectionsPhragmenCall_remove_voter | ElectionsPhragmenCall_renounce_candidacy | ElectionsPhragmenCall_report_defunct_voter | ElectionsPhragmenCall_submit_candidacy | ElectionsPhragmenCall_vote + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, a new phragmen election is started. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement: + * - Base weight: 50.93 µs + * - State reads: + * - RunnersUp.len() + * - Members, RunnersUp (remove_and_replace_member) + * - State writes: + * - Members, RunnersUp (remove_and_replace_member) + * Else, since this is a root call and will go into phragmen, we assume full block for now. + * # + */ +export interface ElectionsPhragmenCall_remove_member { + __kind: 'remove_member' + who: LookupSource + hasReplacement: boolean +} + +/** + * Remove `origin` as a voter. This removes the lock and returns the bond. + * + * # + * Base weight: 36.8 µs + * All state access is from do_remove_voter. + * State reads: + * - Voting + * - [AccountData(who)] + * State writes: + * - Voting + * - Locks + * - [AccountData(who)] + * # + */ +export interface ElectionsPhragmenCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * - `origin` is a candidate and not elected in any set. In this case, the bond is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the bond is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the bond is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_voter`], if replacement runners exists, they are immediately used. + * + * If a candidate is renouncing: + * Base weight: 17.28 µs + * Complexity of candidate_count: 0.235 µs + * State reads: + * - Candidates + * - [AccountBalance(who) (unreserve)] + * State writes: + * - Candidates + * - [AccountBalance(who) (unreserve)] + * If member is renouncing: + * Base weight: 46.25 µs + * State reads: + * - Members, RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * State writes: + * - Members, RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * If runner is renouncing: + * Base weight: 46.25 µs + * State reads: + * - RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * State writes: + * - RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * + * Weight note: The call into changeMembers need to be accounted for. + * + */ +export interface ElectionsPhragmenCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Report `target` for being an defunct voter. In case of a valid report, the reporter is + * rewarded by the bond amount of `target`. Otherwise, the reporter itself is removed and + * their bond is slashed. + * + * A defunct voter is defined to be: + * - a voter whose current submitted votes are all invalid. i.e. all of them are no + * longer a candidate nor an active member or a runner-up. + * + * + * The origin must provide the number of current candidates and votes of the reported target + * for the purpose of accurate weight calculation. + * + * # + * No Base weight based on min square analysis. + * Complexity of candidate_count: 1.755 µs + * Complexity of vote_count: 18.51 µs + * State reads: + * - Voting(reporter) + * - Candidate.len() + * - Voting(Target) + * - Candidates, Members, RunnersUp (is_defunct_voter) + * State writes: + * - Lock(reporter || target) + * - [AccountBalance(reporter)] + AccountBalance(target) + * - Voting(reporter || target) + * Note: the db access is worse with respect to db, which is when the report is correct. + * # + */ +export interface ElectionsPhragmenCall_report_defunct_voter { + __kind: 'report_defunct_voter' + defunct: DefunctVoter +} + +/** + * Submit oneself for candidacy. + * + * A candidate will either: + * - Lose at the end of the term and forfeit their deposit. + * - Win and become a member. Members will eventually get their stash back. + * - Become a runner-up. Runners-ups are reserved members in case one gets forcefully + * removed. + * + * # + * Base weight = 33.33 µs + * Complexity of candidate_count: 0.375 µs + * State reads: + * - Candidates.len() + * - Candidates + * - Members + * - RunnersUp + * - [AccountBalance(who)] + * State writes: + * - [AccountBalance(who)] + * - Candidates + * # + */ +export interface ElectionsPhragmenCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a bond amount is + * reserved. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * It is the responsibility of the caller to not place all of their balance into the lock + * and keep some for further transactions. + * + * # + * Base weight: 47.93 µs + * State reads: + * - Candidates.len() + Members.len() + RunnersUp.len() + * - Voting (is_voter) + * - [AccountBalance(who) (unreserve + total_balance)] + * State writes: + * - Voting + * - Lock + * - [AccountBalance(who) (unreserve -- only when creating a new voter)] + * # + */ +export interface ElectionsPhragmenCall_vote { + __kind: 'vote' + votes: AccountId[] + value: bigint +} + +export interface DefunctVoter { + who: AccountId + voteCount: number + candidateCount: number +} + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +export type DemocracyCall = DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * # + * - `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + * - Db reads: `scheduler lookup`, scheduler agenda` + * - Db writes: `scheduler lookup`, scheduler agenda` + * - Base Weight: 36.78 + 3.277 * D µs + * # + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: ReferendumIndex +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # + * - Complexity: `O(1)`. + * - Db writes: `ReferendumInfoOf` + * - Base Weight: 21.57 µs + * # + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * # + * - `O(1)`. + * - Db writes: `PublicProps` + * - Base Weight: 2.505 µs + * # + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must + * not be more than the account's current balance. + * + * Emits `Delegated`. + * + * # + * - Complexity: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + * - Db reads: 2*`VotingOf`, `balances locks` + * - Db writes: 2*`VotingOf`, `balances locks` + * - Db reads per votes: `ReferendumInfoOf` + * - Db writes per votes: `ReferendumInfoOf` + * - Base Weight: 65.78 + 8.229 * R µs + * # + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId + conviction: Conviction + balance: BalanceOf +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * # + * - Complexity: `O(1)`. + * - Db reads: `ReferendumInfoOf`, `Cancellations` + * - Db writes: `ReferendumInfoOf`, `Cancellations` + * ------------- + * - Base Weight: 34.25 µs + * # + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: ReferendumIndex +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: Hash + index: ReferendumIndex +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * # + * - Complexity `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + * - Db reads: `NextExternal`, `Blacklist` + * - Db writes: `NextExternal` + * - Base Weight: 13.8 + .106 * V µs + * # + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: Hash +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * # + * - Complexity: `O(1)` + * - Db write: `NextExternal` + * - Base Weight: 3.087 µs + * # + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: Hash +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * # + * - Complexity: `O(1)` + * - Db write: `NextExternal` + * - Base Weight: 3.065 µs + * # + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: Hash +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * `FastTrackVotingPeriod` if too low. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * # + * - Complexity: `O(1)` + * - Db reads: `NextExternal`, `ReferendumCount` + * - Db writes: `NextExternal`, `ReferendumCount`, `ReferendumInfoOf` + * - Base Weight: 30.1 µs + * # + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: Hash + votingPeriod: BlockNumber + delay: BlockNumber +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * # + * see `weight_for::note_preimage` + * # + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * # + * see `weight_for::note_preimage` + * # + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * # + * - Complexity: `O(1)` + * - Db reads: `PublicPropCount`, `PublicProps` + * - Db writes: `PublicPropCount`, `PublicProps`, `DepositOf` + * ------------------- + * Base Weight: 42.58 + .127 * P µs with `P` the number of proposals `PublicProps` + * # + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: Hash + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. + * Extrinsic is weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * # + * - Complexity: `O(D)` where D is length of proposal. + * - Db reads: `Preimages` + * - Db writes: `Preimages` + * - Base Weight: 39.31 + .003 * b µs + * # + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: Hash + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * # + * - `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + * - Db reads: `ReferendumInfoOf`, `VotingOf` + * - Db writes: `ReferendumInfoOf`, `VotingOf` + * - Base Weight: 19.15 + .372 * R + * # + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId + index: ReferendumIndex +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * # + * - `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + * - Db reads: `ReferendumInfoOf`, `VotingOf` + * - Db writes: `ReferendumInfoOf`, `VotingOf` + * - Base Weight: 21.03 + .359 * R + * # + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: ReferendumIndex +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * # + * - Complexity: `O(S)` where S is the number of seconds a proposal already has. + * - Db reads: `DepositOf` + * - Db writes: `DepositOf` + * --------- + * - Base Weight: 22.28 + .229 * S µs + * # + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * # + * - Complexity: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + * - Db reads: 2*`VotingOf` + * - Db writes: 2*`VotingOf` + * - Db reads per votes: `ReferendumInfoOf` + * - Db writes per votes: `ReferendumInfoOf` + * - Base Weight: 33.29 + 8.104 * R µs + * # + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * # + * - Complexity `O(R)` with R number of vote of target. + * - Db reads: `VotingOf`, `balances locks`, `target account` + * - Db writes: `VotingOf`, `balances locks`, `target account` + * - Base Weight: + * - Unlock Remove: 42.96 + .048 * R + * - Unlock Set: 37.63 + .327 * R + * # + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * # + * - Complexity: `O(V + log(V))` where V is number of `existing vetoers` + * Performs a binary search on `existing_vetoers` which should not be very large. + * - Db reads: `NextExternal`, `Blacklist` + * - Db writes: `NextExternal`, `Blacklist` + * - Base Weight: 29.87 + .188 * V µs + * # + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: Hash +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * # + * - Complexity: `O(R)` where R is the number of referendums the voter has voted on. + * weight is charged as if maximum votes. + * - Db reads: `ReferendumInfoOf`, `VotingOf`, `balances locks` + * - Db writes: `ReferendumInfoOf`, `VotingOf`, `balances locks` + * -------------------- + * - Base Weight: + * - Vote New: 49.24 + .333 * R µs + * - Vote Existing: 49.94 + .343 * R µs + * # + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + value: AccountVoteSplit +} + +export interface AccountVote_Standard { + __kind: 'Standard' + value: AccountVoteStandard +} + +export interface AccountVoteStandard { + vote: Vote + balance: Balance +} + +export type Vote = number + +export interface AccountVoteSplit { + aye: Balance + nay: Balance +} + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +export type ReferendumIndex = number + +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * Base Weight: .49 * P + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MAX_MEMBERS` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export type MemberCount = number + +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * Total Complexity: O(1) + * ---------------------------- + * Base Weight: 93.3 µs + * DB Weight: + * - Read: Preclaims, Signing, Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + * - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting, Signing, Preclaims + * Validate PreValidateAttests: +8.631 µs + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * - One `eth_recover` operation which involves a keccak hash and a + * ecdsa recover. + * - Three storage reads to check if a claim exists for the user, to + * get the current pot size, to see if there exists a vesting schedule. + * - Up to one storage write for adding a new vesting schedule. + * - One `deposit_creating` Currency call. + * - One storage write to update the total. + * - Two storage removals for vesting and claims information. + * - One deposit event. + * + * Total Complexity: O(1) + * ---------------------------- + * Base Weight: 269.7 µs + * DB Weight: + * - Read: Signing, Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + * - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting, Signing + * Validate Unsigned: +188.7 µs + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * - One `eth_recover` operation which involves a keccak hash and a + * ecdsa recover. + * - Four storage reads to check if a claim exists for the user, to + * get the current pot size, to see if there exists a vesting schedule, to get the + * required statement. + * - Up to one storage write for adding a new vesting schedule. + * - One `deposit_creating` Currency call. + * - One storage write to update the total. + * - Two storage removals for vesting and claims information. + * - One deposit event. + * + * Total Complexity: O(1) + * ---------------------------- + * Base Weight: 270.2 µs + * DB Weight: + * - Read: Signing, Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + * - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting, Signing + * Validate Unsigned: +190.1 µs + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * - One storage mutate to increase the total claims available. + * - One storage write to add a new claim. + * - Up to one storage write to add a new vesting schedule. + * + * Total Complexity: O(1) + * --------------------- + * Base Weight: 10.46 µs + * DB Weight: + * - Reads: Total + * - Writes: Total, Claims + * - Maybe Write: Vesting, Statement + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: BalanceOf + vestingSchedule?: ([BalanceOf, BalanceOf, BlockNumber] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId | undefined) +} + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is + * not assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: LookupSource + dest: LookupSource + value: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also decrease the total issuance of the system (`TotalIssuance`). + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + * + * # + * - Independent of the arguments. + * - Contains a limited number of reads and writes. + * --------------------- + * - Base Weight: + * - Creating: 27.56 µs + * - Killing: 35.11 µs + * - DB Weight: 1 Read, 1 Write to `who` + * # + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: LookupSource + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * It will decrease the total issuance of the system by the `TransferFee`. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for + * input config types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional + * check that the transfer will not kill the origin account. + * --------------------------------- + * - Base Weight: 73.64 µs, worst case scenario (account created, account removed) + * - DB Weight: 1 Read and 1 Write to destination account + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: LookupSource + value: bigint +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Module.html#method.transfer + * # + * - Cheaper than transfer because account cannot be killed. + * - Base Weight: 51.4 µs + * - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already) + * # + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: LookupSource + value: bigint +} + +export type BabeCall = BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface BabeEquivocationProof { + offender: AuthorityId + slotNumber: SlotNumber + firstHeader: Header + secondHeader: Header +} + +export interface Header { + parentHash: Hash + number: number + stateRoot: Hash + extrinsicsRoot: Hash + digest: Digest +} + +export interface Digest { + logs: DigestItem[] +} + +export type DigestItem = DigestItem_AuthoritiesChange | DigestItem_ChangesTrieRoot | DigestItem_ChangesTrieSignal | DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal | DigestItem_SealV0 + +export interface DigestItem_AuthoritiesChange { + __kind: 'AuthoritiesChange' + value: AuthorityId[] +} + +export interface DigestItem_ChangesTrieRoot { + __kind: 'ChangesTrieRoot' + value: Hash +} + +export interface DigestItem_ChangesTrieSignal { + __kind: 'ChangesTrieSignal' + value: ChangesTrieSignal +} + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: Consensus +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: PreRuntime +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: Seal +} + +export interface DigestItem_SealV0 { + __kind: 'SealV0' + value: SealV0 +} + +export type SealV0 = [bigint, Signature] + +export type Seal = [ConsensusEngineId, Bytes] + +export type PreRuntime = [ConsensusEngineId, Bytes] + +export type Consensus = [ConsensusEngineId, Bytes] + +export type ConsensusEngineId = Bytes + +export type ChangesTrieSignal = ChangesTrieSignal_NewConfiguration + +export interface ChangesTrieSignal_NewConfiguration { + __kind: 'NewConfiguration' + value?: (ChangesTrieConfiguration | undefined) +} + +export type SlotNumber = bigint + +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +export type AuthorityDiscoveryCall = never + +export type AttestationsCall = AttestationsCall_more_attestations + +/** + * Provide candidate receipts for parachains, in ascending order by id. + */ +export interface AttestationsCall_more_attestations { + __kind: 'more_attestations' +} + +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * Base Weight: .49 * P + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MAX_MEMBERS` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: Key, + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => Key), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + set_changes_trie_config: sts.enumStruct({ + changesTrieConfig: sts.option(() => ChangesTrieConfiguration), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => KeyValue), + }), + suicide: sts.unit(), + } +}) + +export const KeyValue = sts.tuple(() => [StorageKey, StorageData]) + +export const StorageData = sts.bytes() + +export const StorageKey = sts.bytes() + +export const ChangesTrieConfiguration: sts.Type = sts.struct(() => { + return { + digestInterval: sts.number(), + digestLevels: sts.number(), + } +}) + +export const Key = sts.bytes() + +export const Perbill = sts.number() + +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: LookupSource, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: EraIndex, + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => LookupSource), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId, + era: EraIndex, + }), + reap_stash: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: LookupSource, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + validators: sts.array(() => AccountId), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + submit_election_solution: sts.enumStruct({ + winners: sts.array(() => ValidatorIndex), + compact: CompactAssignments, + score: ElectionScore, + era: EraIndex, + size: ElectionSize, + }), + submit_election_solution_unsigned: sts.enumStruct({ + winners: sts.array(() => ValidatorIndex), + compact: CompactAssignments, + score: ElectionScore, + era: EraIndex, + size: ElectionSize, + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + } +}) + +export const ElectionSize: sts.Type = sts.struct(() => { + return { + validators: sts.number(), + nominators: sts.number(), + } +}) + +export const ElectionScore = sts.array(() => sts.bigint()) + +export const CompactAssignments: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes2: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes3: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes4: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes5: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes6: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes7: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes8: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes9: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes10: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes11: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes12: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes13: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes14: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes15: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes16: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + } +}) + +export const CompactScore = sts.tuple(() => [ValidatorIndex, OffchainAccuracy]) + +export const OffchainAccuracy = sts.number() + +export const NominatorIndex = sts.number() + +export const ValidatorIndex = sts.number() + +export const Percent = sts.number() + +export const EraIndex = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: BalanceOf, + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId, + judgement: SocietyJudgement, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: LookupSource, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId, + value: BalanceOf, + tip: BalanceOf, + }), + } +}) + +export const SocietyJudgement: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + sub: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + bid_renew: sts.enumStruct({ + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + elaborate_deploy_data: sts.enumStruct({ + paraId: sts.number(), + code: ValidationCode, + }), + fix_deploy_data: sts.enumStruct({ + sub: sts.number(), + paraId: sts.number(), + codeHash: Hash, + codeSize: sts.number(), + initialHeadData: HeadData, + }), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + set_offboarding: sts.enumStruct({ + dest: LookupSource, + }), + } +}) + +export const HeadData = sts.bytes() + +export const ValidationCode = sts.bytes() + +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: Keys, + proof: sts.bytes(), + }), + } +}) + +export const Keys = sts.tuple(() => [AccountId, AccountId, AccountId, AccountId, AccountId]) + +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: BlockNumber, + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_192, + }), + schedule_after: sts.enumStruct({ + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_192, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_192, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_192, + }), + } +}) + +export const Priority = sts.number() + +export const Period = sts.tuple(() => [BlockNumber, sts.number()]) + +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + deregister_para: sts.enumStruct({ + id: sts.number(), + }), + deregister_parathread: sts.unit(), + register_para: sts.enumStruct({ + id: sts.number(), + info: ParaInfo, + code: ValidationCode, + initialHeadData: HeadData, + }), + register_parathread: sts.enumStruct({ + code: ValidationCode, + initialHeadData: HeadData, + }), + select_parathread: sts.enumStruct({ + id: sts.number(), + collator: CollatorId, + headHash: Hash, + }), + set_thread_count: sts.enumStruct({ + count: sts.number(), + }), + swap: sts.enumStruct({ + other: sts.number(), + }), + } +}) + +export const CollatorId = sts.bytes() + +export const ParaInfo: sts.Type = sts.struct(() => { + return { + manager: AccountId, + deposit: Balance, + locked: sts.boolean(), + } +}) + +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId, + call: Type_192, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId, + }), + claim_recovery: sts.enumStruct({ + account: AccountId, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId), + threshold: sts.number(), + delayPeriod: BlockNumber, + }), + initiate_recovery: sts.enumStruct({ + account: AccountId, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + } +}) + +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + proxy: AccountId, + proxyType: ProxyType, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_192, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + proxy: AccountId, + proxyType: ProxyType, + }), + } +}) + +export const ParachainsCall: sts.Type = sts.closedEnum(() => { + return { + report_double_vote: sts.enumStruct({ + report: DoubleVoteReport, + }), + send_xcmp_message: sts.enumStruct({ + to: ParaId, + msg: sts.bytes(), + }), + set_heads: sts.enumStruct({ + heads: sts.array(() => AttestedCandidate), + }), + transfer_to_parachain: sts.enumStruct({ + to: ParaId, + amount: Balance, + remark: Remark, + }), + } +}) + +export const Remark = sts.bytes() + +export const AttestedCandidate: sts.Type = sts.struct(() => { + return { + candidate: AbridgedCandidateReceipt, + validityVotes: sts.array(() => ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: ValidatorSignature, + Implicit: ValidatorSignature, + Never: sts.unit(), + } +}) + +export const ValidatorSignature = sts.bytes() + +export const AbridgedCandidateReceipt: sts.Type = sts.struct(() => { + return { + parachainIndex: ParaId, + relayParent: Hash, + headData: HeadData, + collator: CollatorId, + signature: CollatorSignature, + povBlockHash: Hash, + commitments: CandidateCommitments, + } +}) + +export const CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => UpwardMessage), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: BlockNumber, + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: sts.number(), + data: sts.bytes(), + } +}) + +export const UpwardMessage = sts.bytes() + +export const CollatorSignature = sts.bytes() + +export const ParaId = sts.number() + +export const DoubleVoteReport: sts.Type = sts.struct(() => { + return { + identity: ValidatorId, + first: sts.tuple(() => [Statement, ValidatorSignature]), + second: sts.tuple(() => [Statement, ValidatorSignature]), + proof: MembershipProof, + signingContext: SigningContext, + } +}) + +export const SigningContext: sts.Type = sts.struct(() => { + return { + sessionIndex: SessionIndex, + parentHash: Hash, + } +}) + +export const SessionIndex = sts.number() + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: SessionIndex, + trieNodes: sts.array(() => sts.bytes()), + validatorCount: ValidatorCount, + } +}) + +export const ValidatorCount = sts.number() + +export const Statement: sts.Type = sts.closedEnum(() => { + return { + Candidate: Hash, + Invalid: Hash, + Never: sts.unit(), + Valid: Hash, + } +}) + +export const ValidatorId = sts.bytes() + +export const OffencesCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + call: OpaqueCall, + storeCall: sts.boolean(), + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId), + call: Type_192, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const OpaqueCall = sts.bytes() + +export const Weight = sts.bigint() + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: BlockNumber, + index: sts.number(), + } +}) + +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: AccountIndex, + }), + force_transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: AccountIndex, + }), + freeze: sts.enumStruct({ + index: AccountIndex, + }), + transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + }), + } +}) + +export const AccountIndex = sts.number() + +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: Signature, + }), + } +}) + +export const Signature = sts.bytes() + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: BlockNumber, + networkState: OpaqueNetworkState, + sessionIndex: SessionIndex, + authorityIndex: AuthIndex, + validatorsLen: sts.number(), + } +}) + +export const AuthIndex = sts.number() + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId, + }), + add_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: RegistrarIndex, + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: LookupSource, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: LookupSource, + judgement: IdentityJudgement, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: LookupSource, + }), + rename_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: sts.bigint(), + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => IdentityInfoAdditional), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => H160), + image: Data, + twitter: Data, + } +}) + +export const H160 = sts.bytes() + +export const IdentityInfoAdditional = sts.tuple(() => [Data, Data]) + +export const IdentityJudgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: Balance, + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export const RegistrarIndex = sts.number() + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: H256, + Keccak256: H256, + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: H256, + ShaThree256: H256, + } +}) + +export const H256 = sts.bytes() + +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + report_equivocation: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const KeyOwnerProof: sts.Type = sts.struct(() => { + return { + session: SessionIndex, + trieNodes: sts.array(() => sts.bytes()), + validatorCount: ValidatorCount, + } +}) + +export const GrandpaEquivocationProof: sts.Type = sts.struct(() => { + return { + setId: SetId, + equivocation: GrandpaEquivocation, + } +}) + +export const GrandpaEquivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: GrandpaEquivocationValue, + Prevote: GrandpaEquivocationValue, + } +}) + +export const GrandpaEquivocationValue: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: AuthorityId, + first: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + second: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + } +}) + +export const AuthoritySignature = sts.bytes() + +export const GrandpaPrevote: sts.Type = sts.struct(() => { + return { + targetHash: Hash, + targetNumber: BlockNumber, + } +}) + +export const AuthorityId = sts.bytes() + +export const SetId = sts.bigint() + +export const FinalityTrackerCall: sts.Type = sts.closedEnum(() => { + return { + final_hint: sts.enumStruct({ + hint: sts.number(), + }), + } +}) + +export const ElectionsPhragmenCall: sts.Type = sts.closedEnum(() => { + return { + remove_member: sts.enumStruct({ + who: LookupSource, + hasReplacement: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + report_defunct_voter: sts.enumStruct({ + defunct: DefunctVoter, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId), + value: sts.bigint(), + }), + } +}) + +export const DefunctVoter: sts.Type = sts.struct(() => { + return { + who: AccountId, + voteCount: sts.number(), + candidateCount: sts.number(), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + cancel_queued: sts.enumStruct({ + which: ReferendumIndex, + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId, + conviction: Conviction, + balance: BalanceOf, + }), + emergency_cancel: sts.enumStruct({ + refIndex: ReferendumIndex, + }), + enact_proposal: sts.enumStruct({ + proposalHash: Hash, + index: ReferendumIndex, + }), + external_propose: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_default: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: Hash, + }), + fast_track: sts.enumStruct({ + proposalHash: Hash, + votingPeriod: BlockNumber, + delay: BlockNumber, + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: Hash, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: Hash, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId, + index: ReferendumIndex, + }), + remove_vote: sts.enumStruct({ + index: ReferendumIndex, + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId, + }), + veto_external: sts.enumStruct({ + proposalHash: Hash, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: AccountVoteSplit, + Standard: AccountVoteStandard, + } +}) + +export const AccountVoteStandard: sts.Type = sts.struct(() => { + return { + vote: Vote, + balance: Balance, + } +}) + +export const Vote = sts.number() + +export const AccountVoteSplit: sts.Type = sts.struct(() => { + return { + aye: Balance, + nay: Balance, + } +}) + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export const ReferendumIndex = sts.number() + +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: BalanceOf, + vestingSchedule: sts.option(() => sts.tuple(() => [BalanceOf, BalanceOf, BlockNumber])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: LookupSource, + dest: LookupSource, + value: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: LookupSource, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + } +}) + +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + report_equivocation: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const BabeEquivocationProof: sts.Type = sts.struct(() => { + return { + offender: AuthorityId, + slotNumber: SlotNumber, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: Hash, + number: sts.number(), + stateRoot: Hash, + extrinsicsRoot: Hash, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + AuthoritiesChange: sts.array(() => AuthorityId), + ChangesTrieRoot: Hash, + ChangesTrieSignal: ChangesTrieSignal, + Consensus: Consensus, + Other: sts.bytes(), + PreRuntime: PreRuntime, + RuntimeEnvironmentUpdated: sts.unit(), + Seal: Seal, + SealV0: SealV0, + } +}) + +export const SealV0 = sts.tuple(() => [sts.bigint(), Signature]) + +export const Seal = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const PreRuntime = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const Consensus = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const ConsensusEngineId = sts.bytes() + +export const ChangesTrieSignal: sts.Type = sts.closedEnum(() => { + return { + NewConfiguration: sts.option(() => ChangesTrieConfiguration), + } +}) + +export const SlotNumber = sts.bigint() + +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +export const AuthorityDiscoveryCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const AttestationsCall: sts.Type = sts.closedEnum(() => { + return { + more_attestations: sts.unit(), + } +}) + +export type Type_192 = Type_192_Attestations | Type_192_AuthorityDiscovery | Type_192_Authorship | Type_192_Babe | Type_192_Balances | Type_192_Claims | Type_192_Council | Type_192_Democracy | Type_192_ElectionsPhragmen | Type_192_FinalityTracker | Type_192_Grandpa | Type_192_Identity | Type_192_ImOnline | Type_192_Indices | Type_192_Multisig | Type_192_Offences | Type_192_Parachains | Type_192_Proxy | Type_192_Recovery | Type_192_Registrar | Type_192_Scheduler | Type_192_Session | Type_192_Slots | Type_192_Society | Type_192_Staking | Type_192_System | Type_192_TechnicalCommittee | Type_192_TechnicalMembership | Type_192_Timestamp | Type_192_Treasury | Type_192_Utility | Type_192_Vesting + +export interface Type_192_Attestations { + __kind: 'Attestations' + value: AttestationsCall +} + +export interface Type_192_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Type_192_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Type_192_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Type_192_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Type_192_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Type_192_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Type_192_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Type_192_ElectionsPhragmen { + __kind: 'ElectionsPhragmen' + value: ElectionsPhragmenCall +} + +export interface Type_192_FinalityTracker { + __kind: 'FinalityTracker' + value: FinalityTrackerCall +} + +export interface Type_192_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Type_192_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Type_192_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Type_192_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Type_192_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Type_192_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Type_192_Parachains { + __kind: 'Parachains' + value: ParachainsCall +} + +export interface Type_192_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Type_192_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Type_192_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Type_192_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Type_192_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Type_192_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Type_192_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Type_192_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Type_192_System { + __kind: 'System' + value: SystemCall +} + +export interface Type_192_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Type_192_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Type_192_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Type_192_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Type_192_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Type_192_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId = sts.bytes() diff --git a/squid/src/types/v2022.ts b/squid/src/types/v2022.ts new file mode 100644 index 00000000..e78567b9 --- /dev/null +++ b/squid/src/types/v2022.ts @@ -0,0 +1,6938 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Type_192: sts.Type = sts.closedEnum(() => { + return { + Attestations: AttestationsCall, + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Democracy: DemocracyCall, + ElectionsPhragmen: ElectionsPhragmenCall, + FinalityTracker: FinalityTrackerCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + Parachains: ParachainsCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + } +}) + +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: LookupSource, + target: LookupSource, + schedule: VestingInfo, + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: LookupSource, + }), + vested_transfer: sts.enumStruct({ + target: LookupSource, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: Balance, + perBlock: Balance, + startingBlock: BlockNumber, + } +}) + +export const BlockNumber = sts.number() + +export const Balance = sts.bigint() + +export interface VestingInfo { + locked: Balance + perBlock: Balance + startingBlock: BlockNumber +} + +export type BlockNumber = number + +export type Balance = bigint + +export const LookupSource = sts.bytes() + +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * - Benchmark: 100.3 + .365 * l µs (min square analysis) + * - Using 100 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks. + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: LookupSource + target: LookupSource + schedule: VestingInfo +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this module. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * - Benchmark: + * - Unlocked: 48.76 + .048 * l µs (min square analysis) + * - Locked: 44.43 + .284 * l µs (min square analysis) + * - Using 50 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks. + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this module. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * - Benchmark: + * - Unlocked: 44.3 + .294 * l µs (min square analysis) + * - Locked: 48.16 + .103 * l µs (min square analysis) + * - Using 50 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks. + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: LookupSource +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Benchmark: 100.3 + .365 * l µs (min square analysis) + * - Using 100 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks. + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: LookupSource + schedule: VestingInfo +} + +export type LookupSource = Bytes + +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Type_192, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Type_192), + }), + } +}) + +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + * + * # + * - Base weight: 2.861 µs + * - Plus the weight of the `call` + * # + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Type_192 +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Trait::BaseCallFilter`). + * + * # + * - Base weight: 14.39 + .987 * c µs + * - Plus the sum of the weights of the `calls`. + * - Plus one additional event. (repeat read/write) + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Type_192[] +} + +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + close_tip: sts.enumStruct({ + hash: Hash, + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: LookupSource, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + }), + retract_tip: sts.enumStruct({ + hash: Hash, + }), + tip: sts.enumStruct({ + hash: Hash, + tipValue: BalanceOf, + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + tipValue: BalanceOf, + }), + } +}) + +export const BalanceOf = sts.bigint() + +export const Hash = sts.bytes() + +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_close_tip | TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_report_awesome | TreasuryCall_retract_tip | TreasuryCall_tip | TreasuryCall_tip_new + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`. + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TreasuryCall_close_tip { + __kind: 'close_tip' + hash: Hash +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: LookupSource +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `TipReportDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips`, `who account data` + * - DbWrites: `Tips`, `who account data` + * # + */ +export interface TreasuryCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TreasuryCall_retract_tip { + __kind: 'retract_tip' + hash: Hash +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`, insert tip and check closing, + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TreasuryCall_tip { + __kind: 'tip' + hash: Hash + tipValue: BalanceOf +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T` + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TreasuryCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId + tipValue: BalanceOf +} + +export type BalanceOf = bigint + +export type AccountId = Bytes + +export type Hash = Bytes + +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(T)` where `T` complexity of `on_timestamp_set` + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in `on_finalize`) + * - 1 event handler `on_timestamp_set` `O(T)`. + * - Benchmark: 7.678 (min squares analysis) + * - NOTE: This benchmark was done for a runtime with insignificant `on_timestamp_set` handlers. + * New benchmarking is needed when adding new handlers. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId, + }), + change_key: sts.enumStruct({ + new: AccountId, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId), + }), + set_prime: sts.enumStruct({ + who: AccountId, + }), + swap_member: sts.enumStruct({ + remove: AccountId, + add: AccountId, + }), + } +}) + +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId + add: AccountId +} + +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const MemberCount = sts.number() + +export const Proposal: sts.Type = sts.closedEnum(() => { + return { + Attestations: AttestationsCall, + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Democracy: DemocracyCall, + ElectionsPhragmen: ElectionsPhragmenCall, + FinalityTracker: FinalityTrackerCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + Parachains: ParachainsCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + } +}) + +export type Proposal = Proposal_Attestations | Proposal_AuthorityDiscovery | Proposal_Authorship | Proposal_Babe | Proposal_Balances | Proposal_Claims | Proposal_Council | Proposal_Democracy | Proposal_ElectionsPhragmen | Proposal_FinalityTracker | Proposal_Grandpa | Proposal_Identity | Proposal_ImOnline | Proposal_Indices | Proposal_Multisig | Proposal_Offences | Proposal_Parachains | Proposal_Proxy | Proposal_Recovery | Proposal_Registrar | Proposal_Scheduler | Proposal_Session | Proposal_Slots | Proposal_Society | Proposal_Staking | Proposal_System | Proposal_TechnicalCommittee | Proposal_TechnicalMembership | Proposal_Timestamp | Proposal_Treasury | Proposal_Utility | Proposal_Vesting + +export interface Proposal_Attestations { + __kind: 'Attestations' + value: AttestationsCall +} + +export interface Proposal_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Proposal_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Proposal_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Proposal_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Proposal_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Proposal_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Proposal_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Proposal_ElectionsPhragmen { + __kind: 'ElectionsPhragmen' + value: ElectionsPhragmenCall +} + +export interface Proposal_FinalityTracker { + __kind: 'FinalityTracker' + value: FinalityTrackerCall +} + +export interface Proposal_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Proposal_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Proposal_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Proposal_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Proposal_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Proposal_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Proposal_Parachains { + __kind: 'Parachains' + value: ParachainsCall +} + +export interface Proposal_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Proposal_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Proposal_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Proposal_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Proposal_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Proposal_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Proposal_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Proposal_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Proposal_System { + __kind: 'System' + value: SystemCall +} + +export interface Proposal_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Proposal_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Proposal_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Proposal_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Proposal_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Proposal_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_set_changes_trie_config | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage | SystemCall_suicide + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + * + * # + * - `O(P)` where `P` amount of keys with prefix `prefix` + * - `P` storage deletions. + * - Base Weight: 0.834 * P µs + * - Writes: Number of subkeys + 1 + * # + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Key + subkeys: number +} + +/** + * Kill some items from storage. + * + * # + * - `O(IK)` where `I` length of `keys` and `K` length of one key + * - `I` storage deletions. + * - Base Weight: .378 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Key[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * - Base Weight: 0.665 µs, independent of remark length. + * - No DB operations. + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Set the new changes trie configuration. + * + * # + * - `O(1)` + * - 1 storage write or delete (codec `O(1)`). + * - 1 call to `deposit_log`: Uses `append` API, so O(1) + * - Base Weight: 7.218 µs + * - DB Weight: + * - Writes: Changes Trie, System Digest + * # + */ +export interface SystemCall_set_changes_trie_config { + __kind: 'set_changes_trie_config' + changesTrieConfig?: (ChangesTrieConfiguration | undefined) +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 storage write (codec `O(C)`). + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is expensive). + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very expensive. + * We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + * + * # + * - `O(1)` + * - 1 storage write. + * - Base Weight: 1.405 µs + * - 1 write to HEAP_PAGES + * # + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + * + * # + * - `O(I)` where `I` length of `items` + * - `I` storage writes (`O(1)`). + * - Base Weight: 0.568 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: KeyValue[] +} + +/** + * Kill the sending account, assuming there are no references outstanding and the composite + * data is equal to its default value. + * + * # + * - `O(1)` + * - 1 storage read and deletion. + * -------------------- + * Base Weight: 8.626 µs + * No DB Read or Write operations because caller is already in overlay + * # + */ +export interface SystemCall_suicide { + __kind: 'suicide' +} + +export type KeyValue = [StorageKey, StorageData] + +export type StorageData = Bytes + +export type StorageKey = Bytes + +export interface ChangesTrieConfiguration { + digestInterval: number + digestLevels: number +} + +export type Key = Bytes + +export type Perbill = number + +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_validator_count | StakingCall_submit_election_solution | StakingCall_submit_election_solution_unsigned | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * Base Weight: 67.87 µs + * DB Weight: + * - Read: Bonded, Ledger, [Origin Account], Current Era, History Depth, Locks + * - Write: Bonded, Payee, [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: LookupSource + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount + * that can be added. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller and + * it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * - One DB entry. + * ------------ + * Base Weight: 54.88 µs + * DB Weight: + * - Read: Era Election Status, Bonded, Ledger, [Origin Account], Locks + * - Write: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + * + * # + * Complexity: O(U + S) + * with U unapplied slashes weighted with U=1000 + * and S is the number of slash indices to be canceled. + * - Base: 5870 + 34.61 * S µs + * - Read: Unapplied Slashes + * - Write: Unapplied Slashes + * # + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: EraIndex + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * -------- + * Base Weight: 16.53 µs + * DB Weight: + * - Read: EraElectionStatus, Ledger + * - Write: Validators, Nominators + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Base Weight: 1.959 µs + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - Base Weight: 2.05 µs + * - Write: ForceEra + * # + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Base Weight: 1.857 µs + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + * + * # + * O(S) where S is the number of slashing spans to be removed + * Base Weight: 53.07 + 2.365 * S µs + * Reads: Bonded, Slashing Spans, Account, Locks + * Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Account, Locks + * Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Base Weight: 1.717 µs + * Read/Write: Validator Count + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. This can only be called when + * [`EraElectionStatus`] is `Closed`. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS). + * - Both the reads and writes follow a similar pattern. + * --------- + * Base Weight: 22.34 + .36 * N µs + * where N is the number of targets + * DB Weight: + * - Reads: Era Election Status, Ledger, Current Era + * - Writes: Validators, Nominators + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: LookupSource[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * This can only be called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Base Weight: + * - Reward Destination Staked: 110 + 54.2 * N µs (Median Slopes) + * - Reward Destination Controller (Creating): 120 + 41.95 * N µs (Median Slopes) + * DB Weight: + * - Read: EraElectionStatus, CurrentEra, HistoryDepth, ErasValidatorReward, + * ErasStakersClipped, ErasRewardPoints, ErasValidatorPrefs (8 items) + * - Read Each: Bonded, Ledger, Payee, Locks, System Account (5 items) + * - Write Each: System Account, Locks, Ledger (3 items) + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId + era: EraIndex +} + +/** + * Remove all data structure concerning a staker/stash once its balance is zero. + * This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone + * and the target `stash` must have no funds left. + * + * This can be called from any origin. + * + * - `stash`: The stash account to reap. Its balance must be zero. + * + * # + * Complexity: O(S) where S is the number of slashing spans on the account. + * Base Weight: 75.94 + 2.396 * S µs + * DB Weight: + * - Reads: Stash Account, Bonded, Slashing Spans, Locks + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Stash Account, Locks + * - Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller, and it can be only called when + * [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MAX_UNLOCKING_CHUNKS`. + * - Storage changes: Can't increase storage, only decrease it. + * --------------- + * - Base Weight: 34.51 µs * .048 L µs + * - DB Weight: + * - Reads: EraElectionStatus, Ledger, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Base Weight: 1.717 µs + * Read/Write: Validator Count + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Base Weight: 25.22 µs + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: LookupSource +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. + * This should report all the storage items that will be deleted by clearing old + * era history. Needed to report an accurate weight for the dispatch. Trusted by + * `Root` to report an accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Base Weight: 29.13 * E µs + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + * + * # + * - O(V) + * - Base Weight: 2.208 + .006 * V µs + * - Write: Invulnerables + * # + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + validators: AccountId[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Base Weight: 11.33 µs + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Base Weight: 1.717 µs + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Submit an election result to the chain. If the solution: + * + * 1. is valid. + * 2. has a better score than a potentially existing solution on chain. + * + * then, it will be _put_ on chain. + * + * A solution consists of two pieces of data: + * + * 1. `winners`: a flat vector of all the winners of the round. + * 2. `assignments`: the compact version of an assignment vector that encodes the edge + * weights. + * + * Both of which may be computed using _phragmen_, or any other algorithm. + * + * Additionally, the submitter must provide: + * + * - The `score` that they claim their solution has. + * + * Both validators and nominators will be represented by indices in the solution. The + * indices should respect the corresponding types ([`ValidatorIndex`] and + * [`NominatorIndex`]). Moreover, they should be valid when used to index into + * [`SnapshotValidators`] and [`SnapshotNominators`]. Any invalid index will cause the + * solution to be rejected. These two storage items are set during the election window and + * may be used to determine the indices. + * + * A solution is valid if: + * + * 0. It is submitted when [`EraElectionStatus`] is `Open`. + * 1. Its claimed score is equal to the score computed on-chain. + * 2. Presents the correct number of winners. + * 3. All indexes must be value according to the snapshot vectors. All edge values must + * also be correct and should not overflow the granularity of the ratio type (i.e. 256 + * or billion). + * 4. For each edge, all targets are actually nominated by the voter. + * 5. Has correct self-votes. + * + * A solutions score is consisted of 3 parameters: + * + * 1. `min { support.total }` for each support of a winner. This value should be maximized. + * 2. `sum { support.total }` for each support of a winner. This value should be minimized. + * 3. `sum { support.total^2 }` for each support of a winner. This value should be + * minimized (to ensure less variance) + * + * # + * See `crate::weight` module. + * # + */ +export interface StakingCall_submit_election_solution { + __kind: 'submit_election_solution' + winners: ValidatorIndex[] + compact: CompactAssignments + score: ElectionScore + era: EraIndex + size: ElectionSize +} + +/** + * Unsigned version of `submit_election_solution`. + * + * Note that this must pass the [`ValidateUnsigned`] check which only allows transactions + * from the local node to be included. In other words, only the block author can include a + * transaction in the block. + * + * # + * See `crate::weight` module. + * # + */ +export interface StakingCall_submit_election_solution_unsigned { + __kind: 'submit_election_solution_unsigned' + winners: ValidatorIndex[] + compact: CompactAssignments + score: ElectionScore + era: EraIndex + size: ElectionSize +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + * + * # + * - Independent of the arguments. Limited but potentially exploitable complexity. + * - Contains a limited number of reads. + * - Each call (requires the remainder of the bonded balance to be above `minimum_balance`) + * will cause a new entry to be inserted into a vector (`Ledger.unlocking`) kept in storage. + * The only way to clean the aforementioned storage item is also user-controlled via + * `withdraw_unbonded`. + * - One DB entry. + * ---------- + * Base Weight: 50.34 µs + * DB Weight: + * - Read: Era Election Status, Ledger, Current Era, Locks, [Origin Account] + * - Write: [Origin Account], Locks, Ledger + * + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ----------- + * Base Weight: 17.13 µs + * DB Weight: + * - Read: Era Election Status, Ledger + * - Write: Nominators, Validators + * # + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * - Could be dependent on the `origin` argument and how much `unlocking` chunks exist. + * It implies `consolidate_unlocked` which loops over `Ledger.unlocking`, which is + * indirectly user-controlled. See [`unbond`] for more detail. + * - Contains a limited number of reads, yet the size of which could be large based on `ledger`. + * - Writes are limited to the `origin` account key. + * --------------- + * Complexity O(S) where S is the number of slashing spans to remove + * Base Weight: + * Update: 50.52 + .028 * S µs + * - Reads: EraElectionStatus, Ledger, Current Era, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * Kill: 79.41 + 2.366 * S µs + * - Reads: EraElectionStatus, Ledger, Current Era, Bonded, Slashing Spans, [Origin Account], Locks + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, [Origin Account], Locks + * - Writes Each: SpanSlash * S + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +export interface ValidatorPrefs { + commission: number +} + +export interface ElectionSize { + validators: number + nominators: number +} + +export type ElectionScore = bigint[] + +export interface CompactAssignments { + votes1: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes2: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes3: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes4: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes5: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes6: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes7: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes8: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes9: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes10: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes11: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes12: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes13: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes14: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes15: [NominatorIndex, CompactScore[], ValidatorIndex][] + votes16: [NominatorIndex, CompactScore[], ValidatorIndex][] +} + +export type CompactScore = [ValidatorIndex, OffchainAccuracy] + +export type OffchainAccuracy = number + +export type NominatorIndex = number + +export type ValidatorIndex = number + +export type Percent = number + +export type EraIndex = number + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: BalanceOf +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * module to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId + judgement: SocietyJudgement +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin + * forgives (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: LookupSource + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId + value: BalanceOf + tip: BalanceOf +} + +export type SocietyJudgement = SocietyJudgement_Approve | SocietyJudgement_Rebid | SocietyJudgement_Reject + +export interface SocietyJudgement_Approve { + __kind: 'Approve' +} + +export interface SocietyJudgement_Rebid { + __kind: 'Rebid' +} + +export interface SocietyJudgement_Reject { + __kind: 'Reject' +} + +export type SlotsCall = SlotsCall_bid | SlotsCall_bid_renew | SlotsCall_elaborate_deploy_data | SlotsCall_fix_deploy_data | SlotsCall_new_auction | SlotsCall_set_offboarding + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface SlotsCall_bid { + __kind: 'bid' + sub: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Make a new bid from a parachain account for renewing that (pre-existing) parachain. + * + * The origin *must* be a parachain account. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface SlotsCall_bid_renew { + __kind: 'bid_renew' + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Note a new parachain's code. + * + * This must be called after `fix_deploy_data` and `code` must be the preimage of the + * `code_hash` passed there for the same `para_id`. + * + * This may be called before or after the beginning of the parachain's first lease period. + * If called before then the parachain will become active at the first block of its + * starting lease period. If after, then it will become active immediately after this call. + * + * - `_origin` is irrelevant. + * - `para_id` is the parachain ID whose code will be elaborated. + * - `code` is the preimage of the registered `code_hash` of `para_id`. + */ +export interface SlotsCall_elaborate_deploy_data { + __kind: 'elaborate_deploy_data' + paraId: number + code: ValidationCode +} + +/** + * Set the deploy information for a successful bid to deploy a new parachain. + * + * - `origin` must be the successful bidder account. + * - `sub` is the sub-bidder ID of the bidder. + * - `para_id` is the parachain ID allotted to the winning bidder. + * - `code_hash` is the hash of the parachain's Wasm validation function. + * - `initial_head_data` is the parachain's initial head data. + */ +export interface SlotsCall_fix_deploy_data { + __kind: 'fix_deploy_data' + sub: number + paraId: number + codeHash: Hash + codeSize: number + initialHeadData: HeadData +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface SlotsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +/** + * Set the off-boarding information for a parachain. + * + * The origin *must* be a parachain account. + * + * - `dest` is the destination account to receive the parachain's deposit. + */ +export interface SlotsCall_set_offboarding { + __kind: 'set_offboarding' + dest: LookupSource +} + +export type HeadData = Bytes + +export type ValidationCode = Bytes + +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` in number of key types. + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwnder` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: Keys + proof: Bytes +} + +export type Keys = [AccountId, AccountId, AccountId, AccountId, AccountId] + +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.15 + 2.869 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: BlockNumber + index: number +} + +/** + * Cancel a named scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 24.91 + 2.907 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.29 + .126 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda + * - Will use base weight of 25 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_192 +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_192 +} + +/** + * Schedule a named task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 29.6 + .159 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 35 which should be good for more than 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_192 +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`]. + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_192 +} + +export type Priority = number + +export type Period = [BlockNumber, number] + +export type RegistrarCall = RegistrarCall_deregister_para | RegistrarCall_deregister_parathread | RegistrarCall_register_para | RegistrarCall_register_parathread | RegistrarCall_select_parathread | RegistrarCall_set_thread_count | RegistrarCall_swap + +/** + * Deregister a parachain with given id + */ +export interface RegistrarCall_deregister_para { + __kind: 'deregister_para' + id: number +} + +/** + * Deregister a parathread and retrieve the deposit. + * + * Must be sent from a `Parachain` origin which is currently a parathread. + * + * Ensure that before calling this that any funds you want emptied from the parathread's + * account is moved out; after this it will be impossible to retrieve them (without + * governance intervention). + */ +export interface RegistrarCall_deregister_parathread { + __kind: 'deregister_parathread' +} + +/** + * Register a parachain with given code. Must be called by root. + * Fails if given ID is already used. + * + * Unlike the `Registrar` trait function of the same name, this + * checks the code and head data against size limits. + */ +export interface RegistrarCall_register_para { + __kind: 'register_para' + id: number + info: ParaInfo + code: ValidationCode + initialHeadData: HeadData +} + +/** + * Register a parathread for immediate use. + * + * Must be sent from a Signed origin that is able to have ParathreadDeposit reserved. + * `code` and `initial_head_data` are used to initialize the parathread's state. + * + * Unlike `register_para`, this function does check that the maximum code size + * and head data size are respected, as parathread registration is an atomic + * action. + */ +export interface RegistrarCall_register_parathread { + __kind: 'register_parathread' + code: ValidationCode + initialHeadData: HeadData +} + +/** + * Place a bid for a parathread to be progressed in the next block. + * + * This is a kind of special transaction that should be heavily prioritized in the + * transaction pool according to the `value`; only `ThreadCount` of them may be presented + * in any single block. + */ +export interface RegistrarCall_select_parathread { + __kind: 'select_parathread' + id: number + collator: CollatorId + headHash: Hash +} + +/** + * Reset the number of parathreads that can pay to be scheduled in a single block. + * + * - `count`: The number of parathreads. + * + * Must be called from Root origin. + */ +export interface RegistrarCall_set_thread_count { + __kind: 'set_thread_count' + count: number +} + +/** + * Swap a parachain with another parachain or parathread. The origin must be a `Parachain`. + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + other: number +} + +export type CollatorId = Bytes + +export interface ParaInfo { + manager: AccountId + deposit: Balance + locked: boolean +} + +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + * + * # + * - The weight of the `call` + 10,000. + * - One storage lookup to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId + call: Type_192 +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + * + * # + * - One storage mutation to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully + * recovered by you. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + V) + * # + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + * + * # + * Key: V (len of vouching friends) + * - One storage read/remove to get the active recovery process. O(1), Codec O(V) + * - One balance call to repatriate reserved. O(X) + * - One event. + * + * Total Complexity: O(V + X) + * # + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. + * Should be ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt + * before the account can be recovered. Should be less than or equal to + * the length of the list of friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized + * that needs to pass before the account can be recovered. + * + * # + * - Key: F (len of friends) + * - One storage read to check that account is not already recoverable. O(1). + * - A check that the friends list is sorted and unique. O(F) + * - One currency reserve operation. O(X) + * - One storage write. O(1). Codec O(F). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId[] + threshold: number + delayPeriod: BlockNumber +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account + * needs to be recoverable (i.e. have a recovery configuration). + * + * # + * - One storage read to check that account is recoverable. O(F) + * - One storage read to check that this recovery process hasn't already started. O(1) + * - One currency reserve operation. O(X) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + * + * # + * Key: F (len of friends) + * - One storage read to get the prefix iterator for active recoveries. O(1) + * - One storage read/remove to get the recovery configuration. O(1), Codec O(F) + * - One balance call to unreserved. O(X) + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + * + * # + * - One storage write O(1) + * - One event + * # + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId + rescuer: AccountId +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you + * want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One binary search to confirm caller is a friend. O(logF) + * - One binary search to confirm caller has not already vouched. O(logV) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + logF + V + logV) + * # + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId + rescuer: AccountId +} + +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * + * # + * P is the number of proxies the user has + * - Base weight: 17.48 + .176 * P µs + * - DB weight: 1 storage read and write. + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + proxy: AccountId + proxyType: ProxyType +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * P is the number of proxies the user has + * - Base weight: 36.48 + .039 * P µs + * - DB weight: 1 storage read and write. + * # + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * P is the number of proxies the user has + * - Base weight: 15.65 + .137 * P µs + * - DB weight: 1 storage read and write. + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * P is the number of proxies the user has + * - Base weight: 19.87 + .141 * P µs + * - DB weight: 1 storage read. + * - Plus the weight of the `call` + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_192 +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * P is the number of proxies the user has + * - Base weight: 13.73 + .129 * P µs + * - DB weight: 1 storage read and write. + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * P is the number of proxies the user has + * - Base weight: 14.37 + .164 * P µs + * - DB weight: 1 storage read and write. + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + proxy: AccountId + proxyType: ProxyType +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +export type ParachainsCall = ParachainsCall_report_double_vote | ParachainsCall_send_xcmp_message | ParachainsCall_set_heads | ParachainsCall_transfer_to_parachain + +/** + * Provide a proof that some validator has commited a double-vote. + * + * The weight is 0; in order to avoid DoS a `SignedExtension` validation + * is implemented. + */ +export interface ParachainsCall_report_double_vote { + __kind: 'report_double_vote' + report: DoubleVoteReport +} + +/** + * Send a XCMP message to the given parachain. + * + * The origin must be another parachain. + */ +export interface ParachainsCall_send_xcmp_message { + __kind: 'send_xcmp_message' + to: ParaId + msg: Bytes +} + +/** + * Provide candidate receipts for parachains, in ascending order by id. + */ +export interface ParachainsCall_set_heads { + __kind: 'set_heads' + heads: AttestedCandidate[] +} + +/** + * Transfer some tokens into a parachain and leave a message in the downward queue for it. + */ +export interface ParachainsCall_transfer_to_parachain { + __kind: 'transfer_to_parachain' + to: ParaId + amount: Balance + remark: Remark +} + +export type Remark = Bytes + +export interface AttestedCandidate { + candidate: AbridgedCandidateReceipt + validityVotes: ValidityAttestation[] + validatorIndices: BitSequence +} + +export type ValidityAttestation = ValidityAttestation_Explicit | ValidityAttestation_Implicit | ValidityAttestation_Never + +export interface ValidityAttestation_Explicit { + __kind: 'Explicit' + value: ValidatorSignature +} + +export interface ValidityAttestation_Implicit { + __kind: 'Implicit' + value: ValidatorSignature +} + +export interface ValidityAttestation_Never { + __kind: 'Never' +} + +export type ValidatorSignature = Bytes + +export interface AbridgedCandidateReceipt { + parachainIndex: ParaId + relayParent: Hash + headData: HeadData + collator: CollatorId + signature: CollatorSignature + povBlockHash: Hash + commitments: CandidateCommitments +} + +export interface CandidateCommitments { + upwardMessages: UpwardMessage[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: BlockNumber +} + +export interface OutboundHrmpMessage { + recipient: number + data: Bytes +} + +export type UpwardMessage = Bytes + +export type CollatorSignature = Bytes + +export type ParaId = number + +export interface DoubleVoteReport { + identity: ValidatorId + first: [Statement, ValidatorSignature] + second: [Statement, ValidatorSignature] + proof: MembershipProof + signingContext: SigningContext +} + +export interface SigningContext { + sessionIndex: SessionIndex + parentHash: Hash +} + +export type SessionIndex = number + +export interface MembershipProof { + session: SessionIndex + trieNodes: Bytes[] + validatorCount: ValidatorCount +} + +export type ValidatorCount = number + +export type Statement = Statement_Candidate | Statement_Invalid | Statement_Never | Statement_Valid + +export interface Statement_Candidate { + __kind: 'Candidate' + value: Hash +} + +export interface Statement_Invalid { + __kind: 'Invalid' + value: Hash +} + +export interface Statement_Never { + __kind: 'Never' +} + +export interface Statement_Valid { + __kind: 'Valid' + value: Hash +} + +export type ValidatorId = Bytes + +export type OffencesCall = never + +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - Base Weight: + * - Create: 44.71 + 0.088 * S + * - Approve: 31.48 + 0.116 * S + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - Base Weight: + * - Create: 41.89 + 0.118 * S + .002 * Z µs + * - Create w/ Store: 53.57 + 0.119 * S + .003 * Z µs + * - Approve: 31.39 + 0.136 * S + .002 * Z µs + * - Complete: 39.94 + 0.26 * S + .002 * Z µs + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + call: OpaqueCall + storeCall: boolean + maxWeight: Weight +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - Base Weight: 33.72 + 0.002 * Z µs + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId[] + call: Type_192 +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - Base Weight: 36.07 + 0.124 * S + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId[] + timepoint: Timepoint + callHash: Bytes +} + +export type OpaqueCall = Bytes + +export type Weight = bigint + +export interface Timepoint { + height: BlockNumber + index: number +} + +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - Base Weight: 28.69 µs + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: AccountIndex +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - Base Weight: 26.83 µs + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId + index: AccountIndex + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - Base Weight: 25.53 µs + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: AccountIndex +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - Base Weight: 30.86 µs + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: AccountIndex +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - Base Weight: 33.74 µs + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId + index: AccountIndex +} + +export type AccountIndex = number + +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` and E is length of + * `Heartbeat.network_state.external_address` + * + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Signature +} + +export type Signature = Bytes + +export interface Heartbeat { + blockNumber: BlockNumber + networkState: OpaqueNetworkState + sessionIndex: SessionIndex + authorityIndex: AuthIndex + validatorsLen: number +} + +export type AuthIndex = number + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: LookupSource + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: RegistrarIndex +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: LookupSource +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: LookupSource + judgement: IdentityJudgement +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: LookupSource +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: LookupSource + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: bigint +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId, Data][] +} + +export interface IdentityInfo { + additional: IdentityInfoAdditional[] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (H160 | undefined) + image: Data + twitter: Data +} + +export type H160 = Bytes + +export type IdentityInfoAdditional = [Data, Data] + +export type IdentityJudgement = IdentityJudgement_Erroneous | IdentityJudgement_FeePaid | IdentityJudgement_KnownGood | IdentityJudgement_LowQuality | IdentityJudgement_OutOfDate | IdentityJudgement_Reasonable | IdentityJudgement_Unknown + +export interface IdentityJudgement_Erroneous { + __kind: 'Erroneous' +} + +export interface IdentityJudgement_FeePaid { + __kind: 'FeePaid' + value: Balance +} + +export interface IdentityJudgement_KnownGood { + __kind: 'KnownGood' +} + +export interface IdentityJudgement_LowQuality { + __kind: 'LowQuality' +} + +export interface IdentityJudgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface IdentityJudgement_Reasonable { + __kind: 'Reasonable' +} + +export interface IdentityJudgement_Unknown { + __kind: 'Unknown' +} + +export type RegistrarIndex = number + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: H256 +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: H256 +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: H256 +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: H256 +} + +export type H256 = Bytes + +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has + * stalled. This will trigger a forced authority set change at the beginning + * of the next session, to be enacted `delay` blocks after that. The delay + * should be high enough to safely assume that the block signalling the + * forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters + * will start the new authority set using the given finalized block as base. + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: BlockNumber + bestFinalizedBlockNumber: BlockNumber +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface KeyOwnerProof { + session: SessionIndex + trieNodes: Bytes[] + validatorCount: ValidatorCount +} + +export interface GrandpaEquivocationProof { + setId: SetId + equivocation: GrandpaEquivocation +} + +export type GrandpaEquivocation = GrandpaEquivocation_Precommit | GrandpaEquivocation_Prevote + +export interface GrandpaEquivocation_Precommit { + __kind: 'Precommit' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocation_Prevote { + __kind: 'Prevote' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocationValue { + roundNumber: bigint + identity: AuthorityId + first: [GrandpaPrevote, AuthoritySignature] + second: [GrandpaPrevote, AuthoritySignature] +} + +export type AuthoritySignature = Bytes + +export interface GrandpaPrevote { + targetHash: Hash + targetNumber: BlockNumber +} + +export type AuthorityId = Bytes + +export type SetId = bigint + +export type FinalityTrackerCall = FinalityTrackerCall_final_hint + +/** + * Hint that the author of this block thinks the best finalized + * block is the given number. + */ +export interface FinalityTrackerCall_final_hint { + __kind: 'final_hint' + hint: number +} + +export type ElectionsPhragmenCall = ElectionsPhragmenCall_remove_member | ElectionsPhragmenCall_remove_voter | ElectionsPhragmenCall_renounce_candidacy | ElectionsPhragmenCall_report_defunct_voter | ElectionsPhragmenCall_submit_candidacy | ElectionsPhragmenCall_vote + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, a new phragmen election is started. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement: + * - Base weight: 50.93 µs + * - State reads: + * - RunnersUp.len() + * - Members, RunnersUp (remove_and_replace_member) + * - State writes: + * - Members, RunnersUp (remove_and_replace_member) + * Else, since this is a root call and will go into phragmen, we assume full block for now. + * # + */ +export interface ElectionsPhragmenCall_remove_member { + __kind: 'remove_member' + who: LookupSource + hasReplacement: boolean +} + +/** + * Remove `origin` as a voter. This removes the lock and returns the bond. + * + * # + * Base weight: 36.8 µs + * All state access is from do_remove_voter. + * State reads: + * - Voting + * - [AccountData(who)] + * State writes: + * - Voting + * - Locks + * - [AccountData(who)] + * # + */ +export interface ElectionsPhragmenCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * - `origin` is a candidate and not elected in any set. In this case, the bond is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the bond is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the bond is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_voter`], if replacement runners exists, they are immediately used. + * + * If a candidate is renouncing: + * Base weight: 17.28 µs + * Complexity of candidate_count: 0.235 µs + * State reads: + * - Candidates + * - [AccountBalance(who) (unreserve)] + * State writes: + * - Candidates + * - [AccountBalance(who) (unreserve)] + * If member is renouncing: + * Base weight: 46.25 µs + * State reads: + * - Members, RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * State writes: + * - Members, RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * If runner is renouncing: + * Base weight: 46.25 µs + * State reads: + * - RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * State writes: + * - RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * + * Weight note: The call into changeMembers need to be accounted for. + * + */ +export interface ElectionsPhragmenCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Report `target` for being an defunct voter. In case of a valid report, the reporter is + * rewarded by the bond amount of `target`. Otherwise, the reporter itself is removed and + * their bond is slashed. + * + * A defunct voter is defined to be: + * - a voter whose current submitted votes are all invalid. i.e. all of them are no + * longer a candidate nor an active member or a runner-up. + * + * + * The origin must provide the number of current candidates and votes of the reported target + * for the purpose of accurate weight calculation. + * + * # + * No Base weight based on min square analysis. + * Complexity of candidate_count: 1.755 µs + * Complexity of vote_count: 18.51 µs + * State reads: + * - Voting(reporter) + * - Candidate.len() + * - Voting(Target) + * - Candidates, Members, RunnersUp (is_defunct_voter) + * State writes: + * - Lock(reporter || target) + * - [AccountBalance(reporter)] + AccountBalance(target) + * - Voting(reporter || target) + * Note: the db access is worse with respect to db, which is when the report is correct. + * # + */ +export interface ElectionsPhragmenCall_report_defunct_voter { + __kind: 'report_defunct_voter' + defunct: DefunctVoter +} + +/** + * Submit oneself for candidacy. + * + * A candidate will either: + * - Lose at the end of the term and forfeit their deposit. + * - Win and become a member. Members will eventually get their stash back. + * - Become a runner-up. Runners-ups are reserved members in case one gets forcefully + * removed. + * + * # + * Base weight = 33.33 µs + * Complexity of candidate_count: 0.375 µs + * State reads: + * - Candidates.len() + * - Candidates + * - Members + * - RunnersUp + * - [AccountBalance(who)] + * State writes: + * - [AccountBalance(who)] + * - Candidates + * # + */ +export interface ElectionsPhragmenCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a bond amount is + * reserved. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * It is the responsibility of the caller to not place all of their balance into the lock + * and keep some for further transactions. + * + * # + * Base weight: 47.93 µs + * State reads: + * - Candidates.len() + Members.len() + RunnersUp.len() + * - Voting (is_voter) + * - [AccountBalance(who) (unreserve + total_balance)] + * State writes: + * - Voting + * - Lock + * - [AccountBalance(who) (unreserve -- only when creating a new voter)] + * # + */ +export interface ElectionsPhragmenCall_vote { + __kind: 'vote' + votes: AccountId[] + value: bigint +} + +export interface DefunctVoter { + who: AccountId + voteCount: number + candidateCount: number +} + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +export type DemocracyCall = DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * # + * - `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + * - Db reads: `scheduler lookup`, scheduler agenda` + * - Db writes: `scheduler lookup`, scheduler agenda` + * # + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: ReferendumIndex +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # + * - Complexity: `O(1)`. + * - Db writes: `ReferendumInfoOf` + * # + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * # + * - `O(1)`. + * - Db writes: `PublicProps` + * # + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must + * not be more than the account's current balance. + * + * Emits `Delegated`. + * + * # + * - Complexity: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + * - Db reads: 3*`VotingOf`, `origin account locks` + * - Db writes: 3*`VotingOf`, `origin account locks` + * - Db reads per votes: `ReferendumInfoOf` + * - Db writes per votes: `ReferendumInfoOf` + * # + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId + conviction: Conviction + balance: BalanceOf +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * # + * - Complexity: `O(1)`. + * - Db reads: `ReferendumInfoOf`, `Cancellations` + * - Db writes: `ReferendumInfoOf`, `Cancellations` + * # + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: ReferendumIndex +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: Hash + index: ReferendumIndex +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * # + * - Complexity `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + * - Db reads: `NextExternal`, `Blacklist` + * - Db writes: `NextExternal` + * # + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: Hash +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * # + * - Complexity: `O(1)` + * - Db write: `NextExternal` + * # + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: Hash +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * # + * - Complexity: `O(1)` + * - Db write: `NextExternal` + * # + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: Hash +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * `FastTrackVotingPeriod` if too low. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * # + * - Complexity: `O(1)` + * - Db reads: `NextExternal`, `ReferendumCount` + * - Db writes: `NextExternal`, `ReferendumCount`, `ReferendumInfoOf` + * - Base Weight: 30.1 µs + * # + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: Hash + votingPeriod: BlockNumber + delay: BlockNumber +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. When this call is successful, i.e. + * the preimage has not been uploaded before and matches some imminent proposal, + * no fee is paid. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * # + * - Complexity: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + * - Db reads: `Preimages` + * - Db writes: `Preimages` + * # + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * # + * - Complexity: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + * - Db reads: `Preimages` + * - Db writes: `Preimages` + * # + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * # + * - Complexity: `O(1)` + * - Db reads: `PublicPropCount`, `PublicProps` + * - Db writes: `PublicPropCount`, `PublicProps`, `DepositOf` + * # + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: Hash + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. + * Extrinsic is weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * # + * - Complexity: `O(D)` where D is length of proposal. + * - Db reads: `Preimages`, provider account data + * - Db writes: `Preimages` provider account data + * # + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: Hash + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * # + * - `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + * - Db reads: `ReferendumInfoOf`, `VotingOf` + * - Db writes: `ReferendumInfoOf`, `VotingOf` + * # + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId + index: ReferendumIndex +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * # + * - `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + * - Db reads: `ReferendumInfoOf`, `VotingOf` + * - Db writes: `ReferendumInfoOf`, `VotingOf` + * # + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: ReferendumIndex +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * # + * - Complexity: `O(S)` where S is the number of seconds a proposal already has. + * - Db reads: `DepositOf` + * - Db writes: `DepositOf` + * # + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * # + * - Complexity: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + * - Db reads: 2*`VotingOf` + * - Db writes: 2*`VotingOf` + * - Db reads per votes: `ReferendumInfoOf` + * - Db writes per votes: `ReferendumInfoOf` + * # + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * # + * - Complexity `O(R)` with R number of vote of target. + * - Db reads: `VotingOf`, `balances locks`, `target account` + * - Db writes: `VotingOf`, `balances locks`, `target account` + * # + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * # + * - Complexity: `O(V + log(V))` where V is number of `existing vetoers` + * Performs a binary search on `existing_vetoers` which should not be very large. + * - Db reads: `NextExternal`, `Blacklist` + * - Db writes: `NextExternal`, `Blacklist` + * # + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: Hash +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * # + * - Complexity: `O(R)` where R is the number of referendums the voter has voted on. + * weight is charged as if maximum votes. + * - Db reads: `ReferendumInfoOf`, `VotingOf`, `balances locks` + * - Db writes: `ReferendumInfoOf`, `VotingOf`, `balances locks` + * # + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + value: AccountVoteSplit +} + +export interface AccountVote_Standard { + __kind: 'Standard' + value: AccountVoteStandard +} + +export interface AccountVoteStandard { + vote: Vote + balance: Balance +} + +export type Vote = number + +export interface AccountVoteSplit { + aye: Balance + nay: Balance +} + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +export type ReferendumIndex = number + +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * Base Weight: .49 * P + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MAX_MEMBERS` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export type MemberCount = number + +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * Total Complexity: O(1) + * ---------------------------- + * Base Weight: 93.3 µs + * DB Weight: + * - Read: Preclaims, Signing, Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + * - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting, Signing, Preclaims + * Validate PreValidateAttests: +8.631 µs + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * - One `eth_recover` operation which involves a keccak hash and a + * ecdsa recover. + * - Three storage reads to check if a claim exists for the user, to + * get the current pot size, to see if there exists a vesting schedule. + * - Up to one storage write for adding a new vesting schedule. + * - One `deposit_creating` Currency call. + * - One storage write to update the total. + * - Two storage removals for vesting and claims information. + * - One deposit event. + * + * Total Complexity: O(1) + * ---------------------------- + * Base Weight: 269.7 µs + * DB Weight: + * - Read: Signing, Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + * - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting, Signing + * Validate Unsigned: +188.7 µs + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * - One `eth_recover` operation which involves a keccak hash and a + * ecdsa recover. + * - Four storage reads to check if a claim exists for the user, to + * get the current pot size, to see if there exists a vesting schedule, to get the + * required statement. + * - Up to one storage write for adding a new vesting schedule. + * - One `deposit_creating` Currency call. + * - One storage write to update the total. + * - Two storage removals for vesting and claims information. + * - One deposit event. + * + * Total Complexity: O(1) + * ---------------------------- + * Base Weight: 270.2 µs + * DB Weight: + * - Read: Signing, Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + * - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting, Signing + * Validate Unsigned: +190.1 µs + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * - One storage mutate to increase the total claims available. + * - One storage write to add a new claim. + * - Up to one storage write to add a new vesting schedule. + * + * Total Complexity: O(1) + * --------------------- + * Base Weight: 10.46 µs + * DB Weight: + * - Reads: Total + * - Writes: Total, Claims + * - Maybe Write: Vesting, Statement + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: BalanceOf + vestingSchedule?: ([BalanceOf, BalanceOf, BlockNumber] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId | undefined) +} + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is + * not assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: LookupSource + dest: LookupSource + value: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also decrease the total issuance of the system (`TotalIssuance`). + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + * + * # + * - Independent of the arguments. + * - Contains a limited number of reads and writes. + * --------------------- + * - Base Weight: + * - Creating: 27.56 µs + * - Killing: 35.11 µs + * - DB Weight: 1 Read, 1 Write to `who` + * # + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: LookupSource + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * It will decrease the total issuance of the system by the `TransferFee`. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for + * input config types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional + * check that the transfer will not kill the origin account. + * --------------------------------- + * - Base Weight: 73.64 µs, worst case scenario (account created, account removed) + * - DB Weight: 1 Read and 1 Write to destination account + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: LookupSource + value: bigint +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Module.html#method.transfer + * # + * - Cheaper than transfer because account cannot be killed. + * - Base Weight: 51.4 µs + * - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already) + * # + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: LookupSource + value: bigint +} + +export type BabeCall = BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface BabeEquivocationProof { + offender: AuthorityId + slotNumber: SlotNumber + firstHeader: Header + secondHeader: Header +} + +export interface Header { + parentHash: Hash + number: number + stateRoot: Hash + extrinsicsRoot: Hash + digest: Digest +} + +export interface Digest { + logs: DigestItem[] +} + +export type DigestItem = DigestItem_AuthoritiesChange | DigestItem_ChangesTrieRoot | DigestItem_ChangesTrieSignal | DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal | DigestItem_SealV0 + +export interface DigestItem_AuthoritiesChange { + __kind: 'AuthoritiesChange' + value: AuthorityId[] +} + +export interface DigestItem_ChangesTrieRoot { + __kind: 'ChangesTrieRoot' + value: Hash +} + +export interface DigestItem_ChangesTrieSignal { + __kind: 'ChangesTrieSignal' + value: ChangesTrieSignal +} + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: Consensus +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: PreRuntime +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: Seal +} + +export interface DigestItem_SealV0 { + __kind: 'SealV0' + value: SealV0 +} + +export type SealV0 = [bigint, Signature] + +export type Seal = [ConsensusEngineId, Bytes] + +export type PreRuntime = [ConsensusEngineId, Bytes] + +export type Consensus = [ConsensusEngineId, Bytes] + +export type ConsensusEngineId = Bytes + +export type ChangesTrieSignal = ChangesTrieSignal_NewConfiguration + +export interface ChangesTrieSignal_NewConfiguration { + __kind: 'NewConfiguration' + value?: (ChangesTrieConfiguration | undefined) +} + +export type SlotNumber = bigint + +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +export type AuthorityDiscoveryCall = never + +export type AttestationsCall = AttestationsCall_more_attestations + +/** + * Provide candidate receipts for parachains, in ascending order by id. + */ +export interface AttestationsCall_more_attestations { + __kind: 'more_attestations' +} + +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * Base Weight: .49 * P + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MAX_MEMBERS` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: Key, + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => Key), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + set_changes_trie_config: sts.enumStruct({ + changesTrieConfig: sts.option(() => ChangesTrieConfiguration), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => KeyValue), + }), + suicide: sts.unit(), + } +}) + +export const KeyValue = sts.tuple(() => [StorageKey, StorageData]) + +export const StorageData = sts.bytes() + +export const StorageKey = sts.bytes() + +export const ChangesTrieConfiguration: sts.Type = sts.struct(() => { + return { + digestInterval: sts.number(), + digestLevels: sts.number(), + } +}) + +export const Key = sts.bytes() + +export const Perbill = sts.number() + +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: LookupSource, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: EraIndex, + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => LookupSource), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId, + era: EraIndex, + }), + reap_stash: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: LookupSource, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + validators: sts.array(() => AccountId), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + submit_election_solution: sts.enumStruct({ + winners: sts.array(() => ValidatorIndex), + compact: CompactAssignments, + score: ElectionScore, + era: EraIndex, + size: ElectionSize, + }), + submit_election_solution_unsigned: sts.enumStruct({ + winners: sts.array(() => ValidatorIndex), + compact: CompactAssignments, + score: ElectionScore, + era: EraIndex, + size: ElectionSize, + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + } +}) + +export const ElectionSize: sts.Type = sts.struct(() => { + return { + validators: sts.number(), + nominators: sts.number(), + } +}) + +export const ElectionScore = sts.array(() => sts.bigint()) + +export const CompactAssignments: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes2: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes3: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes4: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes5: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes6: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes7: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes8: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes9: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes10: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes11: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes12: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes13: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes14: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes15: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + votes16: sts.array(() => sts.tuple(() => [NominatorIndex, sts.array(() => CompactScore), ValidatorIndex])), + } +}) + +export const CompactScore = sts.tuple(() => [ValidatorIndex, OffchainAccuracy]) + +export const OffchainAccuracy = sts.number() + +export const NominatorIndex = sts.number() + +export const ValidatorIndex = sts.number() + +export const Percent = sts.number() + +export const EraIndex = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: BalanceOf, + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId, + judgement: SocietyJudgement, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: LookupSource, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId, + value: BalanceOf, + tip: BalanceOf, + }), + } +}) + +export const SocietyJudgement: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + sub: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + bid_renew: sts.enumStruct({ + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + elaborate_deploy_data: sts.enumStruct({ + paraId: sts.number(), + code: ValidationCode, + }), + fix_deploy_data: sts.enumStruct({ + sub: sts.number(), + paraId: sts.number(), + codeHash: Hash, + codeSize: sts.number(), + initialHeadData: HeadData, + }), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + set_offboarding: sts.enumStruct({ + dest: LookupSource, + }), + } +}) + +export const HeadData = sts.bytes() + +export const ValidationCode = sts.bytes() + +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: Keys, + proof: sts.bytes(), + }), + } +}) + +export const Keys = sts.tuple(() => [AccountId, AccountId, AccountId, AccountId, AccountId]) + +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: BlockNumber, + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_192, + }), + schedule_after: sts.enumStruct({ + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_192, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_192, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_192, + }), + } +}) + +export const Priority = sts.number() + +export const Period = sts.tuple(() => [BlockNumber, sts.number()]) + +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + deregister_para: sts.enumStruct({ + id: sts.number(), + }), + deregister_parathread: sts.unit(), + register_para: sts.enumStruct({ + id: sts.number(), + info: ParaInfo, + code: ValidationCode, + initialHeadData: HeadData, + }), + register_parathread: sts.enumStruct({ + code: ValidationCode, + initialHeadData: HeadData, + }), + select_parathread: sts.enumStruct({ + id: sts.number(), + collator: CollatorId, + headHash: Hash, + }), + set_thread_count: sts.enumStruct({ + count: sts.number(), + }), + swap: sts.enumStruct({ + other: sts.number(), + }), + } +}) + +export const CollatorId = sts.bytes() + +export const ParaInfo: sts.Type = sts.struct(() => { + return { + manager: AccountId, + deposit: Balance, + locked: sts.boolean(), + } +}) + +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId, + call: Type_192, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId, + }), + claim_recovery: sts.enumStruct({ + account: AccountId, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId), + threshold: sts.number(), + delayPeriod: BlockNumber, + }), + initiate_recovery: sts.enumStruct({ + account: AccountId, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + } +}) + +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + proxy: AccountId, + proxyType: ProxyType, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_192, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + proxy: AccountId, + proxyType: ProxyType, + }), + } +}) + +export const ParachainsCall: sts.Type = sts.closedEnum(() => { + return { + report_double_vote: sts.enumStruct({ + report: DoubleVoteReport, + }), + send_xcmp_message: sts.enumStruct({ + to: ParaId, + msg: sts.bytes(), + }), + set_heads: sts.enumStruct({ + heads: sts.array(() => AttestedCandidate), + }), + transfer_to_parachain: sts.enumStruct({ + to: ParaId, + amount: Balance, + remark: Remark, + }), + } +}) + +export const Remark = sts.bytes() + +export const AttestedCandidate: sts.Type = sts.struct(() => { + return { + candidate: AbridgedCandidateReceipt, + validityVotes: sts.array(() => ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: ValidatorSignature, + Implicit: ValidatorSignature, + Never: sts.unit(), + } +}) + +export const ValidatorSignature = sts.bytes() + +export const AbridgedCandidateReceipt: sts.Type = sts.struct(() => { + return { + parachainIndex: ParaId, + relayParent: Hash, + headData: HeadData, + collator: CollatorId, + signature: CollatorSignature, + povBlockHash: Hash, + commitments: CandidateCommitments, + } +}) + +export const CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => UpwardMessage), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: BlockNumber, + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: sts.number(), + data: sts.bytes(), + } +}) + +export const UpwardMessage = sts.bytes() + +export const CollatorSignature = sts.bytes() + +export const ParaId = sts.number() + +export const DoubleVoteReport: sts.Type = sts.struct(() => { + return { + identity: ValidatorId, + first: sts.tuple(() => [Statement, ValidatorSignature]), + second: sts.tuple(() => [Statement, ValidatorSignature]), + proof: MembershipProof, + signingContext: SigningContext, + } +}) + +export const SigningContext: sts.Type = sts.struct(() => { + return { + sessionIndex: SessionIndex, + parentHash: Hash, + } +}) + +export const SessionIndex = sts.number() + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: SessionIndex, + trieNodes: sts.array(() => sts.bytes()), + validatorCount: ValidatorCount, + } +}) + +export const ValidatorCount = sts.number() + +export const Statement: sts.Type = sts.closedEnum(() => { + return { + Candidate: Hash, + Invalid: Hash, + Never: sts.unit(), + Valid: Hash, + } +}) + +export const ValidatorId = sts.bytes() + +export const OffencesCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + call: OpaqueCall, + storeCall: sts.boolean(), + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId), + call: Type_192, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const OpaqueCall = sts.bytes() + +export const Weight = sts.bigint() + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: BlockNumber, + index: sts.number(), + } +}) + +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: AccountIndex, + }), + force_transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: AccountIndex, + }), + freeze: sts.enumStruct({ + index: AccountIndex, + }), + transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + }), + } +}) + +export const AccountIndex = sts.number() + +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: Signature, + }), + } +}) + +export const Signature = sts.bytes() + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: BlockNumber, + networkState: OpaqueNetworkState, + sessionIndex: SessionIndex, + authorityIndex: AuthIndex, + validatorsLen: sts.number(), + } +}) + +export const AuthIndex = sts.number() + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId, + }), + add_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: RegistrarIndex, + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: LookupSource, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: LookupSource, + judgement: IdentityJudgement, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: LookupSource, + }), + rename_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: sts.bigint(), + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => IdentityInfoAdditional), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => H160), + image: Data, + twitter: Data, + } +}) + +export const H160 = sts.bytes() + +export const IdentityInfoAdditional = sts.tuple(() => [Data, Data]) + +export const IdentityJudgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: Balance, + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export const RegistrarIndex = sts.number() + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: H256, + Keccak256: H256, + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: H256, + ShaThree256: H256, + } +}) + +export const H256 = sts.bytes() + +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: BlockNumber, + bestFinalizedBlockNumber: BlockNumber, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const KeyOwnerProof: sts.Type = sts.struct(() => { + return { + session: SessionIndex, + trieNodes: sts.array(() => sts.bytes()), + validatorCount: ValidatorCount, + } +}) + +export const GrandpaEquivocationProof: sts.Type = sts.struct(() => { + return { + setId: SetId, + equivocation: GrandpaEquivocation, + } +}) + +export const GrandpaEquivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: GrandpaEquivocationValue, + Prevote: GrandpaEquivocationValue, + } +}) + +export const GrandpaEquivocationValue: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: AuthorityId, + first: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + second: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + } +}) + +export const AuthoritySignature = sts.bytes() + +export const GrandpaPrevote: sts.Type = sts.struct(() => { + return { + targetHash: Hash, + targetNumber: BlockNumber, + } +}) + +export const AuthorityId = sts.bytes() + +export const SetId = sts.bigint() + +export const FinalityTrackerCall: sts.Type = sts.closedEnum(() => { + return { + final_hint: sts.enumStruct({ + hint: sts.number(), + }), + } +}) + +export const ElectionsPhragmenCall: sts.Type = sts.closedEnum(() => { + return { + remove_member: sts.enumStruct({ + who: LookupSource, + hasReplacement: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + report_defunct_voter: sts.enumStruct({ + defunct: DefunctVoter, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId), + value: sts.bigint(), + }), + } +}) + +export const DefunctVoter: sts.Type = sts.struct(() => { + return { + who: AccountId, + voteCount: sts.number(), + candidateCount: sts.number(), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + cancel_queued: sts.enumStruct({ + which: ReferendumIndex, + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId, + conviction: Conviction, + balance: BalanceOf, + }), + emergency_cancel: sts.enumStruct({ + refIndex: ReferendumIndex, + }), + enact_proposal: sts.enumStruct({ + proposalHash: Hash, + index: ReferendumIndex, + }), + external_propose: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_default: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: Hash, + }), + fast_track: sts.enumStruct({ + proposalHash: Hash, + votingPeriod: BlockNumber, + delay: BlockNumber, + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: Hash, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: Hash, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId, + index: ReferendumIndex, + }), + remove_vote: sts.enumStruct({ + index: ReferendumIndex, + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId, + }), + veto_external: sts.enumStruct({ + proposalHash: Hash, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: AccountVoteSplit, + Standard: AccountVoteStandard, + } +}) + +export const AccountVoteStandard: sts.Type = sts.struct(() => { + return { + vote: Vote, + balance: Balance, + } +}) + +export const Vote = sts.number() + +export const AccountVoteSplit: sts.Type = sts.struct(() => { + return { + aye: Balance, + nay: Balance, + } +}) + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export const ReferendumIndex = sts.number() + +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: BalanceOf, + vestingSchedule: sts.option(() => sts.tuple(() => [BalanceOf, BalanceOf, BlockNumber])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: LookupSource, + dest: LookupSource, + value: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: LookupSource, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + } +}) + +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + report_equivocation: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const BabeEquivocationProof: sts.Type = sts.struct(() => { + return { + offender: AuthorityId, + slotNumber: SlotNumber, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: Hash, + number: sts.number(), + stateRoot: Hash, + extrinsicsRoot: Hash, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + AuthoritiesChange: sts.array(() => AuthorityId), + ChangesTrieRoot: Hash, + ChangesTrieSignal: ChangesTrieSignal, + Consensus: Consensus, + Other: sts.bytes(), + PreRuntime: PreRuntime, + RuntimeEnvironmentUpdated: sts.unit(), + Seal: Seal, + SealV0: SealV0, + } +}) + +export const SealV0 = sts.tuple(() => [sts.bigint(), Signature]) + +export const Seal = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const PreRuntime = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const Consensus = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const ConsensusEngineId = sts.bytes() + +export const ChangesTrieSignal: sts.Type = sts.closedEnum(() => { + return { + NewConfiguration: sts.option(() => ChangesTrieConfiguration), + } +}) + +export const SlotNumber = sts.bigint() + +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +export const AuthorityDiscoveryCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const AttestationsCall: sts.Type = sts.closedEnum(() => { + return { + more_attestations: sts.unit(), + } +}) + +export type Type_192 = Type_192_Attestations | Type_192_AuthorityDiscovery | Type_192_Authorship | Type_192_Babe | Type_192_Balances | Type_192_Claims | Type_192_Council | Type_192_Democracy | Type_192_ElectionsPhragmen | Type_192_FinalityTracker | Type_192_Grandpa | Type_192_Identity | Type_192_ImOnline | Type_192_Indices | Type_192_Multisig | Type_192_Offences | Type_192_Parachains | Type_192_Proxy | Type_192_Recovery | Type_192_Registrar | Type_192_Scheduler | Type_192_Session | Type_192_Slots | Type_192_Society | Type_192_Staking | Type_192_System | Type_192_TechnicalCommittee | Type_192_TechnicalMembership | Type_192_Timestamp | Type_192_Treasury | Type_192_Utility | Type_192_Vesting + +export interface Type_192_Attestations { + __kind: 'Attestations' + value: AttestationsCall +} + +export interface Type_192_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Type_192_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Type_192_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Type_192_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Type_192_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Type_192_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Type_192_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Type_192_ElectionsPhragmen { + __kind: 'ElectionsPhragmen' + value: ElectionsPhragmenCall +} + +export interface Type_192_FinalityTracker { + __kind: 'FinalityTracker' + value: FinalityTrackerCall +} + +export interface Type_192_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Type_192_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Type_192_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Type_192_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Type_192_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Type_192_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Type_192_Parachains { + __kind: 'Parachains' + value: ParachainsCall +} + +export interface Type_192_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Type_192_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Type_192_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Type_192_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Type_192_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Type_192_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Type_192_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Type_192_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Type_192_System { + __kind: 'System' + value: SystemCall +} + +export interface Type_192_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Type_192_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Type_192_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Type_192_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Type_192_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Type_192_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId = sts.bytes() diff --git a/squid/src/types/v2023.ts b/squid/src/types/v2023.ts new file mode 100644 index 00000000..c42e7059 --- /dev/null +++ b/squid/src/types/v2023.ts @@ -0,0 +1,6515 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Type_194: sts.Type = sts.closedEnum(() => { + return { + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Democracy: DemocracyCall, + DummyAttestations: DummyAttestationsCall, + DummyParachains: DummyParachainsCall, + DummyRegistrar: DummyRegistrarCall, + DummySlots: DummySlotsCall, + ElectionsPhragmen: ElectionsPhragmenCall, + FinalityTracker: FinalityTrackerCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + } +}) + +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: LookupSource, + target: LookupSource, + schedule: VestingInfo, + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: LookupSource, + }), + vested_transfer: sts.enumStruct({ + target: LookupSource, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: Balance, + perBlock: Balance, + startingBlock: BlockNumber, + } +}) + +export const BlockNumber = sts.number() + +export const Balance = sts.bigint() + +export interface VestingInfo { + locked: Balance + perBlock: Balance + startingBlock: BlockNumber +} + +export type BlockNumber = number + +export type Balance = bigint + +export const LookupSource = sts.bytes() + +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * - Benchmark: 100.3 + .365 * l µs (min square analysis) + * - Using 100 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks. + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: LookupSource + target: LookupSource + schedule: VestingInfo +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this module. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * - Benchmark: + * - Unlocked: 48.76 + .048 * l µs (min square analysis) + * - Locked: 44.43 + .284 * l µs (min square analysis) + * - Using 50 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks. + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this module. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * - Benchmark: + * - Unlocked: 44.3 + .294 * l µs (min square analysis) + * - Locked: 48.16 + .103 * l µs (min square analysis) + * - Using 50 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks. + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: LookupSource +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Benchmark: 100.3 + .365 * l µs (min square analysis) + * - Using 100 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks. + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: LookupSource + schedule: VestingInfo +} + +export type LookupSource = Bytes + +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Type_194, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Type_194), + }), + } +}) + +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Type_194 +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Trait::BaseCallFilter`). + * + * # + * - Base weight: 14.39 + .987 * c µs + * - Plus the sum of the weights of the `calls`. + * - Plus one additional event. (repeat read/write) + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Type_194[] +} + +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + close_tip: sts.enumStruct({ + hash: Hash, + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: LookupSource, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + }), + retract_tip: sts.enumStruct({ + hash: Hash, + }), + tip: sts.enumStruct({ + hash: Hash, + tipValue: BalanceOf, + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + tipValue: BalanceOf, + }), + } +}) + +export const BalanceOf = sts.bigint() + +export const Hash = sts.bytes() + +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_close_tip | TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_report_awesome | TreasuryCall_retract_tip | TreasuryCall_tip | TreasuryCall_tip_new + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`. + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TreasuryCall_close_tip { + __kind: 'close_tip' + hash: Hash +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: LookupSource +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `TipReportDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips`, `who account data` + * - DbWrites: `Tips`, `who account data` + * # + */ +export interface TreasuryCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TreasuryCall_retract_tip { + __kind: 'retract_tip' + hash: Hash +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`, insert tip and check closing, + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TreasuryCall_tip { + __kind: 'tip' + hash: Hash + tipValue: BalanceOf +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T` + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TreasuryCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId + tipValue: BalanceOf +} + +export type BalanceOf = bigint + +export type AccountId = Bytes + +export type Hash = Bytes + +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(T)` where `T` complexity of `on_timestamp_set` + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in `on_finalize`) + * - 1 event handler `on_timestamp_set` `O(T)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId, + }), + change_key: sts.enumStruct({ + new: AccountId, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId), + }), + set_prime: sts.enumStruct({ + who: AccountId, + }), + swap_member: sts.enumStruct({ + remove: AccountId, + add: AccountId, + }), + } +}) + +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId + add: AccountId +} + +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const MemberCount = sts.number() + +export const Proposal: sts.Type = sts.closedEnum(() => { + return { + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Democracy: DemocracyCall, + DummyAttestations: DummyAttestationsCall, + DummyParachains: DummyParachainsCall, + DummyRegistrar: DummyRegistrarCall, + DummySlots: DummySlotsCall, + ElectionsPhragmen: ElectionsPhragmenCall, + FinalityTracker: FinalityTrackerCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + } +}) + +export type Proposal = Proposal_AuthorityDiscovery | Proposal_Authorship | Proposal_Babe | Proposal_Balances | Proposal_Claims | Proposal_Council | Proposal_Democracy | Proposal_DummyAttestations | Proposal_DummyParachains | Proposal_DummyRegistrar | Proposal_DummySlots | Proposal_ElectionsPhragmen | Proposal_FinalityTracker | Proposal_Grandpa | Proposal_Identity | Proposal_ImOnline | Proposal_Indices | Proposal_Multisig | Proposal_Offences | Proposal_Proxy | Proposal_Recovery | Proposal_Scheduler | Proposal_Session | Proposal_Society | Proposal_Staking | Proposal_System | Proposal_TechnicalCommittee | Proposal_TechnicalMembership | Proposal_Timestamp | Proposal_Treasury | Proposal_Utility | Proposal_Vesting + +export interface Proposal_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Proposal_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Proposal_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Proposal_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Proposal_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Proposal_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Proposal_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Proposal_DummyAttestations { + __kind: 'DummyAttestations' + value: DummyAttestationsCall +} + +export interface Proposal_DummyParachains { + __kind: 'DummyParachains' + value: DummyParachainsCall +} + +export interface Proposal_DummyRegistrar { + __kind: 'DummyRegistrar' + value: DummyRegistrarCall +} + +export interface Proposal_DummySlots { + __kind: 'DummySlots' + value: DummySlotsCall +} + +export interface Proposal_ElectionsPhragmen { + __kind: 'ElectionsPhragmen' + value: ElectionsPhragmenCall +} + +export interface Proposal_FinalityTracker { + __kind: 'FinalityTracker' + value: FinalityTrackerCall +} + +export interface Proposal_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Proposal_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Proposal_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Proposal_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Proposal_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Proposal_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Proposal_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Proposal_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Proposal_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Proposal_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Proposal_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Proposal_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Proposal_System { + __kind: 'System' + value: SystemCall +} + +export interface Proposal_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Proposal_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Proposal_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Proposal_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Proposal_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Proposal_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_set_changes_trie_config | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage | SystemCall_suicide + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + * + * # + * - `O(P)` where `P` amount of keys with prefix `prefix` + * - `P` storage deletions. + * - Base Weight: 0.834 * P µs + * - Writes: Number of subkeys + 1 + * # + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Key + subkeys: number +} + +/** + * Kill some items from storage. + * + * # + * - `O(IK)` where `I` length of `keys` and `K` length of one key + * - `I` storage deletions. + * - Base Weight: .378 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Key[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * - Base Weight: 0.665 µs, independent of remark length. + * - No DB operations. + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Set the new changes trie configuration. + * + * # + * - `O(1)` + * - 1 storage write or delete (codec `O(1)`). + * - 1 call to `deposit_log`: Uses `append` API, so O(1) + * - Base Weight: 7.218 µs + * - DB Weight: + * - Writes: Changes Trie, System Digest + * # + */ +export interface SystemCall_set_changes_trie_config { + __kind: 'set_changes_trie_config' + changesTrieConfig?: (ChangesTrieConfiguration | undefined) +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 storage write (codec `O(C)`). + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is expensive). + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very expensive. + * We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + * + * # + * - `O(1)` + * - 1 storage write. + * - Base Weight: 1.405 µs + * - 1 write to HEAP_PAGES + * # + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + * + * # + * - `O(I)` where `I` length of `items` + * - `I` storage writes (`O(1)`). + * - Base Weight: 0.568 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: KeyValue[] +} + +/** + * Kill the sending account, assuming there are no references outstanding and the composite + * data is equal to its default value. + * + * # + * - `O(1)` + * - 1 storage read and deletion. + * -------------------- + * Base Weight: 8.626 µs + * No DB Read or Write operations because caller is already in overlay + * # + */ +export interface SystemCall_suicide { + __kind: 'suicide' +} + +export type KeyValue = [StorageKey, StorageData] + +export type StorageData = Bytes + +export type StorageKey = Bytes + +export interface ChangesTrieConfiguration { + digestInterval: number + digestLevels: number +} + +export type Key = Bytes + +export type Perbill = number + +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_validator_count | StakingCall_submit_election_solution | StakingCall_submit_election_solution_unsigned | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * Base Weight: 67.87 µs + * DB Weight: + * - Read: Bonded, Ledger, [Origin Account], Current Era, History Depth, Locks + * - Write: Bonded, Payee, [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: LookupSource + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount + * that can be added. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller and + * it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * - One DB entry. + * ------------ + * Base Weight: 54.88 µs + * DB Weight: + * - Read: Era Election Status, Bonded, Ledger, [Origin Account], Locks + * - Write: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + * + * # + * Complexity: O(U + S) + * with U unapplied slashes weighted with U=1000 + * and S is the number of slash indices to be canceled. + * - Base: 5870 + 34.61 * S µs + * - Read: Unapplied Slashes + * - Write: Unapplied Slashes + * # + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: EraIndex + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * -------- + * Base Weight: 16.53 µs + * DB Weight: + * - Read: EraElectionStatus, Ledger + * - Write: Validators, Nominators + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Base Weight: 1.959 µs + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - Base Weight: 2.05 µs + * - Write: ForceEra + * # + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Base Weight: 1.857 µs + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + * + * # + * O(S) where S is the number of slashing spans to be removed + * Base Weight: 53.07 + 2.365 * S µs + * Reads: Bonded, Slashing Spans, Account, Locks + * Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Account, Locks + * Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Base Weight: 1.717 µs + * Read/Write: Validator Count + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. This can only be called when + * [`EraElectionStatus`] is `Closed`. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS). + * - Both the reads and writes follow a similar pattern. + * --------- + * Base Weight: 22.34 + .36 * N µs + * where N is the number of targets + * DB Weight: + * - Reads: Era Election Status, Ledger, Current Era + * - Writes: Validators, Nominators + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: LookupSource[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * This can only be called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Base Weight: + * - Reward Destination Staked: 110 + 54.2 * N µs (Median Slopes) + * - Reward Destination Controller (Creating): 120 + 41.95 * N µs (Median Slopes) + * DB Weight: + * - Read: EraElectionStatus, CurrentEra, HistoryDepth, ErasValidatorReward, + * ErasStakersClipped, ErasRewardPoints, ErasValidatorPrefs (8 items) + * - Read Each: Bonded, Ledger, Payee, Locks, System Account (5 items) + * - Write Each: System Account, Locks, Ledger (3 items) + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId + era: EraIndex +} + +/** + * Remove all data structure concerning a staker/stash once its balance is zero. + * This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone + * and the target `stash` must have no funds left. + * + * This can be called from any origin. + * + * - `stash`: The stash account to reap. Its balance must be zero. + * + * # + * Complexity: O(S) where S is the number of slashing spans on the account. + * Base Weight: 75.94 + 2.396 * S µs + * DB Weight: + * - Reads: Stash Account, Bonded, Slashing Spans, Locks + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Stash Account, Locks + * - Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller, and it can be only called when + * [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MAX_UNLOCKING_CHUNKS`. + * - Storage changes: Can't increase storage, only decrease it. + * --------------- + * - Base Weight: 34.51 µs * .048 L µs + * - DB Weight: + * - Reads: EraElectionStatus, Ledger, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Base Weight: 1.717 µs + * Read/Write: Validator Count + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Base Weight: 25.22 µs + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: LookupSource +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. + * This should report all the storage items that will be deleted by clearing old + * era history. Needed to report an accurate weight for the dispatch. Trusted by + * `Root` to report an accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Base Weight: 29.13 * E µs + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + * + * # + * - O(V) + * - Base Weight: 2.208 + .006 * V µs + * - Write: Invulnerables + * # + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + validators: AccountId[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Base Weight: 11.33 µs + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Base Weight: 1.717 µs + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Submit an election result to the chain. If the solution: + * + * 1. is valid. + * 2. has a better score than a potentially existing solution on chain. + * + * then, it will be _put_ on chain. + * + * A solution consists of two pieces of data: + * + * 1. `winners`: a flat vector of all the winners of the round. + * 2. `assignments`: the compact version of an assignment vector that encodes the edge + * weights. + * + * Both of which may be computed using _phragmen_, or any other algorithm. + * + * Additionally, the submitter must provide: + * + * - The `score` that they claim their solution has. + * + * Both validators and nominators will be represented by indices in the solution. The + * indices should respect the corresponding types ([`ValidatorIndex`] and + * [`NominatorIndex`]). Moreover, they should be valid when used to index into + * [`SnapshotValidators`] and [`SnapshotNominators`]. Any invalid index will cause the + * solution to be rejected. These two storage items are set during the election window and + * may be used to determine the indices. + * + * A solution is valid if: + * + * 0. It is submitted when [`EraElectionStatus`] is `Open`. + * 1. Its claimed score is equal to the score computed on-chain. + * 2. Presents the correct number of winners. + * 3. All indexes must be value according to the snapshot vectors. All edge values must + * also be correct and should not overflow the granularity of the ratio type (i.e. 256 + * or billion). + * 4. For each edge, all targets are actually nominated by the voter. + * 5. Has correct self-votes. + * + * A solutions score is consisted of 3 parameters: + * + * 1. `min { support.total }` for each support of a winner. This value should be maximized. + * 2. `sum { support.total }` for each support of a winner. This value should be minimized. + * 3. `sum { support.total^2 }` for each support of a winner. This value should be + * minimized (to ensure less variance) + * + * # + * See `crate::weight` module. + * # + */ +export interface StakingCall_submit_election_solution { + __kind: 'submit_election_solution' + winners: ValidatorIndex[] + compact: CompactAssignments + score: ElectionScore + era: EraIndex + size: ElectionSize +} + +/** + * Unsigned version of `submit_election_solution`. + * + * Note that this must pass the [`ValidateUnsigned`] check which only allows transactions + * from the local node to be included. In other words, only the block author can include a + * transaction in the block. + * + * # + * See `crate::weight` module. + * # + */ +export interface StakingCall_submit_election_solution_unsigned { + __kind: 'submit_election_solution_unsigned' + winners: ValidatorIndex[] + compact: CompactAssignments + score: ElectionScore + era: EraIndex + size: ElectionSize +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + * + * # + * - Independent of the arguments. Limited but potentially exploitable complexity. + * - Contains a limited number of reads. + * - Each call (requires the remainder of the bonded balance to be above `minimum_balance`) + * will cause a new entry to be inserted into a vector (`Ledger.unlocking`) kept in storage. + * The only way to clean the aforementioned storage item is also user-controlled via + * `withdraw_unbonded`. + * - One DB entry. + * ---------- + * Base Weight: 50.34 µs + * DB Weight: + * - Read: Era Election Status, Ledger, Current Era, Locks, [Origin Account] + * - Write: [Origin Account], Locks, Ledger + * + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ----------- + * Base Weight: 17.13 µs + * DB Weight: + * - Read: Era Election Status, Ledger + * - Write: Nominators, Validators + * # + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * - Could be dependent on the `origin` argument and how much `unlocking` chunks exist. + * It implies `consolidate_unlocked` which loops over `Ledger.unlocking`, which is + * indirectly user-controlled. See [`unbond`] for more detail. + * - Contains a limited number of reads, yet the size of which could be large based on `ledger`. + * - Writes are limited to the `origin` account key. + * --------------- + * Complexity O(S) where S is the number of slashing spans to remove + * Base Weight: + * Update: 50.52 + .028 * S µs + * - Reads: EraElectionStatus, Ledger, Current Era, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * Kill: 79.41 + 2.366 * S µs + * - Reads: EraElectionStatus, Ledger, Current Era, Bonded, Slashing Spans, [Origin Account], Locks + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, [Origin Account], Locks + * - Writes Each: SpanSlash * S + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +export interface ValidatorPrefs { + commission: number +} + +export interface ElectionSize { + validators: number + nominators: number +} + +export type ElectionScore = bigint[] + +export interface CompactAssignments { + votes1: [NominatorIndexCompact, ValidatorIndexCompact][] + votes2: [NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact][] + votes3: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes4: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes5: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes6: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes7: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes8: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes9: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes10: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes11: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes12: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes13: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes14: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes15: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes16: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] +} + +export type CompactScoreCompact = [ValidatorIndexCompact, OffchainAccuracyCompact] + +export type OffchainAccuracyCompact = number + +export type ValidatorIndexCompact = number + +export type NominatorIndexCompact = number + +export type ValidatorIndex = number + +export type Percent = number + +export type EraIndex = number + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: BalanceOf +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * module to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId + judgement: SocietyJudgement +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin + * forgives (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: LookupSource + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId + value: BalanceOf + tip: BalanceOf +} + +export type SocietyJudgement = SocietyJudgement_Approve | SocietyJudgement_Rebid | SocietyJudgement_Reject + +export interface SocietyJudgement_Approve { + __kind: 'Approve' +} + +export interface SocietyJudgement_Rebid { + __kind: 'Rebid' +} + +export interface SocietyJudgement_Reject { + __kind: 'Reject' +} + +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` in number of key types. + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwnder` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: Keys + proof: Bytes +} + +export type Keys = [AccountId, AccountId, AccountId, AccountId, AccountId] + +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.15 + 2.869 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: BlockNumber + index: number +} + +/** + * Cancel a named scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 24.91 + 2.907 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.29 + .126 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda + * - Will use base weight of 25 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_194 +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_194 +} + +/** + * Schedule a named task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 29.6 + .159 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 35 which should be good for more than 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_194 +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`]. + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_194 +} + +export type Priority = number + +export type Period = [BlockNumber, number] + +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + * + * # + * - The weight of the `call` + 10,000. + * - One storage lookup to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId + call: Type_194 +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + * + * # + * - One storage mutation to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully + * recovered by you. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + V) + * # + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + * + * # + * Key: V (len of vouching friends) + * - One storage read/remove to get the active recovery process. O(1), Codec O(V) + * - One balance call to repatriate reserved. O(X) + * - One event. + * + * Total Complexity: O(V + X) + * # + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. + * Should be ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt + * before the account can be recovered. Should be less than or equal to + * the length of the list of friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized + * that needs to pass before the account can be recovered. + * + * # + * - Key: F (len of friends) + * - One storage read to check that account is not already recoverable. O(1). + * - A check that the friends list is sorted and unique. O(F) + * - One currency reserve operation. O(X) + * - One storage write. O(1). Codec O(F). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId[] + threshold: number + delayPeriod: BlockNumber +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account + * needs to be recoverable (i.e. have a recovery configuration). + * + * # + * - One storage read to check that account is recoverable. O(F) + * - One storage read to check that this recovery process hasn't already started. O(1) + * - One currency reserve operation. O(X) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + * + * # + * Key: F (len of friends) + * - One storage read to get the prefix iterator for active recoveries. O(1) + * - One storage read/remove to get the recovery configuration. O(1), Codec O(F) + * - One balance call to unreserved. O(X) + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + * + * # + * - One storage write O(1) + * - One event + * # + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId + rescuer: AccountId +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you + * want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One binary search to confirm caller is a friend. O(logF) + * - One binary search to confirm caller has not already vouched. O(logV) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + logF + V + logV) + * # + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId + rescuer: AccountId +} + +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: AccountId + proxyType: ProxyType + delay: BlockNumber +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: AccountId + callHash: CallHashOf +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + * TODO: Might be over counting 1 read + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: BlockNumber + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_194 +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: AccountId + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_194 +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: AccountId + callHash: CallHashOf +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: AccountId + callHash: CallHashOf +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: AccountId + proxyType: ProxyType + delay: BlockNumber +} + +export type CallHashOf = Bytes + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +export type OffencesCall = never + +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - Base Weight: + * - Create: 44.71 + 0.088 * S + * - Approve: 31.48 + 0.116 * S + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - Base Weight: + * - Create: 41.89 + 0.118 * S + .002 * Z µs + * - Create w/ Store: 53.57 + 0.119 * S + .003 * Z µs + * - Approve: 31.39 + 0.136 * S + .002 * Z µs + * - Complete: 39.94 + 0.26 * S + .002 * Z µs + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + call: OpaqueCall + storeCall: boolean + maxWeight: Weight +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - Base Weight: 33.72 + 0.002 * Z µs + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId[] + call: Type_194 +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - Base Weight: 36.07 + 0.124 * S + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId[] + timepoint: Timepoint + callHash: Bytes +} + +export type OpaqueCall = Bytes + +export type Weight = bigint + +export interface Timepoint { + height: BlockNumber + index: number +} + +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - Base Weight: 28.69 µs + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: AccountIndex +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - Base Weight: 26.83 µs + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId + index: AccountIndex + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - Base Weight: 25.53 µs + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: AccountIndex +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - Base Weight: 30.86 µs + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: AccountIndex +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - Base Weight: 33.74 µs + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId + index: AccountIndex +} + +export type AccountIndex = number + +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` and E is length of + * `Heartbeat.network_state.external_address` + * + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Signature +} + +export type Signature = Bytes + +export interface Heartbeat { + blockNumber: BlockNumber + networkState: OpaqueNetworkState + sessionIndex: SessionIndex + authorityIndex: AuthIndex + validatorsLen: number +} + +export type AuthIndex = number + +export type SessionIndex = number + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: LookupSource + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: RegistrarIndex +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: LookupSource +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: LookupSource + judgement: IdentityJudgement +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: LookupSource +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: LookupSource + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: bigint +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId, Data][] +} + +export interface IdentityInfo { + additional: IdentityInfoAdditional[] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (H160 | undefined) + image: Data + twitter: Data +} + +export type H160 = Bytes + +export type IdentityInfoAdditional = [Data, Data] + +export type IdentityJudgement = IdentityJudgement_Erroneous | IdentityJudgement_FeePaid | IdentityJudgement_KnownGood | IdentityJudgement_LowQuality | IdentityJudgement_OutOfDate | IdentityJudgement_Reasonable | IdentityJudgement_Unknown + +export interface IdentityJudgement_Erroneous { + __kind: 'Erroneous' +} + +export interface IdentityJudgement_FeePaid { + __kind: 'FeePaid' + value: Balance +} + +export interface IdentityJudgement_KnownGood { + __kind: 'KnownGood' +} + +export interface IdentityJudgement_LowQuality { + __kind: 'LowQuality' +} + +export interface IdentityJudgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface IdentityJudgement_Reasonable { + __kind: 'Reasonable' +} + +export interface IdentityJudgement_Unknown { + __kind: 'Unknown' +} + +export type RegistrarIndex = number + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: H256 +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: H256 +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: H256 +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: H256 +} + +export type H256 = Bytes + +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has + * stalled. This will trigger a forced authority set change at the beginning + * of the next session, to be enacted `delay` blocks after that. The delay + * should be high enough to safely assume that the block signalling the + * forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters + * will start the new authority set using the given finalized block as base. + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: BlockNumber + bestFinalizedBlockNumber: BlockNumber +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface KeyOwnerProof { + session: SessionIndex + trieNodes: Bytes[] + validatorCount: ValidatorCount +} + +export type ValidatorCount = number + +export interface GrandpaEquivocationProof { + setId: SetId + equivocation: GrandpaEquivocation +} + +export type GrandpaEquivocation = GrandpaEquivocation_Precommit | GrandpaEquivocation_Prevote + +export interface GrandpaEquivocation_Precommit { + __kind: 'Precommit' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocation_Prevote { + __kind: 'Prevote' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocationValue { + roundNumber: bigint + identity: AuthorityId + first: [GrandpaPrevote, AuthoritySignature] + second: [GrandpaPrevote, AuthoritySignature] +} + +export type AuthoritySignature = Bytes + +export interface GrandpaPrevote { + targetHash: Hash + targetNumber: BlockNumber +} + +export type AuthorityId = Bytes + +export type SetId = bigint + +export type FinalityTrackerCall = FinalityTrackerCall_final_hint + +/** + * Hint that the author of this block thinks the best finalized + * block is the given number. + */ +export interface FinalityTrackerCall_final_hint { + __kind: 'final_hint' + hint: number +} + +export type ElectionsPhragmenCall = ElectionsPhragmenCall_remove_member | ElectionsPhragmenCall_remove_voter | ElectionsPhragmenCall_renounce_candidacy | ElectionsPhragmenCall_report_defunct_voter | ElectionsPhragmenCall_submit_candidacy | ElectionsPhragmenCall_vote + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, a new phragmen election is started. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement: + * - Base weight: 50.93 µs + * - State reads: + * - RunnersUp.len() + * - Members, RunnersUp (remove_and_replace_member) + * - State writes: + * - Members, RunnersUp (remove_and_replace_member) + * Else, since this is a root call and will go into phragmen, we assume full block for now. + * # + */ +export interface ElectionsPhragmenCall_remove_member { + __kind: 'remove_member' + who: LookupSource + hasReplacement: boolean +} + +/** + * Remove `origin` as a voter. This removes the lock and returns the bond. + * + * # + * Base weight: 36.8 µs + * All state access is from do_remove_voter. + * State reads: + * - Voting + * - [AccountData(who)] + * State writes: + * - Voting + * - Locks + * - [AccountData(who)] + * # + */ +export interface ElectionsPhragmenCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * - `origin` is a candidate and not elected in any set. In this case, the bond is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the bond is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the bond is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_voter`], if replacement runners exists, they are immediately used. + * + * If a candidate is renouncing: + * Base weight: 17.28 µs + * Complexity of candidate_count: 0.235 µs + * State reads: + * - Candidates + * - [AccountBalance(who) (unreserve)] + * State writes: + * - Candidates + * - [AccountBalance(who) (unreserve)] + * If member is renouncing: + * Base weight: 46.25 µs + * State reads: + * - Members, RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * State writes: + * - Members, RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * If runner is renouncing: + * Base weight: 46.25 µs + * State reads: + * - RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * State writes: + * - RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * + * Weight note: The call into changeMembers need to be accounted for. + * + */ +export interface ElectionsPhragmenCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Report `target` for being an defunct voter. In case of a valid report, the reporter is + * rewarded by the bond amount of `target`. Otherwise, the reporter itself is removed and + * their bond is slashed. + * + * A defunct voter is defined to be: + * - a voter whose current submitted votes are all invalid. i.e. all of them are no + * longer a candidate nor an active member or a runner-up. + * + * + * The origin must provide the number of current candidates and votes of the reported target + * for the purpose of accurate weight calculation. + * + * # + * No Base weight based on min square analysis. + * Complexity of candidate_count: 1.755 µs + * Complexity of vote_count: 18.51 µs + * State reads: + * - Voting(reporter) + * - Candidate.len() + * - Voting(Target) + * - Candidates, Members, RunnersUp (is_defunct_voter) + * State writes: + * - Lock(reporter || target) + * - [AccountBalance(reporter)] + AccountBalance(target) + * - Voting(reporter || target) + * Note: the db access is worse with respect to db, which is when the report is correct. + * # + */ +export interface ElectionsPhragmenCall_report_defunct_voter { + __kind: 'report_defunct_voter' + defunct: DefunctVoter +} + +/** + * Submit oneself for candidacy. + * + * A candidate will either: + * - Lose at the end of the term and forfeit their deposit. + * - Win and become a member. Members will eventually get their stash back. + * - Become a runner-up. Runners-ups are reserved members in case one gets forcefully + * removed. + * + * # + * Base weight = 33.33 µs + * Complexity of candidate_count: 0.375 µs + * State reads: + * - Candidates.len() + * - Candidates + * - Members + * - RunnersUp + * - [AccountBalance(who)] + * State writes: + * - [AccountBalance(who)] + * - Candidates + * # + */ +export interface ElectionsPhragmenCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a bond amount is + * reserved. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * It is the responsibility of the caller to not place all of their balance into the lock + * and keep some for further transactions. + * + * # + * Base weight: 47.93 µs + * State reads: + * - Candidates.len() + Members.len() + RunnersUp.len() + * - Voting (is_voter) + * - [AccountBalance(who) (unreserve + total_balance)] + * State writes: + * - Voting + * - Lock + * - [AccountBalance(who) (unreserve -- only when creating a new voter)] + * # + */ +export interface ElectionsPhragmenCall_vote { + __kind: 'vote' + votes: AccountId[] + value: bigint +} + +export interface DefunctVoter { + who: AccountId + voteCount: number + candidateCount: number +} + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +export type DummySlotsCall = never + +export type DummyRegistrarCall = never + +export type DummyParachainsCall = never + +export type DummyAttestationsCall = never + +export type DemocracyCall = DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * # + * - `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + * - Db reads: `scheduler lookup`, scheduler agenda` + * - Db writes: `scheduler lookup`, scheduler agenda` + * # + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: ReferendumIndex +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # + * - Complexity: `O(1)`. + * - Db writes: `ReferendumInfoOf` + * # + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * # + * - `O(1)`. + * - Db writes: `PublicProps` + * # + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must + * not be more than the account's current balance. + * + * Emits `Delegated`. + * + * # + * - Complexity: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + * - Db reads: 3*`VotingOf`, `origin account locks` + * - Db writes: 3*`VotingOf`, `origin account locks` + * - Db reads per votes: `ReferendumInfoOf` + * - Db writes per votes: `ReferendumInfoOf` + * # + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId + conviction: Conviction + balance: BalanceOf +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * # + * - Complexity: `O(1)`. + * - Db reads: `ReferendumInfoOf`, `Cancellations` + * - Db writes: `ReferendumInfoOf`, `Cancellations` + * # + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: ReferendumIndex +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: Hash + index: ReferendumIndex +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * # + * - Complexity `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + * - Db reads: `NextExternal`, `Blacklist` + * - Db writes: `NextExternal` + * # + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: Hash +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * # + * - Complexity: `O(1)` + * - Db write: `NextExternal` + * # + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: Hash +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * # + * - Complexity: `O(1)` + * - Db write: `NextExternal` + * # + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: Hash +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * `FastTrackVotingPeriod` if too low. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * # + * - Complexity: `O(1)` + * - Db reads: `NextExternal`, `ReferendumCount` + * - Db writes: `NextExternal`, `ReferendumCount`, `ReferendumInfoOf` + * - Base Weight: 30.1 µs + * # + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: Hash + votingPeriod: BlockNumber + delay: BlockNumber +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. When this call is successful, i.e. + * the preimage has not been uploaded before and matches some imminent proposal, + * no fee is paid. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * # + * - Complexity: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + * - Db reads: `Preimages` + * - Db writes: `Preimages` + * # + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * # + * - Complexity: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + * - Db reads: `Preimages` + * - Db writes: `Preimages` + * # + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * # + * - Complexity: `O(1)` + * - Db reads: `PublicPropCount`, `PublicProps` + * - Db writes: `PublicPropCount`, `PublicProps`, `DepositOf` + * # + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: Hash + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. + * Extrinsic is weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * # + * - Complexity: `O(D)` where D is length of proposal. + * - Db reads: `Preimages`, provider account data + * - Db writes: `Preimages` provider account data + * # + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: Hash + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * # + * - `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + * - Db reads: `ReferendumInfoOf`, `VotingOf` + * - Db writes: `ReferendumInfoOf`, `VotingOf` + * # + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId + index: ReferendumIndex +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * # + * - `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + * - Db reads: `ReferendumInfoOf`, `VotingOf` + * - Db writes: `ReferendumInfoOf`, `VotingOf` + * # + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: ReferendumIndex +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * # + * - Complexity: `O(S)` where S is the number of seconds a proposal already has. + * - Db reads: `DepositOf` + * - Db writes: `DepositOf` + * # + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * # + * - Complexity: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + * - Db reads: 2*`VotingOf` + * - Db writes: 2*`VotingOf` + * - Db reads per votes: `ReferendumInfoOf` + * - Db writes per votes: `ReferendumInfoOf` + * # + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * # + * - Complexity `O(R)` with R number of vote of target. + * - Db reads: `VotingOf`, `balances locks`, `target account` + * - Db writes: `VotingOf`, `balances locks`, `target account` + * # + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * # + * - Complexity: `O(V + log(V))` where V is number of `existing vetoers` + * Performs a binary search on `existing_vetoers` which should not be very large. + * - Db reads: `NextExternal`, `Blacklist` + * - Db writes: `NextExternal`, `Blacklist` + * # + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: Hash +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * # + * - Complexity: `O(R)` where R is the number of referendums the voter has voted on. + * weight is charged as if maximum votes. + * - Db reads: `ReferendumInfoOf`, `VotingOf`, `balances locks` + * - Db writes: `ReferendumInfoOf`, `VotingOf`, `balances locks` + * # + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + value: AccountVoteSplit +} + +export interface AccountVote_Standard { + __kind: 'Standard' + value: AccountVoteStandard +} + +export interface AccountVoteStandard { + vote: Vote + balance: Balance +} + +export type Vote = number + +export interface AccountVoteSplit { + aye: Balance + nay: Balance +} + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +export type ReferendumIndex = number + +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * Base Weight: .49 * P + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MAX_MEMBERS` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export type MemberCount = number + +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * Total Complexity: O(1) + * ---------------------------- + * Base Weight: 93.3 µs + * DB Weight: + * - Read: Preclaims, Signing, Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + * - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting, Signing, Preclaims + * Validate PreValidateAttests: +8.631 µs + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * - One `eth_recover` operation which involves a keccak hash and a + * ecdsa recover. + * - Three storage reads to check if a claim exists for the user, to + * get the current pot size, to see if there exists a vesting schedule. + * - Up to one storage write for adding a new vesting schedule. + * - One `deposit_creating` Currency call. + * - One storage write to update the total. + * - Two storage removals for vesting and claims information. + * - One deposit event. + * + * Total Complexity: O(1) + * ---------------------------- + * Base Weight: 269.7 µs + * DB Weight: + * - Read: Signing, Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + * - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting, Signing + * Validate Unsigned: +188.7 µs + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * - One `eth_recover` operation which involves a keccak hash and a + * ecdsa recover. + * - Four storage reads to check if a claim exists for the user, to + * get the current pot size, to see if there exists a vesting schedule, to get the + * required statement. + * - Up to one storage write for adding a new vesting schedule. + * - One `deposit_creating` Currency call. + * - One storage write to update the total. + * - Two storage removals for vesting and claims information. + * - One deposit event. + * + * Total Complexity: O(1) + * ---------------------------- + * Base Weight: 270.2 µs + * DB Weight: + * - Read: Signing, Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + * - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting, Signing + * Validate Unsigned: +190.1 µs + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * - One storage mutate to increase the total claims available. + * - One storage write to add a new claim. + * - Up to one storage write to add a new vesting schedule. + * + * Total Complexity: O(1) + * --------------------- + * Base Weight: 10.46 µs + * DB Weight: + * - Reads: Total + * - Writes: Total, Claims + * - Maybe Write: Vesting, Statement + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: BalanceOf + vestingSchedule?: ([BalanceOf, BalanceOf, BlockNumber] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId | undefined) +} + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is + * not assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: LookupSource + dest: LookupSource + value: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also decrease the total issuance of the system (`TotalIssuance`). + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + * + * # + * - Independent of the arguments. + * - Contains a limited number of reads and writes. + * --------------------- + * - Base Weight: + * - Creating: 27.56 µs + * - Killing: 35.11 µs + * - DB Weight: 1 Read, 1 Write to `who` + * # + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: LookupSource + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * It will decrease the total issuance of the system by the `TransferFee`. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for + * input config types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional + * check that the transfer will not kill the origin account. + * --------------------------------- + * - Base Weight: 73.64 µs, worst case scenario (account created, account removed) + * - DB Weight: 1 Read and 1 Write to destination account + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: LookupSource + value: bigint +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Module.html#method.transfer + * # + * - Cheaper than transfer because account cannot be killed. + * - Base Weight: 51.4 µs + * - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already) + * # + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: LookupSource + value: bigint +} + +export type BabeCall = BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface BabeEquivocationProof { + offender: AuthorityId + slotNumber: SlotNumber + firstHeader: Header + secondHeader: Header +} + +export interface Header { + parentHash: Hash + number: number + stateRoot: Hash + extrinsicsRoot: Hash + digest: Digest +} + +export interface Digest { + logs: DigestItem[] +} + +export type DigestItem = DigestItem_AuthoritiesChange | DigestItem_ChangesTrieRoot | DigestItem_ChangesTrieSignal | DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal | DigestItem_SealV0 + +export interface DigestItem_AuthoritiesChange { + __kind: 'AuthoritiesChange' + value: AuthorityId[] +} + +export interface DigestItem_ChangesTrieRoot { + __kind: 'ChangesTrieRoot' + value: Hash +} + +export interface DigestItem_ChangesTrieSignal { + __kind: 'ChangesTrieSignal' + value: ChangesTrieSignal +} + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: Consensus +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: PreRuntime +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: Seal +} + +export interface DigestItem_SealV0 { + __kind: 'SealV0' + value: SealV0 +} + +export type SealV0 = [bigint, Signature] + +export type Seal = [ConsensusEngineId, Bytes] + +export type PreRuntime = [ConsensusEngineId, Bytes] + +export type Consensus = [ConsensusEngineId, Bytes] + +export type ConsensusEngineId = Bytes + +export type ChangesTrieSignal = ChangesTrieSignal_NewConfiguration + +export interface ChangesTrieSignal_NewConfiguration { + __kind: 'NewConfiguration' + value?: (ChangesTrieConfiguration | undefined) +} + +export type SlotNumber = bigint + +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +export type AuthorityDiscoveryCall = never + +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * Base Weight: .49 * P + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MAX_MEMBERS` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: Key, + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => Key), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + set_changes_trie_config: sts.enumStruct({ + changesTrieConfig: sts.option(() => ChangesTrieConfiguration), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => KeyValue), + }), + suicide: sts.unit(), + } +}) + +export const KeyValue = sts.tuple(() => [StorageKey, StorageData]) + +export const StorageData = sts.bytes() + +export const StorageKey = sts.bytes() + +export const ChangesTrieConfiguration: sts.Type = sts.struct(() => { + return { + digestInterval: sts.number(), + digestLevels: sts.number(), + } +}) + +export const Key = sts.bytes() + +export const Perbill = sts.number() + +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: LookupSource, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: EraIndex, + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => LookupSource), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId, + era: EraIndex, + }), + reap_stash: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: LookupSource, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + validators: sts.array(() => AccountId), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + submit_election_solution: sts.enumStruct({ + winners: sts.array(() => ValidatorIndex), + compact: CompactAssignments, + score: ElectionScore, + era: EraIndex, + size: ElectionSize, + }), + submit_election_solution_unsigned: sts.enumStruct({ + winners: sts.array(() => ValidatorIndex), + compact: CompactAssignments, + score: ElectionScore, + era: EraIndex, + size: ElectionSize, + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + } +}) + +export const ElectionSize: sts.Type = sts.struct(() => { + return { + validators: sts.number(), + nominators: sts.number(), + } +}) + +export const ElectionScore = sts.array(() => sts.bigint()) + +export const CompactAssignments: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [NominatorIndexCompact, ValidatorIndexCompact])), + votes2: sts.array(() => sts.tuple(() => [NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact])), + votes3: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes4: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes5: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes6: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes7: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes8: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes9: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes10: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes11: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes12: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes13: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes14: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes15: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes16: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + } +}) + +export const CompactScoreCompact = sts.tuple(() => [ValidatorIndexCompact, OffchainAccuracyCompact]) + +export const OffchainAccuracyCompact = sts.number() + +export const ValidatorIndexCompact = sts.number() + +export const NominatorIndexCompact = sts.number() + +export const ValidatorIndex = sts.number() + +export const Percent = sts.number() + +export const EraIndex = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: BalanceOf, + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId, + judgement: SocietyJudgement, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: LookupSource, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId, + value: BalanceOf, + tip: BalanceOf, + }), + } +}) + +export const SocietyJudgement: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: Keys, + proof: sts.bytes(), + }), + } +}) + +export const Keys = sts.tuple(() => [AccountId, AccountId, AccountId, AccountId, AccountId]) + +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: BlockNumber, + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_194, + }), + schedule_after: sts.enumStruct({ + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_194, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_194, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_194, + }), + } +}) + +export const Priority = sts.number() + +export const Period = sts.tuple(() => [BlockNumber, sts.number()]) + +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId, + call: Type_194, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId, + }), + claim_recovery: sts.enumStruct({ + account: AccountId, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId), + threshold: sts.number(), + delayPeriod: BlockNumber, + }), + initiate_recovery: sts.enumStruct({ + account: AccountId, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + } +}) + +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: AccountId, + proxyType: ProxyType, + delay: BlockNumber, + }), + announce: sts.enumStruct({ + real: AccountId, + callHash: CallHashOf, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + delay: BlockNumber, + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_194, + }), + proxy_announced: sts.enumStruct({ + delegate: AccountId, + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_194, + }), + reject_announcement: sts.enumStruct({ + delegate: AccountId, + callHash: CallHashOf, + }), + remove_announcement: sts.enumStruct({ + real: AccountId, + callHash: CallHashOf, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: AccountId, + proxyType: ProxyType, + delay: BlockNumber, + }), + } +}) + +export const CallHashOf = sts.bytes() + +export const OffencesCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + call: OpaqueCall, + storeCall: sts.boolean(), + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId), + call: Type_194, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const OpaqueCall = sts.bytes() + +export const Weight = sts.bigint() + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: BlockNumber, + index: sts.number(), + } +}) + +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: AccountIndex, + }), + force_transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: AccountIndex, + }), + freeze: sts.enumStruct({ + index: AccountIndex, + }), + transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + }), + } +}) + +export const AccountIndex = sts.number() + +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: Signature, + }), + } +}) + +export const Signature = sts.bytes() + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: BlockNumber, + networkState: OpaqueNetworkState, + sessionIndex: SessionIndex, + authorityIndex: AuthIndex, + validatorsLen: sts.number(), + } +}) + +export const AuthIndex = sts.number() + +export const SessionIndex = sts.number() + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId, + }), + add_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: RegistrarIndex, + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: LookupSource, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: LookupSource, + judgement: IdentityJudgement, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: LookupSource, + }), + rename_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: sts.bigint(), + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => IdentityInfoAdditional), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => H160), + image: Data, + twitter: Data, + } +}) + +export const H160 = sts.bytes() + +export const IdentityInfoAdditional = sts.tuple(() => [Data, Data]) + +export const IdentityJudgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: Balance, + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export const RegistrarIndex = sts.number() + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: H256, + Keccak256: H256, + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: H256, + ShaThree256: H256, + } +}) + +export const H256 = sts.bytes() + +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: BlockNumber, + bestFinalizedBlockNumber: BlockNumber, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const KeyOwnerProof: sts.Type = sts.struct(() => { + return { + session: SessionIndex, + trieNodes: sts.array(() => sts.bytes()), + validatorCount: ValidatorCount, + } +}) + +export const ValidatorCount = sts.number() + +export const GrandpaEquivocationProof: sts.Type = sts.struct(() => { + return { + setId: SetId, + equivocation: GrandpaEquivocation, + } +}) + +export const GrandpaEquivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: GrandpaEquivocationValue, + Prevote: GrandpaEquivocationValue, + } +}) + +export const GrandpaEquivocationValue: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: AuthorityId, + first: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + second: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + } +}) + +export const AuthoritySignature = sts.bytes() + +export const GrandpaPrevote: sts.Type = sts.struct(() => { + return { + targetHash: Hash, + targetNumber: BlockNumber, + } +}) + +export const AuthorityId = sts.bytes() + +export const SetId = sts.bigint() + +export const FinalityTrackerCall: sts.Type = sts.closedEnum(() => { + return { + final_hint: sts.enumStruct({ + hint: sts.number(), + }), + } +}) + +export const ElectionsPhragmenCall: sts.Type = sts.closedEnum(() => { + return { + remove_member: sts.enumStruct({ + who: LookupSource, + hasReplacement: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + report_defunct_voter: sts.enumStruct({ + defunct: DefunctVoter, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId), + value: sts.bigint(), + }), + } +}) + +export const DefunctVoter: sts.Type = sts.struct(() => { + return { + who: AccountId, + voteCount: sts.number(), + candidateCount: sts.number(), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export const DummySlotsCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const DummyRegistrarCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const DummyParachainsCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const DummyAttestationsCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + cancel_queued: sts.enumStruct({ + which: ReferendumIndex, + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId, + conviction: Conviction, + balance: BalanceOf, + }), + emergency_cancel: sts.enumStruct({ + refIndex: ReferendumIndex, + }), + enact_proposal: sts.enumStruct({ + proposalHash: Hash, + index: ReferendumIndex, + }), + external_propose: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_default: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: Hash, + }), + fast_track: sts.enumStruct({ + proposalHash: Hash, + votingPeriod: BlockNumber, + delay: BlockNumber, + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: Hash, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: Hash, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId, + index: ReferendumIndex, + }), + remove_vote: sts.enumStruct({ + index: ReferendumIndex, + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId, + }), + veto_external: sts.enumStruct({ + proposalHash: Hash, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: AccountVoteSplit, + Standard: AccountVoteStandard, + } +}) + +export const AccountVoteStandard: sts.Type = sts.struct(() => { + return { + vote: Vote, + balance: Balance, + } +}) + +export const Vote = sts.number() + +export const AccountVoteSplit: sts.Type = sts.struct(() => { + return { + aye: Balance, + nay: Balance, + } +}) + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export const ReferendumIndex = sts.number() + +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: BalanceOf, + vestingSchedule: sts.option(() => sts.tuple(() => [BalanceOf, BalanceOf, BlockNumber])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: LookupSource, + dest: LookupSource, + value: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: LookupSource, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + } +}) + +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + report_equivocation: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const BabeEquivocationProof: sts.Type = sts.struct(() => { + return { + offender: AuthorityId, + slotNumber: SlotNumber, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: Hash, + number: sts.number(), + stateRoot: Hash, + extrinsicsRoot: Hash, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + AuthoritiesChange: sts.array(() => AuthorityId), + ChangesTrieRoot: Hash, + ChangesTrieSignal: ChangesTrieSignal, + Consensus: Consensus, + Other: sts.bytes(), + PreRuntime: PreRuntime, + RuntimeEnvironmentUpdated: sts.unit(), + Seal: Seal, + SealV0: SealV0, + } +}) + +export const SealV0 = sts.tuple(() => [sts.bigint(), Signature]) + +export const Seal = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const PreRuntime = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const Consensus = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const ConsensusEngineId = sts.bytes() + +export const ChangesTrieSignal: sts.Type = sts.closedEnum(() => { + return { + NewConfiguration: sts.option(() => ChangesTrieConfiguration), + } +}) + +export const SlotNumber = sts.bigint() + +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +export const AuthorityDiscoveryCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Type_194 = Type_194_AuthorityDiscovery | Type_194_Authorship | Type_194_Babe | Type_194_Balances | Type_194_Claims | Type_194_Council | Type_194_Democracy | Type_194_DummyAttestations | Type_194_DummyParachains | Type_194_DummyRegistrar | Type_194_DummySlots | Type_194_ElectionsPhragmen | Type_194_FinalityTracker | Type_194_Grandpa | Type_194_Identity | Type_194_ImOnline | Type_194_Indices | Type_194_Multisig | Type_194_Offences | Type_194_Proxy | Type_194_Recovery | Type_194_Scheduler | Type_194_Session | Type_194_Society | Type_194_Staking | Type_194_System | Type_194_TechnicalCommittee | Type_194_TechnicalMembership | Type_194_Timestamp | Type_194_Treasury | Type_194_Utility | Type_194_Vesting + +export interface Type_194_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Type_194_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Type_194_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Type_194_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Type_194_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Type_194_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Type_194_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Type_194_DummyAttestations { + __kind: 'DummyAttestations' + value: DummyAttestationsCall +} + +export interface Type_194_DummyParachains { + __kind: 'DummyParachains' + value: DummyParachainsCall +} + +export interface Type_194_DummyRegistrar { + __kind: 'DummyRegistrar' + value: DummyRegistrarCall +} + +export interface Type_194_DummySlots { + __kind: 'DummySlots' + value: DummySlotsCall +} + +export interface Type_194_ElectionsPhragmen { + __kind: 'ElectionsPhragmen' + value: ElectionsPhragmenCall +} + +export interface Type_194_FinalityTracker { + __kind: 'FinalityTracker' + value: FinalityTrackerCall +} + +export interface Type_194_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Type_194_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Type_194_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Type_194_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Type_194_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Type_194_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Type_194_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Type_194_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Type_194_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Type_194_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Type_194_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Type_194_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Type_194_System { + __kind: 'System' + value: SystemCall +} + +export interface Type_194_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Type_194_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Type_194_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Type_194_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Type_194_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Type_194_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId = sts.bytes() diff --git a/squid/src/types/v2024.ts b/squid/src/types/v2024.ts new file mode 100644 index 00000000..2f3d5f6b --- /dev/null +++ b/squid/src/types/v2024.ts @@ -0,0 +1,6511 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Type_194: sts.Type = sts.closedEnum(() => { + return { + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Democracy: DemocracyCall, + DummyAttestations: DummyAttestationsCall, + DummyParachains: DummyParachainsCall, + DummyRegistrar: DummyRegistrarCall, + DummySlots: DummySlotsCall, + ElectionsPhragmen: ElectionsPhragmenCall, + FinalityTracker: FinalityTrackerCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + } +}) + +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: LookupSource, + target: LookupSource, + schedule: VestingInfo, + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: LookupSource, + }), + vested_transfer: sts.enumStruct({ + target: LookupSource, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: Balance, + perBlock: Balance, + startingBlock: BlockNumber, + } +}) + +export const BlockNumber = sts.number() + +export const Balance = sts.bigint() + +export interface VestingInfo { + locked: Balance + perBlock: Balance + startingBlock: BlockNumber +} + +export type BlockNumber = number + +export type Balance = bigint + +export const LookupSource = sts.bytes() + +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * - Benchmark: 100.3 + .365 * l µs (min square analysis) + * - Using 100 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks. + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: LookupSource + target: LookupSource + schedule: VestingInfo +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this module. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * - Benchmark: + * - Unlocked: 48.76 + .048 * l µs (min square analysis) + * - Locked: 44.43 + .284 * l µs (min square analysis) + * - Using 50 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks. + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this module. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * - Benchmark: + * - Unlocked: 44.3 + .294 * l µs (min square analysis) + * - Locked: 48.16 + .103 * l µs (min square analysis) + * - Using 50 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks. + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: LookupSource +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Benchmark: 100.3 + .365 * l µs (min square analysis) + * - Using 100 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks. + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: LookupSource + schedule: VestingInfo +} + +export type LookupSource = Bytes + +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Type_194, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Type_194), + }), + } +}) + +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Type_194 +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Trait::BaseCallFilter`). + * + * # + * - Base weight: 14.39 + .987 * c µs + * - Plus the sum of the weights of the `calls`. + * - Plus one additional event. (repeat read/write) + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Type_194[] +} + +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + close_tip: sts.enumStruct({ + hash: Hash, + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: LookupSource, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + }), + retract_tip: sts.enumStruct({ + hash: Hash, + }), + tip: sts.enumStruct({ + hash: Hash, + tipValue: BalanceOf, + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + tipValue: BalanceOf, + }), + } +}) + +export const BalanceOf = sts.bigint() + +export const Hash = sts.bytes() + +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_close_tip | TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_report_awesome | TreasuryCall_retract_tip | TreasuryCall_tip | TreasuryCall_tip_new + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`. + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TreasuryCall_close_tip { + __kind: 'close_tip' + hash: Hash +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: LookupSource +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `TipReportDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips`, `who account data` + * - DbWrites: `Tips`, `who account data` + * # + */ +export interface TreasuryCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TreasuryCall_retract_tip { + __kind: 'retract_tip' + hash: Hash +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`, insert tip and check closing, + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TreasuryCall_tip { + __kind: 'tip' + hash: Hash + tipValue: BalanceOf +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T` + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TreasuryCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId + tipValue: BalanceOf +} + +export type BalanceOf = bigint + +export type AccountId = Bytes + +export type Hash = Bytes + +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(T)` where `T` complexity of `on_timestamp_set` + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in `on_finalize`) + * - 1 event handler `on_timestamp_set` `O(T)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId, + }), + change_key: sts.enumStruct({ + new: AccountId, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId), + }), + set_prime: sts.enumStruct({ + who: AccountId, + }), + swap_member: sts.enumStruct({ + remove: AccountId, + add: AccountId, + }), + } +}) + +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId + add: AccountId +} + +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const MemberCount = sts.number() + +export const Proposal: sts.Type = sts.closedEnum(() => { + return { + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Democracy: DemocracyCall, + DummyAttestations: DummyAttestationsCall, + DummyParachains: DummyParachainsCall, + DummyRegistrar: DummyRegistrarCall, + DummySlots: DummySlotsCall, + ElectionsPhragmen: ElectionsPhragmenCall, + FinalityTracker: FinalityTrackerCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + } +}) + +export type Proposal = Proposal_AuthorityDiscovery | Proposal_Authorship | Proposal_Babe | Proposal_Balances | Proposal_Claims | Proposal_Council | Proposal_Democracy | Proposal_DummyAttestations | Proposal_DummyParachains | Proposal_DummyRegistrar | Proposal_DummySlots | Proposal_ElectionsPhragmen | Proposal_FinalityTracker | Proposal_Grandpa | Proposal_Identity | Proposal_ImOnline | Proposal_Indices | Proposal_Multisig | Proposal_Offences | Proposal_Proxy | Proposal_Recovery | Proposal_Scheduler | Proposal_Session | Proposal_Society | Proposal_Staking | Proposal_System | Proposal_TechnicalCommittee | Proposal_TechnicalMembership | Proposal_Timestamp | Proposal_Treasury | Proposal_Utility | Proposal_Vesting + +export interface Proposal_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Proposal_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Proposal_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Proposal_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Proposal_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Proposal_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Proposal_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Proposal_DummyAttestations { + __kind: 'DummyAttestations' + value: DummyAttestationsCall +} + +export interface Proposal_DummyParachains { + __kind: 'DummyParachains' + value: DummyParachainsCall +} + +export interface Proposal_DummyRegistrar { + __kind: 'DummyRegistrar' + value: DummyRegistrarCall +} + +export interface Proposal_DummySlots { + __kind: 'DummySlots' + value: DummySlotsCall +} + +export interface Proposal_ElectionsPhragmen { + __kind: 'ElectionsPhragmen' + value: ElectionsPhragmenCall +} + +export interface Proposal_FinalityTracker { + __kind: 'FinalityTracker' + value: FinalityTrackerCall +} + +export interface Proposal_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Proposal_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Proposal_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Proposal_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Proposal_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Proposal_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Proposal_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Proposal_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Proposal_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Proposal_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Proposal_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Proposal_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Proposal_System { + __kind: 'System' + value: SystemCall +} + +export interface Proposal_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Proposal_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Proposal_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Proposal_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Proposal_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Proposal_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_set_changes_trie_config | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage | SystemCall_suicide + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + * + * # + * - `O(P)` where `P` amount of keys with prefix `prefix` + * - `P` storage deletions. + * - Base Weight: 0.834 * P µs + * - Writes: Number of subkeys + 1 + * # + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Key + subkeys: number +} + +/** + * Kill some items from storage. + * + * # + * - `O(IK)` where `I` length of `keys` and `K` length of one key + * - `I` storage deletions. + * - Base Weight: .378 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Key[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * - Base Weight: 0.665 µs, independent of remark length. + * - No DB operations. + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Set the new changes trie configuration. + * + * # + * - `O(1)` + * - 1 storage write or delete (codec `O(1)`). + * - 1 call to `deposit_log`: Uses `append` API, so O(1) + * - Base Weight: 7.218 µs + * - DB Weight: + * - Writes: Changes Trie, System Digest + * # + */ +export interface SystemCall_set_changes_trie_config { + __kind: 'set_changes_trie_config' + changesTrieConfig?: (ChangesTrieConfiguration | undefined) +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 storage write (codec `O(C)`). + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is expensive). + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very expensive. + * We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + * + * # + * - `O(1)` + * - 1 storage write. + * - Base Weight: 1.405 µs + * - 1 write to HEAP_PAGES + * # + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + * + * # + * - `O(I)` where `I` length of `items` + * - `I` storage writes (`O(1)`). + * - Base Weight: 0.568 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: KeyValue[] +} + +/** + * Kill the sending account, assuming there are no references outstanding and the composite + * data is equal to its default value. + * + * # + * - `O(1)` + * - 1 storage read and deletion. + * -------------------- + * Base Weight: 8.626 µs + * No DB Read or Write operations because caller is already in overlay + * # + */ +export interface SystemCall_suicide { + __kind: 'suicide' +} + +export type KeyValue = [StorageKey, StorageData] + +export type StorageData = Bytes + +export type StorageKey = Bytes + +export interface ChangesTrieConfiguration { + digestInterval: number + digestLevels: number +} + +export type Key = Bytes + +export type Perbill = number + +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_validator_count | StakingCall_submit_election_solution | StakingCall_submit_election_solution_unsigned | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger, [Origin Account], Current Era, History Depth, Locks + * - Write: Bonded, Payee, [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: LookupSource + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount + * that can be added. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller and + * it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * - One DB entry. + * ------------ + * DB Weight: + * - Read: Era Election Status, Bonded, Ledger, [Origin Account], Locks + * - Write: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + * + * # + * Complexity: O(U + S) + * with U unapplied slashes weighted with U=1000 + * and S is the number of slash indices to be canceled. + * - Read: Unapplied Slashes + * - Write: Unapplied Slashes + * # + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: EraIndex + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * -------- + * Weight: O(1) + * DB Weight: + * - Read: EraElectionStatus, Ledger + * - Write: Validators, Nominators + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + * + * # + * O(S) where S is the number of slashing spans to be removed + * Reads: Bonded, Slashing Spans, Account, Locks + * Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Account, Locks + * Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Same as [`set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. This can only be called when + * [`EraElectionStatus`] is `Closed`. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS). + * - Both the reads and writes follow a similar pattern. + * --------- + * Weight: O(N) + * where N is the number of targets + * DB Weight: + * - Reads: Era Election Status, Ledger, Current Era + * - Writes: Validators, Nominators + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: LookupSource[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * This can only be called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * DB Weight: + * - Read: EraElectionStatus, CurrentEra, HistoryDepth, ErasValidatorReward, + * ErasStakersClipped, ErasRewardPoints, ErasValidatorPrefs (8 items) + * - Read Each: Bonded, Ledger, Payee, Locks, System Account (5 items) + * - Write Each: System Account, Locks, Ledger (3 items) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId + era: EraIndex +} + +/** + * Remove all data structure concerning a staker/stash once its balance is zero. + * This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone + * and the target `stash` must have no funds left. + * + * This can be called from any origin. + * + * - `stash`: The stash account to reap. Its balance must be zero. + * + * # + * Complexity: O(S) where S is the number of slashing spans on the account. + * DB Weight: + * - Reads: Stash Account, Bonded, Slashing Spans, Locks + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Stash Account, Locks + * - Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller, and it can be only called when + * [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MAX_UNLOCKING_CHUNKS`. + * - Storage changes: Can't increase storage, only decrease it. + * --------------- + * - DB Weight: + * - Reads: EraElectionStatus, Ledger, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Same as [`set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: LookupSource +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. + * This should report all the storage items that will be deleted by clearing old + * era history. Needed to report an accurate weight for the dispatch. Trusted by + * `Root` to report an accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Weight: O(E) + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + * + * # + * - O(V) + * - Write: Invulnerables + * # + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Submit an election result to the chain. If the solution: + * + * 1. is valid. + * 2. has a better score than a potentially existing solution on chain. + * + * then, it will be _put_ on chain. + * + * A solution consists of two pieces of data: + * + * 1. `winners`: a flat vector of all the winners of the round. + * 2. `assignments`: the compact version of an assignment vector that encodes the edge + * weights. + * + * Both of which may be computed using _phragmen_, or any other algorithm. + * + * Additionally, the submitter must provide: + * + * - The `score` that they claim their solution has. + * + * Both validators and nominators will be represented by indices in the solution. The + * indices should respect the corresponding types ([`ValidatorIndex`] and + * [`NominatorIndex`]). Moreover, they should be valid when used to index into + * [`SnapshotValidators`] and [`SnapshotNominators`]. Any invalid index will cause the + * solution to be rejected. These two storage items are set during the election window and + * may be used to determine the indices. + * + * A solution is valid if: + * + * 0. It is submitted when [`EraElectionStatus`] is `Open`. + * 1. Its claimed score is equal to the score computed on-chain. + * 2. Presents the correct number of winners. + * 3. All indexes must be value according to the snapshot vectors. All edge values must + * also be correct and should not overflow the granularity of the ratio type (i.e. 256 + * or billion). + * 4. For each edge, all targets are actually nominated by the voter. + * 5. Has correct self-votes. + * + * A solutions score is consisted of 3 parameters: + * + * 1. `min { support.total }` for each support of a winner. This value should be maximized. + * 2. `sum { support.total }` for each support of a winner. This value should be minimized. + * 3. `sum { support.total^2 }` for each support of a winner. This value should be + * minimized (to ensure less variance) + * + * # + * The transaction is assumed to be the longest path, a better solution. + * - Initial solution is almost the same. + * - Worse solution is retraced in pre-dispatch-checks which sets its own weight. + * # + */ +export interface StakingCall_submit_election_solution { + __kind: 'submit_election_solution' + winners: ValidatorIndex[] + compact: CompactAssignments + score: ElectionScore + era: EraIndex + size: ElectionSize +} + +/** + * Unsigned version of `submit_election_solution`. + * + * Note that this must pass the [`ValidateUnsigned`] check which only allows transactions + * from the local node to be included. In other words, only the block author can include a + * transaction in the block. + * + * # + * See `crate::weight` module. + * # + */ +export interface StakingCall_submit_election_solution_unsigned { + __kind: 'submit_election_solution_unsigned' + winners: ValidatorIndex[] + compact: CompactAssignments + score: ElectionScore + era: EraIndex + size: ElectionSize +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + * + * # + * - Independent of the arguments. Limited but potentially exploitable complexity. + * - Contains a limited number of reads. + * - Each call (requires the remainder of the bonded balance to be above `minimum_balance`) + * will cause a new entry to be inserted into a vector (`Ledger.unlocking`) kept in storage. + * The only way to clean the aforementioned storage item is also user-controlled via + * `withdraw_unbonded`. + * - One DB entry. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: EraElectionStatus, Ledger, CurrentEra, Locks, BalanceOf Stash, + * - Write: Locks, Ledger, BalanceOf Stash, + * + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ----------- + * Weight: O(1) + * DB Weight: + * - Read: Era Election Status, Ledger + * - Write: Nominators, Validators + * # + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * - Could be dependent on the `origin` argument and how much `unlocking` chunks exist. + * It implies `consolidate_unlocked` which loops over `Ledger.unlocking`, which is + * indirectly user-controlled. See [`unbond`] for more detail. + * - Contains a limited number of reads, yet the size of which could be large based on `ledger`. + * - Writes are limited to the `origin` account key. + * --------------- + * Complexity O(S) where S is the number of slashing spans to remove + * Update: + * - Reads: EraElectionStatus, Ledger, Current Era, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * Kill: + * - Reads: EraElectionStatus, Ledger, Current Era, Bonded, Slashing Spans, [Origin + * Account], Locks, BalanceOf stash + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, + * [Origin Account], Locks, BalanceOf stash. + * - Writes Each: SpanSlash * S + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +export interface ValidatorPrefs { + commission: number +} + +export interface ElectionSize { + validators: number + nominators: number +} + +export type ElectionScore = bigint[] + +export interface CompactAssignments { + votes1: [NominatorIndexCompact, ValidatorIndexCompact][] + votes2: [NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact][] + votes3: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes4: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes5: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes6: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes7: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes8: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes9: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes10: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes11: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes12: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes13: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes14: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes15: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes16: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] +} + +export type CompactScoreCompact = [ValidatorIndexCompact, OffchainAccuracyCompact] + +export type OffchainAccuracyCompact = number + +export type ValidatorIndexCompact = number + +export type NominatorIndexCompact = number + +export type ValidatorIndex = number + +export type Percent = number + +export type EraIndex = number + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: BalanceOf +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * module to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId + judgement: SocietyJudgement +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin + * forgives (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: LookupSource + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId + value: BalanceOf + tip: BalanceOf +} + +export type SocietyJudgement = SocietyJudgement_Approve | SocietyJudgement_Rebid | SocietyJudgement_Reject + +export interface SocietyJudgement_Approve { + __kind: 'Approve' +} + +export interface SocietyJudgement_Rebid { + __kind: 'Rebid' +} + +export interface SocietyJudgement_Reject { + __kind: 'Reject' +} + +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` in number of key types. + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwnder` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: Keys + proof: Bytes +} + +export type Keys = [AccountId, AccountId, AccountId, AccountId, AccountId] + +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.15 + 2.869 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: BlockNumber + index: number +} + +/** + * Cancel a named scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 24.91 + 2.907 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.29 + .126 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda + * - Will use base weight of 25 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_194 +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_194 +} + +/** + * Schedule a named task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 29.6 + .159 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 35 which should be good for more than 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_194 +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`]. + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_194 +} + +export type Priority = number + +export type Period = [BlockNumber, number] + +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + * + * # + * - The weight of the `call` + 10,000. + * - One storage lookup to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId + call: Type_194 +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + * + * # + * - One storage mutation to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully + * recovered by you. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + V) + * # + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + * + * # + * Key: V (len of vouching friends) + * - One storage read/remove to get the active recovery process. O(1), Codec O(V) + * - One balance call to repatriate reserved. O(X) + * - One event. + * + * Total Complexity: O(V + X) + * # + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. + * Should be ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt + * before the account can be recovered. Should be less than or equal to + * the length of the list of friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized + * that needs to pass before the account can be recovered. + * + * # + * - Key: F (len of friends) + * - One storage read to check that account is not already recoverable. O(1). + * - A check that the friends list is sorted and unique. O(F) + * - One currency reserve operation. O(X) + * - One storage write. O(1). Codec O(F). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId[] + threshold: number + delayPeriod: BlockNumber +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account + * needs to be recoverable (i.e. have a recovery configuration). + * + * # + * - One storage read to check that account is recoverable. O(F) + * - One storage read to check that this recovery process hasn't already started. O(1) + * - One currency reserve operation. O(X) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + * + * # + * Key: F (len of friends) + * - One storage read to get the prefix iterator for active recoveries. O(1) + * - One storage read/remove to get the recovery configuration. O(1), Codec O(F) + * - One balance call to unreserved. O(X) + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + * + * # + * - One storage write O(1) + * - One event + * # + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId + rescuer: AccountId +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you + * want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One binary search to confirm caller is a friend. O(logF) + * - One binary search to confirm caller has not already vouched. O(logV) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + logF + V + logV) + * # + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId + rescuer: AccountId +} + +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: AccountId + proxyType: ProxyType + delay: BlockNumber +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: AccountId + callHash: CallHashOf +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + * TODO: Might be over counting 1 read + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: BlockNumber + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_194 +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: AccountId + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_194 +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: AccountId + callHash: CallHashOf +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: AccountId + callHash: CallHashOf +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: AccountId + proxyType: ProxyType + delay: BlockNumber +} + +export type CallHashOf = Bytes + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +export type OffencesCall = never + +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - Base Weight: + * - Create: 44.71 + 0.088 * S + * - Approve: 31.48 + 0.116 * S + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - Base Weight: + * - Create: 41.89 + 0.118 * S + .002 * Z µs + * - Create w/ Store: 53.57 + 0.119 * S + .003 * Z µs + * - Approve: 31.39 + 0.136 * S + .002 * Z µs + * - Complete: 39.94 + 0.26 * S + .002 * Z µs + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + call: OpaqueCall + storeCall: boolean + maxWeight: Weight +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - Base Weight: 33.72 + 0.002 * Z µs + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId[] + call: Type_194 +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - Base Weight: 36.07 + 0.124 * S + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId[] + timepoint: Timepoint + callHash: Bytes +} + +export type OpaqueCall = Bytes + +export type Weight = bigint + +export interface Timepoint { + height: BlockNumber + index: number +} + +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - Base Weight: 28.69 µs + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: AccountIndex +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - Base Weight: 26.83 µs + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId + index: AccountIndex + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - Base Weight: 25.53 µs + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: AccountIndex +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - Base Weight: 30.86 µs + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: AccountIndex +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - Base Weight: 33.74 µs + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId + index: AccountIndex +} + +export type AccountIndex = number + +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` and E is length of + * `Heartbeat.network_state.external_address` + * + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Signature +} + +export type Signature = Bytes + +export interface Heartbeat { + blockNumber: BlockNumber + networkState: OpaqueNetworkState + sessionIndex: SessionIndex + authorityIndex: AuthIndex + validatorsLen: number +} + +export type AuthIndex = number + +export type SessionIndex = number + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: LookupSource + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: RegistrarIndex +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: LookupSource +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: LookupSource + judgement: IdentityJudgement +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: LookupSource +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: LookupSource + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: bigint +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId, Data][] +} + +export interface IdentityInfo { + additional: IdentityInfoAdditional[] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (H160 | undefined) + image: Data + twitter: Data +} + +export type H160 = Bytes + +export type IdentityInfoAdditional = [Data, Data] + +export type IdentityJudgement = IdentityJudgement_Erroneous | IdentityJudgement_FeePaid | IdentityJudgement_KnownGood | IdentityJudgement_LowQuality | IdentityJudgement_OutOfDate | IdentityJudgement_Reasonable | IdentityJudgement_Unknown + +export interface IdentityJudgement_Erroneous { + __kind: 'Erroneous' +} + +export interface IdentityJudgement_FeePaid { + __kind: 'FeePaid' + value: Balance +} + +export interface IdentityJudgement_KnownGood { + __kind: 'KnownGood' +} + +export interface IdentityJudgement_LowQuality { + __kind: 'LowQuality' +} + +export interface IdentityJudgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface IdentityJudgement_Reasonable { + __kind: 'Reasonable' +} + +export interface IdentityJudgement_Unknown { + __kind: 'Unknown' +} + +export type RegistrarIndex = number + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: H256 +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: H256 +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: H256 +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: H256 +} + +export type H256 = Bytes + +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has + * stalled. This will trigger a forced authority set change at the beginning + * of the next session, to be enacted `delay` blocks after that. The delay + * should be high enough to safely assume that the block signalling the + * forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters + * will start the new authority set using the given finalized block as base. + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: BlockNumber + bestFinalizedBlockNumber: BlockNumber +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface KeyOwnerProof { + session: SessionIndex + trieNodes: Bytes[] + validatorCount: ValidatorCount +} + +export type ValidatorCount = number + +export interface GrandpaEquivocationProof { + setId: SetId + equivocation: GrandpaEquivocation +} + +export type GrandpaEquivocation = GrandpaEquivocation_Precommit | GrandpaEquivocation_Prevote + +export interface GrandpaEquivocation_Precommit { + __kind: 'Precommit' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocation_Prevote { + __kind: 'Prevote' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocationValue { + roundNumber: bigint + identity: AuthorityId + first: [GrandpaPrevote, AuthoritySignature] + second: [GrandpaPrevote, AuthoritySignature] +} + +export type AuthoritySignature = Bytes + +export interface GrandpaPrevote { + targetHash: Hash + targetNumber: BlockNumber +} + +export type AuthorityId = Bytes + +export type SetId = bigint + +export type FinalityTrackerCall = FinalityTrackerCall_final_hint + +/** + * Hint that the author of this block thinks the best finalized + * block is the given number. + */ +export interface FinalityTrackerCall_final_hint { + __kind: 'final_hint' + hint: number +} + +export type ElectionsPhragmenCall = ElectionsPhragmenCall_remove_member | ElectionsPhragmenCall_remove_voter | ElectionsPhragmenCall_renounce_candidacy | ElectionsPhragmenCall_report_defunct_voter | ElectionsPhragmenCall_submit_candidacy | ElectionsPhragmenCall_vote + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, a new phragmen election is started. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement: + * - Base weight: 50.93 µs + * - State reads: + * - RunnersUp.len() + * - Members, RunnersUp (remove_and_replace_member) + * - State writes: + * - Members, RunnersUp (remove_and_replace_member) + * Else, since this is a root call and will go into phragmen, we assume full block for now. + * # + */ +export interface ElectionsPhragmenCall_remove_member { + __kind: 'remove_member' + who: LookupSource + hasReplacement: boolean +} + +/** + * Remove `origin` as a voter. This removes the lock and returns the bond. + * + * # + * Base weight: 36.8 µs + * All state access is from do_remove_voter. + * State reads: + * - Voting + * - [AccountData(who)] + * State writes: + * - Voting + * - Locks + * - [AccountData(who)] + * # + */ +export interface ElectionsPhragmenCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * - `origin` is a candidate and not elected in any set. In this case, the bond is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the bond is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the bond is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_voter`], if replacement runners exists, they are immediately used. + * + * If a candidate is renouncing: + * Base weight: 17.28 µs + * Complexity of candidate_count: 0.235 µs + * State reads: + * - Candidates + * - [AccountBalance(who) (unreserve)] + * State writes: + * - Candidates + * - [AccountBalance(who) (unreserve)] + * If member is renouncing: + * Base weight: 46.25 µs + * State reads: + * - Members, RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * State writes: + * - Members, RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * If runner is renouncing: + * Base weight: 46.25 µs + * State reads: + * - RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * State writes: + * - RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * + * Weight note: The call into changeMembers need to be accounted for. + * + */ +export interface ElectionsPhragmenCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Report `target` for being an defunct voter. In case of a valid report, the reporter is + * rewarded by the bond amount of `target`. Otherwise, the reporter itself is removed and + * their bond is slashed. + * + * A defunct voter is defined to be: + * - a voter whose current submitted votes are all invalid. i.e. all of them are no + * longer a candidate nor an active member or a runner-up. + * + * + * The origin must provide the number of current candidates and votes of the reported target + * for the purpose of accurate weight calculation. + * + * # + * No Base weight based on min square analysis. + * Complexity of candidate_count: 1.755 µs + * Complexity of vote_count: 18.51 µs + * State reads: + * - Voting(reporter) + * - Candidate.len() + * - Voting(Target) + * - Candidates, Members, RunnersUp (is_defunct_voter) + * State writes: + * - Lock(reporter || target) + * - [AccountBalance(reporter)] + AccountBalance(target) + * - Voting(reporter || target) + * Note: the db access is worse with respect to db, which is when the report is correct. + * # + */ +export interface ElectionsPhragmenCall_report_defunct_voter { + __kind: 'report_defunct_voter' + defunct: DefunctVoter +} + +/** + * Submit oneself for candidacy. + * + * A candidate will either: + * - Lose at the end of the term and forfeit their deposit. + * - Win and become a member. Members will eventually get their stash back. + * - Become a runner-up. Runners-ups are reserved members in case one gets forcefully + * removed. + * + * # + * Base weight = 33.33 µs + * Complexity of candidate_count: 0.375 µs + * State reads: + * - Candidates.len() + * - Candidates + * - Members + * - RunnersUp + * - [AccountBalance(who)] + * State writes: + * - [AccountBalance(who)] + * - Candidates + * # + */ +export interface ElectionsPhragmenCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a bond amount is + * reserved. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * It is the responsibility of the caller to not place all of their balance into the lock + * and keep some for further transactions. + * + * # + * Base weight: 47.93 µs + * State reads: + * - Candidates.len() + Members.len() + RunnersUp.len() + * - Voting (is_voter) + * - [AccountBalance(who) (unreserve + total_balance)] + * State writes: + * - Voting + * - Lock + * - [AccountBalance(who) (unreserve -- only when creating a new voter)] + * # + */ +export interface ElectionsPhragmenCall_vote { + __kind: 'vote' + votes: AccountId[] + value: bigint +} + +export interface DefunctVoter { + who: AccountId + voteCount: number + candidateCount: number +} + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +export type DummySlotsCall = never + +export type DummyRegistrarCall = never + +export type DummyParachainsCall = never + +export type DummyAttestationsCall = never + +export type DemocracyCall = DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * # + * - `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + * - Db reads: `scheduler lookup`, scheduler agenda` + * - Db writes: `scheduler lookup`, scheduler agenda` + * # + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: ReferendumIndex +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # + * - Complexity: `O(1)`. + * - Db writes: `ReferendumInfoOf` + * # + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * # + * - `O(1)`. + * - Db writes: `PublicProps` + * # + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must + * not be more than the account's current balance. + * + * Emits `Delegated`. + * + * # + * - Complexity: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + * - Db reads: 3*`VotingOf`, `origin account locks` + * - Db writes: 3*`VotingOf`, `origin account locks` + * - Db reads per votes: `ReferendumInfoOf` + * - Db writes per votes: `ReferendumInfoOf` + * # + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId + conviction: Conviction + balance: BalanceOf +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * # + * - Complexity: `O(1)`. + * - Db reads: `ReferendumInfoOf`, `Cancellations` + * - Db writes: `ReferendumInfoOf`, `Cancellations` + * # + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: ReferendumIndex +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: Hash + index: ReferendumIndex +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * # + * - Complexity `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + * - Db reads: `NextExternal`, `Blacklist` + * - Db writes: `NextExternal` + * # + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: Hash +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * # + * - Complexity: `O(1)` + * - Db write: `NextExternal` + * # + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: Hash +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * # + * - Complexity: `O(1)` + * - Db write: `NextExternal` + * # + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: Hash +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * `FastTrackVotingPeriod` if too low. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * # + * - Complexity: `O(1)` + * - Db reads: `NextExternal`, `ReferendumCount` + * - Db writes: `NextExternal`, `ReferendumCount`, `ReferendumInfoOf` + * - Base Weight: 30.1 µs + * # + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: Hash + votingPeriod: BlockNumber + delay: BlockNumber +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. When this call is successful, i.e. + * the preimage has not been uploaded before and matches some imminent proposal, + * no fee is paid. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * # + * - Complexity: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + * - Db reads: `Preimages` + * - Db writes: `Preimages` + * # + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * # + * - Complexity: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + * - Db reads: `Preimages` + * - Db writes: `Preimages` + * # + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * # + * - Complexity: `O(1)` + * - Db reads: `PublicPropCount`, `PublicProps` + * - Db writes: `PublicPropCount`, `PublicProps`, `DepositOf` + * # + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: Hash + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. + * Extrinsic is weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * # + * - Complexity: `O(D)` where D is length of proposal. + * - Db reads: `Preimages`, provider account data + * - Db writes: `Preimages` provider account data + * # + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: Hash + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * # + * - `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + * - Db reads: `ReferendumInfoOf`, `VotingOf` + * - Db writes: `ReferendumInfoOf`, `VotingOf` + * # + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId + index: ReferendumIndex +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * # + * - `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + * - Db reads: `ReferendumInfoOf`, `VotingOf` + * - Db writes: `ReferendumInfoOf`, `VotingOf` + * # + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: ReferendumIndex +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * # + * - Complexity: `O(S)` where S is the number of seconds a proposal already has. + * - Db reads: `DepositOf` + * - Db writes: `DepositOf` + * # + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * # + * - Complexity: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + * - Db reads: 2*`VotingOf` + * - Db writes: 2*`VotingOf` + * - Db reads per votes: `ReferendumInfoOf` + * - Db writes per votes: `ReferendumInfoOf` + * # + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * # + * - Complexity `O(R)` with R number of vote of target. + * - Db reads: `VotingOf`, `balances locks`, `target account` + * - Db writes: `VotingOf`, `balances locks`, `target account` + * # + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * # + * - Complexity: `O(V + log(V))` where V is number of `existing vetoers` + * Performs a binary search on `existing_vetoers` which should not be very large. + * - Db reads: `NextExternal`, `Blacklist` + * - Db writes: `NextExternal`, `Blacklist` + * # + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: Hash +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * # + * - Complexity: `O(R)` where R is the number of referendums the voter has voted on. + * weight is charged as if maximum votes. + * - Db reads: `ReferendumInfoOf`, `VotingOf`, `balances locks` + * - Db writes: `ReferendumInfoOf`, `VotingOf`, `balances locks` + * # + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + value: AccountVoteSplit +} + +export interface AccountVote_Standard { + __kind: 'Standard' + value: AccountVoteStandard +} + +export interface AccountVoteStandard { + vote: Vote + balance: Balance +} + +export type Vote = number + +export interface AccountVoteSplit { + aye: Balance + nay: Balance +} + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +export type ReferendumIndex = number + +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export type MemberCount = number + +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * Total Complexity: O(1) + * ---------------------------- + * Base Weight: 93.3 µs + * DB Weight: + * - Read: Preclaims, Signing, Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + * - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting, Signing, Preclaims + * Validate PreValidateAttests: +8.631 µs + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * - One `eth_recover` operation which involves a keccak hash and a + * ecdsa recover. + * - Three storage reads to check if a claim exists for the user, to + * get the current pot size, to see if there exists a vesting schedule. + * - Up to one storage write for adding a new vesting schedule. + * - One `deposit_creating` Currency call. + * - One storage write to update the total. + * - Two storage removals for vesting and claims information. + * - One deposit event. + * + * Total Complexity: O(1) + * ---------------------------- + * Base Weight: 269.7 µs + * DB Weight: + * - Read: Signing, Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + * - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting, Signing + * Validate Unsigned: +188.7 µs + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * - One `eth_recover` operation which involves a keccak hash and a + * ecdsa recover. + * - Four storage reads to check if a claim exists for the user, to + * get the current pot size, to see if there exists a vesting schedule, to get the + * required statement. + * - Up to one storage write for adding a new vesting schedule. + * - One `deposit_creating` Currency call. + * - One storage write to update the total. + * - Two storage removals for vesting and claims information. + * - One deposit event. + * + * Total Complexity: O(1) + * ---------------------------- + * Base Weight: 270.2 µs + * DB Weight: + * - Read: Signing, Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + * - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting, Signing + * Validate Unsigned: +190.1 µs + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * - One storage mutate to increase the total claims available. + * - One storage write to add a new claim. + * - Up to one storage write to add a new vesting schedule. + * + * Total Complexity: O(1) + * --------------------- + * Base Weight: 10.46 µs + * DB Weight: + * - Reads: Total + * - Writes: Total, Claims + * - Maybe Write: Vesting, Statement + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: BalanceOf + vestingSchedule?: ([BalanceOf, BalanceOf, BlockNumber] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId | undefined) +} + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is + * not assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: LookupSource + dest: LookupSource + value: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also decrease the total issuance of the system (`TotalIssuance`). + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + * + * # + * - Independent of the arguments. + * - Contains a limited number of reads and writes. + * --------------------- + * - Base Weight: + * - Creating: 27.56 µs + * - Killing: 35.11 µs + * - DB Weight: 1 Read, 1 Write to `who` + * # + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: LookupSource + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * It will decrease the total issuance of the system by the `TransferFee`. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for + * input config types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional + * check that the transfer will not kill the origin account. + * --------------------------------- + * - Base Weight: 73.64 µs, worst case scenario (account created, account removed) + * - DB Weight: 1 Read and 1 Write to destination account + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: LookupSource + value: bigint +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Module.html#method.transfer + * # + * - Cheaper than transfer because account cannot be killed. + * - Base Weight: 51.4 µs + * - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already) + * # + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: LookupSource + value: bigint +} + +export type BabeCall = BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface BabeEquivocationProof { + offender: AuthorityId + slotNumber: SlotNumber + firstHeader: Header + secondHeader: Header +} + +export interface Header { + parentHash: Hash + number: number + stateRoot: Hash + extrinsicsRoot: Hash + digest: Digest +} + +export interface Digest { + logs: DigestItem[] +} + +export type DigestItem = DigestItem_AuthoritiesChange | DigestItem_ChangesTrieRoot | DigestItem_ChangesTrieSignal | DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal | DigestItem_SealV0 + +export interface DigestItem_AuthoritiesChange { + __kind: 'AuthoritiesChange' + value: AuthorityId[] +} + +export interface DigestItem_ChangesTrieRoot { + __kind: 'ChangesTrieRoot' + value: Hash +} + +export interface DigestItem_ChangesTrieSignal { + __kind: 'ChangesTrieSignal' + value: ChangesTrieSignal +} + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: Consensus +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: PreRuntime +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: Seal +} + +export interface DigestItem_SealV0 { + __kind: 'SealV0' + value: SealV0 +} + +export type SealV0 = [bigint, Signature] + +export type Seal = [ConsensusEngineId, Bytes] + +export type PreRuntime = [ConsensusEngineId, Bytes] + +export type Consensus = [ConsensusEngineId, Bytes] + +export type ConsensusEngineId = Bytes + +export type ChangesTrieSignal = ChangesTrieSignal_NewConfiguration + +export interface ChangesTrieSignal_NewConfiguration { + __kind: 'NewConfiguration' + value?: (ChangesTrieConfiguration | undefined) +} + +export type SlotNumber = bigint + +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +export type AuthorityDiscoveryCall = never + +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: Key, + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => Key), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + set_changes_trie_config: sts.enumStruct({ + changesTrieConfig: sts.option(() => ChangesTrieConfiguration), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => KeyValue), + }), + suicide: sts.unit(), + } +}) + +export const KeyValue = sts.tuple(() => [StorageKey, StorageData]) + +export const StorageData = sts.bytes() + +export const StorageKey = sts.bytes() + +export const ChangesTrieConfiguration: sts.Type = sts.struct(() => { + return { + digestInterval: sts.number(), + digestLevels: sts.number(), + } +}) + +export const Key = sts.bytes() + +export const Perbill = sts.number() + +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: LookupSource, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: EraIndex, + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => LookupSource), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId, + era: EraIndex, + }), + reap_stash: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: LookupSource, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + submit_election_solution: sts.enumStruct({ + winners: sts.array(() => ValidatorIndex), + compact: CompactAssignments, + score: ElectionScore, + era: EraIndex, + size: ElectionSize, + }), + submit_election_solution_unsigned: sts.enumStruct({ + winners: sts.array(() => ValidatorIndex), + compact: CompactAssignments, + score: ElectionScore, + era: EraIndex, + size: ElectionSize, + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + } +}) + +export const ElectionSize: sts.Type = sts.struct(() => { + return { + validators: sts.number(), + nominators: sts.number(), + } +}) + +export const ElectionScore = sts.array(() => sts.bigint()) + +export const CompactAssignments: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [NominatorIndexCompact, ValidatorIndexCompact])), + votes2: sts.array(() => sts.tuple(() => [NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact])), + votes3: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes4: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes5: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes6: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes7: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes8: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes9: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes10: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes11: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes12: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes13: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes14: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes15: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes16: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + } +}) + +export const CompactScoreCompact = sts.tuple(() => [ValidatorIndexCompact, OffchainAccuracyCompact]) + +export const OffchainAccuracyCompact = sts.number() + +export const ValidatorIndexCompact = sts.number() + +export const NominatorIndexCompact = sts.number() + +export const ValidatorIndex = sts.number() + +export const Percent = sts.number() + +export const EraIndex = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: BalanceOf, + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId, + judgement: SocietyJudgement, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: LookupSource, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId, + value: BalanceOf, + tip: BalanceOf, + }), + } +}) + +export const SocietyJudgement: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: Keys, + proof: sts.bytes(), + }), + } +}) + +export const Keys = sts.tuple(() => [AccountId, AccountId, AccountId, AccountId, AccountId]) + +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: BlockNumber, + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_194, + }), + schedule_after: sts.enumStruct({ + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_194, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_194, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_194, + }), + } +}) + +export const Priority = sts.number() + +export const Period = sts.tuple(() => [BlockNumber, sts.number()]) + +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId, + call: Type_194, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId, + }), + claim_recovery: sts.enumStruct({ + account: AccountId, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId), + threshold: sts.number(), + delayPeriod: BlockNumber, + }), + initiate_recovery: sts.enumStruct({ + account: AccountId, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + } +}) + +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: AccountId, + proxyType: ProxyType, + delay: BlockNumber, + }), + announce: sts.enumStruct({ + real: AccountId, + callHash: CallHashOf, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + delay: BlockNumber, + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_194, + }), + proxy_announced: sts.enumStruct({ + delegate: AccountId, + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_194, + }), + reject_announcement: sts.enumStruct({ + delegate: AccountId, + callHash: CallHashOf, + }), + remove_announcement: sts.enumStruct({ + real: AccountId, + callHash: CallHashOf, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: AccountId, + proxyType: ProxyType, + delay: BlockNumber, + }), + } +}) + +export const CallHashOf = sts.bytes() + +export const OffencesCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + call: OpaqueCall, + storeCall: sts.boolean(), + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId), + call: Type_194, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const OpaqueCall = sts.bytes() + +export const Weight = sts.bigint() + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: BlockNumber, + index: sts.number(), + } +}) + +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: AccountIndex, + }), + force_transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: AccountIndex, + }), + freeze: sts.enumStruct({ + index: AccountIndex, + }), + transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + }), + } +}) + +export const AccountIndex = sts.number() + +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: Signature, + }), + } +}) + +export const Signature = sts.bytes() + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: BlockNumber, + networkState: OpaqueNetworkState, + sessionIndex: SessionIndex, + authorityIndex: AuthIndex, + validatorsLen: sts.number(), + } +}) + +export const AuthIndex = sts.number() + +export const SessionIndex = sts.number() + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId, + }), + add_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: RegistrarIndex, + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: LookupSource, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: LookupSource, + judgement: IdentityJudgement, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: LookupSource, + }), + rename_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: sts.bigint(), + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => IdentityInfoAdditional), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => H160), + image: Data, + twitter: Data, + } +}) + +export const H160 = sts.bytes() + +export const IdentityInfoAdditional = sts.tuple(() => [Data, Data]) + +export const IdentityJudgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: Balance, + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export const RegistrarIndex = sts.number() + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: H256, + Keccak256: H256, + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: H256, + ShaThree256: H256, + } +}) + +export const H256 = sts.bytes() + +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: BlockNumber, + bestFinalizedBlockNumber: BlockNumber, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const KeyOwnerProof: sts.Type = sts.struct(() => { + return { + session: SessionIndex, + trieNodes: sts.array(() => sts.bytes()), + validatorCount: ValidatorCount, + } +}) + +export const ValidatorCount = sts.number() + +export const GrandpaEquivocationProof: sts.Type = sts.struct(() => { + return { + setId: SetId, + equivocation: GrandpaEquivocation, + } +}) + +export const GrandpaEquivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: GrandpaEquivocationValue, + Prevote: GrandpaEquivocationValue, + } +}) + +export const GrandpaEquivocationValue: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: AuthorityId, + first: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + second: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + } +}) + +export const AuthoritySignature = sts.bytes() + +export const GrandpaPrevote: sts.Type = sts.struct(() => { + return { + targetHash: Hash, + targetNumber: BlockNumber, + } +}) + +export const AuthorityId = sts.bytes() + +export const SetId = sts.bigint() + +export const FinalityTrackerCall: sts.Type = sts.closedEnum(() => { + return { + final_hint: sts.enumStruct({ + hint: sts.number(), + }), + } +}) + +export const ElectionsPhragmenCall: sts.Type = sts.closedEnum(() => { + return { + remove_member: sts.enumStruct({ + who: LookupSource, + hasReplacement: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + report_defunct_voter: sts.enumStruct({ + defunct: DefunctVoter, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId), + value: sts.bigint(), + }), + } +}) + +export const DefunctVoter: sts.Type = sts.struct(() => { + return { + who: AccountId, + voteCount: sts.number(), + candidateCount: sts.number(), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export const DummySlotsCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const DummyRegistrarCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const DummyParachainsCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const DummyAttestationsCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + cancel_queued: sts.enumStruct({ + which: ReferendumIndex, + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId, + conviction: Conviction, + balance: BalanceOf, + }), + emergency_cancel: sts.enumStruct({ + refIndex: ReferendumIndex, + }), + enact_proposal: sts.enumStruct({ + proposalHash: Hash, + index: ReferendumIndex, + }), + external_propose: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_default: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: Hash, + }), + fast_track: sts.enumStruct({ + proposalHash: Hash, + votingPeriod: BlockNumber, + delay: BlockNumber, + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: Hash, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: Hash, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId, + index: ReferendumIndex, + }), + remove_vote: sts.enumStruct({ + index: ReferendumIndex, + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId, + }), + veto_external: sts.enumStruct({ + proposalHash: Hash, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: AccountVoteSplit, + Standard: AccountVoteStandard, + } +}) + +export const AccountVoteStandard: sts.Type = sts.struct(() => { + return { + vote: Vote, + balance: Balance, + } +}) + +export const Vote = sts.number() + +export const AccountVoteSplit: sts.Type = sts.struct(() => { + return { + aye: Balance, + nay: Balance, + } +}) + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export const ReferendumIndex = sts.number() + +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: BalanceOf, + vestingSchedule: sts.option(() => sts.tuple(() => [BalanceOf, BalanceOf, BlockNumber])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: LookupSource, + dest: LookupSource, + value: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: LookupSource, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + } +}) + +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + report_equivocation: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const BabeEquivocationProof: sts.Type = sts.struct(() => { + return { + offender: AuthorityId, + slotNumber: SlotNumber, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: Hash, + number: sts.number(), + stateRoot: Hash, + extrinsicsRoot: Hash, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + AuthoritiesChange: sts.array(() => AuthorityId), + ChangesTrieRoot: Hash, + ChangesTrieSignal: ChangesTrieSignal, + Consensus: Consensus, + Other: sts.bytes(), + PreRuntime: PreRuntime, + RuntimeEnvironmentUpdated: sts.unit(), + Seal: Seal, + SealV0: SealV0, + } +}) + +export const SealV0 = sts.tuple(() => [sts.bigint(), Signature]) + +export const Seal = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const PreRuntime = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const Consensus = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const ConsensusEngineId = sts.bytes() + +export const ChangesTrieSignal: sts.Type = sts.closedEnum(() => { + return { + NewConfiguration: sts.option(() => ChangesTrieConfiguration), + } +}) + +export const SlotNumber = sts.bigint() + +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +export const AuthorityDiscoveryCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Type_194 = Type_194_AuthorityDiscovery | Type_194_Authorship | Type_194_Babe | Type_194_Balances | Type_194_Claims | Type_194_Council | Type_194_Democracy | Type_194_DummyAttestations | Type_194_DummyParachains | Type_194_DummyRegistrar | Type_194_DummySlots | Type_194_ElectionsPhragmen | Type_194_FinalityTracker | Type_194_Grandpa | Type_194_Identity | Type_194_ImOnline | Type_194_Indices | Type_194_Multisig | Type_194_Offences | Type_194_Proxy | Type_194_Recovery | Type_194_Scheduler | Type_194_Session | Type_194_Society | Type_194_Staking | Type_194_System | Type_194_TechnicalCommittee | Type_194_TechnicalMembership | Type_194_Timestamp | Type_194_Treasury | Type_194_Utility | Type_194_Vesting + +export interface Type_194_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Type_194_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Type_194_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Type_194_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Type_194_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Type_194_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Type_194_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Type_194_DummyAttestations { + __kind: 'DummyAttestations' + value: DummyAttestationsCall +} + +export interface Type_194_DummyParachains { + __kind: 'DummyParachains' + value: DummyParachainsCall +} + +export interface Type_194_DummyRegistrar { + __kind: 'DummyRegistrar' + value: DummyRegistrarCall +} + +export interface Type_194_DummySlots { + __kind: 'DummySlots' + value: DummySlotsCall +} + +export interface Type_194_ElectionsPhragmen { + __kind: 'ElectionsPhragmen' + value: ElectionsPhragmenCall +} + +export interface Type_194_FinalityTracker { + __kind: 'FinalityTracker' + value: FinalityTrackerCall +} + +export interface Type_194_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Type_194_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Type_194_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Type_194_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Type_194_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Type_194_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Type_194_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Type_194_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Type_194_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Type_194_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Type_194_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Type_194_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Type_194_System { + __kind: 'System' + value: SystemCall +} + +export interface Type_194_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Type_194_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Type_194_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Type_194_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Type_194_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Type_194_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId = sts.bytes() diff --git a/squid/src/types/v2025.ts b/squid/src/types/v2025.ts new file mode 100644 index 00000000..72681bcc --- /dev/null +++ b/squid/src/types/v2025.ts @@ -0,0 +1,6552 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Type_195: sts.Type = sts.closedEnum(() => { + return { + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Democracy: DemocracyCall, + ElectionsPhragmen: ElectionsPhragmenCall, + FinalityTracker: FinalityTrackerCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + } +}) + +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: LookupSource, + target: LookupSource, + schedule: VestingInfo, + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: LookupSource, + }), + vested_transfer: sts.enumStruct({ + target: LookupSource, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: Balance, + perBlock: Balance, + startingBlock: BlockNumber, + } +}) + +export const BlockNumber = sts.number() + +export const Balance = sts.bigint() + +export interface VestingInfo { + locked: Balance + perBlock: Balance + startingBlock: BlockNumber +} + +export type BlockNumber = number + +export type Balance = bigint + +export const LookupSource = sts.bytes() + +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: LookupSource + target: LookupSource + schedule: VestingInfo +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this module. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this module. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: LookupSource +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: LookupSource + schedule: VestingInfo +} + +export type LookupSource = Bytes + +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Type_195, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Type_195), + }), + } +}) + +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Type_195 +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Trait::BaseCallFilter`). + * + * # + * - Base weight: 14.39 + .987 * c µs + * - Plus the sum of the weights of the `calls`. + * - Plus one additional event. (repeat read/write) + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Type_195[] +} + +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: LookupSource, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_tip: sts.enumStruct({ + hash: Hash, + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: LookupSource, + fee: sts.bigint(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: LookupSource, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + }), + retract_tip: sts.enumStruct({ + hash: Hash, + }), + tip: sts.enumStruct({ + hash: Hash, + tipValue: sts.bigint(), + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + tipValue: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +export const Hash = sts.bytes() + +export type TreasuryCall = TreasuryCall_accept_curator | TreasuryCall_approve_bounty | TreasuryCall_approve_proposal | TreasuryCall_award_bounty | TreasuryCall_claim_bounty | TreasuryCall_close_bounty | TreasuryCall_close_tip | TreasuryCall_extend_bounty_expiry | TreasuryCall_propose_bounty | TreasuryCall_propose_curator | TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_report_awesome | TreasuryCall_retract_tip | TreasuryCall_tip | TreasuryCall_tip_new | TreasuryCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB change. + * # + */ +export interface TreasuryCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB change. + * # + */ +export interface TreasuryCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + */ +export interface TreasuryCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: LookupSource +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + */ +export interface TreasuryCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + */ +export interface TreasuryCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`. + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TreasuryCall_close_tip { + __kind: 'close_tip' + hash: Hash +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + */ +export interface TreasuryCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface TreasuryCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB change. + * # + */ +export interface TreasuryCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: LookupSource + fee: bigint +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: LookupSource +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TreasuryCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TreasuryCall_retract_tip { + __kind: 'retract_tip' + hash: Hash +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`, insert tip and check closing, + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TreasuryCall_tip { + __kind: 'tip' + hash: Hash + tipValue: bigint +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T` + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TreasuryCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId + tipValue: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is malicious + * or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB change. + * # + */ +export interface TreasuryCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +export type AccountId = Bytes + +export type Hash = Bytes + +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(T)` where `T` complexity of `on_timestamp_set` + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in `on_finalize`) + * - 1 event handler `on_timestamp_set` `O(T)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId, + }), + change_key: sts.enumStruct({ + new: AccountId, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId), + }), + set_prime: sts.enumStruct({ + who: AccountId, + }), + swap_member: sts.enumStruct({ + remove: AccountId, + add: AccountId, + }), + } +}) + +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId + add: AccountId +} + +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const MemberCount = sts.number() + +export const Proposal: sts.Type = sts.closedEnum(() => { + return { + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Democracy: DemocracyCall, + ElectionsPhragmen: ElectionsPhragmenCall, + FinalityTracker: FinalityTrackerCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + } +}) + +export type Proposal = Proposal_AuthorityDiscovery | Proposal_Authorship | Proposal_Babe | Proposal_Balances | Proposal_Claims | Proposal_Council | Proposal_Democracy | Proposal_ElectionsPhragmen | Proposal_FinalityTracker | Proposal_Grandpa | Proposal_Identity | Proposal_ImOnline | Proposal_Indices | Proposal_Multisig | Proposal_Offences | Proposal_Proxy | Proposal_Recovery | Proposal_Scheduler | Proposal_Session | Proposal_Society | Proposal_Staking | Proposal_System | Proposal_TechnicalCommittee | Proposal_TechnicalMembership | Proposal_Timestamp | Proposal_Treasury | Proposal_Utility | Proposal_Vesting + +export interface Proposal_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Proposal_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Proposal_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Proposal_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Proposal_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Proposal_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Proposal_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Proposal_ElectionsPhragmen { + __kind: 'ElectionsPhragmen' + value: ElectionsPhragmenCall +} + +export interface Proposal_FinalityTracker { + __kind: 'FinalityTracker' + value: FinalityTrackerCall +} + +export interface Proposal_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Proposal_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Proposal_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Proposal_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Proposal_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Proposal_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Proposal_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Proposal_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Proposal_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Proposal_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Proposal_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Proposal_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Proposal_System { + __kind: 'System' + value: SystemCall +} + +export interface Proposal_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Proposal_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Proposal_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Proposal_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Proposal_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Proposal_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_set_changes_trie_config | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage | SystemCall_suicide + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + * + * # + * - `O(P)` where `P` amount of keys with prefix `prefix` + * - `P` storage deletions. + * - Base Weight: 0.834 * P µs + * - Writes: Number of subkeys + 1 + * # + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Key + subkeys: number +} + +/** + * Kill some items from storage. + * + * # + * - `O(IK)` where `I` length of `keys` and `K` length of one key + * - `I` storage deletions. + * - Base Weight: .378 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Key[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * - Base Weight: 0.665 µs, independent of remark length. + * - No DB operations. + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Set the new changes trie configuration. + * + * # + * - `O(1)` + * - 1 storage write or delete (codec `O(1)`). + * - 1 call to `deposit_log`: Uses `append` API, so O(1) + * - Base Weight: 7.218 µs + * - DB Weight: + * - Writes: Changes Trie, System Digest + * # + */ +export interface SystemCall_set_changes_trie_config { + __kind: 'set_changes_trie_config' + changesTrieConfig?: (ChangesTrieConfiguration | undefined) +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 storage write (codec `O(C)`). + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is expensive). + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very expensive. + * We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + * + * # + * - `O(1)` + * - 1 storage write. + * - Base Weight: 1.405 µs + * - 1 write to HEAP_PAGES + * # + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + * + * # + * - `O(I)` where `I` length of `items` + * - `I` storage writes (`O(1)`). + * - Base Weight: 0.568 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: KeyValue[] +} + +/** + * Kill the sending account, assuming there are no references outstanding and the composite + * data is equal to its default value. + * + * # + * - `O(1)` + * - 1 storage read and deletion. + * -------------------- + * Base Weight: 8.626 µs + * No DB Read or Write operations because caller is already in overlay + * # + */ +export interface SystemCall_suicide { + __kind: 'suicide' +} + +export type KeyValue = [StorageKey, StorageData] + +export type StorageData = Bytes + +export type StorageKey = Bytes + +export interface ChangesTrieConfiguration { + digestInterval: number + digestLevels: number +} + +export type Key = Bytes + +export type Perbill = number + +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_validator_count | StakingCall_submit_election_solution | StakingCall_submit_election_solution_unsigned | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger, [Origin Account], Current Era, History Depth, Locks + * - Write: Bonded, Payee, [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: LookupSource + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount + * that can be added. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller and + * it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * - One DB entry. + * ------------ + * DB Weight: + * - Read: Era Election Status, Bonded, Ledger, [Origin Account], Locks + * - Write: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + * + * # + * Complexity: O(U + S) + * with U unapplied slashes weighted with U=1000 + * and S is the number of slash indices to be canceled. + * - Read: Unapplied Slashes + * - Write: Unapplied Slashes + * # + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: EraIndex + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * -------- + * Weight: O(1) + * DB Weight: + * - Read: EraElectionStatus, Ledger + * - Write: Validators, Nominators + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + * + * # + * O(S) where S is the number of slashing spans to be removed + * Reads: Bonded, Slashing Spans, Account, Locks + * Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Account, Locks + * Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Same as [`set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. This can only be called when + * [`EraElectionStatus`] is `Closed`. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS). + * - Both the reads and writes follow a similar pattern. + * --------- + * Weight: O(N) + * where N is the number of targets + * DB Weight: + * - Reads: Era Election Status, Ledger, Current Era + * - Writes: Validators, Nominators + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: LookupSource[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * This can only be called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * DB Weight: + * - Read: EraElectionStatus, CurrentEra, HistoryDepth, ErasValidatorReward, + * ErasStakersClipped, ErasRewardPoints, ErasValidatorPrefs (8 items) + * - Read Each: Bonded, Ledger, Payee, Locks, System Account (5 items) + * - Write Each: System Account, Locks, Ledger (3 items) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId + era: EraIndex +} + +/** + * Remove all data structure concerning a staker/stash once its balance is zero. + * This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone + * and the target `stash` must have no funds left. + * + * This can be called from any origin. + * + * - `stash`: The stash account to reap. Its balance must be zero. + * + * # + * Complexity: O(S) where S is the number of slashing spans on the account. + * DB Weight: + * - Reads: Stash Account, Bonded, Slashing Spans, Locks + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Stash Account, Locks + * - Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller, and it can be only called when + * [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MAX_UNLOCKING_CHUNKS`. + * - Storage changes: Can't increase storage, only decrease it. + * --------------- + * - DB Weight: + * - Reads: EraElectionStatus, Ledger, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Same as [`set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: LookupSource +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. + * This should report all the storage items that will be deleted by clearing old + * era history. Needed to report an accurate weight for the dispatch. Trusted by + * `Root` to report an accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Weight: O(E) + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + * + * # + * - O(V) + * - Write: Invulnerables + * # + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Submit an election result to the chain. If the solution: + * + * 1. is valid. + * 2. has a better score than a potentially existing solution on chain. + * + * then, it will be _put_ on chain. + * + * A solution consists of two pieces of data: + * + * 1. `winners`: a flat vector of all the winners of the round. + * 2. `assignments`: the compact version of an assignment vector that encodes the edge + * weights. + * + * Both of which may be computed using _phragmen_, or any other algorithm. + * + * Additionally, the submitter must provide: + * + * - The `score` that they claim their solution has. + * + * Both validators and nominators will be represented by indices in the solution. The + * indices should respect the corresponding types ([`ValidatorIndex`] and + * [`NominatorIndex`]). Moreover, they should be valid when used to index into + * [`SnapshotValidators`] and [`SnapshotNominators`]. Any invalid index will cause the + * solution to be rejected. These two storage items are set during the election window and + * may be used to determine the indices. + * + * A solution is valid if: + * + * 0. It is submitted when [`EraElectionStatus`] is `Open`. + * 1. Its claimed score is equal to the score computed on-chain. + * 2. Presents the correct number of winners. + * 3. All indexes must be value according to the snapshot vectors. All edge values must + * also be correct and should not overflow the granularity of the ratio type (i.e. 256 + * or billion). + * 4. For each edge, all targets are actually nominated by the voter. + * 5. Has correct self-votes. + * + * A solutions score is consisted of 3 parameters: + * + * 1. `min { support.total }` for each support of a winner. This value should be maximized. + * 2. `sum { support.total }` for each support of a winner. This value should be minimized. + * 3. `sum { support.total^2 }` for each support of a winner. This value should be + * minimized (to ensure less variance) + * + * # + * The transaction is assumed to be the longest path, a better solution. + * - Initial solution is almost the same. + * - Worse solution is retraced in pre-dispatch-checks which sets its own weight. + * # + */ +export interface StakingCall_submit_election_solution { + __kind: 'submit_election_solution' + winners: ValidatorIndex[] + compact: CompactAssignments + score: ElectionScore + era: EraIndex + size: ElectionSize +} + +/** + * Unsigned version of `submit_election_solution`. + * + * Note that this must pass the [`ValidateUnsigned`] check which only allows transactions + * from the local node to be included. In other words, only the block author can include a + * transaction in the block. + * + * # + * See [`submit_election_solution`]. + * # + */ +export interface StakingCall_submit_election_solution_unsigned { + __kind: 'submit_election_solution_unsigned' + winners: ValidatorIndex[] + compact: CompactAssignments + score: ElectionScore + era: EraIndex + size: ElectionSize +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + * + * # + * - Independent of the arguments. Limited but potentially exploitable complexity. + * - Contains a limited number of reads. + * - Each call (requires the remainder of the bonded balance to be above `minimum_balance`) + * will cause a new entry to be inserted into a vector (`Ledger.unlocking`) kept in storage. + * The only way to clean the aforementioned storage item is also user-controlled via + * `withdraw_unbonded`. + * - One DB entry. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: EraElectionStatus, Ledger, CurrentEra, Locks, BalanceOf Stash, + * - Write: Locks, Ledger, BalanceOf Stash, + * + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ----------- + * Weight: O(1) + * DB Weight: + * - Read: Era Election Status, Ledger + * - Write: Nominators, Validators + * # + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * - Could be dependent on the `origin` argument and how much `unlocking` chunks exist. + * It implies `consolidate_unlocked` which loops over `Ledger.unlocking`, which is + * indirectly user-controlled. See [`unbond`] for more detail. + * - Contains a limited number of reads, yet the size of which could be large based on `ledger`. + * - Writes are limited to the `origin` account key. + * --------------- + * Complexity O(S) where S is the number of slashing spans to remove + * Update: + * - Reads: EraElectionStatus, Ledger, Current Era, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * Kill: + * - Reads: EraElectionStatus, Ledger, Current Era, Bonded, Slashing Spans, [Origin + * Account], Locks, BalanceOf stash + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, + * [Origin Account], Locks, BalanceOf stash. + * - Writes Each: SpanSlash * S + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +export interface ValidatorPrefs { + commission: number +} + +export interface ElectionSize { + validators: number + nominators: number +} + +export type ElectionScore = bigint[] + +export interface CompactAssignments { + votes1: [NominatorIndexCompact, ValidatorIndexCompact][] + votes2: [NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact][] + votes3: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes4: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes5: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes6: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes7: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes8: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes9: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes10: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes11: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes12: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes13: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes14: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes15: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes16: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] +} + +export type CompactScoreCompact = [ValidatorIndexCompact, OffchainAccuracyCompact] + +export type OffchainAccuracyCompact = number + +export type ValidatorIndexCompact = number + +export type NominatorIndexCompact = number + +export type ValidatorIndex = number + +export type Percent = number + +export type EraIndex = number + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: BalanceOf +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * module to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId + judgement: SocietyJudgement +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin + * forgives (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: LookupSource + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId + value: BalanceOf + tip: BalanceOf +} + +export type SocietyJudgement = SocietyJudgement_Approve | SocietyJudgement_Rebid | SocietyJudgement_Reject + +export interface SocietyJudgement_Approve { + __kind: 'Approve' +} + +export interface SocietyJudgement_Rebid { + __kind: 'Rebid' +} + +export interface SocietyJudgement_Reject { + __kind: 'Reject' +} + +export type BalanceOf = bigint + +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` in number of key types. + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwnder` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: Keys + proof: Bytes +} + +export type Keys = [AccountId, AccountId, AccountId, AccountId, AccountId] + +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.15 + 2.869 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: BlockNumber + index: number +} + +/** + * Cancel a named scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 24.91 + 2.907 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.29 + .126 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda + * - Will use base weight of 25 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_195 +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_195 +} + +/** + * Schedule a named task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 29.6 + .159 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 35 which should be good for more than 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_195 +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`]. + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_195 +} + +export type Priority = number + +export type Period = [BlockNumber, number] + +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + * + * # + * - The weight of the `call` + 10,000. + * - One storage lookup to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId + call: Type_195 +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + * + * # + * - One storage mutation to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully + * recovered by you. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + V) + * # + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + * + * # + * Key: V (len of vouching friends) + * - One storage read/remove to get the active recovery process. O(1), Codec O(V) + * - One balance call to repatriate reserved. O(X) + * - One event. + * + * Total Complexity: O(V + X) + * # + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. + * Should be ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt + * before the account can be recovered. Should be less than or equal to + * the length of the list of friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized + * that needs to pass before the account can be recovered. + * + * # + * - Key: F (len of friends) + * - One storage read to check that account is not already recoverable. O(1). + * - A check that the friends list is sorted and unique. O(F) + * - One currency reserve operation. O(X) + * - One storage write. O(1). Codec O(F). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId[] + threshold: number + delayPeriod: BlockNumber +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account + * needs to be recoverable (i.e. have a recovery configuration). + * + * # + * - One storage read to check that account is recoverable. O(F) + * - One storage read to check that this recovery process hasn't already started. O(1) + * - One currency reserve operation. O(X) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + * + * # + * Key: F (len of friends) + * - One storage read to get the prefix iterator for active recoveries. O(1) + * - One storage read/remove to get the recovery configuration. O(1), Codec O(F) + * - One balance call to unreserved. O(X) + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + * + * # + * - One storage write O(1) + * - One event + * # + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId + rescuer: AccountId +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you + * want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One binary search to confirm caller is a friend. O(logF) + * - One binary search to confirm caller has not already vouched. O(logV) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + logF + V + logV) + * # + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId + rescuer: AccountId +} + +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: AccountId + proxyType: ProxyType + delay: BlockNumber +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: AccountId + callHash: CallHashOf +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + * TODO: Might be over counting 1 read + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: BlockNumber + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_195 +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: AccountId + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_195 +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: AccountId + callHash: CallHashOf +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: AccountId + callHash: CallHashOf +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: AccountId + proxyType: ProxyType + delay: BlockNumber +} + +export type CallHashOf = Bytes + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +export type OffencesCall = never + +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + call: OpaqueCall + storeCall: boolean + maxWeight: Weight +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId[] + call: Type_195 +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId[] + timepoint: Timepoint + callHash: Bytes +} + +export type OpaqueCall = Bytes + +export type Weight = bigint + +export interface Timepoint { + height: BlockNumber + index: number +} + +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: AccountIndex +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId + index: AccountIndex + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: AccountIndex +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: AccountIndex +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId + index: AccountIndex +} + +export type AccountIndex = number + +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) + * and E is length of `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Signature +} + +export type Signature = Bytes + +export interface Heartbeat { + blockNumber: BlockNumber + networkState: OpaqueNetworkState + sessionIndex: SessionIndex + authorityIndex: AuthIndex + validatorsLen: number +} + +export type AuthIndex = number + +export type SessionIndex = number + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: LookupSource + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: RegistrarIndex +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: LookupSource +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: LookupSource + judgement: IdentityJudgement +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: LookupSource +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: LookupSource + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: bigint +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId, Data][] +} + +export interface IdentityInfo { + additional: IdentityInfoAdditional[] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (H160 | undefined) + image: Data + twitter: Data +} + +export type H160 = Bytes + +export type IdentityInfoAdditional = [Data, Data] + +export type IdentityJudgement = IdentityJudgement_Erroneous | IdentityJudgement_FeePaid | IdentityJudgement_KnownGood | IdentityJudgement_LowQuality | IdentityJudgement_OutOfDate | IdentityJudgement_Reasonable | IdentityJudgement_Unknown + +export interface IdentityJudgement_Erroneous { + __kind: 'Erroneous' +} + +export interface IdentityJudgement_FeePaid { + __kind: 'FeePaid' + value: Balance +} + +export interface IdentityJudgement_KnownGood { + __kind: 'KnownGood' +} + +export interface IdentityJudgement_LowQuality { + __kind: 'LowQuality' +} + +export interface IdentityJudgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface IdentityJudgement_Reasonable { + __kind: 'Reasonable' +} + +export interface IdentityJudgement_Unknown { + __kind: 'Unknown' +} + +export type RegistrarIndex = number + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: H256 +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: H256 +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: H256 +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: H256 +} + +export type H256 = Bytes + +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has + * stalled. This will trigger a forced authority set change at the beginning + * of the next session, to be enacted `delay` blocks after that. The delay + * should be high enough to safely assume that the block signalling the + * forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters + * will start the new authority set using the given finalized block as base. + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: BlockNumber + bestFinalizedBlockNumber: BlockNumber +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface KeyOwnerProof { + session: SessionIndex + trieNodes: Bytes[] + validatorCount: ValidatorCount +} + +export type ValidatorCount = number + +export interface GrandpaEquivocationProof { + setId: SetId + equivocation: GrandpaEquivocation +} + +export type GrandpaEquivocation = GrandpaEquivocation_Precommit | GrandpaEquivocation_Prevote + +export interface GrandpaEquivocation_Precommit { + __kind: 'Precommit' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocation_Prevote { + __kind: 'Prevote' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocationValue { + roundNumber: bigint + identity: AuthorityId + first: [GrandpaPrevote, AuthoritySignature] + second: [GrandpaPrevote, AuthoritySignature] +} + +export type AuthoritySignature = Bytes + +export interface GrandpaPrevote { + targetHash: Hash + targetNumber: BlockNumber +} + +export type AuthorityId = Bytes + +export type SetId = bigint + +export type FinalityTrackerCall = FinalityTrackerCall_final_hint + +/** + * Hint that the author of this block thinks the best finalized + * block is the given number. + */ +export interface FinalityTrackerCall_final_hint { + __kind: 'final_hint' + hint: number +} + +export type ElectionsPhragmenCall = ElectionsPhragmenCall_remove_member | ElectionsPhragmenCall_remove_voter | ElectionsPhragmenCall_renounce_candidacy | ElectionsPhragmenCall_report_defunct_voter | ElectionsPhragmenCall_submit_candidacy | ElectionsPhragmenCall_vote + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, a new phragmen election is started. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement: + * - Base weight: 50.93 µs + * - State reads: + * - RunnersUp.len() + * - Members, RunnersUp (remove_and_replace_member) + * - State writes: + * - Members, RunnersUp (remove_and_replace_member) + * Else, since this is a root call and will go into phragmen, we assume full block for now. + * # + */ +export interface ElectionsPhragmenCall_remove_member { + __kind: 'remove_member' + who: LookupSource + hasReplacement: boolean +} + +/** + * Remove `origin` as a voter. This removes the lock and returns the bond. + * + * # + * Base weight: 36.8 µs + * All state access is from do_remove_voter. + * State reads: + * - Voting + * - [AccountData(who)] + * State writes: + * - Voting + * - Locks + * - [AccountData(who)] + * # + */ +export interface ElectionsPhragmenCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * - `origin` is a candidate and not elected in any set. In this case, the bond is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the bond is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the bond is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_voter`], if replacement runners exists, they are immediately used. + * + * If a candidate is renouncing: + * Base weight: 17.28 µs + * Complexity of candidate_count: 0.235 µs + * State reads: + * - Candidates + * - [AccountBalance(who) (unreserve)] + * State writes: + * - Candidates + * - [AccountBalance(who) (unreserve)] + * If member is renouncing: + * Base weight: 46.25 µs + * State reads: + * - Members, RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * State writes: + * - Members, RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * If runner is renouncing: + * Base weight: 46.25 µs + * State reads: + * - RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * State writes: + * - RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * + */ +export interface ElectionsPhragmenCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Report `target` for being an defunct voter. In case of a valid report, the reporter is + * rewarded by the bond amount of `target`. Otherwise, the reporter itself is removed and + * their bond is slashed. + * + * A defunct voter is defined to be: + * - a voter whose current submitted votes are all invalid. i.e. all of them are no + * longer a candidate nor an active member or a runner-up. + * + * + * The origin must provide the number of current candidates and votes of the reported target + * for the purpose of accurate weight calculation. + * + * # + * No Base weight based on min square analysis. + * Complexity of candidate_count: 1.755 µs + * Complexity of vote_count: 18.51 µs + * State reads: + * - Voting(reporter) + * - Candidate.len() + * - Voting(Target) + * - Candidates, Members, RunnersUp (is_defunct_voter) + * State writes: + * - Lock(reporter || target) + * - [AccountBalance(reporter)] + AccountBalance(target) + * - Voting(reporter || target) + * Note: the db access is worse with respect to db, which is when the report is correct. + * # + */ +export interface ElectionsPhragmenCall_report_defunct_voter { + __kind: 'report_defunct_voter' + defunct: DefunctVoter +} + +/** + * Submit oneself for candidacy. + * + * A candidate will either: + * - Lose at the end of the term and forfeit their deposit. + * - Win and become a member. Members will eventually get their stash back. + * - Become a runner-up. Runners-ups are reserved members in case one gets forcefully + * removed. + * + * # + * Base weight = 33.33 µs + * Complexity of candidate_count: 0.375 µs + * State reads: + * - Candidates + * - Members + * - RunnersUp + * - [AccountBalance(who)] + * State writes: + * - [AccountBalance(who)] + * - Candidates + * # + */ +export interface ElectionsPhragmenCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a bond amount is + * reserved. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * It is the responsibility of the caller to not place all of their balance into the lock + * and keep some for further transactions. + * + * # + * Base weight: 47.93 µs + * State reads: + * - Candidates.len() + Members.len() + RunnersUp.len() + * - Voting (is_voter) + * - Lock + * - [AccountBalance(who) (unreserve + total_balance)] + * State writes: + * - Voting + * - Lock + * - [AccountBalance(who) (unreserve -- only when creating a new voter)] + * # + */ +export interface ElectionsPhragmenCall_vote { + __kind: 'vote' + votes: AccountId[] + value: bigint +} + +export interface DefunctVoter { + who: AccountId + voteCount: number + candidateCount: number +} + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +export type DemocracyCall = DemocracyCall_blacklist | DemocracyCall_cancel_proposal | DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. + * + * If called on a queued public or external proposal, then this will result in it being + * removed. If the `ref_index` supplied is an active referendum with the proposal hash, + * then it will be cancelled. + * + * The dispatch origin of this call must be `BlacklistOrigin`. + * + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. + * + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). + */ +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: Hash + maybeRefIndex?: (ReferendumIndex | undefined) +} + +/** + * Remove a proposal. + * + * The dispatch origin of this call must be `CancelProposalOrigin`. + * + * - `prop_index`: The index of the proposal to cancel. + * + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number +} + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: ReferendumIndex +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must + * not be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId + conviction: Conviction + balance: BalanceOf +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: ReferendumIndex +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: Hash + index: ReferendumIndex +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Weight: `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: Hash +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: Hash +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: Hash +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * `FastTrackVotingPeriod` if too low. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: Hash + votingPeriod: BlockNumber + delay: BlockNumber +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. When this call is successful, i.e. + * the preimage has not been uploaded before and matches some imminent proposal, + * no fee is paid. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * Weight: `O(p)` + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: Hash + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. + * Extrinsic is weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * Weight: `O(D)` where D is length of proposal. + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: Hash + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId + index: ReferendumIndex +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: ReferendumIndex +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * Weight: `O(S)` where S is the number of seconds a proposal already has. + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * Weight: `O(V + log(V))` where V is number of `existing vetoers` + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: Hash +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of referendums the voter has voted on. + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + value: AccountVoteSplit +} + +export interface AccountVote_Standard { + __kind: 'Standard' + value: AccountVoteStandard +} + +export interface AccountVoteStandard { + vote: Vote + balance: Balance +} + +export type Vote = number + +export interface AccountVoteSplit { + aye: Balance + nay: Balance +} + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +export type ReferendumIndex = number + +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export type MemberCount = number + +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * Total Complexity: O(1) + * ---------------------------- + * Base Weight: 93.3 µs + * DB Weight: + * - Read: Preclaims, Signing, Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + * - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting, Signing, Preclaims + * Validate PreValidateAttests: +8.631 µs + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * - One `eth_recover` operation which involves a keccak hash and a + * ecdsa recover. + * - Three storage reads to check if a claim exists for the user, to + * get the current pot size, to see if there exists a vesting schedule. + * - Up to one storage write for adding a new vesting schedule. + * - One `deposit_creating` Currency call. + * - One storage write to update the total. + * - Two storage removals for vesting and claims information. + * - One deposit event. + * + * Total Complexity: O(1) + * ---------------------------- + * Base Weight: 269.7 µs + * DB Weight: + * - Read: Signing, Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + * - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting, Signing + * Validate Unsigned: +188.7 µs + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * - One `eth_recover` operation which involves a keccak hash and a + * ecdsa recover. + * - Four storage reads to check if a claim exists for the user, to + * get the current pot size, to see if there exists a vesting schedule, to get the + * required statement. + * - Up to one storage write for adding a new vesting schedule. + * - One `deposit_creating` Currency call. + * - One storage write to update the total. + * - Two storage removals for vesting and claims information. + * - One deposit event. + * + * Total Complexity: O(1) + * ---------------------------- + * Base Weight: 270.2 µs + * DB Weight: + * - Read: Signing, Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + * - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting, Signing + * Validate Unsigned: +190.1 µs + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * - One storage mutate to increase the total claims available. + * - One storage write to add a new claim. + * - Up to one storage write to add a new vesting schedule. + * + * Total Complexity: O(1) + * --------------------- + * Base Weight: 10.46 µs + * DB Weight: + * - Reads: Total + * - Writes: Total, Claims + * - Maybe Write: Vesting, Statement + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: BalanceOf + vestingSchedule?: ([BalanceOf, BalanceOf, BlockNumber] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId | undefined) +} + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is + * not assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: LookupSource + dest: LookupSource + value: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also decrease the total issuance of the system (`TotalIssuance`). + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + * + * # + * - Independent of the arguments. + * - Contains a limited number of reads and writes. + * --------------------- + * - Base Weight: + * - Creating: 27.56 µs + * - Killing: 35.11 µs + * - DB Weight: 1 Read, 1 Write to `who` + * # + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: LookupSource + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * It will decrease the total issuance of the system by the `TransferFee`. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for + * input config types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional + * check that the transfer will not kill the origin account. + * --------------------------------- + * - Base Weight: 73.64 µs, worst case scenario (account created, account removed) + * - DB Weight: 1 Read and 1 Write to destination account + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: LookupSource + value: bigint +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Module.html#method.transfer + * # + * - Cheaper than transfer because account cannot be killed. + * - Base Weight: 51.4 µs + * - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already) + * # + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: LookupSource + value: bigint +} + +export type BabeCall = BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface BabeEquivocationProof { + offender: AuthorityId + slotNumber: SlotNumber + firstHeader: Header + secondHeader: Header +} + +export interface Header { + parentHash: Hash + number: number + stateRoot: Hash + extrinsicsRoot: Hash + digest: Digest +} + +export interface Digest { + logs: DigestItem[] +} + +export type DigestItem = DigestItem_AuthoritiesChange | DigestItem_ChangesTrieRoot | DigestItem_ChangesTrieSignal | DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal | DigestItem_SealV0 + +export interface DigestItem_AuthoritiesChange { + __kind: 'AuthoritiesChange' + value: AuthorityId[] +} + +export interface DigestItem_ChangesTrieRoot { + __kind: 'ChangesTrieRoot' + value: Hash +} + +export interface DigestItem_ChangesTrieSignal { + __kind: 'ChangesTrieSignal' + value: ChangesTrieSignal +} + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: Consensus +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: PreRuntime +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: Seal +} + +export interface DigestItem_SealV0 { + __kind: 'SealV0' + value: SealV0 +} + +export type SealV0 = [bigint, Signature] + +export type Seal = [ConsensusEngineId, Bytes] + +export type PreRuntime = [ConsensusEngineId, Bytes] + +export type Consensus = [ConsensusEngineId, Bytes] + +export type ConsensusEngineId = Bytes + +export type ChangesTrieSignal = ChangesTrieSignal_NewConfiguration + +export interface ChangesTrieSignal_NewConfiguration { + __kind: 'NewConfiguration' + value?: (ChangesTrieConfiguration | undefined) +} + +export type SlotNumber = bigint + +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +export type AuthorityDiscoveryCall = never + +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: Key, + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => Key), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + set_changes_trie_config: sts.enumStruct({ + changesTrieConfig: sts.option(() => ChangesTrieConfiguration), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => KeyValue), + }), + suicide: sts.unit(), + } +}) + +export const KeyValue = sts.tuple(() => [StorageKey, StorageData]) + +export const StorageData = sts.bytes() + +export const StorageKey = sts.bytes() + +export const ChangesTrieConfiguration: sts.Type = sts.struct(() => { + return { + digestInterval: sts.number(), + digestLevels: sts.number(), + } +}) + +export const Key = sts.bytes() + +export const Perbill = sts.number() + +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: LookupSource, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: EraIndex, + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => LookupSource), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId, + era: EraIndex, + }), + reap_stash: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: LookupSource, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + submit_election_solution: sts.enumStruct({ + winners: sts.array(() => ValidatorIndex), + compact: CompactAssignments, + score: ElectionScore, + era: EraIndex, + size: ElectionSize, + }), + submit_election_solution_unsigned: sts.enumStruct({ + winners: sts.array(() => ValidatorIndex), + compact: CompactAssignments, + score: ElectionScore, + era: EraIndex, + size: ElectionSize, + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + } +}) + +export const ElectionSize: sts.Type = sts.struct(() => { + return { + validators: sts.number(), + nominators: sts.number(), + } +}) + +export const ElectionScore = sts.array(() => sts.bigint()) + +export const CompactAssignments: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [NominatorIndexCompact, ValidatorIndexCompact])), + votes2: sts.array(() => sts.tuple(() => [NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact])), + votes3: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes4: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes5: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes6: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes7: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes8: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes9: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes10: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes11: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes12: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes13: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes14: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes15: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes16: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + } +}) + +export const CompactScoreCompact = sts.tuple(() => [ValidatorIndexCompact, OffchainAccuracyCompact]) + +export const OffchainAccuracyCompact = sts.number() + +export const ValidatorIndexCompact = sts.number() + +export const NominatorIndexCompact = sts.number() + +export const ValidatorIndex = sts.number() + +export const Percent = sts.number() + +export const EraIndex = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: BalanceOf, + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId, + judgement: SocietyJudgement, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: LookupSource, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId, + value: BalanceOf, + tip: BalanceOf, + }), + } +}) + +export const SocietyJudgement: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export const BalanceOf = sts.bigint() + +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: Keys, + proof: sts.bytes(), + }), + } +}) + +export const Keys = sts.tuple(() => [AccountId, AccountId, AccountId, AccountId, AccountId]) + +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: BlockNumber, + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_195, + }), + schedule_after: sts.enumStruct({ + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_195, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_195, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_195, + }), + } +}) + +export const Priority = sts.number() + +export const Period = sts.tuple(() => [BlockNumber, sts.number()]) + +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId, + call: Type_195, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId, + }), + claim_recovery: sts.enumStruct({ + account: AccountId, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId), + threshold: sts.number(), + delayPeriod: BlockNumber, + }), + initiate_recovery: sts.enumStruct({ + account: AccountId, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + } +}) + +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: AccountId, + proxyType: ProxyType, + delay: BlockNumber, + }), + announce: sts.enumStruct({ + real: AccountId, + callHash: CallHashOf, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + delay: BlockNumber, + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_195, + }), + proxy_announced: sts.enumStruct({ + delegate: AccountId, + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_195, + }), + reject_announcement: sts.enumStruct({ + delegate: AccountId, + callHash: CallHashOf, + }), + remove_announcement: sts.enumStruct({ + real: AccountId, + callHash: CallHashOf, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: AccountId, + proxyType: ProxyType, + delay: BlockNumber, + }), + } +}) + +export const CallHashOf = sts.bytes() + +export const OffencesCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + call: OpaqueCall, + storeCall: sts.boolean(), + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId), + call: Type_195, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const OpaqueCall = sts.bytes() + +export const Weight = sts.bigint() + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: BlockNumber, + index: sts.number(), + } +}) + +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: AccountIndex, + }), + force_transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: AccountIndex, + }), + freeze: sts.enumStruct({ + index: AccountIndex, + }), + transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + }), + } +}) + +export const AccountIndex = sts.number() + +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: Signature, + }), + } +}) + +export const Signature = sts.bytes() + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: BlockNumber, + networkState: OpaqueNetworkState, + sessionIndex: SessionIndex, + authorityIndex: AuthIndex, + validatorsLen: sts.number(), + } +}) + +export const AuthIndex = sts.number() + +export const SessionIndex = sts.number() + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId, + }), + add_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: RegistrarIndex, + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: LookupSource, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: LookupSource, + judgement: IdentityJudgement, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: LookupSource, + }), + rename_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: sts.bigint(), + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => IdentityInfoAdditional), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => H160), + image: Data, + twitter: Data, + } +}) + +export const H160 = sts.bytes() + +export const IdentityInfoAdditional = sts.tuple(() => [Data, Data]) + +export const IdentityJudgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: Balance, + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export const RegistrarIndex = sts.number() + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: H256, + Keccak256: H256, + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: H256, + ShaThree256: H256, + } +}) + +export const H256 = sts.bytes() + +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: BlockNumber, + bestFinalizedBlockNumber: BlockNumber, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const KeyOwnerProof: sts.Type = sts.struct(() => { + return { + session: SessionIndex, + trieNodes: sts.array(() => sts.bytes()), + validatorCount: ValidatorCount, + } +}) + +export const ValidatorCount = sts.number() + +export const GrandpaEquivocationProof: sts.Type = sts.struct(() => { + return { + setId: SetId, + equivocation: GrandpaEquivocation, + } +}) + +export const GrandpaEquivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: GrandpaEquivocationValue, + Prevote: GrandpaEquivocationValue, + } +}) + +export const GrandpaEquivocationValue: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: AuthorityId, + first: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + second: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + } +}) + +export const AuthoritySignature = sts.bytes() + +export const GrandpaPrevote: sts.Type = sts.struct(() => { + return { + targetHash: Hash, + targetNumber: BlockNumber, + } +}) + +export const AuthorityId = sts.bytes() + +export const SetId = sts.bigint() + +export const FinalityTrackerCall: sts.Type = sts.closedEnum(() => { + return { + final_hint: sts.enumStruct({ + hint: sts.number(), + }), + } +}) + +export const ElectionsPhragmenCall: sts.Type = sts.closedEnum(() => { + return { + remove_member: sts.enumStruct({ + who: LookupSource, + hasReplacement: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + report_defunct_voter: sts.enumStruct({ + defunct: DefunctVoter, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId), + value: sts.bigint(), + }), + } +}) + +export const DefunctVoter: sts.Type = sts.struct(() => { + return { + who: AccountId, + voteCount: sts.number(), + candidateCount: sts.number(), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + blacklist: sts.enumStruct({ + proposalHash: Hash, + maybeRefIndex: sts.option(() => ReferendumIndex), + }), + cancel_proposal: sts.enumStruct({ + propIndex: sts.number(), + }), + cancel_queued: sts.enumStruct({ + which: ReferendumIndex, + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId, + conviction: Conviction, + balance: BalanceOf, + }), + emergency_cancel: sts.enumStruct({ + refIndex: ReferendumIndex, + }), + enact_proposal: sts.enumStruct({ + proposalHash: Hash, + index: ReferendumIndex, + }), + external_propose: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_default: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: Hash, + }), + fast_track: sts.enumStruct({ + proposalHash: Hash, + votingPeriod: BlockNumber, + delay: BlockNumber, + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: Hash, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: Hash, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId, + index: ReferendumIndex, + }), + remove_vote: sts.enumStruct({ + index: ReferendumIndex, + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId, + }), + veto_external: sts.enumStruct({ + proposalHash: Hash, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: AccountVoteSplit, + Standard: AccountVoteStandard, + } +}) + +export const AccountVoteStandard: sts.Type = sts.struct(() => { + return { + vote: Vote, + balance: Balance, + } +}) + +export const Vote = sts.number() + +export const AccountVoteSplit: sts.Type = sts.struct(() => { + return { + aye: Balance, + nay: Balance, + } +}) + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export const ReferendumIndex = sts.number() + +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: BalanceOf, + vestingSchedule: sts.option(() => sts.tuple(() => [BalanceOf, BalanceOf, BlockNumber])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: LookupSource, + dest: LookupSource, + value: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: LookupSource, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + } +}) + +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + report_equivocation: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const BabeEquivocationProof: sts.Type = sts.struct(() => { + return { + offender: AuthorityId, + slotNumber: SlotNumber, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: Hash, + number: sts.number(), + stateRoot: Hash, + extrinsicsRoot: Hash, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + AuthoritiesChange: sts.array(() => AuthorityId), + ChangesTrieRoot: Hash, + ChangesTrieSignal: ChangesTrieSignal, + Consensus: Consensus, + Other: sts.bytes(), + PreRuntime: PreRuntime, + RuntimeEnvironmentUpdated: sts.unit(), + Seal: Seal, + SealV0: SealV0, + } +}) + +export const SealV0 = sts.tuple(() => [sts.bigint(), Signature]) + +export const Seal = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const PreRuntime = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const Consensus = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const ConsensusEngineId = sts.bytes() + +export const ChangesTrieSignal: sts.Type = sts.closedEnum(() => { + return { + NewConfiguration: sts.option(() => ChangesTrieConfiguration), + } +}) + +export const SlotNumber = sts.bigint() + +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +export const AuthorityDiscoveryCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Type_195 = Type_195_AuthorityDiscovery | Type_195_Authorship | Type_195_Babe | Type_195_Balances | Type_195_Claims | Type_195_Council | Type_195_Democracy | Type_195_ElectionsPhragmen | Type_195_FinalityTracker | Type_195_Grandpa | Type_195_Identity | Type_195_ImOnline | Type_195_Indices | Type_195_Multisig | Type_195_Offences | Type_195_Proxy | Type_195_Recovery | Type_195_Scheduler | Type_195_Session | Type_195_Society | Type_195_Staking | Type_195_System | Type_195_TechnicalCommittee | Type_195_TechnicalMembership | Type_195_Timestamp | Type_195_Treasury | Type_195_Utility | Type_195_Vesting + +export interface Type_195_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Type_195_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Type_195_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Type_195_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Type_195_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Type_195_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Type_195_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Type_195_ElectionsPhragmen { + __kind: 'ElectionsPhragmen' + value: ElectionsPhragmenCall +} + +export interface Type_195_FinalityTracker { + __kind: 'FinalityTracker' + value: FinalityTrackerCall +} + +export interface Type_195_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Type_195_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Type_195_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Type_195_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Type_195_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Type_195_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Type_195_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Type_195_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Type_195_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Type_195_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Type_195_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Type_195_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Type_195_System { + __kind: 'System' + value: SystemCall +} + +export interface Type_195_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Type_195_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Type_195_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Type_195_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Type_195_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Type_195_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId = sts.bytes() diff --git a/squid/src/types/v2026.ts b/squid/src/types/v2026.ts new file mode 100644 index 00000000..964ac8ab --- /dev/null +++ b/squid/src/types/v2026.ts @@ -0,0 +1,6542 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Type_194: sts.Type = sts.closedEnum(() => { + return { + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Democracy: DemocracyCall, + ElectionsPhragmen: ElectionsPhragmenCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + } +}) + +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: LookupSource, + target: LookupSource, + schedule: VestingInfo, + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: LookupSource, + }), + vested_transfer: sts.enumStruct({ + target: LookupSource, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: Balance, + perBlock: Balance, + startingBlock: BlockNumber, + } +}) + +export const BlockNumber = sts.number() + +export const Balance = sts.bigint() + +export interface VestingInfo { + locked: Balance + perBlock: Balance + startingBlock: BlockNumber +} + +export type BlockNumber = number + +export type Balance = bigint + +export const LookupSource = sts.bytes() + +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: LookupSource + target: LookupSource + schedule: VestingInfo +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this module. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this module. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: LookupSource +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: LookupSource + schedule: VestingInfo +} + +export type LookupSource = Bytes + +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Type_194, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Type_194), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Type_194), + }), + } +}) + +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Type_194 +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Trait::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Type_194[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Trait::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Type_194[] +} + +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: LookupSource, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_tip: sts.enumStruct({ + hash: Hash, + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: LookupSource, + fee: sts.bigint(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: LookupSource, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + }), + retract_tip: sts.enumStruct({ + hash: Hash, + }), + tip: sts.enumStruct({ + hash: Hash, + tipValue: sts.bigint(), + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + tipValue: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +export const Hash = sts.bytes() + +export type TreasuryCall = TreasuryCall_accept_curator | TreasuryCall_approve_bounty | TreasuryCall_approve_proposal | TreasuryCall_award_bounty | TreasuryCall_claim_bounty | TreasuryCall_close_bounty | TreasuryCall_close_tip | TreasuryCall_extend_bounty_expiry | TreasuryCall_propose_bounty | TreasuryCall_propose_curator | TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_report_awesome | TreasuryCall_retract_tip | TreasuryCall_tip | TreasuryCall_tip_new | TreasuryCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB change. + * # + */ +export interface TreasuryCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB change. + * # + */ +export interface TreasuryCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + */ +export interface TreasuryCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: LookupSource +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + */ +export interface TreasuryCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + */ +export interface TreasuryCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`. + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TreasuryCall_close_tip { + __kind: 'close_tip' + hash: Hash +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + */ +export interface TreasuryCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface TreasuryCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB change. + * # + */ +export interface TreasuryCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: LookupSource + fee: bigint +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: LookupSource +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TreasuryCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TreasuryCall_retract_tip { + __kind: 'retract_tip' + hash: Hash +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`, insert tip and check closing, + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TreasuryCall_tip { + __kind: 'tip' + hash: Hash + tipValue: bigint +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T` + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TreasuryCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId + tipValue: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is malicious + * or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB change. + * # + */ +export interface TreasuryCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +export type AccountId = Bytes + +export type Hash = Bytes + +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId, + }), + change_key: sts.enumStruct({ + new: AccountId, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId), + }), + set_prime: sts.enumStruct({ + who: AccountId, + }), + swap_member: sts.enumStruct({ + remove: AccountId, + add: AccountId, + }), + } +}) + +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId + add: AccountId +} + +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const MemberCount = sts.number() + +export const Proposal: sts.Type = sts.closedEnum(() => { + return { + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Democracy: DemocracyCall, + ElectionsPhragmen: ElectionsPhragmenCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + } +}) + +export type Proposal = Proposal_AuthorityDiscovery | Proposal_Authorship | Proposal_Babe | Proposal_Balances | Proposal_Claims | Proposal_Council | Proposal_Democracy | Proposal_ElectionsPhragmen | Proposal_Grandpa | Proposal_Identity | Proposal_ImOnline | Proposal_Indices | Proposal_Multisig | Proposal_Offences | Proposal_Proxy | Proposal_Recovery | Proposal_Scheduler | Proposal_Session | Proposal_Society | Proposal_Staking | Proposal_System | Proposal_TechnicalCommittee | Proposal_TechnicalMembership | Proposal_Timestamp | Proposal_Treasury | Proposal_Utility | Proposal_Vesting + +export interface Proposal_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Proposal_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Proposal_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Proposal_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Proposal_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Proposal_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Proposal_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Proposal_ElectionsPhragmen { + __kind: 'ElectionsPhragmen' + value: ElectionsPhragmenCall +} + +export interface Proposal_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Proposal_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Proposal_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Proposal_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Proposal_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Proposal_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Proposal_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Proposal_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Proposal_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Proposal_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Proposal_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Proposal_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Proposal_System { + __kind: 'System' + value: SystemCall +} + +export interface Proposal_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Proposal_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Proposal_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Proposal_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Proposal_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Proposal_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_set_changes_trie_config | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage | SystemCall_suicide + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + * + * # + * - `O(P)` where `P` amount of keys with prefix `prefix` + * - `P` storage deletions. + * - Base Weight: 0.834 * P µs + * - Writes: Number of subkeys + 1 + * # + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Key + subkeys: number +} + +/** + * Kill some items from storage. + * + * # + * - `O(IK)` where `I` length of `keys` and `K` length of one key + * - `I` storage deletions. + * - Base Weight: .378 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Key[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * - Base Weight: 0.665 µs, independent of remark length. + * - No DB operations. + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Set the new changes trie configuration. + * + * # + * - `O(1)` + * - 1 storage write or delete (codec `O(1)`). + * - 1 call to `deposit_log`: Uses `append` API, so O(1) + * - Base Weight: 7.218 µs + * - DB Weight: + * - Writes: Changes Trie, System Digest + * # + */ +export interface SystemCall_set_changes_trie_config { + __kind: 'set_changes_trie_config' + changesTrieConfig?: (ChangesTrieConfiguration | undefined) +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 storage write (codec `O(C)`). + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is expensive). + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very expensive. + * We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + * + * # + * - `O(1)` + * - 1 storage write. + * - Base Weight: 1.405 µs + * - 1 write to HEAP_PAGES + * # + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + * + * # + * - `O(I)` where `I` length of `items` + * - `I` storage writes (`O(1)`). + * - Base Weight: 0.568 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: KeyValue[] +} + +/** + * Kill the sending account, assuming there are no references outstanding and the composite + * data is equal to its default value. + * + * # + * - `O(1)` + * - 1 storage read and deletion. + * -------------------- + * Base Weight: 8.626 µs + * No DB Read or Write operations because caller is already in overlay + * # + */ +export interface SystemCall_suicide { + __kind: 'suicide' +} + +export type KeyValue = [StorageKey, StorageData] + +export type StorageData = Bytes + +export type StorageKey = Bytes + +export interface ChangesTrieConfiguration { + digestInterval: number + digestLevels: number +} + +export type Key = Bytes + +export type Perbill = number + +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_validator_count | StakingCall_submit_election_solution | StakingCall_submit_election_solution_unsigned | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger, [Origin Account], Current Era, History Depth, Locks + * - Write: Bonded, Payee, [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: LookupSource + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount + * that can be added. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller and + * it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * - One DB entry. + * ------------ + * DB Weight: + * - Read: Era Election Status, Bonded, Ledger, [Origin Account], Locks + * - Write: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + * + * # + * Complexity: O(U + S) + * with U unapplied slashes weighted with U=1000 + * and S is the number of slash indices to be canceled. + * - Read: Unapplied Slashes + * - Write: Unapplied Slashes + * # + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: EraIndex + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * -------- + * Weight: O(1) + * DB Weight: + * - Read: EraElectionStatus, Ledger + * - Write: Validators, Nominators + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + * + * # + * O(S) where S is the number of slashing spans to be removed + * Reads: Bonded, Slashing Spans, Account, Locks + * Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Account, Locks + * Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Same as [`set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. This can only be called when + * [`EraElectionStatus`] is `Closed`. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS). + * - Both the reads and writes follow a similar pattern. + * --------- + * Weight: O(N) + * where N is the number of targets + * DB Weight: + * - Reads: Era Election Status, Ledger, Current Era + * - Writes: Validators, Nominators + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: LookupSource[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * This can only be called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * DB Weight: + * - Read: EraElectionStatus, CurrentEra, HistoryDepth, ErasValidatorReward, + * ErasStakersClipped, ErasRewardPoints, ErasValidatorPrefs (8 items) + * - Read Each: Bonded, Ledger, Payee, Locks, System Account (5 items) + * - Write Each: System Account, Locks, Ledger (3 items) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId + era: EraIndex +} + +/** + * Remove all data structure concerning a staker/stash once its balance is zero. + * This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone + * and the target `stash` must have no funds left. + * + * This can be called from any origin. + * + * - `stash`: The stash account to reap. Its balance must be zero. + * + * # + * Complexity: O(S) where S is the number of slashing spans on the account. + * DB Weight: + * - Reads: Stash Account, Bonded, Slashing Spans, Locks + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Stash Account, Locks + * - Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller, and it can be only called when + * [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MAX_UNLOCKING_CHUNKS`. + * - Storage changes: Can't increase storage, only decrease it. + * --------------- + * - DB Weight: + * - Reads: EraElectionStatus, Ledger, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Same as [`set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: LookupSource +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. + * This should report all the storage items that will be deleted by clearing old + * era history. Needed to report an accurate weight for the dispatch. Trusted by + * `Root` to report an accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Weight: O(E) + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + * + * # + * - O(V) + * - Write: Invulnerables + * # + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Submit an election result to the chain. If the solution: + * + * 1. is valid. + * 2. has a better score than a potentially existing solution on chain. + * + * then, it will be _put_ on chain. + * + * A solution consists of two pieces of data: + * + * 1. `winners`: a flat vector of all the winners of the round. + * 2. `assignments`: the compact version of an assignment vector that encodes the edge + * weights. + * + * Both of which may be computed using _phragmen_, or any other algorithm. + * + * Additionally, the submitter must provide: + * + * - The `score` that they claim their solution has. + * + * Both validators and nominators will be represented by indices in the solution. The + * indices should respect the corresponding types ([`ValidatorIndex`] and + * [`NominatorIndex`]). Moreover, they should be valid when used to index into + * [`SnapshotValidators`] and [`SnapshotNominators`]. Any invalid index will cause the + * solution to be rejected. These two storage items are set during the election window and + * may be used to determine the indices. + * + * A solution is valid if: + * + * 0. It is submitted when [`EraElectionStatus`] is `Open`. + * 1. Its claimed score is equal to the score computed on-chain. + * 2. Presents the correct number of winners. + * 3. All indexes must be value according to the snapshot vectors. All edge values must + * also be correct and should not overflow the granularity of the ratio type (i.e. 256 + * or billion). + * 4. For each edge, all targets are actually nominated by the voter. + * 5. Has correct self-votes. + * + * A solutions score is consisted of 3 parameters: + * + * 1. `min { support.total }` for each support of a winner. This value should be maximized. + * 2. `sum { support.total }` for each support of a winner. This value should be minimized. + * 3. `sum { support.total^2 }` for each support of a winner. This value should be + * minimized (to ensure less variance) + * + * # + * The transaction is assumed to be the longest path, a better solution. + * - Initial solution is almost the same. + * - Worse solution is retraced in pre-dispatch-checks which sets its own weight. + * # + */ +export interface StakingCall_submit_election_solution { + __kind: 'submit_election_solution' + winners: ValidatorIndex[] + compact: CompactAssignments + score: ElectionScore + era: EraIndex + size: ElectionSize +} + +/** + * Unsigned version of `submit_election_solution`. + * + * Note that this must pass the [`ValidateUnsigned`] check which only allows transactions + * from the local node to be included. In other words, only the block author can include a + * transaction in the block. + * + * # + * See [`submit_election_solution`]. + * # + */ +export interface StakingCall_submit_election_solution_unsigned { + __kind: 'submit_election_solution_unsigned' + winners: ValidatorIndex[] + compact: CompactAssignments + score: ElectionScore + era: EraIndex + size: ElectionSize +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + * + * # + * - Independent of the arguments. Limited but potentially exploitable complexity. + * - Contains a limited number of reads. + * - Each call (requires the remainder of the bonded balance to be above `minimum_balance`) + * will cause a new entry to be inserted into a vector (`Ledger.unlocking`) kept in storage. + * The only way to clean the aforementioned storage item is also user-controlled via + * `withdraw_unbonded`. + * - One DB entry. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: EraElectionStatus, Ledger, CurrentEra, Locks, BalanceOf Stash, + * - Write: Locks, Ledger, BalanceOf Stash, + * + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ----------- + * Weight: O(1) + * DB Weight: + * - Read: Era Election Status, Ledger + * - Write: Nominators, Validators + * # + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * - Could be dependent on the `origin` argument and how much `unlocking` chunks exist. + * It implies `consolidate_unlocked` which loops over `Ledger.unlocking`, which is + * indirectly user-controlled. See [`unbond`] for more detail. + * - Contains a limited number of reads, yet the size of which could be large based on `ledger`. + * - Writes are limited to the `origin` account key. + * --------------- + * Complexity O(S) where S is the number of slashing spans to remove + * Update: + * - Reads: EraElectionStatus, Ledger, Current Era, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * Kill: + * - Reads: EraElectionStatus, Ledger, Current Era, Bonded, Slashing Spans, [Origin + * Account], Locks, BalanceOf stash + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, + * [Origin Account], Locks, BalanceOf stash. + * - Writes Each: SpanSlash * S + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +export interface ValidatorPrefs { + commission: number +} + +export interface ElectionSize { + validators: number + nominators: number +} + +export type ElectionScore = bigint[] + +export interface CompactAssignments { + votes1: [NominatorIndexCompact, ValidatorIndexCompact][] + votes2: [NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact][] + votes3: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes4: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes5: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes6: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes7: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes8: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes9: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes10: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes11: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes12: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes13: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes14: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes15: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes16: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] +} + +export type CompactScoreCompact = [ValidatorIndexCompact, OffchainAccuracyCompact] + +export type OffchainAccuracyCompact = number + +export type ValidatorIndexCompact = number + +export type NominatorIndexCompact = number + +export type ValidatorIndex = number + +export type Percent = number + +export type EraIndex = number + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: BalanceOf +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * module to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId + judgement: SocietyJudgement +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin + * forgives (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: LookupSource + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId + value: BalanceOf + tip: BalanceOf +} + +export type SocietyJudgement = SocietyJudgement_Approve | SocietyJudgement_Rebid | SocietyJudgement_Reject + +export interface SocietyJudgement_Approve { + __kind: 'Approve' +} + +export interface SocietyJudgement_Rebid { + __kind: 'Rebid' +} + +export interface SocietyJudgement_Reject { + __kind: 'Reject' +} + +export type BalanceOf = bigint + +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` in number of key types. + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwnder` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: Keys + proof: Bytes +} + +export type Keys = [AccountId, AccountId, AccountId, AccountId, AccountId] + +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.15 + 2.869 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: BlockNumber + index: number +} + +/** + * Cancel a named scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 24.91 + 2.907 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.29 + .126 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda + * - Will use base weight of 25 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_194 +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_194 +} + +/** + * Schedule a named task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 29.6 + .159 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 35 which should be good for more than 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_194 +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`]. + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_194 +} + +export type Priority = number + +export type Period = [BlockNumber, number] + +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + * + * # + * - The weight of the `call` + 10,000. + * - One storage lookup to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId + call: Type_194 +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + * + * # + * - One storage mutation to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully + * recovered by you. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + V) + * # + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + * + * # + * Key: V (len of vouching friends) + * - One storage read/remove to get the active recovery process. O(1), Codec O(V) + * - One balance call to repatriate reserved. O(X) + * - One event. + * + * Total Complexity: O(V + X) + * # + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. + * Should be ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt + * before the account can be recovered. Should be less than or equal to + * the length of the list of friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized + * that needs to pass before the account can be recovered. + * + * # + * - Key: F (len of friends) + * - One storage read to check that account is not already recoverable. O(1). + * - A check that the friends list is sorted and unique. O(F) + * - One currency reserve operation. O(X) + * - One storage write. O(1). Codec O(F). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId[] + threshold: number + delayPeriod: BlockNumber +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account + * needs to be recoverable (i.e. have a recovery configuration). + * + * # + * - One storage read to check that account is recoverable. O(F) + * - One storage read to check that this recovery process hasn't already started. O(1) + * - One currency reserve operation. O(X) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + * + * # + * Key: F (len of friends) + * - One storage read to get the prefix iterator for active recoveries. O(1) + * - One storage read/remove to get the recovery configuration. O(1), Codec O(F) + * - One balance call to unreserved. O(X) + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + * + * # + * - One storage write O(1) + * - One event + * # + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId + rescuer: AccountId +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you + * want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One binary search to confirm caller is a friend. O(logF) + * - One binary search to confirm caller has not already vouched. O(logV) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + logF + V + logV) + * # + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId + rescuer: AccountId +} + +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: AccountId + proxyType: ProxyType + delay: BlockNumber +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: AccountId + callHash: CallHashOf +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + * TODO: Might be over counting 1 read + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: BlockNumber + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_194 +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: AccountId + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_194 +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: AccountId + callHash: CallHashOf +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: AccountId + callHash: CallHashOf +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: AccountId + proxyType: ProxyType + delay: BlockNumber +} + +export type CallHashOf = Bytes + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +export type OffencesCall = never + +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + call: OpaqueCall + storeCall: boolean + maxWeight: Weight +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId[] + call: Type_194 +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId[] + timepoint: Timepoint + callHash: Bytes +} + +export type OpaqueCall = Bytes + +export type Weight = bigint + +export interface Timepoint { + height: BlockNumber + index: number +} + +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: AccountIndex +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId + index: AccountIndex + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: AccountIndex +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: AccountIndex +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId + index: AccountIndex +} + +export type AccountIndex = number + +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) + * and E is length of `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Signature +} + +export type Signature = Bytes + +export interface Heartbeat { + blockNumber: BlockNumber + networkState: OpaqueNetworkState + sessionIndex: SessionIndex + authorityIndex: AuthIndex + validatorsLen: number +} + +export type AuthIndex = number + +export type SessionIndex = number + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: LookupSource + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: RegistrarIndex +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: LookupSource +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: LookupSource + judgement: IdentityJudgement +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: LookupSource +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: LookupSource + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: bigint +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId, Data][] +} + +export interface IdentityInfo { + additional: IdentityInfoAdditional[] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (H160 | undefined) + image: Data + twitter: Data +} + +export type H160 = Bytes + +export type IdentityInfoAdditional = [Data, Data] + +export type IdentityJudgement = IdentityJudgement_Erroneous | IdentityJudgement_FeePaid | IdentityJudgement_KnownGood | IdentityJudgement_LowQuality | IdentityJudgement_OutOfDate | IdentityJudgement_Reasonable | IdentityJudgement_Unknown + +export interface IdentityJudgement_Erroneous { + __kind: 'Erroneous' +} + +export interface IdentityJudgement_FeePaid { + __kind: 'FeePaid' + value: Balance +} + +export interface IdentityJudgement_KnownGood { + __kind: 'KnownGood' +} + +export interface IdentityJudgement_LowQuality { + __kind: 'LowQuality' +} + +export interface IdentityJudgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface IdentityJudgement_Reasonable { + __kind: 'Reasonable' +} + +export interface IdentityJudgement_Unknown { + __kind: 'Unknown' +} + +export type RegistrarIndex = number + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: H256 +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: H256 +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: H256 +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: H256 +} + +export type H256 = Bytes + +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has + * stalled. This will trigger a forced authority set change at the beginning + * of the next session, to be enacted `delay` blocks after that. The delay + * should be high enough to safely assume that the block signalling the + * forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters + * will start the new authority set using the given finalized block as base. + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: BlockNumber + bestFinalizedBlockNumber: BlockNumber +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface KeyOwnerProof { + session: SessionIndex + trieNodes: Bytes[] + validatorCount: ValidatorCount +} + +export type ValidatorCount = number + +export interface GrandpaEquivocationProof { + setId: SetId + equivocation: GrandpaEquivocation +} + +export type GrandpaEquivocation = GrandpaEquivocation_Precommit | GrandpaEquivocation_Prevote + +export interface GrandpaEquivocation_Precommit { + __kind: 'Precommit' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocation_Prevote { + __kind: 'Prevote' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocationValue { + roundNumber: bigint + identity: AuthorityId + first: [GrandpaPrevote, AuthoritySignature] + second: [GrandpaPrevote, AuthoritySignature] +} + +export type AuthoritySignature = Bytes + +export interface GrandpaPrevote { + targetHash: Hash + targetNumber: BlockNumber +} + +export type AuthorityId = Bytes + +export type SetId = bigint + +export type ElectionsPhragmenCall = ElectionsPhragmenCall_remove_member | ElectionsPhragmenCall_remove_voter | ElectionsPhragmenCall_renounce_candidacy | ElectionsPhragmenCall_report_defunct_voter | ElectionsPhragmenCall_submit_candidacy | ElectionsPhragmenCall_vote + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, a new phragmen election is started. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement: + * - Base weight: 50.93 µs + * - State reads: + * - RunnersUp.len() + * - Members, RunnersUp (remove_and_replace_member) + * - State writes: + * - Members, RunnersUp (remove_and_replace_member) + * Else, since this is a root call and will go into phragmen, we assume full block for now. + * # + */ +export interface ElectionsPhragmenCall_remove_member { + __kind: 'remove_member' + who: LookupSource + hasReplacement: boolean +} + +/** + * Remove `origin` as a voter. This removes the lock and returns the bond. + * + * # + * Base weight: 36.8 µs + * All state access is from do_remove_voter. + * State reads: + * - Voting + * - [AccountData(who)] + * State writes: + * - Voting + * - Locks + * - [AccountData(who)] + * # + */ +export interface ElectionsPhragmenCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * - `origin` is a candidate and not elected in any set. In this case, the bond is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the bond is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the bond is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_voter`], if replacement runners exists, they are immediately used. + * + * If a candidate is renouncing: + * Base weight: 17.28 µs + * Complexity of candidate_count: 0.235 µs + * State reads: + * - Candidates + * - [AccountBalance(who) (unreserve)] + * State writes: + * - Candidates + * - [AccountBalance(who) (unreserve)] + * If member is renouncing: + * Base weight: 46.25 µs + * State reads: + * - Members, RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * State writes: + * - Members, RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * If runner is renouncing: + * Base weight: 46.25 µs + * State reads: + * - RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * State writes: + * - RunnersUp (remove_and_replace_member), + * - [AccountData(who) (unreserve)] + * + */ +export interface ElectionsPhragmenCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Report `target` for being an defunct voter. In case of a valid report, the reporter is + * rewarded by the bond amount of `target`. Otherwise, the reporter itself is removed and + * their bond is slashed. + * + * A defunct voter is defined to be: + * - a voter whose current submitted votes are all invalid. i.e. all of them are no + * longer a candidate nor an active member or a runner-up. + * + * + * The origin must provide the number of current candidates and votes of the reported target + * for the purpose of accurate weight calculation. + * + * # + * No Base weight based on min square analysis. + * Complexity of candidate_count: 1.755 µs + * Complexity of vote_count: 18.51 µs + * State reads: + * - Voting(reporter) + * - Candidate.len() + * - Voting(Target) + * - Candidates, Members, RunnersUp (is_defunct_voter) + * State writes: + * - Lock(reporter || target) + * - [AccountBalance(reporter)] + AccountBalance(target) + * - Voting(reporter || target) + * Note: the db access is worse with respect to db, which is when the report is correct. + * # + */ +export interface ElectionsPhragmenCall_report_defunct_voter { + __kind: 'report_defunct_voter' + defunct: DefunctVoter +} + +/** + * Submit oneself for candidacy. + * + * A candidate will either: + * - Lose at the end of the term and forfeit their deposit. + * - Win and become a member. Members will eventually get their stash back. + * - Become a runner-up. Runners-ups are reserved members in case one gets forcefully + * removed. + * + * # + * Base weight = 33.33 µs + * Complexity of candidate_count: 0.375 µs + * State reads: + * - Candidates + * - Members + * - RunnersUp + * - [AccountBalance(who)] + * State writes: + * - [AccountBalance(who)] + * - Candidates + * # + */ +export interface ElectionsPhragmenCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a bond amount is + * reserved. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * It is the responsibility of the caller to not place all of their balance into the lock + * and keep some for further transactions. + * + * # + * Base weight: 47.93 µs + * State reads: + * - Candidates.len() + Members.len() + RunnersUp.len() + * - Voting (is_voter) + * - Lock + * - [AccountBalance(who) (unreserve + total_balance)] + * State writes: + * - Voting + * - Lock + * - [AccountBalance(who) (unreserve -- only when creating a new voter)] + * # + */ +export interface ElectionsPhragmenCall_vote { + __kind: 'vote' + votes: AccountId[] + value: bigint +} + +export interface DefunctVoter { + who: AccountId + voteCount: number + candidateCount: number +} + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +export type DemocracyCall = DemocracyCall_blacklist | DemocracyCall_cancel_proposal | DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. + * + * If called on a queued public or external proposal, then this will result in it being + * removed. If the `ref_index` supplied is an active referendum with the proposal hash, + * then it will be cancelled. + * + * The dispatch origin of this call must be `BlacklistOrigin`. + * + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. + * + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). + */ +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: Hash + maybeRefIndex?: (ReferendumIndex | undefined) +} + +/** + * Remove a proposal. + * + * The dispatch origin of this call must be `CancelProposalOrigin`. + * + * - `prop_index`: The index of the proposal to cancel. + * + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number +} + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: ReferendumIndex +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must + * not be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId + conviction: Conviction + balance: BalanceOf +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: ReferendumIndex +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: Hash + index: ReferendumIndex +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Weight: `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: Hash +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: Hash +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: Hash +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * `FastTrackVotingPeriod` if too low. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: Hash + votingPeriod: BlockNumber + delay: BlockNumber +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. When this call is successful, i.e. + * the preimage has not been uploaded before and matches some imminent proposal, + * no fee is paid. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * Weight: `O(p)` + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: Hash + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. + * Extrinsic is weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * Weight: `O(D)` where D is length of proposal. + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: Hash + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId + index: ReferendumIndex +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: ReferendumIndex +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * Weight: `O(S)` where S is the number of seconds a proposal already has. + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * Weight: `O(V + log(V))` where V is number of `existing vetoers` + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: Hash +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of referendums the voter has voted on. + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + value: AccountVoteSplit +} + +export interface AccountVote_Standard { + __kind: 'Standard' + value: AccountVoteStandard +} + +export interface AccountVoteStandard { + vote: Vote + balance: Balance +} + +export type Vote = number + +export interface AccountVoteSplit { + aye: Balance + nay: Balance +} + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +export type ReferendumIndex = number + +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export type MemberCount = number + +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * Total Complexity: O(1) + * ---------------------------- + * Base Weight: 93.3 µs + * DB Weight: + * - Read: Preclaims, Signing, Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + * - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting, Signing, Preclaims + * Validate PreValidateAttests: +8.631 µs + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * - One `eth_recover` operation which involves a keccak hash and a + * ecdsa recover. + * - Three storage reads to check if a claim exists for the user, to + * get the current pot size, to see if there exists a vesting schedule. + * - Up to one storage write for adding a new vesting schedule. + * - One `deposit_creating` Currency call. + * - One storage write to update the total. + * - Two storage removals for vesting and claims information. + * - One deposit event. + * + * Total Complexity: O(1) + * ---------------------------- + * Base Weight: 269.7 µs + * DB Weight: + * - Read: Signing, Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + * - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting, Signing + * Validate Unsigned: +188.7 µs + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * - One `eth_recover` operation which involves a keccak hash and a + * ecdsa recover. + * - Four storage reads to check if a claim exists for the user, to + * get the current pot size, to see if there exists a vesting schedule, to get the + * required statement. + * - Up to one storage write for adding a new vesting schedule. + * - One `deposit_creating` Currency call. + * - One storage write to update the total. + * - Two storage removals for vesting and claims information. + * - One deposit event. + * + * Total Complexity: O(1) + * ---------------------------- + * Base Weight: 270.2 µs + * DB Weight: + * - Read: Signing, Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + * - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting, Signing + * Validate Unsigned: +190.1 µs + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * - One storage mutate to increase the total claims available. + * - One storage write to add a new claim. + * - Up to one storage write to add a new vesting schedule. + * + * Total Complexity: O(1) + * --------------------- + * Base Weight: 10.46 µs + * DB Weight: + * - Reads: Total + * - Writes: Total, Claims + * - Maybe Write: Vesting, Statement + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: BalanceOf + vestingSchedule?: ([BalanceOf, BalanceOf, BlockNumber] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId | undefined) +} + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is + * not assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: LookupSource + dest: LookupSource + value: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also decrease the total issuance of the system (`TotalIssuance`). + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + * + * # + * - Independent of the arguments. + * - Contains a limited number of reads and writes. + * --------------------- + * - Base Weight: + * - Creating: 27.56 µs + * - Killing: 35.11 µs + * - DB Weight: 1 Read, 1 Write to `who` + * # + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: LookupSource + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * It will decrease the total issuance of the system by the `TransferFee`. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for + * input config types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional + * check that the transfer will not kill the origin account. + * --------------------------------- + * - Base Weight: 73.64 µs, worst case scenario (account created, account removed) + * - DB Weight: 1 Read and 1 Write to destination account + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: LookupSource + value: bigint +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Module.html#method.transfer + * # + * - Cheaper than transfer because account cannot be killed. + * - Base Weight: 51.4 µs + * - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already) + * # + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: LookupSource + value: bigint +} + +export type BabeCall = BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface BabeEquivocationProof { + offender: AuthorityId + slotNumber: SlotNumber + firstHeader: Header + secondHeader: Header +} + +export interface Header { + parentHash: Hash + number: number + stateRoot: Hash + extrinsicsRoot: Hash + digest: Digest +} + +export interface Digest { + logs: DigestItem[] +} + +export type DigestItem = DigestItem_AuthoritiesChange | DigestItem_ChangesTrieRoot | DigestItem_ChangesTrieSignal | DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal | DigestItem_SealV0 + +export interface DigestItem_AuthoritiesChange { + __kind: 'AuthoritiesChange' + value: AuthorityId[] +} + +export interface DigestItem_ChangesTrieRoot { + __kind: 'ChangesTrieRoot' + value: Hash +} + +export interface DigestItem_ChangesTrieSignal { + __kind: 'ChangesTrieSignal' + value: ChangesTrieSignal +} + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: Consensus +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: PreRuntime +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: Seal +} + +export interface DigestItem_SealV0 { + __kind: 'SealV0' + value: SealV0 +} + +export type SealV0 = [bigint, Signature] + +export type Seal = [ConsensusEngineId, Bytes] + +export type PreRuntime = [ConsensusEngineId, Bytes] + +export type Consensus = [ConsensusEngineId, Bytes] + +export type ConsensusEngineId = Bytes + +export type ChangesTrieSignal = ChangesTrieSignal_NewConfiguration + +export interface ChangesTrieSignal_NewConfiguration { + __kind: 'NewConfiguration' + value?: (ChangesTrieConfiguration | undefined) +} + +export type SlotNumber = bigint + +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +export type AuthorityDiscoveryCall = never + +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: Key, + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => Key), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + set_changes_trie_config: sts.enumStruct({ + changesTrieConfig: sts.option(() => ChangesTrieConfiguration), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => KeyValue), + }), + suicide: sts.unit(), + } +}) + +export const KeyValue = sts.tuple(() => [StorageKey, StorageData]) + +export const StorageData = sts.bytes() + +export const StorageKey = sts.bytes() + +export const ChangesTrieConfiguration: sts.Type = sts.struct(() => { + return { + digestInterval: sts.number(), + digestLevels: sts.number(), + } +}) + +export const Key = sts.bytes() + +export const Perbill = sts.number() + +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: LookupSource, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: EraIndex, + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => LookupSource), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId, + era: EraIndex, + }), + reap_stash: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: LookupSource, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + submit_election_solution: sts.enumStruct({ + winners: sts.array(() => ValidatorIndex), + compact: CompactAssignments, + score: ElectionScore, + era: EraIndex, + size: ElectionSize, + }), + submit_election_solution_unsigned: sts.enumStruct({ + winners: sts.array(() => ValidatorIndex), + compact: CompactAssignments, + score: ElectionScore, + era: EraIndex, + size: ElectionSize, + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + } +}) + +export const ElectionSize: sts.Type = sts.struct(() => { + return { + validators: sts.number(), + nominators: sts.number(), + } +}) + +export const ElectionScore = sts.array(() => sts.bigint()) + +export const CompactAssignments: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [NominatorIndexCompact, ValidatorIndexCompact])), + votes2: sts.array(() => sts.tuple(() => [NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact])), + votes3: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes4: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes5: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes6: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes7: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes8: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes9: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes10: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes11: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes12: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes13: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes14: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes15: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes16: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + } +}) + +export const CompactScoreCompact = sts.tuple(() => [ValidatorIndexCompact, OffchainAccuracyCompact]) + +export const OffchainAccuracyCompact = sts.number() + +export const ValidatorIndexCompact = sts.number() + +export const NominatorIndexCompact = sts.number() + +export const ValidatorIndex = sts.number() + +export const Percent = sts.number() + +export const EraIndex = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: BalanceOf, + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId, + judgement: SocietyJudgement, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: LookupSource, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId, + value: BalanceOf, + tip: BalanceOf, + }), + } +}) + +export const SocietyJudgement: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export const BalanceOf = sts.bigint() + +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: Keys, + proof: sts.bytes(), + }), + } +}) + +export const Keys = sts.tuple(() => [AccountId, AccountId, AccountId, AccountId, AccountId]) + +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: BlockNumber, + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_194, + }), + schedule_after: sts.enumStruct({ + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_194, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_194, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_194, + }), + } +}) + +export const Priority = sts.number() + +export const Period = sts.tuple(() => [BlockNumber, sts.number()]) + +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId, + call: Type_194, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId, + }), + claim_recovery: sts.enumStruct({ + account: AccountId, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId), + threshold: sts.number(), + delayPeriod: BlockNumber, + }), + initiate_recovery: sts.enumStruct({ + account: AccountId, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + } +}) + +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: AccountId, + proxyType: ProxyType, + delay: BlockNumber, + }), + announce: sts.enumStruct({ + real: AccountId, + callHash: CallHashOf, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + delay: BlockNumber, + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_194, + }), + proxy_announced: sts.enumStruct({ + delegate: AccountId, + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_194, + }), + reject_announcement: sts.enumStruct({ + delegate: AccountId, + callHash: CallHashOf, + }), + remove_announcement: sts.enumStruct({ + real: AccountId, + callHash: CallHashOf, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: AccountId, + proxyType: ProxyType, + delay: BlockNumber, + }), + } +}) + +export const CallHashOf = sts.bytes() + +export const OffencesCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + call: OpaqueCall, + storeCall: sts.boolean(), + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId), + call: Type_194, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const OpaqueCall = sts.bytes() + +export const Weight = sts.bigint() + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: BlockNumber, + index: sts.number(), + } +}) + +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: AccountIndex, + }), + force_transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: AccountIndex, + }), + freeze: sts.enumStruct({ + index: AccountIndex, + }), + transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + }), + } +}) + +export const AccountIndex = sts.number() + +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: Signature, + }), + } +}) + +export const Signature = sts.bytes() + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: BlockNumber, + networkState: OpaqueNetworkState, + sessionIndex: SessionIndex, + authorityIndex: AuthIndex, + validatorsLen: sts.number(), + } +}) + +export const AuthIndex = sts.number() + +export const SessionIndex = sts.number() + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId, + }), + add_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: RegistrarIndex, + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: LookupSource, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: LookupSource, + judgement: IdentityJudgement, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: LookupSource, + }), + rename_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: sts.bigint(), + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => IdentityInfoAdditional), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => H160), + image: Data, + twitter: Data, + } +}) + +export const H160 = sts.bytes() + +export const IdentityInfoAdditional = sts.tuple(() => [Data, Data]) + +export const IdentityJudgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: Balance, + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export const RegistrarIndex = sts.number() + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: H256, + Keccak256: H256, + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: H256, + ShaThree256: H256, + } +}) + +export const H256 = sts.bytes() + +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: BlockNumber, + bestFinalizedBlockNumber: BlockNumber, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const KeyOwnerProof: sts.Type = sts.struct(() => { + return { + session: SessionIndex, + trieNodes: sts.array(() => sts.bytes()), + validatorCount: ValidatorCount, + } +}) + +export const ValidatorCount = sts.number() + +export const GrandpaEquivocationProof: sts.Type = sts.struct(() => { + return { + setId: SetId, + equivocation: GrandpaEquivocation, + } +}) + +export const GrandpaEquivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: GrandpaEquivocationValue, + Prevote: GrandpaEquivocationValue, + } +}) + +export const GrandpaEquivocationValue: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: AuthorityId, + first: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + second: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + } +}) + +export const AuthoritySignature = sts.bytes() + +export const GrandpaPrevote: sts.Type = sts.struct(() => { + return { + targetHash: Hash, + targetNumber: BlockNumber, + } +}) + +export const AuthorityId = sts.bytes() + +export const SetId = sts.bigint() + +export const ElectionsPhragmenCall: sts.Type = sts.closedEnum(() => { + return { + remove_member: sts.enumStruct({ + who: LookupSource, + hasReplacement: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + report_defunct_voter: sts.enumStruct({ + defunct: DefunctVoter, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId), + value: sts.bigint(), + }), + } +}) + +export const DefunctVoter: sts.Type = sts.struct(() => { + return { + who: AccountId, + voteCount: sts.number(), + candidateCount: sts.number(), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + blacklist: sts.enumStruct({ + proposalHash: Hash, + maybeRefIndex: sts.option(() => ReferendumIndex), + }), + cancel_proposal: sts.enumStruct({ + propIndex: sts.number(), + }), + cancel_queued: sts.enumStruct({ + which: ReferendumIndex, + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId, + conviction: Conviction, + balance: BalanceOf, + }), + emergency_cancel: sts.enumStruct({ + refIndex: ReferendumIndex, + }), + enact_proposal: sts.enumStruct({ + proposalHash: Hash, + index: ReferendumIndex, + }), + external_propose: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_default: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: Hash, + }), + fast_track: sts.enumStruct({ + proposalHash: Hash, + votingPeriod: BlockNumber, + delay: BlockNumber, + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: Hash, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: Hash, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId, + index: ReferendumIndex, + }), + remove_vote: sts.enumStruct({ + index: ReferendumIndex, + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId, + }), + veto_external: sts.enumStruct({ + proposalHash: Hash, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: AccountVoteSplit, + Standard: AccountVoteStandard, + } +}) + +export const AccountVoteStandard: sts.Type = sts.struct(() => { + return { + vote: Vote, + balance: Balance, + } +}) + +export const Vote = sts.number() + +export const AccountVoteSplit: sts.Type = sts.struct(() => { + return { + aye: Balance, + nay: Balance, + } +}) + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export const ReferendumIndex = sts.number() + +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: BalanceOf, + vestingSchedule: sts.option(() => sts.tuple(() => [BalanceOf, BalanceOf, BlockNumber])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: LookupSource, + dest: LookupSource, + value: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: LookupSource, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + } +}) + +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + report_equivocation: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const BabeEquivocationProof: sts.Type = sts.struct(() => { + return { + offender: AuthorityId, + slotNumber: SlotNumber, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: Hash, + number: sts.number(), + stateRoot: Hash, + extrinsicsRoot: Hash, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + AuthoritiesChange: sts.array(() => AuthorityId), + ChangesTrieRoot: Hash, + ChangesTrieSignal: ChangesTrieSignal, + Consensus: Consensus, + Other: sts.bytes(), + PreRuntime: PreRuntime, + RuntimeEnvironmentUpdated: sts.unit(), + Seal: Seal, + SealV0: SealV0, + } +}) + +export const SealV0 = sts.tuple(() => [sts.bigint(), Signature]) + +export const Seal = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const PreRuntime = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const Consensus = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const ConsensusEngineId = sts.bytes() + +export const ChangesTrieSignal: sts.Type = sts.closedEnum(() => { + return { + NewConfiguration: sts.option(() => ChangesTrieConfiguration), + } +}) + +export const SlotNumber = sts.bigint() + +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +export const AuthorityDiscoveryCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Type_194 = Type_194_AuthorityDiscovery | Type_194_Authorship | Type_194_Babe | Type_194_Balances | Type_194_Claims | Type_194_Council | Type_194_Democracy | Type_194_ElectionsPhragmen | Type_194_Grandpa | Type_194_Identity | Type_194_ImOnline | Type_194_Indices | Type_194_Multisig | Type_194_Offences | Type_194_Proxy | Type_194_Recovery | Type_194_Scheduler | Type_194_Session | Type_194_Society | Type_194_Staking | Type_194_System | Type_194_TechnicalCommittee | Type_194_TechnicalMembership | Type_194_Timestamp | Type_194_Treasury | Type_194_Utility | Type_194_Vesting + +export interface Type_194_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Type_194_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Type_194_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Type_194_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Type_194_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Type_194_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Type_194_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Type_194_ElectionsPhragmen { + __kind: 'ElectionsPhragmen' + value: ElectionsPhragmenCall +} + +export interface Type_194_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Type_194_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Type_194_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Type_194_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Type_194_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Type_194_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Type_194_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Type_194_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Type_194_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Type_194_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Type_194_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Type_194_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Type_194_System { + __kind: 'System' + value: SystemCall +} + +export interface Type_194_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Type_194_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Type_194_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Type_194_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Type_194_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Type_194_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId = sts.bytes() diff --git a/squid/src/types/v2028.ts b/squid/src/types/v2028.ts new file mode 100644 index 00000000..3fac1206 --- /dev/null +++ b/squid/src/types/v2028.ts @@ -0,0 +1,6553 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Type_199: sts.Type = sts.closedEnum(() => { + return { + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Democracy: DemocracyCall, + ElectionsPhragmen: ElectionsPhragmenCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + } +}) + +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: LookupSource, + target: LookupSource, + schedule: VestingInfo, + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: LookupSource, + }), + vested_transfer: sts.enumStruct({ + target: LookupSource, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: Balance, + perBlock: Balance, + startingBlock: BlockNumber, + } +}) + +export const BlockNumber = sts.number() + +export const Balance = sts.bigint() + +export interface VestingInfo { + locked: Balance + perBlock: Balance + startingBlock: BlockNumber +} + +export type BlockNumber = number + +export type Balance = bigint + +export const LookupSource: sts.Type = sts.closedEnum(() => { + return { + Address20: H160, + Address32: H256, + Id: AccountId, + Index: sts.number(), + Raw: sts.bytes(), + } +}) + +export const H256 = sts.bytes() + +export const H160 = sts.bytes() + +export type LookupSource = LookupSource_Address20 | LookupSource_Address32 | LookupSource_Id | LookupSource_Index | LookupSource_Raw + +export interface LookupSource_Address20 { + __kind: 'Address20' + value: H160 +} + +export interface LookupSource_Address32 { + __kind: 'Address32' + value: H256 +} + +export interface LookupSource_Id { + __kind: 'Id' + value: AccountId +} + +export interface LookupSource_Index { + __kind: 'Index' + value: number +} + +export interface LookupSource_Raw { + __kind: 'Raw' + value: Bytes +} + +export type AccountId = Bytes + +export type H256 = Bytes + +export type H160 = Bytes + +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: LookupSource + target: LookupSource + schedule: VestingInfo +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this module. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this module. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: LookupSource +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: LookupSource + schedule: VestingInfo +} + +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Type_199, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Type_199), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Type_199), + }), + } +}) + +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Type_199 +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Type_199[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Type_199[] +} + +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: LookupSource, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + } +}) + +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: LookupSource +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +export const TipsCall: sts.Type = sts.closedEnum(() => { + return { + close_tip: sts.enumStruct({ + hash: Hash, + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + }), + retract_tip: sts.enumStruct({ + hash: Hash, + }), + slash_tip: sts.enumStruct({ + hash: Hash, + }), + tip: sts.enumStruct({ + hash: Hash, + tipValue: sts.bigint(), + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + tipValue: sts.bigint(), + }), + } +}) + +export const Hash = sts.bytes() + +export type TipsCall = TipsCall_close_tip | TipsCall_report_awesome | TipsCall_retract_tip | TipsCall_slash_tip | TipsCall_tip | TipsCall_tip_new + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`. + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TipsCall_close_tip { + __kind: 'close_tip' + hash: Hash +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TipsCall_retract_tip { + __kind: 'retract_tip' + hash: Hash +} + +/** + * Remove and slash an already-open tip. + * + * May only be called from `T::RejectOrigin`. + * + * As a result, the finder is slashed and the deposits are lost. + * + * Emits `TipSlashed` if successful. + * + * # + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * # + */ +export interface TipsCall_slash_tip { + __kind: 'slash_tip' + hash: Hash +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`, insert tip and check closing, + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TipsCall_tip { + __kind: 'tip' + hash: Hash + tipValue: bigint +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T` + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId + tipValue: bigint +} + +export type Hash = Bytes + +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId, + }), + change_key: sts.enumStruct({ + new: AccountId, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId), + }), + set_prime: sts.enumStruct({ + who: AccountId, + }), + swap_member: sts.enumStruct({ + remove: AccountId, + add: AccountId, + }), + } +}) + +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId + add: AccountId +} + +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const MemberCount = sts.number() + +export const Proposal: sts.Type = sts.closedEnum(() => { + return { + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Democracy: DemocracyCall, + ElectionsPhragmen: ElectionsPhragmenCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + } +}) + +export type Proposal = Proposal_AuthorityDiscovery | Proposal_Authorship | Proposal_Babe | Proposal_Balances | Proposal_Bounties | Proposal_Claims | Proposal_Council | Proposal_Democracy | Proposal_ElectionsPhragmen | Proposal_Grandpa | Proposal_Identity | Proposal_ImOnline | Proposal_Indices | Proposal_Multisig | Proposal_Offences | Proposal_Proxy | Proposal_Recovery | Proposal_Scheduler | Proposal_Session | Proposal_Society | Proposal_Staking | Proposal_System | Proposal_TechnicalCommittee | Proposal_TechnicalMembership | Proposal_Timestamp | Proposal_Tips | Proposal_Treasury | Proposal_Utility | Proposal_Vesting + +export interface Proposal_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Proposal_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Proposal_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Proposal_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Proposal_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Proposal_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Proposal_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Proposal_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Proposal_ElectionsPhragmen { + __kind: 'ElectionsPhragmen' + value: ElectionsPhragmenCall +} + +export interface Proposal_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Proposal_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Proposal_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Proposal_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Proposal_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Proposal_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Proposal_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Proposal_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Proposal_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Proposal_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Proposal_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Proposal_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Proposal_System { + __kind: 'System' + value: SystemCall +} + +export interface Proposal_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Proposal_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Proposal_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Proposal_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Proposal_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Proposal_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Proposal_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_set_changes_trie_config | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + * + * # + * - `O(P)` where `P` amount of keys with prefix `prefix` + * - `P` storage deletions. + * - Base Weight: 0.834 * P µs + * - Writes: Number of subkeys + 1 + * # + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Key + subkeys: number +} + +/** + * Kill some items from storage. + * + * # + * - `O(IK)` where `I` length of `keys` and `K` length of one key + * - `I` storage deletions. + * - Base Weight: .378 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Key[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * - Base Weight: 0.665 µs, independent of remark length. + * - No DB operations. + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Set the new changes trie configuration. + * + * # + * - `O(1)` + * - 1 storage write or delete (codec `O(1)`). + * - 1 call to `deposit_log`: Uses `append` API, so O(1) + * - Base Weight: 7.218 µs + * - DB Weight: + * - Writes: Changes Trie, System Digest + * # + */ +export interface SystemCall_set_changes_trie_config { + __kind: 'set_changes_trie_config' + changesTrieConfig?: (ChangesTrieConfiguration | undefined) +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 storage write (codec `O(C)`). + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is expensive). + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very expensive. + * We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + * + * # + * - `O(1)` + * - 1 storage write. + * - Base Weight: 1.405 µs + * - 1 write to HEAP_PAGES + * # + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + * + * # + * - `O(I)` where `I` length of `items` + * - `I` storage writes (`O(1)`). + * - Base Weight: 0.568 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: KeyValue[] +} + +export type KeyValue = [StorageKey, StorageData] + +export type StorageData = Bytes + +export type StorageKey = Bytes + +export interface ChangesTrieConfiguration { + digestInterval: number + digestLevels: number +} + +export type Key = Bytes + +export type Perbill = number + +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_validator_count | StakingCall_submit_election_solution | StakingCall_submit_election_solution_unsigned | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger, [Origin Account], Current Era, History Depth, Locks + * - Write: Bonded, Payee, [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: LookupSource + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount + * that can be added. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller and + * it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * - One DB entry. + * ------------ + * DB Weight: + * - Read: Era Election Status, Bonded, Ledger, [Origin Account], Locks + * - Write: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + * + * # + * Complexity: O(U + S) + * with U unapplied slashes weighted with U=1000 + * and S is the number of slash indices to be canceled. + * - Read: Unapplied Slashes + * - Write: Unapplied Slashes + * # + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: EraIndex + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * -------- + * Weight: O(1) + * DB Weight: + * - Read: EraElectionStatus, Ledger + * - Write: Validators, Nominators + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + * + * # + * O(S) where S is the number of slashing spans to be removed + * Reads: Bonded, Slashing Spans, Account, Locks + * Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Account, Locks + * Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Same as [`set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. The controller + * account should represent a validator. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: LookupSource[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. This can only be called when + * [`EraElectionStatus`] is `Closed`. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS). + * - Both the reads and writes follow a similar pattern. + * --------- + * Weight: O(N) + * where N is the number of targets + * DB Weight: + * - Reads: Era Election Status, Ledger, Current Era + * - Writes: Validators, Nominators + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: LookupSource[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * This can only be called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * DB Weight: + * - Read: EraElectionStatus, CurrentEra, HistoryDepth, ErasValidatorReward, + * ErasStakersClipped, ErasRewardPoints, ErasValidatorPrefs (8 items) + * - Read Each: Bonded, Ledger, Payee, Locks, System Account (5 items) + * - Write Each: System Account, Locks, Ledger (3 items) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId + era: EraIndex +} + +/** + * Remove all data structure concerning a staker/stash once its balance is at the minimum. + * This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone + * and the target `stash` must have no funds left beyond the ED. + * + * This can be called from any origin. + * + * - `stash`: The stash account to reap. Its balance must be zero. + * + * # + * Complexity: O(S) where S is the number of slashing spans on the account. + * DB Weight: + * - Reads: Stash Account, Bonded, Slashing Spans, Locks + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Stash Account, Locks + * - Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller, and it can be only called when + * [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MAX_UNLOCKING_CHUNKS`. + * - Storage changes: Can't increase storage, only decrease it. + * --------------- + * - DB Weight: + * - Reads: EraElectionStatus, Ledger, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Same as [`set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: LookupSource +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. + * This should report all the storage items that will be deleted by clearing old + * era history. Needed to report an accurate weight for the dispatch. Trusted by + * `Root` to report an accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Weight: O(E) + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + * + * # + * - O(V) + * - Write: Invulnerables + * # + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Submit an election result to the chain. If the solution: + * + * 1. is valid. + * 2. has a better score than a potentially existing solution on chain. + * + * then, it will be _put_ on chain. + * + * A solution consists of two pieces of data: + * + * 1. `winners`: a flat vector of all the winners of the round. + * 2. `assignments`: the compact version of an assignment vector that encodes the edge + * weights. + * + * Both of which may be computed using _phragmen_, or any other algorithm. + * + * Additionally, the submitter must provide: + * + * - The `score` that they claim their solution has. + * + * Both validators and nominators will be represented by indices in the solution. The + * indices should respect the corresponding types ([`ValidatorIndex`] and + * [`NominatorIndex`]). Moreover, they should be valid when used to index into + * [`SnapshotValidators`] and [`SnapshotNominators`]. Any invalid index will cause the + * solution to be rejected. These two storage items are set during the election window and + * may be used to determine the indices. + * + * A solution is valid if: + * + * 0. It is submitted when [`EraElectionStatus`] is `Open`. + * 1. Its claimed score is equal to the score computed on-chain. + * 2. Presents the correct number of winners. + * 3. All indexes must be value according to the snapshot vectors. All edge values must + * also be correct and should not overflow the granularity of the ratio type (i.e. 256 + * or billion). + * 4. For each edge, all targets are actually nominated by the voter. + * 5. Has correct self-votes. + * + * A solutions score is consisted of 3 parameters: + * + * 1. `min { support.total }` for each support of a winner. This value should be maximized. + * 2. `sum { support.total }` for each support of a winner. This value should be minimized. + * 3. `sum { support.total^2 }` for each support of a winner. This value should be + * minimized (to ensure less variance) + * + * # + * The transaction is assumed to be the longest path, a better solution. + * - Initial solution is almost the same. + * - Worse solution is retraced in pre-dispatch-checks which sets its own weight. + * # + */ +export interface StakingCall_submit_election_solution { + __kind: 'submit_election_solution' + winners: ValidatorIndex[] + compact: CompactAssignments + score: ElectionScore + era: EraIndex + size: ElectionSize +} + +/** + * Unsigned version of `submit_election_solution`. + * + * Note that this must pass the [`ValidateUnsigned`] check which only allows transactions + * from the local node to be included. In other words, only the block author can include a + * transaction in the block. + * + * # + * See [`submit_election_solution`]. + * # + */ +export interface StakingCall_submit_election_solution_unsigned { + __kind: 'submit_election_solution_unsigned' + winners: ValidatorIndex[] + compact: CompactAssignments + score: ElectionScore + era: EraIndex + size: ElectionSize +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + * + * # + * - Independent of the arguments. Limited but potentially exploitable complexity. + * - Contains a limited number of reads. + * - Each call (requires the remainder of the bonded balance to be above `minimum_balance`) + * will cause a new entry to be inserted into a vector (`Ledger.unlocking`) kept in storage. + * The only way to clean the aforementioned storage item is also user-controlled via + * `withdraw_unbonded`. + * - One DB entry. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: EraElectionStatus, Ledger, CurrentEra, Locks, BalanceOf Stash, + * - Write: Locks, Ledger, BalanceOf Stash, + * + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ----------- + * Weight: O(1) + * DB Weight: + * - Read: Era Election Status, Ledger + * - Write: Nominators, Validators + * # + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * - Could be dependent on the `origin` argument and how much `unlocking` chunks exist. + * It implies `consolidate_unlocked` which loops over `Ledger.unlocking`, which is + * indirectly user-controlled. See [`unbond`] for more detail. + * - Contains a limited number of reads, yet the size of which could be large based on `ledger`. + * - Writes are limited to the `origin` account key. + * --------------- + * Complexity O(S) where S is the number of slashing spans to remove + * Update: + * - Reads: EraElectionStatus, Ledger, Current Era, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * Kill: + * - Reads: EraElectionStatus, Ledger, Current Era, Bonded, Slashing Spans, [Origin + * Account], Locks, BalanceOf stash + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, + * [Origin Account], Locks, BalanceOf stash. + * - Writes Each: SpanSlash * S + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export interface ElectionSize { + validators: number + nominators: number +} + +export type ElectionScore = bigint[] + +export interface CompactAssignments { + votes1: [NominatorIndexCompact, ValidatorIndexCompact][] + votes2: [NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact][] + votes3: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes4: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes5: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes6: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes7: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes8: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes9: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes10: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes11: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes12: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes13: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes14: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes15: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes16: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] +} + +export type CompactScoreCompact = [ValidatorIndexCompact, OffchainAccuracyCompact] + +export type OffchainAccuracyCompact = number + +export type ValidatorIndexCompact = number + +export type NominatorIndexCompact = number + +export type ValidatorIndex = number + +export type Percent = number + +export type EraIndex = number + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: BalanceOf +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * module to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId + judgement: SocietyJudgement +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin + * forgives (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: LookupSource + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId + value: BalanceOf + tip: BalanceOf +} + +export type SocietyJudgement = SocietyJudgement_Approve | SocietyJudgement_Rebid | SocietyJudgement_Reject + +export interface SocietyJudgement_Approve { + __kind: 'Approve' +} + +export interface SocietyJudgement_Rebid { + __kind: 'Rebid' +} + +export interface SocietyJudgement_Reject { + __kind: 'Reject' +} + +export type BalanceOf = bigint + +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` in number of key types. + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwnder` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: Keys + proof: Bytes +} + +export type Keys = [AccountId, AccountId, AccountId, AccountId, AccountId, AccountId] + +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.15 + 2.869 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: BlockNumber + index: number +} + +/** + * Cancel a named scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 24.91 + 2.907 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.29 + .126 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda + * - Will use base weight of 25 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_199 +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_199 +} + +/** + * Schedule a named task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 29.6 + .159 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 35 which should be good for more than 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_199 +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`]. + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_199 +} + +export type Priority = number + +export type Period = [BlockNumber, number] + +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + * + * # + * - The weight of the `call` + 10,000. + * - One storage lookup to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId + call: Type_199 +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + * + * # + * - One storage mutation to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully + * recovered by you. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + V) + * # + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + * + * # + * Key: V (len of vouching friends) + * - One storage read/remove to get the active recovery process. O(1), Codec O(V) + * - One balance call to repatriate reserved. O(X) + * - One event. + * + * Total Complexity: O(V + X) + * # + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. + * Should be ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt + * before the account can be recovered. Should be less than or equal to + * the length of the list of friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized + * that needs to pass before the account can be recovered. + * + * # + * - Key: F (len of friends) + * - One storage read to check that account is not already recoverable. O(1). + * - A check that the friends list is sorted and unique. O(F) + * - One currency reserve operation. O(X) + * - One storage write. O(1). Codec O(F). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId[] + threshold: number + delayPeriod: BlockNumber +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account + * needs to be recoverable (i.e. have a recovery configuration). + * + * # + * - One storage read to check that account is recoverable. O(F) + * - One storage read to check that this recovery process hasn't already started. O(1) + * - One currency reserve operation. O(X) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + * + * # + * Key: F (len of friends) + * - One storage read to get the prefix iterator for active recoveries. O(1) + * - One storage read/remove to get the recovery configuration. O(1), Codec O(F) + * - One balance call to unreserved. O(X) + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + * + * # + * - One storage write O(1) + * - One event + * # + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId + rescuer: AccountId +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you + * want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One binary search to confirm caller is a friend. O(logF) + * - One binary search to confirm caller has not already vouched. O(logV) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + logF + V + logV) + * # + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId + rescuer: AccountId +} + +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: AccountId + proxyType: ProxyType + delay: BlockNumber +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: AccountId + callHash: CallHashOf +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + * TODO: Might be over counting 1 read + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: BlockNumber + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_199 +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: AccountId + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_199 +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: AccountId + callHash: CallHashOf +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: AccountId + callHash: CallHashOf +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: AccountId + proxyType: ProxyType + delay: BlockNumber +} + +export type CallHashOf = Bytes + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +export type OffencesCall = never + +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + call: OpaqueCall + storeCall: boolean + maxWeight: Weight +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId[] + call: Type_199 +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId[] + timepoint: Timepoint + callHash: Bytes +} + +export type OpaqueCall = Bytes + +export type Weight = bigint + +export interface Timepoint { + height: BlockNumber + index: number +} + +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: AccountIndex +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId + index: AccountIndex + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: AccountIndex +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: AccountIndex +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId + index: AccountIndex +} + +export type AccountIndex = number + +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) + * and E is length of `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Signature +} + +export type Signature = Bytes + +export interface Heartbeat { + blockNumber: BlockNumber + networkState: OpaqueNetworkState + sessionIndex: SessionIndex + authorityIndex: AuthIndex + validatorsLen: number +} + +export type AuthIndex = number + +export type SessionIndex = number + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: LookupSource + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: RegistrarIndex +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: LookupSource +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: LookupSource + judgement: IdentityJudgement +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: LookupSource +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: LookupSource + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: bigint +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId, Data][] +} + +export interface IdentityInfo { + additional: IdentityInfoAdditional[] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (H160 | undefined) + image: Data + twitter: Data +} + +export type IdentityInfoAdditional = [Data, Data] + +export type IdentityJudgement = IdentityJudgement_Erroneous | IdentityJudgement_FeePaid | IdentityJudgement_KnownGood | IdentityJudgement_LowQuality | IdentityJudgement_OutOfDate | IdentityJudgement_Reasonable | IdentityJudgement_Unknown + +export interface IdentityJudgement_Erroneous { + __kind: 'Erroneous' +} + +export interface IdentityJudgement_FeePaid { + __kind: 'FeePaid' + value: Balance +} + +export interface IdentityJudgement_KnownGood { + __kind: 'KnownGood' +} + +export interface IdentityJudgement_LowQuality { + __kind: 'LowQuality' +} + +export interface IdentityJudgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface IdentityJudgement_Reasonable { + __kind: 'Reasonable' +} + +export interface IdentityJudgement_Unknown { + __kind: 'Unknown' +} + +export type RegistrarIndex = number + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: H256 +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: H256 +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: H256 +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: H256 +} + +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has + * stalled. This will trigger a forced authority set change at the beginning + * of the next session, to be enacted `delay` blocks after that. The delay + * should be high enough to safely assume that the block signalling the + * forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters + * will start the new authority set using the given finalized block as base. + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: BlockNumber + bestFinalizedBlockNumber: BlockNumber +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface KeyOwnerProof { + session: SessionIndex + trieNodes: Bytes[] + validatorCount: ValidatorCount +} + +export type ValidatorCount = number + +export interface GrandpaEquivocationProof { + setId: SetId + equivocation: GrandpaEquivocation +} + +export type GrandpaEquivocation = GrandpaEquivocation_Precommit | GrandpaEquivocation_Prevote + +export interface GrandpaEquivocation_Precommit { + __kind: 'Precommit' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocation_Prevote { + __kind: 'Prevote' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocationValue { + roundNumber: bigint + identity: AuthorityId + first: [GrandpaPrevote, AuthoritySignature] + second: [GrandpaPrevote, AuthoritySignature] +} + +export type AuthoritySignature = Bytes + +export interface GrandpaPrevote { + targetHash: Hash + targetNumber: BlockNumber +} + +export type AuthorityId = Bytes + +export type SetId = bigint + +export type ElectionsPhragmenCall = ElectionsPhragmenCall_clean_defunct_voters | ElectionsPhragmenCall_remove_member | ElectionsPhragmenCall_remove_voter | ElectionsPhragmenCall_renounce_candidacy | ElectionsPhragmenCall_submit_candidacy | ElectionsPhragmenCall_vote + +/** + * Clean all voters who are defunct (i.e. they do not serve any purpose at all). The + * deposit of the removed voters are returned. + * + * This is an root function to be used only for cleaning the state. + * + * The dispatch origin of this call must be root. + * + * # + * The total number of voters and those that are defunct must be provided as witness data. + * # + */ +export interface ElectionsPhragmenCall_clean_defunct_voters { + __kind: 'clean_defunct_voters' + numVoters: number + numDefunct: number +} + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, a new phragmen election is started. + * + * The dispatch origin of this call must be root. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement, we use a small weight. Else, since this is a root call and + * will go into phragmen, we assume full block for now. + * # + */ +export interface ElectionsPhragmenCall_remove_member { + __kind: 'remove_member' + who: LookupSource + hasReplacement: boolean +} + +/** + * Remove `origin` as a voter. + * + * This removes the lock and returns the deposit. + * + * The dispatch origin of this call must be signed and be a voter. + */ +export interface ElectionsPhragmenCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * + * - `origin` is a candidate and not elected in any set. In this case, the deposit is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the deposit is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the deposit is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_members`], if replacement runners exists, they are immediately used. + * If the prime is renouncing, then no prime will exist until the next round. + * + * The dispatch origin of this call must be signed, and have one of the above roles. + * + * # + * The type of renouncing must be provided as witness data. + * # + */ +export interface ElectionsPhragmenCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Submit oneself for candidacy. A fixed amount of deposit is recorded. + * + * All candidates are wiped at the end of the term. They either become a member/runner-up, + * or leave the system while their deposit is slashed. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`] + * to get their deposit back. Losing the spot in an election will always lead to a slash. + * + * # + * The number of current candidates must be provided as witness data. + * # + */ +export interface ElectionsPhragmenCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is + * reserved. The deposit is based on the number of votes and can be updated over time. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * If `value` is more than `who`'s total balance, then the maximum of the two is used. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * It is the responsibility of the caller to **NOT** place all of their balance into the + * lock and keep some for further operations. + * + * # + * We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less. + * # + */ +export interface ElectionsPhragmenCall_vote { + __kind: 'vote' + votes: AccountId[] + value: bigint +} + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +export type DemocracyCall = DemocracyCall_blacklist | DemocracyCall_cancel_proposal | DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. + * + * If called on a queued public or external proposal, then this will result in it being + * removed. If the `ref_index` supplied is an active referendum with the proposal hash, + * then it will be cancelled. + * + * The dispatch origin of this call must be `BlacklistOrigin`. + * + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. + * + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). + */ +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: Hash + maybeRefIndex?: (ReferendumIndex | undefined) +} + +/** + * Remove a proposal. + * + * The dispatch origin of this call must be `CancelProposalOrigin`. + * + * - `prop_index`: The index of the proposal to cancel. + * + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number +} + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: ReferendumIndex +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must + * not be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId + conviction: Conviction + balance: BalanceOf +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: ReferendumIndex +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: Hash + index: ReferendumIndex +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Weight: `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: Hash +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: Hash +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: Hash +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * `FastTrackVotingPeriod` if too low. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: Hash + votingPeriod: BlockNumber + delay: BlockNumber +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. When this call is successful, i.e. + * the preimage has not been uploaded before and matches some imminent proposal, + * no fee is paid. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * Weight: `O(p)` + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: Hash + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. + * Extrinsic is weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * Weight: `O(D)` where D is length of proposal. + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: Hash + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId + index: ReferendumIndex +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: ReferendumIndex +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * Weight: `O(S)` where S is the number of seconds a proposal already has. + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * Weight: `O(V + log(V))` where V is number of `existing vetoers` + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: Hash +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of referendums the voter has voted on. + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + value: AccountVoteSplit +} + +export interface AccountVote_Standard { + __kind: 'Standard' + value: AccountVoteStandard +} + +export interface AccountVoteStandard { + vote: Vote + balance: Balance +} + +export type Vote = number + +export interface AccountVoteSplit { + aye: Balance + nay: Balance +} + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +export type ReferendumIndex = number + +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export type MemberCount = number + +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: BalanceOf + vestingSchedule?: ([BalanceOf, BalanceOf, BlockNumber] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId | undefined) +} + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: LookupSource +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: LookupSource + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is malicious + * or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is + * not assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: LookupSource + dest: LookupSource + value: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also decrease the total issuance of the system (`TotalIssuance`). + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + * + * # + * - Independent of the arguments. + * - Contains a limited number of reads and writes. + * --------------------- + * - Base Weight: + * - Creating: 27.56 µs + * - Killing: 35.11 µs + * - DB Weight: 1 Read, 1 Write to `who` + * # + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: LookupSource + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * It will decrease the total issuance of the system by the `TransferFee`. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for + * input config types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional + * check that the transfer will not kill the origin account. + * --------------------------------- + * - Base Weight: 73.64 µs, worst case scenario (account created, account removed) + * - DB Weight: 1 Read and 1 Write to destination account + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: LookupSource + value: bigint +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Module.html#method.transfer + * # + * - Cheaper than transfer because account cannot be killed. + * - Base Weight: 51.4 µs + * - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already) + * # + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: LookupSource + value: bigint +} + +export type BabeCall = BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface BabeEquivocationProof { + offender: AuthorityId + slotNumber: SlotNumber + firstHeader: Header + secondHeader: Header +} + +export interface Header { + parentHash: Hash + number: number + stateRoot: Hash + extrinsicsRoot: Hash + digest: Digest +} + +export interface Digest { + logs: DigestItem[] +} + +export type DigestItem = DigestItem_AuthoritiesChange | DigestItem_ChangesTrieRoot | DigestItem_ChangesTrieSignal | DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal | DigestItem_SealV0 + +export interface DigestItem_AuthoritiesChange { + __kind: 'AuthoritiesChange' + value: AuthorityId[] +} + +export interface DigestItem_ChangesTrieRoot { + __kind: 'ChangesTrieRoot' + value: Hash +} + +export interface DigestItem_ChangesTrieSignal { + __kind: 'ChangesTrieSignal' + value: ChangesTrieSignal +} + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: Consensus +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: PreRuntime +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: Seal +} + +export interface DigestItem_SealV0 { + __kind: 'SealV0' + value: SealV0 +} + +export type SealV0 = [bigint, Signature] + +export type Seal = [ConsensusEngineId, Bytes] + +export type PreRuntime = [ConsensusEngineId, Bytes] + +export type Consensus = [ConsensusEngineId, Bytes] + +export type ConsensusEngineId = Bytes + +export type ChangesTrieSignal = ChangesTrieSignal_NewConfiguration + +export interface ChangesTrieSignal_NewConfiguration { + __kind: 'NewConfiguration' + value?: (ChangesTrieConfiguration | undefined) +} + +export type SlotNumber = bigint + +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +export type AuthorityDiscoveryCall = never + +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: Key, + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => Key), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + set_changes_trie_config: sts.enumStruct({ + changesTrieConfig: sts.option(() => ChangesTrieConfiguration), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => KeyValue), + }), + } +}) + +export const KeyValue = sts.tuple(() => [StorageKey, StorageData]) + +export const StorageData = sts.bytes() + +export const StorageKey = sts.bytes() + +export const ChangesTrieConfiguration: sts.Type = sts.struct(() => { + return { + digestInterval: sts.number(), + digestLevels: sts.number(), + } +}) + +export const Key = sts.bytes() + +export const Perbill = sts.number() + +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: LookupSource, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: EraIndex, + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => LookupSource), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => LookupSource), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId, + era: EraIndex, + }), + reap_stash: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: LookupSource, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + submit_election_solution: sts.enumStruct({ + winners: sts.array(() => ValidatorIndex), + compact: CompactAssignments, + score: ElectionScore, + era: EraIndex, + size: ElectionSize, + }), + submit_election_solution_unsigned: sts.enumStruct({ + winners: sts.array(() => ValidatorIndex), + compact: CompactAssignments, + score: ElectionScore, + era: EraIndex, + size: ElectionSize, + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export const ElectionSize: sts.Type = sts.struct(() => { + return { + validators: sts.number(), + nominators: sts.number(), + } +}) + +export const ElectionScore = sts.array(() => sts.bigint()) + +export const CompactAssignments: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [NominatorIndexCompact, ValidatorIndexCompact])), + votes2: sts.array(() => sts.tuple(() => [NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact])), + votes3: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes4: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes5: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes6: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes7: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes8: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes9: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes10: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes11: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes12: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes13: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes14: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes15: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes16: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + } +}) + +export const CompactScoreCompact = sts.tuple(() => [ValidatorIndexCompact, OffchainAccuracyCompact]) + +export const OffchainAccuracyCompact = sts.number() + +export const ValidatorIndexCompact = sts.number() + +export const NominatorIndexCompact = sts.number() + +export const ValidatorIndex = sts.number() + +export const Percent = sts.number() + +export const EraIndex = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: BalanceOf, + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId, + judgement: SocietyJudgement, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: LookupSource, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId, + value: BalanceOf, + tip: BalanceOf, + }), + } +}) + +export const SocietyJudgement: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export const BalanceOf = sts.bigint() + +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: Keys, + proof: sts.bytes(), + }), + } +}) + +export const Keys = sts.tuple(() => [AccountId, AccountId, AccountId, AccountId, AccountId, AccountId]) + +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: BlockNumber, + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_199, + }), + schedule_after: sts.enumStruct({ + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_199, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_199, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_199, + }), + } +}) + +export const Priority = sts.number() + +export const Period = sts.tuple(() => [BlockNumber, sts.number()]) + +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId, + call: Type_199, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId, + }), + claim_recovery: sts.enumStruct({ + account: AccountId, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId), + threshold: sts.number(), + delayPeriod: BlockNumber, + }), + initiate_recovery: sts.enumStruct({ + account: AccountId, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + } +}) + +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: AccountId, + proxyType: ProxyType, + delay: BlockNumber, + }), + announce: sts.enumStruct({ + real: AccountId, + callHash: CallHashOf, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + delay: BlockNumber, + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_199, + }), + proxy_announced: sts.enumStruct({ + delegate: AccountId, + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_199, + }), + reject_announcement: sts.enumStruct({ + delegate: AccountId, + callHash: CallHashOf, + }), + remove_announcement: sts.enumStruct({ + real: AccountId, + callHash: CallHashOf, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: AccountId, + proxyType: ProxyType, + delay: BlockNumber, + }), + } +}) + +export const CallHashOf = sts.bytes() + +export const OffencesCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + call: OpaqueCall, + storeCall: sts.boolean(), + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId), + call: Type_199, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const OpaqueCall = sts.bytes() + +export const Weight = sts.bigint() + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: BlockNumber, + index: sts.number(), + } +}) + +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: AccountIndex, + }), + force_transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: AccountIndex, + }), + freeze: sts.enumStruct({ + index: AccountIndex, + }), + transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + }), + } +}) + +export const AccountIndex = sts.number() + +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: Signature, + }), + } +}) + +export const Signature = sts.bytes() + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: BlockNumber, + networkState: OpaqueNetworkState, + sessionIndex: SessionIndex, + authorityIndex: AuthIndex, + validatorsLen: sts.number(), + } +}) + +export const AuthIndex = sts.number() + +export const SessionIndex = sts.number() + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId, + }), + add_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: RegistrarIndex, + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: LookupSource, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: LookupSource, + judgement: IdentityJudgement, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: LookupSource, + }), + rename_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: sts.bigint(), + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => IdentityInfoAdditional), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => H160), + image: Data, + twitter: Data, + } +}) + +export const IdentityInfoAdditional = sts.tuple(() => [Data, Data]) + +export const IdentityJudgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: Balance, + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export const RegistrarIndex = sts.number() + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: H256, + Keccak256: H256, + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: H256, + ShaThree256: H256, + } +}) + +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: BlockNumber, + bestFinalizedBlockNumber: BlockNumber, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const KeyOwnerProof: sts.Type = sts.struct(() => { + return { + session: SessionIndex, + trieNodes: sts.array(() => sts.bytes()), + validatorCount: ValidatorCount, + } +}) + +export const ValidatorCount = sts.number() + +export const GrandpaEquivocationProof: sts.Type = sts.struct(() => { + return { + setId: SetId, + equivocation: GrandpaEquivocation, + } +}) + +export const GrandpaEquivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: GrandpaEquivocationValue, + Prevote: GrandpaEquivocationValue, + } +}) + +export const GrandpaEquivocationValue: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: AuthorityId, + first: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + second: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + } +}) + +export const AuthoritySignature = sts.bytes() + +export const GrandpaPrevote: sts.Type = sts.struct(() => { + return { + targetHash: Hash, + targetNumber: BlockNumber, + } +}) + +export const AuthorityId = sts.bytes() + +export const SetId = sts.bigint() + +export const ElectionsPhragmenCall: sts.Type = sts.closedEnum(() => { + return { + clean_defunct_voters: sts.enumStruct({ + numVoters: sts.number(), + numDefunct: sts.number(), + }), + remove_member: sts.enumStruct({ + who: LookupSource, + hasReplacement: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId), + value: sts.bigint(), + }), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + blacklist: sts.enumStruct({ + proposalHash: Hash, + maybeRefIndex: sts.option(() => ReferendumIndex), + }), + cancel_proposal: sts.enumStruct({ + propIndex: sts.number(), + }), + cancel_queued: sts.enumStruct({ + which: ReferendumIndex, + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId, + conviction: Conviction, + balance: BalanceOf, + }), + emergency_cancel: sts.enumStruct({ + refIndex: ReferendumIndex, + }), + enact_proposal: sts.enumStruct({ + proposalHash: Hash, + index: ReferendumIndex, + }), + external_propose: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_default: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: Hash, + }), + fast_track: sts.enumStruct({ + proposalHash: Hash, + votingPeriod: BlockNumber, + delay: BlockNumber, + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: Hash, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: Hash, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId, + index: ReferendumIndex, + }), + remove_vote: sts.enumStruct({ + index: ReferendumIndex, + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId, + }), + veto_external: sts.enumStruct({ + proposalHash: Hash, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: AccountVoteSplit, + Standard: AccountVoteStandard, + } +}) + +export const AccountVoteStandard: sts.Type = sts.struct(() => { + return { + vote: Vote, + balance: Balance, + } +}) + +export const Vote = sts.number() + +export const AccountVoteSplit: sts.Type = sts.struct(() => { + return { + aye: Balance, + nay: Balance, + } +}) + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export const ReferendumIndex = sts.number() + +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: BalanceOf, + vestingSchedule: sts.option(() => sts.tuple(() => [BalanceOf, BalanceOf, BlockNumber])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: LookupSource, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: LookupSource, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: LookupSource, + dest: LookupSource, + value: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: LookupSource, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + } +}) + +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + report_equivocation: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const BabeEquivocationProof: sts.Type = sts.struct(() => { + return { + offender: AuthorityId, + slotNumber: SlotNumber, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: Hash, + number: sts.number(), + stateRoot: Hash, + extrinsicsRoot: Hash, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + AuthoritiesChange: sts.array(() => AuthorityId), + ChangesTrieRoot: Hash, + ChangesTrieSignal: ChangesTrieSignal, + Consensus: Consensus, + Other: sts.bytes(), + PreRuntime: PreRuntime, + RuntimeEnvironmentUpdated: sts.unit(), + Seal: Seal, + SealV0: SealV0, + } +}) + +export const SealV0 = sts.tuple(() => [sts.bigint(), Signature]) + +export const Seal = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const PreRuntime = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const Consensus = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const ConsensusEngineId = sts.bytes() + +export const ChangesTrieSignal: sts.Type = sts.closedEnum(() => { + return { + NewConfiguration: sts.option(() => ChangesTrieConfiguration), + } +}) + +export const SlotNumber = sts.bigint() + +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +export const AuthorityDiscoveryCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Type_199 = Type_199_AuthorityDiscovery | Type_199_Authorship | Type_199_Babe | Type_199_Balances | Type_199_Bounties | Type_199_Claims | Type_199_Council | Type_199_Democracy | Type_199_ElectionsPhragmen | Type_199_Grandpa | Type_199_Identity | Type_199_ImOnline | Type_199_Indices | Type_199_Multisig | Type_199_Offences | Type_199_Proxy | Type_199_Recovery | Type_199_Scheduler | Type_199_Session | Type_199_Society | Type_199_Staking | Type_199_System | Type_199_TechnicalCommittee | Type_199_TechnicalMembership | Type_199_Timestamp | Type_199_Tips | Type_199_Treasury | Type_199_Utility | Type_199_Vesting + +export interface Type_199_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Type_199_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Type_199_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Type_199_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Type_199_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Type_199_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Type_199_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Type_199_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Type_199_ElectionsPhragmen { + __kind: 'ElectionsPhragmen' + value: ElectionsPhragmenCall +} + +export interface Type_199_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Type_199_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Type_199_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Type_199_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Type_199_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Type_199_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Type_199_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Type_199_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Type_199_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Type_199_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Type_199_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Type_199_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Type_199_System { + __kind: 'System' + value: SystemCall +} + +export interface Type_199_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Type_199_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Type_199_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Type_199_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Type_199_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Type_199_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Type_199_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId = sts.bytes() diff --git a/squid/src/types/v2029.ts b/squid/src/types/v2029.ts new file mode 100644 index 00000000..369f7924 --- /dev/null +++ b/squid/src/types/v2029.ts @@ -0,0 +1,6664 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Type_199: sts.Type = sts.closedEnum(() => { + return { + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Democracy: DemocracyCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + ElectionsPhragmen: ElectionsPhragmenCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + } +}) + +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: LookupSource, + target: LookupSource, + schedule: VestingInfo, + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: LookupSource, + }), + vested_transfer: sts.enumStruct({ + target: LookupSource, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: Balance, + perBlock: Balance, + startingBlock: BlockNumber, + } +}) + +export const BlockNumber = sts.number() + +export const Balance = sts.bigint() + +export interface VestingInfo { + locked: Balance + perBlock: Balance + startingBlock: BlockNumber +} + +export type BlockNumber = number + +export type Balance = bigint + +export const LookupSource: sts.Type = sts.closedEnum(() => { + return { + Address20: H160, + Address32: H256, + Id: AccountId, + Index: sts.number(), + Raw: sts.bytes(), + } +}) + +export const H256 = sts.bytes() + +export const H160 = sts.bytes() + +export type LookupSource = LookupSource_Address20 | LookupSource_Address32 | LookupSource_Id | LookupSource_Index | LookupSource_Raw + +export interface LookupSource_Address20 { + __kind: 'Address20' + value: H160 +} + +export interface LookupSource_Address32 { + __kind: 'Address32' + value: H256 +} + +export interface LookupSource_Id { + __kind: 'Id' + value: AccountId +} + +export interface LookupSource_Index { + __kind: 'Index' + value: number +} + +export interface LookupSource_Raw { + __kind: 'Raw' + value: Bytes +} + +export type AccountId = Bytes + +export type H256 = Bytes + +export type H160 = Bytes + +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: LookupSource + target: LookupSource + schedule: VestingInfo +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this module. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this module. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: LookupSource +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: LookupSource + schedule: VestingInfo +} + +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Type_199, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Type_199), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Type_199), + }), + } +}) + +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Type_199 +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Type_199[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Type_199[] +} + +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: LookupSource, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + } +}) + +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: LookupSource +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +export const TipsCall: sts.Type = sts.closedEnum(() => { + return { + close_tip: sts.enumStruct({ + hash: Hash, + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + }), + retract_tip: sts.enumStruct({ + hash: Hash, + }), + slash_tip: sts.enumStruct({ + hash: Hash, + }), + tip: sts.enumStruct({ + hash: Hash, + tipValue: sts.bigint(), + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + tipValue: sts.bigint(), + }), + } +}) + +export const Hash = sts.bytes() + +export type TipsCall = TipsCall_close_tip | TipsCall_report_awesome | TipsCall_retract_tip | TipsCall_slash_tip | TipsCall_tip | TipsCall_tip_new + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`. + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TipsCall_close_tip { + __kind: 'close_tip' + hash: Hash +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TipsCall_retract_tip { + __kind: 'retract_tip' + hash: Hash +} + +/** + * Remove and slash an already-open tip. + * + * May only be called from `T::RejectOrigin`. + * + * As a result, the finder is slashed and the deposits are lost. + * + * Emits `TipSlashed` if successful. + * + * # + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * # + */ +export interface TipsCall_slash_tip { + __kind: 'slash_tip' + hash: Hash +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`, insert tip and check closing, + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TipsCall_tip { + __kind: 'tip' + hash: Hash + tipValue: bigint +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T` + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId + tipValue: bigint +} + +export type Hash = Bytes + +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId, + }), + change_key: sts.enumStruct({ + new: AccountId, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId), + }), + set_prime: sts.enumStruct({ + who: AccountId, + }), + swap_member: sts.enumStruct({ + remove: AccountId, + add: AccountId, + }), + } +}) + +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId + add: AccountId +} + +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const MemberCount = sts.number() + +export const Proposal: sts.Type = sts.closedEnum(() => { + return { + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Democracy: DemocracyCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + ElectionsPhragmen: ElectionsPhragmenCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + } +}) + +export type Proposal = Proposal_AuthorityDiscovery | Proposal_Authorship | Proposal_Babe | Proposal_Balances | Proposal_Bounties | Proposal_Claims | Proposal_Council | Proposal_Democracy | Proposal_ElectionProviderMultiPhase | Proposal_ElectionsPhragmen | Proposal_Grandpa | Proposal_Identity | Proposal_ImOnline | Proposal_Indices | Proposal_Multisig | Proposal_Offences | Proposal_Proxy | Proposal_Recovery | Proposal_Scheduler | Proposal_Session | Proposal_Society | Proposal_Staking | Proposal_System | Proposal_TechnicalCommittee | Proposal_TechnicalMembership | Proposal_Timestamp | Proposal_Tips | Proposal_Treasury | Proposal_Utility | Proposal_Vesting + +export interface Proposal_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Proposal_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Proposal_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Proposal_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Proposal_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Proposal_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Proposal_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Proposal_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Proposal_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Proposal_ElectionsPhragmen { + __kind: 'ElectionsPhragmen' + value: ElectionsPhragmenCall +} + +export interface Proposal_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Proposal_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Proposal_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Proposal_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Proposal_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Proposal_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Proposal_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Proposal_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Proposal_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Proposal_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Proposal_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Proposal_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Proposal_System { + __kind: 'System' + value: SystemCall +} + +export interface Proposal_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Proposal_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Proposal_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Proposal_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Proposal_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Proposal_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Proposal_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_set_changes_trie_config | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + * + * # + * - `O(P)` where `P` amount of keys with prefix `prefix` + * - `P` storage deletions. + * - Base Weight: 0.834 * P µs + * - Writes: Number of subkeys + 1 + * # + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Key + subkeys: number +} + +/** + * Kill some items from storage. + * + * # + * - `O(IK)` where `I` length of `keys` and `K` length of one key + * - `I` storage deletions. + * - Base Weight: .378 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Key[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * - Base Weight: 0.665 µs, independent of remark length. + * - No DB operations. + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Set the new changes trie configuration. + * + * # + * - `O(1)` + * - 1 storage write or delete (codec `O(1)`). + * - 1 call to `deposit_log`: Uses `append` API, so O(1) + * - Base Weight: 7.218 µs + * - DB Weight: + * - Writes: Changes Trie, System Digest + * # + */ +export interface SystemCall_set_changes_trie_config { + __kind: 'set_changes_trie_config' + changesTrieConfig?: (ChangesTrieConfiguration | undefined) +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 storage write (codec `O(C)`). + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is expensive). + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very expensive. + * We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + * + * # + * - `O(1)` + * - 1 storage write. + * - Base Weight: 1.405 µs + * - 1 write to HEAP_PAGES + * # + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + * + * # + * - `O(I)` where `I` length of `items` + * - `I` storage writes (`O(1)`). + * - Base Weight: 0.568 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: KeyValue[] +} + +export type KeyValue = [StorageKey, StorageData] + +export type StorageData = Bytes + +export type StorageKey = Bytes + +export interface ChangesTrieConfiguration { + digestInterval: number + digestLevels: number +} + +export type Key = Bytes + +export type Perbill = number + +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_validator_count | StakingCall_submit_election_solution | StakingCall_submit_election_solution_unsigned | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger, [Origin Account], Current Era, History Depth, Locks + * - Write: Bonded, Payee, [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: LookupSource + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount + * that can be added. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller and + * it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * - One DB entry. + * ------------ + * DB Weight: + * - Read: Era Election Status, Bonded, Ledger, [Origin Account], Locks + * - Write: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + * + * # + * Complexity: O(U + S) + * with U unapplied slashes weighted with U=1000 + * and S is the number of slash indices to be canceled. + * - Read: Unapplied Slashes + * - Write: Unapplied Slashes + * # + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: EraIndex + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * -------- + * Weight: O(1) + * DB Weight: + * - Read: EraElectionStatus, Ledger + * - Write: Validators, Nominators + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + * + * # + * O(S) where S is the number of slashing spans to be removed + * Reads: Bonded, Slashing Spans, Account, Locks + * Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Account, Locks + * Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Same as [`set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. The controller + * account should represent a validator. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: LookupSource[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. This can only be called when + * [`EraElectionStatus`] is `Closed`. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS). + * - Both the reads and writes follow a similar pattern. + * --------- + * Weight: O(N) + * where N is the number of targets + * DB Weight: + * - Reads: Era Election Status, Ledger, Current Era + * - Writes: Validators, Nominators + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: LookupSource[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * This can only be called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * DB Weight: + * - Read: EraElectionStatus, CurrentEra, HistoryDepth, ErasValidatorReward, + * ErasStakersClipped, ErasRewardPoints, ErasValidatorPrefs (8 items) + * - Read Each: Bonded, Ledger, Payee, Locks, System Account (5 items) + * - Write Each: System Account, Locks, Ledger (3 items) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId + era: EraIndex +} + +/** + * Remove all data structure concerning a staker/stash once its balance is at the minimum. + * This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone + * and the target `stash` must have no funds left beyond the ED. + * + * This can be called from any origin. + * + * - `stash`: The stash account to reap. Its balance must be zero. + * + * # + * Complexity: O(S) where S is the number of slashing spans on the account. + * DB Weight: + * - Reads: Stash Account, Bonded, Slashing Spans, Locks + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Stash Account, Locks + * - Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller, and it can be only called when + * [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MAX_UNLOCKING_CHUNKS`. + * - Storage changes: Can't increase storage, only decrease it. + * --------------- + * - DB Weight: + * - Reads: EraElectionStatus, Ledger, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Same as [`set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: LookupSource +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. + * This should report all the storage items that will be deleted by clearing old + * era history. Needed to report an accurate weight for the dispatch. Trusted by + * `Root` to report an accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Weight: O(E) + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + * + * # + * - O(V) + * - Write: Invulnerables + * # + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Submit an election result to the chain. If the solution: + * + * 1. is valid. + * 2. has a better score than a potentially existing solution on chain. + * + * then, it will be _put_ on chain. + * + * A solution consists of two pieces of data: + * + * 1. `winners`: a flat vector of all the winners of the round. + * 2. `assignments`: the compact version of an assignment vector that encodes the edge + * weights. + * + * Both of which may be computed using _phragmen_, or any other algorithm. + * + * Additionally, the submitter must provide: + * + * - The `score` that they claim their solution has. + * + * Both validators and nominators will be represented by indices in the solution. The + * indices should respect the corresponding types ([`ValidatorIndex`] and + * [`NominatorIndex`]). Moreover, they should be valid when used to index into + * [`SnapshotValidators`] and [`SnapshotNominators`]. Any invalid index will cause the + * solution to be rejected. These two storage items are set during the election window and + * may be used to determine the indices. + * + * A solution is valid if: + * + * 0. It is submitted when [`EraElectionStatus`] is `Open`. + * 1. Its claimed score is equal to the score computed on-chain. + * 2. Presents the correct number of winners. + * 3. All indexes must be value according to the snapshot vectors. All edge values must + * also be correct and should not overflow the granularity of the ratio type (i.e. 256 + * or billion). + * 4. For each edge, all targets are actually nominated by the voter. + * 5. Has correct self-votes. + * + * A solutions score is consisted of 3 parameters: + * + * 1. `min { support.total }` for each support of a winner. This value should be maximized. + * 2. `sum { support.total }` for each support of a winner. This value should be minimized. + * 3. `sum { support.total^2 }` for each support of a winner. This value should be + * minimized (to ensure less variance) + * + * # + * The transaction is assumed to be the longest path, a better solution. + * - Initial solution is almost the same. + * - Worse solution is retraced in pre-dispatch-checks which sets its own weight. + * # + */ +export interface StakingCall_submit_election_solution { + __kind: 'submit_election_solution' + winners: ValidatorIndex[] + compact: CompactAssignments + score: ElectionScore + era: EraIndex + size: ElectionSize +} + +/** + * Unsigned version of `submit_election_solution`. + * + * Note that this must pass the [`ValidateUnsigned`] check which only allows transactions + * from the local node to be included. In other words, only the block author can include a + * transaction in the block. + * + * # + * See [`submit_election_solution`]. + * # + */ +export interface StakingCall_submit_election_solution_unsigned { + __kind: 'submit_election_solution_unsigned' + winners: ValidatorIndex[] + compact: CompactAssignments + score: ElectionScore + era: EraIndex + size: ElectionSize +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + * + * # + * - Independent of the arguments. Limited but potentially exploitable complexity. + * - Contains a limited number of reads. + * - Each call (requires the remainder of the bonded balance to be above `minimum_balance`) + * will cause a new entry to be inserted into a vector (`Ledger.unlocking`) kept in storage. + * The only way to clean the aforementioned storage item is also user-controlled via + * `withdraw_unbonded`. + * - One DB entry. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: EraElectionStatus, Ledger, CurrentEra, Locks, BalanceOf Stash, + * - Write: Locks, Ledger, BalanceOf Stash, + * + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ----------- + * Weight: O(1) + * DB Weight: + * - Read: Era Election Status, Ledger + * - Write: Nominators, Validators + * # + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * - Could be dependent on the `origin` argument and how much `unlocking` chunks exist. + * It implies `consolidate_unlocked` which loops over `Ledger.unlocking`, which is + * indirectly user-controlled. See [`unbond`] for more detail. + * - Contains a limited number of reads, yet the size of which could be large based on `ledger`. + * - Writes are limited to the `origin` account key. + * --------------- + * Complexity O(S) where S is the number of slashing spans to remove + * Update: + * - Reads: EraElectionStatus, Ledger, Current Era, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * Kill: + * - Reads: EraElectionStatus, Ledger, Current Era, Bonded, Slashing Spans, [Origin + * Account], Locks, BalanceOf stash + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, + * [Origin Account], Locks, BalanceOf stash. + * - Writes Each: SpanSlash * S + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export interface ElectionSize { + validators: number + nominators: number +} + +export type ElectionScore = bigint[] + +export interface CompactAssignments { + votes1: [NominatorIndexCompact, ValidatorIndexCompact][] + votes2: [NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact][] + votes3: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes4: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes5: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes6: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes7: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes8: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes9: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes10: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes11: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes12: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes13: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes14: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes15: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes16: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] +} + +export type CompactScoreCompact = [ValidatorIndexCompact, OffchainAccuracyCompact] + +export type OffchainAccuracyCompact = number + +export type ValidatorIndexCompact = number + +export type NominatorIndexCompact = number + +export type ValidatorIndex = number + +export type Percent = number + +export type EraIndex = number + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: BalanceOf +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * module to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId + judgement: SocietyJudgement +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin + * forgives (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: LookupSource + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId + value: BalanceOf + tip: BalanceOf +} + +export type SocietyJudgement = SocietyJudgement_Approve | SocietyJudgement_Rebid | SocietyJudgement_Reject + +export interface SocietyJudgement_Approve { + __kind: 'Approve' +} + +export interface SocietyJudgement_Rebid { + __kind: 'Rebid' +} + +export interface SocietyJudgement_Reject { + __kind: 'Reject' +} + +export type BalanceOf = bigint + +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` in number of key types. + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwnder` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: Keys + proof: Bytes +} + +export type Keys = [AccountId, AccountId, AccountId, AccountId, AccountId, AccountId] + +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.15 + 2.869 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: BlockNumber + index: number +} + +/** + * Cancel a named scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 24.91 + 2.907 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.29 + .126 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda + * - Will use base weight of 25 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_199 +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_199 +} + +/** + * Schedule a named task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 29.6 + .159 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 35 which should be good for more than 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_199 +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`]. + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_199 +} + +export type Priority = number + +export type Period = [BlockNumber, number] + +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + * + * # + * - The weight of the `call` + 10,000. + * - One storage lookup to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId + call: Type_199 +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + * + * # + * - One storage mutation to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully + * recovered by you. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + V) + * # + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + * + * # + * Key: V (len of vouching friends) + * - One storage read/remove to get the active recovery process. O(1), Codec O(V) + * - One balance call to repatriate reserved. O(X) + * - One event. + * + * Total Complexity: O(V + X) + * # + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. + * Should be ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt + * before the account can be recovered. Should be less than or equal to + * the length of the list of friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized + * that needs to pass before the account can be recovered. + * + * # + * - Key: F (len of friends) + * - One storage read to check that account is not already recoverable. O(1). + * - A check that the friends list is sorted and unique. O(F) + * - One currency reserve operation. O(X) + * - One storage write. O(1). Codec O(F). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId[] + threshold: number + delayPeriod: BlockNumber +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account + * needs to be recoverable (i.e. have a recovery configuration). + * + * # + * - One storage read to check that account is recoverable. O(F) + * - One storage read to check that this recovery process hasn't already started. O(1) + * - One currency reserve operation. O(X) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + * + * # + * Key: F (len of friends) + * - One storage read to get the prefix iterator for active recoveries. O(1) + * - One storage read/remove to get the recovery configuration. O(1), Codec O(F) + * - One balance call to unreserved. O(X) + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + * + * # + * - One storage write O(1) + * - One event + * # + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId + rescuer: AccountId +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you + * want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One binary search to confirm caller is a friend. O(logF) + * - One binary search to confirm caller has not already vouched. O(logV) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + logF + V + logV) + * # + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId + rescuer: AccountId +} + +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: AccountId + proxyType: ProxyType + delay: BlockNumber +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: AccountId + callHash: CallHashOf +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + * TODO: Might be over counting 1 read + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: BlockNumber + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_199 +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: AccountId + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_199 +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: AccountId + callHash: CallHashOf +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: AccountId + callHash: CallHashOf +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: AccountId + proxyType: ProxyType + delay: BlockNumber +} + +export type CallHashOf = Bytes + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +export type OffencesCall = never + +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + call: OpaqueCall + storeCall: boolean + maxWeight: Weight +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId[] + call: Type_199 +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId[] + timepoint: Timepoint + callHash: Bytes +} + +export type OpaqueCall = Bytes + +export type Weight = bigint + +export interface Timepoint { + height: BlockNumber + index: number +} + +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: AccountIndex +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId + index: AccountIndex + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: AccountIndex +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: AccountIndex +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId + index: AccountIndex +} + +export type AccountIndex = number + +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) + * and E is length of `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Signature +} + +export type Signature = Bytes + +export interface Heartbeat { + blockNumber: BlockNumber + networkState: OpaqueNetworkState + sessionIndex: SessionIndex + authorityIndex: AuthIndex + validatorsLen: number +} + +export type AuthIndex = number + +export type SessionIndex = number + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: LookupSource + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: RegistrarIndex +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: LookupSource +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: LookupSource + judgement: IdentityJudgement +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: LookupSource +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: LookupSource + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: bigint +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId, Data][] +} + +export interface IdentityInfo { + additional: IdentityInfoAdditional[] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (H160 | undefined) + image: Data + twitter: Data +} + +export type IdentityInfoAdditional = [Data, Data] + +export type IdentityJudgement = IdentityJudgement_Erroneous | IdentityJudgement_FeePaid | IdentityJudgement_KnownGood | IdentityJudgement_LowQuality | IdentityJudgement_OutOfDate | IdentityJudgement_Reasonable | IdentityJudgement_Unknown + +export interface IdentityJudgement_Erroneous { + __kind: 'Erroneous' +} + +export interface IdentityJudgement_FeePaid { + __kind: 'FeePaid' + value: Balance +} + +export interface IdentityJudgement_KnownGood { + __kind: 'KnownGood' +} + +export interface IdentityJudgement_LowQuality { + __kind: 'LowQuality' +} + +export interface IdentityJudgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface IdentityJudgement_Reasonable { + __kind: 'Reasonable' +} + +export interface IdentityJudgement_Unknown { + __kind: 'Unknown' +} + +export type RegistrarIndex = number + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: H256 +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: H256 +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: H256 +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: H256 +} + +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has + * stalled. This will trigger a forced authority set change at the beginning + * of the next session, to be enacted `delay` blocks after that. The delay + * should be high enough to safely assume that the block signalling the + * forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters + * will start the new authority set using the given finalized block as base. + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: BlockNumber + bestFinalizedBlockNumber: BlockNumber +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface KeyOwnerProof { + session: SessionIndex + trieNodes: Bytes[] + validatorCount: ValidatorCount +} + +export type ValidatorCount = number + +export interface GrandpaEquivocationProof { + setId: SetId + equivocation: GrandpaEquivocation +} + +export type GrandpaEquivocation = GrandpaEquivocation_Precommit | GrandpaEquivocation_Prevote + +export interface GrandpaEquivocation_Precommit { + __kind: 'Precommit' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocation_Prevote { + __kind: 'Prevote' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocationValue { + roundNumber: bigint + identity: AuthorityId + first: [GrandpaPrevote, AuthoritySignature] + second: [GrandpaPrevote, AuthoritySignature] +} + +export type AuthoritySignature = Bytes + +export interface GrandpaPrevote { + targetHash: Hash + targetNumber: BlockNumber +} + +export type AuthorityId = Bytes + +export type SetId = bigint + +export type ElectionsPhragmenCall = ElectionsPhragmenCall_clean_defunct_voters | ElectionsPhragmenCall_remove_member | ElectionsPhragmenCall_remove_voter | ElectionsPhragmenCall_renounce_candidacy | ElectionsPhragmenCall_submit_candidacy | ElectionsPhragmenCall_vote + +/** + * Clean all voters who are defunct (i.e. they do not serve any purpose at all). The + * deposit of the removed voters are returned. + * + * This is an root function to be used only for cleaning the state. + * + * The dispatch origin of this call must be root. + * + * # + * The total number of voters and those that are defunct must be provided as witness data. + * # + */ +export interface ElectionsPhragmenCall_clean_defunct_voters { + __kind: 'clean_defunct_voters' + numVoters: number + numDefunct: number +} + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, a new phragmen election is started. + * + * The dispatch origin of this call must be root. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement, we use a small weight. Else, since this is a root call and + * will go into phragmen, we assume full block for now. + * # + */ +export interface ElectionsPhragmenCall_remove_member { + __kind: 'remove_member' + who: LookupSource + hasReplacement: boolean +} + +/** + * Remove `origin` as a voter. + * + * This removes the lock and returns the deposit. + * + * The dispatch origin of this call must be signed and be a voter. + */ +export interface ElectionsPhragmenCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * + * - `origin` is a candidate and not elected in any set. In this case, the deposit is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the deposit is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the deposit is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_members`], if replacement runners exists, they are immediately used. + * If the prime is renouncing, then no prime will exist until the next round. + * + * The dispatch origin of this call must be signed, and have one of the above roles. + * + * # + * The type of renouncing must be provided as witness data. + * # + */ +export interface ElectionsPhragmenCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Submit oneself for candidacy. A fixed amount of deposit is recorded. + * + * All candidates are wiped at the end of the term. They either become a member/runner-up, + * or leave the system while their deposit is slashed. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`] + * to get their deposit back. Losing the spot in an election will always lead to a slash. + * + * # + * The number of current candidates must be provided as witness data. + * # + */ +export interface ElectionsPhragmenCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is + * reserved. The deposit is based on the number of votes and can be updated over time. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * If `value` is more than `who`'s total balance, then the maximum of the two is used. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * It is the responsibility of the caller to **NOT** place all of their balance into the + * lock and keep some for further operations. + * + * # + * We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less. + * # + */ +export interface ElectionsPhragmenCall_vote { + __kind: 'vote' + votes: AccountId[] + value: bigint +} + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * Submit a solution for the unsigned phase. + * + * The dispatch origin fo this call must be __none__. + * + * This submission is checked on the fly. Moreover, this unsigned solution is only + * validated when submitted to the pool from the **local** node. Effectively, this means + * that only active validators can submit this transaction when authoring a block (similar + * to an inherent). + * + * To prevent any incorrect solution (and thus wasted time/weight), this transaction will + * panic if the solution submitted by the validator is invalid in any way, effectively + * putting their authoring reward at risk. + * + * No deposit or reward is associated with this submission. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + solution: RawSolution + witness: SolutionOrSnapshotSize +} + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export interface RawSolution { + compact: CompactAssignmentsWith16 + score: ElectionScore + round: number +} + +export interface CompactAssignmentsWith16 { + votes1: [NominatorIndexCompact, ValidatorIndexCompact][] + votes2: [NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact][] + votes3: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes4: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes5: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes6: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes7: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes8: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes9: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes10: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes11: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes12: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes13: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes14: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes15: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes16: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] +} + +export type DemocracyCall = DemocracyCall_blacklist | DemocracyCall_cancel_proposal | DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. + * + * If called on a queued public or external proposal, then this will result in it being + * removed. If the `ref_index` supplied is an active referendum with the proposal hash, + * then it will be cancelled. + * + * The dispatch origin of this call must be `BlacklistOrigin`. + * + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. + * + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). + */ +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: Hash + maybeRefIndex?: (ReferendumIndex | undefined) +} + +/** + * Remove a proposal. + * + * The dispatch origin of this call must be `CancelProposalOrigin`. + * + * - `prop_index`: The index of the proposal to cancel. + * + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number +} + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: ReferendumIndex +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must + * not be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId + conviction: Conviction + balance: BalanceOf +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: ReferendumIndex +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: Hash + index: ReferendumIndex +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Weight: `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: Hash +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: Hash +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: Hash +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * `FastTrackVotingPeriod` if too low. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: Hash + votingPeriod: BlockNumber + delay: BlockNumber +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. When this call is successful, i.e. + * the preimage has not been uploaded before and matches some imminent proposal, + * no fee is paid. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * Weight: `O(p)` + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: Hash + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. + * Extrinsic is weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * Weight: `O(D)` where D is length of proposal. + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: Hash + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId + index: ReferendumIndex +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: ReferendumIndex +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * Weight: `O(S)` where S is the number of seconds a proposal already has. + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * Weight: `O(V + log(V))` where V is number of `existing vetoers` + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: Hash +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of referendums the voter has voted on. + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + value: AccountVoteSplit +} + +export interface AccountVote_Standard { + __kind: 'Standard' + value: AccountVoteStandard +} + +export interface AccountVoteStandard { + vote: Vote + balance: Balance +} + +export type Vote = number + +export interface AccountVoteSplit { + aye: Balance + nay: Balance +} + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +export type ReferendumIndex = number + +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export type MemberCount = number + +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: BalanceOf + vestingSchedule?: ([BalanceOf, BalanceOf, BlockNumber] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId | undefined) +} + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: LookupSource +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: LookupSource + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is malicious + * or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is + * not assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: LookupSource + dest: LookupSource + value: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also decrease the total issuance of the system (`TotalIssuance`). + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + * + * # + * - Independent of the arguments. + * - Contains a limited number of reads and writes. + * --------------------- + * - Base Weight: + * - Creating: 27.56 µs + * - Killing: 35.11 µs + * - DB Weight: 1 Read, 1 Write to `who` + * # + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: LookupSource + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * It will decrease the total issuance of the system by the `TransferFee`. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for + * input config types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional + * check that the transfer will not kill the origin account. + * --------------------------------- + * - Base Weight: 73.64 µs, worst case scenario (account created, account removed) + * - DB Weight: 1 Read and 1 Write to destination account + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: LookupSource + value: bigint +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + * # + * - Cheaper than transfer because account cannot be killed. + * - Base Weight: 51.4 µs + * - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already) + * # + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: LookupSource + value: bigint +} + +export type BabeCall = BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface BabeEquivocationProof { + offender: AuthorityId + slotNumber: SlotNumber + firstHeader: Header + secondHeader: Header +} + +export interface Header { + parentHash: Hash + number: number + stateRoot: Hash + extrinsicsRoot: Hash + digest: Digest +} + +export interface Digest { + logs: DigestItem[] +} + +export type DigestItem = DigestItem_AuthoritiesChange | DigestItem_ChangesTrieRoot | DigestItem_ChangesTrieSignal | DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal | DigestItem_SealV0 + +export interface DigestItem_AuthoritiesChange { + __kind: 'AuthoritiesChange' + value: AuthorityId[] +} + +export interface DigestItem_ChangesTrieRoot { + __kind: 'ChangesTrieRoot' + value: Hash +} + +export interface DigestItem_ChangesTrieSignal { + __kind: 'ChangesTrieSignal' + value: ChangesTrieSignal +} + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: Consensus +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: PreRuntime +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: Seal +} + +export interface DigestItem_SealV0 { + __kind: 'SealV0' + value: SealV0 +} + +export type SealV0 = [bigint, Signature] + +export type Seal = [ConsensusEngineId, Bytes] + +export type PreRuntime = [ConsensusEngineId, Bytes] + +export type Consensus = [ConsensusEngineId, Bytes] + +export type ConsensusEngineId = Bytes + +export type ChangesTrieSignal = ChangesTrieSignal_NewConfiguration + +export interface ChangesTrieSignal_NewConfiguration { + __kind: 'NewConfiguration' + value?: (ChangesTrieConfiguration | undefined) +} + +export type SlotNumber = bigint + +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +export type AuthorityDiscoveryCall = never + +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: Key, + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => Key), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + set_changes_trie_config: sts.enumStruct({ + changesTrieConfig: sts.option(() => ChangesTrieConfiguration), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => KeyValue), + }), + } +}) + +export const KeyValue = sts.tuple(() => [StorageKey, StorageData]) + +export const StorageData = sts.bytes() + +export const StorageKey = sts.bytes() + +export const ChangesTrieConfiguration: sts.Type = sts.struct(() => { + return { + digestInterval: sts.number(), + digestLevels: sts.number(), + } +}) + +export const Key = sts.bytes() + +export const Perbill = sts.number() + +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: LookupSource, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: EraIndex, + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => LookupSource), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => LookupSource), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId, + era: EraIndex, + }), + reap_stash: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: LookupSource, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + submit_election_solution: sts.enumStruct({ + winners: sts.array(() => ValidatorIndex), + compact: CompactAssignments, + score: ElectionScore, + era: EraIndex, + size: ElectionSize, + }), + submit_election_solution_unsigned: sts.enumStruct({ + winners: sts.array(() => ValidatorIndex), + compact: CompactAssignments, + score: ElectionScore, + era: EraIndex, + size: ElectionSize, + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export const ElectionSize: sts.Type = sts.struct(() => { + return { + validators: sts.number(), + nominators: sts.number(), + } +}) + +export const ElectionScore = sts.array(() => sts.bigint()) + +export const CompactAssignments: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [NominatorIndexCompact, ValidatorIndexCompact])), + votes2: sts.array(() => sts.tuple(() => [NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact])), + votes3: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes4: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes5: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes6: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes7: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes8: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes9: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes10: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes11: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes12: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes13: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes14: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes15: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes16: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + } +}) + +export const CompactScoreCompact = sts.tuple(() => [ValidatorIndexCompact, OffchainAccuracyCompact]) + +export const OffchainAccuracyCompact = sts.number() + +export const ValidatorIndexCompact = sts.number() + +export const NominatorIndexCompact = sts.number() + +export const ValidatorIndex = sts.number() + +export const Percent = sts.number() + +export const EraIndex = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: BalanceOf, + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId, + judgement: SocietyJudgement, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: LookupSource, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId, + value: BalanceOf, + tip: BalanceOf, + }), + } +}) + +export const SocietyJudgement: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export const BalanceOf = sts.bigint() + +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: Keys, + proof: sts.bytes(), + }), + } +}) + +export const Keys = sts.tuple(() => [AccountId, AccountId, AccountId, AccountId, AccountId, AccountId]) + +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: BlockNumber, + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_199, + }), + schedule_after: sts.enumStruct({ + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_199, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_199, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_199, + }), + } +}) + +export const Priority = sts.number() + +export const Period = sts.tuple(() => [BlockNumber, sts.number()]) + +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId, + call: Type_199, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId, + }), + claim_recovery: sts.enumStruct({ + account: AccountId, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId), + threshold: sts.number(), + delayPeriod: BlockNumber, + }), + initiate_recovery: sts.enumStruct({ + account: AccountId, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + } +}) + +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: AccountId, + proxyType: ProxyType, + delay: BlockNumber, + }), + announce: sts.enumStruct({ + real: AccountId, + callHash: CallHashOf, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + delay: BlockNumber, + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_199, + }), + proxy_announced: sts.enumStruct({ + delegate: AccountId, + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_199, + }), + reject_announcement: sts.enumStruct({ + delegate: AccountId, + callHash: CallHashOf, + }), + remove_announcement: sts.enumStruct({ + real: AccountId, + callHash: CallHashOf, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: AccountId, + proxyType: ProxyType, + delay: BlockNumber, + }), + } +}) + +export const CallHashOf = sts.bytes() + +export const OffencesCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + call: OpaqueCall, + storeCall: sts.boolean(), + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId), + call: Type_199, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const OpaqueCall = sts.bytes() + +export const Weight = sts.bigint() + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: BlockNumber, + index: sts.number(), + } +}) + +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: AccountIndex, + }), + force_transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: AccountIndex, + }), + freeze: sts.enumStruct({ + index: AccountIndex, + }), + transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + }), + } +}) + +export const AccountIndex = sts.number() + +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: Signature, + }), + } +}) + +export const Signature = sts.bytes() + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: BlockNumber, + networkState: OpaqueNetworkState, + sessionIndex: SessionIndex, + authorityIndex: AuthIndex, + validatorsLen: sts.number(), + } +}) + +export const AuthIndex = sts.number() + +export const SessionIndex = sts.number() + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId, + }), + add_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: RegistrarIndex, + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: LookupSource, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: LookupSource, + judgement: IdentityJudgement, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: LookupSource, + }), + rename_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: sts.bigint(), + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => IdentityInfoAdditional), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => H160), + image: Data, + twitter: Data, + } +}) + +export const IdentityInfoAdditional = sts.tuple(() => [Data, Data]) + +export const IdentityJudgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: Balance, + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export const RegistrarIndex = sts.number() + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: H256, + Keccak256: H256, + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: H256, + ShaThree256: H256, + } +}) + +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: BlockNumber, + bestFinalizedBlockNumber: BlockNumber, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const KeyOwnerProof: sts.Type = sts.struct(() => { + return { + session: SessionIndex, + trieNodes: sts.array(() => sts.bytes()), + validatorCount: ValidatorCount, + } +}) + +export const ValidatorCount = sts.number() + +export const GrandpaEquivocationProof: sts.Type = sts.struct(() => { + return { + setId: SetId, + equivocation: GrandpaEquivocation, + } +}) + +export const GrandpaEquivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: GrandpaEquivocationValue, + Prevote: GrandpaEquivocationValue, + } +}) + +export const GrandpaEquivocationValue: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: AuthorityId, + first: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + second: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + } +}) + +export const AuthoritySignature = sts.bytes() + +export const GrandpaPrevote: sts.Type = sts.struct(() => { + return { + targetHash: Hash, + targetNumber: BlockNumber, + } +}) + +export const AuthorityId = sts.bytes() + +export const SetId = sts.bigint() + +export const ElectionsPhragmenCall: sts.Type = sts.closedEnum(() => { + return { + clean_defunct_voters: sts.enumStruct({ + numVoters: sts.number(), + numDefunct: sts.number(), + }), + remove_member: sts.enumStruct({ + who: LookupSource, + hasReplacement: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId), + value: sts.bigint(), + }), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + submit_unsigned: sts.enumStruct({ + solution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export const RawSolution: sts.Type = sts.struct(() => { + return { + compact: CompactAssignmentsWith16, + score: ElectionScore, + round: sts.number(), + } +}) + +export const CompactAssignmentsWith16: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [NominatorIndexCompact, ValidatorIndexCompact])), + votes2: sts.array(() => sts.tuple(() => [NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact])), + votes3: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes4: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes5: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes6: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes7: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes8: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes9: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes10: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes11: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes12: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes13: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes14: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes15: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes16: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + } +}) + +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + blacklist: sts.enumStruct({ + proposalHash: Hash, + maybeRefIndex: sts.option(() => ReferendumIndex), + }), + cancel_proposal: sts.enumStruct({ + propIndex: sts.number(), + }), + cancel_queued: sts.enumStruct({ + which: ReferendumIndex, + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId, + conviction: Conviction, + balance: BalanceOf, + }), + emergency_cancel: sts.enumStruct({ + refIndex: ReferendumIndex, + }), + enact_proposal: sts.enumStruct({ + proposalHash: Hash, + index: ReferendumIndex, + }), + external_propose: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_default: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: Hash, + }), + fast_track: sts.enumStruct({ + proposalHash: Hash, + votingPeriod: BlockNumber, + delay: BlockNumber, + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: Hash, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: Hash, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId, + index: ReferendumIndex, + }), + remove_vote: sts.enumStruct({ + index: ReferendumIndex, + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId, + }), + veto_external: sts.enumStruct({ + proposalHash: Hash, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: AccountVoteSplit, + Standard: AccountVoteStandard, + } +}) + +export const AccountVoteStandard: sts.Type = sts.struct(() => { + return { + vote: Vote, + balance: Balance, + } +}) + +export const Vote = sts.number() + +export const AccountVoteSplit: sts.Type = sts.struct(() => { + return { + aye: Balance, + nay: Balance, + } +}) + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export const ReferendumIndex = sts.number() + +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: BalanceOf, + vestingSchedule: sts.option(() => sts.tuple(() => [BalanceOf, BalanceOf, BlockNumber])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: LookupSource, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: LookupSource, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: LookupSource, + dest: LookupSource, + value: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: LookupSource, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + } +}) + +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + report_equivocation: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const BabeEquivocationProof: sts.Type = sts.struct(() => { + return { + offender: AuthorityId, + slotNumber: SlotNumber, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: Hash, + number: sts.number(), + stateRoot: Hash, + extrinsicsRoot: Hash, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + AuthoritiesChange: sts.array(() => AuthorityId), + ChangesTrieRoot: Hash, + ChangesTrieSignal: ChangesTrieSignal, + Consensus: Consensus, + Other: sts.bytes(), + PreRuntime: PreRuntime, + RuntimeEnvironmentUpdated: sts.unit(), + Seal: Seal, + SealV0: SealV0, + } +}) + +export const SealV0 = sts.tuple(() => [sts.bigint(), Signature]) + +export const Seal = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const PreRuntime = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const Consensus = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const ConsensusEngineId = sts.bytes() + +export const ChangesTrieSignal: sts.Type = sts.closedEnum(() => { + return { + NewConfiguration: sts.option(() => ChangesTrieConfiguration), + } +}) + +export const SlotNumber = sts.bigint() + +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +export const AuthorityDiscoveryCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Type_199 = Type_199_AuthorityDiscovery | Type_199_Authorship | Type_199_Babe | Type_199_Balances | Type_199_Bounties | Type_199_Claims | Type_199_Council | Type_199_Democracy | Type_199_ElectionProviderMultiPhase | Type_199_ElectionsPhragmen | Type_199_Grandpa | Type_199_Identity | Type_199_ImOnline | Type_199_Indices | Type_199_Multisig | Type_199_Offences | Type_199_Proxy | Type_199_Recovery | Type_199_Scheduler | Type_199_Session | Type_199_Society | Type_199_Staking | Type_199_System | Type_199_TechnicalCommittee | Type_199_TechnicalMembership | Type_199_Timestamp | Type_199_Tips | Type_199_Treasury | Type_199_Utility | Type_199_Vesting + +export interface Type_199_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Type_199_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Type_199_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Type_199_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Type_199_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Type_199_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Type_199_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Type_199_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Type_199_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Type_199_ElectionsPhragmen { + __kind: 'ElectionsPhragmen' + value: ElectionsPhragmenCall +} + +export interface Type_199_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Type_199_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Type_199_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Type_199_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Type_199_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Type_199_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Type_199_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Type_199_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Type_199_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Type_199_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Type_199_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Type_199_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Type_199_System { + __kind: 'System' + value: SystemCall +} + +export interface Type_199_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Type_199_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Type_199_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Type_199_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Type_199_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Type_199_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Type_199_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId = sts.bytes() diff --git a/squid/src/types/v2030.ts b/squid/src/types/v2030.ts new file mode 100644 index 00000000..406b660a --- /dev/null +++ b/squid/src/types/v2030.ts @@ -0,0 +1,6594 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Type_138: sts.Type = sts.closedEnum(() => { + return { + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Democracy: DemocracyCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + ElectionsPhragmen: ElectionsPhragmenCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + } +}) + +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: LookupSource, + target: LookupSource, + schedule: VestingInfo, + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: LookupSource, + }), + vested_transfer: sts.enumStruct({ + target: LookupSource, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: Balance, + perBlock: Balance, + startingBlock: BlockNumber, + } +}) + +export const BlockNumber = sts.number() + +export const Balance = sts.bigint() + +export interface VestingInfo { + locked: Balance + perBlock: Balance + startingBlock: BlockNumber +} + +export type BlockNumber = number + +export type Balance = bigint + +export const LookupSource: sts.Type = sts.closedEnum(() => { + return { + Address20: H160, + Address32: H256, + Id: AccountId, + Index: sts.number(), + Raw: sts.bytes(), + } +}) + +export const H256 = sts.bytes() + +export const H160 = sts.bytes() + +export type LookupSource = LookupSource_Address20 | LookupSource_Address32 | LookupSource_Id | LookupSource_Index | LookupSource_Raw + +export interface LookupSource_Address20 { + __kind: 'Address20' + value: H160 +} + +export interface LookupSource_Address32 { + __kind: 'Address32' + value: H256 +} + +export interface LookupSource_Id { + __kind: 'Id' + value: AccountId +} + +export interface LookupSource_Index { + __kind: 'Index' + value: number +} + +export interface LookupSource_Raw { + __kind: 'Raw' + value: Bytes +} + +export type AccountId = Bytes + +export type H256 = Bytes + +export type H160 = Bytes + +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: LookupSource + target: LookupSource + schedule: VestingInfo +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: LookupSource +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: LookupSource + schedule: VestingInfo +} + +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Type_138, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Type_138), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Type_138), + }), + } +}) + +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Type_138 +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Type_138[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Type_138[] +} + +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: LookupSource, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + } +}) + +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: LookupSource +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +export const TipsCall: sts.Type = sts.closedEnum(() => { + return { + close_tip: sts.enumStruct({ + hash: Hash, + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + }), + retract_tip: sts.enumStruct({ + hash: Hash, + }), + slash_tip: sts.enumStruct({ + hash: Hash, + }), + tip: sts.enumStruct({ + hash: Hash, + tipValue: sts.bigint(), + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + tipValue: sts.bigint(), + }), + } +}) + +export const Hash = sts.bytes() + +export type TipsCall = TipsCall_close_tip | TipsCall_report_awesome | TipsCall_retract_tip | TipsCall_slash_tip | TipsCall_tip | TipsCall_tip_new + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`. + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TipsCall_close_tip { + __kind: 'close_tip' + hash: Hash +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TipsCall_retract_tip { + __kind: 'retract_tip' + hash: Hash +} + +/** + * Remove and slash an already-open tip. + * + * May only be called from `T::RejectOrigin`. + * + * As a result, the finder is slashed and the deposits are lost. + * + * Emits `TipSlashed` if successful. + * + * # + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * # + */ +export interface TipsCall_slash_tip { + __kind: 'slash_tip' + hash: Hash +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`, insert tip and check closing, + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TipsCall_tip { + __kind: 'tip' + hash: Hash + tipValue: bigint +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T` + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId + tipValue: bigint +} + +export type Hash = Bytes + +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId, + }), + change_key: sts.enumStruct({ + new: AccountId, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId), + }), + set_prime: sts.enumStruct({ + who: AccountId, + }), + swap_member: sts.enumStruct({ + remove: AccountId, + add: AccountId, + }), + } +}) + +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId + add: AccountId +} + +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const MemberCount = sts.number() + +export const Proposal: sts.Type = sts.closedEnum(() => { + return { + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Democracy: DemocracyCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + ElectionsPhragmen: ElectionsPhragmenCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + } +}) + +export type Proposal = Proposal_AuthorityDiscovery | Proposal_Authorship | Proposal_Babe | Proposal_Balances | Proposal_Bounties | Proposal_Claims | Proposal_Council | Proposal_Democracy | Proposal_ElectionProviderMultiPhase | Proposal_ElectionsPhragmen | Proposal_Grandpa | Proposal_Identity | Proposal_ImOnline | Proposal_Indices | Proposal_Multisig | Proposal_Offences | Proposal_Proxy | Proposal_Recovery | Proposal_Scheduler | Proposal_Session | Proposal_Society | Proposal_Staking | Proposal_System | Proposal_TechnicalCommittee | Proposal_TechnicalMembership | Proposal_Timestamp | Proposal_Tips | Proposal_Treasury | Proposal_Utility | Proposal_Vesting + +export interface Proposal_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Proposal_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Proposal_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Proposal_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Proposal_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Proposal_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Proposal_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Proposal_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Proposal_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Proposal_ElectionsPhragmen { + __kind: 'ElectionsPhragmen' + value: ElectionsPhragmenCall +} + +export interface Proposal_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Proposal_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Proposal_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Proposal_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Proposal_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Proposal_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Proposal_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Proposal_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Proposal_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Proposal_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Proposal_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Proposal_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Proposal_System { + __kind: 'System' + value: SystemCall +} + +export interface Proposal_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Proposal_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Proposal_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Proposal_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Proposal_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Proposal_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Proposal_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_changes_trie_config | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + * + * # + * - `O(P)` where `P` amount of keys with prefix `prefix` + * - `P` storage deletions. + * - Base Weight: 0.834 * P µs + * - Writes: Number of subkeys + 1 + * # + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Key + subkeys: number +} + +/** + * Kill some items from storage. + * + * # + * - `O(IK)` where `I` length of `keys` and `K` length of one key + * - `I` storage deletions. + * - Base Weight: .378 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Key[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Make some on-chain remark and emit event. + * + * # + * - `O(b)` where b is the length of the remark. + * - 1 event. + * # + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * Set the new changes trie configuration. + * + * # + * - `O(1)` + * - 1 storage write or delete (codec `O(1)`). + * - 1 call to `deposit_log`: Uses `append` API, so O(1) + * - Base Weight: 7.218 µs + * - DB Weight: + * - Writes: Changes Trie, System Digest + * # + */ +export interface SystemCall_set_changes_trie_config { + __kind: 'set_changes_trie_config' + changesTrieConfig?: (ChangesTrieConfiguration | undefined) +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 storage write (codec `O(C)`). + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is expensive). + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very expensive. + * We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + * + * # + * - `O(1)` + * - 1 storage write. + * - Base Weight: 1.405 µs + * - 1 write to HEAP_PAGES + * # + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + * + * # + * - `O(I)` where `I` length of `items` + * - `I` storage writes (`O(1)`). + * - Base Weight: 0.568 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: KeyValue[] +} + +export type KeyValue = [StorageKey, StorageData] + +export type StorageData = Bytes + +export type StorageKey = Bytes + +export interface ChangesTrieConfiguration { + digestInterval: number + digestLevels: number +} + +export type Key = Bytes + +export type Perbill = number + +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger, [Origin Account], Current Era, History Depth, Locks + * - Write: Bonded, Payee, [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: LookupSource + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount + * that can be added. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller and + * it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * - One DB entry. + * ------------ + * DB Weight: + * - Read: Era Election Status, Bonded, Ledger, [Origin Account], Locks + * - Write: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + * + * # + * Complexity: O(U + S) + * with U unapplied slashes weighted with U=1000 + * and S is the number of slash indices to be canceled. + * - Read: Unapplied Slashes + * - Write: Unapplied Slashes + * # + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: EraIndex + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * -------- + * Weight: O(1) + * DB Weight: + * - Read: EraElectionStatus, Ledger + * - Write: Validators, Nominators + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + * + * # + * O(S) where S is the number of slashing spans to be removed + * Reads: Bonded, Slashing Spans, Account, Locks + * Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Account, Locks + * Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Same as [`set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. The controller + * account should represent a validator. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: LookupSource[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. This can only be called when + * [`EraElectionStatus`] is `Closed`. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS). + * - Both the reads and writes follow a similar pattern. + * --------- + * Weight: O(N) + * where N is the number of targets + * DB Weight: + * - Reads: Era Election Status, Ledger, Current Era + * - Writes: Validators, Nominators + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: LookupSource[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * This can only be called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * DB Weight: + * - Read: EraElectionStatus, CurrentEra, HistoryDepth, ErasValidatorReward, + * ErasStakersClipped, ErasRewardPoints, ErasValidatorPrefs (8 items) + * - Read Each: Bonded, Ledger, Payee, Locks, System Account (5 items) + * - Write Each: System Account, Locks, Ledger (3 items) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId + era: EraIndex +} + +/** + * Remove all data structure concerning a staker/stash once its balance is at the minimum. + * This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone + * and the target `stash` must have no funds left beyond the ED. + * + * This can be called from any origin. + * + * - `stash`: The stash account to reap. Its balance must be zero. + * + * # + * Complexity: O(S) where S is the number of slashing spans on the account. + * DB Weight: + * - Reads: Stash Account, Bonded, Slashing Spans, Locks + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Stash Account, Locks + * - Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller, and it can be only called when + * [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MAX_UNLOCKING_CHUNKS`. + * - Storage changes: Can't increase storage, only decrease it. + * --------------- + * - DB Weight: + * - Reads: EraElectionStatus, Ledger, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Same as [`set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: LookupSource +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. + * This should report all the storage items that will be deleted by clearing old + * era history. Needed to report an accurate weight for the dispatch. Trusted by + * `Root` to report an accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Weight: O(E) + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + * + * # + * - O(V) + * - Write: Invulnerables + * # + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + * + * # + * - Independent of the arguments. Limited but potentially exploitable complexity. + * - Contains a limited number of reads. + * - Each call (requires the remainder of the bonded balance to be above `minimum_balance`) + * will cause a new entry to be inserted into a vector (`Ledger.unlocking`) kept in storage. + * The only way to clean the aforementioned storage item is also user-controlled via + * `withdraw_unbonded`. + * - One DB entry. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: EraElectionStatus, Ledger, CurrentEra, Locks, BalanceOf Stash, + * - Write: Locks, Ledger, BalanceOf Stash, + * + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ----------- + * Weight: O(1) + * DB Weight: + * - Read: Era Election Status, Ledger + * - Write: Nominators, Validators + * # + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * - Could be dependent on the `origin` argument and how much `unlocking` chunks exist. + * It implies `consolidate_unlocked` which loops over `Ledger.unlocking`, which is + * indirectly user-controlled. See [`unbond`] for more detail. + * - Contains a limited number of reads, yet the size of which could be large based on `ledger`. + * - Writes are limited to the `origin` account key. + * --------------- + * Complexity O(S) where S is the number of slashing spans to remove + * Update: + * - Reads: EraElectionStatus, Ledger, Current Era, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * Kill: + * - Reads: EraElectionStatus, Ledger, Current Era, Bonded, Slashing Spans, [Origin + * Account], Locks, BalanceOf stash + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, + * [Origin Account], Locks, BalanceOf stash. + * - Writes Each: SpanSlash * S + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export type Percent = number + +export type EraIndex = number + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: BalanceOf +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * module to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId + judgement: SocietyJudgement +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin + * forgives (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: LookupSource + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId + value: BalanceOf + tip: BalanceOf +} + +export type SocietyJudgement = SocietyJudgement_Approve | SocietyJudgement_Rebid | SocietyJudgement_Reject + +export interface SocietyJudgement_Approve { + __kind: 'Approve' +} + +export interface SocietyJudgement_Rebid { + __kind: 'Rebid' +} + +export interface SocietyJudgement_Reject { + __kind: 'Reject' +} + +export type BalanceOf = bigint + +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` in number of key types. + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwnder` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: Keys + proof: Bytes +} + +export type Keys = [AccountId, AccountId, AccountId, AccountId, AccountId, AccountId] + +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.15 + 2.869 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: BlockNumber + index: number +} + +/** + * Cancel a named scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 24.91 + 2.907 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.29 + .126 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda + * - Will use base weight of 25 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_138 +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_138 +} + +/** + * Schedule a named task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 29.6 + .159 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 35 which should be good for more than 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_138 +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`]. + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_138 +} + +export type Priority = number + +export type Period = [BlockNumber, number] + +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + * + * # + * - The weight of the `call` + 10,000. + * - One storage lookup to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId + call: Type_138 +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + * + * # + * - One storage mutation to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully + * recovered by you. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + V) + * # + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + * + * # + * Key: V (len of vouching friends) + * - One storage read/remove to get the active recovery process. O(1), Codec O(V) + * - One balance call to repatriate reserved. O(X) + * - One event. + * + * Total Complexity: O(V + X) + * # + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. + * Should be ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt + * before the account can be recovered. Should be less than or equal to + * the length of the list of friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized + * that needs to pass before the account can be recovered. + * + * # + * - Key: F (len of friends) + * - One storage read to check that account is not already recoverable. O(1). + * - A check that the friends list is sorted and unique. O(F) + * - One currency reserve operation. O(X) + * - One storage write. O(1). Codec O(F). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId[] + threshold: number + delayPeriod: BlockNumber +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account + * needs to be recoverable (i.e. have a recovery configuration). + * + * # + * - One storage read to check that account is recoverable. O(F) + * - One storage read to check that this recovery process hasn't already started. O(1) + * - One currency reserve operation. O(X) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + * + * # + * Key: F (len of friends) + * - One storage read to get the prefix iterator for active recoveries. O(1) + * - One storage read/remove to get the recovery configuration. O(1), Codec O(F) + * - One balance call to unreserved. O(X) + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + * + * # + * - One storage write O(1) + * - One event + * # + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId + rescuer: AccountId +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you + * want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One binary search to confirm caller is a friend. O(logF) + * - One binary search to confirm caller has not already vouched. O(logV) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + logF + V + logV) + * # + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId + rescuer: AccountId +} + +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: AccountId + proxyType: ProxyType + delay: BlockNumber +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: AccountId + callHash: CallHashOf +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + * TODO: Might be over counting 1 read + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: BlockNumber + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_138 +} + +/** + * Dispatch the given `call` from an account that the sender is authorized for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: AccountId + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_138 +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: AccountId + callHash: CallHashOf +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: AccountId + callHash: CallHashOf +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: AccountId + proxyType: ProxyType + delay: BlockNumber +} + +export type CallHashOf = Bytes + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +export type OffencesCall = never + +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + call: OpaqueCall + storeCall: boolean + maxWeight: Weight +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId[] + call: Type_138 +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId[] + timepoint: Timepoint + callHash: Bytes +} + +export type OpaqueCall = Bytes + +export type Weight = bigint + +export interface Timepoint { + height: BlockNumber + index: number +} + +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: AccountIndex +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId + index: AccountIndex + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: AccountIndex +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: AccountIndex +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId + index: AccountIndex +} + +export type AccountIndex = number + +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) + * and E is length of `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Signature +} + +export type Signature = Bytes + +export interface Heartbeat { + blockNumber: BlockNumber + networkState: OpaqueNetworkState + sessionIndex: SessionIndex + authorityIndex: AuthIndex + validatorsLen: number +} + +export type AuthIndex = number + +export type SessionIndex = number + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: LookupSource + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: RegistrarIndex +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: LookupSource +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: LookupSource + judgement: IdentityJudgement +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: LookupSource +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: LookupSource + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: bigint +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId, Data][] +} + +export interface IdentityInfo { + additional: IdentityInfoAdditional[] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (H160 | undefined) + image: Data + twitter: Data +} + +export type IdentityInfoAdditional = [Data, Data] + +export type IdentityJudgement = IdentityJudgement_Erroneous | IdentityJudgement_FeePaid | IdentityJudgement_KnownGood | IdentityJudgement_LowQuality | IdentityJudgement_OutOfDate | IdentityJudgement_Reasonable | IdentityJudgement_Unknown + +export interface IdentityJudgement_Erroneous { + __kind: 'Erroneous' +} + +export interface IdentityJudgement_FeePaid { + __kind: 'FeePaid' + value: Balance +} + +export interface IdentityJudgement_KnownGood { + __kind: 'KnownGood' +} + +export interface IdentityJudgement_LowQuality { + __kind: 'LowQuality' +} + +export interface IdentityJudgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface IdentityJudgement_Reasonable { + __kind: 'Reasonable' +} + +export interface IdentityJudgement_Unknown { + __kind: 'Unknown' +} + +export type RegistrarIndex = number + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: H256 +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: H256 +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: H256 +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: H256 +} + +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has + * stalled. This will trigger a forced authority set change at the beginning + * of the next session, to be enacted `delay` blocks after that. The delay + * should be high enough to safely assume that the block signalling the + * forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters + * will start the new authority set using the given finalized block as base. + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: BlockNumber + bestFinalizedBlockNumber: BlockNumber +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface KeyOwnerProof { + session: SessionIndex + trieNodes: Bytes[] + validatorCount: ValidatorCount +} + +export type ValidatorCount = number + +export interface GrandpaEquivocationProof { + setId: SetId + equivocation: GrandpaEquivocation +} + +export type GrandpaEquivocation = GrandpaEquivocation_Precommit | GrandpaEquivocation_Prevote + +export interface GrandpaEquivocation_Precommit { + __kind: 'Precommit' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocation_Prevote { + __kind: 'Prevote' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocationValue { + roundNumber: bigint + identity: AuthorityId + first: [GrandpaPrevote, AuthoritySignature] + second: [GrandpaPrevote, AuthoritySignature] +} + +export type AuthoritySignature = Bytes + +export interface GrandpaPrevote { + targetHash: Hash + targetNumber: BlockNumber +} + +export type AuthorityId = Bytes + +export type SetId = bigint + +export type ElectionsPhragmenCall = ElectionsPhragmenCall_clean_defunct_voters | ElectionsPhragmenCall_remove_member | ElectionsPhragmenCall_remove_voter | ElectionsPhragmenCall_renounce_candidacy | ElectionsPhragmenCall_submit_candidacy | ElectionsPhragmenCall_vote + +/** + * Clean all voters who are defunct (i.e. they do not serve any purpose at all). The + * deposit of the removed voters are returned. + * + * This is an root function to be used only for cleaning the state. + * + * The dispatch origin of this call must be root. + * + * # + * The total number of voters and those that are defunct must be provided as witness data. + * # + */ +export interface ElectionsPhragmenCall_clean_defunct_voters { + __kind: 'clean_defunct_voters' + numVoters: number + numDefunct: number +} + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, a new phragmen election is started. + * + * The dispatch origin of this call must be root. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement, we use a small weight. Else, since this is a root call and + * will go into phragmen, we assume full block for now. + * # + */ +export interface ElectionsPhragmenCall_remove_member { + __kind: 'remove_member' + who: LookupSource + hasReplacement: boolean +} + +/** + * Remove `origin` as a voter. + * + * This removes the lock and returns the deposit. + * + * The dispatch origin of this call must be signed and be a voter. + */ +export interface ElectionsPhragmenCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * + * - `origin` is a candidate and not elected in any set. In this case, the deposit is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the deposit is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the deposit is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_members`], if replacement runners exists, they are immediately used. + * If the prime is renouncing, then no prime will exist until the next round. + * + * The dispatch origin of this call must be signed, and have one of the above roles. + * + * # + * The type of renouncing must be provided as witness data. + * # + */ +export interface ElectionsPhragmenCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Submit oneself for candidacy. A fixed amount of deposit is recorded. + * + * All candidates are wiped at the end of the term. They either become a member/runner-up, + * or leave the system while their deposit is slashed. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`] + * to get their deposit back. Losing the spot in an election will always lead to a slash. + * + * # + * The number of current candidates must be provided as witness data. + * # + */ +export interface ElectionsPhragmenCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is + * reserved. The deposit is based on the number of votes and can be updated over time. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * If `value` is more than `who`'s total balance, then the maximum of the two is used. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * It is the responsibility of the caller to **NOT** place all of their balance into the + * lock and keep some for further operations. + * + * # + * We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less. + * # + */ +export interface ElectionsPhragmenCall_vote { + __kind: 'vote' + votes: AccountId[] + value: bigint +} + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * Submit a solution for the unsigned phase. + * + * The dispatch origin fo this call must be __none__. + * + * This submission is checked on the fly. Moreover, this unsigned solution is only + * validated when submitted to the pool from the **local** node. Effectively, this means + * that only active validators can submit this transaction when authoring a block (similar + * to an inherent). + * + * To prevent any incorrect solution (and thus wasted time/weight), this transaction will + * panic if the solution submitted by the validator is invalid in any way, effectively + * putting their authoring reward at risk. + * + * No deposit or reward is associated with this submission. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + solution: RawSolution + witness: SolutionOrSnapshotSize +} + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export interface RawSolution { + compact: CompactAssignmentsWith16 + score: ElectionScore + round: number +} + +export type ElectionScore = bigint[] + +export interface CompactAssignmentsWith16 { + votes1: [NominatorIndexCompact, ValidatorIndexCompact][] + votes2: [NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact][] + votes3: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes4: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes5: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes6: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes7: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes8: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes9: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes10: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes11: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes12: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes13: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes14: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes15: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes16: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] +} + +export type CompactScoreCompact = [ValidatorIndexCompact, OffchainAccuracyCompact] + +export type OffchainAccuracyCompact = number + +export type ValidatorIndexCompact = number + +export type NominatorIndexCompact = number + +export type DemocracyCall = DemocracyCall_blacklist | DemocracyCall_cancel_proposal | DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. + * + * If called on a queued public or external proposal, then this will result in it being + * removed. If the `ref_index` supplied is an active referendum with the proposal hash, + * then it will be cancelled. + * + * The dispatch origin of this call must be `BlacklistOrigin`. + * + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. + * + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). + */ +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: Hash + maybeRefIndex?: (ReferendumIndex | undefined) +} + +/** + * Remove a proposal. + * + * The dispatch origin of this call must be `CancelProposalOrigin`. + * + * - `prop_index`: The index of the proposal to cancel. + * + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number +} + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: ReferendumIndex +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must + * not be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId + conviction: Conviction + balance: BalanceOf +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: ReferendumIndex +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: Hash + index: ReferendumIndex +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Weight: `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: Hash +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: Hash +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: Hash +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * `FastTrackVotingPeriod` if too low. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: Hash + votingPeriod: BlockNumber + delay: BlockNumber +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. When this call is successful, i.e. + * the preimage has not been uploaded before and matches some imminent proposal, + * no fee is paid. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * Weight: `O(p)` + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: Hash + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. + * Extrinsic is weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * Weight: `O(D)` where D is length of proposal. + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: Hash + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId + index: ReferendumIndex +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: ReferendumIndex +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * Weight: `O(S)` where S is the number of seconds a proposal already has. + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * Weight: `O(V + log(V))` where V is number of `existing vetoers` + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: Hash +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of referendums the voter has voted on. + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + value: AccountVoteSplit +} + +export interface AccountVote_Standard { + __kind: 'Standard' + value: AccountVoteStandard +} + +export interface AccountVoteStandard { + vote: Vote + balance: Balance +} + +export type Vote = number + +export interface AccountVoteSplit { + aye: Balance + nay: Balance +} + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +export type ReferendumIndex = number + +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export type MemberCount = number + +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: BalanceOf + vestingSchedule?: ([BalanceOf, BalanceOf, BlockNumber] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId | undefined) +} + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: LookupSource +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: LookupSource + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is malicious + * or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is + * not assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: LookupSource + dest: LookupSource + value: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also decrease the total issuance of the system (`TotalIssuance`). + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + * + * # + * - Independent of the arguments. + * - Contains a limited number of reads and writes. + * --------------------- + * - Base Weight: + * - Creating: 27.56 µs + * - Killing: 35.11 µs + * - DB Weight: 1 Read, 1 Write to `who` + * # + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: LookupSource + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * It will decrease the total issuance of the system by the `TransferFee`. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for + * input config types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional + * check that the transfer will not kill the origin account. + * --------------------------------- + * - Base Weight: 73.64 µs, worst case scenario (account created, account removed) + * - DB Weight: 1 Read and 1 Write to destination account + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: LookupSource + value: bigint +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + * # + * - Cheaper than transfer because account cannot be killed. + * - Base Weight: 51.4 µs + * - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already) + * # + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: LookupSource + value: bigint +} + +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Plan an epoch config change. The epoch config change is recorded and will be enacted on + * the next call to `enact_epoch_change`. The config will be activated one epoch after. + * Multiple calls to this method will replace any existing planned config change that had + * not been enacted yet. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface BabeEquivocationProof { + offender: AuthorityId + slotNumber: SlotNumber + firstHeader: Header + secondHeader: Header +} + +export interface Header { + parentHash: Hash + number: number + stateRoot: Hash + extrinsicsRoot: Hash + digest: Digest +} + +export interface Digest { + logs: DigestItem[] +} + +export type DigestItem = DigestItem_AuthoritiesChange | DigestItem_ChangesTrieRoot | DigestItem_ChangesTrieSignal | DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal | DigestItem_SealV0 + +export interface DigestItem_AuthoritiesChange { + __kind: 'AuthoritiesChange' + value: AuthorityId[] +} + +export interface DigestItem_ChangesTrieRoot { + __kind: 'ChangesTrieRoot' + value: Hash +} + +export interface DigestItem_ChangesTrieSignal { + __kind: 'ChangesTrieSignal' + value: ChangesTrieSignal +} + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: Consensus +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: PreRuntime +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: Seal +} + +export interface DigestItem_SealV0 { + __kind: 'SealV0' + value: SealV0 +} + +export type SealV0 = [bigint, Signature] + +export type Seal = [ConsensusEngineId, Bytes] + +export type PreRuntime = [ConsensusEngineId, Bytes] + +export type Consensus = [ConsensusEngineId, Bytes] + +export type ConsensusEngineId = Bytes + +export type ChangesTrieSignal = ChangesTrieSignal_NewConfiguration + +export interface ChangesTrieSignal_NewConfiguration { + __kind: 'NewConfiguration' + value?: (ChangesTrieConfiguration | undefined) +} + +export type SlotNumber = bigint + +export type NextConfigDescriptor = NextConfigDescriptor_V0 | NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V0 { + __kind: 'V0' +} + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + value: NextConfigDescriptorV1 +} + +export interface NextConfigDescriptorV1 { + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +export type AuthorityDiscoveryCall = never + +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: Key, + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => Key), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_changes_trie_config: sts.enumStruct({ + changesTrieConfig: sts.option(() => ChangesTrieConfiguration), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => KeyValue), + }), + } +}) + +export const KeyValue = sts.tuple(() => [StorageKey, StorageData]) + +export const StorageData = sts.bytes() + +export const StorageKey = sts.bytes() + +export const ChangesTrieConfiguration: sts.Type = sts.struct(() => { + return { + digestInterval: sts.number(), + digestLevels: sts.number(), + } +}) + +export const Key = sts.bytes() + +export const Perbill = sts.number() + +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: LookupSource, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: EraIndex, + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => LookupSource), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => LookupSource), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId, + era: EraIndex, + }), + reap_stash: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: LookupSource, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export const Percent = sts.number() + +export const EraIndex = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: BalanceOf, + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId, + judgement: SocietyJudgement, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: LookupSource, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId, + value: BalanceOf, + tip: BalanceOf, + }), + } +}) + +export const SocietyJudgement: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export const BalanceOf = sts.bigint() + +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: Keys, + proof: sts.bytes(), + }), + } +}) + +export const Keys = sts.tuple(() => [AccountId, AccountId, AccountId, AccountId, AccountId, AccountId]) + +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: BlockNumber, + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_138, + }), + schedule_after: sts.enumStruct({ + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_138, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_138, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_138, + }), + } +}) + +export const Priority = sts.number() + +export const Period = sts.tuple(() => [BlockNumber, sts.number()]) + +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId, + call: Type_138, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId, + }), + claim_recovery: sts.enumStruct({ + account: AccountId, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId), + threshold: sts.number(), + delayPeriod: BlockNumber, + }), + initiate_recovery: sts.enumStruct({ + account: AccountId, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + } +}) + +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: AccountId, + proxyType: ProxyType, + delay: BlockNumber, + }), + announce: sts.enumStruct({ + real: AccountId, + callHash: CallHashOf, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + delay: BlockNumber, + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_138, + }), + proxy_announced: sts.enumStruct({ + delegate: AccountId, + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_138, + }), + reject_announcement: sts.enumStruct({ + delegate: AccountId, + callHash: CallHashOf, + }), + remove_announcement: sts.enumStruct({ + real: AccountId, + callHash: CallHashOf, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: AccountId, + proxyType: ProxyType, + delay: BlockNumber, + }), + } +}) + +export const CallHashOf = sts.bytes() + +export const OffencesCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + call: OpaqueCall, + storeCall: sts.boolean(), + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId), + call: Type_138, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const OpaqueCall = sts.bytes() + +export const Weight = sts.bigint() + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: BlockNumber, + index: sts.number(), + } +}) + +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: AccountIndex, + }), + force_transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: AccountIndex, + }), + freeze: sts.enumStruct({ + index: AccountIndex, + }), + transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + }), + } +}) + +export const AccountIndex = sts.number() + +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: Signature, + }), + } +}) + +export const Signature = sts.bytes() + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: BlockNumber, + networkState: OpaqueNetworkState, + sessionIndex: SessionIndex, + authorityIndex: AuthIndex, + validatorsLen: sts.number(), + } +}) + +export const AuthIndex = sts.number() + +export const SessionIndex = sts.number() + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId, + }), + add_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: RegistrarIndex, + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: LookupSource, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: LookupSource, + judgement: IdentityJudgement, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: LookupSource, + }), + rename_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: sts.bigint(), + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => IdentityInfoAdditional), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => H160), + image: Data, + twitter: Data, + } +}) + +export const IdentityInfoAdditional = sts.tuple(() => [Data, Data]) + +export const IdentityJudgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: Balance, + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export const RegistrarIndex = sts.number() + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: H256, + Keccak256: H256, + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: H256, + ShaThree256: H256, + } +}) + +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: BlockNumber, + bestFinalizedBlockNumber: BlockNumber, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const KeyOwnerProof: sts.Type = sts.struct(() => { + return { + session: SessionIndex, + trieNodes: sts.array(() => sts.bytes()), + validatorCount: ValidatorCount, + } +}) + +export const ValidatorCount = sts.number() + +export const GrandpaEquivocationProof: sts.Type = sts.struct(() => { + return { + setId: SetId, + equivocation: GrandpaEquivocation, + } +}) + +export const GrandpaEquivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: GrandpaEquivocationValue, + Prevote: GrandpaEquivocationValue, + } +}) + +export const GrandpaEquivocationValue: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: AuthorityId, + first: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + second: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + } +}) + +export const AuthoritySignature = sts.bytes() + +export const GrandpaPrevote: sts.Type = sts.struct(() => { + return { + targetHash: Hash, + targetNumber: BlockNumber, + } +}) + +export const AuthorityId = sts.bytes() + +export const SetId = sts.bigint() + +export const ElectionsPhragmenCall: sts.Type = sts.closedEnum(() => { + return { + clean_defunct_voters: sts.enumStruct({ + numVoters: sts.number(), + numDefunct: sts.number(), + }), + remove_member: sts.enumStruct({ + who: LookupSource, + hasReplacement: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId), + value: sts.bigint(), + }), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + submit_unsigned: sts.enumStruct({ + solution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export const RawSolution: sts.Type = sts.struct(() => { + return { + compact: CompactAssignmentsWith16, + score: ElectionScore, + round: sts.number(), + } +}) + +export const ElectionScore = sts.array(() => sts.bigint()) + +export const CompactAssignmentsWith16: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [NominatorIndexCompact, ValidatorIndexCompact])), + votes2: sts.array(() => sts.tuple(() => [NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact])), + votes3: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes4: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes5: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes6: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes7: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes8: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes9: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes10: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes11: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes12: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes13: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes14: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes15: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes16: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + } +}) + +export const CompactScoreCompact = sts.tuple(() => [ValidatorIndexCompact, OffchainAccuracyCompact]) + +export const OffchainAccuracyCompact = sts.number() + +export const ValidatorIndexCompact = sts.number() + +export const NominatorIndexCompact = sts.number() + +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + blacklist: sts.enumStruct({ + proposalHash: Hash, + maybeRefIndex: sts.option(() => ReferendumIndex), + }), + cancel_proposal: sts.enumStruct({ + propIndex: sts.number(), + }), + cancel_queued: sts.enumStruct({ + which: ReferendumIndex, + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId, + conviction: Conviction, + balance: BalanceOf, + }), + emergency_cancel: sts.enumStruct({ + refIndex: ReferendumIndex, + }), + enact_proposal: sts.enumStruct({ + proposalHash: Hash, + index: ReferendumIndex, + }), + external_propose: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_default: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: Hash, + }), + fast_track: sts.enumStruct({ + proposalHash: Hash, + votingPeriod: BlockNumber, + delay: BlockNumber, + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: Hash, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: Hash, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId, + index: ReferendumIndex, + }), + remove_vote: sts.enumStruct({ + index: ReferendumIndex, + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId, + }), + veto_external: sts.enumStruct({ + proposalHash: Hash, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: AccountVoteSplit, + Standard: AccountVoteStandard, + } +}) + +export const AccountVoteStandard: sts.Type = sts.struct(() => { + return { + vote: Vote, + balance: Balance, + } +}) + +export const Vote = sts.number() + +export const AccountVoteSplit: sts.Type = sts.struct(() => { + return { + aye: Balance, + nay: Balance, + } +}) + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export const ReferendumIndex = sts.number() + +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: BalanceOf, + vestingSchedule: sts.option(() => sts.tuple(() => [BalanceOf, BalanceOf, BlockNumber])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: LookupSource, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: LookupSource, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: LookupSource, + dest: LookupSource, + value: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: LookupSource, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + } +}) + +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const BabeEquivocationProof: sts.Type = sts.struct(() => { + return { + offender: AuthorityId, + slotNumber: SlotNumber, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: Hash, + number: sts.number(), + stateRoot: Hash, + extrinsicsRoot: Hash, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + AuthoritiesChange: sts.array(() => AuthorityId), + ChangesTrieRoot: Hash, + ChangesTrieSignal: ChangesTrieSignal, + Consensus: Consensus, + Other: sts.bytes(), + PreRuntime: PreRuntime, + RuntimeEnvironmentUpdated: sts.unit(), + Seal: Seal, + SealV0: SealV0, + } +}) + +export const SealV0 = sts.tuple(() => [sts.bigint(), Signature]) + +export const Seal = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const PreRuntime = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const Consensus = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const ConsensusEngineId = sts.bytes() + +export const ChangesTrieSignal: sts.Type = sts.closedEnum(() => { + return { + NewConfiguration: sts.option(() => ChangesTrieConfiguration), + } +}) + +export const SlotNumber = sts.bigint() + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V0: sts.unit(), + V1: NextConfigDescriptorV1, + } +}) + +export const NextConfigDescriptorV1: sts.Type = sts.struct(() => { + return { + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +export const AuthorityDiscoveryCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Type_138 = Type_138_AuthorityDiscovery | Type_138_Authorship | Type_138_Babe | Type_138_Balances | Type_138_Bounties | Type_138_Claims | Type_138_Council | Type_138_Democracy | Type_138_ElectionProviderMultiPhase | Type_138_ElectionsPhragmen | Type_138_Grandpa | Type_138_Identity | Type_138_ImOnline | Type_138_Indices | Type_138_Multisig | Type_138_Offences | Type_138_Proxy | Type_138_Recovery | Type_138_Scheduler | Type_138_Session | Type_138_Society | Type_138_Staking | Type_138_System | Type_138_TechnicalCommittee | Type_138_TechnicalMembership | Type_138_Timestamp | Type_138_Tips | Type_138_Treasury | Type_138_Utility | Type_138_Vesting + +export interface Type_138_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Type_138_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Type_138_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Type_138_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Type_138_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Type_138_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Type_138_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Type_138_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Type_138_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Type_138_ElectionsPhragmen { + __kind: 'ElectionsPhragmen' + value: ElectionsPhragmenCall +} + +export interface Type_138_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Type_138_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Type_138_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Type_138_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Type_138_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Type_138_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Type_138_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Type_138_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Type_138_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Type_138_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Type_138_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Type_138_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Type_138_System { + __kind: 'System' + value: SystemCall +} + +export interface Type_138_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Type_138_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Type_138_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Type_138_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Type_138_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Type_138_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Type_138_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId = sts.bytes() diff --git a/squid/src/types/v9010.ts b/squid/src/types/v9010.ts new file mode 100644 index 00000000..4df7a8fa --- /dev/null +++ b/squid/src/types/v9010.ts @@ -0,0 +1,9370 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Type_138: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + Gilt: GiltCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + ParachainsConfiguration: ParachainsConfigurationCall, + Paras: ParasCall, + ParasDmp: ParasDmpCall, + ParasHrmp: ParasHrmpCall, + ParasInclusion: ParasInclusionCall, + ParasInherent: ParasInherentCall, + ParasInitializer: ParasInitializerCall, + ParasScheduler: ParasSchedulerCall, + ParasSessionInfo: ParasSessionInfoCall, + ParasShared: ParasSharedCall, + ParasUmp: ParasUmpCall, + PhragmenElection: PhragmenElectionCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + XcmPallet: XcmPalletCall, + } +}) + +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + execute: sts.enumStruct({ + message: Xcm, + maxWeight: Weight, + }), + send: sts.enumStruct({ + dest: MultiLocation, + message: Xcm, + }), + teleport_assets: sts.enumStruct({ + dest: MultiLocation, + beneficiary: MultiLocation, + assets: sts.array(() => MultiAsset), + destWeight: Weight, + }), + } +}) + +export const MultiAsset: sts.Type = sts.closedEnum(() => { + return { + AbstractFungible: sts.enumStruct({ + id: sts.bytes(), + instance: sts.bigint(), + }), + AbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + instance: AssetInstanceV0, + }), + All: sts.unit(), + AllAbstractFungible: sts.bytes(), + AllAbstractNonFungible: sts.bytes(), + AllConcreteFungible: MultiLocationV0, + AllConcreteNonFungible: MultiLocationV0, + AllFungible: sts.unit(), + AllNonFungible: sts.unit(), + ConcreteFungible: sts.enumStruct({ + id: MultiLocationV0, + amount: sts.bigint(), + }), + ConcreteNonFungible: sts.enumStruct({ + class: MultiLocationV0, + instance: AssetInstanceV0, + }), + None: sts.unit(), + } +}) + +export const MultiLocationV0: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: JunctionV0, + X2: sts.tuple(() => [JunctionV0, JunctionV0]), + X3: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0]), + X4: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X5: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X6: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X7: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X8: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + } +}) + +export const JunctionV0: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: NetworkId, + id: AccountId, + }), + AccountIndex64: sts.enumStruct({ + network: NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.bytes(), + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Parent: sts.unit(), + Plurality: sts.enumStruct({ + id: BodyId, + part: BodyPart, + }), + } +}) + +export const BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.number(), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export type BodyPart = BodyPart_AtLeastProportion | BodyPart_Fraction | BodyPart_Members | BodyPart_MoreThanProportion | BodyPart_Voice + +export interface BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface BodyPart_Members { + __kind: 'Members' + value: number +} + +export interface BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface BodyPart_Voice { + __kind: 'Voice' +} + +export const BodyId: sts.Type = sts.closedEnum(() => { + return { + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: sts.bytes(), + Technical: sts.unit(), + Unit: sts.unit(), + } +}) + +export type BodyId = BodyId_Executive | BodyId_Index | BodyId_Judicial | BodyId_Legislative | BodyId_Named | BodyId_Technical | BodyId_Unit + +export interface BodyId_Executive { + __kind: 'Executive' +} + +export interface BodyId_Index { + __kind: 'Index' + value: number +} + +export interface BodyId_Judicial { + __kind: 'Judicial' +} + +export interface BodyId_Legislative { + __kind: 'Legislative' +} + +export interface BodyId_Named { + __kind: 'Named' + value: Bytes +} + +export interface BodyId_Technical { + __kind: 'Technical' +} + +export interface BodyId_Unit { + __kind: 'Unit' +} + +export const NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: sts.bytes(), + Polkadot: sts.unit(), + } +}) + +export type NetworkId = NetworkId_Any | NetworkId_Kusama | NetworkId_Named | NetworkId_Polkadot + +export interface NetworkId_Any { + __kind: 'Any' +} + +export interface NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface NetworkId_Named { + __kind: 'Named' + value: Bytes +} + +export interface NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export type JunctionV0 = JunctionV0_AccountId32 | JunctionV0_AccountIndex64 | JunctionV0_AccountKey20 | JunctionV0_GeneralIndex | JunctionV0_GeneralKey | JunctionV0_OnlyChild | JunctionV0_PalletInstance | JunctionV0_Parachain | JunctionV0_Parent | JunctionV0_Plurality + +export interface JunctionV0_AccountId32 { + __kind: 'AccountId32' + network: NetworkId + id: AccountId +} + +export interface JunctionV0_AccountIndex64 { + __kind: 'AccountIndex64' + network: NetworkId + index: bigint +} + +export interface JunctionV0_AccountKey20 { + __kind: 'AccountKey20' + network: NetworkId + key: Bytes +} + +export interface JunctionV0_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface JunctionV0_GeneralKey { + __kind: 'GeneralKey' + value: Bytes +} + +export interface JunctionV0_OnlyChild { + __kind: 'OnlyChild' +} + +export interface JunctionV0_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface JunctionV0_Parachain { + __kind: 'Parachain' + value: number +} + +export interface JunctionV0_Parent { + __kind: 'Parent' +} + +export interface JunctionV0_Plurality { + __kind: 'Plurality' + id: BodyId + part: BodyPart +} + +export type AccountId = Bytes + +export type MultiLocationV0 = MultiLocationV0_Here | MultiLocationV0_X1 | MultiLocationV0_X2 | MultiLocationV0_X3 | MultiLocationV0_X4 | MultiLocationV0_X5 | MultiLocationV0_X6 | MultiLocationV0_X7 | MultiLocationV0_X8 + +export interface MultiLocationV0_Here { + __kind: 'Here' +} + +export interface MultiLocationV0_X1 { + __kind: 'X1' + value: JunctionV0 +} + +export interface MultiLocationV0_X2 { + __kind: 'X2' + value: [JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X3 { + __kind: 'X3' + value: [JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X4 { + __kind: 'X4' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X5 { + __kind: 'X5' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X6 { + __kind: 'X6' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X7 { + __kind: 'X7' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X8 { + __kind: 'X8' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export const AssetInstanceV0: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index128: sts.bigint(), + Index16: sts.number(), + Index32: sts.number(), + Index64: sts.bigint(), + Index8: sts.number(), + Undefined: sts.unit(), + } +}) + +export type AssetInstanceV0 = AssetInstanceV0_Array16 | AssetInstanceV0_Array32 | AssetInstanceV0_Array4 | AssetInstanceV0_Array8 | AssetInstanceV0_Blob | AssetInstanceV0_Index128 | AssetInstanceV0_Index16 | AssetInstanceV0_Index32 | AssetInstanceV0_Index64 | AssetInstanceV0_Index8 | AssetInstanceV0_Undefined + +export interface AssetInstanceV0_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface AssetInstanceV0_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface AssetInstanceV0_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface AssetInstanceV0_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface AssetInstanceV0_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface AssetInstanceV0_Index128 { + __kind: 'Index128' + value: bigint +} + +export interface AssetInstanceV0_Index16 { + __kind: 'Index16' + value: number +} + +export interface AssetInstanceV0_Index32 { + __kind: 'Index32' + value: number +} + +export interface AssetInstanceV0_Index64 { + __kind: 'Index64' + value: bigint +} + +export interface AssetInstanceV0_Index8 { + __kind: 'Index8' + value: number +} + +export interface AssetInstanceV0_Undefined { + __kind: 'Undefined' +} + +export type MultiAsset = MultiAsset_AbstractFungible | MultiAsset_AbstractNonFungible | MultiAsset_All | MultiAsset_AllAbstractFungible | MultiAsset_AllAbstractNonFungible | MultiAsset_AllConcreteFungible | MultiAsset_AllConcreteNonFungible | MultiAsset_AllFungible | MultiAsset_AllNonFungible | MultiAsset_ConcreteFungible | MultiAsset_ConcreteNonFungible | MultiAsset_None + +export interface MultiAsset_AbstractFungible { + __kind: 'AbstractFungible' + id: Bytes + instance: bigint +} + +export interface MultiAsset_AbstractNonFungible { + __kind: 'AbstractNonFungible' + class: Bytes + instance: AssetInstanceV0 +} + +export interface MultiAsset_All { + __kind: 'All' +} + +export interface MultiAsset_AllAbstractFungible { + __kind: 'AllAbstractFungible' + value: Bytes +} + +export interface MultiAsset_AllAbstractNonFungible { + __kind: 'AllAbstractNonFungible' + value: Bytes +} + +export interface MultiAsset_AllConcreteFungible { + __kind: 'AllConcreteFungible' + value: MultiLocationV0 +} + +export interface MultiAsset_AllConcreteNonFungible { + __kind: 'AllConcreteNonFungible' + value: MultiLocationV0 +} + +export interface MultiAsset_AllFungible { + __kind: 'AllFungible' +} + +export interface MultiAsset_AllNonFungible { + __kind: 'AllNonFungible' +} + +export interface MultiAsset_ConcreteFungible { + __kind: 'ConcreteFungible' + id: MultiLocationV0 + amount: bigint +} + +export interface MultiAsset_ConcreteNonFungible { + __kind: 'ConcreteNonFungible' + class: MultiLocationV0 + instance: AssetInstanceV0 +} + +export interface MultiAsset_None { + __kind: 'None' +} + +export const MultiLocation: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: JunctionV0, + X2: sts.tuple(() => [JunctionV0, JunctionV0]), + X3: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0]), + X4: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X5: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X6: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X7: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X8: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + } +}) + +export type MultiLocation = MultiLocation_Here | MultiLocation_X1 | MultiLocation_X2 | MultiLocation_X3 | MultiLocation_X4 | MultiLocation_X5 | MultiLocation_X6 | MultiLocation_X7 | MultiLocation_X8 + +export interface MultiLocation_Here { + __kind: 'Here' +} + +export interface MultiLocation_X1 { + __kind: 'X1' + value: JunctionV0 +} + +export interface MultiLocation_X2 { + __kind: 'X2' + value: [JunctionV0, JunctionV0] +} + +export interface MultiLocation_X3 { + __kind: 'X3' + value: [JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocation_X4 { + __kind: 'X4' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocation_X5 { + __kind: 'X5' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocation_X6 { + __kind: 'X6' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocation_X7 { + __kind: 'X7' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocation_X8 { + __kind: 'X8' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export const Weight = sts.bigint() + +export const Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: ResponseV0, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + RelayedFrom: sts.enumStruct({ + who: MultiLocationV0, + message: XcmV0, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + Transact: sts.enumStruct({ + originType: XcmOriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncodedCall, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + } +}) + +export const DoubleEncodedCall: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncodedCall { + encoded: Bytes +} + +export const XcmOriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type XcmOriginKind = XcmOriginKind_Native | XcmOriginKind_SovereignAccount | XcmOriginKind_Superuser | XcmOriginKind_Xcm + +export interface XcmOriginKind_Native { + __kind: 'Native' +} + +export interface XcmOriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface XcmOriginKind_Superuser { + __kind: 'Superuser' +} + +export interface XcmOriginKind_Xcm { + __kind: 'Xcm' +} + +export const XcmV0: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: ResponseV0, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + RelayedFrom: sts.enumStruct({ + who: MultiLocationV0, + message: XcmV0, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + Transact: sts.enumStruct({ + originType: XcmOriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncodedCall, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + } +}) + +export type XcmV0 = XcmV0_HrmpChannelAccepted | XcmV0_HrmpChannelClosing | XcmV0_HrmpNewChannelOpenRequest | XcmV0_QueryResponse | XcmV0_ReceiveTeleportedAsset | XcmV0_RelayedFrom | XcmV0_ReserveAssetDeposit | XcmV0_Transact | XcmV0_TransferAsset | XcmV0_TransferReserveAsset | XcmV0_WithdrawAsset + +export interface XcmV0_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface XcmV0_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface XcmV0_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface XcmV0_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: ResponseV0 +} + +export interface XcmV0_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export interface XcmV0_RelayedFrom { + __kind: 'RelayedFrom' + who: MultiLocationV0 + message: XcmV0 +} + +export interface XcmV0_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export interface XcmV0_Transact { + __kind: 'Transact' + originType: XcmOriginKind + requireWeightAtMost: bigint + call: DoubleEncodedCall +} + +export interface XcmV0_TransferAsset { + __kind: 'TransferAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 +} + +export interface XcmV0_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface XcmV0_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export type XcmOrderV0 = XcmOrderV0_BuyExecution | XcmOrderV0_DepositAsset | XcmOrderV0_DepositReserveAsset | XcmOrderV0_ExchangeAsset | XcmOrderV0_InitiateReserveWithdraw | XcmOrderV0_InitiateTeleport | XcmOrderV0_Null | XcmOrderV0_QueryHolding + +export interface XcmOrderV0_BuyExecution { + __kind: 'BuyExecution' + fees: MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: XcmV0[] +} + +export interface XcmOrderV0_DepositAsset { + __kind: 'DepositAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 +} + +export interface XcmOrderV0_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface XcmOrderV0_ExchangeAsset { + __kind: 'ExchangeAsset' + give: MultiAssetV0[] + receive: MultiAssetV0[] +} + +export interface XcmOrderV0_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: MultiAssetV0[] + reserve: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface XcmOrderV0_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: MultiAsset[] + dest: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface XcmOrderV0_Null { + __kind: 'Null' +} + +export interface XcmOrderV0_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: MultiLocationV0 + assets: MultiAssetV0[] +} + +export type MultiAssetV0 = MultiAssetV0_AbstractFungible | MultiAssetV0_AbstractNonFungible | MultiAssetV0_All | MultiAssetV0_AllAbstractFungible | MultiAssetV0_AllAbstractNonFungible | MultiAssetV0_AllConcreteFungible | MultiAssetV0_AllConcreteNonFungible | MultiAssetV0_AllFungible | MultiAssetV0_AllNonFungible | MultiAssetV0_ConcreteFungible | MultiAssetV0_ConcreteNonFungible | MultiAssetV0_None + +export interface MultiAssetV0_AbstractFungible { + __kind: 'AbstractFungible' + id: Bytes + instance: bigint +} + +export interface MultiAssetV0_AbstractNonFungible { + __kind: 'AbstractNonFungible' + class: Bytes + instance: AssetInstanceV0 +} + +export interface MultiAssetV0_All { + __kind: 'All' +} + +export interface MultiAssetV0_AllAbstractFungible { + __kind: 'AllAbstractFungible' + value: Bytes +} + +export interface MultiAssetV0_AllAbstractNonFungible { + __kind: 'AllAbstractNonFungible' + value: Bytes +} + +export interface MultiAssetV0_AllConcreteFungible { + __kind: 'AllConcreteFungible' + value: MultiLocationV0 +} + +export interface MultiAssetV0_AllConcreteNonFungible { + __kind: 'AllConcreteNonFungible' + value: MultiLocationV0 +} + +export interface MultiAssetV0_AllFungible { + __kind: 'AllFungible' +} + +export interface MultiAssetV0_AllNonFungible { + __kind: 'AllNonFungible' +} + +export interface MultiAssetV0_ConcreteFungible { + __kind: 'ConcreteFungible' + id: MultiLocationV0 + amount: bigint +} + +export interface MultiAssetV0_ConcreteNonFungible { + __kind: 'ConcreteNonFungible' + class: MultiLocationV0 + instance: AssetInstanceV0 +} + +export interface MultiAssetV0_None { + __kind: 'None' +} + +export type ResponseV0 = ResponseV0_Assets + +export interface ResponseV0_Assets { + __kind: 'Assets' + value: MultiAssetV0[] +} + +export const XcmOrderV0: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => XcmV0), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => MultiAssetV0), + receive: sts.array(() => MultiAssetV0), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + reserve: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => MultiAsset), + dest: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: MultiLocationV0, + assets: sts.array(() => MultiAssetV0), + }), + } +}) + +export const MultiAssetV0: sts.Type = sts.closedEnum(() => { + return { + AbstractFungible: sts.enumStruct({ + id: sts.bytes(), + instance: sts.bigint(), + }), + AbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + instance: AssetInstanceV0, + }), + All: sts.unit(), + AllAbstractFungible: sts.bytes(), + AllAbstractNonFungible: sts.bytes(), + AllConcreteFungible: MultiLocationV0, + AllConcreteNonFungible: MultiLocationV0, + AllFungible: sts.unit(), + AllNonFungible: sts.unit(), + ConcreteFungible: sts.enumStruct({ + id: MultiLocationV0, + amount: sts.bigint(), + }), + ConcreteNonFungible: sts.enumStruct({ + class: MultiLocationV0, + instance: AssetInstanceV0, + }), + None: sts.unit(), + } +}) + +export const ResponseV0: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => MultiAssetV0), + } +}) + +export type Xcm = Xcm_HrmpChannelAccepted | Xcm_HrmpChannelClosing | Xcm_HrmpNewChannelOpenRequest | Xcm_QueryResponse | Xcm_ReceiveTeleportedAsset | Xcm_RelayedFrom | Xcm_ReserveAssetDeposit | Xcm_Transact | Xcm_TransferAsset | Xcm_TransferReserveAsset | Xcm_WithdrawAsset + +export interface Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: ResponseV0 +} + +export interface Xcm_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export interface Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: MultiLocationV0 + message: XcmV0 +} + +export interface Xcm_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export interface Xcm_Transact { + __kind: 'Transact' + originType: XcmOriginKind + requireWeightAtMost: bigint + call: DoubleEncodedCall +} + +export interface Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 +} + +export interface Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export type XcmPalletCall = XcmPalletCall_execute | XcmPalletCall_send | XcmPalletCall_teleport_assets + +/** + * Execute an XCM message from a local, signed, origin. + * + * An event is deposited indicating whether `msg` could be executed completely or only + * partially. + * + * No more than `max_weight` will be used in its attempted execution. If this is less than the + * maximum amount of weight that the message could take to be executed, then no execution + * attempt will be made. + * + * NOTE: A successful return to this does *not* imply that the `msg` was executed successfully + * to completion; only that *some* of it was executed. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Xcm + maxWeight: Weight +} + +export interface XcmPalletCall_send { + __kind: 'send' + dest: MultiLocation + message: Xcm +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `dest_weight`: Equal to the total weight on `dest` of the XCM message + * `Teleport { assets, effects: [ BuyExecution{..}, DepositAsset{..} ] }`. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: MultiLocation + beneficiary: MultiLocation + assets: MultiAsset[] + destWeight: Weight +} + +export type Weight = bigint + +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: LookupSource, + target: LookupSource, + schedule: VestingInfo, + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: LookupSource, + }), + vested_transfer: sts.enumStruct({ + target: LookupSource, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: Balance, + perBlock: Balance, + startingBlock: BlockNumber, + } +}) + +export const BlockNumber = sts.number() + +export const Balance = sts.bigint() + +export interface VestingInfo { + locked: Balance + perBlock: Balance + startingBlock: BlockNumber +} + +export type BlockNumber = number + +export type Balance = bigint + +export const LookupSource: sts.Type = sts.closedEnum(() => { + return { + Address20: H160, + Address32: H256, + Id: AccountId, + Index: sts.number(), + Raw: sts.bytes(), + } +}) + +export const H256 = sts.bytes() + +export const H160 = sts.bytes() + +export type LookupSource = LookupSource_Address20 | LookupSource_Address32 | LookupSource_Id | LookupSource_Index | LookupSource_Raw + +export interface LookupSource_Address20 { + __kind: 'Address20' + value: H160 +} + +export interface LookupSource_Address32 { + __kind: 'Address32' + value: H256 +} + +export interface LookupSource_Id { + __kind: 'Id' + value: AccountId +} + +export interface LookupSource_Index { + __kind: 'Index' + value: number +} + +export interface LookupSource_Raw { + __kind: 'Raw' + value: Bytes +} + +export type H256 = Bytes + +export type H160 = Bytes + +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: LookupSource + target: LookupSource + schedule: VestingInfo +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: LookupSource +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: LookupSource + schedule: VestingInfo +} + +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Type_138, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Type_138), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Type_138), + }), + } +}) + +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Type_138 +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Type_138[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Type_138[] +} + +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: LookupSource, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + } +}) + +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: LookupSource +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +export const TipsCall: sts.Type = sts.closedEnum(() => { + return { + close_tip: sts.enumStruct({ + hash: Hash, + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + }), + retract_tip: sts.enumStruct({ + hash: Hash, + }), + slash_tip: sts.enumStruct({ + hash: Hash, + }), + tip: sts.enumStruct({ + hash: Hash, + tipValue: sts.bigint(), + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + tipValue: sts.bigint(), + }), + } +}) + +export const Hash = sts.bytes() + +export type TipsCall = TipsCall_close_tip | TipsCall_report_awesome | TipsCall_retract_tip | TipsCall_slash_tip | TipsCall_tip | TipsCall_tip_new + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`. + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TipsCall_close_tip { + __kind: 'close_tip' + hash: Hash +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TipsCall_retract_tip { + __kind: 'retract_tip' + hash: Hash +} + +/** + * Remove and slash an already-open tip. + * + * May only be called from `T::RejectOrigin`. + * + * As a result, the finder is slashed and the deposits are lost. + * + * Emits `TipSlashed` if successful. + * + * # + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * # + */ +export interface TipsCall_slash_tip { + __kind: 'slash_tip' + hash: Hash +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`, insert tip and check closing, + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TipsCall_tip { + __kind: 'tip' + hash: Hash + tipValue: bigint +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T` + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId + tipValue: bigint +} + +export type Hash = Bytes + +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId, + }), + change_key: sts.enumStruct({ + new: AccountId, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId), + }), + set_prime: sts.enumStruct({ + who: AccountId, + }), + swap_member: sts.enumStruct({ + remove: AccountId, + add: AccountId, + }), + } +}) + +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId + add: AccountId +} + +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const MemberCount = sts.number() + +export const Proposal: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + Gilt: GiltCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + ParachainsConfiguration: ParachainsConfigurationCall, + Paras: ParasCall, + ParasDmp: ParasDmpCall, + ParasHrmp: ParasHrmpCall, + ParasInclusion: ParasInclusionCall, + ParasInherent: ParasInherentCall, + ParasInitializer: ParasInitializerCall, + ParasScheduler: ParasSchedulerCall, + ParasSessionInfo: ParasSessionInfoCall, + ParasShared: ParasSharedCall, + ParasUmp: ParasUmpCall, + PhragmenElection: PhragmenElectionCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + XcmPallet: XcmPalletCall, + } +}) + +export type Proposal = Proposal_Auctions | Proposal_AuthorityDiscovery | Proposal_Authorship | Proposal_Babe | Proposal_Balances | Proposal_Bounties | Proposal_Claims | Proposal_Council | Proposal_Crowdloan | Proposal_Democracy | Proposal_ElectionProviderMultiPhase | Proposal_Gilt | Proposal_Grandpa | Proposal_Identity | Proposal_ImOnline | Proposal_Indices | Proposal_Multisig | Proposal_Offences | Proposal_ParachainsConfiguration | Proposal_Paras | Proposal_ParasDmp | Proposal_ParasHrmp | Proposal_ParasInclusion | Proposal_ParasInherent | Proposal_ParasInitializer | Proposal_ParasScheduler | Proposal_ParasSessionInfo | Proposal_ParasShared | Proposal_ParasUmp | Proposal_PhragmenElection | Proposal_Proxy | Proposal_Recovery | Proposal_Registrar | Proposal_Scheduler | Proposal_Session | Proposal_Slots | Proposal_Society | Proposal_Staking | Proposal_System | Proposal_TechnicalCommittee | Proposal_TechnicalMembership | Proposal_Timestamp | Proposal_Tips | Proposal_Treasury | Proposal_Utility | Proposal_Vesting | Proposal_XcmPallet + +export interface Proposal_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Proposal_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Proposal_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Proposal_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Proposal_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Proposal_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Proposal_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Proposal_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Proposal_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Proposal_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Proposal_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Proposal_Gilt { + __kind: 'Gilt' + value: GiltCall +} + +export interface Proposal_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Proposal_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Proposal_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Proposal_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Proposal_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Proposal_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Proposal_ParachainsConfiguration { + __kind: 'ParachainsConfiguration' + value: ParachainsConfigurationCall +} + +export interface Proposal_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Proposal_ParasDmp { + __kind: 'ParasDmp' + value: ParasDmpCall +} + +export interface Proposal_ParasHrmp { + __kind: 'ParasHrmp' + value: ParasHrmpCall +} + +export interface Proposal_ParasInclusion { + __kind: 'ParasInclusion' + value: ParasInclusionCall +} + +export interface Proposal_ParasInherent { + __kind: 'ParasInherent' + value: ParasInherentCall +} + +export interface Proposal_ParasInitializer { + __kind: 'ParasInitializer' + value: ParasInitializerCall +} + +export interface Proposal_ParasScheduler { + __kind: 'ParasScheduler' + value: ParasSchedulerCall +} + +export interface Proposal_ParasSessionInfo { + __kind: 'ParasSessionInfo' + value: ParasSessionInfoCall +} + +export interface Proposal_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Proposal_ParasUmp { + __kind: 'ParasUmp' + value: ParasUmpCall +} + +export interface Proposal_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Proposal_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Proposal_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Proposal_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Proposal_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Proposal_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Proposal_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Proposal_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Proposal_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Proposal_System { + __kind: 'System' + value: SystemCall +} + +export interface Proposal_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Proposal_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Proposal_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Proposal_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Proposal_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Proposal_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Proposal_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Proposal_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_changes_trie_config | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + * + * # + * - `O(P)` where `P` amount of keys with prefix `prefix` + * - `P` storage deletions. + * - Base Weight: 0.834 * P µs + * - Writes: Number of subkeys + 1 + * # + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Key + subkeys: number +} + +/** + * Kill some items from storage. + * + * # + * - `O(IK)` where `I` length of `keys` and `K` length of one key + * - `I` storage deletions. + * - Base Weight: .378 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Key[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Make some on-chain remark and emit event. + * + * # + * - `O(b)` where b is the length of the remark. + * - 1 event. + * # + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * Set the new changes trie configuration. + * + * # + * - `O(1)` + * - 1 storage write or delete (codec `O(1)`). + * - 1 call to `deposit_log`: Uses `append` API, so O(1) + * - Base Weight: 7.218 µs + * - DB Weight: + * - Writes: Changes Trie, System Digest + * # + */ +export interface SystemCall_set_changes_trie_config { + __kind: 'set_changes_trie_config' + changesTrieConfig?: (ChangesTrieConfiguration | undefined) +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 storage write (codec `O(C)`). + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is expensive). + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very expensive. + * We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + * + * # + * - `O(1)` + * - 1 storage write. + * - Base Weight: 1.405 µs + * - 1 write to HEAP_PAGES + * # + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + * + * # + * - `O(I)` where `I` length of `items` + * - `I` storage writes (`O(1)`). + * - Base Weight: 0.568 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: KeyValue[] +} + +export type KeyValue = [StorageKey, StorageData] + +export type StorageData = Bytes + +export type StorageKey = Bytes + +export interface ChangesTrieConfiguration { + digestInterval: number + digestLevels: number +} + +export type Key = Bytes + +export type Perbill = number + +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger, [Origin Account], Current Era, History Depth, Locks + * - Write: Bonded, Payee, [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: LookupSource + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount + * that can be added. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller and + * it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * - One DB entry. + * ------------ + * DB Weight: + * - Read: Era Election Status, Bonded, Ledger, [Origin Account], Locks + * - Write: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + * + * # + * Complexity: O(U + S) + * with U unapplied slashes weighted with U=1000 + * and S is the number of slash indices to be canceled. + * - Read: Unapplied Slashes + * - Write: Unapplied Slashes + * # + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: EraIndex + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * -------- + * Weight: O(1) + * DB Weight: + * - Read: EraElectionStatus, Ledger + * - Write: Validators, Nominators + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + * + * # + * O(S) where S is the number of slashing spans to be removed + * Reads: Bonded, Slashing Spans, Account, Locks + * Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Account, Locks + * Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Same as [`set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. The controller + * account should represent a validator. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: LookupSource[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. This can only be called when + * [`EraElectionStatus`] is `Closed`. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS). + * - Both the reads and writes follow a similar pattern. + * --------- + * Weight: O(N) + * where N is the number of targets + * DB Weight: + * - Reads: Era Election Status, Ledger, Current Era + * - Writes: Validators, Nominators + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: LookupSource[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * This can only be called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * DB Weight: + * - Read: EraElectionStatus, CurrentEra, HistoryDepth, ErasValidatorReward, + * ErasStakersClipped, ErasRewardPoints, ErasValidatorPrefs (8 items) + * - Read Each: Bonded, Ledger, Payee, Locks, System Account (5 items) + * - Write Each: System Account, Locks, Ledger (3 items) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId + era: EraIndex +} + +/** + * Remove all data structure concerning a staker/stash once its balance is at the minimum. + * This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone + * and the target `stash` must have no funds left beyond the ED. + * + * This can be called from any origin. + * + * - `stash`: The stash account to reap. Its balance must be zero. + * + * # + * Complexity: O(S) where S is the number of slashing spans on the account. + * DB Weight: + * - Reads: Stash Account, Bonded, Slashing Spans, Locks + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Stash Account, Locks + * - Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller, and it can be only called when + * [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MAX_UNLOCKING_CHUNKS`. + * - Storage changes: Can't increase storage, only decrease it. + * --------------- + * - DB Weight: + * - Reads: EraElectionStatus, Ledger, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Same as [`set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: LookupSource +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. + * This should report all the storage items that will be deleted by clearing old + * era history. Needed to report an accurate weight for the dispatch. Trusted by + * `Root` to report an accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Weight: O(E) + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + * + * # + * - O(V) + * - Write: Invulnerables + * # + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + * + * # + * - Independent of the arguments. Limited but potentially exploitable complexity. + * - Contains a limited number of reads. + * - Each call (requires the remainder of the bonded balance to be above `minimum_balance`) + * will cause a new entry to be inserted into a vector (`Ledger.unlocking`) kept in storage. + * The only way to clean the aforementioned storage item is also user-controlled via + * `withdraw_unbonded`. + * - One DB entry. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: EraElectionStatus, Ledger, CurrentEra, Locks, BalanceOf Stash, + * - Write: Locks, Ledger, BalanceOf Stash, + * + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ----------- + * Weight: O(1) + * DB Weight: + * - Read: Era Election Status, Ledger + * - Write: Nominators, Validators + * # + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * - Could be dependent on the `origin` argument and how much `unlocking` chunks exist. + * It implies `consolidate_unlocked` which loops over `Ledger.unlocking`, which is + * indirectly user-controlled. See [`unbond`] for more detail. + * - Contains a limited number of reads, yet the size of which could be large based on `ledger`. + * - Writes are limited to the `origin` account key. + * --------------- + * Complexity O(S) where S is the number of slashing spans to remove + * Update: + * - Reads: EraElectionStatus, Ledger, Current Era, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * Kill: + * - Reads: EraElectionStatus, Ledger, Current Era, Bonded, Slashing Spans, [Origin + * Account], Locks, BalanceOf stash + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, + * [Origin Account], Locks, BalanceOf stash. + * - Writes Each: SpanSlash * S + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export type Percent = number + +export type EraIndex = number + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: BalanceOf +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * module to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId + judgement: SocietyJudgement +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin + * forgives (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: LookupSource + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId + value: BalanceOf + tip: BalanceOf +} + +export type SocietyJudgement = SocietyJudgement_Approve | SocietyJudgement_Rebid | SocietyJudgement_Reject + +export interface SocietyJudgement_Approve { + __kind: 'Approve' +} + +export interface SocietyJudgement_Rebid { + __kind: 'Rebid' +} + +export interface SocietyJudgement_Reject { + __kind: 'Reject' +} + +export type BalanceOf = bigint + +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * Clear all leases for a Para Id, refunding any deposits back to the original owners. + * + * Can only be called by the Root origin. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: ParaId +} + +/** + * Just a hotwire into the `lease_out` call, in case Root wants to force some lease to happen + * independently of any other on-chain mechanism to use it. + * + * Can only be called by the Root origin. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: ParaId + leaser: AccountId + amount: BalanceOf + periodBegin: LeasePeriodOf + periodCount: LeasePeriodOf +} + +/** + * Try to onboard a parachain that has a lease for the current lease period. + * + * This function can be useful if there was some state issue with a para that should + * have onboarded, but was unable to. As long as they have a lease period, we can + * let them onboard from here. + * + * Origin must be signed, but can be called by anyone. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: ParaId +} + +export type LeasePeriodOf = number + +export type ParaId = number + +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` in number of key types. + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwnder` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: Keys + proof: Bytes +} + +export type Keys = [AccountId, AccountId, AccountId, AccountId, AccountId, AccountId] + +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.15 + 2.869 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: BlockNumber + index: number +} + +/** + * Cancel a named scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 24.91 + 2.907 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.29 + .126 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda + * - Will use base weight of 25 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_138 +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_138 +} + +/** + * Schedule a named task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 29.6 + .159 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 35 which should be good for more than 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_138 +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`]. + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_138 +} + +export type Priority = number + +export type Period = [BlockNumber, number] + +export type RegistrarCall = RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_force_remove_lock | RegistrarCall_register | RegistrarCall_reserve | RegistrarCall_swap + +/** + * Deregister a Para Id, freeing all data and returning any deposit. + * + * The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: ParaId +} + +/** + * Force the registration of a Para Id on the relay chain. + * + * This function must be called by a Root origin. + * + * The deposit taken can be specified for this registration. Any ParaId + * can be registered, including sub-1000 IDs which are System Parachains. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId + deposit: BalanceOf + id: ParaId + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Remove a manager lock from a para. This will allow the manager of a + * previously locked para to deregister or swap a para without using governance. + * + * Can only be called by the Root origin. + */ +export interface RegistrarCall_force_remove_lock { + __kind: 'force_remove_lock' + para: ParaId +} + +/** + * Register head data and validation code for a reserved Para Id. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. + * - `id`: The para ID. Must be owned/managed by the `origin` signing account. + * - `genesis_head`: The genesis head data of the parachain/thread. + * - `validation_code`: The initial validation code of the parachain/thread. + * + * ## Deposits/Fees + * The origin signed account must reserve a corresponding deposit for the registration. Anything already + * reserved previously for this para ID is accounted for. + * + * ## Events + * The `Registered` event is emitted in case of success. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: ParaId + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Reserve a Para Id on the relay chain. + * + * This function will reserve a new Para Id to be owned/managed by the origin account. + * The origin account is able to register head data and validation code using `register` to create + * a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID. + * + * ## Deposits/Fees + * The origin must reserve a deposit of `ParaDeposit` for the registration. + * + * ## Events + * The `Reserved` event is emitted in case of success, which provides the ID reserved for use. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * Swap a parachain with another parachain or parathread. + * + * The origin must be Root, the `para` owner, or the `para` itself. + * + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: ParaId + other: ParaId +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + * + * # + * - The weight of the `call` + 10,000. + * - One storage lookup to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId + call: Type_138 +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + * + * # + * - One storage mutation to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully + * recovered by you. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + V) + * # + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + * + * # + * Key: V (len of vouching friends) + * - One storage read/remove to get the active recovery process. O(1), Codec O(V) + * - One balance call to repatriate reserved. O(X) + * - One event. + * + * Total Complexity: O(V + X) + * # + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. + * Should be ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt + * before the account can be recovered. Should be less than or equal to + * the length of the list of friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized + * that needs to pass before the account can be recovered. + * + * # + * - Key: F (len of friends) + * - One storage read to check that account is not already recoverable. O(1). + * - A check that the friends list is sorted and unique. O(F) + * - One currency reserve operation. O(X) + * - One storage write. O(1). Codec O(F). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId[] + threshold: number + delayPeriod: BlockNumber +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account + * needs to be recoverable (i.e. have a recovery configuration). + * + * # + * - One storage read to check that account is recoverable. O(F) + * - One storage read to check that this recovery process hasn't already started. O(1) + * - One currency reserve operation. O(X) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + * + * # + * Key: F (len of friends) + * - One storage read to get the prefix iterator for active recoveries. O(1) + * - One storage read/remove to get the recovery configuration. O(1), Codec O(F) + * - One balance call to unreserved. O(X) + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + * + * # + * - One storage write O(1) + * - One event + * # + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId + rescuer: AccountId +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you + * want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One binary search to confirm caller is a friend. O(logF) + * - One binary search to confirm caller has not already vouched. O(logV) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + logF + V + logV) + * # + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId + rescuer: AccountId +} + +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: AccountId + proxyType: ProxyType + delay: BlockNumber +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: AccountId + callHash: CallHashOf +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + * TODO: Might be over counting 1 read + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: BlockNumber + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_138 +} + +/** + * Dispatch the given `call` from an account that the sender is authorized for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: AccountId + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_138 +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: AccountId + callHash: CallHashOf +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: AccountId + callHash: CallHashOf +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: AccountId + proxyType: ProxyType + delay: BlockNumber +} + +export type CallHashOf = Bytes + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +export type PhragmenElectionCall = PhragmenElectionCall_clean_defunct_voters | PhragmenElectionCall_remove_member | PhragmenElectionCall_remove_voter | PhragmenElectionCall_renounce_candidacy | PhragmenElectionCall_submit_candidacy | PhragmenElectionCall_vote + +/** + * Clean all voters who are defunct (i.e. they do not serve any purpose at all). The + * deposit of the removed voters are returned. + * + * This is an root function to be used only for cleaning the state. + * + * The dispatch origin of this call must be root. + * + * # + * The total number of voters and those that are defunct must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_clean_defunct_voters { + __kind: 'clean_defunct_voters' + numVoters: number + numDefunct: number +} + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, a new phragmen election is started. + * + * The dispatch origin of this call must be root. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement, we use a small weight. Else, since this is a root call and + * will go into phragmen, we assume full block for now. + * # + */ +export interface PhragmenElectionCall_remove_member { + __kind: 'remove_member' + who: LookupSource + hasReplacement: boolean +} + +/** + * Remove `origin` as a voter. + * + * This removes the lock and returns the deposit. + * + * The dispatch origin of this call must be signed and be a voter. + */ +export interface PhragmenElectionCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * + * - `origin` is a candidate and not elected in any set. In this case, the deposit is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the deposit is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the deposit is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_members`], if replacement runners exists, they are immediately + * used. If the prime is renouncing, then no prime will exist until the next round. + * + * The dispatch origin of this call must be signed, and have one of the above roles. + * + * # + * The type of renouncing must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Submit oneself for candidacy. A fixed amount of deposit is recorded. + * + * All candidates are wiped at the end of the term. They either become a member/runner-up, + * or leave the system while their deposit is slashed. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`] + * to get their deposit back. Losing the spot in an election will always lead to a slash. + * + * # + * The number of current candidates must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is + * reserved. The deposit is based on the number of votes and can be updated over time. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * If `value` is more than `who`'s total balance, then the maximum of the two is used. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * It is the responsibility of the caller to **NOT** place all of their balance into the + * lock and keep some for further operations. + * + * # + * We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less. + * # + */ +export interface PhragmenElectionCall_vote { + __kind: 'vote' + votes: AccountId[] + value: bigint +} + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +export type ParasUmpCall = never + +export type ParasSharedCall = never + +export type ParasSessionInfoCall = never + +export type ParasSchedulerCall = never + +export type ParasInitializerCall = ParasInitializerCall_force_approve + +/** + * Issue a signal to the consensus engine to forcibly act as though all parachain + * blocks in all relay chain blocks up to and including the given number in the current + * chain are valid and should be finalized. + */ +export interface ParasInitializerCall_force_approve { + __kind: 'force_approve' + upTo: BlockNumber +} + +export type ParasInherentCall = ParasInherentCall_enter + +/** + * Enter the paras inherent. This will process bitfields and backed candidates. + */ +export interface ParasInherentCall_enter { + __kind: 'enter' + data: ParachainsInherentData +} + +export interface ParachainsInherentData { + bitfields: SignedAvailabilityBitfield[] + backedCandidates: BackedCandidate[] + disputes: DisputeStatementSet[] + parentHeader: Header +} + +export interface Header { + parentHash: Hash + number: number + stateRoot: Hash + extrinsicsRoot: Hash + digest: Digest +} + +export interface Digest { + logs: DigestItem[] +} + +export type DigestItem = DigestItem_AuthoritiesChange | DigestItem_ChangesTrieRoot | DigestItem_ChangesTrieSignal | DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal | DigestItem_SealV0 + +export interface DigestItem_AuthoritiesChange { + __kind: 'AuthoritiesChange' + value: AuthorityId[] +} + +export interface DigestItem_ChangesTrieRoot { + __kind: 'ChangesTrieRoot' + value: Hash +} + +export interface DigestItem_ChangesTrieSignal { + __kind: 'ChangesTrieSignal' + value: ChangesTrieSignal +} + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: Consensus +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: PreRuntime +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: Seal +} + +export interface DigestItem_SealV0 { + __kind: 'SealV0' + value: SealV0 +} + +export type SealV0 = [bigint, Signature] + +export type Signature = Bytes + +export type Seal = [ConsensusEngineId, Bytes] + +export type PreRuntime = [ConsensusEngineId, Bytes] + +export type Consensus = [ConsensusEngineId, Bytes] + +export type ConsensusEngineId = Bytes + +export type ChangesTrieSignal = ChangesTrieSignal_NewConfiguration + +export interface ChangesTrieSignal_NewConfiguration { + __kind: 'NewConfiguration' + value?: (ChangesTrieConfiguration | undefined) +} + +export type AuthorityId = Bytes + +export interface DisputeStatementSet { + candidateHash: CandidateHash + session: SessionIndex + statements: [DisputeStatement, ParaValidatorIndex, ValidatorSignature][] +} + +export type ValidatorSignature = Bytes + +export type ParaValidatorIndex = number + +export type DisputeStatement = DisputeStatement_Invalid | DisputeStatement_Valid + +export interface DisputeStatement_Invalid { + __kind: 'Invalid' + value: InvalidDisputeStatementKind +} + +export interface DisputeStatement_Valid { + __kind: 'Valid' + value: ValidDisputeStatementKind +} + +export type ValidDisputeStatementKind = ValidDisputeStatementKind_ApprovalChecking | ValidDisputeStatementKind_BackingSeconded | ValidDisputeStatementKind_BackingValid | ValidDisputeStatementKind_Explicit + +export interface ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: Hash +} + +export interface ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: Hash +} + +export interface ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type InvalidDisputeStatementKind = InvalidDisputeStatementKind_Explicit + +export interface InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type SessionIndex = number + +export type CandidateHash = Bytes + +export interface BackedCandidate { + candidate: CommittedCandidateReceipt + validityVotes: ValidityAttestation[] + validatorIndices: BitSequence +} + +export type ValidityAttestation = ValidityAttestation_Explicit | ValidityAttestation_Implicit | ValidityAttestation_Never + +export interface ValidityAttestation_Explicit { + __kind: 'Explicit' + value: ValidatorSignature +} + +export interface ValidityAttestation_Implicit { + __kind: 'Implicit' + value: ValidatorSignature +} + +export interface ValidityAttestation_Never { + __kind: 'Never' +} + +export interface CommittedCandidateReceipt { + descriptor: CandidateDescriptor + commitments: CandidateCommitments +} + +export interface CandidateCommitments { + upwardMessages: UpwardMessage[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: BlockNumber +} + +export interface OutboundHrmpMessage { + recipient: number + data: Bytes +} + +export type UpwardMessage = Bytes + +export interface CandidateDescriptor { + paraId: ParaId + relayParent: RelayChainHash + collatorId: CollatorId + persistedValidationDataHash: Hash + povHash: Hash + erasureRoot: Hash + signature: CollatorSignature + paraHead: Hash + validationCodeHash: ValidationCodeHash +} + +export type ValidationCodeHash = Bytes + +export type CollatorSignature = Bytes + +export type CollatorId = Bytes + +export type RelayChainHash = Bytes + +export interface SignedAvailabilityBitfield { + payload: BitSequence + validatorIndex: ParaValidatorIndex + signature: ValidatorSignature +} + +export type ParasInclusionCall = never + +export type ParasHrmpCall = ParasHrmpCall_force_clean_hrmp | ParasHrmpCall_force_process_hrmp_close | ParasHrmpCall_force_process_hrmp_open | ParasHrmpCall_hrmp_accept_open_channel | ParasHrmpCall_hrmp_close_channel | ParasHrmpCall_hrmp_init_open_channel + +/** + * This extrinsic triggers the cleanup of all the HRMP storage items that + * a para may have. Normally this happens once per session, but this allows + * you to trigger the cleanup immediately for a specific parachain. + * + * Origin must be Root. + */ +export interface ParasHrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: ParaId +} + +/** + * Force process hrmp close channel requests. + * + * If there are pending HRMP close channel requests, you can use this + * function process all of those requests immediately. + */ +export interface ParasHrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' +} + +/** + * Force process hrmp open channel requests. + * + * If there are pending HRMP open channel requests, you can use this + * function process all of those requests immediately. + */ +export interface ParasHrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' +} + +/** + * Accept a pending open channel request from the given sender. + * + * The channel will be opened only on the next session boundary. + */ +export interface ParasHrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: ParaId +} + +/** + * Initiate unilateral closing of a channel. The origin must be either the sender or the + * recipient in the channel being closed. + * + * The closure can only happen on a session change. + */ +export interface ParasHrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * Initiate opening a channel from a parachain to a given recipient with given channel + * parameters. + * + * - `proposed_max_capacity` - specifies how many messages can be in the channel at once. + * - `proposed_max_message_size` - specifies the maximum size of any of the messages. + * + * These numbers are a subject to the relay-chain configuration limits. + * + * The channel can be opened only after the recipient confirms it and only on a session + * change. + */ +export interface ParasHrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: ParaId + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +export interface HrmpChannelId { + sender: number + receiver: number +} + +export type ParasDmpCall = never + +export type ParasCall = ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head + +/** + * Note a new block head for para within the context of the current block. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: ParaId + newHead: HeadData +} + +/** + * Put a parachain directly into the next session's action queue. + * We can't queue it any sooner than this without going into the + * initializer... + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: ParaId +} + +/** + * Schedule a code upgrade for block `expected_at`. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: ParaId + newCode: ValidationCode + expectedAt: BlockNumber +} + +/** + * Set the storage for the parachain validation code immediately. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: ParaId + newCode: ValidationCode +} + +/** + * Set the storage for the current parachain head data immediately. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: ParaId + newHead: HeadData +} + +export type ParachainsConfigurationCall = ParachainsConfigurationCall_set_chain_availability_period | ParachainsConfigurationCall_set_code_retention_period | ParachainsConfigurationCall_set_dispute_conclusion_by_time_out_period | ParachainsConfigurationCall_set_dispute_max_spam_slots | ParachainsConfigurationCall_set_dispute_period | ParachainsConfigurationCall_set_dispute_post_conclusion_acceptance_period | ParachainsConfigurationCall_set_group_rotation_frequency | ParachainsConfigurationCall_set_hrmp_channel_max_capacity | ParachainsConfigurationCall_set_hrmp_channel_max_message_size | ParachainsConfigurationCall_set_hrmp_channel_max_total_size | ParachainsConfigurationCall_set_hrmp_max_message_num_per_candidate | ParachainsConfigurationCall_set_hrmp_max_parachain_inbound_channels | ParachainsConfigurationCall_set_hrmp_max_parachain_outbound_channels | ParachainsConfigurationCall_set_hrmp_max_parathread_inbound_channels | ParachainsConfigurationCall_set_hrmp_max_parathread_outbound_channels | ParachainsConfigurationCall_set_hrmp_open_request_ttl | ParachainsConfigurationCall_set_hrmp_recipient_deposit | ParachainsConfigurationCall_set_hrmp_sender_deposit | ParachainsConfigurationCall_set_max_code_size | ParachainsConfigurationCall_set_max_downward_message_size | ParachainsConfigurationCall_set_max_head_data_size | ParachainsConfigurationCall_set_max_pov_size | ParachainsConfigurationCall_set_max_upward_message_num_per_candidate | ParachainsConfigurationCall_set_max_upward_message_size | ParachainsConfigurationCall_set_max_upward_queue_count | ParachainsConfigurationCall_set_max_upward_queue_size | ParachainsConfigurationCall_set_max_validators | ParachainsConfigurationCall_set_max_validators_per_core | ParachainsConfigurationCall_set_n_delay_tranches | ParachainsConfigurationCall_set_needed_approvals | ParachainsConfigurationCall_set_no_show_slots | ParachainsConfigurationCall_set_parathread_cores | ParachainsConfigurationCall_set_parathread_retries | ParachainsConfigurationCall_set_preferred_dispatchable_upward_messages_step_weight | ParachainsConfigurationCall_set_relay_vrf_modulo_samples | ParachainsConfigurationCall_set_scheduling_lookahead | ParachainsConfigurationCall_set_thread_availability_period | ParachainsConfigurationCall_set_validation_upgrade_delay | ParachainsConfigurationCall_set_validation_upgrade_frequency | ParachainsConfigurationCall_set_zeroth_delay_tranche_width + +/** + * Set the availability period for parachains. + */ +export interface ParachainsConfigurationCall_set_chain_availability_period { + __kind: 'set_chain_availability_period' + new: BlockNumber +} + +/** + * Set the acceptance period for an included candidate. + */ +export interface ParachainsConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: BlockNumber +} + +/** + * Set the dispute conclusion by time out period. + */ +export interface ParachainsConfigurationCall_set_dispute_conclusion_by_time_out_period { + __kind: 'set_dispute_conclusion_by_time_out_period' + new: BlockNumber +} + +/** + * Set the maximum number of dispute spam slots. + */ +export interface ParachainsConfigurationCall_set_dispute_max_spam_slots { + __kind: 'set_dispute_max_spam_slots' + new: number +} + +/** + * Set the dispute period, in number of sessions to keep for disputes. + */ +export interface ParachainsConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: SessionIndex +} + +/** + * Set the dispute post conclusion acceptance period. + */ +export interface ParachainsConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: BlockNumber +} + +/** + * Set the parachain validator-group rotation frequency + */ +export interface ParachainsConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: BlockNumber +} + +/** + * Sets the maximum number of messages allowed in an HRMP channel at once. + */ +export interface ParachainsConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * Sets the maximum size of a message that could ever be put into an HRMP channel. + */ +export interface ParachainsConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * Sets the maximum total size of messages in bytes allowed in an HRMP channel at once. + */ +export interface ParachainsConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * Sets the maximum number of outbound HRMP messages can be sent by a candidate. + */ +export interface ParachainsConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parachain is allowed to accept. + */ +export interface ParachainsConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parachain is allowed to open. + */ +export interface ParachainsConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parathread is allowed to accept. + */ +export interface ParachainsConfigurationCall_set_hrmp_max_parathread_inbound_channels { + __kind: 'set_hrmp_max_parathread_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parathread is allowed to open. + */ +export interface ParachainsConfigurationCall_set_hrmp_max_parathread_outbound_channels { + __kind: 'set_hrmp_max_parathread_outbound_channels' + new: number +} + +/** + * Sets the number of sessions after which an HRMP open channel request expires. + */ +export interface ParachainsConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * Sets the amount of funds that the recipient should provide for accepting opening an HRMP + * channel. + */ +export interface ParachainsConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: Balance +} + +/** + * Sets the amount of funds that the sender should provide for opening an HRMP channel. + */ +export interface ParachainsConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: Balance +} + +/** + * Set the max validation code size for incoming upgrades. + */ +export interface ParachainsConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * Set the critical downward message size. + */ +export interface ParachainsConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * Set the max head data size for paras. + */ +export interface ParachainsConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * Set the max POV block size for incoming upgrades. + */ +export interface ParachainsConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * Sets the maximum number of messages that a candidate can contain. + */ +export interface ParachainsConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum size of an upward message that can be sent by a candidate. + */ +export interface ParachainsConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * Sets the maximum items that can present in a upward dispatch queue at once. + */ +export interface ParachainsConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * Sets the maximum total size of items that can present in a upward dispatch queue at once. + */ +export interface ParachainsConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * Set the maximum number of validators to use in parachain consensus. + */ +export interface ParachainsConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * Set the maximum number of validators to assign to any core. + */ +export interface ParachainsConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * Set the total number of delay tranches. + */ +export interface ParachainsConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * Set the number of validators needed to approve a block. + */ +export interface ParachainsConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * Set the no show slots, in number of number of consensus slots. + * Must be at least 1. + */ +export interface ParachainsConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * Set the number of parathread execution cores. + */ +export interface ParachainsConfigurationCall_set_parathread_cores { + __kind: 'set_parathread_cores' + new: number +} + +/** + * Set the number of retries for a particular parathread. + */ +export interface ParachainsConfigurationCall_set_parathread_retries { + __kind: 'set_parathread_retries' + new: number +} + +/** + * Sets the soft limit for the phase of dispatching dispatchable upward messages. + */ +export interface ParachainsConfigurationCall_set_preferred_dispatchable_upward_messages_step_weight { + __kind: 'set_preferred_dispatchable_upward_messages_step_weight' + new: Weight +} + +/** + * Set the number of samples to do of the RelayVRFModulo approval assignment criterion. + */ +export interface ParachainsConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * Set the scheduling lookahead, in expected number of blocks at peak throughput. + */ +export interface ParachainsConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * Set the availability period for parathreads. + */ +export interface ParachainsConfigurationCall_set_thread_availability_period { + __kind: 'set_thread_availability_period' + new: BlockNumber +} + +/** + * Set the validation upgrade delay. + */ +export interface ParachainsConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: BlockNumber +} + +/** + * Set the validation upgrade frequency. + */ +export interface ParachainsConfigurationCall_set_validation_upgrade_frequency { + __kind: 'set_validation_upgrade_frequency' + new: BlockNumber +} + +/** + * Set the zeroth delay tranche width. + */ +export interface ParachainsConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +export type OffencesCall = never + +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + call: OpaqueCall + storeCall: boolean + maxWeight: Weight +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId[] + call: Type_138 +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId[] + timepoint: Timepoint + callHash: Bytes +} + +export type OpaqueCall = Bytes + +export interface Timepoint { + height: BlockNumber + index: number +} + +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: AccountIndex +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId + index: AccountIndex + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: AccountIndex +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: AccountIndex +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId + index: AccountIndex +} + +export type AccountIndex = number + +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) + * and E is length of `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Signature +} + +export interface Heartbeat { + blockNumber: BlockNumber + networkState: OpaqueNetworkState + sessionIndex: SessionIndex + authorityIndex: AuthIndex + validatorsLen: number +} + +export type AuthIndex = number + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: LookupSource + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: RegistrarIndex +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: LookupSource +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: LookupSource + judgement: IdentityJudgement +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: LookupSource +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: LookupSource + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: bigint +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId, Data][] +} + +export interface IdentityInfo { + additional: IdentityInfoAdditional[] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (H160 | undefined) + image: Data + twitter: Data +} + +export type IdentityInfoAdditional = [Data, Data] + +export type IdentityJudgement = IdentityJudgement_Erroneous | IdentityJudgement_FeePaid | IdentityJudgement_KnownGood | IdentityJudgement_LowQuality | IdentityJudgement_OutOfDate | IdentityJudgement_Reasonable | IdentityJudgement_Unknown + +export interface IdentityJudgement_Erroneous { + __kind: 'Erroneous' +} + +export interface IdentityJudgement_FeePaid { + __kind: 'FeePaid' + value: Balance +} + +export interface IdentityJudgement_KnownGood { + __kind: 'KnownGood' +} + +export interface IdentityJudgement_LowQuality { + __kind: 'LowQuality' +} + +export interface IdentityJudgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface IdentityJudgement_Reasonable { + __kind: 'Reasonable' +} + +export interface IdentityJudgement_Unknown { + __kind: 'Unknown' +} + +export type RegistrarIndex = number + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: H256 +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: H256 +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: H256 +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: H256 +} + +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has + * stalled. This will trigger a forced authority set change at the beginning + * of the next session, to be enacted `delay` blocks after that. The delay + * should be high enough to safely assume that the block signalling the + * forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters + * will start the new authority set using the given finalized block as base. + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: BlockNumber + bestFinalizedBlockNumber: BlockNumber +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface KeyOwnerProof { + session: SessionIndex + trieNodes: Bytes[] + validatorCount: ValidatorCount +} + +export type ValidatorCount = number + +export interface GrandpaEquivocationProof { + setId: SetId + equivocation: GrandpaEquivocation +} + +export type GrandpaEquivocation = GrandpaEquivocation_Precommit | GrandpaEquivocation_Prevote + +export interface GrandpaEquivocation_Precommit { + __kind: 'Precommit' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocation_Prevote { + __kind: 'Prevote' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocationValue { + roundNumber: bigint + identity: AuthorityId + first: [GrandpaPrevote, AuthoritySignature] + second: [GrandpaPrevote, AuthoritySignature] +} + +export type AuthoritySignature = Bytes + +export interface GrandpaPrevote { + targetHash: Hash + targetNumber: BlockNumber +} + +export type SetId = bigint + +export type GiltCall = GiltCall_place_bid | GiltCall_retract_bid | GiltCall_set_target | GiltCall_thaw + +/** + * Place a bid for a gilt to be issued. + * + * Origin must be Signed, and account must have at least `amount` in free balance. + * + * - `amount`: The amount of the bid; these funds will be reserved. If the bid is + * successfully elevated into an issued gilt, then these funds will continue to be + * reserved until the gilt expires. Must be at least `MinFreeze`. + * - `duration`: The number of periods for which the funds will be locked if the gilt is + * issued. It will expire only after this period has elapsed after the point of issuance. + * Must be greater than 1 and no more than `QueueCount`. + * + * Complexities: + * - `Queues[duration].len()` (just take max). + */ +export interface GiltCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * Retract a previously placed bid. + * + * Origin must be Signed, and the account should have previously issued a still-active bid + * of `amount` for `duration`. + * + * - `amount`: The amount of the previous bid. + * - `duration`: The duration of the previous bid. + */ +export interface GiltCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * Set target proportion of gilt-funds. + * + * Origin must be `AdminOrigin`. + * + * - `target`: The target proportion of effective issued funds that should be under gilts + * at any one time. + */ +export interface GiltCall_set_target { + __kind: 'set_target' + target: bigint +} + +/** + * Remove an active but expired gilt. Reserved funds under gilt are freed and balance is + * adjusted to ensure that the funds grow or shrink to maintain the equivalent proportion + * of effective total issued funds. + * + * Origin must be Signed and the account must be the owner of the gilt of the given index. + * + * - `index`: The index of the gilt to be thawed. + */ +export interface GiltCall_thaw { + __kind: 'thaw' + index: number +} + +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * Submit a solution for the unsigned phase. + * + * The dispatch origin fo this call must be __none__. + * + * This submission is checked on the fly. Moreover, this unsigned solution is only + * validated when submitted to the pool from the **local** node. Effectively, this means + * that only active validators can submit this transaction when authoring a block (similar + * to an inherent). + * + * To prevent any incorrect solution (and thus wasted time/weight), this transaction will + * panic if the solution submitted by the validator is invalid in any way, effectively + * putting their authoring reward at risk. + * + * No deposit or reward is associated with this submission. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + solution: RawSolution + witness: SolutionOrSnapshotSize +} + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export interface RawSolution { + compact: CompactAssignmentsWith24 + score: ElectionScore + round: number +} + +export type ElectionScore = bigint[] + +export interface CompactAssignmentsWith24 { + votes1: [NominatorIndexCompact, ValidatorIndexCompact][] + votes2: [NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact][] + votes3: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes4: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes5: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes6: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes7: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes8: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes9: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes10: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes11: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes12: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes13: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes14: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes15: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes16: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes17: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes18: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes19: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes20: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes21: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes22: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes23: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes24: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] +} + +export type CompactScoreCompact = [ValidatorIndexCompact, OffchainAccuracyCompact] + +export type OffchainAccuracyCompact = number + +export type ValidatorIndexCompact = number + +export type NominatorIndexCompact = number + +export type DemocracyCall = DemocracyCall_blacklist | DemocracyCall_cancel_proposal | DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. + * + * If called on a queued public or external proposal, then this will result in it being + * removed. If the `ref_index` supplied is an active referendum with the proposal hash, + * then it will be cancelled. + * + * The dispatch origin of this call must be `BlacklistOrigin`. + * + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. + * + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). + */ +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: Hash + maybeRefIndex?: (ReferendumIndex | undefined) +} + +/** + * Remove a proposal. + * + * The dispatch origin of this call must be `CancelProposalOrigin`. + * + * - `prop_index`: The index of the proposal to cancel. + * + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number +} + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: ReferendumIndex +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must + * not be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId + conviction: Conviction + balance: BalanceOf +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: ReferendumIndex +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: Hash + index: ReferendumIndex +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Weight: `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: Hash +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: Hash +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: Hash +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * `FastTrackVotingPeriod` if too low. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: Hash + votingPeriod: BlockNumber + delay: BlockNumber +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. When this call is successful, i.e. + * the preimage has not been uploaded before and matches some imminent proposal, + * no fee is paid. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * Weight: `O(p)` + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: Hash + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. + * Extrinsic is weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * Weight: `O(D)` where D is length of proposal. + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: Hash + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId + index: ReferendumIndex +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: ReferendumIndex +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * Weight: `O(S)` where S is the number of seconds a proposal already has. + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * Weight: `O(V + log(V))` where V is number of `existing vetoers` + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: Hash +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of referendums the voter has voted on. + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + value: AccountVoteSplit +} + +export interface AccountVote_Standard { + __kind: 'Standard' + value: AccountVoteStandard +} + +export interface AccountVoteStandard { + vote: Vote + balance: Balance +} + +export type Vote = number + +export interface AccountVoteSplit { + aye: Balance + nay: Balance +} + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +export type ReferendumIndex = number + +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * Add an optional memo to an existing crowdloan contribution. + * + * Origin must be Signed, and the user must have contributed to the crowdloan. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: ParaId + memo: Bytes +} + +/** + * Contribute to a crowd sale. This will transfer some balance over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * Create a new crowdloaning campaign for a parachain slot with the given lease period range. + * + * This applies a lock to your parachain configuration, ensuring that it cannot be changed + * by the parachain manager. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Remove a fund after the retirement period has ended and all funds have been returned. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * Edit the configuration for an in-progress crowdloan. + * + * Can only be called by Root origin. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Poke the fund into NewRaise + * + * Origin must be Signed, and the fund has non-zero raise. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: ParaId +} + +/** + * Automatically refund contributors of an ended crowdloan. + * Due to weight restrictions, this function may need to be called multiple + * times to fully refund all users. We will refund `RemoveKeysLimit` users at a time. + * + * Origin must be signed, but can come from anyone. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * Withdraw full balance of a specific contributor. + * + * Origin must be signed, but can come from anyone. + * + * The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement + * flag must be set. For a fund to be ready for retirement, then: + * - it must not already be in retirement; + * - the amount of raised funds must be bigger than the _free_ balance of the account; + * - and either: + * - the block number must be at least `end`; or + * - the current lease period must be greater than the fund's `last_period`. + * + * In this case, the fund's retirement flag is set and its `end` is reset to the current block + * number. + * + * - `who`: The account whose contribution should be withdrawn. + * - `index`: The parachain to whose crowdloan the contribution was made. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId + index: number +} + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: EcdsaSignature +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Ed25519Signature +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Sr25519Signature +} + +export type Sr25519Signature = Bytes + +export type Ed25519Signature = Bytes + +export type EcdsaSignature = Bytes + +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export type MemberCount = number + +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: BalanceOf + vestingSchedule?: ([BalanceOf, BalanceOf, BlockNumber] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId | undefined) +} + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export type EthereumAddress = Bytes + +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: LookupSource +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: LookupSource + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is malicious + * or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is + * not assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: LookupSource + dest: LookupSource + value: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also decrease the total issuance of the system (`TotalIssuance`). + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + * + * # + * - Independent of the arguments. + * - Contains a limited number of reads and writes. + * --------------------- + * - Base Weight: + * - Creating: 27.56 µs + * - Killing: 35.11 µs + * - DB Weight: 1 Read, 1 Write to `who` + * # + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: LookupSource + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * It will decrease the total issuance of the system by the `TransferFee`. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for + * input config types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional + * check that the transfer will not kill the origin account. + * --------------------------------- + * - Base Weight: 73.64 µs, worst case scenario (account created, account removed) + * - DB Weight: 1 Read and 1 Write to destination account + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: LookupSource + value: bigint +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + * # + * - Cheaper than transfer because account cannot be killed. + * - Base Weight: 51.4 µs + * - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already) + * # + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: LookupSource + value: bigint +} + +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Plan an epoch config change. The epoch config change is recorded and will be enacted on + * the next call to `enact_epoch_change`. The config will be activated one epoch after. + * Multiple calls to this method will replace any existing planned config change that had + * not been enacted yet. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface BabeEquivocationProof { + offender: AuthorityId + slotNumber: SlotNumber + firstHeader: Header + secondHeader: Header +} + +export type SlotNumber = bigint + +export type NextConfigDescriptor = NextConfigDescriptor_V0 | NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V0 { + __kind: 'V0' +} + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + value: NextConfigDescriptorV1 +} + +export interface NextConfigDescriptorV1 { + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +export type AuthorityDiscoveryCall = never + +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Cancel an in-progress auction. + * + * Can only be called by Root origin. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: Key, + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => Key), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_changes_trie_config: sts.enumStruct({ + changesTrieConfig: sts.option(() => ChangesTrieConfiguration), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => KeyValue), + }), + } +}) + +export const KeyValue = sts.tuple(() => [StorageKey, StorageData]) + +export const StorageData = sts.bytes() + +export const StorageKey = sts.bytes() + +export const ChangesTrieConfiguration: sts.Type = sts.struct(() => { + return { + digestInterval: sts.number(), + digestLevels: sts.number(), + } +}) + +export const Key = sts.bytes() + +export const Perbill = sts.number() + +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: LookupSource, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: EraIndex, + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => LookupSource), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => LookupSource), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId, + era: EraIndex, + }), + reap_stash: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: LookupSource, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export const Percent = sts.number() + +export const EraIndex = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: BalanceOf, + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId, + judgement: SocietyJudgement, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: LookupSource, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId, + value: BalanceOf, + tip: BalanceOf, + }), + } +}) + +export const SocietyJudgement: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export const BalanceOf = sts.bigint() + +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: ParaId, + }), + force_lease: sts.enumStruct({ + para: ParaId, + leaser: AccountId, + amount: BalanceOf, + periodBegin: LeasePeriodOf, + periodCount: LeasePeriodOf, + }), + trigger_onboard: sts.enumStruct({ + para: ParaId, + }), + } +}) + +export const LeasePeriodOf = sts.number() + +export const ParaId = sts.number() + +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: Keys, + proof: sts.bytes(), + }), + } +}) + +export const Keys = sts.tuple(() => [AccountId, AccountId, AccountId, AccountId, AccountId, AccountId]) + +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: BlockNumber, + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_138, + }), + schedule_after: sts.enumStruct({ + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_138, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_138, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_138, + }), + } +}) + +export const Priority = sts.number() + +export const Period = sts.tuple(() => [BlockNumber, sts.number()]) + +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + deregister: sts.enumStruct({ + id: ParaId, + }), + force_register: sts.enumStruct({ + who: AccountId, + deposit: BalanceOf, + id: ParaId, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + force_remove_lock: sts.enumStruct({ + para: ParaId, + }), + register: sts.enumStruct({ + id: ParaId, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + reserve: sts.unit(), + swap: sts.enumStruct({ + id: ParaId, + other: ParaId, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId, + call: Type_138, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId, + }), + claim_recovery: sts.enumStruct({ + account: AccountId, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId), + threshold: sts.number(), + delayPeriod: BlockNumber, + }), + initiate_recovery: sts.enumStruct({ + account: AccountId, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + } +}) + +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: AccountId, + proxyType: ProxyType, + delay: BlockNumber, + }), + announce: sts.enumStruct({ + real: AccountId, + callHash: CallHashOf, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + delay: BlockNumber, + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_138, + }), + proxy_announced: sts.enumStruct({ + delegate: AccountId, + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_138, + }), + reject_announcement: sts.enumStruct({ + delegate: AccountId, + callHash: CallHashOf, + }), + remove_announcement: sts.enumStruct({ + real: AccountId, + callHash: CallHashOf, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: AccountId, + proxyType: ProxyType, + delay: BlockNumber, + }), + } +}) + +export const CallHashOf = sts.bytes() + +export const PhragmenElectionCall: sts.Type = sts.closedEnum(() => { + return { + clean_defunct_voters: sts.enumStruct({ + numVoters: sts.number(), + numDefunct: sts.number(), + }), + remove_member: sts.enumStruct({ + who: LookupSource, + hasReplacement: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId), + value: sts.bigint(), + }), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export const ParasUmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasSessionInfoCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasSchedulerCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasInitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: BlockNumber, + }), + } +}) + +export const ParasInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: ParachainsInherentData, + }), + } +}) + +export const ParachainsInherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => SignedAvailabilityBitfield), + backedCandidates: sts.array(() => BackedCandidate), + disputes: sts.array(() => DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: Hash, + number: sts.number(), + stateRoot: Hash, + extrinsicsRoot: Hash, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + AuthoritiesChange: sts.array(() => AuthorityId), + ChangesTrieRoot: Hash, + ChangesTrieSignal: ChangesTrieSignal, + Consensus: Consensus, + Other: sts.bytes(), + PreRuntime: PreRuntime, + RuntimeEnvironmentUpdated: sts.unit(), + Seal: Seal, + SealV0: SealV0, + } +}) + +export const SealV0 = sts.tuple(() => [sts.bigint(), Signature]) + +export const Signature = sts.bytes() + +export const Seal = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const PreRuntime = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const Consensus = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const ConsensusEngineId = sts.bytes() + +export const ChangesTrieSignal: sts.Type = sts.closedEnum(() => { + return { + NewConfiguration: sts.option(() => ChangesTrieConfiguration), + } +}) + +export const AuthorityId = sts.bytes() + +export const DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: SessionIndex, + statements: sts.array(() => sts.tuple(() => [DisputeStatement, ParaValidatorIndex, ValidatorSignature])), + } +}) + +export const ValidatorSignature = sts.bytes() + +export const ParaValidatorIndex = sts.number() + +export const DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: InvalidDisputeStatementKind, + Valid: ValidDisputeStatementKind, + } +}) + +export const ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + BackingSeconded: Hash, + BackingValid: Hash, + Explicit: sts.unit(), + } +}) + +export const InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export const SessionIndex = sts.number() + +export const CandidateHash = sts.bytes() + +export const BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: CommittedCandidateReceipt, + validityVotes: sts.array(() => ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: ValidatorSignature, + Implicit: ValidatorSignature, + Never: sts.unit(), + } +}) + +export const CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: CandidateDescriptor, + commitments: CandidateCommitments, + } +}) + +export const CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => UpwardMessage), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: BlockNumber, + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: sts.number(), + data: sts.bytes(), + } +}) + +export const UpwardMessage = sts.bytes() + +export const CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: ParaId, + relayParent: RelayChainHash, + collatorId: CollatorId, + persistedValidationDataHash: Hash, + povHash: Hash, + erasureRoot: Hash, + signature: CollatorSignature, + paraHead: Hash, + validationCodeHash: ValidationCodeHash, + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const CollatorSignature = sts.bytes() + +export const CollatorId = sts.bytes() + +export const RelayChainHash = sts.bytes() + +export const SignedAvailabilityBitfield: sts.Type = sts.struct(() => { + return { + payload: sts.bitseq(), + validatorIndex: ParaValidatorIndex, + signature: ValidatorSignature, + } +}) + +export const ParasInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasHrmpCall: sts.Type = sts.closedEnum(() => { + return { + force_clean_hrmp: sts.enumStruct({ + para: ParaId, + }), + force_process_hrmp_close: sts.unit(), + force_process_hrmp_open: sts.unit(), + hrmp_accept_open_channel: sts.enumStruct({ + sender: ParaId, + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: ParaId, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: sts.number(), + receiver: sts.number(), + } +}) + +export const ParasDmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + force_note_new_head: sts.enumStruct({ + para: ParaId, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: ParaId, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: ParaId, + newCode: ValidationCode, + expectedAt: BlockNumber, + }), + force_set_current_code: sts.enumStruct({ + para: ParaId, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: ParaId, + newHead: HeadData, + }), + } +}) + +export const ParachainsConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_chain_availability_period: sts.enumStruct({ + new: BlockNumber, + }), + set_code_retention_period: sts.enumStruct({ + new: BlockNumber, + }), + set_dispute_conclusion_by_time_out_period: sts.enumStruct({ + new: BlockNumber, + }), + set_dispute_max_spam_slots: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: SessionIndex, + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: BlockNumber, + }), + set_group_rotation_frequency: sts.enumStruct({ + new: BlockNumber, + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: Balance, + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: Balance, + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_cores: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_retries: sts.enumStruct({ + new: sts.number(), + }), + set_preferred_dispatchable_upward_messages_step_weight: sts.enumStruct({ + new: Weight, + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_thread_availability_period: sts.enumStruct({ + new: BlockNumber, + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: BlockNumber, + }), + set_validation_upgrade_frequency: sts.enumStruct({ + new: BlockNumber, + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +export const OffencesCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + call: OpaqueCall, + storeCall: sts.boolean(), + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId), + call: Type_138, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const OpaqueCall = sts.bytes() + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: BlockNumber, + index: sts.number(), + } +}) + +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: AccountIndex, + }), + force_transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: AccountIndex, + }), + freeze: sts.enumStruct({ + index: AccountIndex, + }), + transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + }), + } +}) + +export const AccountIndex = sts.number() + +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: Signature, + }), + } +}) + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: BlockNumber, + networkState: OpaqueNetworkState, + sessionIndex: SessionIndex, + authorityIndex: AuthIndex, + validatorsLen: sts.number(), + } +}) + +export const AuthIndex = sts.number() + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId, + }), + add_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: RegistrarIndex, + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: LookupSource, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: LookupSource, + judgement: IdentityJudgement, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: LookupSource, + }), + rename_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: sts.bigint(), + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => IdentityInfoAdditional), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => H160), + image: Data, + twitter: Data, + } +}) + +export const IdentityInfoAdditional = sts.tuple(() => [Data, Data]) + +export const IdentityJudgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: Balance, + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export const RegistrarIndex = sts.number() + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: H256, + Keccak256: H256, + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: H256, + ShaThree256: H256, + } +}) + +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: BlockNumber, + bestFinalizedBlockNumber: BlockNumber, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const KeyOwnerProof: sts.Type = sts.struct(() => { + return { + session: SessionIndex, + trieNodes: sts.array(() => sts.bytes()), + validatorCount: ValidatorCount, + } +}) + +export const ValidatorCount = sts.number() + +export const GrandpaEquivocationProof: sts.Type = sts.struct(() => { + return { + setId: SetId, + equivocation: GrandpaEquivocation, + } +}) + +export const GrandpaEquivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: GrandpaEquivocationValue, + Prevote: GrandpaEquivocationValue, + } +}) + +export const GrandpaEquivocationValue: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: AuthorityId, + first: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + second: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + } +}) + +export const AuthoritySignature = sts.bytes() + +export const GrandpaPrevote: sts.Type = sts.struct(() => { + return { + targetHash: Hash, + targetNumber: BlockNumber, + } +}) + +export const SetId = sts.bigint() + +export const GiltCall: sts.Type = sts.closedEnum(() => { + return { + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + set_target: sts.enumStruct({ + target: sts.bigint(), + }), + thaw: sts.enumStruct({ + index: sts.number(), + }), + } +}) + +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + submit_unsigned: sts.enumStruct({ + solution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export const RawSolution: sts.Type = sts.struct(() => { + return { + compact: CompactAssignmentsWith24, + score: ElectionScore, + round: sts.number(), + } +}) + +export const ElectionScore = sts.array(() => sts.bigint()) + +export const CompactAssignmentsWith24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [NominatorIndexCompact, ValidatorIndexCompact])), + votes2: sts.array(() => sts.tuple(() => [NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact])), + votes3: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes4: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes5: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes6: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes7: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes8: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes9: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes10: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes11: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes12: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes13: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes14: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes15: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes16: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes17: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes18: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes19: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes20: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes21: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes22: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes23: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes24: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + } +}) + +export const CompactScoreCompact = sts.tuple(() => [ValidatorIndexCompact, OffchainAccuracyCompact]) + +export const OffchainAccuracyCompact = sts.number() + +export const ValidatorIndexCompact = sts.number() + +export const NominatorIndexCompact = sts.number() + +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + blacklist: sts.enumStruct({ + proposalHash: Hash, + maybeRefIndex: sts.option(() => ReferendumIndex), + }), + cancel_proposal: sts.enumStruct({ + propIndex: sts.number(), + }), + cancel_queued: sts.enumStruct({ + which: ReferendumIndex, + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId, + conviction: Conviction, + balance: BalanceOf, + }), + emergency_cancel: sts.enumStruct({ + refIndex: ReferendumIndex, + }), + enact_proposal: sts.enumStruct({ + proposalHash: Hash, + index: ReferendumIndex, + }), + external_propose: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_default: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: Hash, + }), + fast_track: sts.enumStruct({ + proposalHash: Hash, + votingPeriod: BlockNumber, + delay: BlockNumber, + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: Hash, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: Hash, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId, + index: ReferendumIndex, + }), + remove_vote: sts.enumStruct({ + index: ReferendumIndex, + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId, + }), + veto_external: sts.enumStruct({ + proposalHash: Hash, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: AccountVoteSplit, + Standard: AccountVoteStandard, + } +}) + +export const AccountVoteStandard: sts.Type = sts.struct(() => { + return { + vote: Vote, + balance: Balance, + } +}) + +export const Vote = sts.number() + +export const AccountVoteSplit: sts.Type = sts.struct(() => { + return { + aye: Balance, + nay: Balance, + } +}) + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export const ReferendumIndex = sts.number() + +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: ParaId, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: ParaId, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: EcdsaSignature, + Ed25519: Ed25519Signature, + Sr25519: Sr25519Signature, + } +}) + +export const Sr25519Signature = sts.bytes() + +export const Ed25519Signature = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: BalanceOf, + vestingSchedule: sts.option(() => sts.tuple(() => [BalanceOf, BalanceOf, BlockNumber])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export const EthereumAddress = sts.bytes() + +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: LookupSource, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: LookupSource, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: LookupSource, + dest: LookupSource, + value: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: LookupSource, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + } +}) + +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const BabeEquivocationProof: sts.Type = sts.struct(() => { + return { + offender: AuthorityId, + slotNumber: SlotNumber, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const SlotNumber = sts.bigint() + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V0: sts.unit(), + V1: NextConfigDescriptorV1, + } +}) + +export const NextConfigDescriptorV1: sts.Type = sts.struct(() => { + return { + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +export const AuthorityDiscoveryCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +export type Type_138 = Type_138_Auctions | Type_138_AuthorityDiscovery | Type_138_Authorship | Type_138_Babe | Type_138_Balances | Type_138_Bounties | Type_138_Claims | Type_138_Council | Type_138_Crowdloan | Type_138_Democracy | Type_138_ElectionProviderMultiPhase | Type_138_Gilt | Type_138_Grandpa | Type_138_Identity | Type_138_ImOnline | Type_138_Indices | Type_138_Multisig | Type_138_Offences | Type_138_ParachainsConfiguration | Type_138_Paras | Type_138_ParasDmp | Type_138_ParasHrmp | Type_138_ParasInclusion | Type_138_ParasInherent | Type_138_ParasInitializer | Type_138_ParasScheduler | Type_138_ParasSessionInfo | Type_138_ParasShared | Type_138_ParasUmp | Type_138_PhragmenElection | Type_138_Proxy | Type_138_Recovery | Type_138_Registrar | Type_138_Scheduler | Type_138_Session | Type_138_Slots | Type_138_Society | Type_138_Staking | Type_138_System | Type_138_TechnicalCommittee | Type_138_TechnicalMembership | Type_138_Timestamp | Type_138_Tips | Type_138_Treasury | Type_138_Utility | Type_138_Vesting | Type_138_XcmPallet + +export interface Type_138_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Type_138_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Type_138_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Type_138_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Type_138_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Type_138_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Type_138_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Type_138_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Type_138_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Type_138_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Type_138_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Type_138_Gilt { + __kind: 'Gilt' + value: GiltCall +} + +export interface Type_138_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Type_138_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Type_138_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Type_138_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Type_138_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Type_138_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Type_138_ParachainsConfiguration { + __kind: 'ParachainsConfiguration' + value: ParachainsConfigurationCall +} + +export interface Type_138_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Type_138_ParasDmp { + __kind: 'ParasDmp' + value: ParasDmpCall +} + +export interface Type_138_ParasHrmp { + __kind: 'ParasHrmp' + value: ParasHrmpCall +} + +export interface Type_138_ParasInclusion { + __kind: 'ParasInclusion' + value: ParasInclusionCall +} + +export interface Type_138_ParasInherent { + __kind: 'ParasInherent' + value: ParasInherentCall +} + +export interface Type_138_ParasInitializer { + __kind: 'ParasInitializer' + value: ParasInitializerCall +} + +export interface Type_138_ParasScheduler { + __kind: 'ParasScheduler' + value: ParasSchedulerCall +} + +export interface Type_138_ParasSessionInfo { + __kind: 'ParasSessionInfo' + value: ParasSessionInfoCall +} + +export interface Type_138_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Type_138_ParasUmp { + __kind: 'ParasUmp' + value: ParasUmpCall +} + +export interface Type_138_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Type_138_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Type_138_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Type_138_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Type_138_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Type_138_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Type_138_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Type_138_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Type_138_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Type_138_System { + __kind: 'System' + value: SystemCall +} + +export interface Type_138_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Type_138_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Type_138_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Type_138_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Type_138_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Type_138_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Type_138_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Type_138_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId = sts.bytes() diff --git a/squid/src/types/v9030.ts b/squid/src/types/v9030.ts new file mode 100644 index 00000000..5bd1a193 --- /dev/null +++ b/squid/src/types/v9030.ts @@ -0,0 +1,9398 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Type_138: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + Gilt: GiltCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + ParachainsConfiguration: ParachainsConfigurationCall, + Paras: ParasCall, + ParasDmp: ParasDmpCall, + ParasHrmp: ParasHrmpCall, + ParasInclusion: ParasInclusionCall, + ParasInherent: ParasInherentCall, + ParasInitializer: ParasInitializerCall, + ParasScheduler: ParasSchedulerCall, + ParasSessionInfo: ParasSessionInfoCall, + ParasShared: ParasSharedCall, + ParasUmp: ParasUmpCall, + PhragmenElection: PhragmenElectionCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + XcmPallet: XcmPalletCall, + } +}) + +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + execute: sts.enumStruct({ + message: Xcm, + maxWeight: Weight, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: MultiLocation, + beneficiary: MultiLocation, + assets: sts.array(() => MultiAsset), + destWeight: Weight, + }), + send: sts.enumStruct({ + dest: MultiLocation, + message: Xcm, + }), + teleport_assets: sts.enumStruct({ + dest: MultiLocation, + beneficiary: MultiLocation, + assets: sts.array(() => MultiAsset), + destWeight: Weight, + }), + } +}) + +export const MultiAsset: sts.Type = sts.closedEnum(() => { + return { + AbstractFungible: sts.enumStruct({ + id: sts.bytes(), + instance: sts.bigint(), + }), + AbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + instance: AssetInstanceV0, + }), + All: sts.unit(), + AllAbstractFungible: sts.bytes(), + AllAbstractNonFungible: sts.bytes(), + AllConcreteFungible: MultiLocationV0, + AllConcreteNonFungible: MultiLocationV0, + AllFungible: sts.unit(), + AllNonFungible: sts.unit(), + ConcreteFungible: sts.enumStruct({ + id: MultiLocationV0, + amount: sts.bigint(), + }), + ConcreteNonFungible: sts.enumStruct({ + class: MultiLocationV0, + instance: AssetInstanceV0, + }), + None: sts.unit(), + } +}) + +export const MultiLocationV0: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: JunctionV0, + X2: sts.tuple(() => [JunctionV0, JunctionV0]), + X3: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0]), + X4: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X5: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X6: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X7: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X8: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + } +}) + +export const JunctionV0: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: NetworkId, + id: AccountId, + }), + AccountIndex64: sts.enumStruct({ + network: NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.bytes(), + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Parent: sts.unit(), + Plurality: sts.enumStruct({ + id: BodyId, + part: BodyPart, + }), + } +}) + +export const BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.number(), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export type BodyPart = BodyPart_AtLeastProportion | BodyPart_Fraction | BodyPart_Members | BodyPart_MoreThanProportion | BodyPart_Voice + +export interface BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface BodyPart_Members { + __kind: 'Members' + value: number +} + +export interface BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface BodyPart_Voice { + __kind: 'Voice' +} + +export const BodyId: sts.Type = sts.closedEnum(() => { + return { + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: sts.bytes(), + Technical: sts.unit(), + Unit: sts.unit(), + } +}) + +export type BodyId = BodyId_Executive | BodyId_Index | BodyId_Judicial | BodyId_Legislative | BodyId_Named | BodyId_Technical | BodyId_Unit + +export interface BodyId_Executive { + __kind: 'Executive' +} + +export interface BodyId_Index { + __kind: 'Index' + value: number +} + +export interface BodyId_Judicial { + __kind: 'Judicial' +} + +export interface BodyId_Legislative { + __kind: 'Legislative' +} + +export interface BodyId_Named { + __kind: 'Named' + value: Bytes +} + +export interface BodyId_Technical { + __kind: 'Technical' +} + +export interface BodyId_Unit { + __kind: 'Unit' +} + +export const NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: sts.bytes(), + Polkadot: sts.unit(), + } +}) + +export type NetworkId = NetworkId_Any | NetworkId_Kusama | NetworkId_Named | NetworkId_Polkadot + +export interface NetworkId_Any { + __kind: 'Any' +} + +export interface NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface NetworkId_Named { + __kind: 'Named' + value: Bytes +} + +export interface NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export type JunctionV0 = JunctionV0_AccountId32 | JunctionV0_AccountIndex64 | JunctionV0_AccountKey20 | JunctionV0_GeneralIndex | JunctionV0_GeneralKey | JunctionV0_OnlyChild | JunctionV0_PalletInstance | JunctionV0_Parachain | JunctionV0_Parent | JunctionV0_Plurality + +export interface JunctionV0_AccountId32 { + __kind: 'AccountId32' + network: NetworkId + id: AccountId +} + +export interface JunctionV0_AccountIndex64 { + __kind: 'AccountIndex64' + network: NetworkId + index: bigint +} + +export interface JunctionV0_AccountKey20 { + __kind: 'AccountKey20' + network: NetworkId + key: Bytes +} + +export interface JunctionV0_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface JunctionV0_GeneralKey { + __kind: 'GeneralKey' + value: Bytes +} + +export interface JunctionV0_OnlyChild { + __kind: 'OnlyChild' +} + +export interface JunctionV0_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface JunctionV0_Parachain { + __kind: 'Parachain' + value: number +} + +export interface JunctionV0_Parent { + __kind: 'Parent' +} + +export interface JunctionV0_Plurality { + __kind: 'Plurality' + id: BodyId + part: BodyPart +} + +export type AccountId = Bytes + +export type MultiLocationV0 = MultiLocationV0_Here | MultiLocationV0_X1 | MultiLocationV0_X2 | MultiLocationV0_X3 | MultiLocationV0_X4 | MultiLocationV0_X5 | MultiLocationV0_X6 | MultiLocationV0_X7 | MultiLocationV0_X8 + +export interface MultiLocationV0_Here { + __kind: 'Here' +} + +export interface MultiLocationV0_X1 { + __kind: 'X1' + value: JunctionV0 +} + +export interface MultiLocationV0_X2 { + __kind: 'X2' + value: [JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X3 { + __kind: 'X3' + value: [JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X4 { + __kind: 'X4' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X5 { + __kind: 'X5' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X6 { + __kind: 'X6' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X7 { + __kind: 'X7' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X8 { + __kind: 'X8' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export const AssetInstanceV0: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index128: sts.bigint(), + Index16: sts.number(), + Index32: sts.number(), + Index64: sts.bigint(), + Index8: sts.number(), + Undefined: sts.unit(), + } +}) + +export type AssetInstanceV0 = AssetInstanceV0_Array16 | AssetInstanceV0_Array32 | AssetInstanceV0_Array4 | AssetInstanceV0_Array8 | AssetInstanceV0_Blob | AssetInstanceV0_Index128 | AssetInstanceV0_Index16 | AssetInstanceV0_Index32 | AssetInstanceV0_Index64 | AssetInstanceV0_Index8 | AssetInstanceV0_Undefined + +export interface AssetInstanceV0_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface AssetInstanceV0_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface AssetInstanceV0_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface AssetInstanceV0_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface AssetInstanceV0_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface AssetInstanceV0_Index128 { + __kind: 'Index128' + value: bigint +} + +export interface AssetInstanceV0_Index16 { + __kind: 'Index16' + value: number +} + +export interface AssetInstanceV0_Index32 { + __kind: 'Index32' + value: number +} + +export interface AssetInstanceV0_Index64 { + __kind: 'Index64' + value: bigint +} + +export interface AssetInstanceV0_Index8 { + __kind: 'Index8' + value: number +} + +export interface AssetInstanceV0_Undefined { + __kind: 'Undefined' +} + +export type MultiAsset = MultiAsset_AbstractFungible | MultiAsset_AbstractNonFungible | MultiAsset_All | MultiAsset_AllAbstractFungible | MultiAsset_AllAbstractNonFungible | MultiAsset_AllConcreteFungible | MultiAsset_AllConcreteNonFungible | MultiAsset_AllFungible | MultiAsset_AllNonFungible | MultiAsset_ConcreteFungible | MultiAsset_ConcreteNonFungible | MultiAsset_None + +export interface MultiAsset_AbstractFungible { + __kind: 'AbstractFungible' + id: Bytes + instance: bigint +} + +export interface MultiAsset_AbstractNonFungible { + __kind: 'AbstractNonFungible' + class: Bytes + instance: AssetInstanceV0 +} + +export interface MultiAsset_All { + __kind: 'All' +} + +export interface MultiAsset_AllAbstractFungible { + __kind: 'AllAbstractFungible' + value: Bytes +} + +export interface MultiAsset_AllAbstractNonFungible { + __kind: 'AllAbstractNonFungible' + value: Bytes +} + +export interface MultiAsset_AllConcreteFungible { + __kind: 'AllConcreteFungible' + value: MultiLocationV0 +} + +export interface MultiAsset_AllConcreteNonFungible { + __kind: 'AllConcreteNonFungible' + value: MultiLocationV0 +} + +export interface MultiAsset_AllFungible { + __kind: 'AllFungible' +} + +export interface MultiAsset_AllNonFungible { + __kind: 'AllNonFungible' +} + +export interface MultiAsset_ConcreteFungible { + __kind: 'ConcreteFungible' + id: MultiLocationV0 + amount: bigint +} + +export interface MultiAsset_ConcreteNonFungible { + __kind: 'ConcreteNonFungible' + class: MultiLocationV0 + instance: AssetInstanceV0 +} + +export interface MultiAsset_None { + __kind: 'None' +} + +export const MultiLocation: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: JunctionV0, + X2: sts.tuple(() => [JunctionV0, JunctionV0]), + X3: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0]), + X4: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X5: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X6: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X7: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X8: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + } +}) + +export type MultiLocation = MultiLocation_Here | MultiLocation_X1 | MultiLocation_X2 | MultiLocation_X3 | MultiLocation_X4 | MultiLocation_X5 | MultiLocation_X6 | MultiLocation_X7 | MultiLocation_X8 + +export interface MultiLocation_Here { + __kind: 'Here' +} + +export interface MultiLocation_X1 { + __kind: 'X1' + value: JunctionV0 +} + +export interface MultiLocation_X2 { + __kind: 'X2' + value: [JunctionV0, JunctionV0] +} + +export interface MultiLocation_X3 { + __kind: 'X3' + value: [JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocation_X4 { + __kind: 'X4' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocation_X5 { + __kind: 'X5' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocation_X6 { + __kind: 'X6' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocation_X7 { + __kind: 'X7' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocation_X8 { + __kind: 'X8' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export const Weight = sts.bigint() + +export const Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: ResponseV0, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + RelayedFrom: sts.enumStruct({ + who: MultiLocationV0, + message: XcmV0, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + Transact: sts.enumStruct({ + originType: XcmOriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncodedCall, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + } +}) + +export const DoubleEncodedCall: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncodedCall { + encoded: Bytes +} + +export const XcmOriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type XcmOriginKind = XcmOriginKind_Native | XcmOriginKind_SovereignAccount | XcmOriginKind_Superuser | XcmOriginKind_Xcm + +export interface XcmOriginKind_Native { + __kind: 'Native' +} + +export interface XcmOriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface XcmOriginKind_Superuser { + __kind: 'Superuser' +} + +export interface XcmOriginKind_Xcm { + __kind: 'Xcm' +} + +export const XcmV0: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: ResponseV0, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + RelayedFrom: sts.enumStruct({ + who: MultiLocationV0, + message: XcmV0, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + Transact: sts.enumStruct({ + originType: XcmOriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncodedCall, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + } +}) + +export type XcmV0 = XcmV0_HrmpChannelAccepted | XcmV0_HrmpChannelClosing | XcmV0_HrmpNewChannelOpenRequest | XcmV0_QueryResponse | XcmV0_ReceiveTeleportedAsset | XcmV0_RelayedFrom | XcmV0_ReserveAssetDeposit | XcmV0_Transact | XcmV0_TransferAsset | XcmV0_TransferReserveAsset | XcmV0_WithdrawAsset + +export interface XcmV0_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface XcmV0_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface XcmV0_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface XcmV0_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: ResponseV0 +} + +export interface XcmV0_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export interface XcmV0_RelayedFrom { + __kind: 'RelayedFrom' + who: MultiLocationV0 + message: XcmV0 +} + +export interface XcmV0_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export interface XcmV0_Transact { + __kind: 'Transact' + originType: XcmOriginKind + requireWeightAtMost: bigint + call: DoubleEncodedCall +} + +export interface XcmV0_TransferAsset { + __kind: 'TransferAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 +} + +export interface XcmV0_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface XcmV0_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export type XcmOrderV0 = XcmOrderV0_BuyExecution | XcmOrderV0_DepositAsset | XcmOrderV0_DepositReserveAsset | XcmOrderV0_ExchangeAsset | XcmOrderV0_InitiateReserveWithdraw | XcmOrderV0_InitiateTeleport | XcmOrderV0_Null | XcmOrderV0_QueryHolding + +export interface XcmOrderV0_BuyExecution { + __kind: 'BuyExecution' + fees: MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: XcmV0[] +} + +export interface XcmOrderV0_DepositAsset { + __kind: 'DepositAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 +} + +export interface XcmOrderV0_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface XcmOrderV0_ExchangeAsset { + __kind: 'ExchangeAsset' + give: MultiAssetV0[] + receive: MultiAssetV0[] +} + +export interface XcmOrderV0_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: MultiAssetV0[] + reserve: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface XcmOrderV0_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: MultiAsset[] + dest: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface XcmOrderV0_Null { + __kind: 'Null' +} + +export interface XcmOrderV0_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: MultiLocationV0 + assets: MultiAssetV0[] +} + +export type MultiAssetV0 = MultiAssetV0_AbstractFungible | MultiAssetV0_AbstractNonFungible | MultiAssetV0_All | MultiAssetV0_AllAbstractFungible | MultiAssetV0_AllAbstractNonFungible | MultiAssetV0_AllConcreteFungible | MultiAssetV0_AllConcreteNonFungible | MultiAssetV0_AllFungible | MultiAssetV0_AllNonFungible | MultiAssetV0_ConcreteFungible | MultiAssetV0_ConcreteNonFungible | MultiAssetV0_None + +export interface MultiAssetV0_AbstractFungible { + __kind: 'AbstractFungible' + id: Bytes + instance: bigint +} + +export interface MultiAssetV0_AbstractNonFungible { + __kind: 'AbstractNonFungible' + class: Bytes + instance: AssetInstanceV0 +} + +export interface MultiAssetV0_All { + __kind: 'All' +} + +export interface MultiAssetV0_AllAbstractFungible { + __kind: 'AllAbstractFungible' + value: Bytes +} + +export interface MultiAssetV0_AllAbstractNonFungible { + __kind: 'AllAbstractNonFungible' + value: Bytes +} + +export interface MultiAssetV0_AllConcreteFungible { + __kind: 'AllConcreteFungible' + value: MultiLocationV0 +} + +export interface MultiAssetV0_AllConcreteNonFungible { + __kind: 'AllConcreteNonFungible' + value: MultiLocationV0 +} + +export interface MultiAssetV0_AllFungible { + __kind: 'AllFungible' +} + +export interface MultiAssetV0_AllNonFungible { + __kind: 'AllNonFungible' +} + +export interface MultiAssetV0_ConcreteFungible { + __kind: 'ConcreteFungible' + id: MultiLocationV0 + amount: bigint +} + +export interface MultiAssetV0_ConcreteNonFungible { + __kind: 'ConcreteNonFungible' + class: MultiLocationV0 + instance: AssetInstanceV0 +} + +export interface MultiAssetV0_None { + __kind: 'None' +} + +export type ResponseV0 = ResponseV0_Assets + +export interface ResponseV0_Assets { + __kind: 'Assets' + value: MultiAssetV0[] +} + +export const XcmOrderV0: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => XcmV0), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => MultiAssetV0), + receive: sts.array(() => MultiAssetV0), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + reserve: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => MultiAsset), + dest: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: MultiLocationV0, + assets: sts.array(() => MultiAssetV0), + }), + } +}) + +export const MultiAssetV0: sts.Type = sts.closedEnum(() => { + return { + AbstractFungible: sts.enumStruct({ + id: sts.bytes(), + instance: sts.bigint(), + }), + AbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + instance: AssetInstanceV0, + }), + All: sts.unit(), + AllAbstractFungible: sts.bytes(), + AllAbstractNonFungible: sts.bytes(), + AllConcreteFungible: MultiLocationV0, + AllConcreteNonFungible: MultiLocationV0, + AllFungible: sts.unit(), + AllNonFungible: sts.unit(), + ConcreteFungible: sts.enumStruct({ + id: MultiLocationV0, + amount: sts.bigint(), + }), + ConcreteNonFungible: sts.enumStruct({ + class: MultiLocationV0, + instance: AssetInstanceV0, + }), + None: sts.unit(), + } +}) + +export const ResponseV0: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => MultiAssetV0), + } +}) + +export type Xcm = Xcm_HrmpChannelAccepted | Xcm_HrmpChannelClosing | Xcm_HrmpNewChannelOpenRequest | Xcm_QueryResponse | Xcm_ReceiveTeleportedAsset | Xcm_RelayedFrom | Xcm_ReserveAssetDeposit | Xcm_Transact | Xcm_TransferAsset | Xcm_TransferReserveAsset | Xcm_WithdrawAsset + +export interface Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: ResponseV0 +} + +export interface Xcm_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export interface Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: MultiLocationV0 + message: XcmV0 +} + +export interface Xcm_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export interface Xcm_Transact { + __kind: 'Transact' + originType: XcmOriginKind + requireWeightAtMost: bigint + call: DoubleEncodedCall +} + +export interface Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 +} + +export interface Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export type XcmPalletCall = XcmPalletCall_execute | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets + +/** + * Execute an XCM message from a local, signed, origin. + * + * An event is deposited indicating whether `msg` could be executed completely or only + * partially. + * + * No more than `max_weight` will be used in its attempted execution. If this is less than the + * maximum amount of weight that the message could take to be executed, then no execution + * attempt will be made. + * + * NOTE: A successful return to this does *not* imply that the `msg` was executed successfully + * to completion; only that *some* of it was executed. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Xcm + maxWeight: Weight +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination chain and forward + * a notification XCM. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `dest_weight`: Equal to the total weight on `dest` of the XCM message + * `ReserveAssetDeposit { assets, effects: [ BuyExecution{..}, DepositAsset{..} ] }`. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: MultiLocation + beneficiary: MultiLocation + assets: MultiAsset[] + destWeight: Weight +} + +export interface XcmPalletCall_send { + __kind: 'send' + dest: MultiLocation + message: Xcm +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `dest_weight`: Equal to the total weight on `dest` of the XCM message + * `Teleport { assets, effects: [ BuyExecution{..}, DepositAsset{..} ] }`. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: MultiLocation + beneficiary: MultiLocation + assets: MultiAsset[] + destWeight: Weight +} + +export type Weight = bigint + +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: LookupSource, + target: LookupSource, + schedule: VestingInfo, + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: LookupSource, + }), + vested_transfer: sts.enumStruct({ + target: LookupSource, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: Balance, + perBlock: Balance, + startingBlock: BlockNumber, + } +}) + +export const BlockNumber = sts.number() + +export const Balance = sts.bigint() + +export interface VestingInfo { + locked: Balance + perBlock: Balance + startingBlock: BlockNumber +} + +export type BlockNumber = number + +export type Balance = bigint + +export const LookupSource: sts.Type = sts.closedEnum(() => { + return { + Address20: H160, + Address32: H256, + Id: AccountId, + Index: sts.number(), + Raw: sts.bytes(), + } +}) + +export const H256 = sts.bytes() + +export const H160 = sts.bytes() + +export type LookupSource = LookupSource_Address20 | LookupSource_Address32 | LookupSource_Id | LookupSource_Index | LookupSource_Raw + +export interface LookupSource_Address20 { + __kind: 'Address20' + value: H160 +} + +export interface LookupSource_Address32 { + __kind: 'Address32' + value: H256 +} + +export interface LookupSource_Id { + __kind: 'Id' + value: AccountId +} + +export interface LookupSource_Index { + __kind: 'Index' + value: number +} + +export interface LookupSource_Raw { + __kind: 'Raw' + value: Bytes +} + +export type H256 = Bytes + +export type H160 = Bytes + +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: LookupSource + target: LookupSource + schedule: VestingInfo +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: LookupSource +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: LookupSource + schedule: VestingInfo +} + +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Type_138, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Type_138), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Type_138), + }), + } +}) + +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Type_138 +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Type_138[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Type_138[] +} + +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: LookupSource, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + } +}) + +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: LookupSource +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +export const TipsCall: sts.Type = sts.closedEnum(() => { + return { + close_tip: sts.enumStruct({ + hash: Hash, + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + }), + retract_tip: sts.enumStruct({ + hash: Hash, + }), + slash_tip: sts.enumStruct({ + hash: Hash, + }), + tip: sts.enumStruct({ + hash: Hash, + tipValue: sts.bigint(), + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + tipValue: sts.bigint(), + }), + } +}) + +export const Hash = sts.bytes() + +export type TipsCall = TipsCall_close_tip | TipsCall_report_awesome | TipsCall_retract_tip | TipsCall_slash_tip | TipsCall_tip | TipsCall_tip_new + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`. + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TipsCall_close_tip { + __kind: 'close_tip' + hash: Hash +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TipsCall_retract_tip { + __kind: 'retract_tip' + hash: Hash +} + +/** + * Remove and slash an already-open tip. + * + * May only be called from `T::RejectOrigin`. + * + * As a result, the finder is slashed and the deposits are lost. + * + * Emits `TipSlashed` if successful. + * + * # + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * # + */ +export interface TipsCall_slash_tip { + __kind: 'slash_tip' + hash: Hash +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`, insert tip and check closing, + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TipsCall_tip { + __kind: 'tip' + hash: Hash + tipValue: bigint +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T` + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId + tipValue: bigint +} + +export type Hash = Bytes + +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId, + }), + change_key: sts.enumStruct({ + new: AccountId, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId), + }), + set_prime: sts.enumStruct({ + who: AccountId, + }), + swap_member: sts.enumStruct({ + remove: AccountId, + add: AccountId, + }), + } +}) + +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId + add: AccountId +} + +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const MemberCount = sts.number() + +export const Proposal: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + Gilt: GiltCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + ParachainsConfiguration: ParachainsConfigurationCall, + Paras: ParasCall, + ParasDmp: ParasDmpCall, + ParasHrmp: ParasHrmpCall, + ParasInclusion: ParasInclusionCall, + ParasInherent: ParasInherentCall, + ParasInitializer: ParasInitializerCall, + ParasScheduler: ParasSchedulerCall, + ParasSessionInfo: ParasSessionInfoCall, + ParasShared: ParasSharedCall, + ParasUmp: ParasUmpCall, + PhragmenElection: PhragmenElectionCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + XcmPallet: XcmPalletCall, + } +}) + +export type Proposal = Proposal_Auctions | Proposal_AuthorityDiscovery | Proposal_Authorship | Proposal_Babe | Proposal_Balances | Proposal_Bounties | Proposal_Claims | Proposal_Council | Proposal_Crowdloan | Proposal_Democracy | Proposal_ElectionProviderMultiPhase | Proposal_Gilt | Proposal_Grandpa | Proposal_Identity | Proposal_ImOnline | Proposal_Indices | Proposal_Multisig | Proposal_Offences | Proposal_ParachainsConfiguration | Proposal_Paras | Proposal_ParasDmp | Proposal_ParasHrmp | Proposal_ParasInclusion | Proposal_ParasInherent | Proposal_ParasInitializer | Proposal_ParasScheduler | Proposal_ParasSessionInfo | Proposal_ParasShared | Proposal_ParasUmp | Proposal_PhragmenElection | Proposal_Proxy | Proposal_Recovery | Proposal_Registrar | Proposal_Scheduler | Proposal_Session | Proposal_Slots | Proposal_Society | Proposal_Staking | Proposal_System | Proposal_TechnicalCommittee | Proposal_TechnicalMembership | Proposal_Timestamp | Proposal_Tips | Proposal_Treasury | Proposal_Utility | Proposal_Vesting | Proposal_XcmPallet + +export interface Proposal_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Proposal_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Proposal_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Proposal_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Proposal_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Proposal_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Proposal_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Proposal_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Proposal_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Proposal_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Proposal_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Proposal_Gilt { + __kind: 'Gilt' + value: GiltCall +} + +export interface Proposal_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Proposal_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Proposal_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Proposal_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Proposal_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Proposal_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Proposal_ParachainsConfiguration { + __kind: 'ParachainsConfiguration' + value: ParachainsConfigurationCall +} + +export interface Proposal_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Proposal_ParasDmp { + __kind: 'ParasDmp' + value: ParasDmpCall +} + +export interface Proposal_ParasHrmp { + __kind: 'ParasHrmp' + value: ParasHrmpCall +} + +export interface Proposal_ParasInclusion { + __kind: 'ParasInclusion' + value: ParasInclusionCall +} + +export interface Proposal_ParasInherent { + __kind: 'ParasInherent' + value: ParasInherentCall +} + +export interface Proposal_ParasInitializer { + __kind: 'ParasInitializer' + value: ParasInitializerCall +} + +export interface Proposal_ParasScheduler { + __kind: 'ParasScheduler' + value: ParasSchedulerCall +} + +export interface Proposal_ParasSessionInfo { + __kind: 'ParasSessionInfo' + value: ParasSessionInfoCall +} + +export interface Proposal_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Proposal_ParasUmp { + __kind: 'ParasUmp' + value: ParasUmpCall +} + +export interface Proposal_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Proposal_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Proposal_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Proposal_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Proposal_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Proposal_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Proposal_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Proposal_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Proposal_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Proposal_System { + __kind: 'System' + value: SystemCall +} + +export interface Proposal_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Proposal_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Proposal_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Proposal_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Proposal_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Proposal_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Proposal_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Proposal_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_changes_trie_config | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + * + * # + * - `O(P)` where `P` amount of keys with prefix `prefix` + * - `P` storage deletions. + * - Base Weight: 0.834 * P µs + * - Writes: Number of subkeys + 1 + * # + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Key + subkeys: number +} + +/** + * Kill some items from storage. + * + * # + * - `O(IK)` where `I` length of `keys` and `K` length of one key + * - `I` storage deletions. + * - Base Weight: .378 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Key[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Make some on-chain remark and emit event. + * + * # + * - `O(b)` where b is the length of the remark. + * - 1 event. + * # + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * Set the new changes trie configuration. + * + * # + * - `O(1)` + * - 1 storage write or delete (codec `O(1)`). + * - 1 call to `deposit_log`: Uses `append` API, so O(1) + * - Base Weight: 7.218 µs + * - DB Weight: + * - Writes: Changes Trie, System Digest + * # + */ +export interface SystemCall_set_changes_trie_config { + __kind: 'set_changes_trie_config' + changesTrieConfig?: (ChangesTrieConfiguration | undefined) +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 storage write (codec `O(C)`). + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is expensive). + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very expensive. + * We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + * + * # + * - `O(1)` + * - 1 storage write. + * - Base Weight: 1.405 µs + * - 1 write to HEAP_PAGES + * # + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + * + * # + * - `O(I)` where `I` length of `items` + * - `I` storage writes (`O(1)`). + * - Base Weight: 0.568 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: KeyValue[] +} + +export type KeyValue = [StorageKey, StorageData] + +export type StorageData = Bytes + +export type StorageKey = Bytes + +export interface ChangesTrieConfiguration { + digestInterval: number + digestLevels: number +} + +export type Key = Bytes + +export type Perbill = number + +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger, [Origin Account], Current Era, History Depth, Locks + * - Write: Bonded, Payee, [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: LookupSource + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount + * that can be added. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller and + * it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * - One DB entry. + * ------------ + * DB Weight: + * - Read: Era Election Status, Bonded, Ledger, [Origin Account], Locks + * - Write: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + * + * # + * Complexity: O(U + S) + * with U unapplied slashes weighted with U=1000 + * and S is the number of slash indices to be canceled. + * - Read: Unapplied Slashes + * - Write: Unapplied Slashes + * # + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: EraIndex + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * -------- + * Weight: O(1) + * DB Weight: + * - Read: EraElectionStatus, Ledger + * - Write: Validators, Nominators + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + * + * # + * O(S) where S is the number of slashing spans to be removed + * Reads: Bonded, Slashing Spans, Account, Locks + * Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Account, Locks + * Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Same as [`set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. The controller + * account should represent a validator. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: LookupSource[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. This can only be called when + * [`EraElectionStatus`] is `Closed`. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS). + * - Both the reads and writes follow a similar pattern. + * --------- + * Weight: O(N) + * where N is the number of targets + * DB Weight: + * - Reads: Era Election Status, Ledger, Current Era + * - Writes: Validators, Nominators + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: LookupSource[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * This can only be called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * DB Weight: + * - Read: EraElectionStatus, CurrentEra, HistoryDepth, ErasValidatorReward, + * ErasStakersClipped, ErasRewardPoints, ErasValidatorPrefs (8 items) + * - Read Each: Bonded, Ledger, Payee, Locks, System Account (5 items) + * - Write Each: System Account, Locks, Ledger (3 items) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId + era: EraIndex +} + +/** + * Remove all data structure concerning a staker/stash once its balance is at the minimum. + * This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone + * and the target `stash` must have no funds left beyond the ED. + * + * This can be called from any origin. + * + * - `stash`: The stash account to reap. Its balance must be zero. + * + * # + * Complexity: O(S) where S is the number of slashing spans on the account. + * DB Weight: + * - Reads: Stash Account, Bonded, Slashing Spans, Locks + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Stash Account, Locks + * - Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller, and it can be only called when + * [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MAX_UNLOCKING_CHUNKS`. + * - Storage changes: Can't increase storage, only decrease it. + * --------------- + * - DB Weight: + * - Reads: EraElectionStatus, Ledger, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Same as [`set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: LookupSource +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. + * This should report all the storage items that will be deleted by clearing old + * era history. Needed to report an accurate weight for the dispatch. Trusted by + * `Root` to report an accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Weight: O(E) + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + * + * # + * - O(V) + * - Write: Invulnerables + * # + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + * + * # + * - Independent of the arguments. Limited but potentially exploitable complexity. + * - Contains a limited number of reads. + * - Each call (requires the remainder of the bonded balance to be above `minimum_balance`) + * will cause a new entry to be inserted into a vector (`Ledger.unlocking`) kept in storage. + * The only way to clean the aforementioned storage item is also user-controlled via + * `withdraw_unbonded`. + * - One DB entry. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: EraElectionStatus, Ledger, CurrentEra, Locks, BalanceOf Stash, + * - Write: Locks, Ledger, BalanceOf Stash, + * + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ----------- + * Weight: O(1) + * DB Weight: + * - Read: Era Election Status, Ledger + * - Write: Nominators, Validators + * # + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * - Could be dependent on the `origin` argument and how much `unlocking` chunks exist. + * It implies `consolidate_unlocked` which loops over `Ledger.unlocking`, which is + * indirectly user-controlled. See [`unbond`] for more detail. + * - Contains a limited number of reads, yet the size of which could be large based on `ledger`. + * - Writes are limited to the `origin` account key. + * --------------- + * Complexity O(S) where S is the number of slashing spans to remove + * Update: + * - Reads: EraElectionStatus, Ledger, Current Era, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * Kill: + * - Reads: EraElectionStatus, Ledger, Current Era, Bonded, Slashing Spans, [Origin + * Account], Locks, BalanceOf stash + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, + * [Origin Account], Locks, BalanceOf stash. + * - Writes Each: SpanSlash * S + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export type Percent = number + +export type EraIndex = number + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: BalanceOf +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * module to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId + judgement: SocietyJudgement +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin + * forgives (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: LookupSource + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId + value: BalanceOf + tip: BalanceOf +} + +export type SocietyJudgement = SocietyJudgement_Approve | SocietyJudgement_Rebid | SocietyJudgement_Reject + +export interface SocietyJudgement_Approve { + __kind: 'Approve' +} + +export interface SocietyJudgement_Rebid { + __kind: 'Rebid' +} + +export interface SocietyJudgement_Reject { + __kind: 'Reject' +} + +export type BalanceOf = bigint + +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * Clear all leases for a Para Id, refunding any deposits back to the original owners. + * + * Can only be called by the Root origin. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: ParaId +} + +/** + * Just a hotwire into the `lease_out` call, in case Root wants to force some lease to happen + * independently of any other on-chain mechanism to use it. + * + * Can only be called by the Root origin. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: ParaId + leaser: AccountId + amount: BalanceOf + periodBegin: LeasePeriodOf + periodCount: LeasePeriodOf +} + +/** + * Try to onboard a parachain that has a lease for the current lease period. + * + * This function can be useful if there was some state issue with a para that should + * have onboarded, but was unable to. As long as they have a lease period, we can + * let them onboard from here. + * + * Origin must be signed, but can be called by anyone. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: ParaId +} + +export type LeasePeriodOf = number + +export type ParaId = number + +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` in number of key types. + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwnder` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: Keys + proof: Bytes +} + +export type Keys = [AccountId, AccountId, AccountId, AccountId, AccountId, AccountId] + +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.15 + 2.869 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: BlockNumber + index: number +} + +/** + * Cancel a named scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 24.91 + 2.907 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.29 + .126 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda + * - Will use base weight of 25 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_138 +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_138 +} + +/** + * Schedule a named task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 29.6 + .159 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 35 which should be good for more than 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_138 +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`]. + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_138 +} + +export type Priority = number + +export type Period = [BlockNumber, number] + +export type RegistrarCall = RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_force_remove_lock | RegistrarCall_register | RegistrarCall_reserve | RegistrarCall_swap + +/** + * Deregister a Para Id, freeing all data and returning any deposit. + * + * The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: ParaId +} + +/** + * Force the registration of a Para Id on the relay chain. + * + * This function must be called by a Root origin. + * + * The deposit taken can be specified for this registration. Any ParaId + * can be registered, including sub-1000 IDs which are System Parachains. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId + deposit: BalanceOf + id: ParaId + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Remove a manager lock from a para. This will allow the manager of a + * previously locked para to deregister or swap a para without using governance. + * + * Can only be called by the Root origin. + */ +export interface RegistrarCall_force_remove_lock { + __kind: 'force_remove_lock' + para: ParaId +} + +/** + * Register head data and validation code for a reserved Para Id. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. + * - `id`: The para ID. Must be owned/managed by the `origin` signing account. + * - `genesis_head`: The genesis head data of the parachain/thread. + * - `validation_code`: The initial validation code of the parachain/thread. + * + * ## Deposits/Fees + * The origin signed account must reserve a corresponding deposit for the registration. Anything already + * reserved previously for this para ID is accounted for. + * + * ## Events + * The `Registered` event is emitted in case of success. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: ParaId + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Reserve a Para Id on the relay chain. + * + * This function will reserve a new Para Id to be owned/managed by the origin account. + * The origin account is able to register head data and validation code using `register` to create + * a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID. + * + * ## Deposits/Fees + * The origin must reserve a deposit of `ParaDeposit` for the registration. + * + * ## Events + * The `Reserved` event is emitted in case of success, which provides the ID reserved for use. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * Swap a parachain with another parachain or parathread. + * + * The origin must be Root, the `para` owner, or the `para` itself. + * + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: ParaId + other: ParaId +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + * + * # + * - The weight of the `call` + 10,000. + * - One storage lookup to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId + call: Type_138 +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + * + * # + * - One storage mutation to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully + * recovered by you. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + V) + * # + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + * + * # + * Key: V (len of vouching friends) + * - One storage read/remove to get the active recovery process. O(1), Codec O(V) + * - One balance call to repatriate reserved. O(X) + * - One event. + * + * Total Complexity: O(V + X) + * # + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. + * Should be ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt + * before the account can be recovered. Should be less than or equal to + * the length of the list of friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized + * that needs to pass before the account can be recovered. + * + * # + * - Key: F (len of friends) + * - One storage read to check that account is not already recoverable. O(1). + * - A check that the friends list is sorted and unique. O(F) + * - One currency reserve operation. O(X) + * - One storage write. O(1). Codec O(F). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId[] + threshold: number + delayPeriod: BlockNumber +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account + * needs to be recoverable (i.e. have a recovery configuration). + * + * # + * - One storage read to check that account is recoverable. O(F) + * - One storage read to check that this recovery process hasn't already started. O(1) + * - One currency reserve operation. O(X) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + * + * # + * Key: F (len of friends) + * - One storage read to get the prefix iterator for active recoveries. O(1) + * - One storage read/remove to get the recovery configuration. O(1), Codec O(F) + * - One balance call to unreserved. O(X) + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + * + * # + * - One storage write O(1) + * - One event + * # + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId + rescuer: AccountId +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you + * want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One binary search to confirm caller is a friend. O(logF) + * - One binary search to confirm caller has not already vouched. O(logV) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + logF + V + logV) + * # + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId + rescuer: AccountId +} + +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: AccountId + proxyType: ProxyType + delay: BlockNumber +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: AccountId + callHash: CallHashOf +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + * TODO: Might be over counting 1 read + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: BlockNumber + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_138 +} + +/** + * Dispatch the given `call` from an account that the sender is authorized for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: AccountId + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_138 +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: AccountId + callHash: CallHashOf +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: AccountId + callHash: CallHashOf +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: AccountId + proxyType: ProxyType + delay: BlockNumber +} + +export type CallHashOf = Bytes + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +export type PhragmenElectionCall = PhragmenElectionCall_clean_defunct_voters | PhragmenElectionCall_remove_member | PhragmenElectionCall_remove_voter | PhragmenElectionCall_renounce_candidacy | PhragmenElectionCall_submit_candidacy | PhragmenElectionCall_vote + +/** + * Clean all voters who are defunct (i.e. they do not serve any purpose at all). The + * deposit of the removed voters are returned. + * + * This is an root function to be used only for cleaning the state. + * + * The dispatch origin of this call must be root. + * + * # + * The total number of voters and those that are defunct must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_clean_defunct_voters { + __kind: 'clean_defunct_voters' + numVoters: number + numDefunct: number +} + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, a new phragmen election is started. + * + * The dispatch origin of this call must be root. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement, we use a small weight. Else, since this is a root call and + * will go into phragmen, we assume full block for now. + * # + */ +export interface PhragmenElectionCall_remove_member { + __kind: 'remove_member' + who: LookupSource + hasReplacement: boolean +} + +/** + * Remove `origin` as a voter. + * + * This removes the lock and returns the deposit. + * + * The dispatch origin of this call must be signed and be a voter. + */ +export interface PhragmenElectionCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * + * - `origin` is a candidate and not elected in any set. In this case, the deposit is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the deposit is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the deposit is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_members`], if replacement runners exists, they are immediately + * used. If the prime is renouncing, then no prime will exist until the next round. + * + * The dispatch origin of this call must be signed, and have one of the above roles. + * + * # + * The type of renouncing must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Submit oneself for candidacy. A fixed amount of deposit is recorded. + * + * All candidates are wiped at the end of the term. They either become a member/runner-up, + * or leave the system while their deposit is slashed. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`] + * to get their deposit back. Losing the spot in an election will always lead to a slash. + * + * # + * The number of current candidates must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is + * reserved. The deposit is based on the number of votes and can be updated over time. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * If `value` is more than `who`'s total balance, then the maximum of the two is used. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * It is the responsibility of the caller to **NOT** place all of their balance into the + * lock and keep some for further operations. + * + * # + * We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less. + * # + */ +export interface PhragmenElectionCall_vote { + __kind: 'vote' + votes: AccountId[] + value: bigint +} + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +export type ParasUmpCall = never + +export type ParasSharedCall = never + +export type ParasSessionInfoCall = never + +export type ParasSchedulerCall = never + +export type ParasInitializerCall = ParasInitializerCall_force_approve + +/** + * Issue a signal to the consensus engine to forcibly act as though all parachain + * blocks in all relay chain blocks up to and including the given number in the current + * chain are valid and should be finalized. + */ +export interface ParasInitializerCall_force_approve { + __kind: 'force_approve' + upTo: BlockNumber +} + +export type ParasInherentCall = ParasInherentCall_enter + +/** + * Enter the paras inherent. This will process bitfields and backed candidates. + */ +export interface ParasInherentCall_enter { + __kind: 'enter' + data: ParachainsInherentData +} + +export interface ParachainsInherentData { + bitfields: SignedAvailabilityBitfield[] + backedCandidates: BackedCandidate[] + disputes: DisputeStatementSet[] + parentHeader: Header +} + +export interface Header { + parentHash: Hash + number: number + stateRoot: Hash + extrinsicsRoot: Hash + digest: Digest +} + +export interface Digest { + logs: DigestItem[] +} + +export type DigestItem = DigestItem_AuthoritiesChange | DigestItem_ChangesTrieRoot | DigestItem_ChangesTrieSignal | DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal | DigestItem_SealV0 + +export interface DigestItem_AuthoritiesChange { + __kind: 'AuthoritiesChange' + value: AuthorityId[] +} + +export interface DigestItem_ChangesTrieRoot { + __kind: 'ChangesTrieRoot' + value: Hash +} + +export interface DigestItem_ChangesTrieSignal { + __kind: 'ChangesTrieSignal' + value: ChangesTrieSignal +} + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: Consensus +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: PreRuntime +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: Seal +} + +export interface DigestItem_SealV0 { + __kind: 'SealV0' + value: SealV0 +} + +export type SealV0 = [bigint, Signature] + +export type Signature = Bytes + +export type Seal = [ConsensusEngineId, Bytes] + +export type PreRuntime = [ConsensusEngineId, Bytes] + +export type Consensus = [ConsensusEngineId, Bytes] + +export type ConsensusEngineId = Bytes + +export type ChangesTrieSignal = ChangesTrieSignal_NewConfiguration + +export interface ChangesTrieSignal_NewConfiguration { + __kind: 'NewConfiguration' + value?: (ChangesTrieConfiguration | undefined) +} + +export type AuthorityId = Bytes + +export interface DisputeStatementSet { + candidateHash: CandidateHash + session: SessionIndex + statements: [DisputeStatement, ParaValidatorIndex, ValidatorSignature][] +} + +export type ValidatorSignature = Bytes + +export type ParaValidatorIndex = number + +export type DisputeStatement = DisputeStatement_Invalid | DisputeStatement_Valid + +export interface DisputeStatement_Invalid { + __kind: 'Invalid' + value: InvalidDisputeStatementKind +} + +export interface DisputeStatement_Valid { + __kind: 'Valid' + value: ValidDisputeStatementKind +} + +export type ValidDisputeStatementKind = ValidDisputeStatementKind_ApprovalChecking | ValidDisputeStatementKind_BackingSeconded | ValidDisputeStatementKind_BackingValid | ValidDisputeStatementKind_Explicit + +export interface ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: Hash +} + +export interface ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: Hash +} + +export interface ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type InvalidDisputeStatementKind = InvalidDisputeStatementKind_Explicit + +export interface InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type SessionIndex = number + +export type CandidateHash = Bytes + +export interface BackedCandidate { + candidate: CommittedCandidateReceipt + validityVotes: ValidityAttestation[] + validatorIndices: BitSequence +} + +export type ValidityAttestation = ValidityAttestation_Explicit | ValidityAttestation_Implicit | ValidityAttestation_Never + +export interface ValidityAttestation_Explicit { + __kind: 'Explicit' + value: ValidatorSignature +} + +export interface ValidityAttestation_Implicit { + __kind: 'Implicit' + value: ValidatorSignature +} + +export interface ValidityAttestation_Never { + __kind: 'Never' +} + +export interface CommittedCandidateReceipt { + descriptor: CandidateDescriptor + commitments: CandidateCommitments +} + +export interface CandidateCommitments { + upwardMessages: UpwardMessage[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: BlockNumber +} + +export interface OutboundHrmpMessage { + recipient: number + data: Bytes +} + +export type UpwardMessage = Bytes + +export interface CandidateDescriptor { + paraId: ParaId + relayParent: RelayChainHash + collatorId: CollatorId + persistedValidationDataHash: Hash + povHash: Hash + erasureRoot: Hash + signature: CollatorSignature + paraHead: Hash + validationCodeHash: ValidationCodeHash +} + +export type ValidationCodeHash = Bytes + +export type CollatorSignature = Bytes + +export type CollatorId = Bytes + +export type RelayChainHash = Bytes + +export interface SignedAvailabilityBitfield { + payload: BitSequence + validatorIndex: ParaValidatorIndex + signature: ValidatorSignature +} + +export type ParasInclusionCall = never + +export type ParasHrmpCall = ParasHrmpCall_force_clean_hrmp | ParasHrmpCall_force_process_hrmp_close | ParasHrmpCall_force_process_hrmp_open | ParasHrmpCall_hrmp_accept_open_channel | ParasHrmpCall_hrmp_close_channel | ParasHrmpCall_hrmp_init_open_channel + +/** + * This extrinsic triggers the cleanup of all the HRMP storage items that + * a para may have. Normally this happens once per session, but this allows + * you to trigger the cleanup immediately for a specific parachain. + * + * Origin must be Root. + */ +export interface ParasHrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: ParaId +} + +/** + * Force process hrmp close channel requests. + * + * If there are pending HRMP close channel requests, you can use this + * function process all of those requests immediately. + */ +export interface ParasHrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' +} + +/** + * Force process hrmp open channel requests. + * + * If there are pending HRMP open channel requests, you can use this + * function process all of those requests immediately. + */ +export interface ParasHrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' +} + +/** + * Accept a pending open channel request from the given sender. + * + * The channel will be opened only on the next session boundary. + */ +export interface ParasHrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: ParaId +} + +/** + * Initiate unilateral closing of a channel. The origin must be either the sender or the + * recipient in the channel being closed. + * + * The closure can only happen on a session change. + */ +export interface ParasHrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * Initiate opening a channel from a parachain to a given recipient with given channel + * parameters. + * + * - `proposed_max_capacity` - specifies how many messages can be in the channel at once. + * - `proposed_max_message_size` - specifies the maximum size of any of the messages. + * + * These numbers are a subject to the relay-chain configuration limits. + * + * The channel can be opened only after the recipient confirms it and only on a session + * change. + */ +export interface ParasHrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: ParaId + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +export interface HrmpChannelId { + sender: number + receiver: number +} + +export type ParasDmpCall = never + +export type ParasCall = ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head + +/** + * Note a new block head for para within the context of the current block. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: ParaId + newHead: HeadData +} + +/** + * Put a parachain directly into the next session's action queue. + * We can't queue it any sooner than this without going into the + * initializer... + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: ParaId +} + +/** + * Schedule a code upgrade for block `expected_at`. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: ParaId + newCode: ValidationCode + expectedAt: BlockNumber +} + +/** + * Set the storage for the parachain validation code immediately. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: ParaId + newCode: ValidationCode +} + +/** + * Set the storage for the current parachain head data immediately. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: ParaId + newHead: HeadData +} + +export type ParachainsConfigurationCall = ParachainsConfigurationCall_set_chain_availability_period | ParachainsConfigurationCall_set_code_retention_period | ParachainsConfigurationCall_set_dispute_conclusion_by_time_out_period | ParachainsConfigurationCall_set_dispute_max_spam_slots | ParachainsConfigurationCall_set_dispute_period | ParachainsConfigurationCall_set_dispute_post_conclusion_acceptance_period | ParachainsConfigurationCall_set_group_rotation_frequency | ParachainsConfigurationCall_set_hrmp_channel_max_capacity | ParachainsConfigurationCall_set_hrmp_channel_max_message_size | ParachainsConfigurationCall_set_hrmp_channel_max_total_size | ParachainsConfigurationCall_set_hrmp_max_message_num_per_candidate | ParachainsConfigurationCall_set_hrmp_max_parachain_inbound_channels | ParachainsConfigurationCall_set_hrmp_max_parachain_outbound_channels | ParachainsConfigurationCall_set_hrmp_max_parathread_inbound_channels | ParachainsConfigurationCall_set_hrmp_max_parathread_outbound_channels | ParachainsConfigurationCall_set_hrmp_open_request_ttl | ParachainsConfigurationCall_set_hrmp_recipient_deposit | ParachainsConfigurationCall_set_hrmp_sender_deposit | ParachainsConfigurationCall_set_max_code_size | ParachainsConfigurationCall_set_max_downward_message_size | ParachainsConfigurationCall_set_max_head_data_size | ParachainsConfigurationCall_set_max_pov_size | ParachainsConfigurationCall_set_max_upward_message_num_per_candidate | ParachainsConfigurationCall_set_max_upward_message_size | ParachainsConfigurationCall_set_max_upward_queue_count | ParachainsConfigurationCall_set_max_upward_queue_size | ParachainsConfigurationCall_set_max_validators | ParachainsConfigurationCall_set_max_validators_per_core | ParachainsConfigurationCall_set_n_delay_tranches | ParachainsConfigurationCall_set_needed_approvals | ParachainsConfigurationCall_set_no_show_slots | ParachainsConfigurationCall_set_parathread_cores | ParachainsConfigurationCall_set_parathread_retries | ParachainsConfigurationCall_set_preferred_dispatchable_upward_messages_step_weight | ParachainsConfigurationCall_set_relay_vrf_modulo_samples | ParachainsConfigurationCall_set_scheduling_lookahead | ParachainsConfigurationCall_set_thread_availability_period | ParachainsConfigurationCall_set_validation_upgrade_delay | ParachainsConfigurationCall_set_validation_upgrade_frequency | ParachainsConfigurationCall_set_zeroth_delay_tranche_width + +/** + * Set the availability period for parachains. + */ +export interface ParachainsConfigurationCall_set_chain_availability_period { + __kind: 'set_chain_availability_period' + new: BlockNumber +} + +/** + * Set the acceptance period for an included candidate. + */ +export interface ParachainsConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: BlockNumber +} + +/** + * Set the dispute conclusion by time out period. + */ +export interface ParachainsConfigurationCall_set_dispute_conclusion_by_time_out_period { + __kind: 'set_dispute_conclusion_by_time_out_period' + new: BlockNumber +} + +/** + * Set the maximum number of dispute spam slots. + */ +export interface ParachainsConfigurationCall_set_dispute_max_spam_slots { + __kind: 'set_dispute_max_spam_slots' + new: number +} + +/** + * Set the dispute period, in number of sessions to keep for disputes. + */ +export interface ParachainsConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: SessionIndex +} + +/** + * Set the dispute post conclusion acceptance period. + */ +export interface ParachainsConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: BlockNumber +} + +/** + * Set the parachain validator-group rotation frequency + */ +export interface ParachainsConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: BlockNumber +} + +/** + * Sets the maximum number of messages allowed in an HRMP channel at once. + */ +export interface ParachainsConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * Sets the maximum size of a message that could ever be put into an HRMP channel. + */ +export interface ParachainsConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * Sets the maximum total size of messages in bytes allowed in an HRMP channel at once. + */ +export interface ParachainsConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * Sets the maximum number of outbound HRMP messages can be sent by a candidate. + */ +export interface ParachainsConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parachain is allowed to accept. + */ +export interface ParachainsConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parachain is allowed to open. + */ +export interface ParachainsConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parathread is allowed to accept. + */ +export interface ParachainsConfigurationCall_set_hrmp_max_parathread_inbound_channels { + __kind: 'set_hrmp_max_parathread_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parathread is allowed to open. + */ +export interface ParachainsConfigurationCall_set_hrmp_max_parathread_outbound_channels { + __kind: 'set_hrmp_max_parathread_outbound_channels' + new: number +} + +/** + * Sets the number of sessions after which an HRMP open channel request expires. + */ +export interface ParachainsConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * Sets the amount of funds that the recipient should provide for accepting opening an HRMP + * channel. + */ +export interface ParachainsConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: Balance +} + +/** + * Sets the amount of funds that the sender should provide for opening an HRMP channel. + */ +export interface ParachainsConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: Balance +} + +/** + * Set the max validation code size for incoming upgrades. + */ +export interface ParachainsConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * Set the critical downward message size. + */ +export interface ParachainsConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * Set the max head data size for paras. + */ +export interface ParachainsConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * Set the max POV block size for incoming upgrades. + */ +export interface ParachainsConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * Sets the maximum number of messages that a candidate can contain. + */ +export interface ParachainsConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum size of an upward message that can be sent by a candidate. + */ +export interface ParachainsConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * Sets the maximum items that can present in a upward dispatch queue at once. + */ +export interface ParachainsConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * Sets the maximum total size of items that can present in a upward dispatch queue at once. + */ +export interface ParachainsConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * Set the maximum number of validators to use in parachain consensus. + */ +export interface ParachainsConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * Set the maximum number of validators to assign to any core. + */ +export interface ParachainsConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * Set the total number of delay tranches. + */ +export interface ParachainsConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * Set the number of validators needed to approve a block. + */ +export interface ParachainsConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * Set the no show slots, in number of number of consensus slots. + * Must be at least 1. + */ +export interface ParachainsConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * Set the number of parathread execution cores. + */ +export interface ParachainsConfigurationCall_set_parathread_cores { + __kind: 'set_parathread_cores' + new: number +} + +/** + * Set the number of retries for a particular parathread. + */ +export interface ParachainsConfigurationCall_set_parathread_retries { + __kind: 'set_parathread_retries' + new: number +} + +/** + * Sets the soft limit for the phase of dispatching dispatchable upward messages. + */ +export interface ParachainsConfigurationCall_set_preferred_dispatchable_upward_messages_step_weight { + __kind: 'set_preferred_dispatchable_upward_messages_step_weight' + new: Weight +} + +/** + * Set the number of samples to do of the RelayVRFModulo approval assignment criterion. + */ +export interface ParachainsConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * Set the scheduling lookahead, in expected number of blocks at peak throughput. + */ +export interface ParachainsConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * Set the availability period for parathreads. + */ +export interface ParachainsConfigurationCall_set_thread_availability_period { + __kind: 'set_thread_availability_period' + new: BlockNumber +} + +/** + * Set the validation upgrade delay. + */ +export interface ParachainsConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: BlockNumber +} + +/** + * Set the validation upgrade frequency. + */ +export interface ParachainsConfigurationCall_set_validation_upgrade_frequency { + __kind: 'set_validation_upgrade_frequency' + new: BlockNumber +} + +/** + * Set the zeroth delay tranche width. + */ +export interface ParachainsConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +export type OffencesCall = never + +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + call: OpaqueCall + storeCall: boolean + maxWeight: Weight +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId[] + call: Type_138 +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId[] + timepoint: Timepoint + callHash: Bytes +} + +export type OpaqueCall = Bytes + +export interface Timepoint { + height: BlockNumber + index: number +} + +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: AccountIndex +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId + index: AccountIndex + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: AccountIndex +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: AccountIndex +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId + index: AccountIndex +} + +export type AccountIndex = number + +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) + * and E is length of `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Signature +} + +export interface Heartbeat { + blockNumber: BlockNumber + networkState: OpaqueNetworkState + sessionIndex: SessionIndex + authorityIndex: AuthIndex + validatorsLen: number +} + +export type AuthIndex = number + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: LookupSource + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: RegistrarIndex +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: LookupSource +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: LookupSource + judgement: IdentityJudgement +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: LookupSource +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: LookupSource + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: bigint +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId, Data][] +} + +export interface IdentityInfo { + additional: IdentityInfoAdditional[] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (H160 | undefined) + image: Data + twitter: Data +} + +export type IdentityInfoAdditional = [Data, Data] + +export type IdentityJudgement = IdentityJudgement_Erroneous | IdentityJudgement_FeePaid | IdentityJudgement_KnownGood | IdentityJudgement_LowQuality | IdentityJudgement_OutOfDate | IdentityJudgement_Reasonable | IdentityJudgement_Unknown + +export interface IdentityJudgement_Erroneous { + __kind: 'Erroneous' +} + +export interface IdentityJudgement_FeePaid { + __kind: 'FeePaid' + value: Balance +} + +export interface IdentityJudgement_KnownGood { + __kind: 'KnownGood' +} + +export interface IdentityJudgement_LowQuality { + __kind: 'LowQuality' +} + +export interface IdentityJudgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface IdentityJudgement_Reasonable { + __kind: 'Reasonable' +} + +export interface IdentityJudgement_Unknown { + __kind: 'Unknown' +} + +export type RegistrarIndex = number + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: H256 +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: H256 +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: H256 +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: H256 +} + +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has + * stalled. This will trigger a forced authority set change at the beginning + * of the next session, to be enacted `delay` blocks after that. The delay + * should be high enough to safely assume that the block signalling the + * forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters + * will start the new authority set using the given finalized block as base. + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: BlockNumber + bestFinalizedBlockNumber: BlockNumber +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface KeyOwnerProof { + session: SessionIndex + trieNodes: Bytes[] + validatorCount: ValidatorCount +} + +export type ValidatorCount = number + +export interface GrandpaEquivocationProof { + setId: SetId + equivocation: GrandpaEquivocation +} + +export type GrandpaEquivocation = GrandpaEquivocation_Precommit | GrandpaEquivocation_Prevote + +export interface GrandpaEquivocation_Precommit { + __kind: 'Precommit' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocation_Prevote { + __kind: 'Prevote' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocationValue { + roundNumber: bigint + identity: AuthorityId + first: [GrandpaPrevote, AuthoritySignature] + second: [GrandpaPrevote, AuthoritySignature] +} + +export type AuthoritySignature = Bytes + +export interface GrandpaPrevote { + targetHash: Hash + targetNumber: BlockNumber +} + +export type SetId = bigint + +export type GiltCall = GiltCall_place_bid | GiltCall_retract_bid | GiltCall_set_target | GiltCall_thaw + +/** + * Place a bid for a gilt to be issued. + * + * Origin must be Signed, and account must have at least `amount` in free balance. + * + * - `amount`: The amount of the bid; these funds will be reserved. If the bid is + * successfully elevated into an issued gilt, then these funds will continue to be + * reserved until the gilt expires. Must be at least `MinFreeze`. + * - `duration`: The number of periods for which the funds will be locked if the gilt is + * issued. It will expire only after this period has elapsed after the point of issuance. + * Must be greater than 1 and no more than `QueueCount`. + * + * Complexities: + * - `Queues[duration].len()` (just take max). + */ +export interface GiltCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * Retract a previously placed bid. + * + * Origin must be Signed, and the account should have previously issued a still-active bid + * of `amount` for `duration`. + * + * - `amount`: The amount of the previous bid. + * - `duration`: The duration of the previous bid. + */ +export interface GiltCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * Set target proportion of gilt-funds. + * + * Origin must be `AdminOrigin`. + * + * - `target`: The target proportion of effective issued funds that should be under gilts + * at any one time. + */ +export interface GiltCall_set_target { + __kind: 'set_target' + target: bigint +} + +/** + * Remove an active but expired gilt. Reserved funds under gilt are freed and balance is + * adjusted to ensure that the funds grow or shrink to maintain the equivalent proportion + * of effective total issued funds. + * + * Origin must be Signed and the account must be the owner of the gilt of the given index. + * + * - `index`: The index of the gilt to be thawed. + */ +export interface GiltCall_thaw { + __kind: 'thaw' + index: number +} + +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * Submit a solution for the unsigned phase. + * + * The dispatch origin fo this call must be __none__. + * + * This submission is checked on the fly. Moreover, this unsigned solution is only + * validated when submitted to the pool from the **local** node. Effectively, this means + * that only active validators can submit this transaction when authoring a block (similar + * to an inherent). + * + * To prevent any incorrect solution (and thus wasted time/weight), this transaction will + * panic if the solution submitted by the validator is invalid in any way, effectively + * putting their authoring reward at risk. + * + * No deposit or reward is associated with this submission. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + solution: RawSolution + witness: SolutionOrSnapshotSize +} + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export interface RawSolution { + compact: CompactAssignmentsWith24 + score: ElectionScore + round: number +} + +export type ElectionScore = bigint[] + +export interface CompactAssignmentsWith24 { + votes1: [NominatorIndexCompact, ValidatorIndexCompact][] + votes2: [NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact][] + votes3: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes4: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes5: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes6: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes7: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes8: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes9: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes10: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes11: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes12: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes13: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes14: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes15: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes16: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes17: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes18: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes19: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes20: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes21: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes22: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes23: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes24: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] +} + +export type CompactScoreCompact = [ValidatorIndexCompact, OffchainAccuracyCompact] + +export type OffchainAccuracyCompact = number + +export type ValidatorIndexCompact = number + +export type NominatorIndexCompact = number + +export type DemocracyCall = DemocracyCall_blacklist | DemocracyCall_cancel_proposal | DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. + * + * If called on a queued public or external proposal, then this will result in it being + * removed. If the `ref_index` supplied is an active referendum with the proposal hash, + * then it will be cancelled. + * + * The dispatch origin of this call must be `BlacklistOrigin`. + * + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. + * + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). + */ +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: Hash + maybeRefIndex?: (ReferendumIndex | undefined) +} + +/** + * Remove a proposal. + * + * The dispatch origin of this call must be `CancelProposalOrigin`. + * + * - `prop_index`: The index of the proposal to cancel. + * + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number +} + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: ReferendumIndex +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must + * not be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId + conviction: Conviction + balance: BalanceOf +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: ReferendumIndex +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: Hash + index: ReferendumIndex +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Weight: `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: Hash +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: Hash +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: Hash +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * `FastTrackVotingPeriod` if too low. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: Hash + votingPeriod: BlockNumber + delay: BlockNumber +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. When this call is successful, i.e. + * the preimage has not been uploaded before and matches some imminent proposal, + * no fee is paid. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * Weight: `O(p)` + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: Hash + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. + * Extrinsic is weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * Weight: `O(D)` where D is length of proposal. + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: Hash + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId + index: ReferendumIndex +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: ReferendumIndex +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * Weight: `O(S)` where S is the number of seconds a proposal already has. + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * Weight: `O(V + log(V))` where V is number of `existing vetoers` + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: Hash +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of referendums the voter has voted on. + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + value: AccountVoteSplit +} + +export interface AccountVote_Standard { + __kind: 'Standard' + value: AccountVoteStandard +} + +export interface AccountVoteStandard { + vote: Vote + balance: Balance +} + +export type Vote = number + +export interface AccountVoteSplit { + aye: Balance + nay: Balance +} + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +export type ReferendumIndex = number + +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * Add an optional memo to an existing crowdloan contribution. + * + * Origin must be Signed, and the user must have contributed to the crowdloan. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: ParaId + memo: Bytes +} + +/** + * Contribute to a crowd sale. This will transfer some balance over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * Create a new crowdloaning campaign for a parachain slot with the given lease period range. + * + * This applies a lock to your parachain configuration, ensuring that it cannot be changed + * by the parachain manager. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Remove a fund after the retirement period has ended and all funds have been returned. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * Edit the configuration for an in-progress crowdloan. + * + * Can only be called by Root origin. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Poke the fund into NewRaise + * + * Origin must be Signed, and the fund has non-zero raise. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: ParaId +} + +/** + * Automatically refund contributors of an ended crowdloan. + * Due to weight restrictions, this function may need to be called multiple + * times to fully refund all users. We will refund `RemoveKeysLimit` users at a time. + * + * Origin must be signed, but can come from anyone. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * Withdraw full balance of a specific contributor. + * + * Origin must be signed, but can come from anyone. + * + * The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement + * flag must be set. For a fund to be ready for retirement, then: + * - it must not already be in retirement; + * - the amount of raised funds must be bigger than the _free_ balance of the account; + * - and either: + * - the block number must be at least `end`; or + * - the current lease period must be greater than the fund's `last_period`. + * + * In this case, the fund's retirement flag is set and its `end` is reset to the current block + * number. + * + * - `who`: The account whose contribution should be withdrawn. + * - `index`: The parachain to whose crowdloan the contribution was made. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId + index: number +} + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: EcdsaSignature +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Ed25519Signature +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Sr25519Signature +} + +export type Sr25519Signature = Bytes + +export type Ed25519Signature = Bytes + +export type EcdsaSignature = Bytes + +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export type MemberCount = number + +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: BalanceOf + vestingSchedule?: ([BalanceOf, BalanceOf, BlockNumber] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId | undefined) +} + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export type EthereumAddress = Bytes + +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: LookupSource +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: LookupSource + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is malicious + * or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is + * not assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: LookupSource + dest: LookupSource + value: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also decrease the total issuance of the system (`TotalIssuance`). + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + * + * # + * - Independent of the arguments. + * - Contains a limited number of reads and writes. + * --------------------- + * - Base Weight: + * - Creating: 27.56 µs + * - Killing: 35.11 µs + * - DB Weight: 1 Read, 1 Write to `who` + * # + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: LookupSource + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * It will decrease the total issuance of the system by the `TransferFee`. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for + * input config types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional + * check that the transfer will not kill the origin account. + * --------------------------------- + * - Base Weight: 73.64 µs, worst case scenario (account created, account removed) + * - DB Weight: 1 Read and 1 Write to destination account + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: LookupSource + value: bigint +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + * # + * - Cheaper than transfer because account cannot be killed. + * - Base Weight: 51.4 µs + * - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already) + * # + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: LookupSource + value: bigint +} + +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Plan an epoch config change. The epoch config change is recorded and will be enacted on + * the next call to `enact_epoch_change`. The config will be activated one epoch after. + * Multiple calls to this method will replace any existing planned config change that had + * not been enacted yet. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface BabeEquivocationProof { + offender: AuthorityId + slotNumber: SlotNumber + firstHeader: Header + secondHeader: Header +} + +export type SlotNumber = bigint + +export type NextConfigDescriptor = NextConfigDescriptor_V0 | NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V0 { + __kind: 'V0' +} + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + value: NextConfigDescriptorV1 +} + +export interface NextConfigDescriptorV1 { + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +export type AuthorityDiscoveryCall = never + +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Cancel an in-progress auction. + * + * Can only be called by Root origin. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: Key, + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => Key), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_changes_trie_config: sts.enumStruct({ + changesTrieConfig: sts.option(() => ChangesTrieConfiguration), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => KeyValue), + }), + } +}) + +export const KeyValue = sts.tuple(() => [StorageKey, StorageData]) + +export const StorageData = sts.bytes() + +export const StorageKey = sts.bytes() + +export const ChangesTrieConfiguration: sts.Type = sts.struct(() => { + return { + digestInterval: sts.number(), + digestLevels: sts.number(), + } +}) + +export const Key = sts.bytes() + +export const Perbill = sts.number() + +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: LookupSource, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: EraIndex, + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => LookupSource), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => LookupSource), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId, + era: EraIndex, + }), + reap_stash: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: LookupSource, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export const Percent = sts.number() + +export const EraIndex = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: BalanceOf, + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId, + judgement: SocietyJudgement, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: LookupSource, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId, + value: BalanceOf, + tip: BalanceOf, + }), + } +}) + +export const SocietyJudgement: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export const BalanceOf = sts.bigint() + +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: ParaId, + }), + force_lease: sts.enumStruct({ + para: ParaId, + leaser: AccountId, + amount: BalanceOf, + periodBegin: LeasePeriodOf, + periodCount: LeasePeriodOf, + }), + trigger_onboard: sts.enumStruct({ + para: ParaId, + }), + } +}) + +export const LeasePeriodOf = sts.number() + +export const ParaId = sts.number() + +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: Keys, + proof: sts.bytes(), + }), + } +}) + +export const Keys = sts.tuple(() => [AccountId, AccountId, AccountId, AccountId, AccountId, AccountId]) + +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: BlockNumber, + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_138, + }), + schedule_after: sts.enumStruct({ + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_138, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_138, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_138, + }), + } +}) + +export const Priority = sts.number() + +export const Period = sts.tuple(() => [BlockNumber, sts.number()]) + +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + deregister: sts.enumStruct({ + id: ParaId, + }), + force_register: sts.enumStruct({ + who: AccountId, + deposit: BalanceOf, + id: ParaId, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + force_remove_lock: sts.enumStruct({ + para: ParaId, + }), + register: sts.enumStruct({ + id: ParaId, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + reserve: sts.unit(), + swap: sts.enumStruct({ + id: ParaId, + other: ParaId, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId, + call: Type_138, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId, + }), + claim_recovery: sts.enumStruct({ + account: AccountId, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId), + threshold: sts.number(), + delayPeriod: BlockNumber, + }), + initiate_recovery: sts.enumStruct({ + account: AccountId, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + } +}) + +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: AccountId, + proxyType: ProxyType, + delay: BlockNumber, + }), + announce: sts.enumStruct({ + real: AccountId, + callHash: CallHashOf, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + delay: BlockNumber, + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_138, + }), + proxy_announced: sts.enumStruct({ + delegate: AccountId, + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_138, + }), + reject_announcement: sts.enumStruct({ + delegate: AccountId, + callHash: CallHashOf, + }), + remove_announcement: sts.enumStruct({ + real: AccountId, + callHash: CallHashOf, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: AccountId, + proxyType: ProxyType, + delay: BlockNumber, + }), + } +}) + +export const CallHashOf = sts.bytes() + +export const PhragmenElectionCall: sts.Type = sts.closedEnum(() => { + return { + clean_defunct_voters: sts.enumStruct({ + numVoters: sts.number(), + numDefunct: sts.number(), + }), + remove_member: sts.enumStruct({ + who: LookupSource, + hasReplacement: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId), + value: sts.bigint(), + }), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export const ParasUmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasSessionInfoCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasSchedulerCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasInitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: BlockNumber, + }), + } +}) + +export const ParasInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: ParachainsInherentData, + }), + } +}) + +export const ParachainsInherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => SignedAvailabilityBitfield), + backedCandidates: sts.array(() => BackedCandidate), + disputes: sts.array(() => DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: Hash, + number: sts.number(), + stateRoot: Hash, + extrinsicsRoot: Hash, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + AuthoritiesChange: sts.array(() => AuthorityId), + ChangesTrieRoot: Hash, + ChangesTrieSignal: ChangesTrieSignal, + Consensus: Consensus, + Other: sts.bytes(), + PreRuntime: PreRuntime, + RuntimeEnvironmentUpdated: sts.unit(), + Seal: Seal, + SealV0: SealV0, + } +}) + +export const SealV0 = sts.tuple(() => [sts.bigint(), Signature]) + +export const Signature = sts.bytes() + +export const Seal = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const PreRuntime = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const Consensus = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const ConsensusEngineId = sts.bytes() + +export const ChangesTrieSignal: sts.Type = sts.closedEnum(() => { + return { + NewConfiguration: sts.option(() => ChangesTrieConfiguration), + } +}) + +export const AuthorityId = sts.bytes() + +export const DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: SessionIndex, + statements: sts.array(() => sts.tuple(() => [DisputeStatement, ParaValidatorIndex, ValidatorSignature])), + } +}) + +export const ValidatorSignature = sts.bytes() + +export const ParaValidatorIndex = sts.number() + +export const DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: InvalidDisputeStatementKind, + Valid: ValidDisputeStatementKind, + } +}) + +export const ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + BackingSeconded: Hash, + BackingValid: Hash, + Explicit: sts.unit(), + } +}) + +export const InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export const SessionIndex = sts.number() + +export const CandidateHash = sts.bytes() + +export const BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: CommittedCandidateReceipt, + validityVotes: sts.array(() => ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: ValidatorSignature, + Implicit: ValidatorSignature, + Never: sts.unit(), + } +}) + +export const CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: CandidateDescriptor, + commitments: CandidateCommitments, + } +}) + +export const CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => UpwardMessage), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: BlockNumber, + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: sts.number(), + data: sts.bytes(), + } +}) + +export const UpwardMessage = sts.bytes() + +export const CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: ParaId, + relayParent: RelayChainHash, + collatorId: CollatorId, + persistedValidationDataHash: Hash, + povHash: Hash, + erasureRoot: Hash, + signature: CollatorSignature, + paraHead: Hash, + validationCodeHash: ValidationCodeHash, + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const CollatorSignature = sts.bytes() + +export const CollatorId = sts.bytes() + +export const RelayChainHash = sts.bytes() + +export const SignedAvailabilityBitfield: sts.Type = sts.struct(() => { + return { + payload: sts.bitseq(), + validatorIndex: ParaValidatorIndex, + signature: ValidatorSignature, + } +}) + +export const ParasInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasHrmpCall: sts.Type = sts.closedEnum(() => { + return { + force_clean_hrmp: sts.enumStruct({ + para: ParaId, + }), + force_process_hrmp_close: sts.unit(), + force_process_hrmp_open: sts.unit(), + hrmp_accept_open_channel: sts.enumStruct({ + sender: ParaId, + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: ParaId, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: sts.number(), + receiver: sts.number(), + } +}) + +export const ParasDmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + force_note_new_head: sts.enumStruct({ + para: ParaId, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: ParaId, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: ParaId, + newCode: ValidationCode, + expectedAt: BlockNumber, + }), + force_set_current_code: sts.enumStruct({ + para: ParaId, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: ParaId, + newHead: HeadData, + }), + } +}) + +export const ParachainsConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_chain_availability_period: sts.enumStruct({ + new: BlockNumber, + }), + set_code_retention_period: sts.enumStruct({ + new: BlockNumber, + }), + set_dispute_conclusion_by_time_out_period: sts.enumStruct({ + new: BlockNumber, + }), + set_dispute_max_spam_slots: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: SessionIndex, + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: BlockNumber, + }), + set_group_rotation_frequency: sts.enumStruct({ + new: BlockNumber, + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: Balance, + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: Balance, + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_cores: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_retries: sts.enumStruct({ + new: sts.number(), + }), + set_preferred_dispatchable_upward_messages_step_weight: sts.enumStruct({ + new: Weight, + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_thread_availability_period: sts.enumStruct({ + new: BlockNumber, + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: BlockNumber, + }), + set_validation_upgrade_frequency: sts.enumStruct({ + new: BlockNumber, + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +export const OffencesCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + call: OpaqueCall, + storeCall: sts.boolean(), + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId), + call: Type_138, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const OpaqueCall = sts.bytes() + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: BlockNumber, + index: sts.number(), + } +}) + +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: AccountIndex, + }), + force_transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: AccountIndex, + }), + freeze: sts.enumStruct({ + index: AccountIndex, + }), + transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + }), + } +}) + +export const AccountIndex = sts.number() + +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: Signature, + }), + } +}) + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: BlockNumber, + networkState: OpaqueNetworkState, + sessionIndex: SessionIndex, + authorityIndex: AuthIndex, + validatorsLen: sts.number(), + } +}) + +export const AuthIndex = sts.number() + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId, + }), + add_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: RegistrarIndex, + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: LookupSource, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: LookupSource, + judgement: IdentityJudgement, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: LookupSource, + }), + rename_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: sts.bigint(), + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => IdentityInfoAdditional), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => H160), + image: Data, + twitter: Data, + } +}) + +export const IdentityInfoAdditional = sts.tuple(() => [Data, Data]) + +export const IdentityJudgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: Balance, + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export const RegistrarIndex = sts.number() + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: H256, + Keccak256: H256, + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: H256, + ShaThree256: H256, + } +}) + +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: BlockNumber, + bestFinalizedBlockNumber: BlockNumber, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const KeyOwnerProof: sts.Type = sts.struct(() => { + return { + session: SessionIndex, + trieNodes: sts.array(() => sts.bytes()), + validatorCount: ValidatorCount, + } +}) + +export const ValidatorCount = sts.number() + +export const GrandpaEquivocationProof: sts.Type = sts.struct(() => { + return { + setId: SetId, + equivocation: GrandpaEquivocation, + } +}) + +export const GrandpaEquivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: GrandpaEquivocationValue, + Prevote: GrandpaEquivocationValue, + } +}) + +export const GrandpaEquivocationValue: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: AuthorityId, + first: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + second: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + } +}) + +export const AuthoritySignature = sts.bytes() + +export const GrandpaPrevote: sts.Type = sts.struct(() => { + return { + targetHash: Hash, + targetNumber: BlockNumber, + } +}) + +export const SetId = sts.bigint() + +export const GiltCall: sts.Type = sts.closedEnum(() => { + return { + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + set_target: sts.enumStruct({ + target: sts.bigint(), + }), + thaw: sts.enumStruct({ + index: sts.number(), + }), + } +}) + +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + submit_unsigned: sts.enumStruct({ + solution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export const RawSolution: sts.Type = sts.struct(() => { + return { + compact: CompactAssignmentsWith24, + score: ElectionScore, + round: sts.number(), + } +}) + +export const ElectionScore = sts.array(() => sts.bigint()) + +export const CompactAssignmentsWith24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [NominatorIndexCompact, ValidatorIndexCompact])), + votes2: sts.array(() => sts.tuple(() => [NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact])), + votes3: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes4: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes5: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes6: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes7: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes8: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes9: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes10: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes11: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes12: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes13: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes14: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes15: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes16: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes17: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes18: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes19: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes20: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes21: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes22: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes23: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes24: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + } +}) + +export const CompactScoreCompact = sts.tuple(() => [ValidatorIndexCompact, OffchainAccuracyCompact]) + +export const OffchainAccuracyCompact = sts.number() + +export const ValidatorIndexCompact = sts.number() + +export const NominatorIndexCompact = sts.number() + +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + blacklist: sts.enumStruct({ + proposalHash: Hash, + maybeRefIndex: sts.option(() => ReferendumIndex), + }), + cancel_proposal: sts.enumStruct({ + propIndex: sts.number(), + }), + cancel_queued: sts.enumStruct({ + which: ReferendumIndex, + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId, + conviction: Conviction, + balance: BalanceOf, + }), + emergency_cancel: sts.enumStruct({ + refIndex: ReferendumIndex, + }), + enact_proposal: sts.enumStruct({ + proposalHash: Hash, + index: ReferendumIndex, + }), + external_propose: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_default: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: Hash, + }), + fast_track: sts.enumStruct({ + proposalHash: Hash, + votingPeriod: BlockNumber, + delay: BlockNumber, + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: Hash, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: Hash, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId, + index: ReferendumIndex, + }), + remove_vote: sts.enumStruct({ + index: ReferendumIndex, + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId, + }), + veto_external: sts.enumStruct({ + proposalHash: Hash, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: AccountVoteSplit, + Standard: AccountVoteStandard, + } +}) + +export const AccountVoteStandard: sts.Type = sts.struct(() => { + return { + vote: Vote, + balance: Balance, + } +}) + +export const Vote = sts.number() + +export const AccountVoteSplit: sts.Type = sts.struct(() => { + return { + aye: Balance, + nay: Balance, + } +}) + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export const ReferendumIndex = sts.number() + +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: ParaId, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: ParaId, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: EcdsaSignature, + Ed25519: Ed25519Signature, + Sr25519: Sr25519Signature, + } +}) + +export const Sr25519Signature = sts.bytes() + +export const Ed25519Signature = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: BalanceOf, + vestingSchedule: sts.option(() => sts.tuple(() => [BalanceOf, BalanceOf, BlockNumber])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export const EthereumAddress = sts.bytes() + +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: LookupSource, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: LookupSource, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: LookupSource, + dest: LookupSource, + value: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: LookupSource, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + } +}) + +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const BabeEquivocationProof: sts.Type = sts.struct(() => { + return { + offender: AuthorityId, + slotNumber: SlotNumber, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const SlotNumber = sts.bigint() + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V0: sts.unit(), + V1: NextConfigDescriptorV1, + } +}) + +export const NextConfigDescriptorV1: sts.Type = sts.struct(() => { + return { + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +export const AuthorityDiscoveryCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +export type Type_138 = Type_138_Auctions | Type_138_AuthorityDiscovery | Type_138_Authorship | Type_138_Babe | Type_138_Balances | Type_138_Bounties | Type_138_Claims | Type_138_Council | Type_138_Crowdloan | Type_138_Democracy | Type_138_ElectionProviderMultiPhase | Type_138_Gilt | Type_138_Grandpa | Type_138_Identity | Type_138_ImOnline | Type_138_Indices | Type_138_Multisig | Type_138_Offences | Type_138_ParachainsConfiguration | Type_138_Paras | Type_138_ParasDmp | Type_138_ParasHrmp | Type_138_ParasInclusion | Type_138_ParasInherent | Type_138_ParasInitializer | Type_138_ParasScheduler | Type_138_ParasSessionInfo | Type_138_ParasShared | Type_138_ParasUmp | Type_138_PhragmenElection | Type_138_Proxy | Type_138_Recovery | Type_138_Registrar | Type_138_Scheduler | Type_138_Session | Type_138_Slots | Type_138_Society | Type_138_Staking | Type_138_System | Type_138_TechnicalCommittee | Type_138_TechnicalMembership | Type_138_Timestamp | Type_138_Tips | Type_138_Treasury | Type_138_Utility | Type_138_Vesting | Type_138_XcmPallet + +export interface Type_138_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Type_138_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Type_138_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Type_138_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Type_138_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Type_138_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Type_138_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Type_138_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Type_138_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Type_138_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Type_138_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Type_138_Gilt { + __kind: 'Gilt' + value: GiltCall +} + +export interface Type_138_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Type_138_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Type_138_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Type_138_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Type_138_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Type_138_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Type_138_ParachainsConfiguration { + __kind: 'ParachainsConfiguration' + value: ParachainsConfigurationCall +} + +export interface Type_138_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Type_138_ParasDmp { + __kind: 'ParasDmp' + value: ParasDmpCall +} + +export interface Type_138_ParasHrmp { + __kind: 'ParasHrmp' + value: ParasHrmpCall +} + +export interface Type_138_ParasInclusion { + __kind: 'ParasInclusion' + value: ParasInclusionCall +} + +export interface Type_138_ParasInherent { + __kind: 'ParasInherent' + value: ParasInherentCall +} + +export interface Type_138_ParasInitializer { + __kind: 'ParasInitializer' + value: ParasInitializerCall +} + +export interface Type_138_ParasScheduler { + __kind: 'ParasScheduler' + value: ParasSchedulerCall +} + +export interface Type_138_ParasSessionInfo { + __kind: 'ParasSessionInfo' + value: ParasSessionInfoCall +} + +export interface Type_138_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Type_138_ParasUmp { + __kind: 'ParasUmp' + value: ParasUmpCall +} + +export interface Type_138_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Type_138_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Type_138_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Type_138_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Type_138_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Type_138_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Type_138_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Type_138_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Type_138_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Type_138_System { + __kind: 'System' + value: SystemCall +} + +export interface Type_138_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Type_138_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Type_138_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Type_138_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Type_138_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Type_138_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Type_138_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Type_138_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId = sts.bytes() diff --git a/squid/src/types/v9040.ts b/squid/src/types/v9040.ts new file mode 100644 index 00000000..34a96e98 --- /dev/null +++ b/squid/src/types/v9040.ts @@ -0,0 +1,9413 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Type_138: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + Gilt: GiltCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + ParachainsConfiguration: ParachainsConfigurationCall, + Paras: ParasCall, + ParasDmp: ParasDmpCall, + ParasHrmp: ParasHrmpCall, + ParasInclusion: ParasInclusionCall, + ParasInherent: ParasInherentCall, + ParasInitializer: ParasInitializerCall, + ParasScheduler: ParasSchedulerCall, + ParasSessionInfo: ParasSessionInfoCall, + ParasShared: ParasSharedCall, + ParasUmp: ParasUmpCall, + PhragmenElection: PhragmenElectionCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + XcmPallet: XcmPalletCall, + } +}) + +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + execute: sts.enumStruct({ + message: Xcm, + maxWeight: Weight, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: MultiLocation, + beneficiary: MultiLocation, + assets: sts.array(() => MultiAsset), + destWeight: Weight, + }), + send: sts.enumStruct({ + dest: MultiLocation, + message: Xcm, + }), + teleport_assets: sts.enumStruct({ + dest: MultiLocation, + beneficiary: MultiLocation, + assets: sts.array(() => MultiAsset), + destWeight: Weight, + }), + } +}) + +export const MultiAsset: sts.Type = sts.closedEnum(() => { + return { + AbstractFungible: sts.enumStruct({ + id: sts.bytes(), + instance: sts.bigint(), + }), + AbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + instance: AssetInstanceV0, + }), + All: sts.unit(), + AllAbstractFungible: sts.bytes(), + AllAbstractNonFungible: sts.bytes(), + AllConcreteFungible: MultiLocationV0, + AllConcreteNonFungible: MultiLocationV0, + AllFungible: sts.unit(), + AllNonFungible: sts.unit(), + ConcreteFungible: sts.enumStruct({ + id: MultiLocationV0, + amount: sts.bigint(), + }), + ConcreteNonFungible: sts.enumStruct({ + class: MultiLocationV0, + instance: AssetInstanceV0, + }), + None: sts.unit(), + } +}) + +export const MultiLocationV0: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: JunctionV0, + X2: sts.tuple(() => [JunctionV0, JunctionV0]), + X3: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0]), + X4: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X5: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X6: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X7: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X8: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + } +}) + +export const JunctionV0: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: NetworkId, + id: AccountId, + }), + AccountIndex64: sts.enumStruct({ + network: NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.bytes(), + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Parent: sts.unit(), + Plurality: sts.enumStruct({ + id: BodyId, + part: BodyPart, + }), + } +}) + +export const BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.number(), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export type BodyPart = BodyPart_AtLeastProportion | BodyPart_Fraction | BodyPart_Members | BodyPart_MoreThanProportion | BodyPart_Voice + +export interface BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface BodyPart_Members { + __kind: 'Members' + value: number +} + +export interface BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface BodyPart_Voice { + __kind: 'Voice' +} + +export const BodyId: sts.Type = sts.closedEnum(() => { + return { + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: sts.bytes(), + Technical: sts.unit(), + Unit: sts.unit(), + } +}) + +export type BodyId = BodyId_Executive | BodyId_Index | BodyId_Judicial | BodyId_Legislative | BodyId_Named | BodyId_Technical | BodyId_Unit + +export interface BodyId_Executive { + __kind: 'Executive' +} + +export interface BodyId_Index { + __kind: 'Index' + value: number +} + +export interface BodyId_Judicial { + __kind: 'Judicial' +} + +export interface BodyId_Legislative { + __kind: 'Legislative' +} + +export interface BodyId_Named { + __kind: 'Named' + value: Bytes +} + +export interface BodyId_Technical { + __kind: 'Technical' +} + +export interface BodyId_Unit { + __kind: 'Unit' +} + +export const NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: sts.bytes(), + Polkadot: sts.unit(), + } +}) + +export type NetworkId = NetworkId_Any | NetworkId_Kusama | NetworkId_Named | NetworkId_Polkadot + +export interface NetworkId_Any { + __kind: 'Any' +} + +export interface NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface NetworkId_Named { + __kind: 'Named' + value: Bytes +} + +export interface NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export type JunctionV0 = JunctionV0_AccountId32 | JunctionV0_AccountIndex64 | JunctionV0_AccountKey20 | JunctionV0_GeneralIndex | JunctionV0_GeneralKey | JunctionV0_OnlyChild | JunctionV0_PalletInstance | JunctionV0_Parachain | JunctionV0_Parent | JunctionV0_Plurality + +export interface JunctionV0_AccountId32 { + __kind: 'AccountId32' + network: NetworkId + id: AccountId +} + +export interface JunctionV0_AccountIndex64 { + __kind: 'AccountIndex64' + network: NetworkId + index: bigint +} + +export interface JunctionV0_AccountKey20 { + __kind: 'AccountKey20' + network: NetworkId + key: Bytes +} + +export interface JunctionV0_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface JunctionV0_GeneralKey { + __kind: 'GeneralKey' + value: Bytes +} + +export interface JunctionV0_OnlyChild { + __kind: 'OnlyChild' +} + +export interface JunctionV0_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface JunctionV0_Parachain { + __kind: 'Parachain' + value: number +} + +export interface JunctionV0_Parent { + __kind: 'Parent' +} + +export interface JunctionV0_Plurality { + __kind: 'Plurality' + id: BodyId + part: BodyPart +} + +export type AccountId = Bytes + +export type MultiLocationV0 = MultiLocationV0_Here | MultiLocationV0_X1 | MultiLocationV0_X2 | MultiLocationV0_X3 | MultiLocationV0_X4 | MultiLocationV0_X5 | MultiLocationV0_X6 | MultiLocationV0_X7 | MultiLocationV0_X8 + +export interface MultiLocationV0_Here { + __kind: 'Here' +} + +export interface MultiLocationV0_X1 { + __kind: 'X1' + value: JunctionV0 +} + +export interface MultiLocationV0_X2 { + __kind: 'X2' + value: [JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X3 { + __kind: 'X3' + value: [JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X4 { + __kind: 'X4' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X5 { + __kind: 'X5' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X6 { + __kind: 'X6' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X7 { + __kind: 'X7' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X8 { + __kind: 'X8' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export const AssetInstanceV0: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index128: sts.bigint(), + Index16: sts.number(), + Index32: sts.number(), + Index64: sts.bigint(), + Index8: sts.number(), + Undefined: sts.unit(), + } +}) + +export type AssetInstanceV0 = AssetInstanceV0_Array16 | AssetInstanceV0_Array32 | AssetInstanceV0_Array4 | AssetInstanceV0_Array8 | AssetInstanceV0_Blob | AssetInstanceV0_Index128 | AssetInstanceV0_Index16 | AssetInstanceV0_Index32 | AssetInstanceV0_Index64 | AssetInstanceV0_Index8 | AssetInstanceV0_Undefined + +export interface AssetInstanceV0_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface AssetInstanceV0_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface AssetInstanceV0_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface AssetInstanceV0_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface AssetInstanceV0_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface AssetInstanceV0_Index128 { + __kind: 'Index128' + value: bigint +} + +export interface AssetInstanceV0_Index16 { + __kind: 'Index16' + value: number +} + +export interface AssetInstanceV0_Index32 { + __kind: 'Index32' + value: number +} + +export interface AssetInstanceV0_Index64 { + __kind: 'Index64' + value: bigint +} + +export interface AssetInstanceV0_Index8 { + __kind: 'Index8' + value: number +} + +export interface AssetInstanceV0_Undefined { + __kind: 'Undefined' +} + +export type MultiAsset = MultiAsset_AbstractFungible | MultiAsset_AbstractNonFungible | MultiAsset_All | MultiAsset_AllAbstractFungible | MultiAsset_AllAbstractNonFungible | MultiAsset_AllConcreteFungible | MultiAsset_AllConcreteNonFungible | MultiAsset_AllFungible | MultiAsset_AllNonFungible | MultiAsset_ConcreteFungible | MultiAsset_ConcreteNonFungible | MultiAsset_None + +export interface MultiAsset_AbstractFungible { + __kind: 'AbstractFungible' + id: Bytes + instance: bigint +} + +export interface MultiAsset_AbstractNonFungible { + __kind: 'AbstractNonFungible' + class: Bytes + instance: AssetInstanceV0 +} + +export interface MultiAsset_All { + __kind: 'All' +} + +export interface MultiAsset_AllAbstractFungible { + __kind: 'AllAbstractFungible' + value: Bytes +} + +export interface MultiAsset_AllAbstractNonFungible { + __kind: 'AllAbstractNonFungible' + value: Bytes +} + +export interface MultiAsset_AllConcreteFungible { + __kind: 'AllConcreteFungible' + value: MultiLocationV0 +} + +export interface MultiAsset_AllConcreteNonFungible { + __kind: 'AllConcreteNonFungible' + value: MultiLocationV0 +} + +export interface MultiAsset_AllFungible { + __kind: 'AllFungible' +} + +export interface MultiAsset_AllNonFungible { + __kind: 'AllNonFungible' +} + +export interface MultiAsset_ConcreteFungible { + __kind: 'ConcreteFungible' + id: MultiLocationV0 + amount: bigint +} + +export interface MultiAsset_ConcreteNonFungible { + __kind: 'ConcreteNonFungible' + class: MultiLocationV0 + instance: AssetInstanceV0 +} + +export interface MultiAsset_None { + __kind: 'None' +} + +export const MultiLocation: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: JunctionV0, + X2: sts.tuple(() => [JunctionV0, JunctionV0]), + X3: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0]), + X4: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X5: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X6: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X7: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X8: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + } +}) + +export type MultiLocation = MultiLocation_Here | MultiLocation_X1 | MultiLocation_X2 | MultiLocation_X3 | MultiLocation_X4 | MultiLocation_X5 | MultiLocation_X6 | MultiLocation_X7 | MultiLocation_X8 + +export interface MultiLocation_Here { + __kind: 'Here' +} + +export interface MultiLocation_X1 { + __kind: 'X1' + value: JunctionV0 +} + +export interface MultiLocation_X2 { + __kind: 'X2' + value: [JunctionV0, JunctionV0] +} + +export interface MultiLocation_X3 { + __kind: 'X3' + value: [JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocation_X4 { + __kind: 'X4' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocation_X5 { + __kind: 'X5' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocation_X6 { + __kind: 'X6' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocation_X7 { + __kind: 'X7' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocation_X8 { + __kind: 'X8' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export const Weight = sts.bigint() + +export const Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: ResponseV0, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + RelayedFrom: sts.enumStruct({ + who: MultiLocationV0, + message: XcmV0, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + Transact: sts.enumStruct({ + originType: XcmOriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncodedCall, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + } +}) + +export const DoubleEncodedCall: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncodedCall { + encoded: Bytes +} + +export const XcmOriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type XcmOriginKind = XcmOriginKind_Native | XcmOriginKind_SovereignAccount | XcmOriginKind_Superuser | XcmOriginKind_Xcm + +export interface XcmOriginKind_Native { + __kind: 'Native' +} + +export interface XcmOriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface XcmOriginKind_Superuser { + __kind: 'Superuser' +} + +export interface XcmOriginKind_Xcm { + __kind: 'Xcm' +} + +export const XcmV0: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: ResponseV0, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + RelayedFrom: sts.enumStruct({ + who: MultiLocationV0, + message: XcmV0, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + Transact: sts.enumStruct({ + originType: XcmOriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncodedCall, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + } +}) + +export type XcmV0 = XcmV0_HrmpChannelAccepted | XcmV0_HrmpChannelClosing | XcmV0_HrmpNewChannelOpenRequest | XcmV0_QueryResponse | XcmV0_ReceiveTeleportedAsset | XcmV0_RelayedFrom | XcmV0_ReserveAssetDeposit | XcmV0_Transact | XcmV0_TransferAsset | XcmV0_TransferReserveAsset | XcmV0_WithdrawAsset + +export interface XcmV0_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface XcmV0_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface XcmV0_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface XcmV0_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: ResponseV0 +} + +export interface XcmV0_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export interface XcmV0_RelayedFrom { + __kind: 'RelayedFrom' + who: MultiLocationV0 + message: XcmV0 +} + +export interface XcmV0_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export interface XcmV0_Transact { + __kind: 'Transact' + originType: XcmOriginKind + requireWeightAtMost: bigint + call: DoubleEncodedCall +} + +export interface XcmV0_TransferAsset { + __kind: 'TransferAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 +} + +export interface XcmV0_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface XcmV0_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export type XcmOrderV0 = XcmOrderV0_BuyExecution | XcmOrderV0_DepositAsset | XcmOrderV0_DepositReserveAsset | XcmOrderV0_ExchangeAsset | XcmOrderV0_InitiateReserveWithdraw | XcmOrderV0_InitiateTeleport | XcmOrderV0_Null | XcmOrderV0_QueryHolding + +export interface XcmOrderV0_BuyExecution { + __kind: 'BuyExecution' + fees: MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: XcmV0[] +} + +export interface XcmOrderV0_DepositAsset { + __kind: 'DepositAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 +} + +export interface XcmOrderV0_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface XcmOrderV0_ExchangeAsset { + __kind: 'ExchangeAsset' + give: MultiAssetV0[] + receive: MultiAssetV0[] +} + +export interface XcmOrderV0_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: MultiAssetV0[] + reserve: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface XcmOrderV0_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: MultiAsset[] + dest: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface XcmOrderV0_Null { + __kind: 'Null' +} + +export interface XcmOrderV0_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: MultiLocationV0 + assets: MultiAssetV0[] +} + +export type MultiAssetV0 = MultiAssetV0_AbstractFungible | MultiAssetV0_AbstractNonFungible | MultiAssetV0_All | MultiAssetV0_AllAbstractFungible | MultiAssetV0_AllAbstractNonFungible | MultiAssetV0_AllConcreteFungible | MultiAssetV0_AllConcreteNonFungible | MultiAssetV0_AllFungible | MultiAssetV0_AllNonFungible | MultiAssetV0_ConcreteFungible | MultiAssetV0_ConcreteNonFungible | MultiAssetV0_None + +export interface MultiAssetV0_AbstractFungible { + __kind: 'AbstractFungible' + id: Bytes + instance: bigint +} + +export interface MultiAssetV0_AbstractNonFungible { + __kind: 'AbstractNonFungible' + class: Bytes + instance: AssetInstanceV0 +} + +export interface MultiAssetV0_All { + __kind: 'All' +} + +export interface MultiAssetV0_AllAbstractFungible { + __kind: 'AllAbstractFungible' + value: Bytes +} + +export interface MultiAssetV0_AllAbstractNonFungible { + __kind: 'AllAbstractNonFungible' + value: Bytes +} + +export interface MultiAssetV0_AllConcreteFungible { + __kind: 'AllConcreteFungible' + value: MultiLocationV0 +} + +export interface MultiAssetV0_AllConcreteNonFungible { + __kind: 'AllConcreteNonFungible' + value: MultiLocationV0 +} + +export interface MultiAssetV0_AllFungible { + __kind: 'AllFungible' +} + +export interface MultiAssetV0_AllNonFungible { + __kind: 'AllNonFungible' +} + +export interface MultiAssetV0_ConcreteFungible { + __kind: 'ConcreteFungible' + id: MultiLocationV0 + amount: bigint +} + +export interface MultiAssetV0_ConcreteNonFungible { + __kind: 'ConcreteNonFungible' + class: MultiLocationV0 + instance: AssetInstanceV0 +} + +export interface MultiAssetV0_None { + __kind: 'None' +} + +export type ResponseV0 = ResponseV0_Assets + +export interface ResponseV0_Assets { + __kind: 'Assets' + value: MultiAssetV0[] +} + +export const XcmOrderV0: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => XcmV0), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => MultiAssetV0), + receive: sts.array(() => MultiAssetV0), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + reserve: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => MultiAsset), + dest: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: MultiLocationV0, + assets: sts.array(() => MultiAssetV0), + }), + } +}) + +export const MultiAssetV0: sts.Type = sts.closedEnum(() => { + return { + AbstractFungible: sts.enumStruct({ + id: sts.bytes(), + instance: sts.bigint(), + }), + AbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + instance: AssetInstanceV0, + }), + All: sts.unit(), + AllAbstractFungible: sts.bytes(), + AllAbstractNonFungible: sts.bytes(), + AllConcreteFungible: MultiLocationV0, + AllConcreteNonFungible: MultiLocationV0, + AllFungible: sts.unit(), + AllNonFungible: sts.unit(), + ConcreteFungible: sts.enumStruct({ + id: MultiLocationV0, + amount: sts.bigint(), + }), + ConcreteNonFungible: sts.enumStruct({ + class: MultiLocationV0, + instance: AssetInstanceV0, + }), + None: sts.unit(), + } +}) + +export const ResponseV0: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => MultiAssetV0), + } +}) + +export type Xcm = Xcm_HrmpChannelAccepted | Xcm_HrmpChannelClosing | Xcm_HrmpNewChannelOpenRequest | Xcm_QueryResponse | Xcm_ReceiveTeleportedAsset | Xcm_RelayedFrom | Xcm_ReserveAssetDeposit | Xcm_Transact | Xcm_TransferAsset | Xcm_TransferReserveAsset | Xcm_WithdrawAsset + +export interface Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: ResponseV0 +} + +export interface Xcm_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export interface Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: MultiLocationV0 + message: XcmV0 +} + +export interface Xcm_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export interface Xcm_Transact { + __kind: 'Transact' + originType: XcmOriginKind + requireWeightAtMost: bigint + call: DoubleEncodedCall +} + +export interface Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 +} + +export interface Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export type XcmPalletCall = XcmPalletCall_execute | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets + +/** + * Execute an XCM message from a local, signed, origin. + * + * An event is deposited indicating whether `msg` could be executed completely or only + * partially. + * + * No more than `max_weight` will be used in its attempted execution. If this is less than the + * maximum amount of weight that the message could take to be executed, then no execution + * attempt will be made. + * + * NOTE: A successful return to this does *not* imply that the `msg` was executed successfully + * to completion; only that *some* of it was executed. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Xcm + maxWeight: Weight +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination chain and forward + * a notification XCM. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `dest_weight`: Equal to the total weight on `dest` of the XCM message + * `ReserveAssetDeposit { assets, effects: [ BuyExecution{..}, DepositAsset{..} ] }`. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: MultiLocation + beneficiary: MultiLocation + assets: MultiAsset[] + destWeight: Weight +} + +export interface XcmPalletCall_send { + __kind: 'send' + dest: MultiLocation + message: Xcm +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `dest_weight`: Equal to the total weight on `dest` of the XCM message + * `Teleport { assets, effects: [ BuyExecution{..}, DepositAsset{..} ] }`. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: MultiLocation + beneficiary: MultiLocation + assets: MultiAsset[] + destWeight: Weight +} + +export type Weight = bigint + +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: LookupSource, + target: LookupSource, + schedule: VestingInfo, + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: LookupSource, + }), + vested_transfer: sts.enumStruct({ + target: LookupSource, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: Balance, + perBlock: Balance, + startingBlock: BlockNumber, + } +}) + +export const BlockNumber = sts.number() + +export const Balance = sts.bigint() + +export interface VestingInfo { + locked: Balance + perBlock: Balance + startingBlock: BlockNumber +} + +export type BlockNumber = number + +export type Balance = bigint + +export const LookupSource: sts.Type = sts.closedEnum(() => { + return { + Address20: H160, + Address32: H256, + Id: AccountId, + Index: sts.number(), + Raw: sts.bytes(), + } +}) + +export const H256 = sts.bytes() + +export const H160 = sts.bytes() + +export type LookupSource = LookupSource_Address20 | LookupSource_Address32 | LookupSource_Id | LookupSource_Index | LookupSource_Raw + +export interface LookupSource_Address20 { + __kind: 'Address20' + value: H160 +} + +export interface LookupSource_Address32 { + __kind: 'Address32' + value: H256 +} + +export interface LookupSource_Id { + __kind: 'Id' + value: AccountId +} + +export interface LookupSource_Index { + __kind: 'Index' + value: number +} + +export interface LookupSource_Raw { + __kind: 'Raw' + value: Bytes +} + +export type H256 = Bytes + +export type H160 = Bytes + +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: LookupSource + target: LookupSource + schedule: VestingInfo +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: LookupSource +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: LookupSource + schedule: VestingInfo +} + +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Type_138, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Type_138), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Type_138), + }), + } +}) + +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Type_138 +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Type_138[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Type_138[] +} + +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: LookupSource, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + } +}) + +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: LookupSource +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +export const TipsCall: sts.Type = sts.closedEnum(() => { + return { + close_tip: sts.enumStruct({ + hash: Hash, + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + }), + retract_tip: sts.enumStruct({ + hash: Hash, + }), + slash_tip: sts.enumStruct({ + hash: Hash, + }), + tip: sts.enumStruct({ + hash: Hash, + tipValue: sts.bigint(), + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + tipValue: sts.bigint(), + }), + } +}) + +export const Hash = sts.bytes() + +export type TipsCall = TipsCall_close_tip | TipsCall_report_awesome | TipsCall_retract_tip | TipsCall_slash_tip | TipsCall_tip | TipsCall_tip_new + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`. + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TipsCall_close_tip { + __kind: 'close_tip' + hash: Hash +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TipsCall_retract_tip { + __kind: 'retract_tip' + hash: Hash +} + +/** + * Remove and slash an already-open tip. + * + * May only be called from `T::RejectOrigin`. + * + * As a result, the finder is slashed and the deposits are lost. + * + * Emits `TipSlashed` if successful. + * + * # + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * # + */ +export interface TipsCall_slash_tip { + __kind: 'slash_tip' + hash: Hash +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`, insert tip and check closing, + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TipsCall_tip { + __kind: 'tip' + hash: Hash + tipValue: bigint +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T` + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId + tipValue: bigint +} + +export type Hash = Bytes + +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId, + }), + change_key: sts.enumStruct({ + new: AccountId, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId), + }), + set_prime: sts.enumStruct({ + who: AccountId, + }), + swap_member: sts.enumStruct({ + remove: AccountId, + add: AccountId, + }), + } +}) + +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId + add: AccountId +} + +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const MemberCount = sts.number() + +export const Proposal: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + Gilt: GiltCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + ParachainsConfiguration: ParachainsConfigurationCall, + Paras: ParasCall, + ParasDmp: ParasDmpCall, + ParasHrmp: ParasHrmpCall, + ParasInclusion: ParasInclusionCall, + ParasInherent: ParasInherentCall, + ParasInitializer: ParasInitializerCall, + ParasScheduler: ParasSchedulerCall, + ParasSessionInfo: ParasSessionInfoCall, + ParasShared: ParasSharedCall, + ParasUmp: ParasUmpCall, + PhragmenElection: PhragmenElectionCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + XcmPallet: XcmPalletCall, + } +}) + +export type Proposal = Proposal_Auctions | Proposal_AuthorityDiscovery | Proposal_Authorship | Proposal_Babe | Proposal_Balances | Proposal_Bounties | Proposal_Claims | Proposal_Council | Proposal_Crowdloan | Proposal_Democracy | Proposal_ElectionProviderMultiPhase | Proposal_Gilt | Proposal_Grandpa | Proposal_Identity | Proposal_ImOnline | Proposal_Indices | Proposal_Multisig | Proposal_Offences | Proposal_ParachainsConfiguration | Proposal_Paras | Proposal_ParasDmp | Proposal_ParasHrmp | Proposal_ParasInclusion | Proposal_ParasInherent | Proposal_ParasInitializer | Proposal_ParasScheduler | Proposal_ParasSessionInfo | Proposal_ParasShared | Proposal_ParasUmp | Proposal_PhragmenElection | Proposal_Proxy | Proposal_Recovery | Proposal_Registrar | Proposal_Scheduler | Proposal_Session | Proposal_Slots | Proposal_Society | Proposal_Staking | Proposal_System | Proposal_TechnicalCommittee | Proposal_TechnicalMembership | Proposal_Timestamp | Proposal_Tips | Proposal_Treasury | Proposal_Utility | Proposal_Vesting | Proposal_XcmPallet + +export interface Proposal_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Proposal_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Proposal_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Proposal_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Proposal_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Proposal_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Proposal_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Proposal_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Proposal_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Proposal_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Proposal_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Proposal_Gilt { + __kind: 'Gilt' + value: GiltCall +} + +export interface Proposal_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Proposal_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Proposal_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Proposal_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Proposal_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Proposal_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Proposal_ParachainsConfiguration { + __kind: 'ParachainsConfiguration' + value: ParachainsConfigurationCall +} + +export interface Proposal_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Proposal_ParasDmp { + __kind: 'ParasDmp' + value: ParasDmpCall +} + +export interface Proposal_ParasHrmp { + __kind: 'ParasHrmp' + value: ParasHrmpCall +} + +export interface Proposal_ParasInclusion { + __kind: 'ParasInclusion' + value: ParasInclusionCall +} + +export interface Proposal_ParasInherent { + __kind: 'ParasInherent' + value: ParasInherentCall +} + +export interface Proposal_ParasInitializer { + __kind: 'ParasInitializer' + value: ParasInitializerCall +} + +export interface Proposal_ParasScheduler { + __kind: 'ParasScheduler' + value: ParasSchedulerCall +} + +export interface Proposal_ParasSessionInfo { + __kind: 'ParasSessionInfo' + value: ParasSessionInfoCall +} + +export interface Proposal_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Proposal_ParasUmp { + __kind: 'ParasUmp' + value: ParasUmpCall +} + +export interface Proposal_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Proposal_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Proposal_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Proposal_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Proposal_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Proposal_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Proposal_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Proposal_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Proposal_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Proposal_System { + __kind: 'System' + value: SystemCall +} + +export interface Proposal_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Proposal_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Proposal_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Proposal_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Proposal_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Proposal_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Proposal_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Proposal_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_changes_trie_config | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + * + * # + * - `O(P)` where `P` amount of keys with prefix `prefix` + * - `P` storage deletions. + * - Base Weight: 0.834 * P µs + * - Writes: Number of subkeys + 1 + * # + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Key + subkeys: number +} + +/** + * Kill some items from storage. + * + * # + * - `O(IK)` where `I` length of `keys` and `K` length of one key + * - `I` storage deletions. + * - Base Weight: .378 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Key[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Make some on-chain remark and emit event. + * + * # + * - `O(b)` where b is the length of the remark. + * - 1 event. + * # + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * Set the new changes trie configuration. + * + * # + * - `O(1)` + * - 1 storage write or delete (codec `O(1)`). + * - 1 call to `deposit_log`: Uses `append` API, so O(1) + * - Base Weight: 7.218 µs + * - DB Weight: + * - Writes: Changes Trie, System Digest + * # + */ +export interface SystemCall_set_changes_trie_config { + __kind: 'set_changes_trie_config' + changesTrieConfig?: (ChangesTrieConfiguration | undefined) +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 storage write (codec `O(C)`). + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is expensive). + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very expensive. + * We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + * + * # + * - `O(1)` + * - 1 storage write. + * - Base Weight: 1.405 µs + * - 1 write to HEAP_PAGES + * # + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + * + * # + * - `O(I)` where `I` length of `items` + * - `I` storage writes (`O(1)`). + * - Base Weight: 0.568 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: KeyValue[] +} + +export type KeyValue = [StorageKey, StorageData] + +export type StorageData = Bytes + +export type StorageKey = Bytes + +export interface ChangesTrieConfiguration { + digestInterval: number + digestLevels: number +} + +export type Key = Bytes + +export type Perbill = number + +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger, [Origin Account], Current Era, History Depth, Locks + * - Write: Bonded, Payee, [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: LookupSource + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount + * that can be added. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller and + * it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * - One DB entry. + * ------------ + * DB Weight: + * - Read: Era Election Status, Bonded, Ledger, [Origin Account], Locks + * - Write: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + * + * # + * Complexity: O(U + S) + * with U unapplied slashes weighted with U=1000 + * and S is the number of slash indices to be canceled. + * - Read: Unapplied Slashes + * - Write: Unapplied Slashes + * # + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: EraIndex + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * -------- + * Weight: O(1) + * DB Weight: + * - Read: EraElectionStatus, Ledger + * - Write: Validators, Nominators + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + * + * # + * O(S) where S is the number of slashing spans to be removed + * Reads: Bonded, Slashing Spans, Account, Locks + * Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Account, Locks + * Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Same as [`set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. The controller + * account should represent a validator. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: LookupSource[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. This can only be called when + * [`EraElectionStatus`] is `Closed`. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS). + * - Both the reads and writes follow a similar pattern. + * --------- + * Weight: O(N) + * where N is the number of targets + * DB Weight: + * - Reads: Era Election Status, Ledger, Current Era + * - Writes: Validators, Nominators + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: LookupSource[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * This can only be called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * DB Weight: + * - Read: EraElectionStatus, CurrentEra, HistoryDepth, ErasValidatorReward, + * ErasStakersClipped, ErasRewardPoints, ErasValidatorPrefs (8 items) + * - Read Each: Bonded, Ledger, Payee, Locks, System Account (5 items) + * - Write Each: System Account, Locks, Ledger (3 items) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId + era: EraIndex +} + +/** + * Remove all data structure concerning a staker/stash once its balance is at the minimum. + * This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone + * and the target `stash` must have no funds left beyond the ED. + * + * This can be called from any origin. + * + * - `stash`: The stash account to reap. Its balance must be zero. + * + * # + * Complexity: O(S) where S is the number of slashing spans on the account. + * DB Weight: + * - Reads: Stash Account, Bonded, Slashing Spans, Locks + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Stash Account, Locks + * - Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller, and it can be only called when + * [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MAX_UNLOCKING_CHUNKS`. + * - Storage changes: Can't increase storage, only decrease it. + * --------------- + * - DB Weight: + * - Reads: EraElectionStatus, Ledger, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Same as [`set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: LookupSource +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. + * This should report all the storage items that will be deleted by clearing old + * era history. Needed to report an accurate weight for the dispatch. Trusted by + * `Root` to report an accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Weight: O(E) + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + * + * # + * - O(V) + * - Write: Invulnerables + * # + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + * + * # + * - Independent of the arguments. Limited but potentially exploitable complexity. + * - Contains a limited number of reads. + * - Each call (requires the remainder of the bonded balance to be above `minimum_balance`) + * will cause a new entry to be inserted into a vector (`Ledger.unlocking`) kept in storage. + * The only way to clean the aforementioned storage item is also user-controlled via + * `withdraw_unbonded`. + * - One DB entry. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: EraElectionStatus, Ledger, CurrentEra, Locks, BalanceOf Stash, + * - Write: Locks, Ledger, BalanceOf Stash, + * + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ----------- + * Weight: O(1) + * DB Weight: + * - Read: Era Election Status, Ledger + * - Write: Nominators, Validators + * # + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * - Could be dependent on the `origin` argument and how much `unlocking` chunks exist. + * It implies `consolidate_unlocked` which loops over `Ledger.unlocking`, which is + * indirectly user-controlled. See [`unbond`] for more detail. + * - Contains a limited number of reads, yet the size of which could be large based on `ledger`. + * - Writes are limited to the `origin` account key. + * --------------- + * Complexity O(S) where S is the number of slashing spans to remove + * Update: + * - Reads: EraElectionStatus, Ledger, Current Era, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * Kill: + * - Reads: EraElectionStatus, Ledger, Current Era, Bonded, Slashing Spans, [Origin + * Account], Locks, BalanceOf stash + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, + * [Origin Account], Locks, BalanceOf stash. + * - Writes Each: SpanSlash * S + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export type Percent = number + +export type EraIndex = number + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: BalanceOf +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * module to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId + judgement: SocietyJudgement +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin + * forgives (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: LookupSource + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId + value: BalanceOf + tip: BalanceOf +} + +export type SocietyJudgement = SocietyJudgement_Approve | SocietyJudgement_Rebid | SocietyJudgement_Reject + +export interface SocietyJudgement_Approve { + __kind: 'Approve' +} + +export interface SocietyJudgement_Rebid { + __kind: 'Rebid' +} + +export interface SocietyJudgement_Reject { + __kind: 'Reject' +} + +export type BalanceOf = bigint + +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * Clear all leases for a Para Id, refunding any deposits back to the original owners. + * + * Can only be called by the Root origin. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: ParaId +} + +/** + * Just a hotwire into the `lease_out` call, in case Root wants to force some lease to happen + * independently of any other on-chain mechanism to use it. + * + * Can only be called by the Root origin. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: ParaId + leaser: AccountId + amount: BalanceOf + periodBegin: LeasePeriodOf + periodCount: LeasePeriodOf +} + +/** + * Try to onboard a parachain that has a lease for the current lease period. + * + * This function can be useful if there was some state issue with a para that should + * have onboarded, but was unable to. As long as they have a lease period, we can + * let them onboard from here. + * + * Origin must be signed, but can be called by anyone. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: ParaId +} + +export type LeasePeriodOf = number + +export type ParaId = number + +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` in number of key types. + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwnder` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: Keys + proof: Bytes +} + +export type Keys = [AccountId, AccountId, AccountId, AccountId, AccountId, AccountId] + +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.15 + 2.869 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: BlockNumber + index: number +} + +/** + * Cancel a named scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 24.91 + 2.907 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.29 + .126 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda + * - Will use base weight of 25 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_138 +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_138 +} + +/** + * Schedule a named task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 29.6 + .159 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 35 which should be good for more than 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_138 +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`]. + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_138 +} + +export type Priority = number + +export type Period = [BlockNumber, number] + +export type RegistrarCall = RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_force_remove_lock | RegistrarCall_register | RegistrarCall_reserve | RegistrarCall_swap + +/** + * Deregister a Para Id, freeing all data and returning any deposit. + * + * The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: ParaId +} + +/** + * Force the registration of a Para Id on the relay chain. + * + * This function must be called by a Root origin. + * + * The deposit taken can be specified for this registration. Any ParaId + * can be registered, including sub-1000 IDs which are System Parachains. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId + deposit: BalanceOf + id: ParaId + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Remove a manager lock from a para. This will allow the manager of a + * previously locked para to deregister or swap a para without using governance. + * + * Can only be called by the Root origin. + */ +export interface RegistrarCall_force_remove_lock { + __kind: 'force_remove_lock' + para: ParaId +} + +/** + * Register head data and validation code for a reserved Para Id. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. + * - `id`: The para ID. Must be owned/managed by the `origin` signing account. + * - `genesis_head`: The genesis head data of the parachain/thread. + * - `validation_code`: The initial validation code of the parachain/thread. + * + * ## Deposits/Fees + * The origin signed account must reserve a corresponding deposit for the registration. Anything already + * reserved previously for this para ID is accounted for. + * + * ## Events + * The `Registered` event is emitted in case of success. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: ParaId + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Reserve a Para Id on the relay chain. + * + * This function will reserve a new Para Id to be owned/managed by the origin account. + * The origin account is able to register head data and validation code using `register` to create + * a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID. + * + * ## Deposits/Fees + * The origin must reserve a deposit of `ParaDeposit` for the registration. + * + * ## Events + * The `Reserved` event is emitted in case of success, which provides the ID reserved for use. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * Swap a parachain with another parachain or parathread. + * + * The origin must be Root, the `para` owner, or the `para` itself. + * + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: ParaId + other: ParaId +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + * + * # + * - The weight of the `call` + 10,000. + * - One storage lookup to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId + call: Type_138 +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + * + * # + * - One storage mutation to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully + * recovered by you. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + V) + * # + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + * + * # + * Key: V (len of vouching friends) + * - One storage read/remove to get the active recovery process. O(1), Codec O(V) + * - One balance call to repatriate reserved. O(X) + * - One event. + * + * Total Complexity: O(V + X) + * # + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. + * Should be ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt + * before the account can be recovered. Should be less than or equal to + * the length of the list of friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized + * that needs to pass before the account can be recovered. + * + * # + * - Key: F (len of friends) + * - One storage read to check that account is not already recoverable. O(1). + * - A check that the friends list is sorted and unique. O(F) + * - One currency reserve operation. O(X) + * - One storage write. O(1). Codec O(F). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId[] + threshold: number + delayPeriod: BlockNumber +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account + * needs to be recoverable (i.e. have a recovery configuration). + * + * # + * - One storage read to check that account is recoverable. O(F) + * - One storage read to check that this recovery process hasn't already started. O(1) + * - One currency reserve operation. O(X) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + * + * # + * Key: F (len of friends) + * - One storage read to get the prefix iterator for active recoveries. O(1) + * - One storage read/remove to get the recovery configuration. O(1), Codec O(F) + * - One balance call to unreserved. O(X) + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + * + * # + * - One storage write O(1) + * - One event + * # + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId + rescuer: AccountId +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you + * want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One binary search to confirm caller is a friend. O(logF) + * - One binary search to confirm caller has not already vouched. O(logV) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + logF + V + logV) + * # + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId + rescuer: AccountId +} + +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: AccountId + proxyType: ProxyType + delay: BlockNumber +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: AccountId + callHash: CallHashOf +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + * TODO: Might be over counting 1 read + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: BlockNumber + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_138 +} + +/** + * Dispatch the given `call` from an account that the sender is authorized for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: AccountId + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_138 +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: AccountId + callHash: CallHashOf +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: AccountId + callHash: CallHashOf +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: AccountId + proxyType: ProxyType + delay: BlockNumber +} + +export type CallHashOf = Bytes + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +export type PhragmenElectionCall = PhragmenElectionCall_clean_defunct_voters | PhragmenElectionCall_remove_member | PhragmenElectionCall_remove_voter | PhragmenElectionCall_renounce_candidacy | PhragmenElectionCall_submit_candidacy | PhragmenElectionCall_vote + +/** + * Clean all voters who are defunct (i.e. they do not serve any purpose at all). The + * deposit of the removed voters are returned. + * + * This is an root function to be used only for cleaning the state. + * + * The dispatch origin of this call must be root. + * + * # + * The total number of voters and those that are defunct must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_clean_defunct_voters { + __kind: 'clean_defunct_voters' + numVoters: number + numDefunct: number +} + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, a new phragmen election is started. + * + * The dispatch origin of this call must be root. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement, we use a small weight. Else, since this is a root call and + * will go into phragmen, we assume full block for now. + * # + */ +export interface PhragmenElectionCall_remove_member { + __kind: 'remove_member' + who: LookupSource + hasReplacement: boolean +} + +/** + * Remove `origin` as a voter. + * + * This removes the lock and returns the deposit. + * + * The dispatch origin of this call must be signed and be a voter. + */ +export interface PhragmenElectionCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * + * - `origin` is a candidate and not elected in any set. In this case, the deposit is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the deposit is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the deposit is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_members`], if replacement runners exists, they are immediately + * used. If the prime is renouncing, then no prime will exist until the next round. + * + * The dispatch origin of this call must be signed, and have one of the above roles. + * + * # + * The type of renouncing must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Submit oneself for candidacy. A fixed amount of deposit is recorded. + * + * All candidates are wiped at the end of the term. They either become a member/runner-up, + * or leave the system while their deposit is slashed. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`] + * to get their deposit back. Losing the spot in an election will always lead to a slash. + * + * # + * The number of current candidates must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is + * reserved. The deposit is based on the number of votes and can be updated over time. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * If `value` is more than `who`'s total balance, then the maximum of the two is used. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * It is the responsibility of the caller to **NOT** place all of their balance into the + * lock and keep some for further operations. + * + * # + * We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less. + * # + */ +export interface PhragmenElectionCall_vote { + __kind: 'vote' + votes: AccountId[] + value: bigint +} + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +export type ParasUmpCall = never + +export type ParasSharedCall = never + +export type ParasSessionInfoCall = never + +export type ParasSchedulerCall = never + +export type ParasInitializerCall = ParasInitializerCall_force_approve + +/** + * Issue a signal to the consensus engine to forcibly act as though all parachain + * blocks in all relay chain blocks up to and including the given number in the current + * chain are valid and should be finalized. + */ +export interface ParasInitializerCall_force_approve { + __kind: 'force_approve' + upTo: BlockNumber +} + +export type ParasInherentCall = ParasInherentCall_enter + +/** + * Enter the paras inherent. This will process bitfields and backed candidates. + */ +export interface ParasInherentCall_enter { + __kind: 'enter' + data: ParachainsInherentData +} + +export interface ParachainsInherentData { + bitfields: SignedAvailabilityBitfield[] + backedCandidates: BackedCandidate[] + disputes: DisputeStatementSet[] + parentHeader: Header +} + +export interface Header { + parentHash: Hash + number: number + stateRoot: Hash + extrinsicsRoot: Hash + digest: Digest +} + +export interface Digest { + logs: DigestItem[] +} + +export type DigestItem = DigestItem_AuthoritiesChange | DigestItem_ChangesTrieRoot | DigestItem_ChangesTrieSignal | DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal | DigestItem_SealV0 + +export interface DigestItem_AuthoritiesChange { + __kind: 'AuthoritiesChange' + value: AuthorityId[] +} + +export interface DigestItem_ChangesTrieRoot { + __kind: 'ChangesTrieRoot' + value: Hash +} + +export interface DigestItem_ChangesTrieSignal { + __kind: 'ChangesTrieSignal' + value: ChangesTrieSignal +} + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: Consensus +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: PreRuntime +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: Seal +} + +export interface DigestItem_SealV0 { + __kind: 'SealV0' + value: SealV0 +} + +export type SealV0 = [bigint, Signature] + +export type Signature = Bytes + +export type Seal = [ConsensusEngineId, Bytes] + +export type PreRuntime = [ConsensusEngineId, Bytes] + +export type Consensus = [ConsensusEngineId, Bytes] + +export type ConsensusEngineId = Bytes + +export type ChangesTrieSignal = ChangesTrieSignal_NewConfiguration + +export interface ChangesTrieSignal_NewConfiguration { + __kind: 'NewConfiguration' + value?: (ChangesTrieConfiguration | undefined) +} + +export type AuthorityId = Bytes + +export interface DisputeStatementSet { + candidateHash: CandidateHash + session: SessionIndex + statements: [DisputeStatement, ParaValidatorIndex, ValidatorSignature][] +} + +export type ValidatorSignature = Bytes + +export type ParaValidatorIndex = number + +export type DisputeStatement = DisputeStatement_Invalid | DisputeStatement_Valid + +export interface DisputeStatement_Invalid { + __kind: 'Invalid' + value: InvalidDisputeStatementKind +} + +export interface DisputeStatement_Valid { + __kind: 'Valid' + value: ValidDisputeStatementKind +} + +export type ValidDisputeStatementKind = ValidDisputeStatementKind_ApprovalChecking | ValidDisputeStatementKind_BackingSeconded | ValidDisputeStatementKind_BackingValid | ValidDisputeStatementKind_Explicit + +export interface ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: Hash +} + +export interface ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: Hash +} + +export interface ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type InvalidDisputeStatementKind = InvalidDisputeStatementKind_Explicit + +export interface InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type SessionIndex = number + +export type CandidateHash = Bytes + +export interface BackedCandidate { + candidate: CommittedCandidateReceipt + validityVotes: ValidityAttestation[] + validatorIndices: BitSequence +} + +export type ValidityAttestation = ValidityAttestation_Explicit | ValidityAttestation_Implicit | ValidityAttestation_Never + +export interface ValidityAttestation_Explicit { + __kind: 'Explicit' + value: ValidatorSignature +} + +export interface ValidityAttestation_Implicit { + __kind: 'Implicit' + value: ValidatorSignature +} + +export interface ValidityAttestation_Never { + __kind: 'Never' +} + +export interface CommittedCandidateReceipt { + descriptor: CandidateDescriptor + commitments: CandidateCommitments +} + +export interface CandidateCommitments { + upwardMessages: UpwardMessage[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: BlockNumber +} + +export interface OutboundHrmpMessage { + recipient: number + data: Bytes +} + +export type UpwardMessage = Bytes + +export interface CandidateDescriptor { + paraId: ParaId + relayParent: RelayChainHash + collatorId: CollatorId + persistedValidationDataHash: Hash + povHash: Hash + erasureRoot: Hash + signature: CollatorSignature + paraHead: Hash + validationCodeHash: ValidationCodeHash +} + +export type ValidationCodeHash = Bytes + +export type CollatorSignature = Bytes + +export type CollatorId = Bytes + +export type RelayChainHash = Bytes + +export interface SignedAvailabilityBitfield { + payload: BitSequence + validatorIndex: ParaValidatorIndex + signature: ValidatorSignature +} + +export type ParasInclusionCall = never + +export type ParasHrmpCall = ParasHrmpCall_force_clean_hrmp | ParasHrmpCall_force_process_hrmp_close | ParasHrmpCall_force_process_hrmp_open | ParasHrmpCall_hrmp_accept_open_channel | ParasHrmpCall_hrmp_close_channel | ParasHrmpCall_hrmp_init_open_channel + +/** + * This extrinsic triggers the cleanup of all the HRMP storage items that + * a para may have. Normally this happens once per session, but this allows + * you to trigger the cleanup immediately for a specific parachain. + * + * Origin must be Root. + */ +export interface ParasHrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: ParaId +} + +/** + * Force process hrmp close channel requests. + * + * If there are pending HRMP close channel requests, you can use this + * function process all of those requests immediately. + */ +export interface ParasHrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' +} + +/** + * Force process hrmp open channel requests. + * + * If there are pending HRMP open channel requests, you can use this + * function process all of those requests immediately. + */ +export interface ParasHrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' +} + +/** + * Accept a pending open channel request from the given sender. + * + * The channel will be opened only on the next session boundary. + */ +export interface ParasHrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: ParaId +} + +/** + * Initiate unilateral closing of a channel. The origin must be either the sender or the + * recipient in the channel being closed. + * + * The closure can only happen on a session change. + */ +export interface ParasHrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * Initiate opening a channel from a parachain to a given recipient with given channel + * parameters. + * + * - `proposed_max_capacity` - specifies how many messages can be in the channel at once. + * - `proposed_max_message_size` - specifies the maximum size of any of the messages. + * + * These numbers are a subject to the relay-chain configuration limits. + * + * The channel can be opened only after the recipient confirms it and only on a session + * change. + */ +export interface ParasHrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: ParaId + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +export interface HrmpChannelId { + sender: number + receiver: number +} + +export type ParasDmpCall = never + +export type ParasCall = ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head + +/** + * Note a new block head for para within the context of the current block. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: ParaId + newHead: HeadData +} + +/** + * Put a parachain directly into the next session's action queue. + * We can't queue it any sooner than this without going into the + * initializer... + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: ParaId +} + +/** + * Schedule a code upgrade for block `expected_at`. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: ParaId + newCode: ValidationCode + expectedAt: BlockNumber +} + +/** + * Set the storage for the parachain validation code immediately. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: ParaId + newCode: ValidationCode +} + +/** + * Set the storage for the current parachain head data immediately. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: ParaId + newHead: HeadData +} + +export type ParachainsConfigurationCall = ParachainsConfigurationCall_set_chain_availability_period | ParachainsConfigurationCall_set_code_retention_period | ParachainsConfigurationCall_set_dispute_conclusion_by_time_out_period | ParachainsConfigurationCall_set_dispute_max_spam_slots | ParachainsConfigurationCall_set_dispute_period | ParachainsConfigurationCall_set_dispute_post_conclusion_acceptance_period | ParachainsConfigurationCall_set_group_rotation_frequency | ParachainsConfigurationCall_set_hrmp_channel_max_capacity | ParachainsConfigurationCall_set_hrmp_channel_max_message_size | ParachainsConfigurationCall_set_hrmp_channel_max_total_size | ParachainsConfigurationCall_set_hrmp_max_message_num_per_candidate | ParachainsConfigurationCall_set_hrmp_max_parachain_inbound_channels | ParachainsConfigurationCall_set_hrmp_max_parachain_outbound_channels | ParachainsConfigurationCall_set_hrmp_max_parathread_inbound_channels | ParachainsConfigurationCall_set_hrmp_max_parathread_outbound_channels | ParachainsConfigurationCall_set_hrmp_open_request_ttl | ParachainsConfigurationCall_set_hrmp_recipient_deposit | ParachainsConfigurationCall_set_hrmp_sender_deposit | ParachainsConfigurationCall_set_max_code_size | ParachainsConfigurationCall_set_max_downward_message_size | ParachainsConfigurationCall_set_max_head_data_size | ParachainsConfigurationCall_set_max_pov_size | ParachainsConfigurationCall_set_max_upward_message_num_per_candidate | ParachainsConfigurationCall_set_max_upward_message_size | ParachainsConfigurationCall_set_max_upward_queue_count | ParachainsConfigurationCall_set_max_upward_queue_size | ParachainsConfigurationCall_set_max_validators | ParachainsConfigurationCall_set_max_validators_per_core | ParachainsConfigurationCall_set_n_delay_tranches | ParachainsConfigurationCall_set_needed_approvals | ParachainsConfigurationCall_set_no_show_slots | ParachainsConfigurationCall_set_parathread_cores | ParachainsConfigurationCall_set_parathread_retries | ParachainsConfigurationCall_set_relay_vrf_modulo_samples | ParachainsConfigurationCall_set_scheduling_lookahead | ParachainsConfigurationCall_set_thread_availability_period | ParachainsConfigurationCall_set_ump_service_total_weight | ParachainsConfigurationCall_set_validation_upgrade_delay | ParachainsConfigurationCall_set_validation_upgrade_frequency | ParachainsConfigurationCall_set_zeroth_delay_tranche_width + +/** + * Set the availability period for parachains. + */ +export interface ParachainsConfigurationCall_set_chain_availability_period { + __kind: 'set_chain_availability_period' + new: BlockNumber +} + +/** + * Set the acceptance period for an included candidate. + */ +export interface ParachainsConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: BlockNumber +} + +/** + * Set the dispute conclusion by time out period. + */ +export interface ParachainsConfigurationCall_set_dispute_conclusion_by_time_out_period { + __kind: 'set_dispute_conclusion_by_time_out_period' + new: BlockNumber +} + +/** + * Set the maximum number of dispute spam slots. + */ +export interface ParachainsConfigurationCall_set_dispute_max_spam_slots { + __kind: 'set_dispute_max_spam_slots' + new: number +} + +/** + * Set the dispute period, in number of sessions to keep for disputes. + */ +export interface ParachainsConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: SessionIndex +} + +/** + * Set the dispute post conclusion acceptance period. + */ +export interface ParachainsConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: BlockNumber +} + +/** + * Set the parachain validator-group rotation frequency + */ +export interface ParachainsConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: BlockNumber +} + +/** + * Sets the maximum number of messages allowed in an HRMP channel at once. + */ +export interface ParachainsConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * Sets the maximum size of a message that could ever be put into an HRMP channel. + */ +export interface ParachainsConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * Sets the maximum total size of messages in bytes allowed in an HRMP channel at once. + */ +export interface ParachainsConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * Sets the maximum number of outbound HRMP messages can be sent by a candidate. + */ +export interface ParachainsConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parachain is allowed to accept. + */ +export interface ParachainsConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parachain is allowed to open. + */ +export interface ParachainsConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parathread is allowed to accept. + */ +export interface ParachainsConfigurationCall_set_hrmp_max_parathread_inbound_channels { + __kind: 'set_hrmp_max_parathread_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parathread is allowed to open. + */ +export interface ParachainsConfigurationCall_set_hrmp_max_parathread_outbound_channels { + __kind: 'set_hrmp_max_parathread_outbound_channels' + new: number +} + +/** + * Sets the number of sessions after which an HRMP open channel request expires. + */ +export interface ParachainsConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * Sets the amount of funds that the recipient should provide for accepting opening an HRMP + * channel. + */ +export interface ParachainsConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: Balance +} + +/** + * Sets the amount of funds that the sender should provide for opening an HRMP channel. + */ +export interface ParachainsConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: Balance +} + +/** + * Set the max validation code size for incoming upgrades. + */ +export interface ParachainsConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * Set the critical downward message size. + */ +export interface ParachainsConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * Set the max head data size for paras. + */ +export interface ParachainsConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * Set the max POV block size for incoming upgrades. + */ +export interface ParachainsConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * Sets the maximum number of messages that a candidate can contain. + */ +export interface ParachainsConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum size of an upward message that can be sent by a candidate. + */ +export interface ParachainsConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * Sets the maximum items that can present in a upward dispatch queue at once. + */ +export interface ParachainsConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * Sets the maximum total size of items that can present in a upward dispatch queue at once. + */ +export interface ParachainsConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * Set the maximum number of validators to use in parachain consensus. + */ +export interface ParachainsConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * Set the maximum number of validators to assign to any core. + */ +export interface ParachainsConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * Set the total number of delay tranches. + */ +export interface ParachainsConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * Set the number of validators needed to approve a block. + */ +export interface ParachainsConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * Set the no show slots, in number of number of consensus slots. + * Must be at least 1. + */ +export interface ParachainsConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * Set the number of parathread execution cores. + */ +export interface ParachainsConfigurationCall_set_parathread_cores { + __kind: 'set_parathread_cores' + new: number +} + +/** + * Set the number of retries for a particular parathread. + */ +export interface ParachainsConfigurationCall_set_parathread_retries { + __kind: 'set_parathread_retries' + new: number +} + +/** + * Set the number of samples to do of the RelayVRFModulo approval assignment criterion. + */ +export interface ParachainsConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * Set the scheduling lookahead, in expected number of blocks at peak throughput. + */ +export interface ParachainsConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * Set the availability period for parathreads. + */ +export interface ParachainsConfigurationCall_set_thread_availability_period { + __kind: 'set_thread_availability_period' + new: BlockNumber +} + +/** + * Sets the soft limit for the phase of dispatching dispatchable upward messages. + */ +export interface ParachainsConfigurationCall_set_ump_service_total_weight { + __kind: 'set_ump_service_total_weight' + new: Weight +} + +/** + * Set the validation upgrade delay. + */ +export interface ParachainsConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: BlockNumber +} + +/** + * Set the validation upgrade frequency. + */ +export interface ParachainsConfigurationCall_set_validation_upgrade_frequency { + __kind: 'set_validation_upgrade_frequency' + new: BlockNumber +} + +/** + * Set the zeroth delay tranche width. + */ +export interface ParachainsConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +export type OffencesCall = never + +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + call: OpaqueCall + storeCall: boolean + maxWeight: Weight +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId[] + call: Type_138 +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId[] + timepoint: Timepoint + callHash: Bytes +} + +export type OpaqueCall = Bytes + +export interface Timepoint { + height: BlockNumber + index: number +} + +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: AccountIndex +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId + index: AccountIndex + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: AccountIndex +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: AccountIndex +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId + index: AccountIndex +} + +export type AccountIndex = number + +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) + * and E is length of `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Signature +} + +export interface Heartbeat { + blockNumber: BlockNumber + networkState: OpaqueNetworkState + sessionIndex: SessionIndex + authorityIndex: AuthIndex + validatorsLen: number +} + +export type AuthIndex = number + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: LookupSource + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: RegistrarIndex +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: LookupSource +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: LookupSource + judgement: IdentityJudgement +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: LookupSource +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: LookupSource + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: bigint +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId, Data][] +} + +export interface IdentityInfo { + additional: IdentityInfoAdditional[] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (H160 | undefined) + image: Data + twitter: Data +} + +export type IdentityInfoAdditional = [Data, Data] + +export type IdentityJudgement = IdentityJudgement_Erroneous | IdentityJudgement_FeePaid | IdentityJudgement_KnownGood | IdentityJudgement_LowQuality | IdentityJudgement_OutOfDate | IdentityJudgement_Reasonable | IdentityJudgement_Unknown + +export interface IdentityJudgement_Erroneous { + __kind: 'Erroneous' +} + +export interface IdentityJudgement_FeePaid { + __kind: 'FeePaid' + value: Balance +} + +export interface IdentityJudgement_KnownGood { + __kind: 'KnownGood' +} + +export interface IdentityJudgement_LowQuality { + __kind: 'LowQuality' +} + +export interface IdentityJudgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface IdentityJudgement_Reasonable { + __kind: 'Reasonable' +} + +export interface IdentityJudgement_Unknown { + __kind: 'Unknown' +} + +export type RegistrarIndex = number + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: H256 +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: H256 +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: H256 +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: H256 +} + +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has + * stalled. This will trigger a forced authority set change at the beginning + * of the next session, to be enacted `delay` blocks after that. The delay + * should be high enough to safely assume that the block signalling the + * forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters + * will start the new authority set using the given finalized block as base. + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: BlockNumber + bestFinalizedBlockNumber: BlockNumber +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface KeyOwnerProof { + session: SessionIndex + trieNodes: Bytes[] + validatorCount: ValidatorCount +} + +export type ValidatorCount = number + +export interface GrandpaEquivocationProof { + setId: SetId + equivocation: GrandpaEquivocation +} + +export type GrandpaEquivocation = GrandpaEquivocation_Precommit | GrandpaEquivocation_Prevote + +export interface GrandpaEquivocation_Precommit { + __kind: 'Precommit' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocation_Prevote { + __kind: 'Prevote' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocationValue { + roundNumber: bigint + identity: AuthorityId + first: [GrandpaPrevote, AuthoritySignature] + second: [GrandpaPrevote, AuthoritySignature] +} + +export type AuthoritySignature = Bytes + +export interface GrandpaPrevote { + targetHash: Hash + targetNumber: BlockNumber +} + +export type SetId = bigint + +export type GiltCall = GiltCall_place_bid | GiltCall_retract_bid | GiltCall_set_target | GiltCall_thaw + +/** + * Place a bid for a gilt to be issued. + * + * Origin must be Signed, and account must have at least `amount` in free balance. + * + * - `amount`: The amount of the bid; these funds will be reserved. If the bid is + * successfully elevated into an issued gilt, then these funds will continue to be + * reserved until the gilt expires. Must be at least `MinFreeze`. + * - `duration`: The number of periods for which the funds will be locked if the gilt is + * issued. It will expire only after this period has elapsed after the point of issuance. + * Must be greater than 1 and no more than `QueueCount`. + * + * Complexities: + * - `Queues[duration].len()` (just take max). + */ +export interface GiltCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * Retract a previously placed bid. + * + * Origin must be Signed, and the account should have previously issued a still-active bid + * of `amount` for `duration`. + * + * - `amount`: The amount of the previous bid. + * - `duration`: The duration of the previous bid. + */ +export interface GiltCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * Set target proportion of gilt-funds. + * + * Origin must be `AdminOrigin`. + * + * - `target`: The target proportion of effective issued funds that should be under gilts + * at any one time. + */ +export interface GiltCall_set_target { + __kind: 'set_target' + target: bigint +} + +/** + * Remove an active but expired gilt. Reserved funds under gilt are freed and balance is + * adjusted to ensure that the funds grow or shrink to maintain the equivalent proportion + * of effective total issued funds. + * + * Origin must be Signed and the account must be the owner of the gilt of the given index. + * + * - `index`: The index of the gilt to be thawed. + */ +export interface GiltCall_thaw { + __kind: 'thaw' + index: number +} + +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * Set a new value for `MinimumUntrustedScore`. + * + * Dispatch origin must be aligned with `T::ForceOrigin`. + * + * This check can be turned off by setting the value to `None`. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (ElectionScore | undefined) +} + +/** + * Submit a solution for the unsigned phase. + * + * The dispatch origin fo this call must be __none__. + * + * This submission is checked on the fly. Moreover, this unsigned solution is only + * validated when submitted to the pool from the **local** node. Effectively, this means + * that only active validators can submit this transaction when authoring a block (similar + * to an inherent). + * + * To prevent any incorrect solution (and thus wasted time/weight), this transaction will + * panic if the solution submitted by the validator is invalid in any way, effectively + * putting their authoring reward at risk. + * + * No deposit or reward is associated with this submission. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + solution: RawSolution + witness: SolutionOrSnapshotSize +} + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export interface RawSolution { + compact: CompactAssignmentsWith24 + score: ElectionScore + round: number +} + +export interface CompactAssignmentsWith24 { + votes1: [NominatorIndexCompact, ValidatorIndexCompact][] + votes2: [NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact][] + votes3: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes4: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes5: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes6: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes7: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes8: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes9: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes10: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes11: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes12: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes13: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes14: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes15: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes16: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes17: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes18: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes19: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes20: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes21: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes22: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes23: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes24: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] +} + +export type CompactScoreCompact = [ValidatorIndexCompact, OffchainAccuracyCompact] + +export type OffchainAccuracyCompact = number + +export type ValidatorIndexCompact = number + +export type NominatorIndexCompact = number + +export type ElectionScore = bigint[] + +export type DemocracyCall = DemocracyCall_blacklist | DemocracyCall_cancel_proposal | DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. + * + * If called on a queued public or external proposal, then this will result in it being + * removed. If the `ref_index` supplied is an active referendum with the proposal hash, + * then it will be cancelled. + * + * The dispatch origin of this call must be `BlacklistOrigin`. + * + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. + * + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). + */ +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: Hash + maybeRefIndex?: (ReferendumIndex | undefined) +} + +/** + * Remove a proposal. + * + * The dispatch origin of this call must be `CancelProposalOrigin`. + * + * - `prop_index`: The index of the proposal to cancel. + * + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number +} + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: ReferendumIndex +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must + * not be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId + conviction: Conviction + balance: BalanceOf +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: ReferendumIndex +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: Hash + index: ReferendumIndex +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Weight: `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: Hash +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: Hash +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: Hash +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * `FastTrackVotingPeriod` if too low. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: Hash + votingPeriod: BlockNumber + delay: BlockNumber +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. When this call is successful, i.e. + * the preimage has not been uploaded before and matches some imminent proposal, + * no fee is paid. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * Weight: `O(p)` + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: Hash + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. + * Extrinsic is weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * Weight: `O(D)` where D is length of proposal. + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: Hash + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId + index: ReferendumIndex +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: ReferendumIndex +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * Weight: `O(S)` where S is the number of seconds a proposal already has. + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * Weight: `O(V + log(V))` where V is number of `existing vetoers` + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: Hash +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of referendums the voter has voted on. + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + value: AccountVoteSplit +} + +export interface AccountVote_Standard { + __kind: 'Standard' + value: AccountVoteStandard +} + +export interface AccountVoteStandard { + vote: Vote + balance: Balance +} + +export type Vote = number + +export interface AccountVoteSplit { + aye: Balance + nay: Balance +} + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +export type ReferendumIndex = number + +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * Add an optional memo to an existing crowdloan contribution. + * + * Origin must be Signed, and the user must have contributed to the crowdloan. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: ParaId + memo: Bytes +} + +/** + * Contribute to a crowd sale. This will transfer some balance over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * Create a new crowdloaning campaign for a parachain slot with the given lease period range. + * + * This applies a lock to your parachain configuration, ensuring that it cannot be changed + * by the parachain manager. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Remove a fund after the retirement period has ended and all funds have been returned. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * Edit the configuration for an in-progress crowdloan. + * + * Can only be called by Root origin. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Poke the fund into NewRaise + * + * Origin must be Signed, and the fund has non-zero raise. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: ParaId +} + +/** + * Automatically refund contributors of an ended crowdloan. + * Due to weight restrictions, this function may need to be called multiple + * times to fully refund all users. We will refund `RemoveKeysLimit` users at a time. + * + * Origin must be signed, but can come from anyone. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * Withdraw full balance of a specific contributor. + * + * Origin must be signed, but can come from anyone. + * + * The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement + * flag must be set. For a fund to be ready for retirement, then: + * - it must not already be in retirement; + * - the amount of raised funds must be bigger than the _free_ balance of the account; + * - and either: + * - the block number must be at least `end`; or + * - the current lease period must be greater than the fund's `last_period`. + * + * In this case, the fund's retirement flag is set and its `end` is reset to the current block + * number. + * + * - `who`: The account whose contribution should be withdrawn. + * - `index`: The parachain to whose crowdloan the contribution was made. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId + index: number +} + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: EcdsaSignature +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Ed25519Signature +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Sr25519Signature +} + +export type Sr25519Signature = Bytes + +export type Ed25519Signature = Bytes + +export type EcdsaSignature = Bytes + +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export type MemberCount = number + +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: BalanceOf + vestingSchedule?: ([BalanceOf, BalanceOf, BlockNumber] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId | undefined) +} + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export type EthereumAddress = Bytes + +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: LookupSource +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: LookupSource + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is malicious + * or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is + * not assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: LookupSource + dest: LookupSource + value: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also decrease the total issuance of the system (`TotalIssuance`). + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + * + * # + * - Independent of the arguments. + * - Contains a limited number of reads and writes. + * --------------------- + * - Base Weight: + * - Creating: 27.56 µs + * - Killing: 35.11 µs + * - DB Weight: 1 Read, 1 Write to `who` + * # + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: LookupSource + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * It will decrease the total issuance of the system by the `TransferFee`. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for + * input config types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional + * check that the transfer will not kill the origin account. + * --------------------------------- + * - Base Weight: 73.64 µs, worst case scenario (account created, account removed) + * - DB Weight: 1 Read and 1 Write to destination account + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: LookupSource + value: bigint +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + * # + * - Cheaper than transfer because account cannot be killed. + * - Base Weight: 51.4 µs + * - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already) + * # + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: LookupSource + value: bigint +} + +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Plan an epoch config change. The epoch config change is recorded and will be enacted on + * the next call to `enact_epoch_change`. The config will be activated one epoch after. + * Multiple calls to this method will replace any existing planned config change that had + * not been enacted yet. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface BabeEquivocationProof { + offender: AuthorityId + slotNumber: SlotNumber + firstHeader: Header + secondHeader: Header +} + +export type SlotNumber = bigint + +export type NextConfigDescriptor = NextConfigDescriptor_V0 | NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V0 { + __kind: 'V0' +} + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + value: NextConfigDescriptorV1 +} + +export interface NextConfigDescriptorV1 { + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +export type AuthorityDiscoveryCall = never + +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Cancel an in-progress auction. + * + * Can only be called by Root origin. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: Key, + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => Key), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_changes_trie_config: sts.enumStruct({ + changesTrieConfig: sts.option(() => ChangesTrieConfiguration), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => KeyValue), + }), + } +}) + +export const KeyValue = sts.tuple(() => [StorageKey, StorageData]) + +export const StorageData = sts.bytes() + +export const StorageKey = sts.bytes() + +export const ChangesTrieConfiguration: sts.Type = sts.struct(() => { + return { + digestInterval: sts.number(), + digestLevels: sts.number(), + } +}) + +export const Key = sts.bytes() + +export const Perbill = sts.number() + +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: LookupSource, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: EraIndex, + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => LookupSource), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => LookupSource), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId, + era: EraIndex, + }), + reap_stash: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: LookupSource, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export const Percent = sts.number() + +export const EraIndex = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: BalanceOf, + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId, + judgement: SocietyJudgement, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: LookupSource, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId, + value: BalanceOf, + tip: BalanceOf, + }), + } +}) + +export const SocietyJudgement: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export const BalanceOf = sts.bigint() + +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: ParaId, + }), + force_lease: sts.enumStruct({ + para: ParaId, + leaser: AccountId, + amount: BalanceOf, + periodBegin: LeasePeriodOf, + periodCount: LeasePeriodOf, + }), + trigger_onboard: sts.enumStruct({ + para: ParaId, + }), + } +}) + +export const LeasePeriodOf = sts.number() + +export const ParaId = sts.number() + +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: Keys, + proof: sts.bytes(), + }), + } +}) + +export const Keys = sts.tuple(() => [AccountId, AccountId, AccountId, AccountId, AccountId, AccountId]) + +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: BlockNumber, + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_138, + }), + schedule_after: sts.enumStruct({ + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_138, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_138, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_138, + }), + } +}) + +export const Priority = sts.number() + +export const Period = sts.tuple(() => [BlockNumber, sts.number()]) + +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + deregister: sts.enumStruct({ + id: ParaId, + }), + force_register: sts.enumStruct({ + who: AccountId, + deposit: BalanceOf, + id: ParaId, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + force_remove_lock: sts.enumStruct({ + para: ParaId, + }), + register: sts.enumStruct({ + id: ParaId, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + reserve: sts.unit(), + swap: sts.enumStruct({ + id: ParaId, + other: ParaId, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId, + call: Type_138, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId, + }), + claim_recovery: sts.enumStruct({ + account: AccountId, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId), + threshold: sts.number(), + delayPeriod: BlockNumber, + }), + initiate_recovery: sts.enumStruct({ + account: AccountId, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + } +}) + +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: AccountId, + proxyType: ProxyType, + delay: BlockNumber, + }), + announce: sts.enumStruct({ + real: AccountId, + callHash: CallHashOf, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + delay: BlockNumber, + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_138, + }), + proxy_announced: sts.enumStruct({ + delegate: AccountId, + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_138, + }), + reject_announcement: sts.enumStruct({ + delegate: AccountId, + callHash: CallHashOf, + }), + remove_announcement: sts.enumStruct({ + real: AccountId, + callHash: CallHashOf, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: AccountId, + proxyType: ProxyType, + delay: BlockNumber, + }), + } +}) + +export const CallHashOf = sts.bytes() + +export const PhragmenElectionCall: sts.Type = sts.closedEnum(() => { + return { + clean_defunct_voters: sts.enumStruct({ + numVoters: sts.number(), + numDefunct: sts.number(), + }), + remove_member: sts.enumStruct({ + who: LookupSource, + hasReplacement: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId), + value: sts.bigint(), + }), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export const ParasUmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasSessionInfoCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasSchedulerCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasInitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: BlockNumber, + }), + } +}) + +export const ParasInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: ParachainsInherentData, + }), + } +}) + +export const ParachainsInherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => SignedAvailabilityBitfield), + backedCandidates: sts.array(() => BackedCandidate), + disputes: sts.array(() => DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: Hash, + number: sts.number(), + stateRoot: Hash, + extrinsicsRoot: Hash, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + AuthoritiesChange: sts.array(() => AuthorityId), + ChangesTrieRoot: Hash, + ChangesTrieSignal: ChangesTrieSignal, + Consensus: Consensus, + Other: sts.bytes(), + PreRuntime: PreRuntime, + RuntimeEnvironmentUpdated: sts.unit(), + Seal: Seal, + SealV0: SealV0, + } +}) + +export const SealV0 = sts.tuple(() => [sts.bigint(), Signature]) + +export const Signature = sts.bytes() + +export const Seal = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const PreRuntime = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const Consensus = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const ConsensusEngineId = sts.bytes() + +export const ChangesTrieSignal: sts.Type = sts.closedEnum(() => { + return { + NewConfiguration: sts.option(() => ChangesTrieConfiguration), + } +}) + +export const AuthorityId = sts.bytes() + +export const DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: SessionIndex, + statements: sts.array(() => sts.tuple(() => [DisputeStatement, ParaValidatorIndex, ValidatorSignature])), + } +}) + +export const ValidatorSignature = sts.bytes() + +export const ParaValidatorIndex = sts.number() + +export const DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: InvalidDisputeStatementKind, + Valid: ValidDisputeStatementKind, + } +}) + +export const ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + BackingSeconded: Hash, + BackingValid: Hash, + Explicit: sts.unit(), + } +}) + +export const InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export const SessionIndex = sts.number() + +export const CandidateHash = sts.bytes() + +export const BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: CommittedCandidateReceipt, + validityVotes: sts.array(() => ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: ValidatorSignature, + Implicit: ValidatorSignature, + Never: sts.unit(), + } +}) + +export const CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: CandidateDescriptor, + commitments: CandidateCommitments, + } +}) + +export const CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => UpwardMessage), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: BlockNumber, + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: sts.number(), + data: sts.bytes(), + } +}) + +export const UpwardMessage = sts.bytes() + +export const CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: ParaId, + relayParent: RelayChainHash, + collatorId: CollatorId, + persistedValidationDataHash: Hash, + povHash: Hash, + erasureRoot: Hash, + signature: CollatorSignature, + paraHead: Hash, + validationCodeHash: ValidationCodeHash, + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const CollatorSignature = sts.bytes() + +export const CollatorId = sts.bytes() + +export const RelayChainHash = sts.bytes() + +export const SignedAvailabilityBitfield: sts.Type = sts.struct(() => { + return { + payload: sts.bitseq(), + validatorIndex: ParaValidatorIndex, + signature: ValidatorSignature, + } +}) + +export const ParasInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasHrmpCall: sts.Type = sts.closedEnum(() => { + return { + force_clean_hrmp: sts.enumStruct({ + para: ParaId, + }), + force_process_hrmp_close: sts.unit(), + force_process_hrmp_open: sts.unit(), + hrmp_accept_open_channel: sts.enumStruct({ + sender: ParaId, + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: ParaId, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: sts.number(), + receiver: sts.number(), + } +}) + +export const ParasDmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + force_note_new_head: sts.enumStruct({ + para: ParaId, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: ParaId, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: ParaId, + newCode: ValidationCode, + expectedAt: BlockNumber, + }), + force_set_current_code: sts.enumStruct({ + para: ParaId, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: ParaId, + newHead: HeadData, + }), + } +}) + +export const ParachainsConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_chain_availability_period: sts.enumStruct({ + new: BlockNumber, + }), + set_code_retention_period: sts.enumStruct({ + new: BlockNumber, + }), + set_dispute_conclusion_by_time_out_period: sts.enumStruct({ + new: BlockNumber, + }), + set_dispute_max_spam_slots: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: SessionIndex, + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: BlockNumber, + }), + set_group_rotation_frequency: sts.enumStruct({ + new: BlockNumber, + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: Balance, + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: Balance, + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_cores: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_retries: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_thread_availability_period: sts.enumStruct({ + new: BlockNumber, + }), + set_ump_service_total_weight: sts.enumStruct({ + new: Weight, + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: BlockNumber, + }), + set_validation_upgrade_frequency: sts.enumStruct({ + new: BlockNumber, + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +export const OffencesCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + call: OpaqueCall, + storeCall: sts.boolean(), + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId), + call: Type_138, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const OpaqueCall = sts.bytes() + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: BlockNumber, + index: sts.number(), + } +}) + +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: AccountIndex, + }), + force_transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: AccountIndex, + }), + freeze: sts.enumStruct({ + index: AccountIndex, + }), + transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + }), + } +}) + +export const AccountIndex = sts.number() + +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: Signature, + }), + } +}) + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: BlockNumber, + networkState: OpaqueNetworkState, + sessionIndex: SessionIndex, + authorityIndex: AuthIndex, + validatorsLen: sts.number(), + } +}) + +export const AuthIndex = sts.number() + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId, + }), + add_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: RegistrarIndex, + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: LookupSource, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: LookupSource, + judgement: IdentityJudgement, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: LookupSource, + }), + rename_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: sts.bigint(), + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => IdentityInfoAdditional), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => H160), + image: Data, + twitter: Data, + } +}) + +export const IdentityInfoAdditional = sts.tuple(() => [Data, Data]) + +export const IdentityJudgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: Balance, + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export const RegistrarIndex = sts.number() + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: H256, + Keccak256: H256, + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: H256, + ShaThree256: H256, + } +}) + +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: BlockNumber, + bestFinalizedBlockNumber: BlockNumber, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const KeyOwnerProof: sts.Type = sts.struct(() => { + return { + session: SessionIndex, + trieNodes: sts.array(() => sts.bytes()), + validatorCount: ValidatorCount, + } +}) + +export const ValidatorCount = sts.number() + +export const GrandpaEquivocationProof: sts.Type = sts.struct(() => { + return { + setId: SetId, + equivocation: GrandpaEquivocation, + } +}) + +export const GrandpaEquivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: GrandpaEquivocationValue, + Prevote: GrandpaEquivocationValue, + } +}) + +export const GrandpaEquivocationValue: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: AuthorityId, + first: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + second: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + } +}) + +export const AuthoritySignature = sts.bytes() + +export const GrandpaPrevote: sts.Type = sts.struct(() => { + return { + targetHash: Hash, + targetNumber: BlockNumber, + } +}) + +export const SetId = sts.bigint() + +export const GiltCall: sts.Type = sts.closedEnum(() => { + return { + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + set_target: sts.enumStruct({ + target: sts.bigint(), + }), + thaw: sts.enumStruct({ + index: sts.number(), + }), + } +}) + +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => ElectionScore), + }), + submit_unsigned: sts.enumStruct({ + solution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export const RawSolution: sts.Type = sts.struct(() => { + return { + compact: CompactAssignmentsWith24, + score: ElectionScore, + round: sts.number(), + } +}) + +export const CompactAssignmentsWith24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [NominatorIndexCompact, ValidatorIndexCompact])), + votes2: sts.array(() => sts.tuple(() => [NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact])), + votes3: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes4: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes5: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes6: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes7: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes8: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes9: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes10: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes11: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes12: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes13: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes14: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes15: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes16: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes17: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes18: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes19: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes20: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes21: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes22: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes23: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes24: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + } +}) + +export const CompactScoreCompact = sts.tuple(() => [ValidatorIndexCompact, OffchainAccuracyCompact]) + +export const OffchainAccuracyCompact = sts.number() + +export const ValidatorIndexCompact = sts.number() + +export const NominatorIndexCompact = sts.number() + +export const ElectionScore = sts.array(() => sts.bigint()) + +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + blacklist: sts.enumStruct({ + proposalHash: Hash, + maybeRefIndex: sts.option(() => ReferendumIndex), + }), + cancel_proposal: sts.enumStruct({ + propIndex: sts.number(), + }), + cancel_queued: sts.enumStruct({ + which: ReferendumIndex, + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId, + conviction: Conviction, + balance: BalanceOf, + }), + emergency_cancel: sts.enumStruct({ + refIndex: ReferendumIndex, + }), + enact_proposal: sts.enumStruct({ + proposalHash: Hash, + index: ReferendumIndex, + }), + external_propose: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_default: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: Hash, + }), + fast_track: sts.enumStruct({ + proposalHash: Hash, + votingPeriod: BlockNumber, + delay: BlockNumber, + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: Hash, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: Hash, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId, + index: ReferendumIndex, + }), + remove_vote: sts.enumStruct({ + index: ReferendumIndex, + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId, + }), + veto_external: sts.enumStruct({ + proposalHash: Hash, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: AccountVoteSplit, + Standard: AccountVoteStandard, + } +}) + +export const AccountVoteStandard: sts.Type = sts.struct(() => { + return { + vote: Vote, + balance: Balance, + } +}) + +export const Vote = sts.number() + +export const AccountVoteSplit: sts.Type = sts.struct(() => { + return { + aye: Balance, + nay: Balance, + } +}) + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export const ReferendumIndex = sts.number() + +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: ParaId, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: ParaId, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: EcdsaSignature, + Ed25519: Ed25519Signature, + Sr25519: Sr25519Signature, + } +}) + +export const Sr25519Signature = sts.bytes() + +export const Ed25519Signature = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: BalanceOf, + vestingSchedule: sts.option(() => sts.tuple(() => [BalanceOf, BalanceOf, BlockNumber])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export const EthereumAddress = sts.bytes() + +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: LookupSource, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: LookupSource, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: LookupSource, + dest: LookupSource, + value: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: LookupSource, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + } +}) + +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const BabeEquivocationProof: sts.Type = sts.struct(() => { + return { + offender: AuthorityId, + slotNumber: SlotNumber, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const SlotNumber = sts.bigint() + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V0: sts.unit(), + V1: NextConfigDescriptorV1, + } +}) + +export const NextConfigDescriptorV1: sts.Type = sts.struct(() => { + return { + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +export const AuthorityDiscoveryCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +export type Type_138 = Type_138_Auctions | Type_138_AuthorityDiscovery | Type_138_Authorship | Type_138_Babe | Type_138_Balances | Type_138_Bounties | Type_138_Claims | Type_138_Council | Type_138_Crowdloan | Type_138_Democracy | Type_138_ElectionProviderMultiPhase | Type_138_Gilt | Type_138_Grandpa | Type_138_Identity | Type_138_ImOnline | Type_138_Indices | Type_138_Multisig | Type_138_Offences | Type_138_ParachainsConfiguration | Type_138_Paras | Type_138_ParasDmp | Type_138_ParasHrmp | Type_138_ParasInclusion | Type_138_ParasInherent | Type_138_ParasInitializer | Type_138_ParasScheduler | Type_138_ParasSessionInfo | Type_138_ParasShared | Type_138_ParasUmp | Type_138_PhragmenElection | Type_138_Proxy | Type_138_Recovery | Type_138_Registrar | Type_138_Scheduler | Type_138_Session | Type_138_Slots | Type_138_Society | Type_138_Staking | Type_138_System | Type_138_TechnicalCommittee | Type_138_TechnicalMembership | Type_138_Timestamp | Type_138_Tips | Type_138_Treasury | Type_138_Utility | Type_138_Vesting | Type_138_XcmPallet + +export interface Type_138_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Type_138_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Type_138_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Type_138_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Type_138_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Type_138_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Type_138_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Type_138_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Type_138_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Type_138_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Type_138_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Type_138_Gilt { + __kind: 'Gilt' + value: GiltCall +} + +export interface Type_138_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Type_138_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Type_138_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Type_138_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Type_138_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Type_138_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Type_138_ParachainsConfiguration { + __kind: 'ParachainsConfiguration' + value: ParachainsConfigurationCall +} + +export interface Type_138_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Type_138_ParasDmp { + __kind: 'ParasDmp' + value: ParasDmpCall +} + +export interface Type_138_ParasHrmp { + __kind: 'ParasHrmp' + value: ParasHrmpCall +} + +export interface Type_138_ParasInclusion { + __kind: 'ParasInclusion' + value: ParasInclusionCall +} + +export interface Type_138_ParasInherent { + __kind: 'ParasInherent' + value: ParasInherentCall +} + +export interface Type_138_ParasInitializer { + __kind: 'ParasInitializer' + value: ParasInitializerCall +} + +export interface Type_138_ParasScheduler { + __kind: 'ParasScheduler' + value: ParasSchedulerCall +} + +export interface Type_138_ParasSessionInfo { + __kind: 'ParasSessionInfo' + value: ParasSessionInfoCall +} + +export interface Type_138_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Type_138_ParasUmp { + __kind: 'ParasUmp' + value: ParasUmpCall +} + +export interface Type_138_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Type_138_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Type_138_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Type_138_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Type_138_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Type_138_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Type_138_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Type_138_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Type_138_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Type_138_System { + __kind: 'System' + value: SystemCall +} + +export interface Type_138_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Type_138_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Type_138_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Type_138_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Type_138_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Type_138_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Type_138_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Type_138_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId = sts.bytes() diff --git a/squid/src/types/v9050.ts b/squid/src/types/v9050.ts new file mode 100644 index 00000000..ed0827c8 --- /dev/null +++ b/squid/src/types/v9050.ts @@ -0,0 +1,9586 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Type_139: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + Gilt: GiltCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + ParachainsConfiguration: ParachainsConfigurationCall, + Paras: ParasCall, + ParasDmp: ParasDmpCall, + ParasHrmp: ParasHrmpCall, + ParasInclusion: ParasInclusionCall, + ParasInherent: ParasInherentCall, + ParasInitializer: ParasInitializerCall, + ParasScheduler: ParasSchedulerCall, + ParasSessionInfo: ParasSessionInfoCall, + ParasShared: ParasSharedCall, + ParasUmp: ParasUmpCall, + PhragmenElection: PhragmenElectionCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + XcmPallet: XcmPalletCall, + } +}) + +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + execute: sts.enumStruct({ + message: Xcm, + maxWeight: Weight, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: MultiLocation, + beneficiary: MultiLocation, + assets: sts.array(() => MultiAsset), + destWeight: Weight, + }), + send: sts.enumStruct({ + dest: MultiLocation, + message: Xcm, + }), + teleport_assets: sts.enumStruct({ + dest: MultiLocation, + beneficiary: MultiLocation, + assets: sts.array(() => MultiAsset), + destWeight: Weight, + }), + } +}) + +export const MultiAsset: sts.Type = sts.closedEnum(() => { + return { + AbstractFungible: sts.enumStruct({ + id: sts.bytes(), + instance: sts.bigint(), + }), + AbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + instance: AssetInstanceV0, + }), + All: sts.unit(), + AllAbstractFungible: sts.bytes(), + AllAbstractNonFungible: sts.bytes(), + AllConcreteFungible: MultiLocationV0, + AllConcreteNonFungible: MultiLocationV0, + AllFungible: sts.unit(), + AllNonFungible: sts.unit(), + ConcreteFungible: sts.enumStruct({ + id: MultiLocationV0, + amount: sts.bigint(), + }), + ConcreteNonFungible: sts.enumStruct({ + class: MultiLocationV0, + instance: AssetInstanceV0, + }), + None: sts.unit(), + } +}) + +export const MultiLocationV0: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: JunctionV0, + X2: sts.tuple(() => [JunctionV0, JunctionV0]), + X3: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0]), + X4: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X5: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X6: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X7: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X8: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + } +}) + +export const JunctionV0: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: NetworkId, + id: AccountId, + }), + AccountIndex64: sts.enumStruct({ + network: NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.bytes(), + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Parent: sts.unit(), + Plurality: sts.enumStruct({ + id: BodyId, + part: BodyPart, + }), + } +}) + +export const BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.number(), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export type BodyPart = BodyPart_AtLeastProportion | BodyPart_Fraction | BodyPart_Members | BodyPart_MoreThanProportion | BodyPart_Voice + +export interface BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface BodyPart_Members { + __kind: 'Members' + value: number +} + +export interface BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface BodyPart_Voice { + __kind: 'Voice' +} + +export const BodyId: sts.Type = sts.closedEnum(() => { + return { + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: sts.bytes(), + Technical: sts.unit(), + Unit: sts.unit(), + } +}) + +export type BodyId = BodyId_Executive | BodyId_Index | BodyId_Judicial | BodyId_Legislative | BodyId_Named | BodyId_Technical | BodyId_Unit + +export interface BodyId_Executive { + __kind: 'Executive' +} + +export interface BodyId_Index { + __kind: 'Index' + value: number +} + +export interface BodyId_Judicial { + __kind: 'Judicial' +} + +export interface BodyId_Legislative { + __kind: 'Legislative' +} + +export interface BodyId_Named { + __kind: 'Named' + value: Bytes +} + +export interface BodyId_Technical { + __kind: 'Technical' +} + +export interface BodyId_Unit { + __kind: 'Unit' +} + +export const NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: sts.bytes(), + Polkadot: sts.unit(), + } +}) + +export type NetworkId = NetworkId_Any | NetworkId_Kusama | NetworkId_Named | NetworkId_Polkadot + +export interface NetworkId_Any { + __kind: 'Any' +} + +export interface NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface NetworkId_Named { + __kind: 'Named' + value: Bytes +} + +export interface NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export type JunctionV0 = JunctionV0_AccountId32 | JunctionV0_AccountIndex64 | JunctionV0_AccountKey20 | JunctionV0_GeneralIndex | JunctionV0_GeneralKey | JunctionV0_OnlyChild | JunctionV0_PalletInstance | JunctionV0_Parachain | JunctionV0_Parent | JunctionV0_Plurality + +export interface JunctionV0_AccountId32 { + __kind: 'AccountId32' + network: NetworkId + id: AccountId +} + +export interface JunctionV0_AccountIndex64 { + __kind: 'AccountIndex64' + network: NetworkId + index: bigint +} + +export interface JunctionV0_AccountKey20 { + __kind: 'AccountKey20' + network: NetworkId + key: Bytes +} + +export interface JunctionV0_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface JunctionV0_GeneralKey { + __kind: 'GeneralKey' + value: Bytes +} + +export interface JunctionV0_OnlyChild { + __kind: 'OnlyChild' +} + +export interface JunctionV0_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface JunctionV0_Parachain { + __kind: 'Parachain' + value: number +} + +export interface JunctionV0_Parent { + __kind: 'Parent' +} + +export interface JunctionV0_Plurality { + __kind: 'Plurality' + id: BodyId + part: BodyPart +} + +export type AccountId = Bytes + +export type MultiLocationV0 = MultiLocationV0_Here | MultiLocationV0_X1 | MultiLocationV0_X2 | MultiLocationV0_X3 | MultiLocationV0_X4 | MultiLocationV0_X5 | MultiLocationV0_X6 | MultiLocationV0_X7 | MultiLocationV0_X8 + +export interface MultiLocationV0_Here { + __kind: 'Here' +} + +export interface MultiLocationV0_X1 { + __kind: 'X1' + value: JunctionV0 +} + +export interface MultiLocationV0_X2 { + __kind: 'X2' + value: [JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X3 { + __kind: 'X3' + value: [JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X4 { + __kind: 'X4' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X5 { + __kind: 'X5' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X6 { + __kind: 'X6' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X7 { + __kind: 'X7' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X8 { + __kind: 'X8' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export const AssetInstanceV0: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index128: sts.bigint(), + Index16: sts.number(), + Index32: sts.number(), + Index64: sts.bigint(), + Index8: sts.number(), + Undefined: sts.unit(), + } +}) + +export type AssetInstanceV0 = AssetInstanceV0_Array16 | AssetInstanceV0_Array32 | AssetInstanceV0_Array4 | AssetInstanceV0_Array8 | AssetInstanceV0_Blob | AssetInstanceV0_Index128 | AssetInstanceV0_Index16 | AssetInstanceV0_Index32 | AssetInstanceV0_Index64 | AssetInstanceV0_Index8 | AssetInstanceV0_Undefined + +export interface AssetInstanceV0_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface AssetInstanceV0_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface AssetInstanceV0_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface AssetInstanceV0_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface AssetInstanceV0_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface AssetInstanceV0_Index128 { + __kind: 'Index128' + value: bigint +} + +export interface AssetInstanceV0_Index16 { + __kind: 'Index16' + value: number +} + +export interface AssetInstanceV0_Index32 { + __kind: 'Index32' + value: number +} + +export interface AssetInstanceV0_Index64 { + __kind: 'Index64' + value: bigint +} + +export interface AssetInstanceV0_Index8 { + __kind: 'Index8' + value: number +} + +export interface AssetInstanceV0_Undefined { + __kind: 'Undefined' +} + +export type MultiAsset = MultiAsset_AbstractFungible | MultiAsset_AbstractNonFungible | MultiAsset_All | MultiAsset_AllAbstractFungible | MultiAsset_AllAbstractNonFungible | MultiAsset_AllConcreteFungible | MultiAsset_AllConcreteNonFungible | MultiAsset_AllFungible | MultiAsset_AllNonFungible | MultiAsset_ConcreteFungible | MultiAsset_ConcreteNonFungible | MultiAsset_None + +export interface MultiAsset_AbstractFungible { + __kind: 'AbstractFungible' + id: Bytes + instance: bigint +} + +export interface MultiAsset_AbstractNonFungible { + __kind: 'AbstractNonFungible' + class: Bytes + instance: AssetInstanceV0 +} + +export interface MultiAsset_All { + __kind: 'All' +} + +export interface MultiAsset_AllAbstractFungible { + __kind: 'AllAbstractFungible' + value: Bytes +} + +export interface MultiAsset_AllAbstractNonFungible { + __kind: 'AllAbstractNonFungible' + value: Bytes +} + +export interface MultiAsset_AllConcreteFungible { + __kind: 'AllConcreteFungible' + value: MultiLocationV0 +} + +export interface MultiAsset_AllConcreteNonFungible { + __kind: 'AllConcreteNonFungible' + value: MultiLocationV0 +} + +export interface MultiAsset_AllFungible { + __kind: 'AllFungible' +} + +export interface MultiAsset_AllNonFungible { + __kind: 'AllNonFungible' +} + +export interface MultiAsset_ConcreteFungible { + __kind: 'ConcreteFungible' + id: MultiLocationV0 + amount: bigint +} + +export interface MultiAsset_ConcreteNonFungible { + __kind: 'ConcreteNonFungible' + class: MultiLocationV0 + instance: AssetInstanceV0 +} + +export interface MultiAsset_None { + __kind: 'None' +} + +export const MultiLocation: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: JunctionV0, + X2: sts.tuple(() => [JunctionV0, JunctionV0]), + X3: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0]), + X4: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X5: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X6: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X7: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X8: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + } +}) + +export type MultiLocation = MultiLocation_Here | MultiLocation_X1 | MultiLocation_X2 | MultiLocation_X3 | MultiLocation_X4 | MultiLocation_X5 | MultiLocation_X6 | MultiLocation_X7 | MultiLocation_X8 + +export interface MultiLocation_Here { + __kind: 'Here' +} + +export interface MultiLocation_X1 { + __kind: 'X1' + value: JunctionV0 +} + +export interface MultiLocation_X2 { + __kind: 'X2' + value: [JunctionV0, JunctionV0] +} + +export interface MultiLocation_X3 { + __kind: 'X3' + value: [JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocation_X4 { + __kind: 'X4' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocation_X5 { + __kind: 'X5' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocation_X6 { + __kind: 'X6' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocation_X7 { + __kind: 'X7' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocation_X8 { + __kind: 'X8' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export const Weight = sts.bigint() + +export const Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: ResponseV0, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + RelayedFrom: sts.enumStruct({ + who: MultiLocationV0, + message: XcmV0, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + Transact: sts.enumStruct({ + originType: XcmOriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncodedCall, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + } +}) + +export const DoubleEncodedCall: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncodedCall { + encoded: Bytes +} + +export const XcmOriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type XcmOriginKind = XcmOriginKind_Native | XcmOriginKind_SovereignAccount | XcmOriginKind_Superuser | XcmOriginKind_Xcm + +export interface XcmOriginKind_Native { + __kind: 'Native' +} + +export interface XcmOriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface XcmOriginKind_Superuser { + __kind: 'Superuser' +} + +export interface XcmOriginKind_Xcm { + __kind: 'Xcm' +} + +export const XcmV0: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: ResponseV0, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + RelayedFrom: sts.enumStruct({ + who: MultiLocationV0, + message: XcmV0, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + Transact: sts.enumStruct({ + originType: XcmOriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncodedCall, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + } +}) + +export type XcmV0 = XcmV0_HrmpChannelAccepted | XcmV0_HrmpChannelClosing | XcmV0_HrmpNewChannelOpenRequest | XcmV0_QueryResponse | XcmV0_ReceiveTeleportedAsset | XcmV0_RelayedFrom | XcmV0_ReserveAssetDeposit | XcmV0_Transact | XcmV0_TransferAsset | XcmV0_TransferReserveAsset | XcmV0_WithdrawAsset + +export interface XcmV0_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface XcmV0_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface XcmV0_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface XcmV0_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: ResponseV0 +} + +export interface XcmV0_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export interface XcmV0_RelayedFrom { + __kind: 'RelayedFrom' + who: MultiLocationV0 + message: XcmV0 +} + +export interface XcmV0_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export interface XcmV0_Transact { + __kind: 'Transact' + originType: XcmOriginKind + requireWeightAtMost: bigint + call: DoubleEncodedCall +} + +export interface XcmV0_TransferAsset { + __kind: 'TransferAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 +} + +export interface XcmV0_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface XcmV0_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export type XcmOrderV0 = XcmOrderV0_BuyExecution | XcmOrderV0_DepositAsset | XcmOrderV0_DepositReserveAsset | XcmOrderV0_ExchangeAsset | XcmOrderV0_InitiateReserveWithdraw | XcmOrderV0_InitiateTeleport | XcmOrderV0_Null | XcmOrderV0_QueryHolding + +export interface XcmOrderV0_BuyExecution { + __kind: 'BuyExecution' + fees: MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: XcmV0[] +} + +export interface XcmOrderV0_DepositAsset { + __kind: 'DepositAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 +} + +export interface XcmOrderV0_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface XcmOrderV0_ExchangeAsset { + __kind: 'ExchangeAsset' + give: MultiAssetV0[] + receive: MultiAssetV0[] +} + +export interface XcmOrderV0_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: MultiAssetV0[] + reserve: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface XcmOrderV0_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: MultiAsset[] + dest: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface XcmOrderV0_Null { + __kind: 'Null' +} + +export interface XcmOrderV0_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: MultiLocationV0 + assets: MultiAssetV0[] +} + +export type MultiAssetV0 = MultiAssetV0_AbstractFungible | MultiAssetV0_AbstractNonFungible | MultiAssetV0_All | MultiAssetV0_AllAbstractFungible | MultiAssetV0_AllAbstractNonFungible | MultiAssetV0_AllConcreteFungible | MultiAssetV0_AllConcreteNonFungible | MultiAssetV0_AllFungible | MultiAssetV0_AllNonFungible | MultiAssetV0_ConcreteFungible | MultiAssetV0_ConcreteNonFungible | MultiAssetV0_None + +export interface MultiAssetV0_AbstractFungible { + __kind: 'AbstractFungible' + id: Bytes + instance: bigint +} + +export interface MultiAssetV0_AbstractNonFungible { + __kind: 'AbstractNonFungible' + class: Bytes + instance: AssetInstanceV0 +} + +export interface MultiAssetV0_All { + __kind: 'All' +} + +export interface MultiAssetV0_AllAbstractFungible { + __kind: 'AllAbstractFungible' + value: Bytes +} + +export interface MultiAssetV0_AllAbstractNonFungible { + __kind: 'AllAbstractNonFungible' + value: Bytes +} + +export interface MultiAssetV0_AllConcreteFungible { + __kind: 'AllConcreteFungible' + value: MultiLocationV0 +} + +export interface MultiAssetV0_AllConcreteNonFungible { + __kind: 'AllConcreteNonFungible' + value: MultiLocationV0 +} + +export interface MultiAssetV0_AllFungible { + __kind: 'AllFungible' +} + +export interface MultiAssetV0_AllNonFungible { + __kind: 'AllNonFungible' +} + +export interface MultiAssetV0_ConcreteFungible { + __kind: 'ConcreteFungible' + id: MultiLocationV0 + amount: bigint +} + +export interface MultiAssetV0_ConcreteNonFungible { + __kind: 'ConcreteNonFungible' + class: MultiLocationV0 + instance: AssetInstanceV0 +} + +export interface MultiAssetV0_None { + __kind: 'None' +} + +export type ResponseV0 = ResponseV0_Assets + +export interface ResponseV0_Assets { + __kind: 'Assets' + value: MultiAssetV0[] +} + +export const XcmOrderV0: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => XcmV0), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => MultiAssetV0), + receive: sts.array(() => MultiAssetV0), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + reserve: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => MultiAsset), + dest: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: MultiLocationV0, + assets: sts.array(() => MultiAssetV0), + }), + } +}) + +export const MultiAssetV0: sts.Type = sts.closedEnum(() => { + return { + AbstractFungible: sts.enumStruct({ + id: sts.bytes(), + instance: sts.bigint(), + }), + AbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + instance: AssetInstanceV0, + }), + All: sts.unit(), + AllAbstractFungible: sts.bytes(), + AllAbstractNonFungible: sts.bytes(), + AllConcreteFungible: MultiLocationV0, + AllConcreteNonFungible: MultiLocationV0, + AllFungible: sts.unit(), + AllNonFungible: sts.unit(), + ConcreteFungible: sts.enumStruct({ + id: MultiLocationV0, + amount: sts.bigint(), + }), + ConcreteNonFungible: sts.enumStruct({ + class: MultiLocationV0, + instance: AssetInstanceV0, + }), + None: sts.unit(), + } +}) + +export const ResponseV0: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => MultiAssetV0), + } +}) + +export type Xcm = Xcm_HrmpChannelAccepted | Xcm_HrmpChannelClosing | Xcm_HrmpNewChannelOpenRequest | Xcm_QueryResponse | Xcm_ReceiveTeleportedAsset | Xcm_RelayedFrom | Xcm_ReserveAssetDeposit | Xcm_Transact | Xcm_TransferAsset | Xcm_TransferReserveAsset | Xcm_WithdrawAsset + +export interface Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: ResponseV0 +} + +export interface Xcm_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export interface Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: MultiLocationV0 + message: XcmV0 +} + +export interface Xcm_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export interface Xcm_Transact { + __kind: 'Transact' + originType: XcmOriginKind + requireWeightAtMost: bigint + call: DoubleEncodedCall +} + +export interface Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 +} + +export interface Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export type XcmPalletCall = XcmPalletCall_execute | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets + +/** + * Execute an XCM message from a local, signed, origin. + * + * An event is deposited indicating whether `msg` could be executed completely or only + * partially. + * + * No more than `max_weight` will be used in its attempted execution. If this is less than the + * maximum amount of weight that the message could take to be executed, then no execution + * attempt will be made. + * + * NOTE: A successful return to this does *not* imply that the `msg` was executed successfully + * to completion; only that *some* of it was executed. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Xcm + maxWeight: Weight +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination chain and forward + * a notification XCM. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `dest_weight`: Equal to the total weight on `dest` of the XCM message + * `ReserveAssetDeposit { assets, effects: [ BuyExecution{..}, DepositAsset{..} ] }`. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: MultiLocation + beneficiary: MultiLocation + assets: MultiAsset[] + destWeight: Weight +} + +export interface XcmPalletCall_send { + __kind: 'send' + dest: MultiLocation + message: Xcm +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `dest_weight`: Equal to the total weight on `dest` of the XCM message + * `Teleport { assets, effects: [ BuyExecution{..}, DepositAsset{..} ] }`. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: MultiLocation + beneficiary: MultiLocation + assets: MultiAsset[] + destWeight: Weight +} + +export type Weight = bigint + +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: LookupSource, + target: LookupSource, + schedule: VestingInfo, + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: LookupSource, + }), + vested_transfer: sts.enumStruct({ + target: LookupSource, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: Balance, + perBlock: Balance, + startingBlock: BlockNumber, + } +}) + +export const BlockNumber = sts.number() + +export const Balance = sts.bigint() + +export interface VestingInfo { + locked: Balance + perBlock: Balance + startingBlock: BlockNumber +} + +export type BlockNumber = number + +export type Balance = bigint + +export const LookupSource: sts.Type = sts.closedEnum(() => { + return { + Address20: H160, + Address32: H256, + Id: AccountId, + Index: sts.number(), + Raw: sts.bytes(), + } +}) + +export const H256 = sts.bytes() + +export const H160 = sts.bytes() + +export type LookupSource = LookupSource_Address20 | LookupSource_Address32 | LookupSource_Id | LookupSource_Index | LookupSource_Raw + +export interface LookupSource_Address20 { + __kind: 'Address20' + value: H160 +} + +export interface LookupSource_Address32 { + __kind: 'Address32' + value: H256 +} + +export interface LookupSource_Id { + __kind: 'Id' + value: AccountId +} + +export interface LookupSource_Index { + __kind: 'Index' + value: number +} + +export interface LookupSource_Raw { + __kind: 'Raw' + value: Bytes +} + +export type H256 = Bytes + +export type H160 = Bytes + +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: LookupSource + target: LookupSource + schedule: VestingInfo +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: LookupSource +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: LookupSource + schedule: VestingInfo +} + +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Type_139, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Type_139), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Type_139), + }), + } +}) + +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Type_139 +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Type_139[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Type_139[] +} + +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: LookupSource, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + } +}) + +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: LookupSource +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +export const TipsCall: sts.Type = sts.closedEnum(() => { + return { + close_tip: sts.enumStruct({ + hash: Hash, + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + }), + retract_tip: sts.enumStruct({ + hash: Hash, + }), + slash_tip: sts.enumStruct({ + hash: Hash, + }), + tip: sts.enumStruct({ + hash: Hash, + tipValue: sts.bigint(), + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + tipValue: sts.bigint(), + }), + } +}) + +export const Hash = sts.bytes() + +export type TipsCall = TipsCall_close_tip | TipsCall_report_awesome | TipsCall_retract_tip | TipsCall_slash_tip | TipsCall_tip | TipsCall_tip_new + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`. + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TipsCall_close_tip { + __kind: 'close_tip' + hash: Hash +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TipsCall_retract_tip { + __kind: 'retract_tip' + hash: Hash +} + +/** + * Remove and slash an already-open tip. + * + * May only be called from `T::RejectOrigin`. + * + * As a result, the finder is slashed and the deposits are lost. + * + * Emits `TipSlashed` if successful. + * + * # + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * # + */ +export interface TipsCall_slash_tip { + __kind: 'slash_tip' + hash: Hash +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`, insert tip and check closing, + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TipsCall_tip { + __kind: 'tip' + hash: Hash + tipValue: bigint +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T` + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId + tipValue: bigint +} + +export type Hash = Bytes + +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId, + }), + change_key: sts.enumStruct({ + new: AccountId, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId), + }), + set_prime: sts.enumStruct({ + who: AccountId, + }), + swap_member: sts.enumStruct({ + remove: AccountId, + add: AccountId, + }), + } +}) + +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId + add: AccountId +} + +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const MemberCount = sts.number() + +export const Proposal: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + AuthorityDiscovery: AuthorityDiscoveryCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + Gilt: GiltCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + Offences: OffencesCall, + ParachainsConfiguration: ParachainsConfigurationCall, + Paras: ParasCall, + ParasDmp: ParasDmpCall, + ParasHrmp: ParasHrmpCall, + ParasInclusion: ParasInclusionCall, + ParasInherent: ParasInherentCall, + ParasInitializer: ParasInitializerCall, + ParasScheduler: ParasSchedulerCall, + ParasSessionInfo: ParasSessionInfoCall, + ParasShared: ParasSharedCall, + ParasUmp: ParasUmpCall, + PhragmenElection: PhragmenElectionCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + XcmPallet: XcmPalletCall, + } +}) + +export type Proposal = Proposal_Auctions | Proposal_AuthorityDiscovery | Proposal_Authorship | Proposal_Babe | Proposal_Balances | Proposal_Bounties | Proposal_Claims | Proposal_Council | Proposal_Crowdloan | Proposal_Democracy | Proposal_ElectionProviderMultiPhase | Proposal_Gilt | Proposal_Grandpa | Proposal_Identity | Proposal_ImOnline | Proposal_Indices | Proposal_Multisig | Proposal_Offences | Proposal_ParachainsConfiguration | Proposal_Paras | Proposal_ParasDmp | Proposal_ParasHrmp | Proposal_ParasInclusion | Proposal_ParasInherent | Proposal_ParasInitializer | Proposal_ParasScheduler | Proposal_ParasSessionInfo | Proposal_ParasShared | Proposal_ParasUmp | Proposal_PhragmenElection | Proposal_Proxy | Proposal_Recovery | Proposal_Registrar | Proposal_Scheduler | Proposal_Session | Proposal_Slots | Proposal_Society | Proposal_Staking | Proposal_System | Proposal_TechnicalCommittee | Proposal_TechnicalMembership | Proposal_Timestamp | Proposal_Tips | Proposal_Treasury | Proposal_Utility | Proposal_Vesting | Proposal_XcmPallet + +export interface Proposal_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Proposal_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Proposal_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Proposal_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Proposal_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Proposal_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Proposal_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Proposal_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Proposal_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Proposal_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Proposal_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Proposal_Gilt { + __kind: 'Gilt' + value: GiltCall +} + +export interface Proposal_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Proposal_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Proposal_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Proposal_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Proposal_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Proposal_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Proposal_ParachainsConfiguration { + __kind: 'ParachainsConfiguration' + value: ParachainsConfigurationCall +} + +export interface Proposal_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Proposal_ParasDmp { + __kind: 'ParasDmp' + value: ParasDmpCall +} + +export interface Proposal_ParasHrmp { + __kind: 'ParasHrmp' + value: ParasHrmpCall +} + +export interface Proposal_ParasInclusion { + __kind: 'ParasInclusion' + value: ParasInclusionCall +} + +export interface Proposal_ParasInherent { + __kind: 'ParasInherent' + value: ParasInherentCall +} + +export interface Proposal_ParasInitializer { + __kind: 'ParasInitializer' + value: ParasInitializerCall +} + +export interface Proposal_ParasScheduler { + __kind: 'ParasScheduler' + value: ParasSchedulerCall +} + +export interface Proposal_ParasSessionInfo { + __kind: 'ParasSessionInfo' + value: ParasSessionInfoCall +} + +export interface Proposal_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Proposal_ParasUmp { + __kind: 'ParasUmp' + value: ParasUmpCall +} + +export interface Proposal_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Proposal_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Proposal_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Proposal_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Proposal_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Proposal_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Proposal_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Proposal_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Proposal_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Proposal_System { + __kind: 'System' + value: SystemCall +} + +export interface Proposal_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Proposal_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Proposal_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Proposal_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Proposal_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Proposal_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Proposal_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Proposal_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_changes_trie_config | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + * + * # + * - `O(P)` where `P` amount of keys with prefix `prefix` + * - `P` storage deletions. + * - Base Weight: 0.834 * P µs + * - Writes: Number of subkeys + 1 + * # + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Key + subkeys: number +} + +/** + * Kill some items from storage. + * + * # + * - `O(IK)` where `I` length of `keys` and `K` length of one key + * - `I` storage deletions. + * - Base Weight: .378 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Key[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Make some on-chain remark and emit event. + * + * # + * - `O(b)` where b is the length of the remark. + * - 1 event. + * # + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * Set the new changes trie configuration. + * + * # + * - `O(1)` + * - 1 storage write or delete (codec `O(1)`). + * - 1 call to `deposit_log`: Uses `append` API, so O(1) + * - Base Weight: 7.218 µs + * - DB Weight: + * - Writes: Changes Trie, System Digest + * # + */ +export interface SystemCall_set_changes_trie_config { + __kind: 'set_changes_trie_config' + changesTrieConfig?: (ChangesTrieConfiguration | undefined) +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 storage write (codec `O(C)`). + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is expensive). + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very expensive. + * We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + * + * # + * - `O(1)` + * - 1 storage write. + * - Base Weight: 1.405 µs + * - 1 write to HEAP_PAGES + * # + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + * + * # + * - `O(I)` where `I` length of `items` + * - `I` storage writes (`O(1)`). + * - Base Weight: 0.568 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: KeyValue[] +} + +export type KeyValue = [StorageKey, StorageData] + +export type StorageData = Bytes + +export type StorageKey = Bytes + +export interface ChangesTrieConfiguration { + digestInterval: number + digestLevels: number +} + +export type Key = Bytes + +export type Perbill = number + +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_update_staking_limits | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger, [Origin Account], Current Era, History Depth, Locks + * - Write: Bonded, Payee, [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: LookupSource + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount + * that can be added. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller and + * it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * - One DB entry. + * ------------ + * DB Weight: + * - Read: Era Election Status, Bonded, Ledger, [Origin Account], Locks + * - Write: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + * + * # + * Complexity: O(U + S) + * with U unapplied slashes weighted with U=1000 + * and S is the number of slash indices to be canceled. + * - Read: Unapplied Slashes + * - Write: Unapplied Slashes + * # + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: EraIndex + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * -------- + * Weight: O(1) + * DB Weight: + * - Read: EraElectionStatus, Ledger + * - Write: Validators, Nominators + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Declare a `controller` as having no desire to either validator or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_, but can be called by anyone. + * + * If the caller is the same as the controller being targeted, then no further checks + * are enforced. However, this call can also be made by an third party user who witnesses + * that this controller does not satisfy the minimum bond requirements to be in their role. + * + * This can be helpful if bond requirements are updated, and we need to remove old users + * who do not satisfy these requirements. + * + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + controller: AccountId +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * # + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * Thus the election process may be ongoing when this is called. In this case the + * election will continue until the next era is triggered. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + * + * # + * O(S) where S is the number of slashing spans to be removed + * Reads: Bonded, Slashing Spans, Account, Locks + * Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Account, Locks + * Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Same as [`set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. The controller + * account should represent a validator. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: LookupSource[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. This can only be called when + * [`EraElectionStatus`] is `Closed`. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS). + * - Both the reads and writes follow a similar pattern. + * --------- + * Weight: O(N) + * where N is the number of targets + * DB Weight: + * - Reads: Era Election Status, Ledger, Current Era + * - Writes: Validators, Nominators + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: LookupSource[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * This can only be called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * DB Weight: + * - Read: EraElectionStatus, CurrentEra, HistoryDepth, ErasValidatorReward, + * ErasStakersClipped, ErasRewardPoints, ErasValidatorPrefs (8 items) + * - Read Each: Bonded, Ledger, Payee, Locks, System Account (5 items) + * - Write Each: System Account, Locks, Ledger (3 items) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId + era: EraIndex +} + +/** + * Remove all data structure concerning a staker/stash once its balance is at the minimum. + * This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone + * and the target `stash` must have no funds left beyond the ED. + * + * This can be called from any origin. + * + * - `stash`: The stash account to reap. Its balance must be zero. + * + * # + * Complexity: O(S) where S is the number of slashing spans on the account. + * DB Weight: + * - Reads: Stash Account, Bonded, Slashing Spans, Locks + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Stash Account, Locks + * - Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller, and it can be only called when + * [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MAX_UNLOCKING_CHUNKS`. + * - Storage changes: Can't increase storage, only decrease it. + * --------------- + * - DB Weight: + * - Reads: EraElectionStatus, Ledger, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Same as [`set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: LookupSource +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. + * This should report all the storage items that will be deleted by clearing old + * era history. Needed to report an accurate weight for the dispatch. Trusted by + * `Root` to report an accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Weight: O(E) + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + * + * # + * - O(V) + * - Write: Invulnerables + * # + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * If a user encounters the `InsufficientBond` error when calling this extrinsic, + * they should call `chill` first in order to free up their bonded funds. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + * + * # + * - Independent of the arguments. Limited but potentially exploitable complexity. + * - Contains a limited number of reads. + * - Each call (requires the remainder of the bonded balance to be above `minimum_balance`) + * will cause a new entry to be inserted into a vector (`Ledger.unlocking`) kept in storage. + * The only way to clean the aforementioned storage item is also user-controlled via + * `withdraw_unbonded`. + * - One DB entry. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: EraElectionStatus, Ledger, CurrentEra, Locks, BalanceOf Stash, + * - Write: Locks, Ledger, BalanceOf Stash, + * + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Update the various staking limits this pallet. + * + * * `min_nominator_bond`: The minimum active bond needed to be a nominator. + * * `min_validator_bond`: The minimum active bond needed to be a validator. + * * `max_nominator_count`: The max number of users who can be a nominator at once. + * When set to `None`, no limit is enforced. + * * `max_validator_count`: The max number of users who can be a validator at once. + * When set to `None`, no limit is enforced. + * + * Origin must be Root to call this function. + * + * NOTE: Existing nominators and validators will not be affected by this update. + * to kick people under the new limits, `chill_other` should be called. + */ +export interface StakingCall_update_staking_limits { + __kind: 'update_staking_limits' + minNominatorBond: BalanceOf + minValidatorBond: BalanceOf + maxNominatorCount?: (number | undefined) + maxValidatorCount?: (number | undefined) +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ----------- + * Weight: O(1) + * DB Weight: + * - Read: Era Election Status, Ledger + * - Write: Nominators, Validators + * # + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * - Could be dependent on the `origin` argument and how much `unlocking` chunks exist. + * It implies `consolidate_unlocked` which loops over `Ledger.unlocking`, which is + * indirectly user-controlled. See [`unbond`] for more detail. + * - Contains a limited number of reads, yet the size of which could be large based on `ledger`. + * - Writes are limited to the `origin` account key. + * --------------- + * Complexity O(S) where S is the number of slashing spans to remove + * Update: + * - Reads: EraElectionStatus, Ledger, Current Era, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * Kill: + * - Reads: EraElectionStatus, Ledger, Current Era, Bonded, Slashing Spans, [Origin + * Account], Locks, BalanceOf stash + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, + * [Origin Account], Locks, BalanceOf stash. + * - Writes Each: SpanSlash * S + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export type BalanceOf = bigint + +export type Percent = number + +export type EraIndex = number + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: BalanceOf +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * module to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId + judgement: SocietyJudgement +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin + * forgives (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: LookupSource + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId + value: BalanceOf + tip: BalanceOf +} + +export type SocietyJudgement = SocietyJudgement_Approve | SocietyJudgement_Rebid | SocietyJudgement_Reject + +export interface SocietyJudgement_Approve { + __kind: 'Approve' +} + +export interface SocietyJudgement_Rebid { + __kind: 'Rebid' +} + +export interface SocietyJudgement_Reject { + __kind: 'Reject' +} + +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * Clear all leases for a Para Id, refunding any deposits back to the original owners. + * + * Can only be called by the Root origin. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: ParaId +} + +/** + * Just a hotwire into the `lease_out` call, in case Root wants to force some lease to happen + * independently of any other on-chain mechanism to use it. + * + * Can only be called by the Root origin. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: ParaId + leaser: AccountId + amount: BalanceOf + periodBegin: LeasePeriodOf + periodCount: LeasePeriodOf +} + +/** + * Try to onboard a parachain that has a lease for the current lease period. + * + * This function can be useful if there was some state issue with a para that should + * have onboarded, but was unable to. As long as they have a lease period, we can + * let them onboard from here. + * + * Origin must be signed, but can be called by anyone. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: ParaId +} + +export type LeasePeriodOf = number + +export type ParaId = number + +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` in number of key types. + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: Keys + proof: Bytes +} + +export type Keys = [AccountId, AccountId, AccountId, AccountId, AccountId, AccountId] + +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.15 + 2.869 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: BlockNumber + index: number +} + +/** + * Cancel a named scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 24.91 + 2.907 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.29 + .126 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda + * - Will use base weight of 25 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_139 +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_139 +} + +/** + * Schedule a named task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 29.6 + .159 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 35 which should be good for more than 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_139 +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`]. + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_139 +} + +export type Priority = number + +export type Period = [BlockNumber, number] + +export type RegistrarCall = RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_force_remove_lock | RegistrarCall_register | RegistrarCall_reserve | RegistrarCall_swap + +/** + * Deregister a Para Id, freeing all data and returning any deposit. + * + * The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: ParaId +} + +/** + * Force the registration of a Para Id on the relay chain. + * + * This function must be called by a Root origin. + * + * The deposit taken can be specified for this registration. Any ParaId + * can be registered, including sub-1000 IDs which are System Parachains. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId + deposit: BalanceOf + id: ParaId + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Remove a manager lock from a para. This will allow the manager of a + * previously locked para to deregister or swap a para without using governance. + * + * Can only be called by the Root origin. + */ +export interface RegistrarCall_force_remove_lock { + __kind: 'force_remove_lock' + para: ParaId +} + +/** + * Register head data and validation code for a reserved Para Id. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. + * - `id`: The para ID. Must be owned/managed by the `origin` signing account. + * - `genesis_head`: The genesis head data of the parachain/thread. + * - `validation_code`: The initial validation code of the parachain/thread. + * + * ## Deposits/Fees + * The origin signed account must reserve a corresponding deposit for the registration. Anything already + * reserved previously for this para ID is accounted for. + * + * ## Events + * The `Registered` event is emitted in case of success. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: ParaId + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Reserve a Para Id on the relay chain. + * + * This function will reserve a new Para Id to be owned/managed by the origin account. + * The origin account is able to register head data and validation code using `register` to create + * a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID. + * + * ## Deposits/Fees + * The origin must reserve a deposit of `ParaDeposit` for the registration. + * + * ## Events + * The `Reserved` event is emitted in case of success, which provides the ID reserved for use. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * Swap a parachain with another parachain or parathread. + * + * The origin must be Root, the `para` owner, or the `para` itself. + * + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: ParaId + other: ParaId +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + * + * # + * - The weight of the `call` + 10,000. + * - One storage lookup to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId + call: Type_139 +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + * + * # + * - One storage mutation to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully + * recovered by you. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + V) + * # + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + * + * # + * Key: V (len of vouching friends) + * - One storage read/remove to get the active recovery process. O(1), Codec O(V) + * - One balance call to repatriate reserved. O(X) + * - One event. + * + * Total Complexity: O(V + X) + * # + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. + * Should be ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt + * before the account can be recovered. Should be less than or equal to + * the length of the list of friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized + * that needs to pass before the account can be recovered. + * + * # + * - Key: F (len of friends) + * - One storage read to check that account is not already recoverable. O(1). + * - A check that the friends list is sorted and unique. O(F) + * - One currency reserve operation. O(X) + * - One storage write. O(1). Codec O(F). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId[] + threshold: number + delayPeriod: BlockNumber +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account + * needs to be recoverable (i.e. have a recovery configuration). + * + * # + * - One storage read to check that account is recoverable. O(F) + * - One storage read to check that this recovery process hasn't already started. O(1) + * - One currency reserve operation. O(X) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + * + * # + * Key: F (len of friends) + * - One storage read to get the prefix iterator for active recoveries. O(1) + * - One storage read/remove to get the recovery configuration. O(1), Codec O(F) + * - One balance call to unreserved. O(X) + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + * + * # + * - One storage write O(1) + * - One event + * # + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId + rescuer: AccountId +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you + * want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One binary search to confirm caller is a friend. O(logF) + * - One binary search to confirm caller has not already vouched. O(logV) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + logF + V + logV) + * # + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId + rescuer: AccountId +} + +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: AccountId + proxyType: ProxyType + delay: BlockNumber +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: AccountId + callHash: CallHashOf +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + * TODO: Might be over counting 1 read + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: BlockNumber + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_139 +} + +/** + * Dispatch the given `call` from an account that the sender is authorized for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: AccountId + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_139 +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: AccountId + callHash: CallHashOf +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: AccountId + callHash: CallHashOf +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: AccountId + proxyType: ProxyType + delay: BlockNumber +} + +export type CallHashOf = Bytes + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +export type PhragmenElectionCall = PhragmenElectionCall_clean_defunct_voters | PhragmenElectionCall_remove_member | PhragmenElectionCall_remove_voter | PhragmenElectionCall_renounce_candidacy | PhragmenElectionCall_submit_candidacy | PhragmenElectionCall_vote + +/** + * Clean all voters who are defunct (i.e. they do not serve any purpose at all). The + * deposit of the removed voters are returned. + * + * This is an root function to be used only for cleaning the state. + * + * The dispatch origin of this call must be root. + * + * # + * The total number of voters and those that are defunct must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_clean_defunct_voters { + __kind: 'clean_defunct_voters' + numVoters: number + numDefunct: number +} + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, a new phragmen election is started. + * + * The dispatch origin of this call must be root. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement, we use a small weight. Else, since this is a root call and + * will go into phragmen, we assume full block for now. + * # + */ +export interface PhragmenElectionCall_remove_member { + __kind: 'remove_member' + who: LookupSource + hasReplacement: boolean +} + +/** + * Remove `origin` as a voter. + * + * This removes the lock and returns the deposit. + * + * The dispatch origin of this call must be signed and be a voter. + */ +export interface PhragmenElectionCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * + * - `origin` is a candidate and not elected in any set. In this case, the deposit is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the deposit is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the deposit is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_members`], if replacement runners exists, they are immediately + * used. If the prime is renouncing, then no prime will exist until the next round. + * + * The dispatch origin of this call must be signed, and have one of the above roles. + * + * # + * The type of renouncing must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Submit oneself for candidacy. A fixed amount of deposit is recorded. + * + * All candidates are wiped at the end of the term. They either become a member/runner-up, + * or leave the system while their deposit is slashed. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`] + * to get their deposit back. Losing the spot in an election will always lead to a slash. + * + * # + * The number of current candidates must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is + * reserved. The deposit is based on the number of votes and can be updated over time. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * If `value` is more than `who`'s total balance, then the maximum of the two is used. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * It is the responsibility of the caller to **NOT** place all of their balance into the + * lock and keep some for further operations. + * + * # + * We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less. + * # + */ +export interface PhragmenElectionCall_vote { + __kind: 'vote' + votes: AccountId[] + value: bigint +} + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +export type ParasUmpCall = never + +export type ParasSharedCall = never + +export type ParasSessionInfoCall = never + +export type ParasSchedulerCall = never + +export type ParasInitializerCall = ParasInitializerCall_force_approve + +/** + * Issue a signal to the consensus engine to forcibly act as though all parachain + * blocks in all relay chain blocks up to and including the given number in the current + * chain are valid and should be finalized. + */ +export interface ParasInitializerCall_force_approve { + __kind: 'force_approve' + upTo: BlockNumber +} + +export type ParasInherentCall = ParasInherentCall_enter + +/** + * Enter the paras inherent. This will process bitfields and backed candidates. + */ +export interface ParasInherentCall_enter { + __kind: 'enter' + data: ParachainsInherentData +} + +export interface ParachainsInherentData { + bitfields: SignedAvailabilityBitfield[] + backedCandidates: BackedCandidate[] + disputes: DisputeStatementSet[] + parentHeader: Header +} + +export interface Header { + parentHash: Hash + number: number + stateRoot: Hash + extrinsicsRoot: Hash + digest: Digest +} + +export interface Digest { + logs: DigestItem[] +} + +export type DigestItem = DigestItem_AuthoritiesChange | DigestItem_ChangesTrieRoot | DigestItem_ChangesTrieSignal | DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal | DigestItem_SealV0 + +export interface DigestItem_AuthoritiesChange { + __kind: 'AuthoritiesChange' + value: AuthorityId[] +} + +export interface DigestItem_ChangesTrieRoot { + __kind: 'ChangesTrieRoot' + value: Hash +} + +export interface DigestItem_ChangesTrieSignal { + __kind: 'ChangesTrieSignal' + value: ChangesTrieSignal +} + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: Consensus +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: PreRuntime +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: Seal +} + +export interface DigestItem_SealV0 { + __kind: 'SealV0' + value: SealV0 +} + +export type SealV0 = [bigint, Signature] + +export type Signature = Bytes + +export type Seal = [ConsensusEngineId, Bytes] + +export type PreRuntime = [ConsensusEngineId, Bytes] + +export type Consensus = [ConsensusEngineId, Bytes] + +export type ConsensusEngineId = Bytes + +export type ChangesTrieSignal = ChangesTrieSignal_NewConfiguration + +export interface ChangesTrieSignal_NewConfiguration { + __kind: 'NewConfiguration' + value?: (ChangesTrieConfiguration | undefined) +} + +export type AuthorityId = Bytes + +export interface DisputeStatementSet { + candidateHash: CandidateHash + session: SessionIndex + statements: [DisputeStatement, ParaValidatorIndex, ValidatorSignature][] +} + +export type ValidatorSignature = Bytes + +export type ParaValidatorIndex = number + +export type DisputeStatement = DisputeStatement_Invalid | DisputeStatement_Valid + +export interface DisputeStatement_Invalid { + __kind: 'Invalid' + value: InvalidDisputeStatementKind +} + +export interface DisputeStatement_Valid { + __kind: 'Valid' + value: ValidDisputeStatementKind +} + +export type ValidDisputeStatementKind = ValidDisputeStatementKind_ApprovalChecking | ValidDisputeStatementKind_BackingSeconded | ValidDisputeStatementKind_BackingValid | ValidDisputeStatementKind_Explicit + +export interface ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: Hash +} + +export interface ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: Hash +} + +export interface ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type InvalidDisputeStatementKind = InvalidDisputeStatementKind_Explicit + +export interface InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type SessionIndex = number + +export type CandidateHash = Bytes + +export interface BackedCandidate { + candidate: CommittedCandidateReceipt + validityVotes: ValidityAttestation[] + validatorIndices: BitSequence +} + +export type ValidityAttestation = ValidityAttestation_Explicit | ValidityAttestation_Implicit | ValidityAttestation_Never + +export interface ValidityAttestation_Explicit { + __kind: 'Explicit' + value: ValidatorSignature +} + +export interface ValidityAttestation_Implicit { + __kind: 'Implicit' + value: ValidatorSignature +} + +export interface ValidityAttestation_Never { + __kind: 'Never' +} + +export interface CommittedCandidateReceipt { + descriptor: CandidateDescriptor + commitments: CandidateCommitments +} + +export interface CandidateCommitments { + upwardMessages: UpwardMessage[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: BlockNumber +} + +export interface OutboundHrmpMessage { + recipient: number + data: Bytes +} + +export type UpwardMessage = Bytes + +export interface CandidateDescriptor { + paraId: ParaId + relayParent: RelayChainHash + collatorId: CollatorId + persistedValidationDataHash: Hash + povHash: Hash + erasureRoot: Hash + signature: CollatorSignature + paraHead: Hash + validationCodeHash: ValidationCodeHash +} + +export type ValidationCodeHash = Bytes + +export type CollatorSignature = Bytes + +export type CollatorId = Bytes + +export type RelayChainHash = Bytes + +export interface SignedAvailabilityBitfield { + payload: BitSequence + validatorIndex: ParaValidatorIndex + signature: ValidatorSignature +} + +export type ParasInclusionCall = never + +export type ParasHrmpCall = ParasHrmpCall_force_clean_hrmp | ParasHrmpCall_force_process_hrmp_close | ParasHrmpCall_force_process_hrmp_open | ParasHrmpCall_hrmp_accept_open_channel | ParasHrmpCall_hrmp_close_channel | ParasHrmpCall_hrmp_init_open_channel + +/** + * This extrinsic triggers the cleanup of all the HRMP storage items that + * a para may have. Normally this happens once per session, but this allows + * you to trigger the cleanup immediately for a specific parachain. + * + * Origin must be Root. + */ +export interface ParasHrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: ParaId +} + +/** + * Force process hrmp close channel requests. + * + * If there are pending HRMP close channel requests, you can use this + * function process all of those requests immediately. + */ +export interface ParasHrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' +} + +/** + * Force process hrmp open channel requests. + * + * If there are pending HRMP open channel requests, you can use this + * function process all of those requests immediately. + */ +export interface ParasHrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' +} + +/** + * Accept a pending open channel request from the given sender. + * + * The channel will be opened only on the next session boundary. + */ +export interface ParasHrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: ParaId +} + +/** + * Initiate unilateral closing of a channel. The origin must be either the sender or the + * recipient in the channel being closed. + * + * The closure can only happen on a session change. + */ +export interface ParasHrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * Initiate opening a channel from a parachain to a given recipient with given channel + * parameters. + * + * - `proposed_max_capacity` - specifies how many messages can be in the channel at once. + * - `proposed_max_message_size` - specifies the maximum size of any of the messages. + * + * These numbers are a subject to the relay-chain configuration limits. + * + * The channel can be opened only after the recipient confirms it and only on a session + * change. + */ +export interface ParasHrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: ParaId + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +export interface HrmpChannelId { + sender: number + receiver: number +} + +export type ParasDmpCall = never + +export type ParasCall = ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head + +/** + * Note a new block head for para within the context of the current block. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: ParaId + newHead: HeadData +} + +/** + * Put a parachain directly into the next session's action queue. + * We can't queue it any sooner than this without going into the + * initializer... + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: ParaId +} + +/** + * Schedule a code upgrade for block `expected_at`. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: ParaId + newCode: ValidationCode + expectedAt: BlockNumber +} + +/** + * Set the storage for the parachain validation code immediately. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: ParaId + newCode: ValidationCode +} + +/** + * Set the storage for the current parachain head data immediately. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: ParaId + newHead: HeadData +} + +export type ParachainsConfigurationCall = ParachainsConfigurationCall_set_chain_availability_period | ParachainsConfigurationCall_set_code_retention_period | ParachainsConfigurationCall_set_dispute_conclusion_by_time_out_period | ParachainsConfigurationCall_set_dispute_max_spam_slots | ParachainsConfigurationCall_set_dispute_period | ParachainsConfigurationCall_set_dispute_post_conclusion_acceptance_period | ParachainsConfigurationCall_set_group_rotation_frequency | ParachainsConfigurationCall_set_hrmp_channel_max_capacity | ParachainsConfigurationCall_set_hrmp_channel_max_message_size | ParachainsConfigurationCall_set_hrmp_channel_max_total_size | ParachainsConfigurationCall_set_hrmp_max_message_num_per_candidate | ParachainsConfigurationCall_set_hrmp_max_parachain_inbound_channels | ParachainsConfigurationCall_set_hrmp_max_parachain_outbound_channels | ParachainsConfigurationCall_set_hrmp_max_parathread_inbound_channels | ParachainsConfigurationCall_set_hrmp_max_parathread_outbound_channels | ParachainsConfigurationCall_set_hrmp_open_request_ttl | ParachainsConfigurationCall_set_hrmp_recipient_deposit | ParachainsConfigurationCall_set_hrmp_sender_deposit | ParachainsConfigurationCall_set_max_code_size | ParachainsConfigurationCall_set_max_downward_message_size | ParachainsConfigurationCall_set_max_head_data_size | ParachainsConfigurationCall_set_max_pov_size | ParachainsConfigurationCall_set_max_upward_message_num_per_candidate | ParachainsConfigurationCall_set_max_upward_message_size | ParachainsConfigurationCall_set_max_upward_queue_count | ParachainsConfigurationCall_set_max_upward_queue_size | ParachainsConfigurationCall_set_max_validators | ParachainsConfigurationCall_set_max_validators_per_core | ParachainsConfigurationCall_set_n_delay_tranches | ParachainsConfigurationCall_set_needed_approvals | ParachainsConfigurationCall_set_no_show_slots | ParachainsConfigurationCall_set_parathread_cores | ParachainsConfigurationCall_set_parathread_retries | ParachainsConfigurationCall_set_relay_vrf_modulo_samples | ParachainsConfigurationCall_set_scheduling_lookahead | ParachainsConfigurationCall_set_thread_availability_period | ParachainsConfigurationCall_set_ump_service_total_weight | ParachainsConfigurationCall_set_validation_upgrade_delay | ParachainsConfigurationCall_set_validation_upgrade_frequency | ParachainsConfigurationCall_set_zeroth_delay_tranche_width + +/** + * Set the availability period for parachains. + */ +export interface ParachainsConfigurationCall_set_chain_availability_period { + __kind: 'set_chain_availability_period' + new: BlockNumber +} + +/** + * Set the acceptance period for an included candidate. + */ +export interface ParachainsConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: BlockNumber +} + +/** + * Set the dispute conclusion by time out period. + */ +export interface ParachainsConfigurationCall_set_dispute_conclusion_by_time_out_period { + __kind: 'set_dispute_conclusion_by_time_out_period' + new: BlockNumber +} + +/** + * Set the maximum number of dispute spam slots. + */ +export interface ParachainsConfigurationCall_set_dispute_max_spam_slots { + __kind: 'set_dispute_max_spam_slots' + new: number +} + +/** + * Set the dispute period, in number of sessions to keep for disputes. + */ +export interface ParachainsConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: SessionIndex +} + +/** + * Set the dispute post conclusion acceptance period. + */ +export interface ParachainsConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: BlockNumber +} + +/** + * Set the parachain validator-group rotation frequency + */ +export interface ParachainsConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: BlockNumber +} + +/** + * Sets the maximum number of messages allowed in an HRMP channel at once. + */ +export interface ParachainsConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * Sets the maximum size of a message that could ever be put into an HRMP channel. + */ +export interface ParachainsConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * Sets the maximum total size of messages in bytes allowed in an HRMP channel at once. + */ +export interface ParachainsConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * Sets the maximum number of outbound HRMP messages can be sent by a candidate. + */ +export interface ParachainsConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parachain is allowed to accept. + */ +export interface ParachainsConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parachain is allowed to open. + */ +export interface ParachainsConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parathread is allowed to accept. + */ +export interface ParachainsConfigurationCall_set_hrmp_max_parathread_inbound_channels { + __kind: 'set_hrmp_max_parathread_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parathread is allowed to open. + */ +export interface ParachainsConfigurationCall_set_hrmp_max_parathread_outbound_channels { + __kind: 'set_hrmp_max_parathread_outbound_channels' + new: number +} + +/** + * Sets the number of sessions after which an HRMP open channel request expires. + */ +export interface ParachainsConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * Sets the amount of funds that the recipient should provide for accepting opening an HRMP + * channel. + */ +export interface ParachainsConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: Balance +} + +/** + * Sets the amount of funds that the sender should provide for opening an HRMP channel. + */ +export interface ParachainsConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: Balance +} + +/** + * Set the max validation code size for incoming upgrades. + */ +export interface ParachainsConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * Set the critical downward message size. + */ +export interface ParachainsConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * Set the max head data size for paras. + */ +export interface ParachainsConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * Set the max POV block size for incoming upgrades. + */ +export interface ParachainsConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * Sets the maximum number of messages that a candidate can contain. + */ +export interface ParachainsConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum size of an upward message that can be sent by a candidate. + */ +export interface ParachainsConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * Sets the maximum items that can present in a upward dispatch queue at once. + */ +export interface ParachainsConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * Sets the maximum total size of items that can present in a upward dispatch queue at once. + */ +export interface ParachainsConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * Set the maximum number of validators to use in parachain consensus. + */ +export interface ParachainsConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * Set the maximum number of validators to assign to any core. + */ +export interface ParachainsConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * Set the total number of delay tranches. + */ +export interface ParachainsConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * Set the number of validators needed to approve a block. + */ +export interface ParachainsConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * Set the no show slots, in number of number of consensus slots. + * Must be at least 1. + */ +export interface ParachainsConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * Set the number of parathread execution cores. + */ +export interface ParachainsConfigurationCall_set_parathread_cores { + __kind: 'set_parathread_cores' + new: number +} + +/** + * Set the number of retries for a particular parathread. + */ +export interface ParachainsConfigurationCall_set_parathread_retries { + __kind: 'set_parathread_retries' + new: number +} + +/** + * Set the number of samples to do of the RelayVRFModulo approval assignment criterion. + */ +export interface ParachainsConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * Set the scheduling lookahead, in expected number of blocks at peak throughput. + */ +export interface ParachainsConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * Set the availability period for parathreads. + */ +export interface ParachainsConfigurationCall_set_thread_availability_period { + __kind: 'set_thread_availability_period' + new: BlockNumber +} + +/** + * Sets the soft limit for the phase of dispatching dispatchable upward messages. + */ +export interface ParachainsConfigurationCall_set_ump_service_total_weight { + __kind: 'set_ump_service_total_weight' + new: Weight +} + +/** + * Set the validation upgrade delay. + */ +export interface ParachainsConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: BlockNumber +} + +/** + * Set the validation upgrade frequency. + */ +export interface ParachainsConfigurationCall_set_validation_upgrade_frequency { + __kind: 'set_validation_upgrade_frequency' + new: BlockNumber +} + +/** + * Set the zeroth delay tranche width. + */ +export interface ParachainsConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +export type OffencesCall = never + +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + call: OpaqueCall + storeCall: boolean + maxWeight: Weight +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId[] + call: Type_139 +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId[] + timepoint: Timepoint + callHash: Bytes +} + +export type OpaqueCall = Bytes + +export interface Timepoint { + height: BlockNumber + index: number +} + +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: AccountIndex +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId + index: AccountIndex + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: AccountIndex +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: AccountIndex +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId + index: AccountIndex +} + +export type AccountIndex = number + +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) + * and E is length of `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Signature +} + +export interface Heartbeat { + blockNumber: BlockNumber + networkState: OpaqueNetworkState + sessionIndex: SessionIndex + authorityIndex: AuthIndex + validatorsLen: number +} + +export type AuthIndex = number + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: LookupSource + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: RegistrarIndex +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: LookupSource +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: LookupSource + judgement: IdentityJudgement +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: LookupSource +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: LookupSource + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: bigint +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId, Data][] +} + +export interface IdentityInfo { + additional: IdentityInfoAdditional[] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (H160 | undefined) + image: Data + twitter: Data +} + +export type IdentityInfoAdditional = [Data, Data] + +export type IdentityJudgement = IdentityJudgement_Erroneous | IdentityJudgement_FeePaid | IdentityJudgement_KnownGood | IdentityJudgement_LowQuality | IdentityJudgement_OutOfDate | IdentityJudgement_Reasonable | IdentityJudgement_Unknown + +export interface IdentityJudgement_Erroneous { + __kind: 'Erroneous' +} + +export interface IdentityJudgement_FeePaid { + __kind: 'FeePaid' + value: Balance +} + +export interface IdentityJudgement_KnownGood { + __kind: 'KnownGood' +} + +export interface IdentityJudgement_LowQuality { + __kind: 'LowQuality' +} + +export interface IdentityJudgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface IdentityJudgement_Reasonable { + __kind: 'Reasonable' +} + +export interface IdentityJudgement_Unknown { + __kind: 'Unknown' +} + +export type RegistrarIndex = number + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: H256 +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: H256 +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: H256 +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: H256 +} + +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has + * stalled. This will trigger a forced authority set change at the beginning + * of the next session, to be enacted `delay` blocks after that. The delay + * should be high enough to safely assume that the block signalling the + * forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters + * will start the new authority set using the given finalized block as base. + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: BlockNumber + bestFinalizedBlockNumber: BlockNumber +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface KeyOwnerProof { + session: SessionIndex + trieNodes: Bytes[] + validatorCount: ValidatorCount +} + +export type ValidatorCount = number + +export interface GrandpaEquivocationProof { + setId: SetId + equivocation: GrandpaEquivocation +} + +export type GrandpaEquivocation = GrandpaEquivocation_Precommit | GrandpaEquivocation_Prevote + +export interface GrandpaEquivocation_Precommit { + __kind: 'Precommit' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocation_Prevote { + __kind: 'Prevote' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocationValue { + roundNumber: bigint + identity: AuthorityId + first: [GrandpaPrevote, AuthoritySignature] + second: [GrandpaPrevote, AuthoritySignature] +} + +export type AuthoritySignature = Bytes + +export interface GrandpaPrevote { + targetHash: Hash + targetNumber: BlockNumber +} + +export type SetId = bigint + +export type GiltCall = GiltCall_place_bid | GiltCall_retract_bid | GiltCall_set_target | GiltCall_thaw + +/** + * Place a bid for a gilt to be issued. + * + * Origin must be Signed, and account must have at least `amount` in free balance. + * + * - `amount`: The amount of the bid; these funds will be reserved. If the bid is + * successfully elevated into an issued gilt, then these funds will continue to be + * reserved until the gilt expires. Must be at least `MinFreeze`. + * - `duration`: The number of periods for which the funds will be locked if the gilt is + * issued. It will expire only after this period has elapsed after the point of issuance. + * Must be greater than 1 and no more than `QueueCount`. + * + * Complexities: + * - `Queues[duration].len()` (just take max). + */ +export interface GiltCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * Retract a previously placed bid. + * + * Origin must be Signed, and the account should have previously issued a still-active bid + * of `amount` for `duration`. + * + * - `amount`: The amount of the previous bid. + * - `duration`: The duration of the previous bid. + */ +export interface GiltCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * Set target proportion of gilt-funds. + * + * Origin must be `AdminOrigin`. + * + * - `target`: The target proportion of effective issued funds that should be under gilts + * at any one time. + */ +export interface GiltCall_set_target { + __kind: 'set_target' + target: bigint +} + +/** + * Remove an active but expired gilt. Reserved funds under gilt are freed and balance is + * adjusted to ensure that the funds grow or shrink to maintain the equivalent proportion + * of effective total issued funds. + * + * Origin must be Signed and the account must be the owner of the gilt of the given index. + * + * - `index`: The index of the gilt to be thawed. + */ +export interface GiltCall_thaw { + __kind: 'thaw' + index: number +} + +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * Set a solution in the queue, to be handed out to the client of this pallet in the next + * call to `ElectionProvider::elect`. + * + * This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`. + * + * The solution is not checked for any feasibility and is assumed to be trustworthy, as any + * feasibility check itself can in principle cause the election process to fail (due to + * memory/weight constrains). + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + solution: ReadySolution +} + +/** + * Set a new value for `MinimumUntrustedScore`. + * + * Dispatch origin must be aligned with `T::ForceOrigin`. + * + * This check can be turned off by setting the value to `None`. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (ElectionScore | undefined) +} + +/** + * Submit a solution for the unsigned phase. + * + * The dispatch origin fo this call must be __none__. + * + * This submission is checked on the fly. Moreover, this unsigned solution is only + * validated when submitted to the pool from the **local** node. Effectively, this means + * that only active validators can submit this transaction when authoring a block (similar + * to an inherent). + * + * To prevent any incorrect solution (and thus wasted time/weight), this transaction will + * panic if the solution submitted by the validator is invalid in any way, effectively + * putting their authoring reward at risk. + * + * No deposit or reward is associated with this submission. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + solution: RawSolution + witness: SolutionOrSnapshotSize +} + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export interface RawSolution { + compact: CompactAssignmentsWith24 + score: ElectionScore + round: number +} + +export interface CompactAssignmentsWith24 { + votes1: [NominatorIndexCompact, ValidatorIndexCompact][] + votes2: [NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact][] + votes3: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes4: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes5: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes6: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes7: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes8: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes9: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes10: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes11: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes12: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes13: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes14: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes15: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes16: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes17: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes18: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes19: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes20: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes21: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes22: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes23: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes24: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] +} + +export type CompactScoreCompact = [ValidatorIndexCompact, OffchainAccuracyCompact] + +export type OffchainAccuracyCompact = number + +export type ValidatorIndexCompact = number + +export type NominatorIndexCompact = number + +export type ElectionScore = bigint[] + +export interface ReadySolution { + supports: [AccountId, SolutionSupport][] + score: ElectionScore + compute: ElectionCompute +} + +export type ElectionCompute = ElectionCompute_OnChain | ElectionCompute_Signed | ElectionCompute_Unsigned + +export interface ElectionCompute_OnChain { + __kind: 'OnChain' +} + +export interface ElectionCompute_Signed { + __kind: 'Signed' +} + +export interface ElectionCompute_Unsigned { + __kind: 'Unsigned' +} + +export interface SolutionSupport { + total: ExtendedBalance + voters: [AccountId, ExtendedBalance][] +} + +export type ExtendedBalance = bigint + +export type DemocracyCall = DemocracyCall_blacklist | DemocracyCall_cancel_proposal | DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. + * + * If called on a queued public or external proposal, then this will result in it being + * removed. If the `ref_index` supplied is an active referendum with the proposal hash, + * then it will be cancelled. + * + * The dispatch origin of this call must be `BlacklistOrigin`. + * + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. + * + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). + */ +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: Hash + maybeRefIndex?: (ReferendumIndex | undefined) +} + +/** + * Remove a proposal. + * + * The dispatch origin of this call must be `CancelProposalOrigin`. + * + * - `prop_index`: The index of the proposal to cancel. + * + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number +} + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: ReferendumIndex +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must + * not be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId + conviction: Conviction + balance: BalanceOf +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: ReferendumIndex +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: Hash + index: ReferendumIndex +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Weight: `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: Hash +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: Hash +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: Hash +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * `FastTrackVotingPeriod` if too low. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: Hash + votingPeriod: BlockNumber + delay: BlockNumber +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. When this call is successful, i.e. + * the preimage has not been uploaded before and matches some imminent proposal, + * no fee is paid. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * Weight: `O(p)` + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: Hash + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. + * Extrinsic is weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * Weight: `O(D)` where D is length of proposal. + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: Hash + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId + index: ReferendumIndex +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: ReferendumIndex +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * Weight: `O(S)` where S is the number of seconds a proposal already has. + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * Weight: `O(V + log(V))` where V is number of `existing vetoers` + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: Hash +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of referendums the voter has voted on. + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + value: AccountVoteSplit +} + +export interface AccountVote_Standard { + __kind: 'Standard' + value: AccountVoteStandard +} + +export interface AccountVoteStandard { + vote: Vote + balance: Balance +} + +export type Vote = number + +export interface AccountVoteSplit { + aye: Balance + nay: Balance +} + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +export type ReferendumIndex = number + +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * Add an optional memo to an existing crowdloan contribution. + * + * Origin must be Signed, and the user must have contributed to the crowdloan. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: ParaId + memo: Bytes +} + +/** + * Contribute to a crowd sale. This will transfer some balance over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * Create a new crowdloaning campaign for a parachain slot with the given lease period range. + * + * This applies a lock to your parachain configuration, ensuring that it cannot be changed + * by the parachain manager. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Remove a fund after the retirement period has ended and all funds have been returned. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * Edit the configuration for an in-progress crowdloan. + * + * Can only be called by Root origin. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Poke the fund into NewRaise + * + * Origin must be Signed, and the fund has non-zero raise. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: ParaId +} + +/** + * Automatically refund contributors of an ended crowdloan. + * Due to weight restrictions, this function may need to be called multiple + * times to fully refund all users. We will refund `RemoveKeysLimit` users at a time. + * + * Origin must be signed, but can come from anyone. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * Withdraw full balance of a specific contributor. + * + * Origin must be signed, but can come from anyone. + * + * The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement + * flag must be set. For a fund to be ready for retirement, then: + * - it must not already be in retirement; + * - the amount of raised funds must be bigger than the _free_ balance of the account; + * - and either: + * - the block number must be at least `end`; or + * - the current lease period must be greater than the fund's `last_period`. + * + * In this case, the fund's retirement flag is set and its `end` is reset to the current block + * number. + * + * - `who`: The account whose contribution should be withdrawn. + * - `index`: The parachain to whose crowdloan the contribution was made. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId + index: number +} + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: EcdsaSignature +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Ed25519Signature +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Sr25519Signature +} + +export type Sr25519Signature = Bytes + +export type Ed25519Signature = Bytes + +export type EcdsaSignature = Bytes + +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export type MemberCount = number + +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: BalanceOf + vestingSchedule?: ([BalanceOf, BalanceOf, BlockNumber] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId | undefined) +} + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export type EthereumAddress = Bytes + +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: LookupSource +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: LookupSource + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is malicious + * or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_all | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is + * not assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: LookupSource + dest: LookupSource + value: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also decrease the total issuance of the system (`TotalIssuance`). + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + * + * # + * - Independent of the arguments. + * - Contains a limited number of reads and writes. + * --------------------- + * - Base Weight: + * - Creating: 27.56 µs + * - Killing: 35.11 µs + * - DB Weight: 1 Read, 1 Write to `who` + * # + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: LookupSource + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * It will decrease the total issuance of the system by the `TransferFee`. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for + * input config types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional + * check that the transfer will not kill the origin account. + * --------------------------------- + * - Base Weight: 73.64 µs, worst case scenario (account created, account removed) + * - DB Weight: 1 Read and 1 Write to destination account + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: LookupSource + value: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). + * # + * - O(1). Just like transfer, but reading the user's transferable balance first. + * # + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: LookupSource + keepAlive: boolean +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + * # + * - Cheaper than transfer because account cannot be killed. + * - Base Weight: 51.4 µs + * - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already) + * # + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: LookupSource + value: bigint +} + +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Plan an epoch config change. The epoch config change is recorded and will be enacted on + * the next call to `enact_epoch_change`. The config will be activated one epoch after. + * Multiple calls to this method will replace any existing planned config change that had + * not been enacted yet. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface BabeEquivocationProof { + offender: AuthorityId + slotNumber: SlotNumber + firstHeader: Header + secondHeader: Header +} + +export type SlotNumber = bigint + +export type NextConfigDescriptor = NextConfigDescriptor_V0 | NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V0 { + __kind: 'V0' +} + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + value: NextConfigDescriptorV1 +} + +export interface NextConfigDescriptorV1 { + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +export type AuthorityDiscoveryCall = never + +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Cancel an in-progress auction. + * + * Can only be called by Root origin. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: Key, + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => Key), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_changes_trie_config: sts.enumStruct({ + changesTrieConfig: sts.option(() => ChangesTrieConfiguration), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => KeyValue), + }), + } +}) + +export const KeyValue = sts.tuple(() => [StorageKey, StorageData]) + +export const StorageData = sts.bytes() + +export const StorageKey = sts.bytes() + +export const ChangesTrieConfiguration: sts.Type = sts.struct(() => { + return { + digestInterval: sts.number(), + digestLevels: sts.number(), + } +}) + +export const Key = sts.bytes() + +export const Perbill = sts.number() + +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: LookupSource, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: EraIndex, + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + controller: AccountId, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => LookupSource), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => LookupSource), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId, + era: EraIndex, + }), + reap_stash: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: LookupSource, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + update_staking_limits: sts.enumStruct({ + minNominatorBond: BalanceOf, + minValidatorBond: BalanceOf, + maxNominatorCount: sts.option(() => sts.number()), + maxValidatorCount: sts.option(() => sts.number()), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export const BalanceOf = sts.bigint() + +export const Percent = sts.number() + +export const EraIndex = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: BalanceOf, + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId, + judgement: SocietyJudgement, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: LookupSource, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId, + value: BalanceOf, + tip: BalanceOf, + }), + } +}) + +export const SocietyJudgement: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: ParaId, + }), + force_lease: sts.enumStruct({ + para: ParaId, + leaser: AccountId, + amount: BalanceOf, + periodBegin: LeasePeriodOf, + periodCount: LeasePeriodOf, + }), + trigger_onboard: sts.enumStruct({ + para: ParaId, + }), + } +}) + +export const LeasePeriodOf = sts.number() + +export const ParaId = sts.number() + +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: Keys, + proof: sts.bytes(), + }), + } +}) + +export const Keys = sts.tuple(() => [AccountId, AccountId, AccountId, AccountId, AccountId, AccountId]) + +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: BlockNumber, + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_139, + }), + schedule_after: sts.enumStruct({ + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_139, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_139, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_139, + }), + } +}) + +export const Priority = sts.number() + +export const Period = sts.tuple(() => [BlockNumber, sts.number()]) + +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + deregister: sts.enumStruct({ + id: ParaId, + }), + force_register: sts.enumStruct({ + who: AccountId, + deposit: BalanceOf, + id: ParaId, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + force_remove_lock: sts.enumStruct({ + para: ParaId, + }), + register: sts.enumStruct({ + id: ParaId, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + reserve: sts.unit(), + swap: sts.enumStruct({ + id: ParaId, + other: ParaId, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId, + call: Type_139, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId, + }), + claim_recovery: sts.enumStruct({ + account: AccountId, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId), + threshold: sts.number(), + delayPeriod: BlockNumber, + }), + initiate_recovery: sts.enumStruct({ + account: AccountId, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + } +}) + +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: AccountId, + proxyType: ProxyType, + delay: BlockNumber, + }), + announce: sts.enumStruct({ + real: AccountId, + callHash: CallHashOf, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + delay: BlockNumber, + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_139, + }), + proxy_announced: sts.enumStruct({ + delegate: AccountId, + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_139, + }), + reject_announcement: sts.enumStruct({ + delegate: AccountId, + callHash: CallHashOf, + }), + remove_announcement: sts.enumStruct({ + real: AccountId, + callHash: CallHashOf, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: AccountId, + proxyType: ProxyType, + delay: BlockNumber, + }), + } +}) + +export const CallHashOf = sts.bytes() + +export const PhragmenElectionCall: sts.Type = sts.closedEnum(() => { + return { + clean_defunct_voters: sts.enumStruct({ + numVoters: sts.number(), + numDefunct: sts.number(), + }), + remove_member: sts.enumStruct({ + who: LookupSource, + hasReplacement: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId), + value: sts.bigint(), + }), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export const ParasUmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasSessionInfoCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasSchedulerCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasInitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: BlockNumber, + }), + } +}) + +export const ParasInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: ParachainsInherentData, + }), + } +}) + +export const ParachainsInherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => SignedAvailabilityBitfield), + backedCandidates: sts.array(() => BackedCandidate), + disputes: sts.array(() => DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: Hash, + number: sts.number(), + stateRoot: Hash, + extrinsicsRoot: Hash, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + AuthoritiesChange: sts.array(() => AuthorityId), + ChangesTrieRoot: Hash, + ChangesTrieSignal: ChangesTrieSignal, + Consensus: Consensus, + Other: sts.bytes(), + PreRuntime: PreRuntime, + RuntimeEnvironmentUpdated: sts.unit(), + Seal: Seal, + SealV0: SealV0, + } +}) + +export const SealV0 = sts.tuple(() => [sts.bigint(), Signature]) + +export const Signature = sts.bytes() + +export const Seal = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const PreRuntime = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const Consensus = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const ConsensusEngineId = sts.bytes() + +export const ChangesTrieSignal: sts.Type = sts.closedEnum(() => { + return { + NewConfiguration: sts.option(() => ChangesTrieConfiguration), + } +}) + +export const AuthorityId = sts.bytes() + +export const DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: SessionIndex, + statements: sts.array(() => sts.tuple(() => [DisputeStatement, ParaValidatorIndex, ValidatorSignature])), + } +}) + +export const ValidatorSignature = sts.bytes() + +export const ParaValidatorIndex = sts.number() + +export const DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: InvalidDisputeStatementKind, + Valid: ValidDisputeStatementKind, + } +}) + +export const ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + BackingSeconded: Hash, + BackingValid: Hash, + Explicit: sts.unit(), + } +}) + +export const InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export const SessionIndex = sts.number() + +export const CandidateHash = sts.bytes() + +export const BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: CommittedCandidateReceipt, + validityVotes: sts.array(() => ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: ValidatorSignature, + Implicit: ValidatorSignature, + Never: sts.unit(), + } +}) + +export const CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: CandidateDescriptor, + commitments: CandidateCommitments, + } +}) + +export const CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => UpwardMessage), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: BlockNumber, + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: sts.number(), + data: sts.bytes(), + } +}) + +export const UpwardMessage = sts.bytes() + +export const CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: ParaId, + relayParent: RelayChainHash, + collatorId: CollatorId, + persistedValidationDataHash: Hash, + povHash: Hash, + erasureRoot: Hash, + signature: CollatorSignature, + paraHead: Hash, + validationCodeHash: ValidationCodeHash, + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const CollatorSignature = sts.bytes() + +export const CollatorId = sts.bytes() + +export const RelayChainHash = sts.bytes() + +export const SignedAvailabilityBitfield: sts.Type = sts.struct(() => { + return { + payload: sts.bitseq(), + validatorIndex: ParaValidatorIndex, + signature: ValidatorSignature, + } +}) + +export const ParasInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasHrmpCall: sts.Type = sts.closedEnum(() => { + return { + force_clean_hrmp: sts.enumStruct({ + para: ParaId, + }), + force_process_hrmp_close: sts.unit(), + force_process_hrmp_open: sts.unit(), + hrmp_accept_open_channel: sts.enumStruct({ + sender: ParaId, + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: ParaId, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: sts.number(), + receiver: sts.number(), + } +}) + +export const ParasDmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + force_note_new_head: sts.enumStruct({ + para: ParaId, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: ParaId, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: ParaId, + newCode: ValidationCode, + expectedAt: BlockNumber, + }), + force_set_current_code: sts.enumStruct({ + para: ParaId, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: ParaId, + newHead: HeadData, + }), + } +}) + +export const ParachainsConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_chain_availability_period: sts.enumStruct({ + new: BlockNumber, + }), + set_code_retention_period: sts.enumStruct({ + new: BlockNumber, + }), + set_dispute_conclusion_by_time_out_period: sts.enumStruct({ + new: BlockNumber, + }), + set_dispute_max_spam_slots: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: SessionIndex, + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: BlockNumber, + }), + set_group_rotation_frequency: sts.enumStruct({ + new: BlockNumber, + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: Balance, + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: Balance, + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_cores: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_retries: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_thread_availability_period: sts.enumStruct({ + new: BlockNumber, + }), + set_ump_service_total_weight: sts.enumStruct({ + new: Weight, + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: BlockNumber, + }), + set_validation_upgrade_frequency: sts.enumStruct({ + new: BlockNumber, + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +export const OffencesCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + call: OpaqueCall, + storeCall: sts.boolean(), + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId), + call: Type_139, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const OpaqueCall = sts.bytes() + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: BlockNumber, + index: sts.number(), + } +}) + +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: AccountIndex, + }), + force_transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: AccountIndex, + }), + freeze: sts.enumStruct({ + index: AccountIndex, + }), + transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + }), + } +}) + +export const AccountIndex = sts.number() + +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: Signature, + }), + } +}) + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: BlockNumber, + networkState: OpaqueNetworkState, + sessionIndex: SessionIndex, + authorityIndex: AuthIndex, + validatorsLen: sts.number(), + } +}) + +export const AuthIndex = sts.number() + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId, + }), + add_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: RegistrarIndex, + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: LookupSource, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: LookupSource, + judgement: IdentityJudgement, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: LookupSource, + }), + rename_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: sts.bigint(), + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => IdentityInfoAdditional), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => H160), + image: Data, + twitter: Data, + } +}) + +export const IdentityInfoAdditional = sts.tuple(() => [Data, Data]) + +export const IdentityJudgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: Balance, + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export const RegistrarIndex = sts.number() + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: H256, + Keccak256: H256, + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: H256, + ShaThree256: H256, + } +}) + +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: BlockNumber, + bestFinalizedBlockNumber: BlockNumber, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const KeyOwnerProof: sts.Type = sts.struct(() => { + return { + session: SessionIndex, + trieNodes: sts.array(() => sts.bytes()), + validatorCount: ValidatorCount, + } +}) + +export const ValidatorCount = sts.number() + +export const GrandpaEquivocationProof: sts.Type = sts.struct(() => { + return { + setId: SetId, + equivocation: GrandpaEquivocation, + } +}) + +export const GrandpaEquivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: GrandpaEquivocationValue, + Prevote: GrandpaEquivocationValue, + } +}) + +export const GrandpaEquivocationValue: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: AuthorityId, + first: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + second: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + } +}) + +export const AuthoritySignature = sts.bytes() + +export const GrandpaPrevote: sts.Type = sts.struct(() => { + return { + targetHash: Hash, + targetNumber: BlockNumber, + } +}) + +export const SetId = sts.bigint() + +export const GiltCall: sts.Type = sts.closedEnum(() => { + return { + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + set_target: sts.enumStruct({ + target: sts.bigint(), + }), + thaw: sts.enumStruct({ + index: sts.number(), + }), + } +}) + +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + set_emergency_election_result: sts.enumStruct({ + solution: ReadySolution, + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => ElectionScore), + }), + submit_unsigned: sts.enumStruct({ + solution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export const RawSolution: sts.Type = sts.struct(() => { + return { + compact: CompactAssignmentsWith24, + score: ElectionScore, + round: sts.number(), + } +}) + +export const CompactAssignmentsWith24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [NominatorIndexCompact, ValidatorIndexCompact])), + votes2: sts.array(() => sts.tuple(() => [NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact])), + votes3: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes4: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes5: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes6: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes7: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes8: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes9: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes10: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes11: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes12: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes13: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes14: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes15: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes16: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes17: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes18: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes19: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes20: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes21: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes22: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes23: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes24: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + } +}) + +export const CompactScoreCompact = sts.tuple(() => [ValidatorIndexCompact, OffchainAccuracyCompact]) + +export const OffchainAccuracyCompact = sts.number() + +export const ValidatorIndexCompact = sts.number() + +export const NominatorIndexCompact = sts.number() + +export const ElectionScore = sts.array(() => sts.bigint()) + +export const ReadySolution: sts.Type = sts.struct(() => { + return { + supports: sts.array(() => sts.tuple(() => [AccountId, SolutionSupport])), + score: ElectionScore, + compute: ElectionCompute, + } +}) + +export const ElectionCompute: sts.Type = sts.closedEnum(() => { + return { + OnChain: sts.unit(), + Signed: sts.unit(), + Unsigned: sts.unit(), + } +}) + +export const SolutionSupport: sts.Type = sts.struct(() => { + return { + total: ExtendedBalance, + voters: sts.array(() => sts.tuple(() => [AccountId, ExtendedBalance])), + } +}) + +export const ExtendedBalance = sts.bigint() + +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + blacklist: sts.enumStruct({ + proposalHash: Hash, + maybeRefIndex: sts.option(() => ReferendumIndex), + }), + cancel_proposal: sts.enumStruct({ + propIndex: sts.number(), + }), + cancel_queued: sts.enumStruct({ + which: ReferendumIndex, + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId, + conviction: Conviction, + balance: BalanceOf, + }), + emergency_cancel: sts.enumStruct({ + refIndex: ReferendumIndex, + }), + enact_proposal: sts.enumStruct({ + proposalHash: Hash, + index: ReferendumIndex, + }), + external_propose: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_default: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: Hash, + }), + fast_track: sts.enumStruct({ + proposalHash: Hash, + votingPeriod: BlockNumber, + delay: BlockNumber, + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: Hash, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: Hash, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId, + index: ReferendumIndex, + }), + remove_vote: sts.enumStruct({ + index: ReferendumIndex, + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId, + }), + veto_external: sts.enumStruct({ + proposalHash: Hash, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: AccountVoteSplit, + Standard: AccountVoteStandard, + } +}) + +export const AccountVoteStandard: sts.Type = sts.struct(() => { + return { + vote: Vote, + balance: Balance, + } +}) + +export const Vote = sts.number() + +export const AccountVoteSplit: sts.Type = sts.struct(() => { + return { + aye: Balance, + nay: Balance, + } +}) + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export const ReferendumIndex = sts.number() + +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: ParaId, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: ParaId, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: EcdsaSignature, + Ed25519: Ed25519Signature, + Sr25519: Sr25519Signature, + } +}) + +export const Sr25519Signature = sts.bytes() + +export const Ed25519Signature = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: BalanceOf, + vestingSchedule: sts.option(() => sts.tuple(() => [BalanceOf, BalanceOf, BlockNumber])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export const EthereumAddress = sts.bytes() + +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: LookupSource, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: LookupSource, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: LookupSource, + dest: LookupSource, + value: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: LookupSource, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: LookupSource, + keepAlive: sts.boolean(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + } +}) + +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const BabeEquivocationProof: sts.Type = sts.struct(() => { + return { + offender: AuthorityId, + slotNumber: SlotNumber, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const SlotNumber = sts.bigint() + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V0: sts.unit(), + V1: NextConfigDescriptorV1, + } +}) + +export const NextConfigDescriptorV1: sts.Type = sts.struct(() => { + return { + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +export const AuthorityDiscoveryCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +export type Type_139 = Type_139_Auctions | Type_139_AuthorityDiscovery | Type_139_Authorship | Type_139_Babe | Type_139_Balances | Type_139_Bounties | Type_139_Claims | Type_139_Council | Type_139_Crowdloan | Type_139_Democracy | Type_139_ElectionProviderMultiPhase | Type_139_Gilt | Type_139_Grandpa | Type_139_Identity | Type_139_ImOnline | Type_139_Indices | Type_139_Multisig | Type_139_Offences | Type_139_ParachainsConfiguration | Type_139_Paras | Type_139_ParasDmp | Type_139_ParasHrmp | Type_139_ParasInclusion | Type_139_ParasInherent | Type_139_ParasInitializer | Type_139_ParasScheduler | Type_139_ParasSessionInfo | Type_139_ParasShared | Type_139_ParasUmp | Type_139_PhragmenElection | Type_139_Proxy | Type_139_Recovery | Type_139_Registrar | Type_139_Scheduler | Type_139_Session | Type_139_Slots | Type_139_Society | Type_139_Staking | Type_139_System | Type_139_TechnicalCommittee | Type_139_TechnicalMembership | Type_139_Timestamp | Type_139_Tips | Type_139_Treasury | Type_139_Utility | Type_139_Vesting | Type_139_XcmPallet + +export interface Type_139_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Type_139_AuthorityDiscovery { + __kind: 'AuthorityDiscovery' + value: AuthorityDiscoveryCall +} + +export interface Type_139_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Type_139_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Type_139_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Type_139_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Type_139_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Type_139_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Type_139_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Type_139_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Type_139_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Type_139_Gilt { + __kind: 'Gilt' + value: GiltCall +} + +export interface Type_139_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Type_139_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Type_139_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Type_139_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Type_139_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Type_139_Offences { + __kind: 'Offences' + value: OffencesCall +} + +export interface Type_139_ParachainsConfiguration { + __kind: 'ParachainsConfiguration' + value: ParachainsConfigurationCall +} + +export interface Type_139_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Type_139_ParasDmp { + __kind: 'ParasDmp' + value: ParasDmpCall +} + +export interface Type_139_ParasHrmp { + __kind: 'ParasHrmp' + value: ParasHrmpCall +} + +export interface Type_139_ParasInclusion { + __kind: 'ParasInclusion' + value: ParasInclusionCall +} + +export interface Type_139_ParasInherent { + __kind: 'ParasInherent' + value: ParasInherentCall +} + +export interface Type_139_ParasInitializer { + __kind: 'ParasInitializer' + value: ParasInitializerCall +} + +export interface Type_139_ParasScheduler { + __kind: 'ParasScheduler' + value: ParasSchedulerCall +} + +export interface Type_139_ParasSessionInfo { + __kind: 'ParasSessionInfo' + value: ParasSessionInfoCall +} + +export interface Type_139_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Type_139_ParasUmp { + __kind: 'ParasUmp' + value: ParasUmpCall +} + +export interface Type_139_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Type_139_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Type_139_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Type_139_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Type_139_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Type_139_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Type_139_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Type_139_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Type_139_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Type_139_System { + __kind: 'System' + value: SystemCall +} + +export interface Type_139_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Type_139_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Type_139_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Type_139_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Type_139_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Type_139_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Type_139_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Type_139_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId = sts.bytes() diff --git a/squid/src/types/v9080.ts b/squid/src/types/v9080.ts new file mode 100644 index 00000000..6ff45a25 --- /dev/null +++ b/squid/src/types/v9080.ts @@ -0,0 +1,9584 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Type_138: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + Gilt: GiltCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + ParachainsConfiguration: ParachainsConfigurationCall, + Paras: ParasCall, + ParasDmp: ParasDmpCall, + ParasHrmp: ParasHrmpCall, + ParasInclusion: ParasInclusionCall, + ParasInherent: ParasInherentCall, + ParasInitializer: ParasInitializerCall, + ParasScheduler: ParasSchedulerCall, + ParasSessionInfo: ParasSessionInfoCall, + ParasShared: ParasSharedCall, + ParasUmp: ParasUmpCall, + PhragmenElection: PhragmenElectionCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + XcmPallet: XcmPalletCall, + } +}) + +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + execute: sts.enumStruct({ + message: Xcm, + maxWeight: Weight, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: MultiLocation, + beneficiary: MultiLocation, + assets: sts.array(() => MultiAsset), + destWeight: Weight, + }), + send: sts.enumStruct({ + dest: MultiLocation, + message: Xcm, + }), + teleport_assets: sts.enumStruct({ + dest: MultiLocation, + beneficiary: MultiLocation, + assets: sts.array(() => MultiAsset), + destWeight: Weight, + }), + } +}) + +export const MultiAsset: sts.Type = sts.closedEnum(() => { + return { + AbstractFungible: sts.enumStruct({ + id: sts.bytes(), + instance: sts.bigint(), + }), + AbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + instance: AssetInstanceV0, + }), + All: sts.unit(), + AllAbstractFungible: sts.bytes(), + AllAbstractNonFungible: sts.bytes(), + AllConcreteFungible: MultiLocationV0, + AllConcreteNonFungible: MultiLocationV0, + AllFungible: sts.unit(), + AllNonFungible: sts.unit(), + ConcreteFungible: sts.enumStruct({ + id: MultiLocationV0, + amount: sts.bigint(), + }), + ConcreteNonFungible: sts.enumStruct({ + class: MultiLocationV0, + instance: AssetInstanceV0, + }), + None: sts.unit(), + } +}) + +export const MultiLocationV0: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: JunctionV0, + X2: sts.tuple(() => [JunctionV0, JunctionV0]), + X3: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0]), + X4: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X5: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X6: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X7: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X8: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + } +}) + +export const JunctionV0: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: NetworkId, + id: AccountId, + }), + AccountIndex64: sts.enumStruct({ + network: NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.bytes(), + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Parent: sts.unit(), + Plurality: sts.enumStruct({ + id: BodyId, + part: BodyPart, + }), + } +}) + +export const BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.number(), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export type BodyPart = BodyPart_AtLeastProportion | BodyPart_Fraction | BodyPart_Members | BodyPart_MoreThanProportion | BodyPart_Voice + +export interface BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface BodyPart_Members { + __kind: 'Members' + value: number +} + +export interface BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface BodyPart_Voice { + __kind: 'Voice' +} + +export const BodyId: sts.Type = sts.closedEnum(() => { + return { + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: sts.bytes(), + Technical: sts.unit(), + Unit: sts.unit(), + } +}) + +export type BodyId = BodyId_Executive | BodyId_Index | BodyId_Judicial | BodyId_Legislative | BodyId_Named | BodyId_Technical | BodyId_Unit + +export interface BodyId_Executive { + __kind: 'Executive' +} + +export interface BodyId_Index { + __kind: 'Index' + value: number +} + +export interface BodyId_Judicial { + __kind: 'Judicial' +} + +export interface BodyId_Legislative { + __kind: 'Legislative' +} + +export interface BodyId_Named { + __kind: 'Named' + value: Bytes +} + +export interface BodyId_Technical { + __kind: 'Technical' +} + +export interface BodyId_Unit { + __kind: 'Unit' +} + +export const NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: sts.bytes(), + Polkadot: sts.unit(), + } +}) + +export type NetworkId = NetworkId_Any | NetworkId_Kusama | NetworkId_Named | NetworkId_Polkadot + +export interface NetworkId_Any { + __kind: 'Any' +} + +export interface NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface NetworkId_Named { + __kind: 'Named' + value: Bytes +} + +export interface NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export type JunctionV0 = JunctionV0_AccountId32 | JunctionV0_AccountIndex64 | JunctionV0_AccountKey20 | JunctionV0_GeneralIndex | JunctionV0_GeneralKey | JunctionV0_OnlyChild | JunctionV0_PalletInstance | JunctionV0_Parachain | JunctionV0_Parent | JunctionV0_Plurality + +export interface JunctionV0_AccountId32 { + __kind: 'AccountId32' + network: NetworkId + id: AccountId +} + +export interface JunctionV0_AccountIndex64 { + __kind: 'AccountIndex64' + network: NetworkId + index: bigint +} + +export interface JunctionV0_AccountKey20 { + __kind: 'AccountKey20' + network: NetworkId + key: Bytes +} + +export interface JunctionV0_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface JunctionV0_GeneralKey { + __kind: 'GeneralKey' + value: Bytes +} + +export interface JunctionV0_OnlyChild { + __kind: 'OnlyChild' +} + +export interface JunctionV0_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface JunctionV0_Parachain { + __kind: 'Parachain' + value: number +} + +export interface JunctionV0_Parent { + __kind: 'Parent' +} + +export interface JunctionV0_Plurality { + __kind: 'Plurality' + id: BodyId + part: BodyPart +} + +export type AccountId = Bytes + +export type MultiLocationV0 = MultiLocationV0_Here | MultiLocationV0_X1 | MultiLocationV0_X2 | MultiLocationV0_X3 | MultiLocationV0_X4 | MultiLocationV0_X5 | MultiLocationV0_X6 | MultiLocationV0_X7 | MultiLocationV0_X8 + +export interface MultiLocationV0_Here { + __kind: 'Here' +} + +export interface MultiLocationV0_X1 { + __kind: 'X1' + value: JunctionV0 +} + +export interface MultiLocationV0_X2 { + __kind: 'X2' + value: [JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X3 { + __kind: 'X3' + value: [JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X4 { + __kind: 'X4' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X5 { + __kind: 'X5' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X6 { + __kind: 'X6' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X7 { + __kind: 'X7' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X8 { + __kind: 'X8' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export const AssetInstanceV0: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index128: sts.bigint(), + Index16: sts.number(), + Index32: sts.number(), + Index64: sts.bigint(), + Index8: sts.number(), + Undefined: sts.unit(), + } +}) + +export type AssetInstanceV0 = AssetInstanceV0_Array16 | AssetInstanceV0_Array32 | AssetInstanceV0_Array4 | AssetInstanceV0_Array8 | AssetInstanceV0_Blob | AssetInstanceV0_Index128 | AssetInstanceV0_Index16 | AssetInstanceV0_Index32 | AssetInstanceV0_Index64 | AssetInstanceV0_Index8 | AssetInstanceV0_Undefined + +export interface AssetInstanceV0_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface AssetInstanceV0_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface AssetInstanceV0_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface AssetInstanceV0_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface AssetInstanceV0_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface AssetInstanceV0_Index128 { + __kind: 'Index128' + value: bigint +} + +export interface AssetInstanceV0_Index16 { + __kind: 'Index16' + value: number +} + +export interface AssetInstanceV0_Index32 { + __kind: 'Index32' + value: number +} + +export interface AssetInstanceV0_Index64 { + __kind: 'Index64' + value: bigint +} + +export interface AssetInstanceV0_Index8 { + __kind: 'Index8' + value: number +} + +export interface AssetInstanceV0_Undefined { + __kind: 'Undefined' +} + +export type MultiAsset = MultiAsset_AbstractFungible | MultiAsset_AbstractNonFungible | MultiAsset_All | MultiAsset_AllAbstractFungible | MultiAsset_AllAbstractNonFungible | MultiAsset_AllConcreteFungible | MultiAsset_AllConcreteNonFungible | MultiAsset_AllFungible | MultiAsset_AllNonFungible | MultiAsset_ConcreteFungible | MultiAsset_ConcreteNonFungible | MultiAsset_None + +export interface MultiAsset_AbstractFungible { + __kind: 'AbstractFungible' + id: Bytes + instance: bigint +} + +export interface MultiAsset_AbstractNonFungible { + __kind: 'AbstractNonFungible' + class: Bytes + instance: AssetInstanceV0 +} + +export interface MultiAsset_All { + __kind: 'All' +} + +export interface MultiAsset_AllAbstractFungible { + __kind: 'AllAbstractFungible' + value: Bytes +} + +export interface MultiAsset_AllAbstractNonFungible { + __kind: 'AllAbstractNonFungible' + value: Bytes +} + +export interface MultiAsset_AllConcreteFungible { + __kind: 'AllConcreteFungible' + value: MultiLocationV0 +} + +export interface MultiAsset_AllConcreteNonFungible { + __kind: 'AllConcreteNonFungible' + value: MultiLocationV0 +} + +export interface MultiAsset_AllFungible { + __kind: 'AllFungible' +} + +export interface MultiAsset_AllNonFungible { + __kind: 'AllNonFungible' +} + +export interface MultiAsset_ConcreteFungible { + __kind: 'ConcreteFungible' + id: MultiLocationV0 + amount: bigint +} + +export interface MultiAsset_ConcreteNonFungible { + __kind: 'ConcreteNonFungible' + class: MultiLocationV0 + instance: AssetInstanceV0 +} + +export interface MultiAsset_None { + __kind: 'None' +} + +export const MultiLocation: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: JunctionV0, + X2: sts.tuple(() => [JunctionV0, JunctionV0]), + X3: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0]), + X4: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X5: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X6: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X7: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X8: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + } +}) + +export type MultiLocation = MultiLocation_Here | MultiLocation_X1 | MultiLocation_X2 | MultiLocation_X3 | MultiLocation_X4 | MultiLocation_X5 | MultiLocation_X6 | MultiLocation_X7 | MultiLocation_X8 + +export interface MultiLocation_Here { + __kind: 'Here' +} + +export interface MultiLocation_X1 { + __kind: 'X1' + value: JunctionV0 +} + +export interface MultiLocation_X2 { + __kind: 'X2' + value: [JunctionV0, JunctionV0] +} + +export interface MultiLocation_X3 { + __kind: 'X3' + value: [JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocation_X4 { + __kind: 'X4' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocation_X5 { + __kind: 'X5' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocation_X6 { + __kind: 'X6' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocation_X7 { + __kind: 'X7' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocation_X8 { + __kind: 'X8' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export const Weight = sts.bigint() + +export const Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: ResponseV0, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + RelayedFrom: sts.enumStruct({ + who: MultiLocationV0, + message: XcmV0, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + Transact: sts.enumStruct({ + originType: XcmOriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncodedCall, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + } +}) + +export const DoubleEncodedCall: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncodedCall { + encoded: Bytes +} + +export const XcmOriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type XcmOriginKind = XcmOriginKind_Native | XcmOriginKind_SovereignAccount | XcmOriginKind_Superuser | XcmOriginKind_Xcm + +export interface XcmOriginKind_Native { + __kind: 'Native' +} + +export interface XcmOriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface XcmOriginKind_Superuser { + __kind: 'Superuser' +} + +export interface XcmOriginKind_Xcm { + __kind: 'Xcm' +} + +export const XcmV0: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: ResponseV0, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + RelayedFrom: sts.enumStruct({ + who: MultiLocationV0, + message: XcmV0, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + Transact: sts.enumStruct({ + originType: XcmOriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncodedCall, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + } +}) + +export type XcmV0 = XcmV0_HrmpChannelAccepted | XcmV0_HrmpChannelClosing | XcmV0_HrmpNewChannelOpenRequest | XcmV0_QueryResponse | XcmV0_ReceiveTeleportedAsset | XcmV0_RelayedFrom | XcmV0_ReserveAssetDeposit | XcmV0_Transact | XcmV0_TransferAsset | XcmV0_TransferReserveAsset | XcmV0_WithdrawAsset + +export interface XcmV0_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface XcmV0_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface XcmV0_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface XcmV0_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: ResponseV0 +} + +export interface XcmV0_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export interface XcmV0_RelayedFrom { + __kind: 'RelayedFrom' + who: MultiLocationV0 + message: XcmV0 +} + +export interface XcmV0_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export interface XcmV0_Transact { + __kind: 'Transact' + originType: XcmOriginKind + requireWeightAtMost: bigint + call: DoubleEncodedCall +} + +export interface XcmV0_TransferAsset { + __kind: 'TransferAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 +} + +export interface XcmV0_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface XcmV0_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export type XcmOrderV0 = XcmOrderV0_BuyExecution | XcmOrderV0_DepositAsset | XcmOrderV0_DepositReserveAsset | XcmOrderV0_ExchangeAsset | XcmOrderV0_InitiateReserveWithdraw | XcmOrderV0_InitiateTeleport | XcmOrderV0_Null | XcmOrderV0_QueryHolding + +export interface XcmOrderV0_BuyExecution { + __kind: 'BuyExecution' + fees: MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: XcmV0[] +} + +export interface XcmOrderV0_DepositAsset { + __kind: 'DepositAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 +} + +export interface XcmOrderV0_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface XcmOrderV0_ExchangeAsset { + __kind: 'ExchangeAsset' + give: MultiAssetV0[] + receive: MultiAssetV0[] +} + +export interface XcmOrderV0_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: MultiAssetV0[] + reserve: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface XcmOrderV0_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: MultiAsset[] + dest: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface XcmOrderV0_Null { + __kind: 'Null' +} + +export interface XcmOrderV0_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: MultiLocationV0 + assets: MultiAssetV0[] +} + +export type MultiAssetV0 = MultiAssetV0_AbstractFungible | MultiAssetV0_AbstractNonFungible | MultiAssetV0_All | MultiAssetV0_AllAbstractFungible | MultiAssetV0_AllAbstractNonFungible | MultiAssetV0_AllConcreteFungible | MultiAssetV0_AllConcreteNonFungible | MultiAssetV0_AllFungible | MultiAssetV0_AllNonFungible | MultiAssetV0_ConcreteFungible | MultiAssetV0_ConcreteNonFungible | MultiAssetV0_None + +export interface MultiAssetV0_AbstractFungible { + __kind: 'AbstractFungible' + id: Bytes + instance: bigint +} + +export interface MultiAssetV0_AbstractNonFungible { + __kind: 'AbstractNonFungible' + class: Bytes + instance: AssetInstanceV0 +} + +export interface MultiAssetV0_All { + __kind: 'All' +} + +export interface MultiAssetV0_AllAbstractFungible { + __kind: 'AllAbstractFungible' + value: Bytes +} + +export interface MultiAssetV0_AllAbstractNonFungible { + __kind: 'AllAbstractNonFungible' + value: Bytes +} + +export interface MultiAssetV0_AllConcreteFungible { + __kind: 'AllConcreteFungible' + value: MultiLocationV0 +} + +export interface MultiAssetV0_AllConcreteNonFungible { + __kind: 'AllConcreteNonFungible' + value: MultiLocationV0 +} + +export interface MultiAssetV0_AllFungible { + __kind: 'AllFungible' +} + +export interface MultiAssetV0_AllNonFungible { + __kind: 'AllNonFungible' +} + +export interface MultiAssetV0_ConcreteFungible { + __kind: 'ConcreteFungible' + id: MultiLocationV0 + amount: bigint +} + +export interface MultiAssetV0_ConcreteNonFungible { + __kind: 'ConcreteNonFungible' + class: MultiLocationV0 + instance: AssetInstanceV0 +} + +export interface MultiAssetV0_None { + __kind: 'None' +} + +export type ResponseV0 = ResponseV0_Assets + +export interface ResponseV0_Assets { + __kind: 'Assets' + value: MultiAssetV0[] +} + +export const XcmOrderV0: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => XcmV0), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => MultiAssetV0), + receive: sts.array(() => MultiAssetV0), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + reserve: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => MultiAsset), + dest: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: MultiLocationV0, + assets: sts.array(() => MultiAssetV0), + }), + } +}) + +export const MultiAssetV0: sts.Type = sts.closedEnum(() => { + return { + AbstractFungible: sts.enumStruct({ + id: sts.bytes(), + instance: sts.bigint(), + }), + AbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + instance: AssetInstanceV0, + }), + All: sts.unit(), + AllAbstractFungible: sts.bytes(), + AllAbstractNonFungible: sts.bytes(), + AllConcreteFungible: MultiLocationV0, + AllConcreteNonFungible: MultiLocationV0, + AllFungible: sts.unit(), + AllNonFungible: sts.unit(), + ConcreteFungible: sts.enumStruct({ + id: MultiLocationV0, + amount: sts.bigint(), + }), + ConcreteNonFungible: sts.enumStruct({ + class: MultiLocationV0, + instance: AssetInstanceV0, + }), + None: sts.unit(), + } +}) + +export const ResponseV0: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => MultiAssetV0), + } +}) + +export type Xcm = Xcm_HrmpChannelAccepted | Xcm_HrmpChannelClosing | Xcm_HrmpNewChannelOpenRequest | Xcm_QueryResponse | Xcm_ReceiveTeleportedAsset | Xcm_RelayedFrom | Xcm_ReserveAssetDeposit | Xcm_Transact | Xcm_TransferAsset | Xcm_TransferReserveAsset | Xcm_WithdrawAsset + +export interface Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: ResponseV0 +} + +export interface Xcm_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export interface Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: MultiLocationV0 + message: XcmV0 +} + +export interface Xcm_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export interface Xcm_Transact { + __kind: 'Transact' + originType: XcmOriginKind + requireWeightAtMost: bigint + call: DoubleEncodedCall +} + +export interface Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 +} + +export interface Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export type XcmPalletCall = XcmPalletCall_execute | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets + +/** + * Execute an XCM message from a local, signed, origin. + * + * An event is deposited indicating whether `msg` could be executed completely or only + * partially. + * + * No more than `max_weight` will be used in its attempted execution. If this is less than the + * maximum amount of weight that the message could take to be executed, then no execution + * attempt will be made. + * + * NOTE: A successful return to this does *not* imply that the `msg` was executed successfully + * to completion; only that *some* of it was executed. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Xcm + maxWeight: Weight +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination chain and forward + * a notification XCM. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `dest_weight`: Equal to the total weight on `dest` of the XCM message + * `ReserveAssetDeposit { assets, effects: [ BuyExecution{..}, DepositAsset{..} ] }`. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: MultiLocation + beneficiary: MultiLocation + assets: MultiAsset[] + destWeight: Weight +} + +export interface XcmPalletCall_send { + __kind: 'send' + dest: MultiLocation + message: Xcm +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `dest_weight`: Equal to the total weight on `dest` of the XCM message + * `Teleport { assets, effects: [ BuyExecution{..}, DepositAsset{..} ] }`. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: MultiLocation + beneficiary: MultiLocation + assets: MultiAsset[] + destWeight: Weight +} + +export type Weight = bigint + +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: LookupSource, + target: LookupSource, + schedule: VestingInfo, + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: LookupSource, + }), + vested_transfer: sts.enumStruct({ + target: LookupSource, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: Balance, + perBlock: Balance, + startingBlock: BlockNumber, + } +}) + +export const BlockNumber = sts.number() + +export const Balance = sts.bigint() + +export interface VestingInfo { + locked: Balance + perBlock: Balance + startingBlock: BlockNumber +} + +export type BlockNumber = number + +export type Balance = bigint + +export const LookupSource: sts.Type = sts.closedEnum(() => { + return { + Address20: H160, + Address32: H256, + Id: AccountId, + Index: sts.number(), + Raw: sts.bytes(), + } +}) + +export const H256 = sts.bytes() + +export const H160 = sts.bytes() + +export type LookupSource = LookupSource_Address20 | LookupSource_Address32 | LookupSource_Id | LookupSource_Index | LookupSource_Raw + +export interface LookupSource_Address20 { + __kind: 'Address20' + value: H160 +} + +export interface LookupSource_Address32 { + __kind: 'Address32' + value: H256 +} + +export interface LookupSource_Id { + __kind: 'Id' + value: AccountId +} + +export interface LookupSource_Index { + __kind: 'Index' + value: number +} + +export interface LookupSource_Raw { + __kind: 'Raw' + value: Bytes +} + +export type H256 = Bytes + +export type H160 = Bytes + +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: LookupSource + target: LookupSource + schedule: VestingInfo +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: LookupSource +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: LookupSource + schedule: VestingInfo +} + +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Type_138, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Type_138), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Type_138), + }), + } +}) + +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Type_138 +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Type_138[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Type_138[] +} + +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: LookupSource, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + } +}) + +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: LookupSource +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +export const TipsCall: sts.Type = sts.closedEnum(() => { + return { + close_tip: sts.enumStruct({ + hash: Hash, + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + }), + retract_tip: sts.enumStruct({ + hash: Hash, + }), + slash_tip: sts.enumStruct({ + hash: Hash, + }), + tip: sts.enumStruct({ + hash: Hash, + tipValue: sts.bigint(), + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + tipValue: sts.bigint(), + }), + } +}) + +export const Hash = sts.bytes() + +export type TipsCall = TipsCall_close_tip | TipsCall_report_awesome | TipsCall_retract_tip | TipsCall_slash_tip | TipsCall_tip | TipsCall_tip_new + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`. + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TipsCall_close_tip { + __kind: 'close_tip' + hash: Hash +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TipsCall_retract_tip { + __kind: 'retract_tip' + hash: Hash +} + +/** + * Remove and slash an already-open tip. + * + * May only be called from `T::RejectOrigin`. + * + * As a result, the finder is slashed and the deposits are lost. + * + * Emits `TipSlashed` if successful. + * + * # + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * # + */ +export interface TipsCall_slash_tip { + __kind: 'slash_tip' + hash: Hash +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`, insert tip and check closing, + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TipsCall_tip { + __kind: 'tip' + hash: Hash + tipValue: bigint +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T` + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId + tipValue: bigint +} + +export type Hash = Bytes + +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId, + }), + change_key: sts.enumStruct({ + new: AccountId, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId), + }), + set_prime: sts.enumStruct({ + who: AccountId, + }), + swap_member: sts.enumStruct({ + remove: AccountId, + add: AccountId, + }), + } +}) + +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId + add: AccountId +} + +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const MemberCount = sts.number() + +export const Proposal: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + Claims: ClaimsCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + Gilt: GiltCall, + Grandpa: GrandpaCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Multisig: MultisigCall, + ParachainsConfiguration: ParachainsConfigurationCall, + Paras: ParasCall, + ParasDmp: ParasDmpCall, + ParasHrmp: ParasHrmpCall, + ParasInclusion: ParasInclusionCall, + ParasInherent: ParasInherentCall, + ParasInitializer: ParasInitializerCall, + ParasScheduler: ParasSchedulerCall, + ParasSessionInfo: ParasSessionInfoCall, + ParasShared: ParasSharedCall, + ParasUmp: ParasUmpCall, + PhragmenElection: PhragmenElectionCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + XcmPallet: XcmPalletCall, + } +}) + +export type Proposal = Proposal_Auctions | Proposal_Authorship | Proposal_Babe | Proposal_Balances | Proposal_Bounties | Proposal_Claims | Proposal_Council | Proposal_Crowdloan | Proposal_Democracy | Proposal_ElectionProviderMultiPhase | Proposal_Gilt | Proposal_Grandpa | Proposal_Identity | Proposal_ImOnline | Proposal_Indices | Proposal_Multisig | Proposal_ParachainsConfiguration | Proposal_Paras | Proposal_ParasDmp | Proposal_ParasHrmp | Proposal_ParasInclusion | Proposal_ParasInherent | Proposal_ParasInitializer | Proposal_ParasScheduler | Proposal_ParasSessionInfo | Proposal_ParasShared | Proposal_ParasUmp | Proposal_PhragmenElection | Proposal_Proxy | Proposal_Recovery | Proposal_Registrar | Proposal_Scheduler | Proposal_Session | Proposal_Slots | Proposal_Society | Proposal_Staking | Proposal_System | Proposal_TechnicalCommittee | Proposal_TechnicalMembership | Proposal_Timestamp | Proposal_Tips | Proposal_Treasury | Proposal_Utility | Proposal_Vesting | Proposal_XcmPallet + +export interface Proposal_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Proposal_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Proposal_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Proposal_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Proposal_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Proposal_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Proposal_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Proposal_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Proposal_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Proposal_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Proposal_Gilt { + __kind: 'Gilt' + value: GiltCall +} + +export interface Proposal_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Proposal_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Proposal_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Proposal_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Proposal_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Proposal_ParachainsConfiguration { + __kind: 'ParachainsConfiguration' + value: ParachainsConfigurationCall +} + +export interface Proposal_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Proposal_ParasDmp { + __kind: 'ParasDmp' + value: ParasDmpCall +} + +export interface Proposal_ParasHrmp { + __kind: 'ParasHrmp' + value: ParasHrmpCall +} + +export interface Proposal_ParasInclusion { + __kind: 'ParasInclusion' + value: ParasInclusionCall +} + +export interface Proposal_ParasInherent { + __kind: 'ParasInherent' + value: ParasInherentCall +} + +export interface Proposal_ParasInitializer { + __kind: 'ParasInitializer' + value: ParasInitializerCall +} + +export interface Proposal_ParasScheduler { + __kind: 'ParasScheduler' + value: ParasSchedulerCall +} + +export interface Proposal_ParasSessionInfo { + __kind: 'ParasSessionInfo' + value: ParasSessionInfoCall +} + +export interface Proposal_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Proposal_ParasUmp { + __kind: 'ParasUmp' + value: ParasUmpCall +} + +export interface Proposal_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Proposal_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Proposal_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Proposal_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Proposal_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Proposal_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Proposal_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Proposal_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Proposal_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Proposal_System { + __kind: 'System' + value: SystemCall +} + +export interface Proposal_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Proposal_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Proposal_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Proposal_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Proposal_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Proposal_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Proposal_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Proposal_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_changes_trie_config | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + * + * # + * - `O(P)` where `P` amount of keys with prefix `prefix` + * - `P` storage deletions. + * - Base Weight: 0.834 * P µs + * - Writes: Number of subkeys + 1 + * # + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Key + subkeys: number +} + +/** + * Kill some items from storage. + * + * # + * - `O(IK)` where `I` length of `keys` and `K` length of one key + * - `I` storage deletions. + * - Base Weight: .378 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Key[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Make some on-chain remark and emit event. + * + * # + * - `O(b)` where b is the length of the remark. + * - 1 event. + * # + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * Set the new changes trie configuration. + * + * # + * - `O(1)` + * - 1 storage write or delete (codec `O(1)`). + * - 1 call to `deposit_log`: Uses `append` API, so O(1) + * - Base Weight: 7.218 µs + * - DB Weight: + * - Writes: Changes Trie, System Digest + * # + */ +export interface SystemCall_set_changes_trie_config { + __kind: 'set_changes_trie_config' + changesTrieConfig?: (ChangesTrieConfiguration | undefined) +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 storage write (codec `O(C)`). + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is expensive). + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very expensive. + * We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + * + * # + * - `O(1)` + * - 1 storage write. + * - Base Weight: 1.405 µs + * - 1 write to HEAP_PAGES + * # + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + * + * # + * - `O(I)` where `I` length of `items` + * - `I` storage writes (`O(1)`). + * - Base Weight: 0.568 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: KeyValue[] +} + +export type KeyValue = [StorageKey, StorageData] + +export type StorageData = Bytes + +export type StorageKey = Bytes + +export interface ChangesTrieConfiguration { + digestInterval: number + digestLevels: number +} + +export type Key = Bytes + +export type Perbill = number + +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_staking_limits | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger, [Origin Account], Current Era, History Depth, Locks + * - Write: Bonded, Payee, [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: LookupSource + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount + * that can be added. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller and + * it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * - One DB entry. + * ------------ + * DB Weight: + * - Read: Era Election Status, Bonded, Ledger, [Origin Account], Locks + * - Write: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + * + * # + * Complexity: O(U + S) + * with U unapplied slashes weighted with U=1000 + * and S is the number of slash indices to be canceled. + * - Read: Unapplied Slashes + * - Write: Unapplied Slashes + * # + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: EraIndex + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * -------- + * Weight: O(1) + * DB Weight: + * - Read: EraElectionStatus, Ledger + * - Write: Validators, Nominators + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Declare a `controller` to stop participating as either a validator or nominator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_, but can be called by anyone. + * + * If the caller is the same as the controller being targeted, then no further checks are + * enforced, and this function behaves just like `chill`. + * + * If the caller is different than the controller being targeted, the following conditions + * must be met: + * * A `ChillThreshold` must be set and checked which defines how close to the max + * nominators or validators we must reach before users can start chilling one-another. + * * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine + * how close we are to the threshold. + * * A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines + * if this is a person that should be chilled because they have not met the threshold + * bond required. + * + * This can be helpful if bond requirements are updated, and we need to remove old users + * who do not satisfy these requirements. + * + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + controller: AccountId +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * # + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * Thus the election process may be ongoing when this is called. In this case the + * election will continue until the next era is triggered. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + * + * # + * O(S) where S is the number of slashing spans to be removed + * Reads: Bonded, Slashing Spans, Account, Locks + * Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Account, Locks + * Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Same as [`set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. The controller + * account should represent a validator. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: LookupSource[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. This can only be called when + * [`EraElectionStatus`] is `Closed`. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS). + * - Both the reads and writes follow a similar pattern. + * --------- + * Weight: O(N) + * where N is the number of targets + * DB Weight: + * - Reads: Era Election Status, Ledger, Current Era + * - Writes: Validators, Nominators + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: LookupSource[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * This can only be called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * DB Weight: + * - Read: EraElectionStatus, CurrentEra, HistoryDepth, ErasValidatorReward, + * ErasStakersClipped, ErasRewardPoints, ErasValidatorPrefs (8 items) + * - Read Each: Bonded, Ledger, Payee, Locks, System Account (5 items) + * - Write Each: System Account, Locks, Ledger (3 items) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId + era: EraIndex +} + +/** + * Remove all data structure concerning a staker/stash once its balance is at the minimum. + * This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone + * and the target `stash` must have no funds left beyond the ED. + * + * This can be called from any origin. + * + * - `stash`: The stash account to reap. Its balance must be zero. + * + * # + * Complexity: O(S) where S is the number of slashing spans on the account. + * DB Weight: + * - Reads: Stash Account, Bonded, Slashing Spans, Locks + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Stash Account, Locks + * - Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller, and it can be only called when + * [`EraElectionStatus`] is `Closed`. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MAX_UNLOCKING_CHUNKS`. + * - Storage changes: Can't increase storage, only decrease it. + * --------------- + * - DB Weight: + * - Reads: EraElectionStatus, Ledger, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Same as [`set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: LookupSource +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. + * This should report all the storage items that will be deleted by clearing old + * era history. Needed to report an accurate weight for the dispatch. Trusted by + * `Root` to report an accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Weight: O(E) + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + * + * # + * - O(V) + * - Write: Invulnerables + * # + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Update the various staking limits this pallet. + * + * * `min_nominator_bond`: The minimum active bond needed to be a nominator. + * * `min_validator_bond`: The minimum active bond needed to be a validator. + * * `max_nominator_count`: The max number of users who can be a nominator at once. + * When set to `None`, no limit is enforced. + * * `max_validator_count`: The max number of users who can be a validator at once. + * When set to `None`, no limit is enforced. + * + * Origin must be Root to call this function. + * + * NOTE: Existing nominators and validators will not be affected by this update. + * to kick people under the new limits, `chill_other` should be called. + */ +export interface StakingCall_set_staking_limits { + __kind: 'set_staking_limits' + minNominatorBond: BalanceOf + minValidatorBond: BalanceOf + maxNominatorCount?: (number | undefined) + maxValidatorCount?: (number | undefined) + threshold?: (Percent | undefined) +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * If a user encounters the `InsufficientBond` error when calling this extrinsic, + * they should call `chill` first in order to free up their bonded funds. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + * + * # + * - Independent of the arguments. Limited but potentially exploitable complexity. + * - Contains a limited number of reads. + * - Each call (requires the remainder of the bonded balance to be above `minimum_balance`) + * will cause a new entry to be inserted into a vector (`Ledger.unlocking`) kept in storage. + * The only way to clean the aforementioned storage item is also user-controlled via + * `withdraw_unbonded`. + * - One DB entry. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: EraElectionStatus, Ledger, CurrentEra, Locks, BalanceOf Stash, + * - Write: Locks, Ledger, BalanceOf Stash, + * + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ----------- + * Weight: O(1) + * DB Weight: + * - Read: Era Election Status, Ledger + * - Write: Nominators, Validators + * # + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * And, it can be only called when [`EraElectionStatus`] is `Closed`. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * - Could be dependent on the `origin` argument and how much `unlocking` chunks exist. + * It implies `consolidate_unlocked` which loops over `Ledger.unlocking`, which is + * indirectly user-controlled. See [`unbond`] for more detail. + * - Contains a limited number of reads, yet the size of which could be large based on `ledger`. + * - Writes are limited to the `origin` account key. + * --------------- + * Complexity O(S) where S is the number of slashing spans to remove + * Update: + * - Reads: EraElectionStatus, Ledger, Current Era, Locks, [Origin Account] + * - Writes: [Origin Account], Locks, Ledger + * Kill: + * - Reads: EraElectionStatus, Ledger, Current Era, Bonded, Slashing Spans, [Origin + * Account], Locks, BalanceOf stash + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, + * [Origin Account], Locks, BalanceOf stash. + * - Writes Each: SpanSlash * S + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export type BalanceOf = bigint + +export type Percent = number + +export type EraIndex = number + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: BalanceOf +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * module to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId + judgement: SocietyJudgement +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin + * forgives (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: LookupSource + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId + value: BalanceOf + tip: BalanceOf +} + +export type SocietyJudgement = SocietyJudgement_Approve | SocietyJudgement_Rebid | SocietyJudgement_Reject + +export interface SocietyJudgement_Approve { + __kind: 'Approve' +} + +export interface SocietyJudgement_Rebid { + __kind: 'Rebid' +} + +export interface SocietyJudgement_Reject { + __kind: 'Reject' +} + +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * Clear all leases for a Para Id, refunding any deposits back to the original owners. + * + * Can only be called by the Root origin. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: ParaId +} + +/** + * Just a hotwire into the `lease_out` call, in case Root wants to force some lease to happen + * independently of any other on-chain mechanism to use it. + * + * Can only be called by the Root origin. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: ParaId + leaser: AccountId + amount: BalanceOf + periodBegin: LeasePeriodOf + periodCount: LeasePeriodOf +} + +/** + * Try to onboard a parachain that has a lease for the current lease period. + * + * This function can be useful if there was some state issue with a para that should + * have onboarded, but was unable to. As long as they have a lease period, we can + * let them onboard from here. + * + * Origin must be signed, but can be called by anyone. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: ParaId +} + +export type LeasePeriodOf = number + +export type ParaId = number + +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` in number of key types. + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: Keys + proof: Bytes +} + +export type Keys = [AccountId, AccountId, AccountId, AccountId, AccountId, AccountId] + +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.15 + 2.869 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: BlockNumber + index: number +} + +/** + * Cancel a named scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 24.91 + 2.907 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.29 + .126 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda + * - Will use base weight of 25 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_138 +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_138 +} + +/** + * Schedule a named task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 29.6 + .159 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 35 which should be good for more than 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_138 +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`]. + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_138 +} + +export type Priority = number + +export type Period = [BlockNumber, number] + +export type RegistrarCall = RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_force_remove_lock | RegistrarCall_register | RegistrarCall_reserve | RegistrarCall_swap + +/** + * Deregister a Para Id, freeing all data and returning any deposit. + * + * The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: ParaId +} + +/** + * Force the registration of a Para Id on the relay chain. + * + * This function must be called by a Root origin. + * + * The deposit taken can be specified for this registration. Any ParaId + * can be registered, including sub-1000 IDs which are System Parachains. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId + deposit: BalanceOf + id: ParaId + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Remove a manager lock from a para. This will allow the manager of a + * previously locked para to deregister or swap a para without using governance. + * + * Can only be called by the Root origin. + */ +export interface RegistrarCall_force_remove_lock { + __kind: 'force_remove_lock' + para: ParaId +} + +/** + * Register head data and validation code for a reserved Para Id. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. + * - `id`: The para ID. Must be owned/managed by the `origin` signing account. + * - `genesis_head`: The genesis head data of the parachain/thread. + * - `validation_code`: The initial validation code of the parachain/thread. + * + * ## Deposits/Fees + * The origin signed account must reserve a corresponding deposit for the registration. Anything already + * reserved previously for this para ID is accounted for. + * + * ## Events + * The `Registered` event is emitted in case of success. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: ParaId + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Reserve a Para Id on the relay chain. + * + * This function will reserve a new Para Id to be owned/managed by the origin account. + * The origin account is able to register head data and validation code using `register` to create + * a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID. + * + * ## Deposits/Fees + * The origin must reserve a deposit of `ParaDeposit` for the registration. + * + * ## Events + * The `Reserved` event is emitted in case of success, which provides the ID reserved for use. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * Swap a parachain with another parachain or parathread. + * + * The origin must be Root, the `para` owner, or the `para` itself. + * + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: ParaId + other: ParaId +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + * + * # + * - The weight of the `call` + 10,000. + * - One storage lookup to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId + call: Type_138 +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + * + * # + * - One storage mutation to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully + * recovered by you. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + V) + * # + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + * + * # + * Key: V (len of vouching friends) + * - One storage read/remove to get the active recovery process. O(1), Codec O(V) + * - One balance call to repatriate reserved. O(X) + * - One event. + * + * Total Complexity: O(V + X) + * # + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. + * Should be ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt + * before the account can be recovered. Should be less than or equal to + * the length of the list of friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized + * that needs to pass before the account can be recovered. + * + * # + * - Key: F (len of friends) + * - One storage read to check that account is not already recoverable. O(1). + * - A check that the friends list is sorted and unique. O(F) + * - One currency reserve operation. O(X) + * - One storage write. O(1). Codec O(F). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId[] + threshold: number + delayPeriod: BlockNumber +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account + * needs to be recoverable (i.e. have a recovery configuration). + * + * # + * - One storage read to check that account is recoverable. O(F) + * - One storage read to check that this recovery process hasn't already started. O(1) + * - One currency reserve operation. O(X) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + * + * # + * Key: F (len of friends) + * - One storage read to get the prefix iterator for active recoveries. O(1) + * - One storage read/remove to get the recovery configuration. O(1), Codec O(F) + * - One balance call to unreserved. O(X) + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + * + * # + * - One storage write O(1) + * - One event + * # + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId + rescuer: AccountId +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you + * want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One binary search to confirm caller is a friend. O(logF) + * - One binary search to confirm caller has not already vouched. O(logV) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + logF + V + logV) + * # + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId + rescuer: AccountId +} + +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: AccountId + proxyType: ProxyType + delay: BlockNumber +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: AccountId + callHash: CallHashOf +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + * TODO: Might be over counting 1 read + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: BlockNumber + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_138 +} + +/** + * Dispatch the given `call` from an account that the sender is authorized for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: AccountId + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_138 +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: AccountId + callHash: CallHashOf +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: AccountId + callHash: CallHashOf +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: AccountId + proxyType: ProxyType + delay: BlockNumber +} + +export type CallHashOf = Bytes + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +export type PhragmenElectionCall = PhragmenElectionCall_clean_defunct_voters | PhragmenElectionCall_remove_member | PhragmenElectionCall_remove_voter | PhragmenElectionCall_renounce_candidacy | PhragmenElectionCall_submit_candidacy | PhragmenElectionCall_vote + +/** + * Clean all voters who are defunct (i.e. they do not serve any purpose at all). The + * deposit of the removed voters are returned. + * + * This is an root function to be used only for cleaning the state. + * + * The dispatch origin of this call must be root. + * + * # + * The total number of voters and those that are defunct must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_clean_defunct_voters { + __kind: 'clean_defunct_voters' + numVoters: number + numDefunct: number +} + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, a new phragmen election is started. + * + * The dispatch origin of this call must be root. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement, we use a small weight. Else, since this is a root call and + * will go into phragmen, we assume full block for now. + * # + */ +export interface PhragmenElectionCall_remove_member { + __kind: 'remove_member' + who: LookupSource + hasReplacement: boolean +} + +/** + * Remove `origin` as a voter. + * + * This removes the lock and returns the deposit. + * + * The dispatch origin of this call must be signed and be a voter. + */ +export interface PhragmenElectionCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * + * - `origin` is a candidate and not elected in any set. In this case, the deposit is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the deposit is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the deposit is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_members`], if replacement runners exists, they are immediately + * used. If the prime is renouncing, then no prime will exist until the next round. + * + * The dispatch origin of this call must be signed, and have one of the above roles. + * + * # + * The type of renouncing must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Submit oneself for candidacy. A fixed amount of deposit is recorded. + * + * All candidates are wiped at the end of the term. They either become a member/runner-up, + * or leave the system while their deposit is slashed. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`] + * to get their deposit back. Losing the spot in an election will always lead to a slash. + * + * # + * The number of current candidates must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is + * reserved. The deposit is based on the number of votes and can be updated over time. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * If `value` is more than `who`'s total balance, then the maximum of the two is used. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * It is the responsibility of the caller to **NOT** place all of their balance into the + * lock and keep some for further operations. + * + * # + * We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less. + * # + */ +export interface PhragmenElectionCall_vote { + __kind: 'vote' + votes: AccountId[] + value: bigint +} + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +export type ParasUmpCall = never + +export type ParasSharedCall = never + +export type ParasSessionInfoCall = never + +export type ParasSchedulerCall = never + +export type ParasInitializerCall = ParasInitializerCall_force_approve + +/** + * Issue a signal to the consensus engine to forcibly act as though all parachain + * blocks in all relay chain blocks up to and including the given number in the current + * chain are valid and should be finalized. + */ +export interface ParasInitializerCall_force_approve { + __kind: 'force_approve' + upTo: BlockNumber +} + +export type ParasInherentCall = ParasInherentCall_enter + +/** + * Enter the paras inherent. This will process bitfields and backed candidates. + */ +export interface ParasInherentCall_enter { + __kind: 'enter' + data: ParachainsInherentData +} + +export interface ParachainsInherentData { + bitfields: SignedAvailabilityBitfield[] + backedCandidates: BackedCandidate[] + disputes: DisputeStatementSet[] + parentHeader: Header +} + +export interface Header { + parentHash: Hash + number: number + stateRoot: Hash + extrinsicsRoot: Hash + digest: Digest +} + +export interface Digest { + logs: DigestItem[] +} + +export type DigestItem = DigestItem_AuthoritiesChange | DigestItem_ChangesTrieRoot | DigestItem_ChangesTrieSignal | DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal | DigestItem_SealV0 + +export interface DigestItem_AuthoritiesChange { + __kind: 'AuthoritiesChange' + value: AuthorityId[] +} + +export interface DigestItem_ChangesTrieRoot { + __kind: 'ChangesTrieRoot' + value: Hash +} + +export interface DigestItem_ChangesTrieSignal { + __kind: 'ChangesTrieSignal' + value: ChangesTrieSignal +} + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: Consensus +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: PreRuntime +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: Seal +} + +export interface DigestItem_SealV0 { + __kind: 'SealV0' + value: SealV0 +} + +export type SealV0 = [bigint, Signature] + +export type Signature = Bytes + +export type Seal = [ConsensusEngineId, Bytes] + +export type PreRuntime = [ConsensusEngineId, Bytes] + +export type Consensus = [ConsensusEngineId, Bytes] + +export type ConsensusEngineId = Bytes + +export type ChangesTrieSignal = ChangesTrieSignal_NewConfiguration + +export interface ChangesTrieSignal_NewConfiguration { + __kind: 'NewConfiguration' + value?: (ChangesTrieConfiguration | undefined) +} + +export type AuthorityId = Bytes + +export interface DisputeStatementSet { + candidateHash: CandidateHash + session: SessionIndex + statements: [DisputeStatement, ParaValidatorIndex, ValidatorSignature][] +} + +export type ValidatorSignature = Bytes + +export type ParaValidatorIndex = number + +export type DisputeStatement = DisputeStatement_Invalid | DisputeStatement_Valid + +export interface DisputeStatement_Invalid { + __kind: 'Invalid' + value: InvalidDisputeStatementKind +} + +export interface DisputeStatement_Valid { + __kind: 'Valid' + value: ValidDisputeStatementKind +} + +export type ValidDisputeStatementKind = ValidDisputeStatementKind_ApprovalChecking | ValidDisputeStatementKind_BackingSeconded | ValidDisputeStatementKind_BackingValid | ValidDisputeStatementKind_Explicit + +export interface ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: Hash +} + +export interface ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: Hash +} + +export interface ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type InvalidDisputeStatementKind = InvalidDisputeStatementKind_Explicit + +export interface InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type SessionIndex = number + +export type CandidateHash = Bytes + +export interface BackedCandidate { + candidate: CommittedCandidateReceipt + validityVotes: ValidityAttestation[] + validatorIndices: BitSequence +} + +export type ValidityAttestation = ValidityAttestation_Explicit | ValidityAttestation_Implicit | ValidityAttestation_Never + +export interface ValidityAttestation_Explicit { + __kind: 'Explicit' + value: ValidatorSignature +} + +export interface ValidityAttestation_Implicit { + __kind: 'Implicit' + value: ValidatorSignature +} + +export interface ValidityAttestation_Never { + __kind: 'Never' +} + +export interface CommittedCandidateReceipt { + descriptor: CandidateDescriptor + commitments: CandidateCommitments +} + +export interface CandidateCommitments { + upwardMessages: UpwardMessage[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: BlockNumber +} + +export interface OutboundHrmpMessage { + recipient: number + data: Bytes +} + +export type UpwardMessage = Bytes + +export interface CandidateDescriptor { + paraId: ParaId + relayParent: RelayChainHash + collatorId: CollatorId + persistedValidationDataHash: Hash + povHash: Hash + erasureRoot: Hash + signature: CollatorSignature + paraHead: Hash + validationCodeHash: ValidationCodeHash +} + +export type ValidationCodeHash = Bytes + +export type CollatorSignature = Bytes + +export type CollatorId = Bytes + +export type RelayChainHash = Bytes + +export interface SignedAvailabilityBitfield { + payload: BitSequence + validatorIndex: ParaValidatorIndex + signature: ValidatorSignature +} + +export type ParasInclusionCall = never + +export type ParasHrmpCall = ParasHrmpCall_force_clean_hrmp | ParasHrmpCall_force_process_hrmp_close | ParasHrmpCall_force_process_hrmp_open | ParasHrmpCall_hrmp_accept_open_channel | ParasHrmpCall_hrmp_close_channel | ParasHrmpCall_hrmp_init_open_channel + +/** + * This extrinsic triggers the cleanup of all the HRMP storage items that + * a para may have. Normally this happens once per session, but this allows + * you to trigger the cleanup immediately for a specific parachain. + * + * Origin must be Root. + */ +export interface ParasHrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: ParaId +} + +/** + * Force process hrmp close channel requests. + * + * If there are pending HRMP close channel requests, you can use this + * function process all of those requests immediately. + */ +export interface ParasHrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' +} + +/** + * Force process hrmp open channel requests. + * + * If there are pending HRMP open channel requests, you can use this + * function process all of those requests immediately. + */ +export interface ParasHrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' +} + +/** + * Accept a pending open channel request from the given sender. + * + * The channel will be opened only on the next session boundary. + */ +export interface ParasHrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: ParaId +} + +/** + * Initiate unilateral closing of a channel. The origin must be either the sender or the + * recipient in the channel being closed. + * + * The closure can only happen on a session change. + */ +export interface ParasHrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * Initiate opening a channel from a parachain to a given recipient with given channel + * parameters. + * + * - `proposed_max_capacity` - specifies how many messages can be in the channel at once. + * - `proposed_max_message_size` - specifies the maximum size of any of the messages. + * + * These numbers are a subject to the relay-chain configuration limits. + * + * The channel can be opened only after the recipient confirms it and only on a session + * change. + */ +export interface ParasHrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: ParaId + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +export interface HrmpChannelId { + sender: number + receiver: number +} + +export type ParasDmpCall = never + +export type ParasCall = ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head + +/** + * Note a new block head for para within the context of the current block. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: ParaId + newHead: HeadData +} + +/** + * Put a parachain directly into the next session's action queue. + * We can't queue it any sooner than this without going into the + * initializer... + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: ParaId +} + +/** + * Schedule a code upgrade for block `expected_at`. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: ParaId + newCode: ValidationCode + expectedAt: BlockNumber +} + +/** + * Set the storage for the parachain validation code immediately. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: ParaId + newCode: ValidationCode +} + +/** + * Set the storage for the current parachain head data immediately. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: ParaId + newHead: HeadData +} + +export type ParachainsConfigurationCall = ParachainsConfigurationCall_set_chain_availability_period | ParachainsConfigurationCall_set_code_retention_period | ParachainsConfigurationCall_set_dispute_conclusion_by_time_out_period | ParachainsConfigurationCall_set_dispute_max_spam_slots | ParachainsConfigurationCall_set_dispute_period | ParachainsConfigurationCall_set_dispute_post_conclusion_acceptance_period | ParachainsConfigurationCall_set_group_rotation_frequency | ParachainsConfigurationCall_set_hrmp_channel_max_capacity | ParachainsConfigurationCall_set_hrmp_channel_max_message_size | ParachainsConfigurationCall_set_hrmp_channel_max_total_size | ParachainsConfigurationCall_set_hrmp_max_message_num_per_candidate | ParachainsConfigurationCall_set_hrmp_max_parachain_inbound_channels | ParachainsConfigurationCall_set_hrmp_max_parachain_outbound_channels | ParachainsConfigurationCall_set_hrmp_max_parathread_inbound_channels | ParachainsConfigurationCall_set_hrmp_max_parathread_outbound_channels | ParachainsConfigurationCall_set_hrmp_open_request_ttl | ParachainsConfigurationCall_set_hrmp_recipient_deposit | ParachainsConfigurationCall_set_hrmp_sender_deposit | ParachainsConfigurationCall_set_max_code_size | ParachainsConfigurationCall_set_max_downward_message_size | ParachainsConfigurationCall_set_max_head_data_size | ParachainsConfigurationCall_set_max_pov_size | ParachainsConfigurationCall_set_max_upward_message_num_per_candidate | ParachainsConfigurationCall_set_max_upward_message_size | ParachainsConfigurationCall_set_max_upward_queue_count | ParachainsConfigurationCall_set_max_upward_queue_size | ParachainsConfigurationCall_set_max_validators | ParachainsConfigurationCall_set_max_validators_per_core | ParachainsConfigurationCall_set_n_delay_tranches | ParachainsConfigurationCall_set_needed_approvals | ParachainsConfigurationCall_set_no_show_slots | ParachainsConfigurationCall_set_parathread_cores | ParachainsConfigurationCall_set_parathread_retries | ParachainsConfigurationCall_set_relay_vrf_modulo_samples | ParachainsConfigurationCall_set_scheduling_lookahead | ParachainsConfigurationCall_set_thread_availability_period | ParachainsConfigurationCall_set_ump_service_total_weight | ParachainsConfigurationCall_set_validation_upgrade_delay | ParachainsConfigurationCall_set_validation_upgrade_frequency | ParachainsConfigurationCall_set_zeroth_delay_tranche_width + +/** + * Set the availability period for parachains. + */ +export interface ParachainsConfigurationCall_set_chain_availability_period { + __kind: 'set_chain_availability_period' + new: BlockNumber +} + +/** + * Set the acceptance period for an included candidate. + */ +export interface ParachainsConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: BlockNumber +} + +/** + * Set the dispute conclusion by time out period. + */ +export interface ParachainsConfigurationCall_set_dispute_conclusion_by_time_out_period { + __kind: 'set_dispute_conclusion_by_time_out_period' + new: BlockNumber +} + +/** + * Set the maximum number of dispute spam slots. + */ +export interface ParachainsConfigurationCall_set_dispute_max_spam_slots { + __kind: 'set_dispute_max_spam_slots' + new: number +} + +/** + * Set the dispute period, in number of sessions to keep for disputes. + */ +export interface ParachainsConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: SessionIndex +} + +/** + * Set the dispute post conclusion acceptance period. + */ +export interface ParachainsConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: BlockNumber +} + +/** + * Set the parachain validator-group rotation frequency + */ +export interface ParachainsConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: BlockNumber +} + +/** + * Sets the maximum number of messages allowed in an HRMP channel at once. + */ +export interface ParachainsConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * Sets the maximum size of a message that could ever be put into an HRMP channel. + */ +export interface ParachainsConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * Sets the maximum total size of messages in bytes allowed in an HRMP channel at once. + */ +export interface ParachainsConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * Sets the maximum number of outbound HRMP messages can be sent by a candidate. + */ +export interface ParachainsConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parachain is allowed to accept. + */ +export interface ParachainsConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parachain is allowed to open. + */ +export interface ParachainsConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parathread is allowed to accept. + */ +export interface ParachainsConfigurationCall_set_hrmp_max_parathread_inbound_channels { + __kind: 'set_hrmp_max_parathread_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parathread is allowed to open. + */ +export interface ParachainsConfigurationCall_set_hrmp_max_parathread_outbound_channels { + __kind: 'set_hrmp_max_parathread_outbound_channels' + new: number +} + +/** + * Sets the number of sessions after which an HRMP open channel request expires. + */ +export interface ParachainsConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * Sets the amount of funds that the recipient should provide for accepting opening an HRMP + * channel. + */ +export interface ParachainsConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: Balance +} + +/** + * Sets the amount of funds that the sender should provide for opening an HRMP channel. + */ +export interface ParachainsConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: Balance +} + +/** + * Set the max validation code size for incoming upgrades. + */ +export interface ParachainsConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * Set the critical downward message size. + */ +export interface ParachainsConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * Set the max head data size for paras. + */ +export interface ParachainsConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * Set the max POV block size for incoming upgrades. + */ +export interface ParachainsConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * Sets the maximum number of messages that a candidate can contain. + */ +export interface ParachainsConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum size of an upward message that can be sent by a candidate. + */ +export interface ParachainsConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * Sets the maximum items that can present in a upward dispatch queue at once. + */ +export interface ParachainsConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * Sets the maximum total size of items that can present in a upward dispatch queue at once. + */ +export interface ParachainsConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * Set the maximum number of validators to use in parachain consensus. + */ +export interface ParachainsConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * Set the maximum number of validators to assign to any core. + */ +export interface ParachainsConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * Set the total number of delay tranches. + */ +export interface ParachainsConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * Set the number of validators needed to approve a block. + */ +export interface ParachainsConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * Set the no show slots, in number of number of consensus slots. + * Must be at least 1. + */ +export interface ParachainsConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * Set the number of parathread execution cores. + */ +export interface ParachainsConfigurationCall_set_parathread_cores { + __kind: 'set_parathread_cores' + new: number +} + +/** + * Set the number of retries for a particular parathread. + */ +export interface ParachainsConfigurationCall_set_parathread_retries { + __kind: 'set_parathread_retries' + new: number +} + +/** + * Set the number of samples to do of the RelayVRFModulo approval assignment criterion. + */ +export interface ParachainsConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * Set the scheduling lookahead, in expected number of blocks at peak throughput. + */ +export interface ParachainsConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * Set the availability period for parathreads. + */ +export interface ParachainsConfigurationCall_set_thread_availability_period { + __kind: 'set_thread_availability_period' + new: BlockNumber +} + +/** + * Sets the soft limit for the phase of dispatching dispatchable upward messages. + */ +export interface ParachainsConfigurationCall_set_ump_service_total_weight { + __kind: 'set_ump_service_total_weight' + new: Weight +} + +/** + * Set the validation upgrade delay. + */ +export interface ParachainsConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: BlockNumber +} + +/** + * Set the validation upgrade frequency. + */ +export interface ParachainsConfigurationCall_set_validation_upgrade_frequency { + __kind: 'set_validation_upgrade_frequency' + new: BlockNumber +} + +/** + * Set the zeroth delay tranche width. + */ +export interface ParachainsConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + call: OpaqueCall + storeCall: boolean + maxWeight: Weight +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId[] + call: Type_138 +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId[] + timepoint: Timepoint + callHash: Bytes +} + +export type OpaqueCall = Bytes + +export interface Timepoint { + height: BlockNumber + index: number +} + +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: AccountIndex +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId + index: AccountIndex + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: AccountIndex +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: AccountIndex +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId + index: AccountIndex +} + +export type AccountIndex = number + +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) + * and E is length of `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Signature +} + +export interface Heartbeat { + blockNumber: BlockNumber + networkState: OpaqueNetworkState + sessionIndex: SessionIndex + authorityIndex: AuthIndex + validatorsLen: number +} + +export type AuthIndex = number + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: LookupSource + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: RegistrarIndex +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: LookupSource +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: LookupSource + judgement: IdentityJudgement +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: LookupSource +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: LookupSource + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: bigint +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId, Data][] +} + +export interface IdentityInfo { + additional: IdentityInfoAdditional[] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (H160 | undefined) + image: Data + twitter: Data +} + +export type IdentityInfoAdditional = [Data, Data] + +export type IdentityJudgement = IdentityJudgement_Erroneous | IdentityJudgement_FeePaid | IdentityJudgement_KnownGood | IdentityJudgement_LowQuality | IdentityJudgement_OutOfDate | IdentityJudgement_Reasonable | IdentityJudgement_Unknown + +export interface IdentityJudgement_Erroneous { + __kind: 'Erroneous' +} + +export interface IdentityJudgement_FeePaid { + __kind: 'FeePaid' + value: Balance +} + +export interface IdentityJudgement_KnownGood { + __kind: 'KnownGood' +} + +export interface IdentityJudgement_LowQuality { + __kind: 'LowQuality' +} + +export interface IdentityJudgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface IdentityJudgement_Reasonable { + __kind: 'Reasonable' +} + +export interface IdentityJudgement_Unknown { + __kind: 'Unknown' +} + +export type RegistrarIndex = number + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: H256 +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: H256 +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: H256 +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: H256 +} + +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has + * stalled. This will trigger a forced authority set change at the beginning + * of the next session, to be enacted `delay` blocks after that. The delay + * should be high enough to safely assume that the block signalling the + * forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters + * will start the new authority set using the given finalized block as base. + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: BlockNumber + bestFinalizedBlockNumber: BlockNumber +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface KeyOwnerProof { + session: SessionIndex + trieNodes: Bytes[] + validatorCount: ValidatorCount +} + +export type ValidatorCount = number + +export interface GrandpaEquivocationProof { + setId: SetId + equivocation: GrandpaEquivocation +} + +export type GrandpaEquivocation = GrandpaEquivocation_Precommit | GrandpaEquivocation_Prevote + +export interface GrandpaEquivocation_Precommit { + __kind: 'Precommit' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocation_Prevote { + __kind: 'Prevote' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocationValue { + roundNumber: bigint + identity: AuthorityId + first: [GrandpaPrevote, AuthoritySignature] + second: [GrandpaPrevote, AuthoritySignature] +} + +export type AuthoritySignature = Bytes + +export interface GrandpaPrevote { + targetHash: Hash + targetNumber: BlockNumber +} + +export type SetId = bigint + +export type GiltCall = GiltCall_place_bid | GiltCall_retract_bid | GiltCall_set_target | GiltCall_thaw + +/** + * Place a bid for a gilt to be issued. + * + * Origin must be Signed, and account must have at least `amount` in free balance. + * + * - `amount`: The amount of the bid; these funds will be reserved. If the bid is + * successfully elevated into an issued gilt, then these funds will continue to be + * reserved until the gilt expires. Must be at least `MinFreeze`. + * - `duration`: The number of periods for which the funds will be locked if the gilt is + * issued. It will expire only after this period has elapsed after the point of issuance. + * Must be greater than 1 and no more than `QueueCount`. + * + * Complexities: + * - `Queues[duration].len()` (just take max). + */ +export interface GiltCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * Retract a previously placed bid. + * + * Origin must be Signed, and the account should have previously issued a still-active bid + * of `amount` for `duration`. + * + * - `amount`: The amount of the previous bid. + * - `duration`: The duration of the previous bid. + */ +export interface GiltCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * Set target proportion of gilt-funds. + * + * Origin must be `AdminOrigin`. + * + * - `target`: The target proportion of effective issued funds that should be under gilts + * at any one time. + */ +export interface GiltCall_set_target { + __kind: 'set_target' + target: bigint +} + +/** + * Remove an active but expired gilt. Reserved funds under gilt are freed and balance is + * adjusted to ensure that the funds grow or shrink to maintain the equivalent proportion + * of effective total issued funds. + * + * Origin must be Signed and the account must be the owner of the gilt of the given index. + * + * - `index`: The index of the gilt to be thawed. + */ +export interface GiltCall_thaw { + __kind: 'thaw' + index: number +} + +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * Set a solution in the queue, to be handed out to the client of this pallet in the next + * call to `ElectionProvider::elect`. + * + * This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`. + * + * The solution is not checked for any feasibility and is assumed to be trustworthy, as any + * feasibility check itself can in principle cause the election process to fail (due to + * memory/weight constrains). + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + solution: ReadySolution +} + +/** + * Set a new value for `MinimumUntrustedScore`. + * + * Dispatch origin must be aligned with `T::ForceOrigin`. + * + * This check can be turned off by setting the value to `None`. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (ElectionScore | undefined) +} + +/** + * Submit a solution for the signed phase. + * + * The dispatch origin fo this call must be __signed__. + * + * The solution is potentially queued, based on the claimed score and processed at the end + * of the signed phase. + * + * A deposit is reserved and recorded for the solution. Based on the outcome, the solution + * might be rewarded, slashed, or get all or a part of the deposit back. + * + * # + * Queue size must be provided as witness data. + * # + */ +export interface ElectionProviderMultiPhaseCall_submit { + __kind: 'submit' + solution: RawSolution + numSignedSubmissions: number +} + +/** + * Submit a solution for the unsigned phase. + * + * The dispatch origin fo this call must be __none__. + * + * This submission is checked on the fly. Moreover, this unsigned solution is only + * validated when submitted to the pool from the **local** node. Effectively, this means + * that only active validators can submit this transaction when authoring a block (similar + * to an inherent). + * + * To prevent any incorrect solution (and thus wasted time/weight), this transaction will + * panic if the solution submitted by the validator is invalid in any way, effectively + * putting their authoring reward at risk. + * + * No deposit or reward is associated with this submission. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + solution: RawSolution + witness: SolutionOrSnapshotSize +} + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export interface RawSolution { + compact: CompactAssignmentsWith24 + score: ElectionScore + round: number +} + +export interface CompactAssignmentsWith24 { + votes1: [NominatorIndexCompact, ValidatorIndexCompact][] + votes2: [NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact][] + votes3: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes4: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes5: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes6: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes7: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes8: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes9: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes10: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes11: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes12: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes13: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes14: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes15: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes16: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes17: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes18: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes19: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes20: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes21: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes22: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes23: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes24: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] +} + +export type CompactScoreCompact = [ValidatorIndexCompact, OffchainAccuracyCompact] + +export type OffchainAccuracyCompact = number + +export type ValidatorIndexCompact = number + +export type NominatorIndexCompact = number + +export type ElectionScore = bigint[] + +export interface ReadySolution { + supports: [AccountId, SolutionSupport][] + score: ElectionScore + compute: ElectionCompute +} + +export type ElectionCompute = ElectionCompute_OnChain | ElectionCompute_Signed | ElectionCompute_Unsigned + +export interface ElectionCompute_OnChain { + __kind: 'OnChain' +} + +export interface ElectionCompute_Signed { + __kind: 'Signed' +} + +export interface ElectionCompute_Unsigned { + __kind: 'Unsigned' +} + +export interface SolutionSupport { + total: ExtendedBalance + voters: [AccountId, ExtendedBalance][] +} + +export type ExtendedBalance = bigint + +export type DemocracyCall = DemocracyCall_blacklist | DemocracyCall_cancel_proposal | DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. + * + * If called on a queued public or external proposal, then this will result in it being + * removed. If the `ref_index` supplied is an active referendum with the proposal hash, + * then it will be cancelled. + * + * The dispatch origin of this call must be `BlacklistOrigin`. + * + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. + * + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). + */ +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: Hash + maybeRefIndex?: (ReferendumIndex | undefined) +} + +/** + * Remove a proposal. + * + * The dispatch origin of this call must be `CancelProposalOrigin`. + * + * - `prop_index`: The index of the proposal to cancel. + * + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number +} + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: ReferendumIndex +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must + * not be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId + conviction: Conviction + balance: BalanceOf +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: ReferendumIndex +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: Hash + index: ReferendumIndex +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Weight: `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: Hash +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: Hash +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: Hash +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * `FastTrackVotingPeriod` if too low. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: Hash + votingPeriod: BlockNumber + delay: BlockNumber +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. When this call is successful, i.e. + * the preimage has not been uploaded before and matches some imminent proposal, + * no fee is paid. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * Weight: `O(p)` + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: Hash + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. + * Extrinsic is weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * Weight: `O(D)` where D is length of proposal. + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: Hash + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId + index: ReferendumIndex +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: ReferendumIndex +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * Weight: `O(S)` where S is the number of seconds a proposal already has. + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * Weight: `O(V + log(V))` where V is number of `existing vetoers` + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: Hash +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of referendums the voter has voted on. + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + value: AccountVoteSplit +} + +export interface AccountVote_Standard { + __kind: 'Standard' + value: AccountVoteStandard +} + +export interface AccountVoteStandard { + vote: Vote + balance: Balance +} + +export type Vote = number + +export interface AccountVoteSplit { + aye: Balance + nay: Balance +} + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +export type ReferendumIndex = number + +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * Add an optional memo to an existing crowdloan contribution. + * + * Origin must be Signed, and the user must have contributed to the crowdloan. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: ParaId + memo: Bytes +} + +/** + * Contribute to a crowd sale. This will transfer some balance over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * Create a new crowdloaning campaign for a parachain slot with the given lease period range. + * + * This applies a lock to your parachain configuration, ensuring that it cannot be changed + * by the parachain manager. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Remove a fund after the retirement period has ended and all funds have been returned. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * Edit the configuration for an in-progress crowdloan. + * + * Can only be called by Root origin. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Poke the fund into NewRaise + * + * Origin must be Signed, and the fund has non-zero raise. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: ParaId +} + +/** + * Automatically refund contributors of an ended crowdloan. + * Due to weight restrictions, this function may need to be called multiple + * times to fully refund all users. We will refund `RemoveKeysLimit` users at a time. + * + * Origin must be signed, but can come from anyone. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * Withdraw full balance of a specific contributor. + * + * Origin must be signed, but can come from anyone. + * + * The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement + * flag must be set. For a fund to be ready for retirement, then: + * - it must not already be in retirement; + * - the amount of raised funds must be bigger than the _free_ balance of the account; + * - and either: + * - the block number must be at least `end`; or + * - the current lease period must be greater than the fund's `last_period`. + * + * In this case, the fund's retirement flag is set and its `end` is reset to the current block + * number. + * + * - `who`: The account whose contribution should be withdrawn. + * - `index`: The parachain to whose crowdloan the contribution was made. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId + index: number +} + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: EcdsaSignature +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Ed25519Signature +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Sr25519Signature +} + +export type Sr25519Signature = Bytes + +export type Ed25519Signature = Bytes + +export type EcdsaSignature = Bytes + +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export type MemberCount = number + +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: BalanceOf + vestingSchedule?: ([BalanceOf, BalanceOf, BlockNumber] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId | undefined) +} + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export type EthereumAddress = Bytes + +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: LookupSource +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: LookupSource + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is malicious + * or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_all | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is + * not assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: LookupSource + dest: LookupSource + value: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also decrease the total issuance of the system (`TotalIssuance`). + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + * + * # + * - Independent of the arguments. + * - Contains a limited number of reads and writes. + * --------------------- + * - Base Weight: + * - Creating: 27.56 µs + * - Killing: 35.11 µs + * - DB Weight: 1 Read, 1 Write to `who` + * # + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: LookupSource + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * It will decrease the total issuance of the system by the `TransferFee`. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for + * input config types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional + * check that the transfer will not kill the origin account. + * --------------------------------- + * - Base Weight: 73.64 µs, worst case scenario (account created, account removed) + * - DB Weight: 1 Read and 1 Write to destination account + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: LookupSource + value: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). + * # + * - O(1). Just like transfer, but reading the user's transferable balance first. + * # + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: LookupSource + keepAlive: boolean +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + * # + * - Cheaper than transfer because account cannot be killed. + * - Base Weight: 51.4 µs + * - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already) + * # + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: LookupSource + value: bigint +} + +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Plan an epoch config change. The epoch config change is recorded and will be enacted on + * the next call to `enact_epoch_change`. The config will be activated one epoch after. + * Multiple calls to this method will replace any existing planned config change that had + * not been enacted yet. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface BabeEquivocationProof { + offender: AuthorityId + slotNumber: SlotNumber + firstHeader: Header + secondHeader: Header +} + +export type SlotNumber = bigint + +export type NextConfigDescriptor = NextConfigDescriptor_V0 | NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V0 { + __kind: 'V0' +} + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + value: NextConfigDescriptorV1 +} + +export interface NextConfigDescriptorV1 { + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Cancel an in-progress auction. + * + * Can only be called by Root origin. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: Key, + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => Key), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_changes_trie_config: sts.enumStruct({ + changesTrieConfig: sts.option(() => ChangesTrieConfiguration), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => KeyValue), + }), + } +}) + +export const KeyValue = sts.tuple(() => [StorageKey, StorageData]) + +export const StorageData = sts.bytes() + +export const StorageKey = sts.bytes() + +export const ChangesTrieConfiguration: sts.Type = sts.struct(() => { + return { + digestInterval: sts.number(), + digestLevels: sts.number(), + } +}) + +export const Key = sts.bytes() + +export const Perbill = sts.number() + +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: LookupSource, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: EraIndex, + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + controller: AccountId, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => LookupSource), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => LookupSource), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId, + era: EraIndex, + }), + reap_stash: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: LookupSource, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_staking_limits: sts.enumStruct({ + minNominatorBond: BalanceOf, + minValidatorBond: BalanceOf, + maxNominatorCount: sts.option(() => sts.number()), + maxValidatorCount: sts.option(() => sts.number()), + threshold: sts.option(() => Percent), + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export const BalanceOf = sts.bigint() + +export const Percent = sts.number() + +export const EraIndex = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: BalanceOf, + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId, + judgement: SocietyJudgement, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: LookupSource, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId, + value: BalanceOf, + tip: BalanceOf, + }), + } +}) + +export const SocietyJudgement: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: ParaId, + }), + force_lease: sts.enumStruct({ + para: ParaId, + leaser: AccountId, + amount: BalanceOf, + periodBegin: LeasePeriodOf, + periodCount: LeasePeriodOf, + }), + trigger_onboard: sts.enumStruct({ + para: ParaId, + }), + } +}) + +export const LeasePeriodOf = sts.number() + +export const ParaId = sts.number() + +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: Keys, + proof: sts.bytes(), + }), + } +}) + +export const Keys = sts.tuple(() => [AccountId, AccountId, AccountId, AccountId, AccountId, AccountId]) + +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: BlockNumber, + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_138, + }), + schedule_after: sts.enumStruct({ + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_138, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_138, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_138, + }), + } +}) + +export const Priority = sts.number() + +export const Period = sts.tuple(() => [BlockNumber, sts.number()]) + +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + deregister: sts.enumStruct({ + id: ParaId, + }), + force_register: sts.enumStruct({ + who: AccountId, + deposit: BalanceOf, + id: ParaId, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + force_remove_lock: sts.enumStruct({ + para: ParaId, + }), + register: sts.enumStruct({ + id: ParaId, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + reserve: sts.unit(), + swap: sts.enumStruct({ + id: ParaId, + other: ParaId, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId, + call: Type_138, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId, + }), + claim_recovery: sts.enumStruct({ + account: AccountId, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId), + threshold: sts.number(), + delayPeriod: BlockNumber, + }), + initiate_recovery: sts.enumStruct({ + account: AccountId, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + } +}) + +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: AccountId, + proxyType: ProxyType, + delay: BlockNumber, + }), + announce: sts.enumStruct({ + real: AccountId, + callHash: CallHashOf, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + delay: BlockNumber, + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_138, + }), + proxy_announced: sts.enumStruct({ + delegate: AccountId, + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_138, + }), + reject_announcement: sts.enumStruct({ + delegate: AccountId, + callHash: CallHashOf, + }), + remove_announcement: sts.enumStruct({ + real: AccountId, + callHash: CallHashOf, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: AccountId, + proxyType: ProxyType, + delay: BlockNumber, + }), + } +}) + +export const CallHashOf = sts.bytes() + +export const PhragmenElectionCall: sts.Type = sts.closedEnum(() => { + return { + clean_defunct_voters: sts.enumStruct({ + numVoters: sts.number(), + numDefunct: sts.number(), + }), + remove_member: sts.enumStruct({ + who: LookupSource, + hasReplacement: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId), + value: sts.bigint(), + }), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export const ParasUmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasSessionInfoCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasSchedulerCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasInitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: BlockNumber, + }), + } +}) + +export const ParasInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: ParachainsInherentData, + }), + } +}) + +export const ParachainsInherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => SignedAvailabilityBitfield), + backedCandidates: sts.array(() => BackedCandidate), + disputes: sts.array(() => DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: Hash, + number: sts.number(), + stateRoot: Hash, + extrinsicsRoot: Hash, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + AuthoritiesChange: sts.array(() => AuthorityId), + ChangesTrieRoot: Hash, + ChangesTrieSignal: ChangesTrieSignal, + Consensus: Consensus, + Other: sts.bytes(), + PreRuntime: PreRuntime, + RuntimeEnvironmentUpdated: sts.unit(), + Seal: Seal, + SealV0: SealV0, + } +}) + +export const SealV0 = sts.tuple(() => [sts.bigint(), Signature]) + +export const Signature = sts.bytes() + +export const Seal = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const PreRuntime = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const Consensus = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const ConsensusEngineId = sts.bytes() + +export const ChangesTrieSignal: sts.Type = sts.closedEnum(() => { + return { + NewConfiguration: sts.option(() => ChangesTrieConfiguration), + } +}) + +export const AuthorityId = sts.bytes() + +export const DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: SessionIndex, + statements: sts.array(() => sts.tuple(() => [DisputeStatement, ParaValidatorIndex, ValidatorSignature])), + } +}) + +export const ValidatorSignature = sts.bytes() + +export const ParaValidatorIndex = sts.number() + +export const DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: InvalidDisputeStatementKind, + Valid: ValidDisputeStatementKind, + } +}) + +export const ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + BackingSeconded: Hash, + BackingValid: Hash, + Explicit: sts.unit(), + } +}) + +export const InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export const SessionIndex = sts.number() + +export const CandidateHash = sts.bytes() + +export const BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: CommittedCandidateReceipt, + validityVotes: sts.array(() => ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: ValidatorSignature, + Implicit: ValidatorSignature, + Never: sts.unit(), + } +}) + +export const CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: CandidateDescriptor, + commitments: CandidateCommitments, + } +}) + +export const CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => UpwardMessage), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: BlockNumber, + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: sts.number(), + data: sts.bytes(), + } +}) + +export const UpwardMessage = sts.bytes() + +export const CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: ParaId, + relayParent: RelayChainHash, + collatorId: CollatorId, + persistedValidationDataHash: Hash, + povHash: Hash, + erasureRoot: Hash, + signature: CollatorSignature, + paraHead: Hash, + validationCodeHash: ValidationCodeHash, + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const CollatorSignature = sts.bytes() + +export const CollatorId = sts.bytes() + +export const RelayChainHash = sts.bytes() + +export const SignedAvailabilityBitfield: sts.Type = sts.struct(() => { + return { + payload: sts.bitseq(), + validatorIndex: ParaValidatorIndex, + signature: ValidatorSignature, + } +}) + +export const ParasInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasHrmpCall: sts.Type = sts.closedEnum(() => { + return { + force_clean_hrmp: sts.enumStruct({ + para: ParaId, + }), + force_process_hrmp_close: sts.unit(), + force_process_hrmp_open: sts.unit(), + hrmp_accept_open_channel: sts.enumStruct({ + sender: ParaId, + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: ParaId, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: sts.number(), + receiver: sts.number(), + } +}) + +export const ParasDmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + force_note_new_head: sts.enumStruct({ + para: ParaId, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: ParaId, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: ParaId, + newCode: ValidationCode, + expectedAt: BlockNumber, + }), + force_set_current_code: sts.enumStruct({ + para: ParaId, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: ParaId, + newHead: HeadData, + }), + } +}) + +export const ParachainsConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_chain_availability_period: sts.enumStruct({ + new: BlockNumber, + }), + set_code_retention_period: sts.enumStruct({ + new: BlockNumber, + }), + set_dispute_conclusion_by_time_out_period: sts.enumStruct({ + new: BlockNumber, + }), + set_dispute_max_spam_slots: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: SessionIndex, + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: BlockNumber, + }), + set_group_rotation_frequency: sts.enumStruct({ + new: BlockNumber, + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: Balance, + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: Balance, + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_cores: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_retries: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_thread_availability_period: sts.enumStruct({ + new: BlockNumber, + }), + set_ump_service_total_weight: sts.enumStruct({ + new: Weight, + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: BlockNumber, + }), + set_validation_upgrade_frequency: sts.enumStruct({ + new: BlockNumber, + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + call: OpaqueCall, + storeCall: sts.boolean(), + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId), + call: Type_138, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const OpaqueCall = sts.bytes() + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: BlockNumber, + index: sts.number(), + } +}) + +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: AccountIndex, + }), + force_transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: AccountIndex, + }), + freeze: sts.enumStruct({ + index: AccountIndex, + }), + transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + }), + } +}) + +export const AccountIndex = sts.number() + +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: Signature, + }), + } +}) + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: BlockNumber, + networkState: OpaqueNetworkState, + sessionIndex: SessionIndex, + authorityIndex: AuthIndex, + validatorsLen: sts.number(), + } +}) + +export const AuthIndex = sts.number() + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId, + }), + add_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: RegistrarIndex, + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: LookupSource, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: LookupSource, + judgement: IdentityJudgement, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: LookupSource, + }), + rename_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: sts.bigint(), + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => IdentityInfoAdditional), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => H160), + image: Data, + twitter: Data, + } +}) + +export const IdentityInfoAdditional = sts.tuple(() => [Data, Data]) + +export const IdentityJudgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: Balance, + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export const RegistrarIndex = sts.number() + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: H256, + Keccak256: H256, + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: H256, + ShaThree256: H256, + } +}) + +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: BlockNumber, + bestFinalizedBlockNumber: BlockNumber, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const KeyOwnerProof: sts.Type = sts.struct(() => { + return { + session: SessionIndex, + trieNodes: sts.array(() => sts.bytes()), + validatorCount: ValidatorCount, + } +}) + +export const ValidatorCount = sts.number() + +export const GrandpaEquivocationProof: sts.Type = sts.struct(() => { + return { + setId: SetId, + equivocation: GrandpaEquivocation, + } +}) + +export const GrandpaEquivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: GrandpaEquivocationValue, + Prevote: GrandpaEquivocationValue, + } +}) + +export const GrandpaEquivocationValue: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: AuthorityId, + first: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + second: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + } +}) + +export const AuthoritySignature = sts.bytes() + +export const GrandpaPrevote: sts.Type = sts.struct(() => { + return { + targetHash: Hash, + targetNumber: BlockNumber, + } +}) + +export const SetId = sts.bigint() + +export const GiltCall: sts.Type = sts.closedEnum(() => { + return { + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + set_target: sts.enumStruct({ + target: sts.bigint(), + }), + thaw: sts.enumStruct({ + index: sts.number(), + }), + } +}) + +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + set_emergency_election_result: sts.enumStruct({ + solution: ReadySolution, + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => ElectionScore), + }), + submit: sts.enumStruct({ + solution: RawSolution, + numSignedSubmissions: sts.number(), + }), + submit_unsigned: sts.enumStruct({ + solution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export const RawSolution: sts.Type = sts.struct(() => { + return { + compact: CompactAssignmentsWith24, + score: ElectionScore, + round: sts.number(), + } +}) + +export const CompactAssignmentsWith24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [NominatorIndexCompact, ValidatorIndexCompact])), + votes2: sts.array(() => sts.tuple(() => [NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact])), + votes3: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes4: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes5: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes6: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes7: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes8: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes9: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes10: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes11: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes12: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes13: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes14: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes15: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes16: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes17: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes18: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes19: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes20: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes21: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes22: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes23: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes24: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + } +}) + +export const CompactScoreCompact = sts.tuple(() => [ValidatorIndexCompact, OffchainAccuracyCompact]) + +export const OffchainAccuracyCompact = sts.number() + +export const ValidatorIndexCompact = sts.number() + +export const NominatorIndexCompact = sts.number() + +export const ElectionScore = sts.array(() => sts.bigint()) + +export const ReadySolution: sts.Type = sts.struct(() => { + return { + supports: sts.array(() => sts.tuple(() => [AccountId, SolutionSupport])), + score: ElectionScore, + compute: ElectionCompute, + } +}) + +export const ElectionCompute: sts.Type = sts.closedEnum(() => { + return { + OnChain: sts.unit(), + Signed: sts.unit(), + Unsigned: sts.unit(), + } +}) + +export const SolutionSupport: sts.Type = sts.struct(() => { + return { + total: ExtendedBalance, + voters: sts.array(() => sts.tuple(() => [AccountId, ExtendedBalance])), + } +}) + +export const ExtendedBalance = sts.bigint() + +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + blacklist: sts.enumStruct({ + proposalHash: Hash, + maybeRefIndex: sts.option(() => ReferendumIndex), + }), + cancel_proposal: sts.enumStruct({ + propIndex: sts.number(), + }), + cancel_queued: sts.enumStruct({ + which: ReferendumIndex, + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId, + conviction: Conviction, + balance: BalanceOf, + }), + emergency_cancel: sts.enumStruct({ + refIndex: ReferendumIndex, + }), + enact_proposal: sts.enumStruct({ + proposalHash: Hash, + index: ReferendumIndex, + }), + external_propose: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_default: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: Hash, + }), + fast_track: sts.enumStruct({ + proposalHash: Hash, + votingPeriod: BlockNumber, + delay: BlockNumber, + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: Hash, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: Hash, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId, + index: ReferendumIndex, + }), + remove_vote: sts.enumStruct({ + index: ReferendumIndex, + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId, + }), + veto_external: sts.enumStruct({ + proposalHash: Hash, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: AccountVoteSplit, + Standard: AccountVoteStandard, + } +}) + +export const AccountVoteStandard: sts.Type = sts.struct(() => { + return { + vote: Vote, + balance: Balance, + } +}) + +export const Vote = sts.number() + +export const AccountVoteSplit: sts.Type = sts.struct(() => { + return { + aye: Balance, + nay: Balance, + } +}) + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export const ReferendumIndex = sts.number() + +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: ParaId, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: ParaId, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: EcdsaSignature, + Ed25519: Ed25519Signature, + Sr25519: Sr25519Signature, + } +}) + +export const Sr25519Signature = sts.bytes() + +export const Ed25519Signature = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: BalanceOf, + vestingSchedule: sts.option(() => sts.tuple(() => [BalanceOf, BalanceOf, BlockNumber])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export const EthereumAddress = sts.bytes() + +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: LookupSource, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: LookupSource, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: LookupSource, + dest: LookupSource, + value: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: LookupSource, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: LookupSource, + keepAlive: sts.boolean(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + } +}) + +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const BabeEquivocationProof: sts.Type = sts.struct(() => { + return { + offender: AuthorityId, + slotNumber: SlotNumber, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const SlotNumber = sts.bigint() + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V0: sts.unit(), + V1: NextConfigDescriptorV1, + } +}) + +export const NextConfigDescriptorV1: sts.Type = sts.struct(() => { + return { + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +export type Type_138 = Type_138_Auctions | Type_138_Authorship | Type_138_Babe | Type_138_Balances | Type_138_Bounties | Type_138_Claims | Type_138_Council | Type_138_Crowdloan | Type_138_Democracy | Type_138_ElectionProviderMultiPhase | Type_138_Gilt | Type_138_Grandpa | Type_138_Identity | Type_138_ImOnline | Type_138_Indices | Type_138_Multisig | Type_138_ParachainsConfiguration | Type_138_Paras | Type_138_ParasDmp | Type_138_ParasHrmp | Type_138_ParasInclusion | Type_138_ParasInherent | Type_138_ParasInitializer | Type_138_ParasScheduler | Type_138_ParasSessionInfo | Type_138_ParasShared | Type_138_ParasUmp | Type_138_PhragmenElection | Type_138_Proxy | Type_138_Recovery | Type_138_Registrar | Type_138_Scheduler | Type_138_Session | Type_138_Slots | Type_138_Society | Type_138_Staking | Type_138_System | Type_138_TechnicalCommittee | Type_138_TechnicalMembership | Type_138_Timestamp | Type_138_Tips | Type_138_Treasury | Type_138_Utility | Type_138_Vesting | Type_138_XcmPallet + +export interface Type_138_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Type_138_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Type_138_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Type_138_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Type_138_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Type_138_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Type_138_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Type_138_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Type_138_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Type_138_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Type_138_Gilt { + __kind: 'Gilt' + value: GiltCall +} + +export interface Type_138_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Type_138_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Type_138_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Type_138_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Type_138_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Type_138_ParachainsConfiguration { + __kind: 'ParachainsConfiguration' + value: ParachainsConfigurationCall +} + +export interface Type_138_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Type_138_ParasDmp { + __kind: 'ParasDmp' + value: ParasDmpCall +} + +export interface Type_138_ParasHrmp { + __kind: 'ParasHrmp' + value: ParasHrmpCall +} + +export interface Type_138_ParasInclusion { + __kind: 'ParasInclusion' + value: ParasInclusionCall +} + +export interface Type_138_ParasInherent { + __kind: 'ParasInherent' + value: ParasInherentCall +} + +export interface Type_138_ParasInitializer { + __kind: 'ParasInitializer' + value: ParasInitializerCall +} + +export interface Type_138_ParasScheduler { + __kind: 'ParasScheduler' + value: ParasSchedulerCall +} + +export interface Type_138_ParasSessionInfo { + __kind: 'ParasSessionInfo' + value: ParasSessionInfoCall +} + +export interface Type_138_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Type_138_ParasUmp { + __kind: 'ParasUmp' + value: ParasUmpCall +} + +export interface Type_138_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Type_138_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Type_138_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Type_138_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Type_138_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Type_138_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Type_138_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Type_138_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Type_138_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Type_138_System { + __kind: 'System' + value: SystemCall +} + +export interface Type_138_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Type_138_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Type_138_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Type_138_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Type_138_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Type_138_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Type_138_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Type_138_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId = sts.bytes() diff --git a/squid/src/types/v9090.ts b/squid/src/types/v9090.ts new file mode 100644 index 00000000..d0e418f2 --- /dev/null +++ b/squid/src/types/v9090.ts @@ -0,0 +1,9433 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Type_138: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + Dmp: DmpCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + Gilt: GiltCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Initializer: InitializerCall, + Multisig: MultisigCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Paras: ParasCall, + ParasShared: ParasSharedCall, + PhragmenElection: PhragmenElectionCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Ump: UmpCall, + Utility: UtilityCall, + Vesting: VestingCall, + XcmPallet: XcmPalletCall, + } +}) + +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + execute: sts.enumStruct({ + message: Xcm, + maxWeight: Weight, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: MultiLocation, + beneficiary: MultiLocation, + assets: sts.array(() => MultiAsset), + destWeight: Weight, + }), + send: sts.enumStruct({ + dest: MultiLocation, + message: Xcm, + }), + teleport_assets: sts.enumStruct({ + dest: MultiLocation, + beneficiary: MultiLocation, + assets: sts.array(() => MultiAsset), + destWeight: Weight, + }), + } +}) + +export const MultiAsset: sts.Type = sts.closedEnum(() => { + return { + AbstractFungible: sts.enumStruct({ + id: sts.bytes(), + instance: sts.bigint(), + }), + AbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + instance: AssetInstanceV0, + }), + All: sts.unit(), + AllAbstractFungible: sts.bytes(), + AllAbstractNonFungible: sts.bytes(), + AllConcreteFungible: MultiLocationV0, + AllConcreteNonFungible: MultiLocationV0, + AllFungible: sts.unit(), + AllNonFungible: sts.unit(), + ConcreteFungible: sts.enumStruct({ + id: MultiLocationV0, + amount: sts.bigint(), + }), + ConcreteNonFungible: sts.enumStruct({ + class: MultiLocationV0, + instance: AssetInstanceV0, + }), + None: sts.unit(), + } +}) + +export const MultiLocationV0: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: JunctionV0, + X2: sts.tuple(() => [JunctionV0, JunctionV0]), + X3: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0]), + X4: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X5: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X6: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X7: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X8: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + } +}) + +export const JunctionV0: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: NetworkId, + id: AccountId, + }), + AccountIndex64: sts.enumStruct({ + network: NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.bytes(), + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Parent: sts.unit(), + Plurality: sts.enumStruct({ + id: BodyId, + part: BodyPart, + }), + } +}) + +export const BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.number(), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export type BodyPart = BodyPart_AtLeastProportion | BodyPart_Fraction | BodyPart_Members | BodyPart_MoreThanProportion | BodyPart_Voice + +export interface BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface BodyPart_Members { + __kind: 'Members' + value: number +} + +export interface BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface BodyPart_Voice { + __kind: 'Voice' +} + +export const BodyId: sts.Type = sts.closedEnum(() => { + return { + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: sts.bytes(), + Technical: sts.unit(), + Unit: sts.unit(), + } +}) + +export type BodyId = BodyId_Executive | BodyId_Index | BodyId_Judicial | BodyId_Legislative | BodyId_Named | BodyId_Technical | BodyId_Unit + +export interface BodyId_Executive { + __kind: 'Executive' +} + +export interface BodyId_Index { + __kind: 'Index' + value: number +} + +export interface BodyId_Judicial { + __kind: 'Judicial' +} + +export interface BodyId_Legislative { + __kind: 'Legislative' +} + +export interface BodyId_Named { + __kind: 'Named' + value: Bytes +} + +export interface BodyId_Technical { + __kind: 'Technical' +} + +export interface BodyId_Unit { + __kind: 'Unit' +} + +export const NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: sts.bytes(), + Polkadot: sts.unit(), + } +}) + +export type NetworkId = NetworkId_Any | NetworkId_Kusama | NetworkId_Named | NetworkId_Polkadot + +export interface NetworkId_Any { + __kind: 'Any' +} + +export interface NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface NetworkId_Named { + __kind: 'Named' + value: Bytes +} + +export interface NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export type JunctionV0 = JunctionV0_AccountId32 | JunctionV0_AccountIndex64 | JunctionV0_AccountKey20 | JunctionV0_GeneralIndex | JunctionV0_GeneralKey | JunctionV0_OnlyChild | JunctionV0_PalletInstance | JunctionV0_Parachain | JunctionV0_Parent | JunctionV0_Plurality + +export interface JunctionV0_AccountId32 { + __kind: 'AccountId32' + network: NetworkId + id: AccountId +} + +export interface JunctionV0_AccountIndex64 { + __kind: 'AccountIndex64' + network: NetworkId + index: bigint +} + +export interface JunctionV0_AccountKey20 { + __kind: 'AccountKey20' + network: NetworkId + key: Bytes +} + +export interface JunctionV0_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface JunctionV0_GeneralKey { + __kind: 'GeneralKey' + value: Bytes +} + +export interface JunctionV0_OnlyChild { + __kind: 'OnlyChild' +} + +export interface JunctionV0_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface JunctionV0_Parachain { + __kind: 'Parachain' + value: number +} + +export interface JunctionV0_Parent { + __kind: 'Parent' +} + +export interface JunctionV0_Plurality { + __kind: 'Plurality' + id: BodyId + part: BodyPart +} + +export type AccountId = Bytes + +export type MultiLocationV0 = MultiLocationV0_Here | MultiLocationV0_X1 | MultiLocationV0_X2 | MultiLocationV0_X3 | MultiLocationV0_X4 | MultiLocationV0_X5 | MultiLocationV0_X6 | MultiLocationV0_X7 | MultiLocationV0_X8 + +export interface MultiLocationV0_Here { + __kind: 'Here' +} + +export interface MultiLocationV0_X1 { + __kind: 'X1' + value: JunctionV0 +} + +export interface MultiLocationV0_X2 { + __kind: 'X2' + value: [JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X3 { + __kind: 'X3' + value: [JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X4 { + __kind: 'X4' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X5 { + __kind: 'X5' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X6 { + __kind: 'X6' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X7 { + __kind: 'X7' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X8 { + __kind: 'X8' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export const AssetInstanceV0: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index128: sts.bigint(), + Index16: sts.number(), + Index32: sts.number(), + Index64: sts.bigint(), + Index8: sts.number(), + Undefined: sts.unit(), + } +}) + +export type AssetInstanceV0 = AssetInstanceV0_Array16 | AssetInstanceV0_Array32 | AssetInstanceV0_Array4 | AssetInstanceV0_Array8 | AssetInstanceV0_Blob | AssetInstanceV0_Index128 | AssetInstanceV0_Index16 | AssetInstanceV0_Index32 | AssetInstanceV0_Index64 | AssetInstanceV0_Index8 | AssetInstanceV0_Undefined + +export interface AssetInstanceV0_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface AssetInstanceV0_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface AssetInstanceV0_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface AssetInstanceV0_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface AssetInstanceV0_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface AssetInstanceV0_Index128 { + __kind: 'Index128' + value: bigint +} + +export interface AssetInstanceV0_Index16 { + __kind: 'Index16' + value: number +} + +export interface AssetInstanceV0_Index32 { + __kind: 'Index32' + value: number +} + +export interface AssetInstanceV0_Index64 { + __kind: 'Index64' + value: bigint +} + +export interface AssetInstanceV0_Index8 { + __kind: 'Index8' + value: number +} + +export interface AssetInstanceV0_Undefined { + __kind: 'Undefined' +} + +export type MultiAsset = MultiAsset_AbstractFungible | MultiAsset_AbstractNonFungible | MultiAsset_All | MultiAsset_AllAbstractFungible | MultiAsset_AllAbstractNonFungible | MultiAsset_AllConcreteFungible | MultiAsset_AllConcreteNonFungible | MultiAsset_AllFungible | MultiAsset_AllNonFungible | MultiAsset_ConcreteFungible | MultiAsset_ConcreteNonFungible | MultiAsset_None + +export interface MultiAsset_AbstractFungible { + __kind: 'AbstractFungible' + id: Bytes + instance: bigint +} + +export interface MultiAsset_AbstractNonFungible { + __kind: 'AbstractNonFungible' + class: Bytes + instance: AssetInstanceV0 +} + +export interface MultiAsset_All { + __kind: 'All' +} + +export interface MultiAsset_AllAbstractFungible { + __kind: 'AllAbstractFungible' + value: Bytes +} + +export interface MultiAsset_AllAbstractNonFungible { + __kind: 'AllAbstractNonFungible' + value: Bytes +} + +export interface MultiAsset_AllConcreteFungible { + __kind: 'AllConcreteFungible' + value: MultiLocationV0 +} + +export interface MultiAsset_AllConcreteNonFungible { + __kind: 'AllConcreteNonFungible' + value: MultiLocationV0 +} + +export interface MultiAsset_AllFungible { + __kind: 'AllFungible' +} + +export interface MultiAsset_AllNonFungible { + __kind: 'AllNonFungible' +} + +export interface MultiAsset_ConcreteFungible { + __kind: 'ConcreteFungible' + id: MultiLocationV0 + amount: bigint +} + +export interface MultiAsset_ConcreteNonFungible { + __kind: 'ConcreteNonFungible' + class: MultiLocationV0 + instance: AssetInstanceV0 +} + +export interface MultiAsset_None { + __kind: 'None' +} + +export const MultiLocation: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: JunctionV0, + X2: sts.tuple(() => [JunctionV0, JunctionV0]), + X3: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0]), + X4: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X5: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X6: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X7: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X8: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + } +}) + +export type MultiLocation = MultiLocation_Here | MultiLocation_X1 | MultiLocation_X2 | MultiLocation_X3 | MultiLocation_X4 | MultiLocation_X5 | MultiLocation_X6 | MultiLocation_X7 | MultiLocation_X8 + +export interface MultiLocation_Here { + __kind: 'Here' +} + +export interface MultiLocation_X1 { + __kind: 'X1' + value: JunctionV0 +} + +export interface MultiLocation_X2 { + __kind: 'X2' + value: [JunctionV0, JunctionV0] +} + +export interface MultiLocation_X3 { + __kind: 'X3' + value: [JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocation_X4 { + __kind: 'X4' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocation_X5 { + __kind: 'X5' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocation_X6 { + __kind: 'X6' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocation_X7 { + __kind: 'X7' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocation_X8 { + __kind: 'X8' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export const Weight = sts.bigint() + +export const Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: ResponseV0, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + RelayedFrom: sts.enumStruct({ + who: MultiLocationV0, + message: XcmV0, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + Transact: sts.enumStruct({ + originType: XcmOriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncodedCall, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + } +}) + +export const DoubleEncodedCall: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncodedCall { + encoded: Bytes +} + +export const XcmOriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type XcmOriginKind = XcmOriginKind_Native | XcmOriginKind_SovereignAccount | XcmOriginKind_Superuser | XcmOriginKind_Xcm + +export interface XcmOriginKind_Native { + __kind: 'Native' +} + +export interface XcmOriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface XcmOriginKind_Superuser { + __kind: 'Superuser' +} + +export interface XcmOriginKind_Xcm { + __kind: 'Xcm' +} + +export const XcmV0: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: ResponseV0, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + RelayedFrom: sts.enumStruct({ + who: MultiLocationV0, + message: XcmV0, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + Transact: sts.enumStruct({ + originType: XcmOriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncodedCall, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + } +}) + +export type XcmV0 = XcmV0_HrmpChannelAccepted | XcmV0_HrmpChannelClosing | XcmV0_HrmpNewChannelOpenRequest | XcmV0_QueryResponse | XcmV0_ReceiveTeleportedAsset | XcmV0_RelayedFrom | XcmV0_ReserveAssetDeposit | XcmV0_Transact | XcmV0_TransferAsset | XcmV0_TransferReserveAsset | XcmV0_WithdrawAsset + +export interface XcmV0_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface XcmV0_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface XcmV0_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface XcmV0_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: ResponseV0 +} + +export interface XcmV0_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export interface XcmV0_RelayedFrom { + __kind: 'RelayedFrom' + who: MultiLocationV0 + message: XcmV0 +} + +export interface XcmV0_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export interface XcmV0_Transact { + __kind: 'Transact' + originType: XcmOriginKind + requireWeightAtMost: bigint + call: DoubleEncodedCall +} + +export interface XcmV0_TransferAsset { + __kind: 'TransferAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 +} + +export interface XcmV0_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface XcmV0_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export type XcmOrderV0 = XcmOrderV0_BuyExecution | XcmOrderV0_DepositAsset | XcmOrderV0_DepositReserveAsset | XcmOrderV0_ExchangeAsset | XcmOrderV0_InitiateReserveWithdraw | XcmOrderV0_InitiateTeleport | XcmOrderV0_Null | XcmOrderV0_QueryHolding + +export interface XcmOrderV0_BuyExecution { + __kind: 'BuyExecution' + fees: MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: XcmV0[] +} + +export interface XcmOrderV0_DepositAsset { + __kind: 'DepositAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 +} + +export interface XcmOrderV0_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface XcmOrderV0_ExchangeAsset { + __kind: 'ExchangeAsset' + give: MultiAssetV0[] + receive: MultiAssetV0[] +} + +export interface XcmOrderV0_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: MultiAssetV0[] + reserve: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface XcmOrderV0_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: MultiAsset[] + dest: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface XcmOrderV0_Null { + __kind: 'Null' +} + +export interface XcmOrderV0_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: MultiLocationV0 + assets: MultiAssetV0[] +} + +export type MultiAssetV0 = MultiAssetV0_AbstractFungible | MultiAssetV0_AbstractNonFungible | MultiAssetV0_All | MultiAssetV0_AllAbstractFungible | MultiAssetV0_AllAbstractNonFungible | MultiAssetV0_AllConcreteFungible | MultiAssetV0_AllConcreteNonFungible | MultiAssetV0_AllFungible | MultiAssetV0_AllNonFungible | MultiAssetV0_ConcreteFungible | MultiAssetV0_ConcreteNonFungible | MultiAssetV0_None + +export interface MultiAssetV0_AbstractFungible { + __kind: 'AbstractFungible' + id: Bytes + instance: bigint +} + +export interface MultiAssetV0_AbstractNonFungible { + __kind: 'AbstractNonFungible' + class: Bytes + instance: AssetInstanceV0 +} + +export interface MultiAssetV0_All { + __kind: 'All' +} + +export interface MultiAssetV0_AllAbstractFungible { + __kind: 'AllAbstractFungible' + value: Bytes +} + +export interface MultiAssetV0_AllAbstractNonFungible { + __kind: 'AllAbstractNonFungible' + value: Bytes +} + +export interface MultiAssetV0_AllConcreteFungible { + __kind: 'AllConcreteFungible' + value: MultiLocationV0 +} + +export interface MultiAssetV0_AllConcreteNonFungible { + __kind: 'AllConcreteNonFungible' + value: MultiLocationV0 +} + +export interface MultiAssetV0_AllFungible { + __kind: 'AllFungible' +} + +export interface MultiAssetV0_AllNonFungible { + __kind: 'AllNonFungible' +} + +export interface MultiAssetV0_ConcreteFungible { + __kind: 'ConcreteFungible' + id: MultiLocationV0 + amount: bigint +} + +export interface MultiAssetV0_ConcreteNonFungible { + __kind: 'ConcreteNonFungible' + class: MultiLocationV0 + instance: AssetInstanceV0 +} + +export interface MultiAssetV0_None { + __kind: 'None' +} + +export type ResponseV0 = ResponseV0_Assets + +export interface ResponseV0_Assets { + __kind: 'Assets' + value: MultiAssetV0[] +} + +export const XcmOrderV0: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => XcmV0), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => MultiAssetV0), + receive: sts.array(() => MultiAssetV0), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + reserve: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => MultiAsset), + dest: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: MultiLocationV0, + assets: sts.array(() => MultiAssetV0), + }), + } +}) + +export const MultiAssetV0: sts.Type = sts.closedEnum(() => { + return { + AbstractFungible: sts.enumStruct({ + id: sts.bytes(), + instance: sts.bigint(), + }), + AbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + instance: AssetInstanceV0, + }), + All: sts.unit(), + AllAbstractFungible: sts.bytes(), + AllAbstractNonFungible: sts.bytes(), + AllConcreteFungible: MultiLocationV0, + AllConcreteNonFungible: MultiLocationV0, + AllFungible: sts.unit(), + AllNonFungible: sts.unit(), + ConcreteFungible: sts.enumStruct({ + id: MultiLocationV0, + amount: sts.bigint(), + }), + ConcreteNonFungible: sts.enumStruct({ + class: MultiLocationV0, + instance: AssetInstanceV0, + }), + None: sts.unit(), + } +}) + +export const ResponseV0: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => MultiAssetV0), + } +}) + +export type Xcm = Xcm_HrmpChannelAccepted | Xcm_HrmpChannelClosing | Xcm_HrmpNewChannelOpenRequest | Xcm_QueryResponse | Xcm_ReceiveTeleportedAsset | Xcm_RelayedFrom | Xcm_ReserveAssetDeposit | Xcm_Transact | Xcm_TransferAsset | Xcm_TransferReserveAsset | Xcm_WithdrawAsset + +export interface Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: ResponseV0 +} + +export interface Xcm_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export interface Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: MultiLocationV0 + message: XcmV0 +} + +export interface Xcm_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export interface Xcm_Transact { + __kind: 'Transact' + originType: XcmOriginKind + requireWeightAtMost: bigint + call: DoubleEncodedCall +} + +export interface Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 +} + +export interface Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export type XcmPalletCall = XcmPalletCall_execute | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets + +/** + * Execute an XCM message from a local, signed, origin. + * + * An event is deposited indicating whether `msg` could be executed completely or only + * partially. + * + * No more than `max_weight` will be used in its attempted execution. If this is less than the + * maximum amount of weight that the message could take to be executed, then no execution + * attempt will be made. + * + * NOTE: A successful return to this does *not* imply that the `msg` was executed successfully + * to completion; only that *some* of it was executed. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Xcm + maxWeight: Weight +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination chain and forward + * a notification XCM. + * + * Fee payment on the destination side is made from the first asset listed in the `assets` vector. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `dest_weight`: Equal to the total weight on `dest` of the XCM message + * `ReserveAssetDeposit { assets, effects: [ BuyExecution{..}, DepositAsset{..} ] }`. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: MultiLocation + beneficiary: MultiLocation + assets: MultiAsset[] + destWeight: Weight +} + +export interface XcmPalletCall_send { + __kind: 'send' + dest: MultiLocation + message: Xcm +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the first asset listed in the `assets` vector. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `dest_weight`: Equal to the total weight on `dest` of the XCM message + * `Teleport { assets, effects: [ BuyExecution{..}, DepositAsset{..} ] }`. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: MultiLocation + beneficiary: MultiLocation + assets: MultiAsset[] + destWeight: Weight +} + +export type Weight = bigint + +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: LookupSource, + target: LookupSource, + schedule: VestingInfo, + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: LookupSource, + }), + vested_transfer: sts.enumStruct({ + target: LookupSource, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: Balance, + perBlock: Balance, + startingBlock: BlockNumber, + } +}) + +export const BlockNumber = sts.number() + +export const Balance = sts.bigint() + +export interface VestingInfo { + locked: Balance + perBlock: Balance + startingBlock: BlockNumber +} + +export type BlockNumber = number + +export type Balance = bigint + +export const LookupSource: sts.Type = sts.closedEnum(() => { + return { + Address20: H160, + Address32: H256, + Id: AccountId, + Index: sts.number(), + Raw: sts.bytes(), + } +}) + +export const H256 = sts.bytes() + +export const H160 = sts.bytes() + +export type LookupSource = LookupSource_Address20 | LookupSource_Address32 | LookupSource_Id | LookupSource_Index | LookupSource_Raw + +export interface LookupSource_Address20 { + __kind: 'Address20' + value: H160 +} + +export interface LookupSource_Address32 { + __kind: 'Address32' + value: H256 +} + +export interface LookupSource_Id { + __kind: 'Id' + value: AccountId +} + +export interface LookupSource_Index { + __kind: 'Index' + value: number +} + +export interface LookupSource_Raw { + __kind: 'Raw' + value: Bytes +} + +export type H256 = Bytes + +export type H160 = Bytes + +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: LookupSource + target: LookupSource + schedule: VestingInfo +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: LookupSource +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: LookupSource + schedule: VestingInfo +} + +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Type_138, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Type_138), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Type_138), + }), + } +}) + +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Type_138 +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Type_138[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Type_138[] +} + +export const UmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type UmpCall = never + +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: LookupSource, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + } +}) + +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: LookupSource +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +export const TipsCall: sts.Type = sts.closedEnum(() => { + return { + close_tip: sts.enumStruct({ + hash: Hash, + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + }), + retract_tip: sts.enumStruct({ + hash: Hash, + }), + slash_tip: sts.enumStruct({ + hash: Hash, + }), + tip: sts.enumStruct({ + hash: Hash, + tipValue: sts.bigint(), + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + tipValue: sts.bigint(), + }), + } +}) + +export const Hash = sts.bytes() + +export type TipsCall = TipsCall_close_tip | TipsCall_report_awesome | TipsCall_retract_tip | TipsCall_slash_tip | TipsCall_tip | TipsCall_tip_new + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`. + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TipsCall_close_tip { + __kind: 'close_tip' + hash: Hash +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TipsCall_retract_tip { + __kind: 'retract_tip' + hash: Hash +} + +/** + * Remove and slash an already-open tip. + * + * May only be called from `T::RejectOrigin`. + * + * As a result, the finder is slashed and the deposits are lost. + * + * Emits `TipSlashed` if successful. + * + * # + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * # + */ +export interface TipsCall_slash_tip { + __kind: 'slash_tip' + hash: Hash +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`, insert tip and check closing, + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TipsCall_tip { + __kind: 'tip' + hash: Hash + tipValue: bigint +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T` + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId + tipValue: bigint +} + +export type Hash = Bytes + +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId, + }), + change_key: sts.enumStruct({ + new: AccountId, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId), + }), + set_prime: sts.enumStruct({ + who: AccountId, + }), + swap_member: sts.enumStruct({ + remove: AccountId, + add: AccountId, + }), + } +}) + +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId + add: AccountId +} + +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const MemberCount = sts.number() + +export const Proposal: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + Dmp: DmpCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + Gilt: GiltCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Initializer: InitializerCall, + Multisig: MultisigCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Paras: ParasCall, + ParasShared: ParasSharedCall, + PhragmenElection: PhragmenElectionCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Ump: UmpCall, + Utility: UtilityCall, + Vesting: VestingCall, + XcmPallet: XcmPalletCall, + } +}) + +export type Proposal = Proposal_Auctions | Proposal_Authorship | Proposal_Babe | Proposal_Balances | Proposal_Bounties | Proposal_Claims | Proposal_Configuration | Proposal_Council | Proposal_Crowdloan | Proposal_Democracy | Proposal_Dmp | Proposal_ElectionProviderMultiPhase | Proposal_Gilt | Proposal_Grandpa | Proposal_Hrmp | Proposal_Identity | Proposal_ImOnline | Proposal_Indices | Proposal_Initializer | Proposal_Multisig | Proposal_ParaInclusion | Proposal_ParaInherent | Proposal_Paras | Proposal_ParasShared | Proposal_PhragmenElection | Proposal_Proxy | Proposal_Recovery | Proposal_Registrar | Proposal_Scheduler | Proposal_Session | Proposal_Slots | Proposal_Society | Proposal_Staking | Proposal_System | Proposal_TechnicalCommittee | Proposal_TechnicalMembership | Proposal_Timestamp | Proposal_Tips | Proposal_Treasury | Proposal_Ump | Proposal_Utility | Proposal_Vesting | Proposal_XcmPallet + +export interface Proposal_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Proposal_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Proposal_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Proposal_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Proposal_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Proposal_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Proposal_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Proposal_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Proposal_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Proposal_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Proposal_Dmp { + __kind: 'Dmp' + value: DmpCall +} + +export interface Proposal_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Proposal_Gilt { + __kind: 'Gilt' + value: GiltCall +} + +export interface Proposal_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Proposal_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Proposal_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Proposal_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Proposal_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Proposal_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Proposal_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Proposal_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Proposal_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Proposal_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Proposal_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Proposal_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Proposal_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Proposal_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Proposal_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Proposal_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Proposal_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Proposal_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Proposal_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Proposal_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Proposal_System { + __kind: 'System' + value: SystemCall +} + +export interface Proposal_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Proposal_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Proposal_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Proposal_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Proposal_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Proposal_Ump { + __kind: 'Ump' + value: UmpCall +} + +export interface Proposal_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Proposal_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Proposal_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_changes_trie_config | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + * + * # + * - `O(P)` where `P` amount of keys with prefix `prefix` + * - `P` storage deletions. + * - Base Weight: 0.834 * P µs + * - Writes: Number of subkeys + 1 + * # + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Key + subkeys: number +} + +/** + * Kill some items from storage. + * + * # + * - `O(IK)` where `I` length of `keys` and `K` length of one key + * - `I` storage deletions. + * - Base Weight: .378 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Key[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Make some on-chain remark and emit event. + * + * # + * - `O(b)` where b is the length of the remark. + * - 1 event. + * # + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * Set the new changes trie configuration. + * + * # + * - `O(1)` + * - 1 storage write or delete (codec `O(1)`). + * - 1 call to `deposit_log`: Uses `append` API, so O(1) + * - Base Weight: 7.218 µs + * - DB Weight: + * - Writes: Changes Trie, System Digest + * # + */ +export interface SystemCall_set_changes_trie_config { + __kind: 'set_changes_trie_config' + changesTrieConfig?: (ChangesTrieConfiguration | undefined) +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 storage write (codec `O(C)`). + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is expensive). + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very expensive. + * We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + * + * # + * - `O(1)` + * - 1 storage write. + * - Base Weight: 1.405 µs + * - 1 write to HEAP_PAGES + * # + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + * + * # + * - `O(I)` where `I` length of `items` + * - `I` storage writes (`O(1)`). + * - Base Weight: 0.568 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: KeyValue[] +} + +export type KeyValue = [StorageKey, StorageData] + +export type StorageData = Bytes + +export type StorageKey = Bytes + +export interface ChangesTrieConfiguration { + digestInterval: number + digestLevels: number +} + +export type Key = Bytes + +export type Perbill = number + +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_staking_limits | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: LookupSource + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose any limitation + * on the amount that can be added. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + * + * # + * Complexity: O(U + S) + * with U unapplied slashes weighted with U=1000 + * and S is the number of slash indices to be canceled. + * - Read: Unapplied Slashes + * - Write: Unapplied Slashes + * # + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: EraIndex + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Declare a `controller` to stop participating as either a validator or nominator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_, but can be called by anyone. + * + * If the caller is the same as the controller being targeted, then no further checks are + * enforced, and this function behaves just like `chill`. + * + * If the caller is different than the controller being targeted, the following conditions + * must be met: + * * A `ChillThreshold` must be set and checked which defines how close to the max + * nominators or validators we must reach before users can start chilling one-another. + * * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine + * how close we are to the threshold. + * * A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines + * if this is a person that should be chilled because they have not met the threshold + * bond required. + * + * This can be helpful if bond requirements are updated, and we need to remove old users + * who do not satisfy these requirements. + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + controller: AccountId +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * # + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * Thus the election process may be ongoing when this is called. In this case the + * election will continue until the next era is triggered. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + * + * # + * O(S) where S is the number of slashing spans to be removed + * Reads: Bonded, Slashing Spans, Account, Locks + * Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Account, Locks + * Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: LookupSource[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS). + * - Both the reads and writes follow a similar pattern. + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: LookupSource[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId + era: EraIndex +} + +/** + * Remove all data structure concerning a staker/stash once its balance is at the minimum. + * This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone + * and the target `stash` must have no funds left beyond the ED. + * + * This can be called from any origin. + * + * - `stash`: The stash account to reap. Its balance must be zero. + * + * # + * Complexity: O(S) where S is the number of slashing spans on the account. + * DB Weight: + * - Reads: Stash Account, Bonded, Slashing Spans, Locks + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Stash Account, Locks + * - Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MAX_UNLOCKING_CHUNKS`. + * - Storage changes: Can't increase storage, only decrease it. + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: LookupSource +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. + * This should report all the storage items that will be deleted by clearing old + * era history. Needed to report an accurate weight for the dispatch. Trusted by + * `Root` to report an accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Weight: O(E) + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + * + * # + * - O(V) + * - Write: Invulnerables + * # + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Update the various staking limits this pallet. + * + * * `min_nominator_bond`: The minimum active bond needed to be a nominator. + * * `min_validator_bond`: The minimum active bond needed to be a validator. + * * `max_nominator_count`: The max number of users who can be a nominator at once. + * When set to `None`, no limit is enforced. + * * `max_validator_count`: The max number of users who can be a validator at once. + * When set to `None`, no limit is enforced. + * + * Origin must be Root to call this function. + * + * NOTE: Existing nominators and validators will not be affected by this update. + * to kick people under the new limits, `chill_other` should be called. + */ +export interface StakingCall_set_staking_limits { + __kind: 'set_staking_limits' + minNominatorBond: BalanceOf + minValidatorBond: BalanceOf + maxNominatorCount?: (number | undefined) + maxValidatorCount?: (number | undefined) + threshold?: (Percent | undefined) +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * If a user encounters the `InsufficientBond` error when calling this extrinsic, + * they should call `chill` first in order to free up their bonded funds. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * Complexity O(S) where S is the number of slashing spans to remove + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export type BalanceOf = bigint + +export type Percent = number + +export type EraIndex = number + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: BalanceOf +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * module to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId + judgement: SocietyJudgement +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin + * forgives (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: LookupSource + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId + value: BalanceOf + tip: BalanceOf +} + +export type SocietyJudgement = SocietyJudgement_Approve | SocietyJudgement_Rebid | SocietyJudgement_Reject + +export interface SocietyJudgement_Approve { + __kind: 'Approve' +} + +export interface SocietyJudgement_Rebid { + __kind: 'Rebid' +} + +export interface SocietyJudgement_Reject { + __kind: 'Reject' +} + +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * Clear all leases for a Para Id, refunding any deposits back to the original owners. + * + * Can only be called by the Root origin. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: ParaId +} + +/** + * Just a connect into the `lease_out` call, in case Root wants to force some lease to happen + * independently of any other on-chain mechanism to use it. + * + * Can only be called by the Root origin. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: ParaId + leaser: AccountId + amount: BalanceOf + periodBegin: LeasePeriodOf + periodCount: LeasePeriodOf +} + +/** + * Try to onboard a parachain that has a lease for the current lease period. + * + * This function can be useful if there was some state issue with a para that should + * have onboarded, but was unable to. As long as they have a lease period, we can + * let them onboard from here. + * + * Origin must be signed, but can be called by anyone. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: ParaId +} + +export type LeasePeriodOf = number + +export type ParaId = number + +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` in number of key types. + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: Keys + proof: Bytes +} + +export type Keys = [AccountId, AccountId, AccountId, AccountId, AccountId, AccountId] + +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.15 + 2.869 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: BlockNumber + index: number +} + +/** + * Cancel a named scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 24.91 + 2.907 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.29 + .126 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda + * - Will use base weight of 25 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_138 +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_138 +} + +/** + * Schedule a named task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 29.6 + .159 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 35 which should be good for more than 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_138 +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`](Self::schedule_named). + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_138 +} + +export type Priority = number + +export type Period = [BlockNumber, number] + +export type RegistrarCall = RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_force_remove_lock | RegistrarCall_register | RegistrarCall_reserve | RegistrarCall_swap + +/** + * Deregister a Para Id, freeing all data and returning any deposit. + * + * The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: ParaId +} + +/** + * Force the registration of a Para Id on the relay chain. + * + * This function must be called by a Root origin. + * + * The deposit taken can be specified for this registration. Any `ParaId` + * can be registered, including sub-1000 IDs which are System Parachains. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId + deposit: BalanceOf + id: ParaId + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Remove a manager lock from a para. This will allow the manager of a + * previously locked para to deregister or swap a para without using governance. + * + * Can only be called by the Root origin. + */ +export interface RegistrarCall_force_remove_lock { + __kind: 'force_remove_lock' + para: ParaId +} + +/** + * Register head data and validation code for a reserved Para Id. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. + * - `id`: The para ID. Must be owned/managed by the `origin` signing account. + * - `genesis_head`: The genesis head data of the parachain/thread. + * - `validation_code`: The initial validation code of the parachain/thread. + * + * ## Deposits/Fees + * The origin signed account must reserve a corresponding deposit for the registration. Anything already + * reserved previously for this para ID is accounted for. + * + * ## Events + * The `Registered` event is emitted in case of success. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: ParaId + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Reserve a Para Id on the relay chain. + * + * This function will reserve a new Para Id to be owned/managed by the origin account. + * The origin account is able to register head data and validation code using `register` to create + * a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID. + * + * ## Deposits/Fees + * The origin must reserve a deposit of `ParaDeposit` for the registration. + * + * ## Events + * The `Reserved` event is emitted in case of success, which provides the ID reserved for use. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * Swap a parachain with another parachain or parathread. + * + * The origin must be Root, the `para` owner, or the `para` itself. + * + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: ParaId + other: ParaId +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + * + * # + * - The weight of the `call` + 10,000. + * - One storage lookup to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId + call: Type_138 +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + * + * # + * - One storage mutation to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully + * recovered by you. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + V) + * # + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + * + * # + * Key: V (len of vouching friends) + * - One storage read/remove to get the active recovery process. O(1), Codec O(V) + * - One balance call to repatriate reserved. O(X) + * - One event. + * + * Total Complexity: O(V + X) + * # + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. + * Should be ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt + * before the account can be recovered. Should be less than or equal to + * the length of the list of friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized + * that needs to pass before the account can be recovered. + * + * # + * - Key: F (len of friends) + * - One storage read to check that account is not already recoverable. O(1). + * - A check that the friends list is sorted and unique. O(F) + * - One currency reserve operation. O(X) + * - One storage write. O(1). Codec O(F). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId[] + threshold: number + delayPeriod: BlockNumber +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account + * needs to be recoverable (i.e. have a recovery configuration). + * + * # + * - One storage read to check that account is recoverable. O(F) + * - One storage read to check that this recovery process hasn't already started. O(1) + * - One currency reserve operation. O(X) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + * + * # + * Key: F (len of friends) + * - One storage read to get the prefix iterator for active recoveries. O(1) + * - One storage read/remove to get the recovery configuration. O(1), Codec O(F) + * - One balance call to unreserved. O(X) + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + * + * # + * - One storage write O(1) + * - One event + * # + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId + rescuer: AccountId +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you + * want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One binary search to confirm caller is a friend. O(logF) + * - One binary search to confirm caller has not already vouched. O(logV) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + logF + V + logV) + * # + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId + rescuer: AccountId +} + +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: AccountId + proxyType: ProxyType + delay: BlockNumber +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: AccountId + callHash: CallHashOf +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + * TODO: Might be over counting 1 read + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: BlockNumber + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_138 +} + +/** + * Dispatch the given `call` from an account that the sender is authorized for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: AccountId + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_138 +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: AccountId + callHash: CallHashOf +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: AccountId + callHash: CallHashOf +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: AccountId + proxyType: ProxyType + delay: BlockNumber +} + +export type CallHashOf = Bytes + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +export type PhragmenElectionCall = PhragmenElectionCall_clean_defunct_voters | PhragmenElectionCall_remove_member | PhragmenElectionCall_remove_voter | PhragmenElectionCall_renounce_candidacy | PhragmenElectionCall_submit_candidacy | PhragmenElectionCall_vote + +/** + * Clean all voters who are defunct (i.e. they do not serve any purpose at all). The + * deposit of the removed voters are returned. + * + * This is an root function to be used only for cleaning the state. + * + * The dispatch origin of this call must be root. + * + * # + * The total number of voters and those that are defunct must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_clean_defunct_voters { + __kind: 'clean_defunct_voters' + numVoters: number + numDefunct: number +} + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, a new phragmen election is started. + * + * The dispatch origin of this call must be root. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement, we use a small weight. Else, since this is a root call and + * will go into phragmen, we assume full block for now. + * # + */ +export interface PhragmenElectionCall_remove_member { + __kind: 'remove_member' + who: LookupSource + hasReplacement: boolean +} + +/** + * Remove `origin` as a voter. + * + * This removes the lock and returns the deposit. + * + * The dispatch origin of this call must be signed and be a voter. + */ +export interface PhragmenElectionCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * + * - `origin` is a candidate and not elected in any set. In this case, the deposit is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the deposit is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the deposit is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_member`](Self::remove_member), if replacement runners exists, + * they are immediately used. If the prime is renouncing, then no prime will exist until + * the next round. + * + * The dispatch origin of this call must be signed, and have one of the above roles. + * + * # + * The type of renouncing must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Submit oneself for candidacy. A fixed amount of deposit is recorded. + * + * All candidates are wiped at the end of the term. They either become a member/runner-up, + * or leave the system while their deposit is slashed. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`] + * to get their deposit back. Losing the spot in an election will always lead to a slash. + * + * # + * The number of current candidates must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is + * reserved. The deposit is based on the number of votes and can be updated over time. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * If `value` is more than `who`'s total balance, then the maximum of the two is used. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * It is the responsibility of the caller to **NOT** place all of their balance into the + * lock and keep some for further operations. + * + * # + * We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less. + * # + */ +export interface PhragmenElectionCall_vote { + __kind: 'vote' + votes: AccountId[] + value: bigint +} + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +export type ParasSharedCall = never + +export type ParasCall = ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head + +/** + * Note a new block head for para within the context of the current block. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: ParaId + newHead: HeadData +} + +/** + * Put a parachain directly into the next session's action queue. + * We can't queue it any sooner than this without going into the + * initializer... + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: ParaId +} + +/** + * Schedule an upgrade as if it was scheduled in the given relay parent block. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: ParaId + newCode: ValidationCode + relayParentNumber: BlockNumber +} + +/** + * Set the storage for the parachain validation code immediately. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: ParaId + newCode: ValidationCode +} + +/** + * Set the storage for the current parachain head data immediately. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: ParaId + newHead: HeadData +} + +export type ParaInherentCall = ParaInherentCall_enter + +/** + * Enter the paras inherent. This will process bitfields and backed candidates. + */ +export interface ParaInherentCall_enter { + __kind: 'enter' + data: ParachainsInherentData +} + +export interface ParachainsInherentData { + bitfields: SignedAvailabilityBitfield[] + backedCandidates: BackedCandidate[] + disputes: DisputeStatementSet[] + parentHeader: Header +} + +export interface Header { + parentHash: Hash + number: number + stateRoot: Hash + extrinsicsRoot: Hash + digest: Digest +} + +export interface Digest { + logs: DigestItem[] +} + +export type DigestItem = DigestItem_AuthoritiesChange | DigestItem_ChangesTrieRoot | DigestItem_ChangesTrieSignal | DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal | DigestItem_SealV0 + +export interface DigestItem_AuthoritiesChange { + __kind: 'AuthoritiesChange' + value: AuthorityId[] +} + +export interface DigestItem_ChangesTrieRoot { + __kind: 'ChangesTrieRoot' + value: Hash +} + +export interface DigestItem_ChangesTrieSignal { + __kind: 'ChangesTrieSignal' + value: ChangesTrieSignal +} + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: Consensus +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: PreRuntime +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: Seal +} + +export interface DigestItem_SealV0 { + __kind: 'SealV0' + value: SealV0 +} + +export type SealV0 = [bigint, Signature] + +export type Signature = Bytes + +export type Seal = [ConsensusEngineId, Bytes] + +export type PreRuntime = [ConsensusEngineId, Bytes] + +export type Consensus = [ConsensusEngineId, Bytes] + +export type ConsensusEngineId = Bytes + +export type ChangesTrieSignal = ChangesTrieSignal_NewConfiguration + +export interface ChangesTrieSignal_NewConfiguration { + __kind: 'NewConfiguration' + value?: (ChangesTrieConfiguration | undefined) +} + +export type AuthorityId = Bytes + +export interface DisputeStatementSet { + candidateHash: CandidateHash + session: SessionIndex + statements: [DisputeStatement, ParaValidatorIndex, ValidatorSignature][] +} + +export type ValidatorSignature = Bytes + +export type ParaValidatorIndex = number + +export type DisputeStatement = DisputeStatement_Invalid | DisputeStatement_Valid + +export interface DisputeStatement_Invalid { + __kind: 'Invalid' + value: InvalidDisputeStatementKind +} + +export interface DisputeStatement_Valid { + __kind: 'Valid' + value: ValidDisputeStatementKind +} + +export type ValidDisputeStatementKind = ValidDisputeStatementKind_ApprovalChecking | ValidDisputeStatementKind_BackingSeconded | ValidDisputeStatementKind_BackingValid | ValidDisputeStatementKind_Explicit + +export interface ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: Hash +} + +export interface ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: Hash +} + +export interface ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type InvalidDisputeStatementKind = InvalidDisputeStatementKind_Explicit + +export interface InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type SessionIndex = number + +export type CandidateHash = Bytes + +export interface BackedCandidate { + candidate: CommittedCandidateReceipt + validityVotes: ValidityAttestation[] + validatorIndices: BitSequence +} + +export type ValidityAttestation = ValidityAttestation_Explicit | ValidityAttestation_Implicit | ValidityAttestation_Never + +export interface ValidityAttestation_Explicit { + __kind: 'Explicit' + value: ValidatorSignature +} + +export interface ValidityAttestation_Implicit { + __kind: 'Implicit' + value: ValidatorSignature +} + +export interface ValidityAttestation_Never { + __kind: 'Never' +} + +export interface CommittedCandidateReceipt { + descriptor: CandidateDescriptor + commitments: CandidateCommitments +} + +export interface CandidateCommitments { + upwardMessages: UpwardMessage[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: BlockNumber +} + +export interface OutboundHrmpMessage { + recipient: number + data: Bytes +} + +export type UpwardMessage = Bytes + +export interface CandidateDescriptor { + paraId: ParaId + relayParent: RelayChainHash + collatorId: CollatorId + persistedValidationDataHash: Hash + povHash: Hash + erasureRoot: Hash + signature: CollatorSignature + paraHead: Hash + validationCodeHash: ValidationCodeHash +} + +export type ValidationCodeHash = Bytes + +export type CollatorSignature = Bytes + +export type CollatorId = Bytes + +export type RelayChainHash = Bytes + +export interface SignedAvailabilityBitfield { + payload: BitSequence + validatorIndex: ParaValidatorIndex + signature: ValidatorSignature +} + +export type ParaInclusionCall = never + +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + call: OpaqueCall + storeCall: boolean + maxWeight: Weight +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId[] + call: Type_138 +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId[] + timepoint: Timepoint + callHash: Bytes +} + +export type OpaqueCall = Bytes + +export interface Timepoint { + height: BlockNumber + index: number +} + +export type InitializerCall = InitializerCall_force_approve + +/** + * Issue a signal to the consensus engine to forcibly act as though all parachain + * blocks in all relay chain blocks up to and including the given number in the current + * chain are valid and should be finalized. + */ +export interface InitializerCall_force_approve { + __kind: 'force_approve' + upTo: BlockNumber +} + +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: AccountIndex +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId + index: AccountIndex + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: AccountIndex +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: AccountIndex +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId + index: AccountIndex +} + +export type AccountIndex = number + +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) + * and E is length of `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Signature +} + +export interface Heartbeat { + blockNumber: BlockNumber + networkState: OpaqueNetworkState + sessionIndex: SessionIndex + authorityIndex: AuthIndex + validatorsLen: number +} + +export type AuthIndex = number + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: LookupSource + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: RegistrarIndex +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: LookupSource +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: LookupSource + judgement: IdentityJudgement +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: LookupSource +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: LookupSource + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: bigint +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId, Data][] +} + +export interface IdentityInfo { + additional: IdentityInfoAdditional[] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (H160 | undefined) + image: Data + twitter: Data +} + +export type IdentityInfoAdditional = [Data, Data] + +export type IdentityJudgement = IdentityJudgement_Erroneous | IdentityJudgement_FeePaid | IdentityJudgement_KnownGood | IdentityJudgement_LowQuality | IdentityJudgement_OutOfDate | IdentityJudgement_Reasonable | IdentityJudgement_Unknown + +export interface IdentityJudgement_Erroneous { + __kind: 'Erroneous' +} + +export interface IdentityJudgement_FeePaid { + __kind: 'FeePaid' + value: Balance +} + +export interface IdentityJudgement_KnownGood { + __kind: 'KnownGood' +} + +export interface IdentityJudgement_LowQuality { + __kind: 'LowQuality' +} + +export interface IdentityJudgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface IdentityJudgement_Reasonable { + __kind: 'Reasonable' +} + +export interface IdentityJudgement_Unknown { + __kind: 'Unknown' +} + +export type RegistrarIndex = number + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: H256 +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: H256 +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: H256 +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: H256 +} + +export type HrmpCall = HrmpCall_force_clean_hrmp | HrmpCall_force_process_hrmp_close | HrmpCall_force_process_hrmp_open | HrmpCall_hrmp_accept_open_channel | HrmpCall_hrmp_close_channel | HrmpCall_hrmp_init_open_channel + +/** + * This extrinsic triggers the cleanup of all the HRMP storage items that + * a para may have. Normally this happens once per session, but this allows + * you to trigger the cleanup immediately for a specific parachain. + * + * Origin must be Root. + */ +export interface HrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: ParaId +} + +/** + * Force process HRMP close channel requests. + * + * If there are pending HRMP close channel requests, you can use this + * function process all of those requests immediately. + */ +export interface HrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' +} + +/** + * Force process HRMP open channel requests. + * + * If there are pending HRMP open channel requests, you can use this + * function process all of those requests immediately. + */ +export interface HrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' +} + +/** + * Accept a pending open channel request from the given sender. + * + * The channel will be opened only on the next session boundary. + */ +export interface HrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: ParaId +} + +/** + * Initiate unilateral closing of a channel. The origin must be either the sender or the + * recipient in the channel being closed. + * + * The closure can only happen on a session change. + */ +export interface HrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * Initiate opening a channel from a parachain to a given recipient with given channel + * parameters. + * + * - `proposed_max_capacity` - specifies how many messages can be in the channel at once. + * - `proposed_max_message_size` - specifies the maximum size of any of the messages. + * + * These numbers are a subject to the relay-chain configuration limits. + * + * The channel can be opened only after the recipient confirms it and only on a session + * change. + */ +export interface HrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: ParaId + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +export interface HrmpChannelId { + sender: number + receiver: number +} + +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has + * stalled. This will trigger a forced authority set change at the beginning + * of the next session, to be enacted `delay` blocks after that. The delay + * should be high enough to safely assume that the block signalling the + * forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters + * will start the new authority set using the given finalized block as base. + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: BlockNumber + bestFinalizedBlockNumber: BlockNumber +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface KeyOwnerProof { + session: SessionIndex + trieNodes: Bytes[] + validatorCount: ValidatorCount +} + +export type ValidatorCount = number + +export interface GrandpaEquivocationProof { + setId: SetId + equivocation: GrandpaEquivocation +} + +export type GrandpaEquivocation = GrandpaEquivocation_Precommit | GrandpaEquivocation_Prevote + +export interface GrandpaEquivocation_Precommit { + __kind: 'Precommit' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocation_Prevote { + __kind: 'Prevote' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocationValue { + roundNumber: bigint + identity: AuthorityId + first: [GrandpaPrevote, AuthoritySignature] + second: [GrandpaPrevote, AuthoritySignature] +} + +export type AuthoritySignature = Bytes + +export interface GrandpaPrevote { + targetHash: Hash + targetNumber: BlockNumber +} + +export type SetId = bigint + +export type GiltCall = GiltCall_place_bid | GiltCall_retract_bid | GiltCall_set_target | GiltCall_thaw + +/** + * Place a bid for a gilt to be issued. + * + * Origin must be Signed, and account must have at least `amount` in free balance. + * + * - `amount`: The amount of the bid; these funds will be reserved. If the bid is + * successfully elevated into an issued gilt, then these funds will continue to be + * reserved until the gilt expires. Must be at least `MinFreeze`. + * - `duration`: The number of periods for which the funds will be locked if the gilt is + * issued. It will expire only after this period has elapsed after the point of issuance. + * Must be greater than 1 and no more than `QueueCount`. + * + * Complexities: + * - `Queues[duration].len()` (just take max). + */ +export interface GiltCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * Retract a previously placed bid. + * + * Origin must be Signed, and the account should have previously issued a still-active bid + * of `amount` for `duration`. + * + * - `amount`: The amount of the previous bid. + * - `duration`: The duration of the previous bid. + */ +export interface GiltCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * Set target proportion of gilt-funds. + * + * Origin must be `AdminOrigin`. + * + * - `target`: The target proportion of effective issued funds that should be under gilts + * at any one time. + */ +export interface GiltCall_set_target { + __kind: 'set_target' + target: bigint +} + +/** + * Remove an active but expired gilt. Reserved funds under gilt are freed and balance is + * adjusted to ensure that the funds grow or shrink to maintain the equivalent proportion + * of effective total issued funds. + * + * Origin must be Signed and the account must be the owner of the gilt of the given index. + * + * - `index`: The index of the gilt to be thawed. + */ +export interface GiltCall_thaw { + __kind: 'thaw' + index: number +} + +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * Set a solution in the queue, to be handed out to the client of this pallet in the next + * call to `ElectionProvider::elect`. + * + * This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`. + * + * The solution is not checked for any feasibility and is assumed to be trustworthy, as any + * feasibility check itself can in principle cause the election process to fail (due to + * memory/weight constrains). + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + supports: [AccountId, SolutionSupport][] +} + +/** + * Set a new value for `MinimumUntrustedScore`. + * + * Dispatch origin must be aligned with `T::ForceOrigin`. + * + * This check can be turned off by setting the value to `None`. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (ElectionScore | undefined) +} + +/** + * Submit a solution for the signed phase. + * + * The dispatch origin fo this call must be __signed__. + * + * The solution is potentially queued, based on the claimed score and processed at the end + * of the signed phase. + * + * A deposit is reserved and recorded for the solution. Based on the outcome, the solution + * might be rewarded, slashed, or get all or a part of the deposit back. + * + * # + * Queue size must be provided as witness data. + * # + */ +export interface ElectionProviderMultiPhaseCall_submit { + __kind: 'submit' + solution: RawSolution + numSignedSubmissions: number +} + +/** + * Submit a solution for the unsigned phase. + * + * The dispatch origin fo this call must be __none__. + * + * This submission is checked on the fly. Moreover, this unsigned solution is only + * validated when submitted to the pool from the **local** node. Effectively, this means + * that only active validators can submit this transaction when authoring a block (similar + * to an inherent). + * + * To prevent any incorrect solution (and thus wasted time/weight), this transaction will + * panic if the solution submitted by the validator is invalid in any way, effectively + * putting their authoring reward at risk. + * + * No deposit or reward is associated with this submission. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + solution: RawSolution + witness: SolutionOrSnapshotSize +} + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export interface RawSolution { + compact: CompactAssignmentsWith24 + score: ElectionScore + round: number +} + +export interface CompactAssignmentsWith24 { + votes1: [NominatorIndexCompact, ValidatorIndexCompact][] + votes2: [NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact][] + votes3: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes4: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes5: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes6: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes7: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes8: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes9: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes10: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes11: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes12: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes13: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes14: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes15: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes16: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes17: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes18: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes19: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes20: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes21: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes22: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes23: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes24: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] +} + +export type CompactScoreCompact = [ValidatorIndexCompact, OffchainAccuracyCompact] + +export type OffchainAccuracyCompact = number + +export type ValidatorIndexCompact = number + +export type NominatorIndexCompact = number + +export type ElectionScore = bigint[] + +export interface SolutionSupport { + total: ExtendedBalance + voters: [AccountId, ExtendedBalance][] +} + +export type ExtendedBalance = bigint + +export type DmpCall = never + +export type DemocracyCall = DemocracyCall_blacklist | DemocracyCall_cancel_proposal | DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. + * + * If called on a queued public or external proposal, then this will result in it being + * removed. If the `ref_index` supplied is an active referendum with the proposal hash, + * then it will be cancelled. + * + * The dispatch origin of this call must be `BlacklistOrigin`. + * + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. + * + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). + */ +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: Hash + maybeRefIndex?: (ReferendumIndex | undefined) +} + +/** + * Remove a proposal. + * + * The dispatch origin of this call must be `CancelProposalOrigin`. + * + * - `prop_index`: The index of the proposal to cancel. + * + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number +} + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: ReferendumIndex +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must + * not be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId + conviction: Conviction + balance: BalanceOf +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: ReferendumIndex +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: Hash + index: ReferendumIndex +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Weight: `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: Hash +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: Hash +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: Hash +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * `FastTrackVotingPeriod` if too low. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: Hash + votingPeriod: BlockNumber + delay: BlockNumber +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. When this call is successful, i.e. + * the preimage has not been uploaded before and matches some imminent proposal, + * no fee is paid. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * Weight: `O(p)` + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: Hash + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. + * Extrinsic is weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * Weight: `O(D)` where D is length of proposal. + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: Hash + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId + index: ReferendumIndex +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: ReferendumIndex +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * Weight: `O(S)` where S is the number of seconds a proposal already has. + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * Weight: `O(V + log(V))` where V is number of `existing vetoers` + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: Hash +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of referendums the voter has voted on. + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + value: AccountVoteSplit +} + +export interface AccountVote_Standard { + __kind: 'Standard' + value: AccountVoteStandard +} + +export interface AccountVoteStandard { + vote: Vote + balance: Balance +} + +export type Vote = number + +export interface AccountVoteSplit { + aye: Balance + nay: Balance +} + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +export type ReferendumIndex = number + +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * Add an optional memo to an existing crowdloan contribution. + * + * Origin must be Signed, and the user must have contributed to the crowdloan. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: ParaId + memo: Bytes +} + +/** + * Contribute to a crowd sale. This will transfer some balance over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * Create a new crowdloaning campaign for a parachain slot with the given lease period range. + * + * This applies a lock to your parachain configuration, ensuring that it cannot be changed + * by the parachain manager. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Remove a fund after the retirement period has ended and all funds have been returned. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * Edit the configuration for an in-progress crowdloan. + * + * Can only be called by Root origin. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Poke the fund into `NewRaise` + * + * Origin must be Signed, and the fund has non-zero raise. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: ParaId +} + +/** + * Automatically refund contributors of an ended crowdloan. + * Due to weight restrictions, this function may need to be called multiple + * times to fully refund all users. We will refund `RemoveKeysLimit` users at a time. + * + * Origin must be signed, but can come from anyone. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * Withdraw full balance of a specific contributor. + * + * Origin must be signed, but can come from anyone. + * + * The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement + * flag must be set. For a fund to be ready for retirement, then: + * - it must not already be in retirement; + * - the amount of raised funds must be bigger than the _free_ balance of the account; + * - and either: + * - the block number must be at least `end`; or + * - the current lease period must be greater than the fund's `last_period`. + * + * In this case, the fund's retirement flag is set and its `end` is reset to the current block + * number. + * + * - `who`: The account whose contribution should be withdrawn. + * - `index`: The parachain to whose crowdloan the contribution was made. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId + index: number +} + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: EcdsaSignature +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Ed25519Signature +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Sr25519Signature +} + +export type Sr25519Signature = Bytes + +export type Ed25519Signature = Bytes + +export type EcdsaSignature = Bytes + +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export type MemberCount = number + +export type ConfigurationCall = ConfigurationCall_set_chain_availability_period | ConfigurationCall_set_code_retention_period | ConfigurationCall_set_dispute_conclusion_by_time_out_period | ConfigurationCall_set_dispute_max_spam_slots | ConfigurationCall_set_dispute_period | ConfigurationCall_set_dispute_post_conclusion_acceptance_period | ConfigurationCall_set_group_rotation_frequency | ConfigurationCall_set_hrmp_channel_max_capacity | ConfigurationCall_set_hrmp_channel_max_message_size | ConfigurationCall_set_hrmp_channel_max_total_size | ConfigurationCall_set_hrmp_max_message_num_per_candidate | ConfigurationCall_set_hrmp_max_parachain_inbound_channels | ConfigurationCall_set_hrmp_max_parachain_outbound_channels | ConfigurationCall_set_hrmp_max_parathread_inbound_channels | ConfigurationCall_set_hrmp_max_parathread_outbound_channels | ConfigurationCall_set_hrmp_open_request_ttl | ConfigurationCall_set_hrmp_recipient_deposit | ConfigurationCall_set_hrmp_sender_deposit | ConfigurationCall_set_max_code_size | ConfigurationCall_set_max_downward_message_size | ConfigurationCall_set_max_head_data_size | ConfigurationCall_set_max_pov_size | ConfigurationCall_set_max_upward_message_num_per_candidate | ConfigurationCall_set_max_upward_message_size | ConfigurationCall_set_max_upward_queue_count | ConfigurationCall_set_max_upward_queue_size | ConfigurationCall_set_max_validators | ConfigurationCall_set_max_validators_per_core | ConfigurationCall_set_n_delay_tranches | ConfigurationCall_set_needed_approvals | ConfigurationCall_set_no_show_slots | ConfigurationCall_set_parathread_cores | ConfigurationCall_set_parathread_retries | ConfigurationCall_set_relay_vrf_modulo_samples | ConfigurationCall_set_scheduling_lookahead | ConfigurationCall_set_thread_availability_period | ConfigurationCall_set_ump_service_total_weight | ConfigurationCall_set_validation_upgrade_delay | ConfigurationCall_set_validation_upgrade_frequency | ConfigurationCall_set_zeroth_delay_tranche_width + +/** + * Set the availability period for parachains. + */ +export interface ConfigurationCall_set_chain_availability_period { + __kind: 'set_chain_availability_period' + new: BlockNumber +} + +/** + * Set the acceptance period for an included candidate. + */ +export interface ConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: BlockNumber +} + +/** + * Set the dispute conclusion by time out period. + */ +export interface ConfigurationCall_set_dispute_conclusion_by_time_out_period { + __kind: 'set_dispute_conclusion_by_time_out_period' + new: BlockNumber +} + +/** + * Set the maximum number of dispute spam slots. + */ +export interface ConfigurationCall_set_dispute_max_spam_slots { + __kind: 'set_dispute_max_spam_slots' + new: number +} + +/** + * Set the dispute period, in number of sessions to keep for disputes. + */ +export interface ConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: SessionIndex +} + +/** + * Set the dispute post conclusion acceptance period. + */ +export interface ConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: BlockNumber +} + +/** + * Set the parachain validator-group rotation frequency + */ +export interface ConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: BlockNumber +} + +/** + * Sets the maximum number of messages allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * Sets the maximum size of a message that could ever be put into an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * Sets the maximum total size of messages in bytes allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * Sets the maximum number of outbound HRMP messages can be sent by a candidate. + */ +export interface ConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parachain is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parachain is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parathread is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_inbound_channels { + __kind: 'set_hrmp_max_parathread_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parathread is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_outbound_channels { + __kind: 'set_hrmp_max_parathread_outbound_channels' + new: number +} + +/** + * Sets the number of sessions after which an HRMP open channel request expires. + */ +export interface ConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * Sets the amount of funds that the recipient should provide for accepting opening an HRMP + * channel. + */ +export interface ConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: Balance +} + +/** + * Sets the amount of funds that the sender should provide for opening an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: Balance +} + +/** + * Set the max validation code size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * Set the critical downward message size. + */ +export interface ConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * Set the max head data size for paras. + */ +export interface ConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * Set the max POV block size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * Sets the maximum number of messages that a candidate can contain. + */ +export interface ConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum size of an upward message that can be sent by a candidate. + */ +export interface ConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * Sets the maximum items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * Sets the maximum total size of items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * Set the maximum number of validators to use in parachain consensus. + */ +export interface ConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * Set the maximum number of validators to assign to any core. + */ +export interface ConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * Set the total number of delay tranches. + */ +export interface ConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * Set the number of validators needed to approve a block. + */ +export interface ConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * Set the no show slots, in number of number of consensus slots. + * Must be at least 1. + */ +export interface ConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * Set the number of parathread execution cores. + */ +export interface ConfigurationCall_set_parathread_cores { + __kind: 'set_parathread_cores' + new: number +} + +/** + * Set the number of retries for a particular parathread. + */ +export interface ConfigurationCall_set_parathread_retries { + __kind: 'set_parathread_retries' + new: number +} + +/** + * Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion. + */ +export interface ConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * Set the scheduling lookahead, in expected number of blocks at peak throughput. + */ +export interface ConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * Set the availability period for parathreads. + */ +export interface ConfigurationCall_set_thread_availability_period { + __kind: 'set_thread_availability_period' + new: BlockNumber +} + +/** + * Sets the soft limit for the phase of dispatching dispatchable upward messages. + */ +export interface ConfigurationCall_set_ump_service_total_weight { + __kind: 'set_ump_service_total_weight' + new: Weight +} + +/** + * Set the validation upgrade delay. + */ +export interface ConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: BlockNumber +} + +/** + * Set the validation upgrade frequency. + */ +export interface ConfigurationCall_set_validation_upgrade_frequency { + __kind: 'set_validation_upgrade_frequency' + new: BlockNumber +} + +/** + * Set the zeroth delay tranche width. + */ +export interface ConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: BalanceOf + vestingSchedule?: ([BalanceOf, BalanceOf, BlockNumber] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId | undefined) +} + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export type EthereumAddress = Bytes + +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: LookupSource +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: LookupSource + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is malicious + * or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_all | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is + * not assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: LookupSource + dest: LookupSource + value: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also decrease the total issuance of the system (`TotalIssuance`). + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + * + * # + * - Independent of the arguments. + * - Contains a limited number of reads and writes. + * --------------------- + * - Base Weight: + * - Creating: 27.56 µs + * - Killing: 35.11 µs + * - DB Weight: 1 Read, 1 Write to `who` + * # + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: LookupSource + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * It will decrease the total issuance of the system by the `TransferFee`. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for + * input config types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional + * check that the transfer will not kill the origin account. + * --------------------------------- + * - Base Weight: 73.64 µs, worst case scenario (account created, account removed) + * - DB Weight: 1 Read and 1 Write to destination account + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: LookupSource + value: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). + * # + * - O(1). Just like transfer, but reading the user's transferable balance first. + * # + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: LookupSource + keepAlive: boolean +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + * # + * - Cheaper than transfer because account cannot be killed. + * - Base Weight: 51.4 µs + * - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already) + * # + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: LookupSource + value: bigint +} + +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Plan an epoch config change. The epoch config change is recorded and will be enacted on + * the next call to `enact_epoch_change`. The config will be activated one epoch after. + * Multiple calls to this method will replace any existing planned config change that had + * not been enacted yet. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface BabeEquivocationProof { + offender: AuthorityId + slotNumber: SlotNumber + firstHeader: Header + secondHeader: Header +} + +export type SlotNumber = bigint + +export type NextConfigDescriptor = NextConfigDescriptor_V0 | NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V0 { + __kind: 'V0' +} + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + value: NextConfigDescriptorV1 +} + +export interface NextConfigDescriptorV1 { + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Cancel an in-progress auction. + * + * Can only be called by Root origin. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: Key, + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => Key), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_changes_trie_config: sts.enumStruct({ + changesTrieConfig: sts.option(() => ChangesTrieConfiguration), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => KeyValue), + }), + } +}) + +export const KeyValue = sts.tuple(() => [StorageKey, StorageData]) + +export const StorageData = sts.bytes() + +export const StorageKey = sts.bytes() + +export const ChangesTrieConfiguration: sts.Type = sts.struct(() => { + return { + digestInterval: sts.number(), + digestLevels: sts.number(), + } +}) + +export const Key = sts.bytes() + +export const Perbill = sts.number() + +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: LookupSource, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: EraIndex, + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + controller: AccountId, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => LookupSource), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => LookupSource), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId, + era: EraIndex, + }), + reap_stash: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: LookupSource, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_staking_limits: sts.enumStruct({ + minNominatorBond: BalanceOf, + minValidatorBond: BalanceOf, + maxNominatorCount: sts.option(() => sts.number()), + maxValidatorCount: sts.option(() => sts.number()), + threshold: sts.option(() => Percent), + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export const BalanceOf = sts.bigint() + +export const Percent = sts.number() + +export const EraIndex = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: BalanceOf, + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId, + judgement: SocietyJudgement, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: LookupSource, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId, + value: BalanceOf, + tip: BalanceOf, + }), + } +}) + +export const SocietyJudgement: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: ParaId, + }), + force_lease: sts.enumStruct({ + para: ParaId, + leaser: AccountId, + amount: BalanceOf, + periodBegin: LeasePeriodOf, + periodCount: LeasePeriodOf, + }), + trigger_onboard: sts.enumStruct({ + para: ParaId, + }), + } +}) + +export const LeasePeriodOf = sts.number() + +export const ParaId = sts.number() + +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: Keys, + proof: sts.bytes(), + }), + } +}) + +export const Keys = sts.tuple(() => [AccountId, AccountId, AccountId, AccountId, AccountId, AccountId]) + +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: BlockNumber, + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_138, + }), + schedule_after: sts.enumStruct({ + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_138, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_138, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_138, + }), + } +}) + +export const Priority = sts.number() + +export const Period = sts.tuple(() => [BlockNumber, sts.number()]) + +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + deregister: sts.enumStruct({ + id: ParaId, + }), + force_register: sts.enumStruct({ + who: AccountId, + deposit: BalanceOf, + id: ParaId, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + force_remove_lock: sts.enumStruct({ + para: ParaId, + }), + register: sts.enumStruct({ + id: ParaId, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + reserve: sts.unit(), + swap: sts.enumStruct({ + id: ParaId, + other: ParaId, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId, + call: Type_138, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId, + }), + claim_recovery: sts.enumStruct({ + account: AccountId, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId), + threshold: sts.number(), + delayPeriod: BlockNumber, + }), + initiate_recovery: sts.enumStruct({ + account: AccountId, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + } +}) + +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: AccountId, + proxyType: ProxyType, + delay: BlockNumber, + }), + announce: sts.enumStruct({ + real: AccountId, + callHash: CallHashOf, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + delay: BlockNumber, + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_138, + }), + proxy_announced: sts.enumStruct({ + delegate: AccountId, + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_138, + }), + reject_announcement: sts.enumStruct({ + delegate: AccountId, + callHash: CallHashOf, + }), + remove_announcement: sts.enumStruct({ + real: AccountId, + callHash: CallHashOf, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: AccountId, + proxyType: ProxyType, + delay: BlockNumber, + }), + } +}) + +export const CallHashOf = sts.bytes() + +export const PhragmenElectionCall: sts.Type = sts.closedEnum(() => { + return { + clean_defunct_voters: sts.enumStruct({ + numVoters: sts.number(), + numDefunct: sts.number(), + }), + remove_member: sts.enumStruct({ + who: LookupSource, + hasReplacement: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId), + value: sts.bigint(), + }), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + force_note_new_head: sts.enumStruct({ + para: ParaId, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: ParaId, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: ParaId, + newCode: ValidationCode, + relayParentNumber: BlockNumber, + }), + force_set_current_code: sts.enumStruct({ + para: ParaId, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: ParaId, + newHead: HeadData, + }), + } +}) + +export const ParaInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: ParachainsInherentData, + }), + } +}) + +export const ParachainsInherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => SignedAvailabilityBitfield), + backedCandidates: sts.array(() => BackedCandidate), + disputes: sts.array(() => DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: Hash, + number: sts.number(), + stateRoot: Hash, + extrinsicsRoot: Hash, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + AuthoritiesChange: sts.array(() => AuthorityId), + ChangesTrieRoot: Hash, + ChangesTrieSignal: ChangesTrieSignal, + Consensus: Consensus, + Other: sts.bytes(), + PreRuntime: PreRuntime, + RuntimeEnvironmentUpdated: sts.unit(), + Seal: Seal, + SealV0: SealV0, + } +}) + +export const SealV0 = sts.tuple(() => [sts.bigint(), Signature]) + +export const Signature = sts.bytes() + +export const Seal = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const PreRuntime = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const Consensus = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const ConsensusEngineId = sts.bytes() + +export const ChangesTrieSignal: sts.Type = sts.closedEnum(() => { + return { + NewConfiguration: sts.option(() => ChangesTrieConfiguration), + } +}) + +export const AuthorityId = sts.bytes() + +export const DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: SessionIndex, + statements: sts.array(() => sts.tuple(() => [DisputeStatement, ParaValidatorIndex, ValidatorSignature])), + } +}) + +export const ValidatorSignature = sts.bytes() + +export const ParaValidatorIndex = sts.number() + +export const DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: InvalidDisputeStatementKind, + Valid: ValidDisputeStatementKind, + } +}) + +export const ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + BackingSeconded: Hash, + BackingValid: Hash, + Explicit: sts.unit(), + } +}) + +export const InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export const SessionIndex = sts.number() + +export const CandidateHash = sts.bytes() + +export const BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: CommittedCandidateReceipt, + validityVotes: sts.array(() => ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: ValidatorSignature, + Implicit: ValidatorSignature, + Never: sts.unit(), + } +}) + +export const CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: CandidateDescriptor, + commitments: CandidateCommitments, + } +}) + +export const CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => UpwardMessage), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: BlockNumber, + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: sts.number(), + data: sts.bytes(), + } +}) + +export const UpwardMessage = sts.bytes() + +export const CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: ParaId, + relayParent: RelayChainHash, + collatorId: CollatorId, + persistedValidationDataHash: Hash, + povHash: Hash, + erasureRoot: Hash, + signature: CollatorSignature, + paraHead: Hash, + validationCodeHash: ValidationCodeHash, + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const CollatorSignature = sts.bytes() + +export const CollatorId = sts.bytes() + +export const RelayChainHash = sts.bytes() + +export const SignedAvailabilityBitfield: sts.Type = sts.struct(() => { + return { + payload: sts.bitseq(), + validatorIndex: ParaValidatorIndex, + signature: ValidatorSignature, + } +}) + +export const ParaInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + call: OpaqueCall, + storeCall: sts.boolean(), + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId), + call: Type_138, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const OpaqueCall = sts.bytes() + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: BlockNumber, + index: sts.number(), + } +}) + +export const InitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: BlockNumber, + }), + } +}) + +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: AccountIndex, + }), + force_transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: AccountIndex, + }), + freeze: sts.enumStruct({ + index: AccountIndex, + }), + transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + }), + } +}) + +export const AccountIndex = sts.number() + +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: Signature, + }), + } +}) + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: BlockNumber, + networkState: OpaqueNetworkState, + sessionIndex: SessionIndex, + authorityIndex: AuthIndex, + validatorsLen: sts.number(), + } +}) + +export const AuthIndex = sts.number() + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId, + }), + add_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: RegistrarIndex, + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: LookupSource, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: LookupSource, + judgement: IdentityJudgement, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: LookupSource, + }), + rename_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: sts.bigint(), + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => IdentityInfoAdditional), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => H160), + image: Data, + twitter: Data, + } +}) + +export const IdentityInfoAdditional = sts.tuple(() => [Data, Data]) + +export const IdentityJudgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: Balance, + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export const RegistrarIndex = sts.number() + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: H256, + Keccak256: H256, + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: H256, + ShaThree256: H256, + } +}) + +export const HrmpCall: sts.Type = sts.closedEnum(() => { + return { + force_clean_hrmp: sts.enumStruct({ + para: ParaId, + }), + force_process_hrmp_close: sts.unit(), + force_process_hrmp_open: sts.unit(), + hrmp_accept_open_channel: sts.enumStruct({ + sender: ParaId, + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: ParaId, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: sts.number(), + receiver: sts.number(), + } +}) + +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: BlockNumber, + bestFinalizedBlockNumber: BlockNumber, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const KeyOwnerProof: sts.Type = sts.struct(() => { + return { + session: SessionIndex, + trieNodes: sts.array(() => sts.bytes()), + validatorCount: ValidatorCount, + } +}) + +export const ValidatorCount = sts.number() + +export const GrandpaEquivocationProof: sts.Type = sts.struct(() => { + return { + setId: SetId, + equivocation: GrandpaEquivocation, + } +}) + +export const GrandpaEquivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: GrandpaEquivocationValue, + Prevote: GrandpaEquivocationValue, + } +}) + +export const GrandpaEquivocationValue: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: AuthorityId, + first: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + second: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + } +}) + +export const AuthoritySignature = sts.bytes() + +export const GrandpaPrevote: sts.Type = sts.struct(() => { + return { + targetHash: Hash, + targetNumber: BlockNumber, + } +}) + +export const SetId = sts.bigint() + +export const GiltCall: sts.Type = sts.closedEnum(() => { + return { + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + set_target: sts.enumStruct({ + target: sts.bigint(), + }), + thaw: sts.enumStruct({ + index: sts.number(), + }), + } +}) + +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + set_emergency_election_result: sts.enumStruct({ + supports: sts.array(() => sts.tuple(() => [AccountId, SolutionSupport])), + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => ElectionScore), + }), + submit: sts.enumStruct({ + solution: RawSolution, + numSignedSubmissions: sts.number(), + }), + submit_unsigned: sts.enumStruct({ + solution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export const RawSolution: sts.Type = sts.struct(() => { + return { + compact: CompactAssignmentsWith24, + score: ElectionScore, + round: sts.number(), + } +}) + +export const CompactAssignmentsWith24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [NominatorIndexCompact, ValidatorIndexCompact])), + votes2: sts.array(() => sts.tuple(() => [NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact])), + votes3: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes4: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes5: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes6: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes7: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes8: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes9: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes10: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes11: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes12: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes13: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes14: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes15: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes16: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes17: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes18: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes19: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes20: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes21: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes22: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes23: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes24: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + } +}) + +export const CompactScoreCompact = sts.tuple(() => [ValidatorIndexCompact, OffchainAccuracyCompact]) + +export const OffchainAccuracyCompact = sts.number() + +export const ValidatorIndexCompact = sts.number() + +export const NominatorIndexCompact = sts.number() + +export const ElectionScore = sts.array(() => sts.bigint()) + +export const SolutionSupport: sts.Type = sts.struct(() => { + return { + total: ExtendedBalance, + voters: sts.array(() => sts.tuple(() => [AccountId, ExtendedBalance])), + } +}) + +export const ExtendedBalance = sts.bigint() + +export const DmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + blacklist: sts.enumStruct({ + proposalHash: Hash, + maybeRefIndex: sts.option(() => ReferendumIndex), + }), + cancel_proposal: sts.enumStruct({ + propIndex: sts.number(), + }), + cancel_queued: sts.enumStruct({ + which: ReferendumIndex, + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId, + conviction: Conviction, + balance: BalanceOf, + }), + emergency_cancel: sts.enumStruct({ + refIndex: ReferendumIndex, + }), + enact_proposal: sts.enumStruct({ + proposalHash: Hash, + index: ReferendumIndex, + }), + external_propose: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_default: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: Hash, + }), + fast_track: sts.enumStruct({ + proposalHash: Hash, + votingPeriod: BlockNumber, + delay: BlockNumber, + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: Hash, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: Hash, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId, + index: ReferendumIndex, + }), + remove_vote: sts.enumStruct({ + index: ReferendumIndex, + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId, + }), + veto_external: sts.enumStruct({ + proposalHash: Hash, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: AccountVoteSplit, + Standard: AccountVoteStandard, + } +}) + +export const AccountVoteStandard: sts.Type = sts.struct(() => { + return { + vote: Vote, + balance: Balance, + } +}) + +export const Vote = sts.number() + +export const AccountVoteSplit: sts.Type = sts.struct(() => { + return { + aye: Balance, + nay: Balance, + } +}) + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export const ReferendumIndex = sts.number() + +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: ParaId, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: ParaId, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: EcdsaSignature, + Ed25519: Ed25519Signature, + Sr25519: Sr25519Signature, + } +}) + +export const Sr25519Signature = sts.bytes() + +export const Ed25519Signature = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const ConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_chain_availability_period: sts.enumStruct({ + new: BlockNumber, + }), + set_code_retention_period: sts.enumStruct({ + new: BlockNumber, + }), + set_dispute_conclusion_by_time_out_period: sts.enumStruct({ + new: BlockNumber, + }), + set_dispute_max_spam_slots: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: SessionIndex, + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: BlockNumber, + }), + set_group_rotation_frequency: sts.enumStruct({ + new: BlockNumber, + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: Balance, + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: Balance, + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_cores: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_retries: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_thread_availability_period: sts.enumStruct({ + new: BlockNumber, + }), + set_ump_service_total_weight: sts.enumStruct({ + new: Weight, + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: BlockNumber, + }), + set_validation_upgrade_frequency: sts.enumStruct({ + new: BlockNumber, + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: BalanceOf, + vestingSchedule: sts.option(() => sts.tuple(() => [BalanceOf, BalanceOf, BlockNumber])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export const EthereumAddress = sts.bytes() + +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: LookupSource, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: LookupSource, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: LookupSource, + dest: LookupSource, + value: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: LookupSource, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: LookupSource, + keepAlive: sts.boolean(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + } +}) + +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const BabeEquivocationProof: sts.Type = sts.struct(() => { + return { + offender: AuthorityId, + slotNumber: SlotNumber, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const SlotNumber = sts.bigint() + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V0: sts.unit(), + V1: NextConfigDescriptorV1, + } +}) + +export const NextConfigDescriptorV1: sts.Type = sts.struct(() => { + return { + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +export type Type_138 = Type_138_Auctions | Type_138_Authorship | Type_138_Babe | Type_138_Balances | Type_138_Bounties | Type_138_Claims | Type_138_Configuration | Type_138_Council | Type_138_Crowdloan | Type_138_Democracy | Type_138_Dmp | Type_138_ElectionProviderMultiPhase | Type_138_Gilt | Type_138_Grandpa | Type_138_Hrmp | Type_138_Identity | Type_138_ImOnline | Type_138_Indices | Type_138_Initializer | Type_138_Multisig | Type_138_ParaInclusion | Type_138_ParaInherent | Type_138_Paras | Type_138_ParasShared | Type_138_PhragmenElection | Type_138_Proxy | Type_138_Recovery | Type_138_Registrar | Type_138_Scheduler | Type_138_Session | Type_138_Slots | Type_138_Society | Type_138_Staking | Type_138_System | Type_138_TechnicalCommittee | Type_138_TechnicalMembership | Type_138_Timestamp | Type_138_Tips | Type_138_Treasury | Type_138_Ump | Type_138_Utility | Type_138_Vesting | Type_138_XcmPallet + +export interface Type_138_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Type_138_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Type_138_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Type_138_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Type_138_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Type_138_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Type_138_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Type_138_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Type_138_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Type_138_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Type_138_Dmp { + __kind: 'Dmp' + value: DmpCall +} + +export interface Type_138_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Type_138_Gilt { + __kind: 'Gilt' + value: GiltCall +} + +export interface Type_138_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Type_138_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Type_138_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Type_138_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Type_138_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Type_138_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Type_138_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Type_138_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Type_138_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Type_138_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Type_138_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Type_138_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Type_138_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Type_138_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Type_138_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Type_138_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Type_138_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Type_138_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Type_138_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Type_138_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Type_138_System { + __kind: 'System' + value: SystemCall +} + +export interface Type_138_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Type_138_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Type_138_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Type_138_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Type_138_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Type_138_Ump { + __kind: 'Ump' + value: UmpCall +} + +export interface Type_138_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Type_138_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Type_138_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId = sts.bytes() diff --git a/squid/src/types/v9100.ts b/squid/src/types/v9100.ts new file mode 100644 index 00000000..75e13d8c --- /dev/null +++ b/squid/src/types/v9100.ts @@ -0,0 +1,10463 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Type_138: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + Dmp: DmpCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + Gilt: GiltCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Initializer: InitializerCall, + Multisig: MultisigCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Paras: ParasCall, + ParasShared: ParasSharedCall, + PhragmenElection: PhragmenElectionCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Ump: UmpCall, + Utility: UtilityCall, + Vesting: VestingCall, + XcmPallet: XcmPalletCall, + } +}) + +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + execute: sts.enumStruct({ + message: VersionedXcm, + maxWeight: Weight, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + destWeight: Weight, + }), + send: sts.enumStruct({ + dest: VersionedMultiLocation, + message: VersionedXcm, + }), + teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + destWeight: Weight, + }), + } +}) + +export const VersionedMultiAssets: sts.Type = sts.closedEnum(() => { + return { + V0: sts.array(() => MultiAssetV0), + V1: sts.array(() => MultiAssetV1), + V2: sts.array(() => MultiAssetV1), + } +}) + +export const MultiAssetV1: sts.Type = sts.struct(() => { + return { + id: XcmAssetId, + fungibility: FungibilityV1, + } +}) + +export const FungibilityV1: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: AssetInstanceV1, + } +}) + +export const AssetInstanceV1: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type AssetInstanceV1 = AssetInstanceV1_Array16 | AssetInstanceV1_Array32 | AssetInstanceV1_Array4 | AssetInstanceV1_Array8 | AssetInstanceV1_Blob | AssetInstanceV1_Index | AssetInstanceV1_Undefined + +export interface AssetInstanceV1_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface AssetInstanceV1_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface AssetInstanceV1_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface AssetInstanceV1_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface AssetInstanceV1_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface AssetInstanceV1_Index { + __kind: 'Index' + value: bigint +} + +export interface AssetInstanceV1_Undefined { + __kind: 'Undefined' +} + +export type FungibilityV1 = FungibilityV1_Fungible | FungibilityV1_NonFungible + +export interface FungibilityV1_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface FungibilityV1_NonFungible { + __kind: 'NonFungible' + value: AssetInstanceV1 +} + +export const XcmAssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: MultiLocation, + } +}) + +export const MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: JunctionsV1, + } +}) + +export const JunctionsV1: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: JunctionV1, + X2: sts.tuple(() => [JunctionV1, JunctionV1]), + X3: sts.tuple(() => [JunctionV1, JunctionV1, JunctionV1]), + X4: sts.tuple(() => [JunctionV1, JunctionV1, JunctionV1, JunctionV1]), + X5: sts.tuple(() => [JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1]), + X6: sts.tuple(() => [JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1]), + X7: sts.tuple(() => [JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1]), + X8: sts.tuple(() => [JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1]), + } +}) + +export const JunctionV1: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: NetworkId, + id: AccountId, + }), + AccountIndex64: sts.enumStruct({ + network: NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.bytes(), + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: BodyId, + part: BodyPart, + }), + } +}) + +export const BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.number(), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export type BodyPart = BodyPart_AtLeastProportion | BodyPart_Fraction | BodyPart_Members | BodyPart_MoreThanProportion | BodyPart_Voice + +export interface BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface BodyPart_Members { + __kind: 'Members' + value: number +} + +export interface BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface BodyPart_Voice { + __kind: 'Voice' +} + +export const BodyId: sts.Type = sts.closedEnum(() => { + return { + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: sts.bytes(), + Technical: sts.unit(), + Unit: sts.unit(), + } +}) + +export type BodyId = BodyId_Executive | BodyId_Index | BodyId_Judicial | BodyId_Legislative | BodyId_Named | BodyId_Technical | BodyId_Unit + +export interface BodyId_Executive { + __kind: 'Executive' +} + +export interface BodyId_Index { + __kind: 'Index' + value: number +} + +export interface BodyId_Judicial { + __kind: 'Judicial' +} + +export interface BodyId_Legislative { + __kind: 'Legislative' +} + +export interface BodyId_Named { + __kind: 'Named' + value: Bytes +} + +export interface BodyId_Technical { + __kind: 'Technical' +} + +export interface BodyId_Unit { + __kind: 'Unit' +} + +export const NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: sts.bytes(), + Polkadot: sts.unit(), + } +}) + +export type NetworkId = NetworkId_Any | NetworkId_Kusama | NetworkId_Named | NetworkId_Polkadot + +export interface NetworkId_Any { + __kind: 'Any' +} + +export interface NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface NetworkId_Named { + __kind: 'Named' + value: Bytes +} + +export interface NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export type JunctionV1 = JunctionV1_AccountId32 | JunctionV1_AccountIndex64 | JunctionV1_AccountKey20 | JunctionV1_GeneralIndex | JunctionV1_GeneralKey | JunctionV1_OnlyChild | JunctionV1_PalletInstance | JunctionV1_Parachain | JunctionV1_Plurality + +export interface JunctionV1_AccountId32 { + __kind: 'AccountId32' + network: NetworkId + id: AccountId +} + +export interface JunctionV1_AccountIndex64 { + __kind: 'AccountIndex64' + network: NetworkId + index: bigint +} + +export interface JunctionV1_AccountKey20 { + __kind: 'AccountKey20' + network: NetworkId + key: Bytes +} + +export interface JunctionV1_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface JunctionV1_GeneralKey { + __kind: 'GeneralKey' + value: Bytes +} + +export interface JunctionV1_OnlyChild { + __kind: 'OnlyChild' +} + +export interface JunctionV1_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface JunctionV1_Parachain { + __kind: 'Parachain' + value: number +} + +export interface JunctionV1_Plurality { + __kind: 'Plurality' + id: BodyId + part: BodyPart +} + +export type AccountId = Bytes + +export type JunctionsV1 = JunctionsV1_Here | JunctionsV1_X1 | JunctionsV1_X2 | JunctionsV1_X3 | JunctionsV1_X4 | JunctionsV1_X5 | JunctionsV1_X6 | JunctionsV1_X7 | JunctionsV1_X8 + +export interface JunctionsV1_Here { + __kind: 'Here' +} + +export interface JunctionsV1_X1 { + __kind: 'X1' + value: JunctionV1 +} + +export interface JunctionsV1_X2 { + __kind: 'X2' + value: [JunctionV1, JunctionV1] +} + +export interface JunctionsV1_X3 { + __kind: 'X3' + value: [JunctionV1, JunctionV1, JunctionV1] +} + +export interface JunctionsV1_X4 { + __kind: 'X4' + value: [JunctionV1, JunctionV1, JunctionV1, JunctionV1] +} + +export interface JunctionsV1_X5 { + __kind: 'X5' + value: [JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1] +} + +export interface JunctionsV1_X6 { + __kind: 'X6' + value: [JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1] +} + +export interface JunctionsV1_X7 { + __kind: 'X7' + value: [JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1] +} + +export interface JunctionsV1_X8 { + __kind: 'X8' + value: [JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1] +} + +export interface MultiLocation { + parents: number + interior: JunctionsV1 +} + +export type XcmAssetId = XcmAssetId_Abstract | XcmAssetId_Concrete + +export interface XcmAssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface XcmAssetId_Concrete { + __kind: 'Concrete' + value: MultiLocation +} + +export interface MultiAssetV1 { + id: XcmAssetId + fungibility: FungibilityV1 +} + +export const MultiAssetV0: sts.Type = sts.closedEnum(() => { + return { + AbstractFungible: sts.enumStruct({ + id: sts.bytes(), + instance: sts.bigint(), + }), + AbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + instance: AssetInstanceV0, + }), + All: sts.unit(), + AllAbstractFungible: sts.bytes(), + AllAbstractNonFungible: sts.bytes(), + AllConcreteFungible: MultiLocationV0, + AllConcreteNonFungible: MultiLocationV0, + AllFungible: sts.unit(), + AllNonFungible: sts.unit(), + ConcreteFungible: sts.enumStruct({ + id: MultiLocationV0, + amount: sts.bigint(), + }), + ConcreteNonFungible: sts.enumStruct({ + class: MultiLocationV0, + instance: AssetInstanceV0, + }), + None: sts.unit(), + } +}) + +export const MultiLocationV0: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: JunctionV0, + X2: sts.tuple(() => [JunctionV0, JunctionV0]), + X3: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0]), + X4: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X5: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X6: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X7: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + X8: sts.tuple(() => [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]), + } +}) + +export const JunctionV0: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: NetworkId, + id: AccountId, + }), + AccountIndex64: sts.enumStruct({ + network: NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.bytes(), + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Parent: sts.unit(), + Plurality: sts.enumStruct({ + id: BodyId, + part: BodyPart, + }), + } +}) + +export type JunctionV0 = JunctionV0_AccountId32 | JunctionV0_AccountIndex64 | JunctionV0_AccountKey20 | JunctionV0_GeneralIndex | JunctionV0_GeneralKey | JunctionV0_OnlyChild | JunctionV0_PalletInstance | JunctionV0_Parachain | JunctionV0_Parent | JunctionV0_Plurality + +export interface JunctionV0_AccountId32 { + __kind: 'AccountId32' + network: NetworkId + id: AccountId +} + +export interface JunctionV0_AccountIndex64 { + __kind: 'AccountIndex64' + network: NetworkId + index: bigint +} + +export interface JunctionV0_AccountKey20 { + __kind: 'AccountKey20' + network: NetworkId + key: Bytes +} + +export interface JunctionV0_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface JunctionV0_GeneralKey { + __kind: 'GeneralKey' + value: Bytes +} + +export interface JunctionV0_OnlyChild { + __kind: 'OnlyChild' +} + +export interface JunctionV0_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface JunctionV0_Parachain { + __kind: 'Parachain' + value: number +} + +export interface JunctionV0_Parent { + __kind: 'Parent' +} + +export interface JunctionV0_Plurality { + __kind: 'Plurality' + id: BodyId + part: BodyPart +} + +export type MultiLocationV0 = MultiLocationV0_Here | MultiLocationV0_X1 | MultiLocationV0_X2 | MultiLocationV0_X3 | MultiLocationV0_X4 | MultiLocationV0_X5 | MultiLocationV0_X6 | MultiLocationV0_X7 | MultiLocationV0_X8 + +export interface MultiLocationV0_Here { + __kind: 'Here' +} + +export interface MultiLocationV0_X1 { + __kind: 'X1' + value: JunctionV0 +} + +export interface MultiLocationV0_X2 { + __kind: 'X2' + value: [JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X3 { + __kind: 'X3' + value: [JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X4 { + __kind: 'X4' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X5 { + __kind: 'X5' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X6 { + __kind: 'X6' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X7 { + __kind: 'X7' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export interface MultiLocationV0_X8 { + __kind: 'X8' + value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +} + +export const AssetInstanceV0: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index128: sts.bigint(), + Index16: sts.number(), + Index32: sts.number(), + Index64: sts.bigint(), + Index8: sts.number(), + Undefined: sts.unit(), + } +}) + +export type AssetInstanceV0 = AssetInstanceV0_Array16 | AssetInstanceV0_Array32 | AssetInstanceV0_Array4 | AssetInstanceV0_Array8 | AssetInstanceV0_Blob | AssetInstanceV0_Index128 | AssetInstanceV0_Index16 | AssetInstanceV0_Index32 | AssetInstanceV0_Index64 | AssetInstanceV0_Index8 | AssetInstanceV0_Undefined + +export interface AssetInstanceV0_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface AssetInstanceV0_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface AssetInstanceV0_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface AssetInstanceV0_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface AssetInstanceV0_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface AssetInstanceV0_Index128 { + __kind: 'Index128' + value: bigint +} + +export interface AssetInstanceV0_Index16 { + __kind: 'Index16' + value: number +} + +export interface AssetInstanceV0_Index32 { + __kind: 'Index32' + value: number +} + +export interface AssetInstanceV0_Index64 { + __kind: 'Index64' + value: bigint +} + +export interface AssetInstanceV0_Index8 { + __kind: 'Index8' + value: number +} + +export interface AssetInstanceV0_Undefined { + __kind: 'Undefined' +} + +export type MultiAssetV0 = MultiAssetV0_AbstractFungible | MultiAssetV0_AbstractNonFungible | MultiAssetV0_All | MultiAssetV0_AllAbstractFungible | MultiAssetV0_AllAbstractNonFungible | MultiAssetV0_AllConcreteFungible | MultiAssetV0_AllConcreteNonFungible | MultiAssetV0_AllFungible | MultiAssetV0_AllNonFungible | MultiAssetV0_ConcreteFungible | MultiAssetV0_ConcreteNonFungible | MultiAssetV0_None + +export interface MultiAssetV0_AbstractFungible { + __kind: 'AbstractFungible' + id: Bytes + instance: bigint +} + +export interface MultiAssetV0_AbstractNonFungible { + __kind: 'AbstractNonFungible' + class: Bytes + instance: AssetInstanceV0 +} + +export interface MultiAssetV0_All { + __kind: 'All' +} + +export interface MultiAssetV0_AllAbstractFungible { + __kind: 'AllAbstractFungible' + value: Bytes +} + +export interface MultiAssetV0_AllAbstractNonFungible { + __kind: 'AllAbstractNonFungible' + value: Bytes +} + +export interface MultiAssetV0_AllConcreteFungible { + __kind: 'AllConcreteFungible' + value: MultiLocationV0 +} + +export interface MultiAssetV0_AllConcreteNonFungible { + __kind: 'AllConcreteNonFungible' + value: MultiLocationV0 +} + +export interface MultiAssetV0_AllFungible { + __kind: 'AllFungible' +} + +export interface MultiAssetV0_AllNonFungible { + __kind: 'AllNonFungible' +} + +export interface MultiAssetV0_ConcreteFungible { + __kind: 'ConcreteFungible' + id: MultiLocationV0 + amount: bigint +} + +export interface MultiAssetV0_ConcreteNonFungible { + __kind: 'ConcreteNonFungible' + class: MultiLocationV0 + instance: AssetInstanceV0 +} + +export interface MultiAssetV0_None { + __kind: 'None' +} + +export type VersionedMultiAssets = VersionedMultiAssets_V0 | VersionedMultiAssets_V1 | VersionedMultiAssets_V2 + +export interface VersionedMultiAssets_V0 { + __kind: 'V0' + value: MultiAssetV0[] +} + +export interface VersionedMultiAssets_V1 { + __kind: 'V1' + value: MultiAssetV1[] +} + +export interface VersionedMultiAssets_V2 { + __kind: 'V2' + value: MultiAssetV1[] +} + +export const VersionedMultiLocation: sts.Type = sts.closedEnum(() => { + return { + V0: MultiLocationV0, + V1: MultiLocationV1, + V2: MultiLocationV2, + } +}) + +export const MultiLocationV2: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: JunctionsV1, + } +}) + +export interface MultiLocationV2 { + parents: number + interior: JunctionsV1 +} + +export const MultiLocationV1: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: JunctionsV1, + } +}) + +export interface MultiLocationV1 { + parents: number + interior: JunctionsV1 +} + +export type VersionedMultiLocation = VersionedMultiLocation_V0 | VersionedMultiLocation_V1 | VersionedMultiLocation_V2 + +export interface VersionedMultiLocation_V0 { + __kind: 'V0' + value: MultiLocationV0 +} + +export interface VersionedMultiLocation_V1 { + __kind: 'V1' + value: MultiLocationV1 +} + +export interface VersionedMultiLocation_V2 { + __kind: 'V2' + value: MultiLocationV2 +} + +export const Weight = sts.bigint() + +export const VersionedXcm: sts.Type = sts.closedEnum(() => { + return { + V0: XcmV0, + V1: XcmV1, + V2: sts.array(() => InstructionV2), + } +}) + +export const InstructionV2: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: MultiAssetV2, + weightLimit: WeightLimitV2, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV1), + ticket: MultiLocationV2, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: MultiAssetFilterV2, + maxAssets: sts.number(), + beneficiary: MultiLocationV2, + }), + DepositReserveAsset: sts.enumStruct({ + assets: MultiAssetFilterV2, + maxAssets: sts.number(), + dest: MultiLocationV2, + xcm: sts.array(() => InstructionV2), + }), + DescendOrigin: InteriorMultiLocation, + ExchangeAsset: sts.enumStruct({ + give: MultiAssetFilterV2, + receive: sts.array(() => MultiAssetV1), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: MultiAssetFilterV2, + reserve: MultiLocationV2, + xcm: sts.array(() => InstructionV2), + }), + InitiateTeleport: sts.enumStruct({ + assets: MultiAssetFilterV2, + dest: MultiLocationV2, + xcm: sts.array(() => InstructionV2), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: MultiLocationV2, + assets: MultiAssetFilterV2, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: ResponseV2, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => MultiAssetV1), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: MultiLocationV2, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => MultiAssetV1), + SetAppendix: sts.array(() => InstructionV2), + SetErrorHandler: sts.array(() => InstructionV2), + Transact: sts.enumStruct({ + originType: OriginKindV2, + requireWeightAtMost: sts.bigint(), + call: DoubleEncodedCall, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV1), + beneficiary: MultiLocationV2, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV1), + dest: MultiLocationV2, + xcm: sts.array(() => InstructionV2), + }), + Trap: sts.bigint(), + WithdrawAsset: sts.array(() => MultiAssetV1), + } +}) + +export const DoubleEncodedCall: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncodedCall { + encoded: Bytes +} + +export const OriginKindV2: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type OriginKindV2 = OriginKindV2_Native | OriginKindV2_SovereignAccount | OriginKindV2_Superuser | OriginKindV2_Xcm + +export interface OriginKindV2_Native { + __kind: 'Native' +} + +export interface OriginKindV2_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface OriginKindV2_Superuser { + __kind: 'Superuser' +} + +export interface OriginKindV2_Xcm { + __kind: 'Xcm' +} + +export const ResponseV2: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => MultiAssetV1), + ExecutionResult: ResponseV2Result, + Null: sts.unit(), + } +}) + +export const ResponseV2Result = sts.result(() => sts.unit(), () => ResponseV2Error) + +export const ResponseV2Error = sts.tuple(() => [sts.number(), XcmErrorV2]) + +export const XcmErrorV2: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationBufferOverflow: sts.unit(), + DestinationUnsupported: sts.unit(), + EscalationOfPrivilege: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + MultiLocationFull: sts.unit(), + MultiLocationNotInvertible: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + RecursionLimitReached: sts.unit(), + TooExpensive: sts.unit(), + TooMuchWeightRequired: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + Undefined: sts.unit(), + UnhandledEffect: sts.unit(), + UnhandledXcmMessage: sts.unit(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + UnknownWeightRequired: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + WeightLimitReached: Weight, + WeightNotComputable: sts.unit(), + Wildcard: sts.unit(), + } +}) + +export type XcmErrorV2 = XcmErrorV2_AssetNotFound | XcmErrorV2_BadOrigin | XcmErrorV2_Barrier | XcmErrorV2_DestinationBufferOverflow | XcmErrorV2_DestinationUnsupported | XcmErrorV2_EscalationOfPrivilege | XcmErrorV2_ExceedsMaxMessageSize | XcmErrorV2_FailedToDecode | XcmErrorV2_FailedToTransactAsset | XcmErrorV2_InvalidLocation | XcmErrorV2_LocationCannotHold | XcmErrorV2_MultiLocationFull | XcmErrorV2_MultiLocationNotInvertible | XcmErrorV2_NotHoldingFees | XcmErrorV2_NotWithdrawable | XcmErrorV2_Overflow | XcmErrorV2_RecursionLimitReached | XcmErrorV2_TooExpensive | XcmErrorV2_TooMuchWeightRequired | XcmErrorV2_Transport | XcmErrorV2_Trap | XcmErrorV2_Undefined | XcmErrorV2_UnhandledEffect | XcmErrorV2_UnhandledXcmMessage | XcmErrorV2_UnhandledXcmVersion | XcmErrorV2_Unimplemented | XcmErrorV2_UnknownClaim | XcmErrorV2_UnknownWeightRequired | XcmErrorV2_Unroutable | XcmErrorV2_UntrustedReserveLocation | XcmErrorV2_UntrustedTeleportLocation | XcmErrorV2_WeightLimitReached | XcmErrorV2_WeightNotComputable | XcmErrorV2_Wildcard + +export interface XcmErrorV2_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface XcmErrorV2_BadOrigin { + __kind: 'BadOrigin' +} + +export interface XcmErrorV2_Barrier { + __kind: 'Barrier' +} + +export interface XcmErrorV2_DestinationBufferOverflow { + __kind: 'DestinationBufferOverflow' +} + +export interface XcmErrorV2_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface XcmErrorV2_EscalationOfPrivilege { + __kind: 'EscalationOfPrivilege' +} + +export interface XcmErrorV2_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface XcmErrorV2_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface XcmErrorV2_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface XcmErrorV2_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface XcmErrorV2_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface XcmErrorV2_MultiLocationFull { + __kind: 'MultiLocationFull' +} + +export interface XcmErrorV2_MultiLocationNotInvertible { + __kind: 'MultiLocationNotInvertible' +} + +export interface XcmErrorV2_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface XcmErrorV2_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface XcmErrorV2_Overflow { + __kind: 'Overflow' +} + +export interface XcmErrorV2_RecursionLimitReached { + __kind: 'RecursionLimitReached' +} + +export interface XcmErrorV2_TooExpensive { + __kind: 'TooExpensive' +} + +export interface XcmErrorV2_TooMuchWeightRequired { + __kind: 'TooMuchWeightRequired' +} + +export interface XcmErrorV2_Transport { + __kind: 'Transport' +} + +export interface XcmErrorV2_Trap { + __kind: 'Trap' + value: bigint +} + +export interface XcmErrorV2_Undefined { + __kind: 'Undefined' +} + +export interface XcmErrorV2_UnhandledEffect { + __kind: 'UnhandledEffect' +} + +export interface XcmErrorV2_UnhandledXcmMessage { + __kind: 'UnhandledXcmMessage' +} + +export interface XcmErrorV2_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface XcmErrorV2_Unimplemented { + __kind: 'Unimplemented' +} + +export interface XcmErrorV2_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface XcmErrorV2_UnknownWeightRequired { + __kind: 'UnknownWeightRequired' +} + +export interface XcmErrorV2_Unroutable { + __kind: 'Unroutable' +} + +export interface XcmErrorV2_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface XcmErrorV2_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface XcmErrorV2_WeightLimitReached { + __kind: 'WeightLimitReached' + value: Weight +} + +export interface XcmErrorV2_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export interface XcmErrorV2_Wildcard { + __kind: 'Wildcard' +} + +export type Weight = bigint + +export type ResponseV2 = ResponseV2_Assets | ResponseV2_ExecutionResult | ResponseV2_Null + +export interface ResponseV2_Assets { + __kind: 'Assets' + value: MultiAssetV1[] +} + +export interface ResponseV2_ExecutionResult { + __kind: 'ExecutionResult' + value: ResponseV2Result +} + +export interface ResponseV2_Null { + __kind: 'Null' +} + +export type ResponseV2Result = Result + +export type ResponseV2Error = [number, XcmErrorV2] + +export const InteriorMultiLocation: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: JunctionV1, + X2: sts.tuple(() => [JunctionV1, JunctionV1]), + X3: sts.tuple(() => [JunctionV1, JunctionV1, JunctionV1]), + X4: sts.tuple(() => [JunctionV1, JunctionV1, JunctionV1, JunctionV1]), + X5: sts.tuple(() => [JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1]), + X6: sts.tuple(() => [JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1]), + X7: sts.tuple(() => [JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1]), + X8: sts.tuple(() => [JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1]), + } +}) + +export type InteriorMultiLocation = InteriorMultiLocation_Here | InteriorMultiLocation_X1 | InteriorMultiLocation_X2 | InteriorMultiLocation_X3 | InteriorMultiLocation_X4 | InteriorMultiLocation_X5 | InteriorMultiLocation_X6 | InteriorMultiLocation_X7 | InteriorMultiLocation_X8 + +export interface InteriorMultiLocation_Here { + __kind: 'Here' +} + +export interface InteriorMultiLocation_X1 { + __kind: 'X1' + value: JunctionV1 +} + +export interface InteriorMultiLocation_X2 { + __kind: 'X2' + value: [JunctionV1, JunctionV1] +} + +export interface InteriorMultiLocation_X3 { + __kind: 'X3' + value: [JunctionV1, JunctionV1, JunctionV1] +} + +export interface InteriorMultiLocation_X4 { + __kind: 'X4' + value: [JunctionV1, JunctionV1, JunctionV1, JunctionV1] +} + +export interface InteriorMultiLocation_X5 { + __kind: 'X5' + value: [JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1] +} + +export interface InteriorMultiLocation_X6 { + __kind: 'X6' + value: [JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1] +} + +export interface InteriorMultiLocation_X7 { + __kind: 'X7' + value: [JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1] +} + +export interface InteriorMultiLocation_X8 { + __kind: 'X8' + value: [JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1] +} + +export const MultiAssetFilterV2: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => MultiAssetV1), + Wild: WildMultiAssetV1, + } +}) + +export const WildMultiAssetV1: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllOf: sts.enumStruct({ + id: XcmAssetId, + fungibility: WildFungibilityV1, + }), + } +}) + +export const WildFungibilityV1: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type WildFungibilityV1 = WildFungibilityV1_Fungible | WildFungibilityV1_NonFungible + +export interface WildFungibilityV1_Fungible { + __kind: 'Fungible' +} + +export interface WildFungibilityV1_NonFungible { + __kind: 'NonFungible' +} + +export type WildMultiAssetV1 = WildMultiAssetV1_All | WildMultiAssetV1_AllOf + +export interface WildMultiAssetV1_All { + __kind: 'All' +} + +export interface WildMultiAssetV1_AllOf { + __kind: 'AllOf' + id: XcmAssetId + fungibility: WildFungibilityV1 +} + +export type MultiAssetFilterV2 = MultiAssetFilterV2_Definite | MultiAssetFilterV2_Wild + +export interface MultiAssetFilterV2_Definite { + __kind: 'Definite' + value: MultiAssetV1[] +} + +export interface MultiAssetFilterV2_Wild { + __kind: 'Wild' + value: WildMultiAssetV1 +} + +export const WeightLimitV2: sts.Type = sts.closedEnum(() => { + return { + Limited: sts.bigint(), + Unlimited: sts.unit(), + } +}) + +export type WeightLimitV2 = WeightLimitV2_Limited | WeightLimitV2_Unlimited + +export interface WeightLimitV2_Limited { + __kind: 'Limited' + value: bigint +} + +export interface WeightLimitV2_Unlimited { + __kind: 'Unlimited' +} + +export const MultiAssetV2: sts.Type = sts.struct(() => { + return { + id: XcmAssetId, + fungibility: FungibilityV1, + } +}) + +export interface MultiAssetV2 { + id: XcmAssetId + fungibility: FungibilityV1 +} + +export type InstructionV2 = InstructionV2_BuyExecution | InstructionV2_ClaimAsset | InstructionV2_ClearError | InstructionV2_ClearOrigin | InstructionV2_DepositAsset | InstructionV2_DepositReserveAsset | InstructionV2_DescendOrigin | InstructionV2_ExchangeAsset | InstructionV2_HrmpChannelAccepted | InstructionV2_HrmpChannelClosing | InstructionV2_HrmpNewChannelOpenRequest | InstructionV2_InitiateReserveWithdraw | InstructionV2_InitiateTeleport | InstructionV2_QueryHolding | InstructionV2_QueryResponse | InstructionV2_ReceiveTeleportedAsset | InstructionV2_RefundSurplus | InstructionV2_ReportError | InstructionV2_ReserveAssetDeposited | InstructionV2_SetAppendix | InstructionV2_SetErrorHandler | InstructionV2_Transact | InstructionV2_TransferAsset | InstructionV2_TransferReserveAsset | InstructionV2_Trap | InstructionV2_WithdrawAsset + +export interface InstructionV2_BuyExecution { + __kind: 'BuyExecution' + fees: MultiAssetV2 + weightLimit: WeightLimitV2 +} + +export interface InstructionV2_ClaimAsset { + __kind: 'ClaimAsset' + assets: MultiAssetV1[] + ticket: MultiLocationV2 +} + +export interface InstructionV2_ClearError { + __kind: 'ClearError' +} + +export interface InstructionV2_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface InstructionV2_DepositAsset { + __kind: 'DepositAsset' + assets: MultiAssetFilterV2 + maxAssets: number + beneficiary: MultiLocationV2 +} + +export interface InstructionV2_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: MultiAssetFilterV2 + maxAssets: number + dest: MultiLocationV2 + xcm: InstructionV2[] +} + +export interface InstructionV2_DescendOrigin { + __kind: 'DescendOrigin' + value: InteriorMultiLocation +} + +export interface InstructionV2_ExchangeAsset { + __kind: 'ExchangeAsset' + give: MultiAssetFilterV2 + receive: MultiAssetV1[] +} + +export interface InstructionV2_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface InstructionV2_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface InstructionV2_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface InstructionV2_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: MultiAssetFilterV2 + reserve: MultiLocationV2 + xcm: InstructionV2[] +} + +export interface InstructionV2_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: MultiAssetFilterV2 + dest: MultiLocationV2 + xcm: InstructionV2[] +} + +export interface InstructionV2_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: MultiLocationV2 + assets: MultiAssetFilterV2 + maxResponseWeight: bigint +} + +export interface InstructionV2_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: ResponseV2 + maxWeight: bigint +} + +export interface InstructionV2_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: MultiAssetV1[] +} + +export interface InstructionV2_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface InstructionV2_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: MultiLocationV2 + maxResponseWeight: bigint +} + +export interface InstructionV2_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: MultiAssetV1[] +} + +export interface InstructionV2_SetAppendix { + __kind: 'SetAppendix' + value: InstructionV2[] +} + +export interface InstructionV2_SetErrorHandler { + __kind: 'SetErrorHandler' + value: InstructionV2[] +} + +export interface InstructionV2_Transact { + __kind: 'Transact' + originType: OriginKindV2 + requireWeightAtMost: bigint + call: DoubleEncodedCall +} + +export interface InstructionV2_TransferAsset { + __kind: 'TransferAsset' + assets: MultiAssetV1[] + beneficiary: MultiLocationV2 +} + +export interface InstructionV2_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: MultiAssetV1[] + dest: MultiLocationV2 + xcm: InstructionV2[] +} + +export interface InstructionV2_Trap { + __kind: 'Trap' + value: bigint +} + +export interface InstructionV2_WithdrawAsset { + __kind: 'WithdrawAsset' + value: MultiAssetV1[] +} + +export const XcmV1: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: ResponseV1, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV1), + effects: sts.array(() => XcmOrderV1), + }), + RelayedFrom: sts.enumStruct({ + who: MultiLocationV1, + message: XcmV1, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => MultiAssetV1), + effects: sts.array(() => XcmOrderV1), + }), + Transact: sts.enumStruct({ + originType: XcmOriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncodedCall, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV1), + dest: MultiLocationV1, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV1), + dest: MultiLocationV1, + effects: sts.array(() => XcmOrderV1), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV1), + effects: sts.array(() => XcmOrderV1), + }), + } +}) + +export const XcmOriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type XcmOriginKind = XcmOriginKind_Native | XcmOriginKind_SovereignAccount | XcmOriginKind_Superuser | XcmOriginKind_Xcm + +export interface XcmOriginKind_Native { + __kind: 'Native' +} + +export interface XcmOriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface XcmOriginKind_Superuser { + __kind: 'Superuser' +} + +export interface XcmOriginKind_Xcm { + __kind: 'Xcm' +} + +export const XcmOrderV1: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: MultiAssetV1, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => XcmV1), + }), + DepositAsset: sts.enumStruct({ + assets: MultiAssetFilterV1, + maxAssets: sts.number(), + beneficiary: MultiLocationV1, + }), + DepositReserveAsset: sts.enumStruct({ + assets: MultiAssetFilterV1, + maxAssets: sts.number(), + dest: MultiLocationV1, + effects: sts.array(() => XcmOrderV1), + }), + ExchangeAsset: sts.enumStruct({ + give: MultiAssetFilterV1, + receive: sts.array(() => MultiAssetV1), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: MultiAssetFilterV1, + reserve: MultiLocationV1, + effects: sts.array(() => XcmOrderV1), + }), + InitiateTeleport: sts.enumStruct({ + assets: MultiAssetFilterV1, + dest: MultiLocationV1, + effects: sts.array(() => XcmOrderV1), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: MultiLocationV1, + assets: MultiAssetFilterV1, + }), + } +}) + +export const MultiAssetFilterV1: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => MultiAssetV1), + Wild: WildMultiAssetV1, + } +}) + +export type MultiAssetFilterV1 = MultiAssetFilterV1_Definite | MultiAssetFilterV1_Wild + +export interface MultiAssetFilterV1_Definite { + __kind: 'Definite' + value: MultiAssetV1[] +} + +export interface MultiAssetFilterV1_Wild { + __kind: 'Wild' + value: WildMultiAssetV1 +} + +export type XcmOrderV1 = XcmOrderV1_BuyExecution | XcmOrderV1_DepositAsset | XcmOrderV1_DepositReserveAsset | XcmOrderV1_ExchangeAsset | XcmOrderV1_InitiateReserveWithdraw | XcmOrderV1_InitiateTeleport | XcmOrderV1_Noop | XcmOrderV1_QueryHolding + +export interface XcmOrderV1_BuyExecution { + __kind: 'BuyExecution' + fees: MultiAssetV1 + weight: bigint + debt: bigint + haltOnError: boolean + instructions: XcmV1[] +} + +export interface XcmOrderV1_DepositAsset { + __kind: 'DepositAsset' + assets: MultiAssetFilterV1 + maxAssets: number + beneficiary: MultiLocationV1 +} + +export interface XcmOrderV1_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: MultiAssetFilterV1 + maxAssets: number + dest: MultiLocationV1 + effects: XcmOrderV1[] +} + +export interface XcmOrderV1_ExchangeAsset { + __kind: 'ExchangeAsset' + give: MultiAssetFilterV1 + receive: MultiAssetV1[] +} + +export interface XcmOrderV1_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: MultiAssetFilterV1 + reserve: MultiLocationV1 + effects: XcmOrderV1[] +} + +export interface XcmOrderV1_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: MultiAssetFilterV1 + dest: MultiLocationV1 + effects: XcmOrderV1[] +} + +export interface XcmOrderV1_Noop { + __kind: 'Noop' +} + +export interface XcmOrderV1_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: MultiLocationV1 + assets: MultiAssetFilterV1 +} + +export const ResponseV1: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => MultiAssetV1), + } +}) + +export type ResponseV1 = ResponseV1_Assets + +export interface ResponseV1_Assets { + __kind: 'Assets' + value: MultiAssetV1[] +} + +export type XcmV1 = XcmV1_HrmpChannelAccepted | XcmV1_HrmpChannelClosing | XcmV1_HrmpNewChannelOpenRequest | XcmV1_QueryResponse | XcmV1_ReceiveTeleportedAsset | XcmV1_RelayedFrom | XcmV1_ReserveAssetDeposit | XcmV1_Transact | XcmV1_TransferAsset | XcmV1_TransferReserveAsset | XcmV1_WithdrawAsset + +export interface XcmV1_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface XcmV1_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface XcmV1_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface XcmV1_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: ResponseV1 +} + +export interface XcmV1_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: MultiAssetV1[] + effects: XcmOrderV1[] +} + +export interface XcmV1_RelayedFrom { + __kind: 'RelayedFrom' + who: MultiLocationV1 + message: XcmV1 +} + +export interface XcmV1_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: MultiAssetV1[] + effects: XcmOrderV1[] +} + +export interface XcmV1_Transact { + __kind: 'Transact' + originType: XcmOriginKind + requireWeightAtMost: bigint + call: DoubleEncodedCall +} + +export interface XcmV1_TransferAsset { + __kind: 'TransferAsset' + assets: MultiAssetV1[] + dest: MultiLocationV1 +} + +export interface XcmV1_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: MultiAssetV1[] + dest: MultiLocationV1 + effects: XcmOrderV1[] +} + +export interface XcmV1_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: MultiAssetV1[] + effects: XcmOrderV1[] +} + +export const XcmV0: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: ResponseV0, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + RelayedFrom: sts.enumStruct({ + who: MultiLocationV0, + message: XcmV0, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + Transact: sts.enumStruct({ + originType: XcmOriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncodedCall, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + effects: sts.array(() => XcmOrderV0), + }), + } +}) + +export const XcmOrderV0: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => XcmV0), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + dest: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => MultiAssetV0), + receive: sts.array(() => MultiAssetV0), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => MultiAssetV0), + reserve: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => MultiAsset), + dest: MultiLocationV0, + effects: sts.array(() => XcmOrderV0), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: MultiLocationV0, + assets: sts.array(() => MultiAssetV0), + }), + } +}) + +export const MultiAsset: sts.Type = sts.struct(() => { + return { + id: XcmAssetId, + fungibility: FungibilityV1, + } +}) + +export interface MultiAsset { + id: XcmAssetId + fungibility: FungibilityV1 +} + +export type XcmOrderV0 = XcmOrderV0_BuyExecution | XcmOrderV0_DepositAsset | XcmOrderV0_DepositReserveAsset | XcmOrderV0_ExchangeAsset | XcmOrderV0_InitiateReserveWithdraw | XcmOrderV0_InitiateTeleport | XcmOrderV0_Null | XcmOrderV0_QueryHolding + +export interface XcmOrderV0_BuyExecution { + __kind: 'BuyExecution' + fees: MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: XcmV0[] +} + +export interface XcmOrderV0_DepositAsset { + __kind: 'DepositAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 +} + +export interface XcmOrderV0_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface XcmOrderV0_ExchangeAsset { + __kind: 'ExchangeAsset' + give: MultiAssetV0[] + receive: MultiAssetV0[] +} + +export interface XcmOrderV0_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: MultiAssetV0[] + reserve: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface XcmOrderV0_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: MultiAsset[] + dest: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface XcmOrderV0_Null { + __kind: 'Null' +} + +export interface XcmOrderV0_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: MultiLocationV0 + assets: MultiAssetV0[] +} + +export const ResponseV0: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => MultiAssetV0), + } +}) + +export type ResponseV0 = ResponseV0_Assets + +export interface ResponseV0_Assets { + __kind: 'Assets' + value: MultiAssetV0[] +} + +export type XcmV0 = XcmV0_HrmpChannelAccepted | XcmV0_HrmpChannelClosing | XcmV0_HrmpNewChannelOpenRequest | XcmV0_QueryResponse | XcmV0_ReceiveTeleportedAsset | XcmV0_RelayedFrom | XcmV0_ReserveAssetDeposit | XcmV0_Transact | XcmV0_TransferAsset | XcmV0_TransferReserveAsset | XcmV0_WithdrawAsset + +export interface XcmV0_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface XcmV0_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface XcmV0_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface XcmV0_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: ResponseV0 +} + +export interface XcmV0_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export interface XcmV0_RelayedFrom { + __kind: 'RelayedFrom' + who: MultiLocationV0 + message: XcmV0 +} + +export interface XcmV0_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export interface XcmV0_Transact { + __kind: 'Transact' + originType: XcmOriginKind + requireWeightAtMost: bigint + call: DoubleEncodedCall +} + +export interface XcmV0_TransferAsset { + __kind: 'TransferAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 +} + +export interface XcmV0_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: MultiAssetV0[] + dest: MultiLocationV0 + effects: XcmOrderV0[] +} + +export interface XcmV0_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: MultiAssetV0[] + effects: XcmOrderV0[] +} + +export type VersionedXcm = VersionedXcm_V0 | VersionedXcm_V1 | VersionedXcm_V2 + +export interface VersionedXcm_V0 { + __kind: 'V0' + value: XcmV0 +} + +export interface VersionedXcm_V1 { + __kind: 'V1' + value: XcmV1 +} + +export interface VersionedXcm_V2 { + __kind: 'V2' + value: InstructionV2[] +} + +export type XcmPalletCall = XcmPalletCall_execute | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets + +/** + * Execute an XCM message from a local, signed, origin. + * + * An event is deposited indicating whether `msg` could be executed completely or only + * partially. + * + * No more than `max_weight` will be used in its attempted execution. If this is less than the + * maximum amount of weight that the message could take to be executed, then no execution + * attempt will be made. + * + * NOTE: A successful return to this does *not* imply that the `msg` was executed successfully + * to completion; only that *some* of it was executed. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: VersionedXcm + maxWeight: Weight +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination chain and forward + * a notification XCM. + * + * Fee payment on the destination side is made from the first asset listed in the `assets` vector. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `dest_weight`: Equal to the total weight on `dest` of the XCM message + * `ReserveAssetDeposited { assets, effects: [ BuyExecution{..}, DepositAsset{..} ] }`. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + destWeight: Weight +} + +export interface XcmPalletCall_send { + __kind: 'send' + dest: VersionedMultiLocation + message: VersionedXcm +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the first asset listed in the `assets` vector. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `dest_weight`: Equal to the total weight on `dest` of the XCM message + * `Teleport { assets, effects: [ BuyExecution{..}, DepositAsset{..} ] }`. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + destWeight: Weight +} + +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: LookupSource, + target: LookupSource, + schedule: VestingInfo, + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: LookupSource, + }), + vested_transfer: sts.enumStruct({ + target: LookupSource, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: Balance, + perBlock: Balance, + startingBlock: BlockNumber, + } +}) + +export const BlockNumber = sts.number() + +export const Balance = sts.bigint() + +export interface VestingInfo { + locked: Balance + perBlock: Balance + startingBlock: BlockNumber +} + +export type BlockNumber = number + +export type Balance = bigint + +export const LookupSource: sts.Type = sts.closedEnum(() => { + return { + Address20: H160, + Address32: H256, + Id: AccountId, + Index: sts.number(), + Raw: sts.bytes(), + } +}) + +export const H256 = sts.bytes() + +export const H160 = sts.bytes() + +export type LookupSource = LookupSource_Address20 | LookupSource_Address32 | LookupSource_Id | LookupSource_Index | LookupSource_Raw + +export interface LookupSource_Address20 { + __kind: 'Address20' + value: H160 +} + +export interface LookupSource_Address32 { + __kind: 'Address32' + value: H256 +} + +export interface LookupSource_Id { + __kind: 'Id' + value: AccountId +} + +export interface LookupSource_Index { + __kind: 'Index' + value: number +} + +export interface LookupSource_Raw { + __kind: 'Raw' + value: Bytes +} + +export type H256 = Bytes + +export type H160 = Bytes + +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: LookupSource + target: LookupSource + schedule: VestingInfo +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: LookupSource +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account that should be transferred the vested funds. + * - `amount`: The amount of funds to transfer and will be vested. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: LookupSource + schedule: VestingInfo +} + +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Type_138, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Type_138), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Type_138), + }), + } +}) + +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Type_138 +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Type_138[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Type_138[] +} + +export const UmpCall: sts.Type = sts.closedEnum(() => { + return { + service_overweight: sts.enumStruct({ + index: OverweightIndex, + weightLimit: Weight, + }), + } +}) + +export const OverweightIndex = sts.bigint() + +export type UmpCall = UmpCall_service_overweight + +/** + * Service a single overweight upward message. + * + * - `origin`: Must pass `ExecuteOverweightOrigin`. + * - `index`: The index of the overweight message to service. + * - `weight_limit`: The amount of weight that message execution may take. + * + * Errors: + * - `UnknownMessageIndex`: Message of `index` is unknown. + * - `WeightOverLimit`: Message execution may use greater than `weight_limit`. + * + * Events: + * - `OverweightServiced`: On success. + */ +export interface UmpCall_service_overweight { + __kind: 'service_overweight' + index: OverweightIndex + weightLimit: Weight +} + +export type OverweightIndex = bigint + +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: LookupSource, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + } +}) + +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: LookupSource +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +export const TipsCall: sts.Type = sts.closedEnum(() => { + return { + close_tip: sts.enumStruct({ + hash: Hash, + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + }), + retract_tip: sts.enumStruct({ + hash: Hash, + }), + slash_tip: sts.enumStruct({ + hash: Hash, + }), + tip: sts.enumStruct({ + hash: Hash, + tipValue: sts.bigint(), + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId, + tipValue: sts.bigint(), + }), + } +}) + +export const Hash = sts.bytes() + +export type TipsCall = TipsCall_close_tip | TipsCall_report_awesome | TipsCall_retract_tip | TipsCall_slash_tip | TipsCall_tip | TipsCall_tip_new + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`. + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TipsCall_close_tip { + __kind: 'close_tip' + hash: Hash +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TipsCall_retract_tip { + __kind: 'retract_tip' + hash: Hash +} + +/** + * Remove and slash an already-open tip. + * + * May only be called from `T::RejectOrigin`. + * + * As a result, the finder is slashed and the deposits are lost. + * + * Emits `TipSlashed` if successful. + * + * # + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * # + */ +export interface TipsCall_slash_tip { + __kind: 'slash_tip' + hash: Hash +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. + * decoding `Tipper` vec of length `T`, insert tip and check closing, + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TipsCall_tip { + __kind: 'tip' + hash: Hash + tipValue: bigint +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T` + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId + tipValue: bigint +} + +export type Hash = Bytes + +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId, + }), + change_key: sts.enumStruct({ + new: AccountId, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId), + }), + set_prime: sts.enumStruct({ + who: AccountId, + }), + swap_member: sts.enumStruct({ + remove: AccountId, + add: AccountId, + }), + } +}) + +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId + add: AccountId +} + +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const MemberCount = sts.number() + +export const Proposal: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + Dmp: DmpCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + Gilt: GiltCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Initializer: InitializerCall, + Multisig: MultisigCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Paras: ParasCall, + ParasShared: ParasSharedCall, + PhragmenElection: PhragmenElectionCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Ump: UmpCall, + Utility: UtilityCall, + Vesting: VestingCall, + XcmPallet: XcmPalletCall, + } +}) + +export type Proposal = Proposal_Auctions | Proposal_Authorship | Proposal_Babe | Proposal_Balances | Proposal_Bounties | Proposal_Claims | Proposal_Configuration | Proposal_Council | Proposal_Crowdloan | Proposal_Democracy | Proposal_Dmp | Proposal_ElectionProviderMultiPhase | Proposal_Gilt | Proposal_Grandpa | Proposal_Hrmp | Proposal_Identity | Proposal_ImOnline | Proposal_Indices | Proposal_Initializer | Proposal_Multisig | Proposal_ParaInclusion | Proposal_ParaInherent | Proposal_Paras | Proposal_ParasShared | Proposal_PhragmenElection | Proposal_Proxy | Proposal_Recovery | Proposal_Registrar | Proposal_Scheduler | Proposal_Session | Proposal_Slots | Proposal_Society | Proposal_Staking | Proposal_System | Proposal_TechnicalCommittee | Proposal_TechnicalMembership | Proposal_Timestamp | Proposal_Tips | Proposal_Treasury | Proposal_Ump | Proposal_Utility | Proposal_Vesting | Proposal_XcmPallet + +export interface Proposal_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Proposal_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Proposal_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Proposal_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Proposal_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Proposal_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Proposal_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Proposal_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Proposal_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Proposal_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Proposal_Dmp { + __kind: 'Dmp' + value: DmpCall +} + +export interface Proposal_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Proposal_Gilt { + __kind: 'Gilt' + value: GiltCall +} + +export interface Proposal_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Proposal_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Proposal_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Proposal_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Proposal_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Proposal_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Proposal_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Proposal_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Proposal_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Proposal_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Proposal_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Proposal_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Proposal_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Proposal_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Proposal_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Proposal_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Proposal_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Proposal_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Proposal_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Proposal_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Proposal_System { + __kind: 'System' + value: SystemCall +} + +export interface Proposal_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Proposal_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Proposal_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Proposal_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Proposal_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Proposal_Ump { + __kind: 'Ump' + value: UmpCall +} + +export interface Proposal_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Proposal_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Proposal_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_changes_trie_config | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + * + * # + * - `O(P)` where `P` amount of keys with prefix `prefix` + * - `P` storage deletions. + * - Base Weight: 0.834 * P µs + * - Writes: Number of subkeys + 1 + * # + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Key + subkeys: number +} + +/** + * Kill some items from storage. + * + * # + * - `O(IK)` where `I` length of `keys` and `K` length of one key + * - `I` storage deletions. + * - Base Weight: .378 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Key[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Make some on-chain remark and emit event. + * + * # + * - `O(b)` where b is the length of the remark. + * - 1 event. + * # + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * Set the new changes trie configuration. + * + * # + * - `O(1)` + * - 1 storage write or delete (codec `O(1)`). + * - 1 call to `deposit_log`: Uses `append` API, so O(1) + * - Base Weight: 7.218 µs + * - DB Weight: + * - Writes: Changes Trie, System Digest + * # + */ +export interface SystemCall_set_changes_trie_config { + __kind: 'set_changes_trie_config' + changesTrieConfig?: (ChangesTrieConfiguration | undefined) +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 storage write (codec `O(C)`). + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is expensive). + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very expensive. + * We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + * + * # + * - `O(1)` + * - 1 storage write. + * - Base Weight: 1.405 µs + * - 1 write to HEAP_PAGES + * # + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + * + * # + * - `O(I)` where `I` length of `items` + * - `I` storage writes (`O(1)`). + * - Base Weight: 0.568 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: KeyValue[] +} + +export type KeyValue = [StorageKey, StorageData] + +export type StorageData = Bytes + +export type StorageKey = Bytes + +export interface ChangesTrieConfiguration { + digestInterval: number + digestLevels: number +} + +export type Key = Bytes + +export type Perbill = number + +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_staking_limits | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: LookupSource + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose any limitation + * on the amount that can be added. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + * + * # + * Complexity: O(U + S) + * with U unapplied slashes weighted with U=1000 + * and S is the number of slash indices to be canceled. + * - Read: Unapplied Slashes + * - Write: Unapplied Slashes + * # + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: EraIndex + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Declare a `controller` to stop participating as either a validator or nominator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_, but can be called by anyone. + * + * If the caller is the same as the controller being targeted, then no further checks are + * enforced, and this function behaves just like `chill`. + * + * If the caller is different than the controller being targeted, the following conditions + * must be met: + * * A `ChillThreshold` must be set and checked which defines how close to the max + * nominators or validators we must reach before users can start chilling one-another. + * * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine + * how close we are to the threshold. + * * A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines + * if this is a person that should be chilled because they have not met the threshold + * bond required. + * + * This can be helpful if bond requirements are updated, and we need to remove old users + * who do not satisfy these requirements. + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + controller: AccountId +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * # + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * Thus the election process may be ongoing when this is called. In this case the + * election will continue until the next era is triggered. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + * + * # + * O(S) where S is the number of slashing spans to be removed + * Reads: Bonded, Slashing Spans, Account, Locks + * Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Account, Locks + * Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: LookupSource[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS). + * - Both the reads and writes follow a similar pattern. + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: LookupSource[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId + era: EraIndex +} + +/** + * Remove all data structure concerning a staker/stash once its balance is at the minimum. + * This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone + * and the target `stash` must have no funds left beyond the ED. + * + * This can be called from any origin. + * + * - `stash`: The stash account to reap. Its balance must be zero. + * + * # + * Complexity: O(S) where S is the number of slashing spans on the account. + * DB Weight: + * - Reads: Stash Account, Bonded, Slashing Spans, Locks + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Stash Account, Locks + * - Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MAX_UNLOCKING_CHUNKS`. + * - Storage changes: Can't increase storage, only decrease it. + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: LookupSource +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. + * This should report all the storage items that will be deleted by clearing old + * era history. Needed to report an accurate weight for the dispatch. Trusted by + * `Root` to report an accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Weight: O(E) + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + * + * # + * - O(V) + * - Write: Invulnerables + * # + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Update the various staking limits this pallet. + * + * * `min_nominator_bond`: The minimum active bond needed to be a nominator. + * * `min_validator_bond`: The minimum active bond needed to be a validator. + * * `max_nominator_count`: The max number of users who can be a nominator at once. + * When set to `None`, no limit is enforced. + * * `max_validator_count`: The max number of users who can be a validator at once. + * When set to `None`, no limit is enforced. + * + * Origin must be Root to call this function. + * + * NOTE: Existing nominators and validators will not be affected by this update. + * to kick people under the new limits, `chill_other` should be called. + */ +export interface StakingCall_set_staking_limits { + __kind: 'set_staking_limits' + minNominatorBond: BalanceOf + minValidatorBond: BalanceOf + maxNominatorCount?: (number | undefined) + maxValidatorCount?: (number | undefined) + threshold?: (Percent | undefined) +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * If a user encounters the `InsufficientBond` error when calling this extrinsic, + * they should call `chill` first in order to free up their bonded funds. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * Complexity O(S) where S is the number of slashing spans to remove + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export type BalanceOf = bigint + +export type Percent = number + +export type EraIndex = number + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: BalanceOf +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * module to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId + judgement: SocietyJudgement +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin + * forgives (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: LookupSource + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Module Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId + value: BalanceOf + tip: BalanceOf +} + +export type SocietyJudgement = SocietyJudgement_Approve | SocietyJudgement_Rebid | SocietyJudgement_Reject + +export interface SocietyJudgement_Approve { + __kind: 'Approve' +} + +export interface SocietyJudgement_Rebid { + __kind: 'Rebid' +} + +export interface SocietyJudgement_Reject { + __kind: 'Reject' +} + +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * Clear all leases for a Para Id, refunding any deposits back to the original owners. + * + * Can only be called by the Root origin. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: ParaId +} + +/** + * Just a connect into the `lease_out` call, in case Root wants to force some lease to happen + * independently of any other on-chain mechanism to use it. + * + * Can only be called by the Root origin. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: ParaId + leaser: AccountId + amount: BalanceOf + periodBegin: LeasePeriodOf + periodCount: LeasePeriodOf +} + +/** + * Try to onboard a parachain that has a lease for the current lease period. + * + * This function can be useful if there was some state issue with a para that should + * have onboarded, but was unable to. As long as they have a lease period, we can + * let them onboard from here. + * + * Origin must be signed, but can be called by anyone. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: ParaId +} + +export type LeasePeriodOf = number + +export type ParaId = number + +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` in number of key types. + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` + * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: Keys + proof: Bytes +} + +export type Keys = [AccountId, AccountId, AccountId, AccountId, AccountId, AccountId] + +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.15 + 2.869 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: BlockNumber + index: number +} + +/** + * Cancel a named scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 24.91 + 2.907 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.29 + .126 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda + * - Will use base weight of 25 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_138 +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_138 +} + +/** + * Schedule a named task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 29.6 + .159 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 35 which should be good for more than 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_138 +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`](Self::schedule_named). + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: BlockNumber + maybePeriodic?: (Period | undefined) + priority: Priority + call: Type_138 +} + +export type Priority = number + +export type Period = [BlockNumber, number] + +export type RegistrarCall = RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_force_remove_lock | RegistrarCall_register | RegistrarCall_reserve | RegistrarCall_swap + +/** + * Deregister a Para Id, freeing all data and returning any deposit. + * + * The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: ParaId +} + +/** + * Force the registration of a Para Id on the relay chain. + * + * This function must be called by a Root origin. + * + * The deposit taken can be specified for this registration. Any `ParaId` + * can be registered, including sub-1000 IDs which are System Parachains. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId + deposit: BalanceOf + id: ParaId + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Remove a manager lock from a para. This will allow the manager of a + * previously locked para to deregister or swap a para without using governance. + * + * Can only be called by the Root origin. + */ +export interface RegistrarCall_force_remove_lock { + __kind: 'force_remove_lock' + para: ParaId +} + +/** + * Register head data and validation code for a reserved Para Id. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. + * - `id`: The para ID. Must be owned/managed by the `origin` signing account. + * - `genesis_head`: The genesis head data of the parachain/thread. + * - `validation_code`: The initial validation code of the parachain/thread. + * + * ## Deposits/Fees + * The origin signed account must reserve a corresponding deposit for the registration. Anything already + * reserved previously for this para ID is accounted for. + * + * ## Events + * The `Registered` event is emitted in case of success. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: ParaId + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Reserve a Para Id on the relay chain. + * + * This function will reserve a new Para Id to be owned/managed by the origin account. + * The origin account is able to register head data and validation code using `register` to create + * a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID. + * + * ## Deposits/Fees + * The origin must reserve a deposit of `ParaDeposit` for the registration. + * + * ## Events + * The `Reserved` event is emitted in case of success, which provides the ID reserved for use. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * Swap a parachain with another parachain or parathread. + * + * The origin must be Root, the `para` owner, or the `para` itself. + * + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: ParaId + other: ParaId +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + * + * # + * - The weight of the `call` + 10,000. + * - One storage lookup to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId + call: Type_138 +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + * + * # + * - One storage mutation to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully + * recovered by you. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + V) + * # + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + * + * # + * Key: V (len of vouching friends) + * - One storage read/remove to get the active recovery process. O(1), Codec O(V) + * - One balance call to repatriate reserved. O(X) + * - One event. + * + * Total Complexity: O(V + X) + * # + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. + * Should be ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt + * before the account can be recovered. Should be less than or equal to + * the length of the list of friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized + * that needs to pass before the account can be recovered. + * + * # + * - Key: F (len of friends) + * - One storage read to check that account is not already recoverable. O(1). + * - A check that the friends list is sorted and unique. O(F) + * - One currency reserve operation. O(X) + * - One storage write. O(1). Codec O(F). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId[] + threshold: number + delayPeriod: BlockNumber +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account + * needs to be recoverable (i.e. have a recovery configuration). + * + * # + * - One storage read to check that account is recoverable. O(F) + * - One storage read to check that this recovery process hasn't already started. O(1) + * - One currency reserve operation. O(X) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + * + * # + * Key: F (len of friends) + * - One storage read to get the prefix iterator for active recoveries. O(1) + * - One storage read/remove to get the recovery configuration. O(1), Codec O(F) + * - One balance call to unreserved. O(X) + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + * + * # + * - One storage write O(1) + * - One event + * # + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId + rescuer: AccountId +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you + * want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One binary search to confirm caller is a friend. O(logF) + * - One binary search to confirm caller has not already vouched. O(logV) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + logF + V + logV) + * # + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId + rescuer: AccountId +} + +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: AccountId + proxyType: ProxyType + delay: BlockNumber +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: AccountId + callHash: CallHashOf +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + * TODO: Might be over counting 1 read + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: BlockNumber + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_138 +} + +/** + * Dispatch the given `call` from an account that the sender is authorized for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: AccountId + real: AccountId + forceProxyType?: (ProxyType | undefined) + call: Type_138 +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: AccountId + callHash: CallHashOf +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: AccountId + callHash: CallHashOf +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: AccountId + proxyType: ProxyType + delay: BlockNumber +} + +export type CallHashOf = Bytes + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +export type PhragmenElectionCall = PhragmenElectionCall_clean_defunct_voters | PhragmenElectionCall_remove_member | PhragmenElectionCall_remove_voter | PhragmenElectionCall_renounce_candidacy | PhragmenElectionCall_submit_candidacy | PhragmenElectionCall_vote + +/** + * Clean all voters who are defunct (i.e. they do not serve any purpose at all). The + * deposit of the removed voters are returned. + * + * This is an root function to be used only for cleaning the state. + * + * The dispatch origin of this call must be root. + * + * # + * The total number of voters and those that are defunct must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_clean_defunct_voters { + __kind: 'clean_defunct_voters' + numVoters: number + numDefunct: number +} + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, a new phragmen election is started. + * + * The dispatch origin of this call must be root. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement, we use a small weight. Else, since this is a root call and + * will go into phragmen, we assume full block for now. + * # + */ +export interface PhragmenElectionCall_remove_member { + __kind: 'remove_member' + who: LookupSource + hasReplacement: boolean +} + +/** + * Remove `origin` as a voter. + * + * This removes the lock and returns the deposit. + * + * The dispatch origin of this call must be signed and be a voter. + */ +export interface PhragmenElectionCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * + * - `origin` is a candidate and not elected in any set. In this case, the deposit is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the deposit is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the deposit is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_member`](Self::remove_member), if replacement runners exists, + * they are immediately used. If the prime is renouncing, then no prime will exist until + * the next round. + * + * The dispatch origin of this call must be signed, and have one of the above roles. + * + * # + * The type of renouncing must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Submit oneself for candidacy. A fixed amount of deposit is recorded. + * + * All candidates are wiped at the end of the term. They either become a member/runner-up, + * or leave the system while their deposit is slashed. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`] + * to get their deposit back. Losing the spot in an election will always lead to a slash. + * + * # + * The number of current candidates must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is + * reserved. The deposit is based on the number of votes and can be updated over time. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * If `value` is more than `who`'s total balance, then the maximum of the two is used. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * It is the responsibility of the caller to **NOT** place all of their balance into the + * lock and keep some for further operations. + * + * # + * We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less. + * # + */ +export interface PhragmenElectionCall_vote { + __kind: 'vote' + votes: AccountId[] + value: bigint +} + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +export type ParasSharedCall = never + +export type ParasCall = ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head + +/** + * Note a new block head for para within the context of the current block. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: ParaId + newHead: HeadData +} + +/** + * Put a parachain directly into the next session's action queue. + * We can't queue it any sooner than this without going into the + * initializer... + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: ParaId +} + +/** + * Schedule an upgrade as if it was scheduled in the given relay parent block. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: ParaId + newCode: ValidationCode + relayParentNumber: BlockNumber +} + +/** + * Set the storage for the parachain validation code immediately. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: ParaId + newCode: ValidationCode +} + +/** + * Set the storage for the current parachain head data immediately. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: ParaId + newHead: HeadData +} + +export type ParaInherentCall = ParaInherentCall_enter + +/** + * Enter the paras inherent. This will process bitfields and backed candidates. + */ +export interface ParaInherentCall_enter { + __kind: 'enter' + data: ParachainsInherentData +} + +export interface ParachainsInherentData { + bitfields: SignedAvailabilityBitfield[] + backedCandidates: BackedCandidate[] + disputes: DisputeStatementSet[] + parentHeader: Header +} + +export interface Header { + parentHash: Hash + number: number + stateRoot: Hash + extrinsicsRoot: Hash + digest: Digest +} + +export interface Digest { + logs: DigestItem[] +} + +export type DigestItem = DigestItem_AuthoritiesChange | DigestItem_ChangesTrieRoot | DigestItem_ChangesTrieSignal | DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal | DigestItem_SealV0 + +export interface DigestItem_AuthoritiesChange { + __kind: 'AuthoritiesChange' + value: AuthorityId[] +} + +export interface DigestItem_ChangesTrieRoot { + __kind: 'ChangesTrieRoot' + value: Hash +} + +export interface DigestItem_ChangesTrieSignal { + __kind: 'ChangesTrieSignal' + value: ChangesTrieSignal +} + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: Consensus +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: PreRuntime +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: Seal +} + +export interface DigestItem_SealV0 { + __kind: 'SealV0' + value: SealV0 +} + +export type SealV0 = [bigint, Signature] + +export type Signature = Bytes + +export type Seal = [ConsensusEngineId, Bytes] + +export type PreRuntime = [ConsensusEngineId, Bytes] + +export type Consensus = [ConsensusEngineId, Bytes] + +export type ConsensusEngineId = Bytes + +export type ChangesTrieSignal = ChangesTrieSignal_NewConfiguration + +export interface ChangesTrieSignal_NewConfiguration { + __kind: 'NewConfiguration' + value?: (ChangesTrieConfiguration | undefined) +} + +export type AuthorityId = Bytes + +export interface DisputeStatementSet { + candidateHash: CandidateHash + session: SessionIndex + statements: [DisputeStatement, ParaValidatorIndex, ValidatorSignature][] +} + +export type ValidatorSignature = Bytes + +export type ParaValidatorIndex = number + +export type DisputeStatement = DisputeStatement_Invalid | DisputeStatement_Valid + +export interface DisputeStatement_Invalid { + __kind: 'Invalid' + value: InvalidDisputeStatementKind +} + +export interface DisputeStatement_Valid { + __kind: 'Valid' + value: ValidDisputeStatementKind +} + +export type ValidDisputeStatementKind = ValidDisputeStatementKind_ApprovalChecking | ValidDisputeStatementKind_BackingSeconded | ValidDisputeStatementKind_BackingValid | ValidDisputeStatementKind_Explicit + +export interface ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: Hash +} + +export interface ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: Hash +} + +export interface ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type InvalidDisputeStatementKind = InvalidDisputeStatementKind_Explicit + +export interface InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type SessionIndex = number + +export type CandidateHash = Bytes + +export interface BackedCandidate { + candidate: CommittedCandidateReceipt + validityVotes: ValidityAttestation[] + validatorIndices: BitSequence +} + +export type ValidityAttestation = ValidityAttestation_Explicit | ValidityAttestation_Implicit | ValidityAttestation_Never + +export interface ValidityAttestation_Explicit { + __kind: 'Explicit' + value: ValidatorSignature +} + +export interface ValidityAttestation_Implicit { + __kind: 'Implicit' + value: ValidatorSignature +} + +export interface ValidityAttestation_Never { + __kind: 'Never' +} + +export interface CommittedCandidateReceipt { + descriptor: CandidateDescriptor + commitments: CandidateCommitments +} + +export interface CandidateCommitments { + upwardMessages: UpwardMessage[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: BlockNumber +} + +export interface OutboundHrmpMessage { + recipient: number + data: Bytes +} + +export type UpwardMessage = Bytes + +export interface CandidateDescriptor { + paraId: ParaId + relayParent: RelayChainHash + collatorId: CollatorId + persistedValidationDataHash: Hash + povHash: Hash + erasureRoot: Hash + signature: CollatorSignature + paraHead: Hash + validationCodeHash: ValidationCodeHash +} + +export type ValidationCodeHash = Bytes + +export type CollatorSignature = Bytes + +export type CollatorId = Bytes + +export type RelayChainHash = Bytes + +export interface SignedAvailabilityBitfield { + payload: BitSequence + validatorIndex: ParaValidatorIndex + signature: ValidatorSignature +} + +export type ParaInclusionCall = never + +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a + * deposit taken for its lifetime of + * `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId[] + maybeTimepoint?: (Timepoint | undefined) + call: OpaqueCall + storeCall: boolean + maxWeight: Weight +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId[] + call: Type_138 +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId[] + timepoint: Timepoint + callHash: Bytes +} + +export type OpaqueCall = Bytes + +export interface Timepoint { + height: BlockNumber + index: number +} + +export type InitializerCall = InitializerCall_force_approve + +/** + * Issue a signal to the consensus engine to forcibly act as though all parachain + * blocks in all relay chain blocks up to and including the given number in the current + * chain are valid and should be finalized. + */ +export interface InitializerCall_force_approve { + __kind: 'force_approve' + upTo: BlockNumber +} + +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: AccountIndex +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId + index: AccountIndex + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: AccountIndex +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: AccountIndex +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId + index: AccountIndex +} + +export type AccountIndex = number + +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) + * and E is length of `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Signature +} + +export interface Heartbeat { + blockNumber: BlockNumber + networkState: OpaqueNetworkState + sessionIndex: SessionIndex + authorityIndex: AuthIndex + validatorsLen: number +} + +export type AuthIndex = number + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: LookupSource + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: RegistrarIndex +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: LookupSource +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: LookupSource + judgement: IdentityJudgement +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: LookupSource +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: LookupSource + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: bigint +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId, Data][] +} + +export interface IdentityInfo { + additional: IdentityInfoAdditional[] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (H160 | undefined) + image: Data + twitter: Data +} + +export type IdentityInfoAdditional = [Data, Data] + +export type IdentityJudgement = IdentityJudgement_Erroneous | IdentityJudgement_FeePaid | IdentityJudgement_KnownGood | IdentityJudgement_LowQuality | IdentityJudgement_OutOfDate | IdentityJudgement_Reasonable | IdentityJudgement_Unknown + +export interface IdentityJudgement_Erroneous { + __kind: 'Erroneous' +} + +export interface IdentityJudgement_FeePaid { + __kind: 'FeePaid' + value: Balance +} + +export interface IdentityJudgement_KnownGood { + __kind: 'KnownGood' +} + +export interface IdentityJudgement_LowQuality { + __kind: 'LowQuality' +} + +export interface IdentityJudgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface IdentityJudgement_Reasonable { + __kind: 'Reasonable' +} + +export interface IdentityJudgement_Unknown { + __kind: 'Unknown' +} + +export type RegistrarIndex = number + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: H256 +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: H256 +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: H256 +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: H256 +} + +export type HrmpCall = HrmpCall_force_clean_hrmp | HrmpCall_force_process_hrmp_close | HrmpCall_force_process_hrmp_open | HrmpCall_hrmp_accept_open_channel | HrmpCall_hrmp_cancel_open_request | HrmpCall_hrmp_close_channel | HrmpCall_hrmp_init_open_channel + +/** + * This extrinsic triggers the cleanup of all the HRMP storage items that + * a para may have. Normally this happens once per session, but this allows + * you to trigger the cleanup immediately for a specific parachain. + * + * Origin must be Root. + */ +export interface HrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: ParaId +} + +/** + * Force process HRMP close channel requests. + * + * If there are pending HRMP close channel requests, you can use this + * function process all of those requests immediately. + */ +export interface HrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' +} + +/** + * Force process HRMP open channel requests. + * + * If there are pending HRMP open channel requests, you can use this + * function process all of those requests immediately. + */ +export interface HrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' +} + +/** + * Accept a pending open channel request from the given sender. + * + * The channel will be opened only on the next session boundary. + */ +export interface HrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: ParaId +} + +/** + * This cancels a pending open channel request. It can be canceled be either of the sender + * or the recipient for that request. The origin must be either of those. + * + * The cancelling happens immediately. It is not possible to cancel the request if it is + * already accepted. + */ +export interface HrmpCall_hrmp_cancel_open_request { + __kind: 'hrmp_cancel_open_request' + channelId: HrmpChannelId +} + +/** + * Initiate unilateral closing of a channel. The origin must be either the sender or the + * recipient in the channel being closed. + * + * The closure can only happen on a session change. + */ +export interface HrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * Initiate opening a channel from a parachain to a given recipient with given channel + * parameters. + * + * - `proposed_max_capacity` - specifies how many messages can be in the channel at once. + * - `proposed_max_message_size` - specifies the maximum size of any of the messages. + * + * These numbers are a subject to the relay-chain configuration limits. + * + * The channel can be opened only after the recipient confirms it and only on a session + * change. + */ +export interface HrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: ParaId + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +export interface HrmpChannelId { + sender: number + receiver: number +} + +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has + * stalled. This will trigger a forced authority set change at the beginning + * of the next session, to be enacted `delay` blocks after that. The delay + * should be high enough to safely assume that the block signalling the + * forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters + * will start the new authority set using the given finalized block as base. + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: BlockNumber + bestFinalizedBlockNumber: BlockNumber +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: GrandpaEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface KeyOwnerProof { + session: SessionIndex + trieNodes: Bytes[] + validatorCount: ValidatorCount +} + +export type ValidatorCount = number + +export interface GrandpaEquivocationProof { + setId: SetId + equivocation: GrandpaEquivocation +} + +export type GrandpaEquivocation = GrandpaEquivocation_Precommit | GrandpaEquivocation_Prevote + +export interface GrandpaEquivocation_Precommit { + __kind: 'Precommit' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocation_Prevote { + __kind: 'Prevote' + value: GrandpaEquivocationValue +} + +export interface GrandpaEquivocationValue { + roundNumber: bigint + identity: AuthorityId + first: [GrandpaPrevote, AuthoritySignature] + second: [GrandpaPrevote, AuthoritySignature] +} + +export type AuthoritySignature = Bytes + +export interface GrandpaPrevote { + targetHash: Hash + targetNumber: BlockNumber +} + +export type SetId = bigint + +export type GiltCall = GiltCall_place_bid | GiltCall_retract_bid | GiltCall_set_target | GiltCall_thaw + +/** + * Place a bid for a gilt to be issued. + * + * Origin must be Signed, and account must have at least `amount` in free balance. + * + * - `amount`: The amount of the bid; these funds will be reserved. If the bid is + * successfully elevated into an issued gilt, then these funds will continue to be + * reserved until the gilt expires. Must be at least `MinFreeze`. + * - `duration`: The number of periods for which the funds will be locked if the gilt is + * issued. It will expire only after this period has elapsed after the point of issuance. + * Must be greater than 1 and no more than `QueueCount`. + * + * Complexities: + * - `Queues[duration].len()` (just take max). + */ +export interface GiltCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * Retract a previously placed bid. + * + * Origin must be Signed, and the account should have previously issued a still-active bid + * of `amount` for `duration`. + * + * - `amount`: The amount of the previous bid. + * - `duration`: The duration of the previous bid. + */ +export interface GiltCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * Set target proportion of gilt-funds. + * + * Origin must be `AdminOrigin`. + * + * - `target`: The target proportion of effective issued funds that should be under gilts + * at any one time. + */ +export interface GiltCall_set_target { + __kind: 'set_target' + target: bigint +} + +/** + * Remove an active but expired gilt. Reserved funds under gilt are freed and balance is + * adjusted to ensure that the funds grow or shrink to maintain the equivalent proportion + * of effective total issued funds. + * + * Origin must be Signed and the account must be the owner of the gilt of the given index. + * + * - `index`: The index of the gilt to be thawed. + */ +export interface GiltCall_thaw { + __kind: 'thaw' + index: number +} + +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * Set a solution in the queue, to be handed out to the client of this pallet in the next + * call to `ElectionProvider::elect`. + * + * This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`. + * + * The solution is not checked for any feasibility and is assumed to be trustworthy, as any + * feasibility check itself can in principle cause the election process to fail (due to + * memory/weight constrains). + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + supports: [AccountId, SolutionSupport][] +} + +/** + * Set a new value for `MinimumUntrustedScore`. + * + * Dispatch origin must be aligned with `T::ForceOrigin`. + * + * This check can be turned off by setting the value to `None`. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (ElectionScore | undefined) +} + +/** + * Submit a solution for the signed phase. + * + * The dispatch origin fo this call must be __signed__. + * + * The solution is potentially queued, based on the claimed score and processed at the end + * of the signed phase. + * + * A deposit is reserved and recorded for the solution. Based on the outcome, the solution + * might be rewarded, slashed, or get all or a part of the deposit back. + * + * # + * Queue size must be provided as witness data. + * # + */ +export interface ElectionProviderMultiPhaseCall_submit { + __kind: 'submit' + rawSolution: RawSolution + numSignedSubmissions: number +} + +/** + * Submit a solution for the unsigned phase. + * + * The dispatch origin fo this call must be __none__. + * + * This submission is checked on the fly. Moreover, this unsigned solution is only + * validated when submitted to the pool from the **local** node. Effectively, this means + * that only active validators can submit this transaction when authoring a block (similar + * to an inherent). + * + * To prevent any incorrect solution (and thus wasted time/weight), this transaction will + * panic if the solution submitted by the validator is invalid in any way, effectively + * putting their authoring reward at risk. + * + * No deposit or reward is associated with this submission. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + rawSolution: RawSolution + witness: SolutionOrSnapshotSize +} + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export interface RawSolution { + compact: CompactAssignmentsWith24 + score: ElectionScore + round: number +} + +export interface CompactAssignmentsWith24 { + votes1: [NominatorIndexCompact, ValidatorIndexCompact][] + votes2: [NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact][] + votes3: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes4: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes5: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes6: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes7: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes8: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes9: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes10: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes11: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes12: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes13: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes14: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes15: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes16: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes17: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes18: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes19: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes20: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes21: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes22: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes23: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] + votes24: [NominatorIndexCompact, CompactScoreCompact[], ValidatorIndexCompact][] +} + +export type CompactScoreCompact = [ValidatorIndexCompact, OffchainAccuracyCompact] + +export type OffchainAccuracyCompact = number + +export type ValidatorIndexCompact = number + +export type NominatorIndexCompact = number + +export type ElectionScore = bigint[] + +export interface SolutionSupport { + total: ExtendedBalance + voters: [AccountId, ExtendedBalance][] +} + +export type ExtendedBalance = bigint + +export type DmpCall = never + +export type DemocracyCall = DemocracyCall_blacklist | DemocracyCall_cancel_proposal | DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. + * + * If called on a queued public or external proposal, then this will result in it being + * removed. If the `ref_index` supplied is an active referendum with the proposal hash, + * then it will be cancelled. + * + * The dispatch origin of this call must be `BlacklistOrigin`. + * + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. + * + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). + */ +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: Hash + maybeRefIndex?: (ReferendumIndex | undefined) +} + +/** + * Remove a proposal. + * + * The dispatch origin of this call must be `CancelProposalOrigin`. + * + * - `prop_index`: The index of the proposal to cancel. + * + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number +} + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: ReferendumIndex +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must + * not be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId + conviction: Conviction + balance: BalanceOf +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: ReferendumIndex +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: Hash + index: ReferendumIndex +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Weight: `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: Hash +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: Hash +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: Hash +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * `FastTrackVotingPeriod` if too low. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: Hash + votingPeriod: BlockNumber + delay: BlockNumber +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. When this call is successful, i.e. + * the preimage has not been uploaded before and matches some imminent proposal, + * no fee is paid. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * Weight: `O(p)` + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: Hash + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. + * Extrinsic is weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * Weight: `O(D)` where D is length of proposal. + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: Hash + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId + index: ReferendumIndex +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: ReferendumIndex +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * Weight: `O(S)` where S is the number of seconds a proposal already has. + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * Weight: `O(V + log(V))` where V is number of `existing vetoers` + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: Hash +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of referendums the voter has voted on. + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + value: AccountVoteSplit +} + +export interface AccountVote_Standard { + __kind: 'Standard' + value: AccountVoteStandard +} + +export interface AccountVoteStandard { + vote: Vote + balance: Balance +} + +export type Vote = number + +export interface AccountVoteSplit { + aye: Balance + nay: Balance +} + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +export type ReferendumIndex = number + +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * Add an optional memo to an existing crowdloan contribution. + * + * Origin must be Signed, and the user must have contributed to the crowdloan. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: ParaId + memo: Bytes +} + +/** + * Contribute to a crowd sale. This will transfer some balance over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * Create a new crowdloaning campaign for a parachain slot with the given lease period range. + * + * This applies a lock to your parachain configuration, ensuring that it cannot be changed + * by the parachain manager. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Remove a fund after the retirement period has ended and all funds have been returned. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * Edit the configuration for an in-progress crowdloan. + * + * Can only be called by Root origin. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Poke the fund into `NewRaise` + * + * Origin must be Signed, and the fund has non-zero raise. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: ParaId +} + +/** + * Automatically refund contributors of an ended crowdloan. + * Due to weight restrictions, this function may need to be called multiple + * times to fully refund all users. We will refund `RemoveKeysLimit` users at a time. + * + * Origin must be signed, but can come from anyone. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * Withdraw full balance of a specific contributor. + * + * Origin must be signed, but can come from anyone. + * + * The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement + * flag must be set. For a fund to be ready for retirement, then: + * - it must not already be in retirement; + * - the amount of raised funds must be bigger than the _free_ balance of the account; + * - and either: + * - the block number must be at least `end`; or + * - the current lease period must be greater than the fund's `last_period`. + * + * In this case, the fund's retirement flag is set and its `end` is reset to the current block + * number. + * + * - `who`: The account whose contribution should be withdrawn. + * - `index`: The parachain to whose crowdloan the contribution was made. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId + index: number +} + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: EcdsaSignature +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Ed25519Signature +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Sr25519Signature +} + +export type Sr25519Signature = Bytes + +export type Ed25519Signature = Bytes + +export type EcdsaSignature = Bytes + +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export type MemberCount = number + +export type ConfigurationCall = ConfigurationCall_set_chain_availability_period | ConfigurationCall_set_code_retention_period | ConfigurationCall_set_dispute_conclusion_by_time_out_period | ConfigurationCall_set_dispute_max_spam_slots | ConfigurationCall_set_dispute_period | ConfigurationCall_set_dispute_post_conclusion_acceptance_period | ConfigurationCall_set_group_rotation_frequency | ConfigurationCall_set_hrmp_channel_max_capacity | ConfigurationCall_set_hrmp_channel_max_message_size | ConfigurationCall_set_hrmp_channel_max_total_size | ConfigurationCall_set_hrmp_max_message_num_per_candidate | ConfigurationCall_set_hrmp_max_parachain_inbound_channels | ConfigurationCall_set_hrmp_max_parachain_outbound_channels | ConfigurationCall_set_hrmp_max_parathread_inbound_channels | ConfigurationCall_set_hrmp_max_parathread_outbound_channels | ConfigurationCall_set_hrmp_open_request_ttl | ConfigurationCall_set_hrmp_recipient_deposit | ConfigurationCall_set_hrmp_sender_deposit | ConfigurationCall_set_max_code_size | ConfigurationCall_set_max_downward_message_size | ConfigurationCall_set_max_head_data_size | ConfigurationCall_set_max_pov_size | ConfigurationCall_set_max_upward_message_num_per_candidate | ConfigurationCall_set_max_upward_message_size | ConfigurationCall_set_max_upward_queue_count | ConfigurationCall_set_max_upward_queue_size | ConfigurationCall_set_max_validators | ConfigurationCall_set_max_validators_per_core | ConfigurationCall_set_n_delay_tranches | ConfigurationCall_set_needed_approvals | ConfigurationCall_set_no_show_slots | ConfigurationCall_set_parathread_cores | ConfigurationCall_set_parathread_retries | ConfigurationCall_set_relay_vrf_modulo_samples | ConfigurationCall_set_scheduling_lookahead | ConfigurationCall_set_thread_availability_period | ConfigurationCall_set_ump_max_individual_weight | ConfigurationCall_set_ump_service_total_weight | ConfigurationCall_set_validation_upgrade_delay | ConfigurationCall_set_validation_upgrade_frequency | ConfigurationCall_set_zeroth_delay_tranche_width + +/** + * Set the availability period for parachains. + */ +export interface ConfigurationCall_set_chain_availability_period { + __kind: 'set_chain_availability_period' + new: BlockNumber +} + +/** + * Set the acceptance period for an included candidate. + */ +export interface ConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: BlockNumber +} + +/** + * Set the dispute conclusion by time out period. + */ +export interface ConfigurationCall_set_dispute_conclusion_by_time_out_period { + __kind: 'set_dispute_conclusion_by_time_out_period' + new: BlockNumber +} + +/** + * Set the maximum number of dispute spam slots. + */ +export interface ConfigurationCall_set_dispute_max_spam_slots { + __kind: 'set_dispute_max_spam_slots' + new: number +} + +/** + * Set the dispute period, in number of sessions to keep for disputes. + */ +export interface ConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: SessionIndex +} + +/** + * Set the dispute post conclusion acceptance period. + */ +export interface ConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: BlockNumber +} + +/** + * Set the parachain validator-group rotation frequency + */ +export interface ConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: BlockNumber +} + +/** + * Sets the maximum number of messages allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * Sets the maximum size of a message that could ever be put into an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * Sets the maximum total size of messages in bytes allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * Sets the maximum number of outbound HRMP messages can be sent by a candidate. + */ +export interface ConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parachain is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parachain is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parathread is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_inbound_channels { + __kind: 'set_hrmp_max_parathread_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parathread is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_outbound_channels { + __kind: 'set_hrmp_max_parathread_outbound_channels' + new: number +} + +/** + * Sets the number of sessions after which an HRMP open channel request expires. + */ +export interface ConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * Sets the amount of funds that the recipient should provide for accepting opening an HRMP + * channel. + */ +export interface ConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: Balance +} + +/** + * Sets the amount of funds that the sender should provide for opening an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: Balance +} + +/** + * Set the max validation code size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * Set the critical downward message size. + */ +export interface ConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * Set the max head data size for paras. + */ +export interface ConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * Set the max POV block size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * Sets the maximum number of messages that a candidate can contain. + */ +export interface ConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum size of an upward message that can be sent by a candidate. + */ +export interface ConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * Sets the maximum items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * Sets the maximum total size of items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * Set the maximum number of validators to use in parachain consensus. + */ +export interface ConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * Set the maximum number of validators to assign to any core. + */ +export interface ConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * Set the total number of delay tranches. + */ +export interface ConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * Set the number of validators needed to approve a block. + */ +export interface ConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * Set the no show slots, in number of number of consensus slots. + * Must be at least 1. + */ +export interface ConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * Set the number of parathread execution cores. + */ +export interface ConfigurationCall_set_parathread_cores { + __kind: 'set_parathread_cores' + new: number +} + +/** + * Set the number of retries for a particular parathread. + */ +export interface ConfigurationCall_set_parathread_retries { + __kind: 'set_parathread_retries' + new: number +} + +/** + * Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion. + */ +export interface ConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * Set the scheduling lookahead, in expected number of blocks at peak throughput. + */ +export interface ConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * Set the availability period for parathreads. + */ +export interface ConfigurationCall_set_thread_availability_period { + __kind: 'set_thread_availability_period' + new: BlockNumber +} + +/** + * Sets the maximum amount of weight any individual upward message may consume. + */ +export interface ConfigurationCall_set_ump_max_individual_weight { + __kind: 'set_ump_max_individual_weight' + new: Weight +} + +/** + * Sets the soft limit for the phase of dispatching dispatchable upward messages. + */ +export interface ConfigurationCall_set_ump_service_total_weight { + __kind: 'set_ump_service_total_weight' + new: Weight +} + +/** + * Set the validation upgrade delay. + */ +export interface ConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: BlockNumber +} + +/** + * Set the validation upgrade frequency. + */ +export interface ConfigurationCall_set_validation_upgrade_frequency { + __kind: 'set_validation_upgrade_frequency' + new: BlockNumber +} + +/** + * Set the zeroth delay tranche width. + */ +export interface ConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: BalanceOf + vestingSchedule?: ([BalanceOf, BalanceOf, BlockNumber] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId | undefined) +} + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export type EthereumAddress = Bytes + +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: LookupSource +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: LookupSource + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is malicious + * or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_all | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is + * not assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: LookupSource + dest: LookupSource + value: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also decrease the total issuance of the system (`TotalIssuance`). + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + * + * # + * - Independent of the arguments. + * - Contains a limited number of reads and writes. + * --------------------- + * - Base Weight: + * - Creating: 27.56 µs + * - Killing: 35.11 µs + * - DB Weight: 1 Read, 1 Write to `who` + * # + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: LookupSource + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * It will decrease the total issuance of the system by the `TransferFee`. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for + * input config types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional + * check that the transfer will not kill the origin account. + * --------------------------------- + * - Base Weight: 73.64 µs, worst case scenario (account created, account removed) + * - DB Weight: 1 Read and 1 Write to destination account + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: LookupSource + value: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). + * # + * - O(1). Just like transfer, but reading the user's transferable balance first. + * # + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: LookupSource + keepAlive: boolean +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + * # + * - Cheaper than transfer because account cannot be killed. + * - Base Weight: 51.4 µs + * - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already) + * # + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: LookupSource + value: bigint +} + +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Plan an epoch config change. The epoch config change is recorded and will be enacted on + * the next call to `enact_epoch_change`. The config will be activated one epoch after. + * Multiple calls to this method will replace any existing planned config change that had + * not been enacted yet. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: BabeEquivocationProof + keyOwnerProof: KeyOwnerProof +} + +export interface BabeEquivocationProof { + offender: AuthorityId + slotNumber: SlotNumber + firstHeader: Header + secondHeader: Header +} + +export type SlotNumber = bigint + +export type NextConfigDescriptor = NextConfigDescriptor_V0 | NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V0 { + __kind: 'V0' +} + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + value: NextConfigDescriptorV1 +} + +export interface NextConfigDescriptorV1 { + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Cancel an in-progress auction. + * + * Can only be called by Root origin. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: Hash + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Hash +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. + * Used for weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId[] + prime?: (AccountId | undefined) + oldCount: MemberCount +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: Hash + index: number + approve: boolean +} + +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: Key, + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => Key), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_changes_trie_config: sts.enumStruct({ + changesTrieConfig: sts.option(() => ChangesTrieConfiguration), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => KeyValue), + }), + } +}) + +export const KeyValue = sts.tuple(() => [StorageKey, StorageData]) + +export const StorageData = sts.bytes() + +export const StorageKey = sts.bytes() + +export const ChangesTrieConfiguration: sts.Type = sts.struct(() => { + return { + digestInterval: sts.number(), + digestLevels: sts.number(), + } +}) + +export const Key = sts.bytes() + +export const Perbill = sts.number() + +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: LookupSource, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: EraIndex, + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + controller: AccountId, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => LookupSource), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => LookupSource), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId, + era: EraIndex, + }), + reap_stash: sts.enumStruct({ + stash: AccountId, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: LookupSource, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_staking_limits: sts.enumStruct({ + minNominatorBond: BalanceOf, + minValidatorBond: BalanceOf, + maxNominatorCount: sts.option(() => sts.number()), + maxValidatorCount: sts.option(() => sts.number()), + threshold: sts.option(() => Percent), + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export const BalanceOf = sts.bigint() + +export const Percent = sts.number() + +export const EraIndex = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: BalanceOf, + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId, + judgement: SocietyJudgement, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: LookupSource, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId, + value: BalanceOf, + tip: BalanceOf, + }), + } +}) + +export const SocietyJudgement: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: ParaId, + }), + force_lease: sts.enumStruct({ + para: ParaId, + leaser: AccountId, + amount: BalanceOf, + periodBegin: LeasePeriodOf, + periodCount: LeasePeriodOf, + }), + trigger_onboard: sts.enumStruct({ + para: ParaId, + }), + } +}) + +export const LeasePeriodOf = sts.number() + +export const ParaId = sts.number() + +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: Keys, + proof: sts.bytes(), + }), + } +}) + +export const Keys = sts.tuple(() => [AccountId, AccountId, AccountId, AccountId, AccountId, AccountId]) + +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: BlockNumber, + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_138, + }), + schedule_after: sts.enumStruct({ + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_138, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_138, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: BlockNumber, + maybePeriodic: sts.option(() => Period), + priority: Priority, + call: Type_138, + }), + } +}) + +export const Priority = sts.number() + +export const Period = sts.tuple(() => [BlockNumber, sts.number()]) + +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + deregister: sts.enumStruct({ + id: ParaId, + }), + force_register: sts.enumStruct({ + who: AccountId, + deposit: BalanceOf, + id: ParaId, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + force_remove_lock: sts.enumStruct({ + para: ParaId, + }), + register: sts.enumStruct({ + id: ParaId, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + reserve: sts.unit(), + swap: sts.enumStruct({ + id: ParaId, + other: ParaId, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId, + call: Type_138, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId, + }), + claim_recovery: sts.enumStruct({ + account: AccountId, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId), + threshold: sts.number(), + delayPeriod: BlockNumber, + }), + initiate_recovery: sts.enumStruct({ + account: AccountId, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId, + rescuer: AccountId, + }), + } +}) + +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: AccountId, + proxyType: ProxyType, + delay: BlockNumber, + }), + announce: sts.enumStruct({ + real: AccountId, + callHash: CallHashOf, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + delay: BlockNumber, + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_138, + }), + proxy_announced: sts.enumStruct({ + delegate: AccountId, + real: AccountId, + forceProxyType: sts.option(() => ProxyType), + call: Type_138, + }), + reject_announcement: sts.enumStruct({ + delegate: AccountId, + callHash: CallHashOf, + }), + remove_announcement: sts.enumStruct({ + real: AccountId, + callHash: CallHashOf, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: AccountId, + proxyType: ProxyType, + delay: BlockNumber, + }), + } +}) + +export const CallHashOf = sts.bytes() + +export const PhragmenElectionCall: sts.Type = sts.closedEnum(() => { + return { + clean_defunct_voters: sts.enumStruct({ + numVoters: sts.number(), + numDefunct: sts.number(), + }), + remove_member: sts.enumStruct({ + who: LookupSource, + hasReplacement: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId), + value: sts.bigint(), + }), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + force_note_new_head: sts.enumStruct({ + para: ParaId, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: ParaId, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: ParaId, + newCode: ValidationCode, + relayParentNumber: BlockNumber, + }), + force_set_current_code: sts.enumStruct({ + para: ParaId, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: ParaId, + newHead: HeadData, + }), + } +}) + +export const ParaInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: ParachainsInherentData, + }), + } +}) + +export const ParachainsInherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => SignedAvailabilityBitfield), + backedCandidates: sts.array(() => BackedCandidate), + disputes: sts.array(() => DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: Hash, + number: sts.number(), + stateRoot: Hash, + extrinsicsRoot: Hash, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + AuthoritiesChange: sts.array(() => AuthorityId), + ChangesTrieRoot: Hash, + ChangesTrieSignal: ChangesTrieSignal, + Consensus: Consensus, + Other: sts.bytes(), + PreRuntime: PreRuntime, + RuntimeEnvironmentUpdated: sts.unit(), + Seal: Seal, + SealV0: SealV0, + } +}) + +export const SealV0 = sts.tuple(() => [sts.bigint(), Signature]) + +export const Signature = sts.bytes() + +export const Seal = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const PreRuntime = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const Consensus = sts.tuple(() => [ConsensusEngineId, sts.bytes()]) + +export const ConsensusEngineId = sts.bytes() + +export const ChangesTrieSignal: sts.Type = sts.closedEnum(() => { + return { + NewConfiguration: sts.option(() => ChangesTrieConfiguration), + } +}) + +export const AuthorityId = sts.bytes() + +export const DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: SessionIndex, + statements: sts.array(() => sts.tuple(() => [DisputeStatement, ParaValidatorIndex, ValidatorSignature])), + } +}) + +export const ValidatorSignature = sts.bytes() + +export const ParaValidatorIndex = sts.number() + +export const DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: InvalidDisputeStatementKind, + Valid: ValidDisputeStatementKind, + } +}) + +export const ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + BackingSeconded: Hash, + BackingValid: Hash, + Explicit: sts.unit(), + } +}) + +export const InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export const SessionIndex = sts.number() + +export const CandidateHash = sts.bytes() + +export const BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: CommittedCandidateReceipt, + validityVotes: sts.array(() => ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: ValidatorSignature, + Implicit: ValidatorSignature, + Never: sts.unit(), + } +}) + +export const CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: CandidateDescriptor, + commitments: CandidateCommitments, + } +}) + +export const CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => UpwardMessage), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: BlockNumber, + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: sts.number(), + data: sts.bytes(), + } +}) + +export const UpwardMessage = sts.bytes() + +export const CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: ParaId, + relayParent: RelayChainHash, + collatorId: CollatorId, + persistedValidationDataHash: Hash, + povHash: Hash, + erasureRoot: Hash, + signature: CollatorSignature, + paraHead: Hash, + validationCodeHash: ValidationCodeHash, + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const CollatorSignature = sts.bytes() + +export const CollatorId = sts.bytes() + +export const RelayChainHash = sts.bytes() + +export const SignedAvailabilityBitfield: sts.Type = sts.struct(() => { + return { + payload: sts.bitseq(), + validatorIndex: ParaValidatorIndex, + signature: ValidatorSignature, + } +}) + +export const ParaInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + maybeTimepoint: sts.option(() => Timepoint), + call: OpaqueCall, + storeCall: sts.boolean(), + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId), + call: Type_138, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const OpaqueCall = sts.bytes() + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: BlockNumber, + index: sts.number(), + } +}) + +export const InitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: BlockNumber, + }), + } +}) + +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: AccountIndex, + }), + force_transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: AccountIndex, + }), + freeze: sts.enumStruct({ + index: AccountIndex, + }), + transfer: sts.enumStruct({ + new: AccountId, + index: AccountIndex, + }), + } +}) + +export const AccountIndex = sts.number() + +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: Signature, + }), + } +}) + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: BlockNumber, + networkState: OpaqueNetworkState, + sessionIndex: SessionIndex, + authorityIndex: AuthIndex, + validatorsLen: sts.number(), + } +}) + +export const AuthIndex = sts.number() + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId, + }), + add_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: RegistrarIndex, + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: LookupSource, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: LookupSource, + judgement: IdentityJudgement, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: LookupSource, + }), + rename_sub: sts.enumStruct({ + sub: LookupSource, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: sts.bigint(), + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => IdentityInfoAdditional), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => H160), + image: Data, + twitter: Data, + } +}) + +export const IdentityInfoAdditional = sts.tuple(() => [Data, Data]) + +export const IdentityJudgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: Balance, + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export const RegistrarIndex = sts.number() + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: H256, + Keccak256: H256, + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: H256, + ShaThree256: H256, + } +}) + +export const HrmpCall: sts.Type = sts.closedEnum(() => { + return { + force_clean_hrmp: sts.enumStruct({ + para: ParaId, + }), + force_process_hrmp_close: sts.unit(), + force_process_hrmp_open: sts.unit(), + hrmp_accept_open_channel: sts.enumStruct({ + sender: ParaId, + }), + hrmp_cancel_open_request: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: ParaId, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: sts.number(), + receiver: sts.number(), + } +}) + +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: BlockNumber, + bestFinalizedBlockNumber: BlockNumber, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: GrandpaEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const KeyOwnerProof: sts.Type = sts.struct(() => { + return { + session: SessionIndex, + trieNodes: sts.array(() => sts.bytes()), + validatorCount: ValidatorCount, + } +}) + +export const ValidatorCount = sts.number() + +export const GrandpaEquivocationProof: sts.Type = sts.struct(() => { + return { + setId: SetId, + equivocation: GrandpaEquivocation, + } +}) + +export const GrandpaEquivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: GrandpaEquivocationValue, + Prevote: GrandpaEquivocationValue, + } +}) + +export const GrandpaEquivocationValue: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: AuthorityId, + first: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + second: sts.tuple(() => [GrandpaPrevote, AuthoritySignature]), + } +}) + +export const AuthoritySignature = sts.bytes() + +export const GrandpaPrevote: sts.Type = sts.struct(() => { + return { + targetHash: Hash, + targetNumber: BlockNumber, + } +}) + +export const SetId = sts.bigint() + +export const GiltCall: sts.Type = sts.closedEnum(() => { + return { + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + set_target: sts.enumStruct({ + target: sts.bigint(), + }), + thaw: sts.enumStruct({ + index: sts.number(), + }), + } +}) + +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + set_emergency_election_result: sts.enumStruct({ + supports: sts.array(() => sts.tuple(() => [AccountId, SolutionSupport])), + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => ElectionScore), + }), + submit: sts.enumStruct({ + rawSolution: RawSolution, + numSignedSubmissions: sts.number(), + }), + submit_unsigned: sts.enumStruct({ + rawSolution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export const RawSolution: sts.Type = sts.struct(() => { + return { + compact: CompactAssignmentsWith24, + score: ElectionScore, + round: sts.number(), + } +}) + +export const CompactAssignmentsWith24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [NominatorIndexCompact, ValidatorIndexCompact])), + votes2: sts.array(() => sts.tuple(() => [NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact])), + votes3: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes4: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes5: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes6: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes7: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes8: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes9: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes10: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes11: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes12: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes13: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes14: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes15: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes16: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes17: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes18: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes19: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes20: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes21: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes22: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes23: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + votes24: sts.array(() => sts.tuple(() => [NominatorIndexCompact, sts.array(() => CompactScoreCompact), ValidatorIndexCompact])), + } +}) + +export const CompactScoreCompact = sts.tuple(() => [ValidatorIndexCompact, OffchainAccuracyCompact]) + +export const OffchainAccuracyCompact = sts.number() + +export const ValidatorIndexCompact = sts.number() + +export const NominatorIndexCompact = sts.number() + +export const ElectionScore = sts.array(() => sts.bigint()) + +export const SolutionSupport: sts.Type = sts.struct(() => { + return { + total: ExtendedBalance, + voters: sts.array(() => sts.tuple(() => [AccountId, ExtendedBalance])), + } +}) + +export const ExtendedBalance = sts.bigint() + +export const DmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + blacklist: sts.enumStruct({ + proposalHash: Hash, + maybeRefIndex: sts.option(() => ReferendumIndex), + }), + cancel_proposal: sts.enumStruct({ + propIndex: sts.number(), + }), + cancel_queued: sts.enumStruct({ + which: ReferendumIndex, + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId, + conviction: Conviction, + balance: BalanceOf, + }), + emergency_cancel: sts.enumStruct({ + refIndex: ReferendumIndex, + }), + enact_proposal: sts.enumStruct({ + proposalHash: Hash, + index: ReferendumIndex, + }), + external_propose: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_default: sts.enumStruct({ + proposalHash: Hash, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: Hash, + }), + fast_track: sts.enumStruct({ + proposalHash: Hash, + votingPeriod: BlockNumber, + delay: BlockNumber, + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: Hash, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: Hash, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId, + index: ReferendumIndex, + }), + remove_vote: sts.enumStruct({ + index: ReferendumIndex, + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId, + }), + veto_external: sts.enumStruct({ + proposalHash: Hash, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: AccountVoteSplit, + Standard: AccountVoteStandard, + } +}) + +export const AccountVoteStandard: sts.Type = sts.struct(() => { + return { + vote: Vote, + balance: Balance, + } +}) + +export const Vote = sts.number() + +export const AccountVoteSplit: sts.Type = sts.struct(() => { + return { + aye: Balance, + nay: Balance, + } +}) + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export const ReferendumIndex = sts.number() + +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: ParaId, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: ParaId, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: EcdsaSignature, + Ed25519: Ed25519Signature, + Sr25519: Sr25519Signature, + } +}) + +export const Sr25519Signature = sts.bytes() + +export const Ed25519Signature = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: Hash, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: Hash, + }), + execute: sts.enumStruct({ + proposal: Proposal, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Proposal, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId), + prime: sts.option(() => AccountId), + oldCount: MemberCount, + }), + vote: sts.enumStruct({ + proposal: Hash, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +export const ConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_chain_availability_period: sts.enumStruct({ + new: BlockNumber, + }), + set_code_retention_period: sts.enumStruct({ + new: BlockNumber, + }), + set_dispute_conclusion_by_time_out_period: sts.enumStruct({ + new: BlockNumber, + }), + set_dispute_max_spam_slots: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: SessionIndex, + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: BlockNumber, + }), + set_group_rotation_frequency: sts.enumStruct({ + new: BlockNumber, + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: Balance, + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: Balance, + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_cores: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_retries: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_thread_availability_period: sts.enumStruct({ + new: BlockNumber, + }), + set_ump_max_individual_weight: sts.enumStruct({ + new: Weight, + }), + set_ump_service_total_weight: sts.enumStruct({ + new: Weight, + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: BlockNumber, + }), + set_validation_upgrade_frequency: sts.enumStruct({ + new: BlockNumber, + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: BalanceOf, + vestingSchedule: sts.option(() => sts.tuple(() => [BalanceOf, BalanceOf, BlockNumber])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export const EthereumAddress = sts.bytes() + +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: LookupSource, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: LookupSource, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: LookupSource, + dest: LookupSource, + value: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: LookupSource, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: LookupSource, + keepAlive: sts.boolean(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: LookupSource, + value: sts.bigint(), + }), + } +}) + +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: BabeEquivocationProof, + keyOwnerProof: KeyOwnerProof, + }), + } +}) + +export const BabeEquivocationProof: sts.Type = sts.struct(() => { + return { + offender: AuthorityId, + slotNumber: SlotNumber, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const SlotNumber = sts.bigint() + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V0: sts.unit(), + V1: NextConfigDescriptorV1, + } +}) + +export const NextConfigDescriptorV1: sts.Type = sts.struct(() => { + return { + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +export type Type_138 = Type_138_Auctions | Type_138_Authorship | Type_138_Babe | Type_138_Balances | Type_138_Bounties | Type_138_Claims | Type_138_Configuration | Type_138_Council | Type_138_Crowdloan | Type_138_Democracy | Type_138_Dmp | Type_138_ElectionProviderMultiPhase | Type_138_Gilt | Type_138_Grandpa | Type_138_Hrmp | Type_138_Identity | Type_138_ImOnline | Type_138_Indices | Type_138_Initializer | Type_138_Multisig | Type_138_ParaInclusion | Type_138_ParaInherent | Type_138_Paras | Type_138_ParasShared | Type_138_PhragmenElection | Type_138_Proxy | Type_138_Recovery | Type_138_Registrar | Type_138_Scheduler | Type_138_Session | Type_138_Slots | Type_138_Society | Type_138_Staking | Type_138_System | Type_138_TechnicalCommittee | Type_138_TechnicalMembership | Type_138_Timestamp | Type_138_Tips | Type_138_Treasury | Type_138_Ump | Type_138_Utility | Type_138_Vesting | Type_138_XcmPallet + +export interface Type_138_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Type_138_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Type_138_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Type_138_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Type_138_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Type_138_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Type_138_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Type_138_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Type_138_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Type_138_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Type_138_Dmp { + __kind: 'Dmp' + value: DmpCall +} + +export interface Type_138_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Type_138_Gilt { + __kind: 'Gilt' + value: GiltCall +} + +export interface Type_138_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Type_138_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Type_138_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Type_138_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Type_138_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Type_138_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Type_138_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Type_138_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Type_138_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Type_138_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Type_138_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Type_138_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Type_138_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Type_138_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Type_138_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Type_138_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Type_138_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Type_138_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Type_138_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Type_138_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Type_138_System { + __kind: 'System' + value: SystemCall +} + +export interface Type_138_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Type_138_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Type_138_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Type_138_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Type_138_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Type_138_Ump { + __kind: 'Ump' + value: UmpCall +} + +export interface Type_138_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Type_138_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Type_138_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId = sts.bytes() diff --git a/squid/src/types/v9111.ts b/squid/src/types/v9111.ts new file mode 100644 index 00000000..92721071 --- /dev/null +++ b/squid/src/types/v9111.ts @@ -0,0 +1,10976 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Call: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + BagsList: BagsListCall, + Balances: BalancesCall, + Bounties: BountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + Dmp: DmpCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + Gilt: GiltCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Initializer: InitializerCall, + Multisig: MultisigCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Paras: ParasCall, + ParasShared: ParasSharedCall, + PhragmenElection: PhragmenElectionCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Ump: UmpCall, + Utility: UtilityCall, + Vesting: VestingCall, + XcmPallet: XcmPalletCall, + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + execute: sts.enumStruct({ + message: Type_513, + maxWeight: sts.bigint(), + }), + force_default_xcm_version: sts.enumStruct({ + maybeXcmVersion: sts.option(() => sts.number()), + }), + force_subscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_unsubscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_xcm_version: sts.enumStruct({ + location: V1MultiLocation, + xcmVersion: sts.number(), + }), + reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + send: sts.enumStruct({ + dest: VersionedMultiLocation, + message: VersionedXcm, + }), + teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + } +}) + +export const VersionedXcm: sts.Type = sts.closedEnum(() => { + return { + V0: V0Xcm, + V1: V1Xcm, + V2: sts.array(() => V2Instruction), + } +}) + +export const V2Instruction: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => V2Instruction), + SetErrorHandler: sts.array(() => V2Instruction), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const DoubleEncoded: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncoded { + encoded: Bytes +} + +export const V0OriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type V0OriginKind = V0OriginKind_Native | V0OriginKind_SovereignAccount | V0OriginKind_Superuser | V0OriginKind_Xcm + +export interface V0OriginKind_Native { + __kind: 'Native' +} + +export interface V0OriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface V0OriginKind_Superuser { + __kind: 'Superuser' +} + +export interface V0OriginKind_Xcm { + __kind: 'Xcm' +} + +export const V2Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V2Error])), + Null: sts.unit(), + Version: sts.number(), + } +}) + +export const V2Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + MultiLocationFull: sts.unit(), + MultiLocationNotInvertible: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + TooExpensive: sts.unit(), + TooMuchWeightRequired: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + WeightLimitReached: sts.bigint(), + WeightNotComputable: sts.unit(), + } +}) + +export type V2Error = V2Error_AssetNotFound | V2Error_BadOrigin | V2Error_Barrier | V2Error_DestinationUnsupported | V2Error_ExceedsMaxMessageSize | V2Error_FailedToDecode | V2Error_FailedToTransactAsset | V2Error_InvalidLocation | V2Error_LocationCannotHold | V2Error_MultiLocationFull | V2Error_MultiLocationNotInvertible | V2Error_NotHoldingFees | V2Error_NotWithdrawable | V2Error_Overflow | V2Error_TooExpensive | V2Error_TooMuchWeightRequired | V2Error_Transport | V2Error_Trap | V2Error_UnhandledXcmVersion | V2Error_Unimplemented | V2Error_UnknownClaim | V2Error_Unroutable | V2Error_UntrustedReserveLocation | V2Error_UntrustedTeleportLocation | V2Error_WeightLimitReached | V2Error_WeightNotComputable + +export interface V2Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V2Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V2Error_Barrier { + __kind: 'Barrier' +} + +export interface V2Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V2Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V2Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V2Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V2Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V2Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V2Error_MultiLocationFull { + __kind: 'MultiLocationFull' +} + +export interface V2Error_MultiLocationNotInvertible { + __kind: 'MultiLocationNotInvertible' +} + +export interface V2Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V2Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V2Error_Overflow { + __kind: 'Overflow' +} + +export interface V2Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V2Error_TooMuchWeightRequired { + __kind: 'TooMuchWeightRequired' +} + +export interface V2Error_Transport { + __kind: 'Transport' +} + +export interface V2Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V2Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V2Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V2Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V2Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V2Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V2Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: bigint +} + +export interface V2Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V2Response = V2Response_Assets | V2Response_ExecutionResult | V2Response_Null | V2Response_Version + +export interface V2Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V2Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V2Error] | undefined) +} + +export interface V2Response_Null { + __kind: 'Null' +} + +export interface V2Response_Version { + __kind: 'Version' + value: number +} + +export interface V1MultiAsset { + id: V1AssetId + fun: V1Fungibility +} + +export type V1Fungibility = V1Fungibility_Fungible | V1Fungibility_NonFungible + +export interface V1Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V1Fungibility_NonFungible { + __kind: 'NonFungible' + value: V1AssetInstance +} + +export type V1AssetInstance = V1AssetInstance_Array16 | V1AssetInstance_Array32 | V1AssetInstance_Array4 | V1AssetInstance_Array8 | V1AssetInstance_Blob | V1AssetInstance_Index | V1AssetInstance_Undefined + +export interface V1AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V1AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V1AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V1AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V1AssetInstance_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface V1AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V1AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V1AssetId = V1AssetId_Abstract | V1AssetId_Concrete + +export interface V1AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V1AssetId_Concrete { + __kind: 'Concrete' + value: V1MultiLocation +} + +export interface V1MultiLocation { + parents: number + interior: V1Junctions +} + +export type V1Junctions = V1Junctions_Here | V1Junctions_X1 | V1Junctions_X2 | V1Junctions_X3 | V1Junctions_X4 | V1Junctions_X5 | V1Junctions_X6 | V1Junctions_X7 | V1Junctions_X8 + +export interface V1Junctions_Here { + __kind: 'Here' +} + +export interface V1Junctions_X1 { + __kind: 'X1' + value: V1Junction +} + +export interface V1Junctions_X2 { + __kind: 'X2' + value: [V1Junction, V1Junction] +} + +export interface V1Junctions_X3 { + __kind: 'X3' + value: [V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X4 { + __kind: 'X4' + value: [V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X5 { + __kind: 'X5' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X6 { + __kind: 'X6' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X7 { + __kind: 'X7' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X8 { + __kind: 'X8' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export type V1Junction = V1Junction_AccountId32 | V1Junction_AccountIndex64 | V1Junction_AccountKey20 | V1Junction_GeneralIndex | V1Junction_GeneralKey | V1Junction_OnlyChild | V1Junction_PalletInstance | V1Junction_Parachain | V1Junction_Plurality + +export interface V1Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V1Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V1Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V1Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V1Junction_GeneralKey { + __kind: 'GeneralKey' + value: Bytes +} + +export interface V1Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V1Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V1Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V1Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0BodyPart = V0BodyPart_AtLeastProportion | V0BodyPart_Fraction | V0BodyPart_Members | V0BodyPart_MoreThanProportion | V0BodyPart_Voice + +export interface V0BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V0BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V0BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Voice { + __kind: 'Voice' +} + +export type V0BodyId = V0BodyId_Executive | V0BodyId_Index | V0BodyId_Judicial | V0BodyId_Legislative | V0BodyId_Named | V0BodyId_Technical | V0BodyId_Unit + +export interface V0BodyId_Executive { + __kind: 'Executive' +} + +export interface V0BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V0BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V0BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V0BodyId_Named { + __kind: 'Named' + value: Bytes +} + +export interface V0BodyId_Technical { + __kind: 'Technical' +} + +export interface V0BodyId_Unit { + __kind: 'Unit' +} + +export type V0NetworkId = V0NetworkId_Any | V0NetworkId_Kusama | V0NetworkId_Named | V0NetworkId_Polkadot + +export interface V0NetworkId_Any { + __kind: 'Any' +} + +export interface V0NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V0NetworkId_Named { + __kind: 'Named' + value: Bytes +} + +export interface V0NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export const V1Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V1Junction, + X2: sts.tuple(() => [V1Junction, V1Junction]), + X3: sts.tuple(() => [V1Junction, V1Junction, V1Junction]), + X4: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction]), + X5: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X6: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X7: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X8: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + } +}) + +export const V1Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.bytes(), + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export const V0BodyId: sts.Type = sts.closedEnum(() => { + return { + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: sts.bytes(), + Technical: sts.unit(), + Unit: sts.unit(), + } +}) + +export const V0NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: sts.bytes(), + Polkadot: sts.unit(), + } +}) + +export const V1MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V1MultiAsset), + Wild: V1WildMultiAsset, + } +}) + +export const V1WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllOf: sts.enumStruct({ + id: V1AssetId, + fun: V1WildFungibility, + }), + } +}) + +export const V1WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V1WildFungibility = V1WildFungibility_Fungible | V1WildFungibility_NonFungible + +export interface V1WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V1WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V1AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V1MultiLocation, + } +}) + +export type V1WildMultiAsset = V1WildMultiAsset_All | V1WildMultiAsset_AllOf + +export interface V1WildMultiAsset_All { + __kind: 'All' +} + +export interface V1WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V1AssetId + fun: V1WildFungibility +} + +export type V1MultiAssetFilter = V1MultiAssetFilter_Definite | V1MultiAssetFilter_Wild + +export interface V1MultiAssetFilter_Definite { + __kind: 'Definite' + value: V1MultiAsset[] +} + +export interface V1MultiAssetFilter_Wild { + __kind: 'Wild' + value: V1WildMultiAsset +} + +export const V2WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: sts.bigint(), + Unlimited: sts.unit(), + } +}) + +export type V2WeightLimit = V2WeightLimit_Limited | V2WeightLimit_Unlimited + +export interface V2WeightLimit_Limited { + __kind: 'Limited' + value: bigint +} + +export interface V2WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V1MultiAsset: sts.Type = sts.struct(() => { + return { + id: V1AssetId, + fun: V1Fungibility, + } +}) + +export const V1Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V1AssetInstance, + } +}) + +export const V1AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V2Instruction = V2Instruction_BuyExecution | V2Instruction_ClaimAsset | V2Instruction_ClearError | V2Instruction_ClearOrigin | V2Instruction_DepositAsset | V2Instruction_DepositReserveAsset | V2Instruction_DescendOrigin | V2Instruction_ExchangeAsset | V2Instruction_HrmpChannelAccepted | V2Instruction_HrmpChannelClosing | V2Instruction_HrmpNewChannelOpenRequest | V2Instruction_InitiateReserveWithdraw | V2Instruction_InitiateTeleport | V2Instruction_QueryHolding | V2Instruction_QueryResponse | V2Instruction_ReceiveTeleportedAsset | V2Instruction_RefundSurplus | V2Instruction_ReportError | V2Instruction_ReserveAssetDeposited | V2Instruction_SetAppendix | V2Instruction_SetErrorHandler | V2Instruction_SubscribeVersion | V2Instruction_Transact | V2Instruction_TransferAsset | V2Instruction_TransferReserveAsset | V2Instruction_Trap | V2Instruction_UnsubscribeVersion | V2Instruction_WithdrawAsset + +export interface V2Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface V2Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface V2Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V2Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V2Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V2Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface V2Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V2Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V2Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V2Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V2Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface V2Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface V2Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface V2Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V2Instruction_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface V2Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface V2Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V2Instruction[] +} + +export interface V2Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V2Instruction[] +} + +export interface V2Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V2Instruction_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V2Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V2Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V2Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export const V1Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: V1Xcm, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + } +}) + +export const V1Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => V1Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type V1Order = V1Order_BuyExecution | V1Order_DepositAsset | V1Order_DepositReserveAsset | V1Order_ExchangeAsset | V1Order_InitiateReserveWithdraw | V1Order_InitiateTeleport | V1Order_Noop | V1Order_QueryHolding + +export interface V1Order_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: V1Xcm[] +} + +export interface V1Order_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V1Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V1Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_Noop { + __kind: 'Noop' +} + +export interface V1Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export const V1Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + Version: sts.number(), + } +}) + +export type V1Response = V1Response_Assets | V1Response_Version + +export interface V1Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V1Response_Version { + __kind: 'Version' + value: number +} + +export type V1Xcm = V1Xcm_HrmpChannelAccepted | V1Xcm_HrmpChannelClosing | V1Xcm_HrmpNewChannelOpenRequest | V1Xcm_QueryResponse | V1Xcm_ReceiveTeleportedAsset | V1Xcm_RelayedFrom | V1Xcm_ReserveAssetDeposited | V1Xcm_SubscribeVersion | V1Xcm_Transact | V1Xcm_TransferAsset | V1Xcm_TransferReserveAsset | V1Xcm_UnsubscribeVersion | V1Xcm_WithdrawAsset + +export interface V1Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V1Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V1Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V1Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface V1Xcm_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: V1Xcm +} + +export interface V1Xcm_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V1Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V1Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V1Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Xcm_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V1Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export const V0Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: V0Xcm, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + } +}) + +export const V0Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => V0Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type V0Order = V0Order_BuyExecution | V0Order_DepositAsset | V0Order_DepositReserveAsset | V0Order_ExchangeAsset | V0Order_InitiateReserveWithdraw | V0Order_InitiateTeleport | V0Order_Null | V0Order_QueryHolding + +export interface V0Order_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: V0Xcm[] +} + +export interface V0Order_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface V0Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_Null { + __kind: 'Null' +} + +export interface V0Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type V0MultiLocation = V0MultiLocation_Null | V0MultiLocation_X1 | V0MultiLocation_X2 | V0MultiLocation_X3 | V0MultiLocation_X4 | V0MultiLocation_X5 | V0MultiLocation_X6 | V0MultiLocation_X7 | V0MultiLocation_X8 + +export interface V0MultiLocation_Null { + __kind: 'Null' +} + +export interface V0MultiLocation_X1 { + __kind: 'X1' + value: V0Junction +} + +export interface V0MultiLocation_X2 { + __kind: 'X2' + value: [V0Junction, V0Junction] +} + +export interface V0MultiLocation_X3 { + __kind: 'X3' + value: [V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X4 { + __kind: 'X4' + value: [V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X5 { + __kind: 'X5' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X6 { + __kind: 'X6' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X7 { + __kind: 'X7' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X8 { + __kind: 'X8' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export type V0Junction = V0Junction_AccountId32 | V0Junction_AccountIndex64 | V0Junction_AccountKey20 | V0Junction_GeneralIndex | V0Junction_GeneralKey | V0Junction_OnlyChild | V0Junction_PalletInstance | V0Junction_Parachain | V0Junction_Parent | V0Junction_Plurality + +export interface V0Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V0Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V0Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V0Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V0Junction_GeneralKey { + __kind: 'GeneralKey' + value: Bytes +} + +export interface V0Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V0Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V0Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V0Junction_Parent { + __kind: 'Parent' +} + +export interface V0Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0MultiAsset = V0MultiAsset_AbstractFungible | V0MultiAsset_AbstractNonFungible | V0MultiAsset_All | V0MultiAsset_AllAbstractFungible | V0MultiAsset_AllAbstractNonFungible | V0MultiAsset_AllConcreteFungible | V0MultiAsset_AllConcreteNonFungible | V0MultiAsset_AllFungible | V0MultiAsset_AllNonFungible | V0MultiAsset_ConcreteFungible | V0MultiAsset_ConcreteNonFungible | V0MultiAsset_None + +export interface V0MultiAsset_AbstractFungible { + __kind: 'AbstractFungible' + id: Bytes + amount: bigint +} + +export interface V0MultiAsset_AbstractNonFungible { + __kind: 'AbstractNonFungible' + class: Bytes + instance: V1AssetInstance +} + +export interface V0MultiAsset_All { + __kind: 'All' +} + +export interface V0MultiAsset_AllAbstractFungible { + __kind: 'AllAbstractFungible' + id: Bytes +} + +export interface V0MultiAsset_AllAbstractNonFungible { + __kind: 'AllAbstractNonFungible' + class: Bytes +} + +export interface V0MultiAsset_AllConcreteFungible { + __kind: 'AllConcreteFungible' + id: V0MultiLocation +} + +export interface V0MultiAsset_AllConcreteNonFungible { + __kind: 'AllConcreteNonFungible' + class: V0MultiLocation +} + +export interface V0MultiAsset_AllFungible { + __kind: 'AllFungible' +} + +export interface V0MultiAsset_AllNonFungible { + __kind: 'AllNonFungible' +} + +export interface V0MultiAsset_ConcreteFungible { + __kind: 'ConcreteFungible' + id: V0MultiLocation + amount: bigint +} + +export interface V0MultiAsset_ConcreteNonFungible { + __kind: 'ConcreteNonFungible' + class: V0MultiLocation + instance: V1AssetInstance +} + +export interface V0MultiAsset_None { + __kind: 'None' +} + +export const V0MultiAsset: sts.Type = sts.closedEnum(() => { + return { + AbstractFungible: sts.enumStruct({ + id: sts.bytes(), + amount: sts.bigint(), + }), + AbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + instance: V1AssetInstance, + }), + All: sts.unit(), + AllAbstractFungible: sts.enumStruct({ + id: sts.bytes(), + }), + AllAbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + }), + AllConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + }), + AllConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + }), + AllFungible: sts.unit(), + AllNonFungible: sts.unit(), + ConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + amount: sts.bigint(), + }), + ConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + instance: V1AssetInstance, + }), + None: sts.unit(), + } +}) + +export const V0MultiLocation: sts.Type = sts.closedEnum(() => { + return { + Null: sts.unit(), + X1: V0Junction, + X2: sts.tuple(() => [V0Junction, V0Junction]), + X3: sts.tuple(() => [V0Junction, V0Junction, V0Junction]), + X4: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction]), + X5: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X6: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X7: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X8: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + } +}) + +export const V0Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.bytes(), + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Parent: sts.unit(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V0MultiAsset), + } +}) + +export type V0Response = V0Response_Assets + +export interface V0Response_Assets { + __kind: 'Assets' + value: V0MultiAsset[] +} + +export type V0Xcm = V0Xcm_HrmpChannelAccepted | V0Xcm_HrmpChannelClosing | V0Xcm_HrmpNewChannelOpenRequest | V0Xcm_QueryResponse | V0Xcm_RelayedFrom | V0Xcm_ReserveAssetDeposit | V0Xcm_TeleportAsset | V0Xcm_Transact | V0Xcm_TransferAsset | V0Xcm_TransferReserveAsset | V0Xcm_WithdrawAsset + +export interface V0Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V0Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V0Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V0Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface V0Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: V0Xcm +} + +export interface V0Xcm_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V0Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export type VersionedXcm = VersionedXcm_V0 | VersionedXcm_V1 | VersionedXcm_V2 + +export interface VersionedXcm_V0 { + __kind: 'V0' + value: V0Xcm +} + +export interface VersionedXcm_V1 { + __kind: 'V1' + value: V1Xcm +} + +export interface VersionedXcm_V2 { + __kind: 'V2' + value: V2Instruction[] +} + +export const VersionedMultiAssets: sts.Type = sts.closedEnum(() => { + return { + V0: sts.array(() => V0MultiAsset), + V1: sts.array(() => V1MultiAsset), + } +}) + +export type VersionedMultiAssets = VersionedMultiAssets_V0 | VersionedMultiAssets_V1 + +export interface VersionedMultiAssets_V0 { + __kind: 'V0' + value: V0MultiAsset[] +} + +export interface VersionedMultiAssets_V1 { + __kind: 'V1' + value: V1MultiAsset[] +} + +export const V1MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V1Junctions, + } +}) + +export const VersionedMultiLocation: sts.Type = sts.closedEnum(() => { + return { + V0: V0MultiLocation, + V1: V1MultiLocation, + } +}) + +export type VersionedMultiLocation = VersionedMultiLocation_V0 | VersionedMultiLocation_V1 + +export interface VersionedMultiLocation_V0 { + __kind: 'V0' + value: V0MultiLocation +} + +export interface VersionedMultiLocation_V1 { + __kind: 'V1' + value: V1MultiLocation +} + +export const Type_513: sts.Type = sts.closedEnum(() => { + return { + V0: Type_514, + V1: Type_519, + V2: sts.array(() => Type_525), + } +}) + +export const Type_525: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => Type_525), + SetErrorHandler: sts.array(() => Type_525), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_518, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const Type_518: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface Type_518 { + encoded: Bytes +} + +export type Type_525 = Type_525_BuyExecution | Type_525_ClaimAsset | Type_525_ClearError | Type_525_ClearOrigin | Type_525_DepositAsset | Type_525_DepositReserveAsset | Type_525_DescendOrigin | Type_525_ExchangeAsset | Type_525_HrmpChannelAccepted | Type_525_HrmpChannelClosing | Type_525_HrmpNewChannelOpenRequest | Type_525_InitiateReserveWithdraw | Type_525_InitiateTeleport | Type_525_QueryHolding | Type_525_QueryResponse | Type_525_ReceiveTeleportedAsset | Type_525_RefundSurplus | Type_525_ReportError | Type_525_ReserveAssetDeposited | Type_525_SetAppendix | Type_525_SetErrorHandler | Type_525_SubscribeVersion | Type_525_Transact | Type_525_TransferAsset | Type_525_TransferReserveAsset | Type_525_Trap | Type_525_UnsubscribeVersion | Type_525_WithdrawAsset + +export interface Type_525_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface Type_525_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface Type_525_ClearError { + __kind: 'ClearError' +} + +export interface Type_525_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_525_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_525_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_525_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface Type_525_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_525_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_525_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_525_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_525_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_525_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_525_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface Type_525_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface Type_525_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface Type_525_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_525_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface Type_525_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface Type_525_SetAppendix { + __kind: 'SetAppendix' + value: Type_525[] +} + +export interface Type_525_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_525[] +} + +export interface Type_525_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_525_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_518 +} + +export interface Type_525_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_525_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_525_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_525_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_525_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export const Type_519: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_521), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: Type_519, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_521), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_518, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_521), + }), + } +}) + +export const Type_521: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => Type_519), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type Type_521 = Type_521_BuyExecution | Type_521_DepositAsset | Type_521_DepositReserveAsset | Type_521_ExchangeAsset | Type_521_InitiateReserveWithdraw | Type_521_InitiateTeleport | Type_521_Noop | Type_521_QueryHolding + +export interface Type_521_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: Type_519[] +} + +export interface Type_521_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_521_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_521_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_521_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface Type_521_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_521_Noop { + __kind: 'Noop' +} + +export interface Type_521_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export type Type_519 = Type_519_HrmpChannelAccepted | Type_519_HrmpChannelClosing | Type_519_HrmpNewChannelOpenRequest | Type_519_QueryResponse | Type_519_ReceiveTeleportedAsset | Type_519_RelayedFrom | Type_519_ReserveAssetDeposited | Type_519_SubscribeVersion | Type_519_Transact | Type_519_TransferAsset | Type_519_TransferReserveAsset | Type_519_UnsubscribeVersion | Type_519_WithdrawAsset + +export interface Type_519_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_519_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_519_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_519_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface Type_519_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: Type_521[] +} + +export interface Type_519_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: Type_519 +} + +export interface Type_519_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: Type_521[] +} + +export interface Type_519_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_519_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_518 +} + +export interface Type_519_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_519_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_519_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_519_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: Type_521[] +} + +export const Type_514: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: Type_514, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_516), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_516), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_518, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_516), + }), + } +}) + +export const Type_516: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => Type_514), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type Type_516 = Type_516_BuyExecution | Type_516_DepositAsset | Type_516_DepositReserveAsset | Type_516_ExchangeAsset | Type_516_InitiateReserveWithdraw | Type_516_InitiateTeleport | Type_516_Null | Type_516_QueryHolding + +export interface Type_516_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: Type_514[] +} + +export interface Type_516_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_516_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_516_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface Type_516_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface Type_516_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_516_Null { + __kind: 'Null' +} + +export interface Type_516_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type Type_514 = Type_514_HrmpChannelAccepted | Type_514_HrmpChannelClosing | Type_514_HrmpNewChannelOpenRequest | Type_514_QueryResponse | Type_514_RelayedFrom | Type_514_ReserveAssetDeposit | Type_514_TeleportAsset | Type_514_Transact | Type_514_TransferAsset | Type_514_TransferReserveAsset | Type_514_WithdrawAsset + +export interface Type_514_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_514_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_514_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_514_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface Type_514_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: Type_514 +} + +export interface Type_514_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: Type_516[] +} + +export interface Type_514_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: Type_516[] +} + +export interface Type_514_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_518 +} + +export interface Type_514_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_514_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_514_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: Type_516[] +} + +export type Type_513 = Type_513_V0 | Type_513_V1 | Type_513_V2 + +export interface Type_513_V0 { + __kind: 'V0' + value: Type_514 +} + +export interface Type_513_V1 { + __kind: 'V1' + value: Type_519 +} + +export interface Type_513_V2 { + __kind: 'V2' + value: Type_525[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type XcmPalletCall = XcmPalletCall_execute | XcmPalletCall_force_default_xcm_version | XcmPalletCall_force_subscribe_version_notify | XcmPalletCall_force_unsubscribe_version_notify | XcmPalletCall_force_xcm_version | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets + +/** + * Execute an XCM message from a local, signed, origin. + * + * An event is deposited indicating whether `msg` could be executed completely or only + * partially. + * + * No more than `max_weight` will be used in its attempted execution. If this is less than the + * maximum amount of weight that the message could take to be executed, then no execution + * attempt will be made. + * + * NOTE: A successful return to this does *not* imply that the `msg` was executed successfully + * to completion; only that *some* of it was executed. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Type_513 + maxWeight: bigint +} + +/** + * Set a safe XCM version (the version that XCM should be encoded with if the most recent + * version a destination can accept is unknown). + * + * - `origin`: Must be Root. + * - `maybe_xcm_version`: The default XCM encoding version, or `None` to disable. + */ +export interface XcmPalletCall_force_default_xcm_version { + __kind: 'force_default_xcm_version' + maybeXcmVersion?: (number | undefined) +} + +/** + * Ask a location to notify us regarding their XCM version and any changes to it. + * + * - `origin`: Must be Root. + * - `location`: The location to which we should subscribe for XCM version notifications. + */ +export interface XcmPalletCall_force_subscribe_version_notify { + __kind: 'force_subscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Require that a particular destination should no longer notify us regarding any XCM + * version changes. + * + * - `origin`: Must be Root. + * - `location`: The location to which we are currently subscribed for XCM version + * notifications which we no longer desire. + */ +export interface XcmPalletCall_force_unsubscribe_version_notify { + __kind: 'force_unsubscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Extoll that a particular destination can be communicated with through a particular + * version of XCM. + * + * - `origin`: Must be Root. + * - `location`: The destination that is being described. + * - `xcm_version`: The latest version of XCM that `location` supports. + */ +export interface XcmPalletCall_force_xcm_version { + __kind: 'force_xcm_version' + location: V1MultiLocation + xcmVersion: number +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination chain and forward + * a notification XCM. + * + * Fee payment on the destination side is made from the first asset listed in the `assets` vector. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +export interface XcmPalletCall_send { + __kind: 'send' + dest: VersionedMultiLocation + message: VersionedXcm +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the first asset listed in the `assets` vector. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `dest_weight`: Equal to the total weight on `dest` of the XCM message + * `Teleport { assets, effects: [ BuyExecution{..}, DepositAsset{..} ] }`. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: MultiAddress, + target: MultiAddress, + schedule: VestingInfo, + }), + merge_schedules: sts.enumStruct({ + schedule1Index: sts.number(), + schedule2Index: sts.number(), + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: MultiAddress, + }), + vested_transfer: sts.enumStruct({ + target: MultiAddress, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: sts.bigint(), + perBlock: sts.bigint(), + startingBlock: sts.number(), + } +}) + +export interface VestingInfo { + locked: bigint + perBlock: bigint + startingBlock: number +} + +export const MultiAddress: sts.Type = sts.closedEnum(() => { + return { + Address20: sts.bytes(), + Address32: sts.bytes(), + Id: AccountId32, + Index: sts.unit(), + Raw: sts.bytes(), + } +}) + +export type MultiAddress = MultiAddress_Address20 | MultiAddress_Address32 | MultiAddress_Id | MultiAddress_Index | MultiAddress_Raw + +export interface MultiAddress_Address20 { + __kind: 'Address20' + value: Bytes +} + +export interface MultiAddress_Address32 { + __kind: 'Address32' + value: Bytes +} + +export interface MultiAddress_Id { + __kind: 'Id' + value: AccountId32 +} + +export interface MultiAddress_Index { + __kind: 'Index' +} + +export interface MultiAddress_Raw { + __kind: 'Raw' + value: Bytes +} + +export type AccountId32 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_merge_schedules | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: MultiAddress + target: MultiAddress + schedule: VestingInfo +} + +/** + * Merge two vesting schedules together, creating a new vesting schedule that unlocks over + * the highest possible start and end blocks. If both schedules have already started the + * current block will be used as the schedule start; with the caveat that if one schedule + * is finished by the current block, the other will be treated as the new merged schedule, + * unmodified. + * + * NOTE: If `schedule1_index == schedule2_index` this is a no-op. + * NOTE: This will unlock all schedules through the current block prior to merging. + * NOTE: If both schedules have ended by the current block, no new schedule will be created + * and both will be removed. + * + * Merged schedule attributes: + * - `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block, + * current_block)`. + * - `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`. + * - `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`. + * + * The dispatch origin for this call must be _Signed_. + * + * - `schedule1_index`: index of the first schedule to merge. + * - `schedule2_index`: index of the second schedule to merge. + */ +export interface VestingCall_merge_schedules { + __kind: 'merge_schedules' + schedule1Index: number + schedule2Index: number +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: MultiAddress +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account receiving the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: MultiAddress + schedule: VestingInfo +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Call, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Call), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Call +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Call[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Call[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UmpCall: sts.Type = sts.closedEnum(() => { + return { + service_overweight: sts.enumStruct({ + index: sts.bigint(), + weightLimit: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UmpCall = UmpCall_service_overweight + +/** + * Service a single overweight upward message. + * + * - `origin`: Must pass `ExecuteOverweightOrigin`. + * - `index`: The index of the overweight message to service. + * - `weight_limit`: The amount of weight that message execution may take. + * + * Errors: + * - `UnknownMessageIndex`: Message of `index` is unknown. + * - `WeightOverLimit`: Message execution may use greater than `weight_limit`. + * + * Events: + * - `OverweightServiced`: On success. + */ +export interface UmpCall_service_overweight { + __kind: 'service_overweight' + index: bigint + weightLimit: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: MultiAddress, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: MultiAddress +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TipsCall: sts.Type = sts.closedEnum(() => { + return { + close_tip: sts.enumStruct({ + hash: H256, + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId32, + }), + retract_tip: sts.enumStruct({ + hash: H256, + }), + slash_tip: sts.enumStruct({ + hash: H256, + }), + tip: sts.enumStruct({ + hash: H256, + tipValue: sts.bigint(), + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId32, + tipValue: sts.bigint(), + }), + } +}) + +export const H256 = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TipsCall = TipsCall_close_tip | TipsCall_report_awesome | TipsCall_retract_tip | TipsCall_slash_tip | TipsCall_tip | TipsCall_tip_new + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost + * depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TipsCall_close_tip { + __kind: 'close_tip' + hash: H256 +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId32 +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TipsCall_retract_tip { + __kind: 'retract_tip' + hash: H256 +} + +/** + * Remove and slash an already-open tip. + * + * May only be called from `T::RejectOrigin`. + * + * As a result, the finder is slashed and the deposits are lost. + * + * Emits `TipSlashed` if successful. + * + * # + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * # + */ +export interface TipsCall_slash_tip { + __kind: 'slash_tip' + hash: H256 +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`, insert tip and check closing, `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TipsCall_tip { + __kind: 'tip' + hash: H256 + tipValue: bigint +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of + * `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId32 + tipValue: bigint +} + +export type H256 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in + * `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId32, + }), + change_key: sts.enumStruct({ + new: AccountId32, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId32, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId32), + }), + set_prime: sts.enumStruct({ + who: AccountId32, + }), + swap_member: sts.enumStruct({ + remove: AccountId32, + add: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId32 +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId32 +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId32 +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId32[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId32 +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId32 + add: AccountId32 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: sts.bytes(), + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => sts.bytes()), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_changes_trie_config: sts.enumStruct({ + changesTrieConfig: sts.option(() => ChangesTrieConfiguration), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + }), + } +}) + +export const ChangesTrieConfiguration: sts.Type = sts.struct(() => { + return { + digestInterval: sts.number(), + digestLevels: sts.number(), + } +}) + +export interface ChangesTrieConfiguration { + digestInterval: number + digestLevels: number +} + +export const Perbill = sts.number() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_changes_trie_config | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + * + * # + * - `O(P)` where `P` amount of keys with prefix `prefix` + * - `P` storage deletions. + * - Base Weight: 0.834 * P µs + * - Writes: Number of subkeys + 1 + * # + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Bytes + subkeys: number +} + +/** + * Kill some items from storage. + * + * # + * - `O(IK)` where `I` length of `keys` and `K` length of one key + * - `I` storage deletions. + * - Base Weight: .378 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Bytes[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Make some on-chain remark and emit event. + * + * # + * - `O(b)` where b is the length of the remark. + * - 1 event. + * # + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * Set the new changes trie configuration. + * + * # + * - `O(1)` + * - 1 storage write or delete (codec `O(1)`). + * - 1 call to `deposit_log`: Uses `append` API, so O(1) + * - Base Weight: 7.218 µs + * - DB Weight: + * - Writes: Changes Trie, System Digest + * # + */ +export interface SystemCall_set_changes_trie_config { + __kind: 'set_changes_trie_config' + changesTrieConfig?: (ChangesTrieConfiguration | undefined) +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is + * expensive). + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very + * expensive. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full + * block. # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + * + * # + * - `O(1)` + * - 1 storage write. + * - Base Weight: 1.405 µs + * - 1 write to HEAP_PAGES + * - 1 digest item + * # + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + * + * # + * - `O(I)` where `I` length of `items` + * - `I` storage writes (`O(1)`). + * - Base Weight: 0.568 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: [Bytes, Bytes][] +} + +export type Perbill = number + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: MultiAddress, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: sts.number(), + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + controller: AccountId32, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => MultiAddress), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => MultiAddress), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + }), + reap_stash: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: MultiAddress, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId32), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_staking_limits: sts.enumStruct({ + minNominatorBond: sts.bigint(), + minValidatorBond: sts.bigint(), + maxNominatorCount: sts.option(() => sts.number()), + maxValidatorCount: sts.option(() => sts.number()), + threshold: sts.option(() => Percent), + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export const Percent = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_staking_limits | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: MultiAddress + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose + * any limitation on the amount that can be added. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + * + * # + * Complexity: O(U + S) + * with U unapplied slashes weighted with U=1000 + * and S is the number of slash indices to be canceled. + * - Read: Unapplied Slashes + * - Write: Unapplied Slashes + * # + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: number + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Declare a `controller` to stop participating as either a validator or nominator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_, but can be called by anyone. + * + * If the caller is the same as the controller being targeted, then no further checks are + * enforced, and this function behaves just like `chill`. + * + * If the caller is different than the controller being targeted, the following conditions + * must be met: + * * A `ChillThreshold` must be set and checked which defines how close to the max + * nominators or validators we must reach before users can start chilling one-another. + * * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine + * how close we are to the threshold. + * * A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines + * if this is a person that should be chilled because they have not met the threshold + * bond required. + * + * This can be helpful if bond requirements are updated, and we need to remove old users + * who do not satisfy these requirements. + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + controller: AccountId32 +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * # + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * Thus the election process may be ongoing when this is called. In this case the + * election will continue until the next era is triggered. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + * + * # + * O(S) where S is the number of slashing spans to be removed + * Reads: Bonded, Slashing Spans, Account, Locks + * Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, + * Account, Locks Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: MultiAddress[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS). + * - Both the reads and writes follow a similar pattern. + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: MultiAddress[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId32 + era: number +} + +/** + * Remove all data structure concerning a staker/stash once its balance is at the minimum. + * This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone + * and the target `stash` must have no funds left beyond the ED. + * + * This can be called from any origin. + * + * - `stash`: The stash account to reap. Its balance must be zero. + * + * # + * Complexity: O(S) where S is the number of slashing spans on the account. + * DB Weight: + * - Reads: Stash Account, Bonded, Slashing Spans, Locks + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, + * Stash Account, Locks + * - Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MAX_UNLOCKING_CHUNKS`. + * - Storage changes: Can't increase storage, only decrease it. + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: MultiAddress +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. This + * should report all the storage items that will be deleted by clearing old era history. + * Needed to report an accurate weight for the dispatch. Trusted by `Root` to report an + * accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Weight: O(E) + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, + * ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + * + * # + * - O(V) + * - Write: Invulnerables + * # + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId32[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Update the various staking limits this pallet. + * + * * `min_nominator_bond`: The minimum active bond needed to be a nominator. + * * `min_validator_bond`: The minimum active bond needed to be a validator. + * * `max_nominator_count`: The max number of users who can be a nominator at once. When + * set to `None`, no limit is enforced. + * * `max_validator_count`: The max number of users who can be a validator at once. When + * set to `None`, no limit is enforced. + * + * Origin must be Root to call this function. + * + * NOTE: Existing nominators and validators will not be affected by this update. + * to kick people under the new limits, `chill_other` should be called. + */ +export interface StakingCall_set_staking_limits { + __kind: 'set_staking_limits' + minNominatorBond: bigint + minValidatorBond: bigint + maxNominatorCount?: (number | undefined) + maxValidatorCount?: (number | undefined) + threshold?: (Percent | undefined) +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * If a user encounters the `InsufficientBond` error when calling this extrinsic, + * they should call `chill` first in order to free up their bonded funds. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * Complexity O(S) where S is the number of slashing spans to remove + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +export type Percent = number + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: sts.bigint(), + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId32, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId32, + judgement: Type_355, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId32, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: MultiAddress, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId32, + value: sts.bigint(), + tip: sts.bigint(), + }), + } +}) + +export const Type_355: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export type Type_355 = Type_355_Approve | Type_355_Rebid | Type_355_Reject + +export interface Type_355_Approve { + __kind: 'Approve' +} + +export interface Type_355_Rebid { + __kind: 'Rebid' +} + +export interface Type_355_Reject { + __kind: 'Reject' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: bigint +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * pallet to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId32 + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId32 + judgement: Type_355 +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin forgives + * (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to + * society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId32 + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured + * payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be approved (`true`) or + * rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: MultiAddress + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId32 + value: bigint + tip: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: Id, + }), + force_lease: sts.enumStruct({ + para: Id, + leaser: AccountId32, + amount: sts.bigint(), + periodBegin: sts.number(), + periodCount: sts.number(), + }), + trigger_onboard: sts.enumStruct({ + para: Id, + }), + } +}) + +export const Id = sts.number() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * Clear all leases for a Para Id, refunding any deposits back to the original owners. + * + * Can only be called by the Root origin. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: Id +} + +/** + * Just a connect into the `lease_out` call, in case Root wants to force some lease to happen + * independently of any other on-chain mechanism to use it. + * + * Can only be called by the Root origin. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: Id + leaser: AccountId32 + amount: bigint + periodBegin: number + periodCount: number +} + +/** + * Try to onboard a parachain that has a lease for the current lease period. + * + * This function can be useful if there was some state issue with a para that should + * have onboarded, but was unable to. As long as they have a lease period, we can + * let them onboard from here. + * + * Origin must be signed, but can be called by anyone. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: Id +} + +export type Id = number + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: SessionKeys, + proof: sts.bytes(), + }), + } +}) + +export const SessionKeys: sts.Type = sts.struct(() => { + return { + grandpa: Public, + babe: sts.bytes(), + imOnline: sts.bytes(), + paraValidator: sts.bytes(), + paraAssignment: V1Public, + authorityDiscovery: sts.bytes(), + } +}) + +export const V1Public = sts.bytes() + +export const Public = sts.bytes() + +export interface SessionKeys { + grandpa: Public + babe: Bytes + imOnline: Bytes + paraValidator: Bytes + paraAssignment: V1Public + authorityDiscovery: Bytes +} + +export type V1Public = Bytes + +export type Public = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)` in number of key types. Actual cost depends on the number of length + * of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)`. Actual cost depends on the number of length of + * `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: SessionKeys + proof: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: sts.number(), + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_after: sts.enumStruct({ + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.15 + 2.869 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: number + index: number +} + +/** + * Cancel a named scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 24.91 + 2.907 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.29 + .126 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda + * - Will use base weight of 25 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Schedule a named task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 29.6 + .159 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 35 which should be good for more than 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`](Self::schedule_named). + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + deregister: sts.enumStruct({ + id: Id, + }), + force_register: sts.enumStruct({ + who: AccountId32, + deposit: sts.bigint(), + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + force_remove_lock: sts.enumStruct({ + para: Id, + }), + register: sts.enumStruct({ + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + reserve: sts.unit(), + swap: sts.enumStruct({ + id: Id, + other: Id, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RegistrarCall = RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_force_remove_lock | RegistrarCall_register | RegistrarCall_reserve | RegistrarCall_swap + +/** + * Deregister a Para Id, freeing all data and returning any deposit. + * + * The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: Id +} + +/** + * Force the registration of a Para Id on the relay chain. + * + * This function must be called by a Root origin. + * + * The deposit taken can be specified for this registration. Any `ParaId` + * can be registered, including sub-1000 IDs which are System Parachains. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId32 + deposit: bigint + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Remove a manager lock from a para. This will allow the manager of a + * previously locked para to deregister or swap a para without using governance. + * + * Can only be called by the Root origin. + */ +export interface RegistrarCall_force_remove_lock { + __kind: 'force_remove_lock' + para: Id +} + +/** + * Register head data and validation code for a reserved Para Id. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. + * - `id`: The para ID. Must be owned/managed by the `origin` signing account. + * - `genesis_head`: The genesis head data of the parachain/thread. + * - `validation_code`: The initial validation code of the parachain/thread. + * + * ## Deposits/Fees + * The origin signed account must reserve a corresponding deposit for the registration. Anything already + * reserved previously for this para ID is accounted for. + * + * ## Events + * The `Registered` event is emitted in case of success. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Reserve a Para Id on the relay chain. + * + * This function will reserve a new Para Id to be owned/managed by the origin account. + * The origin account is able to register head data and validation code using `register` to create + * a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID. + * + * ## Deposits/Fees + * The origin must reserve a deposit of `ParaDeposit` for the registration. + * + * ## Events + * The `Reserved` event is emitted in case of success, which provides the ID reserved for use. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * Swap a parachain with another parachain or parathread. + * + * The origin must be Root, the `para` owner, or the `para` itself. + * + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: Id + other: Id +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId32, + call: Call, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId32, + }), + claim_recovery: sts.enumStruct({ + account: AccountId32, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId32, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId32), + threshold: sts.number(), + delayPeriod: sts.number(), + }), + initiate_recovery: sts.enumStruct({ + account: AccountId32, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId32, + rescuer: AccountId32, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId32, + rescuer: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + * + * # + * - The weight of the `call` + 10,000. + * - One storage lookup to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId32 + call: Call +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + * + * # + * - One storage mutation to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId32 +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully recovered by + * you. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + V) + * # + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId32 +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + * + * # + * Key: V (len of vouching friends) + * - One storage read/remove to get the active recovery process. O(1), Codec O(V) + * - One balance call to repatriate reserved. O(X) + * - One event. + * + * Total Complexity: O(V + X) + * # + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId32 +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. Should be + * ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt before the + * account can be recovered. Should be less than or equal to the length of the list of + * friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized that + * needs to pass before the account can be recovered. + * + * # + * - Key: F (len of friends) + * - One storage read to check that account is not already recoverable. O(1). + * - A check that the friends list is sorted and unique. O(F) + * - One currency reserve operation. O(X) + * - One storage write. O(1). Codec O(F). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId32[] + threshold: number + delayPeriod: number +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account needs to be + * recoverable (i.e. have a recovery configuration). + * + * # + * - One storage read to check that account is recoverable. O(F) + * - One storage read to check that this recovery process hasn't already started. O(1) + * - One currency reserve operation. O(X) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId32 +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + * + * # + * Key: F (len of friends) + * - One storage read to get the prefix iterator for active recoveries. O(1) + * - One storage read/remove to get the recovery configuration. O(1), Codec O(F) + * - One balance call to unreserved. O(X) + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + * + * # + * - One storage write O(1) + * - One event + * # + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId32 + rescuer: AccountId32 +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One binary search to confirm caller is a friend. O(logF) + * - One binary search to confirm caller has not already vouched. O(logV) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + logF + V + logV) + * # + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId32 + rescuer: AccountId32 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: AccountId32, + proxyType: ProxyType, + delay: sts.number(), + }), + announce: sts.enumStruct({ + real: AccountId32, + callHash: H256, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + delay: sts.number(), + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId32, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId32, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + proxy_announced: sts.enumStruct({ + delegate: AccountId32, + real: AccountId32, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + reject_announcement: sts.enumStruct({ + delegate: AccountId32, + callHash: H256, + }), + remove_announcement: sts.enumStruct({ + real: AccountId32, + callHash: H256, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: AccountId32, + proxyType: ProxyType, + delay: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: AccountId32 + proxyType: ProxyType + delay: number +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: AccountId32 + callHash: H256 +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + * TODO: Might be over counting 1 read + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: number + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId32 + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId32 + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Dispatch the given `call` from an account that the sender is authorized for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: AccountId32 + real: AccountId32 + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: AccountId32 + callHash: H256 +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: AccountId32 + callHash: H256 +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: AccountId32 + proxyType: ProxyType + delay: number +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PhragmenElectionCall: sts.Type = sts.closedEnum(() => { + return { + clean_defunct_voters: sts.enumStruct({ + numVoters: sts.number(), + numDefunct: sts.number(), + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + hasReplacement: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId32), + value: sts.bigint(), + }), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PhragmenElectionCall = PhragmenElectionCall_clean_defunct_voters | PhragmenElectionCall_remove_member | PhragmenElectionCall_remove_voter | PhragmenElectionCall_renounce_candidacy | PhragmenElectionCall_submit_candidacy | PhragmenElectionCall_vote + +/** + * Clean all voters who are defunct (i.e. they do not serve any purpose at all). The + * deposit of the removed voters are returned. + * + * This is an root function to be used only for cleaning the state. + * + * The dispatch origin of this call must be root. + * + * # + * The total number of voters and those that are defunct must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_clean_defunct_voters { + __kind: 'clean_defunct_voters' + numVoters: number + numDefunct: number +} + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, a new phragmen election is started. + * + * The dispatch origin of this call must be root. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement, we use a small weight. Else, since this is a root call and + * will go into phragmen, we assume full block for now. + * # + */ +export interface PhragmenElectionCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + hasReplacement: boolean +} + +/** + * Remove `origin` as a voter. + * + * This removes the lock and returns the deposit. + * + * The dispatch origin of this call must be signed and be a voter. + */ +export interface PhragmenElectionCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * + * - `origin` is a candidate and not elected in any set. In this case, the deposit is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the deposit is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the deposit is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_member`](Self::remove_member), if replacement runners exists, they + * are immediately used. If the prime is renouncing, then no prime will exist until the + * next round. + * + * The dispatch origin of this call must be signed, and have one of the above roles. + * + * # + * The type of renouncing must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Submit oneself for candidacy. A fixed amount of deposit is recorded. + * + * All candidates are wiped at the end of the term. They either become a member/runner-up, + * or leave the system while their deposit is slashed. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`] + * to get their deposit back. Losing the spot in an election will always lead to a slash. + * + * # + * The number of current candidates must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is + * reserved. The deposit is based on the number of votes and can be updated over time. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * If `value` is more than `who`'s total balance, then the maximum of the two is used. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * It is the responsibility of the caller to **NOT** place all of their balance into the + * lock and keep some for further operations. + * + * # + * We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less. + * # + */ +export interface PhragmenElectionCall_vote { + __kind: 'vote' + votes: AccountId32[] + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasSharedCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + force_note_new_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: Id, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + relayParentNumber: sts.number(), + }), + force_set_current_code: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasCall = ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head + +/** + * Note a new block head for para within the context of the current block. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: Id + newHead: HeadData +} + +/** + * Put a parachain directly into the next session's action queue. + * We can't queue it any sooner than this without going into the + * initializer... + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: Id +} + +/** + * Schedule an upgrade as if it was scheduled in the given relay parent block. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: Id + newCode: ValidationCode + relayParentNumber: number +} + +/** + * Set the storage for the parachain validation code immediately. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: Id + newCode: ValidationCode +} + +/** + * Set the storage for the current parachain head data immediately. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: Id + newHead: HeadData +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: V1InherentData, + }), + } +}) + +export const V1InherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => V1UncheckedSigned), + backedCandidates: sts.array(() => V1BackedCandidate), + disputes: sts.array(() => V1DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: H256, + number: sts.number(), + stateRoot: H256, + extrinsicsRoot: H256, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + ChangesTrieRoot: H256, + ChangesTrieSignal: ChangesTrieSignal, + Consensus: sts.tuple(() => [sts.bytes(), sts.bytes()]), + Other: sts.bytes(), + PreRuntime: sts.tuple(() => [sts.bytes(), sts.bytes()]), + RuntimeEnvironmentUpdated: sts.unit(), + Seal: sts.tuple(() => [sts.bytes(), sts.bytes()]), + } +}) + +export const ChangesTrieSignal: sts.Type = sts.closedEnum(() => { + return { + NewConfiguration: sts.option(() => ChangesTrieConfiguration), + } +}) + +export type ChangesTrieSignal = ChangesTrieSignal_NewConfiguration + +export interface ChangesTrieSignal_NewConfiguration { + __kind: 'NewConfiguration' + value?: (ChangesTrieConfiguration | undefined) +} + +export type DigestItem = DigestItem_ChangesTrieRoot | DigestItem_ChangesTrieSignal | DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal + +export interface DigestItem_ChangesTrieRoot { + __kind: 'ChangesTrieRoot' + value: H256 +} + +export interface DigestItem_ChangesTrieSignal { + __kind: 'ChangesTrieSignal' + value: ChangesTrieSignal +} + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: [Bytes, Bytes] +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: [Bytes, Bytes] +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: [Bytes, Bytes] +} + +export interface Digest { + logs: DigestItem[] +} + +export interface Header { + parentHash: H256 + number: number + stateRoot: H256 + extrinsicsRoot: H256 + digest: Digest +} + +export const V1DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: sts.number(), + statements: sts.array(() => sts.tuple(() => [V1DisputeStatement, V0ValidatorIndex, sts.bytes()])), + } +}) + +export const V0ValidatorIndex = sts.number() + +export const V1DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: V1InvalidDisputeStatementKind, + Valid: V1ValidDisputeStatementKind, + } +}) + +export const V1ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + BackingSeconded: H256, + BackingValid: H256, + Explicit: sts.unit(), + } +}) + +export type V1ValidDisputeStatementKind = V1ValidDisputeStatementKind_ApprovalChecking | V1ValidDisputeStatementKind_BackingSeconded | V1ValidDisputeStatementKind_BackingValid | V1ValidDisputeStatementKind_Explicit + +export interface V1ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface V1ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: H256 +} + +export interface V1ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: H256 +} + +export interface V1ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export const V1InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export type V1InvalidDisputeStatementKind = V1InvalidDisputeStatementKind_Explicit + +export interface V1InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type V1DisputeStatement = V1DisputeStatement_Invalid | V1DisputeStatement_Valid + +export interface V1DisputeStatement_Invalid { + __kind: 'Invalid' + value: V1InvalidDisputeStatementKind +} + +export interface V1DisputeStatement_Valid { + __kind: 'Valid' + value: V1ValidDisputeStatementKind +} + +export const CandidateHash = sts.bytes() + +export interface V1DisputeStatementSet { + candidateHash: CandidateHash + session: number + statements: [V1DisputeStatement, V0ValidatorIndex, Bytes][] +} + +export type V0ValidatorIndex = number + +export type CandidateHash = Bytes + +export const V1BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: V1CommittedCandidateReceipt, + validityVotes: sts.array(() => V0ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const V0ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.bytes(), + Implicit: sts.bytes(), + } +}) + +export type V0ValidityAttestation = V0ValidityAttestation_Explicit | V0ValidityAttestation_Implicit + +export interface V0ValidityAttestation_Explicit { + __kind: 'Explicit' + value: Bytes +} + +export interface V0ValidityAttestation_Implicit { + __kind: 'Implicit' + value: Bytes +} + +export const V1CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: V1CandidateDescriptor, + commitments: V1CandidateCommitments, + } +}) + +export const V1CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => sts.bytes()), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: sts.number(), + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: Id, + data: sts.bytes(), + } +}) + +export interface OutboundHrmpMessage { + recipient: Id + data: Bytes +} + +export interface V1CandidateCommitments { + upwardMessages: Bytes[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: number +} + +export const V1CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: Id, + relayParent: H256, + collator: V0Public, + persistedValidationDataHash: H256, + povHash: H256, + erasureRoot: H256, + signature: V0Signature, + paraHead: H256, + validationCodeHash: ValidationCodeHash, + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const V0Signature = sts.bytes() + +export const V0Public = sts.bytes() + +export interface V1CandidateDescriptor { + paraId: Id + relayParent: H256 + collator: V0Public + persistedValidationDataHash: H256 + povHash: H256 + erasureRoot: H256 + signature: V0Signature + paraHead: H256 + validationCodeHash: ValidationCodeHash +} + +export type ValidationCodeHash = Bytes + +export type V0Signature = Bytes + +export type V0Public = Bytes + +export interface V1CommittedCandidateReceipt { + descriptor: V1CandidateDescriptor + commitments: V1CandidateCommitments +} + +export interface V1BackedCandidate { + candidate: V1CommittedCandidateReceipt + validityVotes: V0ValidityAttestation[] + validatorIndices: BitSequence +} + +export const V1UncheckedSigned: sts.Type = sts.struct(() => { + return { + payload: V1AvailabilityBitfield, + validatorIndex: V0ValidatorIndex, + signature: sts.bytes(), + } +}) + +export const V1AvailabilityBitfield = sts.bitseq() + +export interface V1UncheckedSigned { + payload: V1AvailabilityBitfield + validatorIndex: V0ValidatorIndex + signature: Bytes +} + +export type V1AvailabilityBitfield = BitSequence + +export interface V1InherentData { + bitfields: V1UncheckedSigned[] + backedCandidates: V1BackedCandidate[] + disputes: V1DisputeStatementSet[] + parentHeader: Header +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInherentCall = ParaInherentCall_enter + +/** + * Enter the paras inherent. This will process bitfields and backed candidates. + */ +export interface ParaInherentCall_enter { + __kind: 'enter' + data: V1InherentData +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInclusionCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: sts.bigint(), + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + call: sts.bytes(), + storeCall: sts.boolean(), + maxWeight: sts.bigint(), + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId32), + call: Call, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: sts.number(), + index: sts.number(), + } +}) + +export interface Timepoint { + height: number + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: bigint +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + call: Bytes + storeCall: boolean + maxWeight: bigint +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId32[] + call: Call +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId32[] + timepoint: Timepoint + callHash: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const InitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type InitializerCall = InitializerCall_force_approve + +/** + * Issue a signal to the consensus engine to forcibly act as though all parachain + * blocks in all relay chain blocks up to and including the given number in the current + * chain are valid and should be finalized. + */ +export interface InitializerCall_force_approve { + __kind: 'force_approve' + upTo: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: sts.number(), + }), + force_transfer: sts.enumStruct({ + new: AccountId32, + index: sts.number(), + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: sts.number(), + }), + freeze: sts.enumStruct({ + index: sts.number(), + }), + transfer: sts.enumStruct({ + new: AccountId32, + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: number +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId32 + index: number + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: number +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the + * deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: number +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: sts.bytes(), + }), + } +}) + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: sts.number(), + networkState: OpaqueNetworkState, + sessionIndex: sts.number(), + authorityIndex: sts.number(), + validatorsLen: sts.number(), + } +}) + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export interface Heartbeat { + blockNumber: number + networkState: OpaqueNetworkState + sessionIndex: number + authorityIndex: number + validatorsLen: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is + * length of `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Bytes +} + +/** + * Identity pallet declaration. + */ +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId32, + }), + add_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: sts.number(), + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: MultiAddress, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: MultiAddress, + judgement: Judgement, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: MultiAddress, + }), + rename_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId32, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: BitFlags, + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId32, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => sts.tuple(() => [Data, Data])), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => sts.bytes()), + image: Data, + twitter: Data, + } +}) + +export interface IdentityInfo { + additional: [Data, Data][] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (Bytes | undefined) + image: Data + twitter: Data +} + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: Bytes +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: Bytes +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: Bytes +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: Bytes +} + +export const BitFlags = sts.bigint() + +export const Judgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: sts.bigint(), + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export type Judgement = Judgement_Erroneous | Judgement_FeePaid | Judgement_KnownGood | Judgement_LowQuality | Judgement_OutOfDate | Judgement_Reasonable | Judgement_Unknown + +export interface Judgement_Erroneous { + __kind: 'Erroneous' +} + +export interface Judgement_FeePaid { + __kind: 'FeePaid' + value: bigint +} + +export interface Judgement_KnownGood { + __kind: 'KnownGood' +} + +export interface Judgement_LowQuality { + __kind: 'LowQuality' +} + +export interface Judgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface Judgement_Reasonable { + __kind: 'Reasonable' +} + +export interface Judgement_Unknown { + __kind: 'Unknown' +} + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: sts.bytes(), + Keccak256: sts.bytes(), + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: sts.bytes(), + ShaThree256: sts.bytes(), + } +}) + +/** + * Identity pallet declaration. + */ +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId32 +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: MultiAddress + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: number +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: MultiAddress +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: MultiAddress + judgement: Judgement +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: MultiAddress +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: MultiAddress + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId32 +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: BitFlags +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId32, Data][] +} + +export type BitFlags = bigint + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const HrmpCall: sts.Type = sts.closedEnum(() => { + return { + force_clean_hrmp: sts.enumStruct({ + para: Id, + }), + force_process_hrmp_close: sts.unit(), + force_process_hrmp_open: sts.unit(), + hrmp_accept_open_channel: sts.enumStruct({ + sender: Id, + }), + hrmp_cancel_open_request: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: Id, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: Id, + recipient: Id, + } +}) + +export interface HrmpChannelId { + sender: Id + recipient: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type HrmpCall = HrmpCall_force_clean_hrmp | HrmpCall_force_process_hrmp_close | HrmpCall_force_process_hrmp_open | HrmpCall_hrmp_accept_open_channel | HrmpCall_hrmp_cancel_open_request | HrmpCall_hrmp_close_channel | HrmpCall_hrmp_init_open_channel + +/** + * This extrinsic triggers the cleanup of all the HRMP storage items that + * a para may have. Normally this happens once per session, but this allows + * you to trigger the cleanup immediately for a specific parachain. + * + * Origin must be Root. + */ +export interface HrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: Id +} + +/** + * Force process HRMP close channel requests. + * + * If there are pending HRMP close channel requests, you can use this + * function process all of those requests immediately. + */ +export interface HrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' +} + +/** + * Force process HRMP open channel requests. + * + * If there are pending HRMP open channel requests, you can use this + * function process all of those requests immediately. + */ +export interface HrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' +} + +/** + * Accept a pending open channel request from the given sender. + * + * The channel will be opened only on the next session boundary. + */ +export interface HrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: Id +} + +/** + * This cancels a pending open channel request. It can be canceled be either of the sender + * or the recipient for that request. The origin must be either of those. + * + * The cancelling happens immediately. It is not possible to cancel the request if it is + * already accepted. + */ +export interface HrmpCall_hrmp_cancel_open_request { + __kind: 'hrmp_cancel_open_request' + channelId: HrmpChannelId +} + +/** + * Initiate unilateral closing of a channel. The origin must be either the sender or the + * recipient in the channel being closed. + * + * The closure can only happen on a session change. + */ +export interface HrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * Initiate opening a channel from a parachain to a given recipient with given channel + * parameters. + * + * - `proposed_max_capacity` - specifies how many messages can be in the channel at once. + * - `proposed_max_message_size` - specifies the maximum size of the messages. + * + * These numbers are a subject to the relay-chain configuration limits. + * + * The channel can be opened only after the recipient confirms it and only on a session + * change. + */ +export interface HrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: Id + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: sts.number(), + bestFinalizedBlockNumber: sts.number(), + }), + report_equivocation: sts.enumStruct({ + equivocationProof: Type_251, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_251, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: sts.number(), + trieNodes: sts.array(() => sts.bytes()), + validatorCount: sts.number(), + } +}) + +export interface MembershipProof { + session: number + trieNodes: Bytes[] + validatorCount: number +} + +export const Type_251: sts.Type = sts.struct(() => { + return { + setId: sts.bigint(), + equivocation: Equivocation, + } +}) + +export const Equivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: Type_258, + Prevote: Type_253, + } +}) + +export const Type_253: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Prevote, sts.bytes()]), + second: sts.tuple(() => [Prevote, sts.bytes()]), + } +}) + +export const Prevote: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Prevote { + targetHash: H256 + targetNumber: number +} + +export interface Type_253 { + roundNumber: bigint + identity: Public + first: [Prevote, Bytes] + second: [Prevote, Bytes] +} + +export const Type_258: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Precommit, sts.bytes()]), + second: sts.tuple(() => [Precommit, sts.bytes()]), + } +}) + +export const Precommit: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Precommit { + targetHash: H256 + targetNumber: number +} + +export interface Type_258 { + roundNumber: bigint + identity: Public + first: [Precommit, Bytes] + second: [Precommit, Bytes] +} + +export type Equivocation = Equivocation_Precommit | Equivocation_Prevote + +export interface Equivocation_Precommit { + __kind: 'Precommit' + value: Type_258 +} + +export interface Equivocation_Prevote { + __kind: 'Prevote' + value: Type_253 +} + +export interface Type_251 { + setId: bigint + equivocation: Equivocation +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has + * stalled. This will trigger a forced authority set change at the beginning + * of the next session, to be enacted `delay` blocks after that. The delay + * should be high enough to safely assume that the block signalling the + * forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters + * will start the new authority set using the given finalized block as base. + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: number + bestFinalizedBlockNumber: number +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_251 + keyOwnerProof: MembershipProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_251 + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GiltCall: sts.Type = sts.closedEnum(() => { + return { + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + set_target: sts.enumStruct({ + target: sts.bigint(), + }), + thaw: sts.enumStruct({ + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GiltCall = GiltCall_place_bid | GiltCall_retract_bid | GiltCall_set_target | GiltCall_thaw + +/** + * Place a bid for a gilt to be issued. + * + * Origin must be Signed, and account must have at least `amount` in free balance. + * + * - `amount`: The amount of the bid; these funds will be reserved. If the bid is + * successfully elevated into an issued gilt, then these funds will continue to be + * reserved until the gilt expires. Must be at least `MinFreeze`. + * - `duration`: The number of periods for which the funds will be locked if the gilt is + * issued. It will expire only after this period has elapsed after the point of issuance. + * Must be greater than 1 and no more than `QueueCount`. + * + * Complexities: + * - `Queues[duration].len()` (just take max). + */ +export interface GiltCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * Retract a previously placed bid. + * + * Origin must be Signed, and the account should have previously issued a still-active bid + * of `amount` for `duration`. + * + * - `amount`: The amount of the previous bid. + * - `duration`: The duration of the previous bid. + */ +export interface GiltCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * Set target proportion of gilt-funds. + * + * Origin must be `AdminOrigin`. + * + * - `target`: The target proportion of effective issued funds that should be under gilts + * at any one time. + */ +export interface GiltCall_set_target { + __kind: 'set_target' + target: bigint +} + +/** + * Remove an active but expired gilt. Reserved funds under gilt are freed and balance is + * adjusted to ensure that the funds grow or shrink to maintain the equivalent proportion + * of effective total issued funds. + * + * Origin must be Signed and the account must be the owner of the gilt of the given index. + * + * - `index`: The index of the gilt to be thawed. + */ +export interface GiltCall_thaw { + __kind: 'thaw' + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + set_emergency_election_result: sts.enumStruct({ + supports: sts.array(() => sts.tuple(() => [AccountId32, Support])), + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => sts.array(() => sts.bigint())), + }), + submit: sts.enumStruct({ + rawSolution: RawSolution, + numSignedSubmissions: sts.number(), + }), + submit_unsigned: sts.enumStruct({ + rawSolution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export const RawSolution: sts.Type = sts.struct(() => { + return { + solution: NposCompactSolution24, + score: sts.array(() => sts.bigint()), + round: sts.number(), + } +}) + +export const NposCompactSolution24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), + votes2: sts.array(() => sts.tuple(() => [sts.number(), sts.tuple(() => [sts.number(), sts.number()]), sts.number()])), + votes3: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes4: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes5: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes6: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes7: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes8: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes9: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes10: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes11: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes12: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes13: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes14: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes15: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes16: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes17: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes18: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes19: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes20: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes21: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes22: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes23: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes24: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + } +}) + +export interface NposCompactSolution24 { + votes1: [number, number][] + votes2: [number, [number, number], number][] + votes3: [number, [number, number][], number][] + votes4: [number, [number, number][], number][] + votes5: [number, [number, number][], number][] + votes6: [number, [number, number][], number][] + votes7: [number, [number, number][], number][] + votes8: [number, [number, number][], number][] + votes9: [number, [number, number][], number][] + votes10: [number, [number, number][], number][] + votes11: [number, [number, number][], number][] + votes12: [number, [number, number][], number][] + votes13: [number, [number, number][], number][] + votes14: [number, [number, number][], number][] + votes15: [number, [number, number][], number][] + votes16: [number, [number, number][], number][] + votes17: [number, [number, number][], number][] + votes18: [number, [number, number][], number][] + votes19: [number, [number, number][], number][] + votes20: [number, [number, number][], number][] + votes21: [number, [number, number][], number][] + votes22: [number, [number, number][], number][] + votes23: [number, [number, number][], number][] + votes24: [number, [number, number][], number][] +} + +export interface RawSolution { + solution: NposCompactSolution24 + score: bigint[] + round: number +} + +export const Support: sts.Type = sts.struct(() => { + return { + total: sts.bigint(), + voters: sts.array(() => sts.tuple(() => [AccountId32, sts.bigint()])), + } +}) + +export interface Support { + total: bigint + voters: [AccountId32, bigint][] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * Set a solution in the queue, to be handed out to the client of this pallet in the next + * call to `ElectionProvider::elect`. + * + * This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`. + * + * The solution is not checked for any feasibility and is assumed to be trustworthy, as any + * feasibility check itself can in principle cause the election process to fail (due to + * memory/weight constrains). + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + supports: [AccountId32, Support][] +} + +/** + * Set a new value for `MinimumUntrustedScore`. + * + * Dispatch origin must be aligned with `T::ForceOrigin`. + * + * This check can be turned off by setting the value to `None`. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (bigint[] | undefined) +} + +/** + * Submit a solution for the signed phase. + * + * The dispatch origin fo this call must be __signed__. + * + * The solution is potentially queued, based on the claimed score and processed at the end + * of the signed phase. + * + * A deposit is reserved and recorded for the solution. Based on the outcome, the solution + * might be rewarded, slashed, or get all or a part of the deposit back. + * + * # + * Queue size must be provided as witness data. + * # + */ +export interface ElectionProviderMultiPhaseCall_submit { + __kind: 'submit' + rawSolution: RawSolution + numSignedSubmissions: number +} + +/** + * Submit a solution for the unsigned phase. + * + * The dispatch origin fo this call must be __none__. + * + * This submission is checked on the fly. Moreover, this unsigned solution is only + * validated when submitted to the pool from the **local** node. Effectively, this means + * that only active validators can submit this transaction when authoring a block (similar + * to an inherent). + * + * To prevent any incorrect solution (and thus wasted time/weight), this transaction will + * panic if the solution submitted by the validator is invalid in any way, effectively + * putting their authoring reward at risk. + * + * No deposit or reward is associated with this submission. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + rawSolution: RawSolution + witness: SolutionOrSnapshotSize +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DmpCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + blacklist: sts.enumStruct({ + proposalHash: H256, + maybeRefIndex: sts.option(() => sts.number()), + }), + cancel_proposal: sts.enumStruct({ + propIndex: sts.number(), + }), + cancel_queued: sts.enumStruct({ + which: sts.number(), + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId32, + conviction: Conviction, + balance: sts.bigint(), + }), + emergency_cancel: sts.enumStruct({ + refIndex: sts.number(), + }), + enact_proposal: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + }), + external_propose: sts.enumStruct({ + proposalHash: H256, + }), + external_propose_default: sts.enumStruct({ + proposalHash: H256, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: H256, + }), + fast_track: sts.enumStruct({ + proposalHash: H256, + votingPeriod: sts.number(), + delay: sts.number(), + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: H256, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: H256, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId32, + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + index: sts.number(), + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId32, + }), + veto_external: sts.enumStruct({ + proposalHash: H256, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface AccountVote_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DemocracyCall = DemocracyCall_blacklist | DemocracyCall_cancel_proposal | DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. + * + * If called on a queued public or external proposal, then this will result in it being + * removed. If the `ref_index` supplied is an active referendum with the proposal hash, + * then it will be cancelled. + * + * The dispatch origin of this call must be `BlacklistOrigin`. + * + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. + * + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). + */ +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: H256 + maybeRefIndex?: (number | undefined) +} + +/** + * Remove a proposal. + * + * The dispatch origin of this call must be `CancelProposalOrigin`. + * + * - `prop_index`: The index of the proposal to cancel. + * + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number +} + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: number +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must not + * be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId32 + conviction: Conviction + balance: bigint +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: number +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: H256 + index: number +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Weight: `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: H256 +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: H256 +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: H256 +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * `FastTrackVotingPeriod` if too low. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: H256 + votingPeriod: number + delay: number +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. When this call is successful, i.e. + * the preimage has not been uploaded before and matches some imminent proposal, + * no fee is paid. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * Weight: `O(p)` + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: H256 + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. Extrinsic is + * weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * Weight: `O(D)` where D is length of proposal. + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: H256 + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId32 + index: number +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: number +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * Weight: `O(S)` where S is the number of seconds a proposal already has. + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId32 +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * Weight: `O(V + log(V))` where V is number of `existing vetoers` + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: H256 +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of referendums the voter has voted on. + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: Id, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: Id, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId32, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: Signature, + } +}) + +export const Signature = sts.bytes() + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Signature +} + +export type Signature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * Add an optional memo to an existing crowdloan contribution. + * + * Origin must be Signed, and the user must have contributed to the crowdloan. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: Id + memo: Bytes +} + +/** + * Contribute to a crowd sale. This will transfer some balance over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * Create a new crowdloaning campaign for a parachain slot with the given lease period range. + * + * This applies a lock to your parachain configuration, ensuring that it cannot be changed + * by the parachain manager. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Remove a fund after the retirement period has ended and all funds have been returned. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * Edit the configuration for an in-progress crowdloan. + * + * Can only be called by Root origin. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Poke the fund into `NewRaise` + * + * Origin must be Signed, and the fund has non-zero raise. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: Id +} + +/** + * Automatically refund contributors of an ended crowdloan. + * Due to weight restrictions, this function may need to be called multiple + * times to fully refund all users. We will refund `RemoveKeysLimit` users at a time. + * + * Origin must be signed, but can come from anyone. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * Withdraw full balance of a specific contributor. + * + * Origin must be signed, but can come from anyone. + * + * The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement + * flag must be set. For a fund to be ready for retirement, then: + * - it must not already be in retirement; + * - the amount of raised funds must be bigger than the _free_ balance of the account; + * - and either: + * - the block number must be at least `end`; or + * - the current lease period must be greater than the fund's `last_period`. + * + * In this case, the fund's retirement flag is set and its `end` is reset to the current block + * number. + * + * - `who`: The account whose contribution should be withdrawn. + * - `index`: The parachain to whose crowdloan the contribution was made. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_chain_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_code_retention_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_conclusion_by_time_out_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_max_spam_slots: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: sts.number(), + }), + set_group_rotation_frequency: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_cores: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_retries: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_thread_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_ump_max_individual_weight: sts.enumStruct({ + new: sts.bigint(), + }), + set_ump_service_total_weight: sts.enumStruct({ + new: sts.bigint(), + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_frequency: sts.enumStruct({ + new: sts.number(), + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ConfigurationCall = ConfigurationCall_set_chain_availability_period | ConfigurationCall_set_code_retention_period | ConfigurationCall_set_dispute_conclusion_by_time_out_period | ConfigurationCall_set_dispute_max_spam_slots | ConfigurationCall_set_dispute_period | ConfigurationCall_set_dispute_post_conclusion_acceptance_period | ConfigurationCall_set_group_rotation_frequency | ConfigurationCall_set_hrmp_channel_max_capacity | ConfigurationCall_set_hrmp_channel_max_message_size | ConfigurationCall_set_hrmp_channel_max_total_size | ConfigurationCall_set_hrmp_max_message_num_per_candidate | ConfigurationCall_set_hrmp_max_parachain_inbound_channels | ConfigurationCall_set_hrmp_max_parachain_outbound_channels | ConfigurationCall_set_hrmp_max_parathread_inbound_channels | ConfigurationCall_set_hrmp_max_parathread_outbound_channels | ConfigurationCall_set_hrmp_open_request_ttl | ConfigurationCall_set_hrmp_recipient_deposit | ConfigurationCall_set_hrmp_sender_deposit | ConfigurationCall_set_max_code_size | ConfigurationCall_set_max_downward_message_size | ConfigurationCall_set_max_head_data_size | ConfigurationCall_set_max_pov_size | ConfigurationCall_set_max_upward_message_num_per_candidate | ConfigurationCall_set_max_upward_message_size | ConfigurationCall_set_max_upward_queue_count | ConfigurationCall_set_max_upward_queue_size | ConfigurationCall_set_max_validators | ConfigurationCall_set_max_validators_per_core | ConfigurationCall_set_n_delay_tranches | ConfigurationCall_set_needed_approvals | ConfigurationCall_set_no_show_slots | ConfigurationCall_set_parathread_cores | ConfigurationCall_set_parathread_retries | ConfigurationCall_set_relay_vrf_modulo_samples | ConfigurationCall_set_scheduling_lookahead | ConfigurationCall_set_thread_availability_period | ConfigurationCall_set_ump_max_individual_weight | ConfigurationCall_set_ump_service_total_weight | ConfigurationCall_set_validation_upgrade_delay | ConfigurationCall_set_validation_upgrade_frequency | ConfigurationCall_set_zeroth_delay_tranche_width + +/** + * Set the availability period for parachains. + */ +export interface ConfigurationCall_set_chain_availability_period { + __kind: 'set_chain_availability_period' + new: number +} + +/** + * Set the acceptance period for an included candidate. + */ +export interface ConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: number +} + +/** + * Set the dispute conclusion by time out period. + */ +export interface ConfigurationCall_set_dispute_conclusion_by_time_out_period { + __kind: 'set_dispute_conclusion_by_time_out_period' + new: number +} + +/** + * Set the maximum number of dispute spam slots. + */ +export interface ConfigurationCall_set_dispute_max_spam_slots { + __kind: 'set_dispute_max_spam_slots' + new: number +} + +/** + * Set the dispute period, in number of sessions to keep for disputes. + */ +export interface ConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: number +} + +/** + * Set the dispute post conclusion acceptance period. + */ +export interface ConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: number +} + +/** + * Set the parachain validator-group rotation frequency + */ +export interface ConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: number +} + +/** + * Sets the maximum number of messages allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * Sets the maximum size of a message that could ever be put into an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * Sets the maximum total size of messages in bytes allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * Sets the maximum number of outbound HRMP messages can be sent by a candidate. + */ +export interface ConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parachain is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parachain is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parathread is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_inbound_channels { + __kind: 'set_hrmp_max_parathread_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parathread is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_outbound_channels { + __kind: 'set_hrmp_max_parathread_outbound_channels' + new: number +} + +/** + * Sets the number of sessions after which an HRMP open channel request expires. + */ +export interface ConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * Sets the amount of funds that the recipient should provide for accepting opening an HRMP + * channel. + */ +export interface ConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: bigint +} + +/** + * Sets the amount of funds that the sender should provide for opening an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: bigint +} + +/** + * Set the max validation code size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * Set the critical downward message size. + */ +export interface ConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * Set the max head data size for paras. + */ +export interface ConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * Set the max POV block size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * Sets the maximum number of messages that a candidate can contain. + */ +export interface ConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum size of an upward message that can be sent by a candidate. + */ +export interface ConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * Sets the maximum items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * Sets the maximum total size of items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * Set the maximum number of validators to use in parachain consensus. + */ +export interface ConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * Set the maximum number of validators to assign to any core. + */ +export interface ConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * Set the total number of delay tranches. + */ +export interface ConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * Set the number of validators needed to approve a block. + */ +export interface ConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * Set the no show slots, in number of number of consensus slots. + * Must be at least 1. + */ +export interface ConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * Set the number of parathread execution cores. + */ +export interface ConfigurationCall_set_parathread_cores { + __kind: 'set_parathread_cores' + new: number +} + +/** + * Set the number of retries for a particular parathread. + */ +export interface ConfigurationCall_set_parathread_retries { + __kind: 'set_parathread_retries' + new: number +} + +/** + * Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion. + */ +export interface ConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * Set the scheduling lookahead, in expected number of blocks at peak throughput. + */ +export interface ConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * Set the availability period for parathreads. + */ +export interface ConfigurationCall_set_thread_availability_period { + __kind: 'set_thread_availability_period' + new: number +} + +/** + * Sets the maximum amount of weight any individual upward message may consume. + */ +export interface ConfigurationCall_set_ump_max_individual_weight { + __kind: 'set_ump_max_individual_weight' + new: bigint +} + +/** + * Sets the soft limit for the phase of dispatching dispatchable upward messages. + */ +export interface ConfigurationCall_set_ump_service_total_weight { + __kind: 'set_ump_service_total_weight' + new: bigint +} + +/** + * Set the validation upgrade delay. + */ +export interface ConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: number +} + +/** + * Set the validation upgrade frequency. + */ +export interface ConfigurationCall_set_validation_upgrade_frequency { + __kind: 'set_validation_upgrade_frequency' + new: number +} + +/** + * Set the zeroth delay tranche width. + */ +export interface ConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: sts.bigint(), + vestingSchedule: sts.option(() => sts.tuple(() => [sts.bigint(), sts.bigint(), sts.number()])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId32), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId32 + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId32 + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: bigint + vestingSchedule?: ([bigint, bigint, number] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId32 | undefined) +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds + * after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is + * malicious or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_force_unreserve | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_all | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is not + * assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * Unreserve some balance from a user by force. + * + * Can only be called by ROOT. + */ +export interface BalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also decrease the total issuance of the system (`TotalIssuance`). + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + * + * # + * - Independent of the arguments. + * - Contains a limited number of reads and writes. + * --------------------- + * - Base Weight: + * - Creating: 27.56 µs + * - Killing: 35.11 µs + * - DB Weight: 1 Read, 1 Write to `who` + * # + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: MultiAddress + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * It will decrease the total issuance of the system by the `TransferFee`. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for input config + * types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex + * computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional check + * that the transfer will not kill the origin account. + * --------------------------------- + * - Base Weight: 73.64 µs, worst case scenario (account created, account removed) + * - DB Weight: 1 Read and 1 Write to destination account + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: MultiAddress + value: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). # + * - O(1). Just like transfer, but reading the user's transferable balance first. + * # + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + * # + * - Cheaper than transfer because account cannot be killed. + * - Base Weight: 51.4 µs + * - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already) + * # + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BagsListCall: sts.Type = sts.closedEnum(() => { + return { + rebag: sts.enumStruct({ + dislocated: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BagsListCall = BagsListCall_rebag + +/** + * Declare that some `dislocated` account has, through rewards or penalties, sufficiently + * changed its weight that it should properly fall into a different bag than its current + * one. + * + * Anyone can call this function about any potentially dislocated account. + * + * Will never return an error; if `dislocated` does not exist or doesn't need a rebag, then + * it is a noop and fees are still collected from `origin`. + */ +export interface BagsListCall_rebag { + __kind: 'rebag' + dislocated: AccountId32 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const EquivocationProof: sts.Type = sts.struct(() => { + return { + offender: sts.bytes(), + slot: Slot, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Slot = sts.bigint() + +export interface EquivocationProof { + offender: Bytes + slot: Slot + firstHeader: Header + secondHeader: Header +} + +export type Slot = bigint + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V1: sts.enumStruct({ + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + }), + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type NextConfigDescriptor = NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Plan an epoch config change. The epoch config change is recorded and will be enacted on + * the next call to `enact_epoch_change`. The config will be activated one epoch after. + * Multiple calls to this method will replace any existing planned config change that had + * not been enacted yet. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Cancel an in-progress auction. + * + * Can only be called by Root origin. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +export type Call = Call_Auctions | Call_Authorship | Call_Babe | Call_BagsList | Call_Balances | Call_Bounties | Call_Claims | Call_Configuration | Call_Council | Call_Crowdloan | Call_Democracy | Call_Dmp | Call_ElectionProviderMultiPhase | Call_Gilt | Call_Grandpa | Call_Hrmp | Call_Identity | Call_ImOnline | Call_Indices | Call_Initializer | Call_Multisig | Call_ParaInclusion | Call_ParaInherent | Call_Paras | Call_ParasShared | Call_PhragmenElection | Call_Proxy | Call_Recovery | Call_Registrar | Call_Scheduler | Call_Session | Call_Slots | Call_Society | Call_Staking | Call_System | Call_TechnicalCommittee | Call_TechnicalMembership | Call_Timestamp | Call_Tips | Call_Treasury | Call_Ump | Call_Utility | Call_Vesting | Call_XcmPallet + +export interface Call_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Call_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Call_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Call_BagsList { + __kind: 'BagsList' + value: BagsListCall +} + +export interface Call_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Call_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Call_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Call_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Call_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Call_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Call_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Call_Dmp { + __kind: 'Dmp' + value: DmpCall +} + +export interface Call_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Call_Gilt { + __kind: 'Gilt' + value: GiltCall +} + +export interface Call_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Call_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Call_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Call_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Call_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Call_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Call_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Call_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Call_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Call_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Call_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Call_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Call_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Call_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Call_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Call_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Call_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Call_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Call_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Call_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Call_System { + __kind: 'System' + value: SystemCall +} + +export interface Call_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Call_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Call_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Call_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Call_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Call_Ump { + __kind: 'Ump' + value: UmpCall +} + +export interface Call_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Call_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Call_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId32 = sts.bytes() diff --git a/squid/src/types/v9122.ts b/squid/src/types/v9122.ts new file mode 100644 index 00000000..62c352c4 --- /dev/null +++ b/squid/src/types/v9122.ts @@ -0,0 +1,11049 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Call: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + BagsList: BagsListCall, + Balances: BalancesCall, + Bounties: BountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + Dmp: DmpCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + Gilt: GiltCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Initializer: InitializerCall, + Multisig: MultisigCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Paras: ParasCall, + ParasShared: ParasSharedCall, + PhragmenElection: PhragmenElectionCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Ump: UmpCall, + Utility: UtilityCall, + Vesting: VestingCall, + XcmPallet: XcmPalletCall, + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + execute: sts.enumStruct({ + message: Type_515, + maxWeight: sts.bigint(), + }), + force_default_xcm_version: sts.enumStruct({ + maybeXcmVersion: sts.option(() => sts.number()), + }), + force_subscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_unsubscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_xcm_version: sts.enumStruct({ + location: V1MultiLocation, + xcmVersion: sts.number(), + }), + limited_reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + limited_teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + send: sts.enumStruct({ + dest: VersionedMultiLocation, + message: VersionedXcm, + }), + teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + } +}) + +export const VersionedXcm: sts.Type = sts.closedEnum(() => { + return { + V0: V0Xcm, + V1: V1Xcm, + V2: sts.array(() => V2Instruction), + } +}) + +export const V2Instruction: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => V2Instruction), + SetErrorHandler: sts.array(() => V2Instruction), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const DoubleEncoded: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncoded { + encoded: Bytes +} + +export const V0OriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type V0OriginKind = V0OriginKind_Native | V0OriginKind_SovereignAccount | V0OriginKind_Superuser | V0OriginKind_Xcm + +export interface V0OriginKind_Native { + __kind: 'Native' +} + +export interface V0OriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface V0OriginKind_Superuser { + __kind: 'Superuser' +} + +export interface V0OriginKind_Xcm { + __kind: 'Xcm' +} + +export const V2Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V2Error])), + Null: sts.unit(), + Version: sts.number(), + } +}) + +export const V2Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + MultiLocationFull: sts.unit(), + MultiLocationNotInvertible: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + TooExpensive: sts.unit(), + TooMuchWeightRequired: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + WeightLimitReached: sts.bigint(), + WeightNotComputable: sts.unit(), + } +}) + +export type V2Error = V2Error_AssetNotFound | V2Error_BadOrigin | V2Error_Barrier | V2Error_DestinationUnsupported | V2Error_ExceedsMaxMessageSize | V2Error_FailedToDecode | V2Error_FailedToTransactAsset | V2Error_InvalidLocation | V2Error_LocationCannotHold | V2Error_MultiLocationFull | V2Error_MultiLocationNotInvertible | V2Error_NotHoldingFees | V2Error_NotWithdrawable | V2Error_Overflow | V2Error_TooExpensive | V2Error_TooMuchWeightRequired | V2Error_Transport | V2Error_Trap | V2Error_UnhandledXcmVersion | V2Error_Unimplemented | V2Error_UnknownClaim | V2Error_Unroutable | V2Error_UntrustedReserveLocation | V2Error_UntrustedTeleportLocation | V2Error_WeightLimitReached | V2Error_WeightNotComputable + +export interface V2Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V2Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V2Error_Barrier { + __kind: 'Barrier' +} + +export interface V2Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V2Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V2Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V2Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V2Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V2Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V2Error_MultiLocationFull { + __kind: 'MultiLocationFull' +} + +export interface V2Error_MultiLocationNotInvertible { + __kind: 'MultiLocationNotInvertible' +} + +export interface V2Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V2Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V2Error_Overflow { + __kind: 'Overflow' +} + +export interface V2Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V2Error_TooMuchWeightRequired { + __kind: 'TooMuchWeightRequired' +} + +export interface V2Error_Transport { + __kind: 'Transport' +} + +export interface V2Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V2Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V2Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V2Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V2Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V2Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V2Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: bigint +} + +export interface V2Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V2Response = V2Response_Assets | V2Response_ExecutionResult | V2Response_Null | V2Response_Version + +export interface V2Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V2Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V2Error] | undefined) +} + +export interface V2Response_Null { + __kind: 'Null' +} + +export interface V2Response_Version { + __kind: 'Version' + value: number +} + +export interface V1MultiAsset { + id: V1AssetId + fun: V1Fungibility +} + +export type V1Fungibility = V1Fungibility_Fungible | V1Fungibility_NonFungible + +export interface V1Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V1Fungibility_NonFungible { + __kind: 'NonFungible' + value: V1AssetInstance +} + +export type V1AssetInstance = V1AssetInstance_Array16 | V1AssetInstance_Array32 | V1AssetInstance_Array4 | V1AssetInstance_Array8 | V1AssetInstance_Blob | V1AssetInstance_Index | V1AssetInstance_Undefined + +export interface V1AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V1AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V1AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V1AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V1AssetInstance_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface V1AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V1AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V1AssetId = V1AssetId_Abstract | V1AssetId_Concrete + +export interface V1AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V1AssetId_Concrete { + __kind: 'Concrete' + value: V1MultiLocation +} + +export interface V1MultiLocation { + parents: number + interior: V1Junctions +} + +export type V1Junctions = V1Junctions_Here | V1Junctions_X1 | V1Junctions_X2 | V1Junctions_X3 | V1Junctions_X4 | V1Junctions_X5 | V1Junctions_X6 | V1Junctions_X7 | V1Junctions_X8 + +export interface V1Junctions_Here { + __kind: 'Here' +} + +export interface V1Junctions_X1 { + __kind: 'X1' + value: V1Junction +} + +export interface V1Junctions_X2 { + __kind: 'X2' + value: [V1Junction, V1Junction] +} + +export interface V1Junctions_X3 { + __kind: 'X3' + value: [V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X4 { + __kind: 'X4' + value: [V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X5 { + __kind: 'X5' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X6 { + __kind: 'X6' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X7 { + __kind: 'X7' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X8 { + __kind: 'X8' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export type V1Junction = V1Junction_AccountId32 | V1Junction_AccountIndex64 | V1Junction_AccountKey20 | V1Junction_GeneralIndex | V1Junction_GeneralKey | V1Junction_OnlyChild | V1Junction_PalletInstance | V1Junction_Parachain | V1Junction_Plurality + +export interface V1Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V1Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V1Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V1Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V1Junction_GeneralKey { + __kind: 'GeneralKey' + value: Bytes +} + +export interface V1Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V1Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V1Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V1Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0BodyPart = V0BodyPart_AtLeastProportion | V0BodyPart_Fraction | V0BodyPart_Members | V0BodyPart_MoreThanProportion | V0BodyPart_Voice + +export interface V0BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V0BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V0BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Voice { + __kind: 'Voice' +} + +export type V0BodyId = V0BodyId_Executive | V0BodyId_Index | V0BodyId_Judicial | V0BodyId_Legislative | V0BodyId_Named | V0BodyId_Technical | V0BodyId_Unit + +export interface V0BodyId_Executive { + __kind: 'Executive' +} + +export interface V0BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V0BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V0BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V0BodyId_Named { + __kind: 'Named' + value: Bytes +} + +export interface V0BodyId_Technical { + __kind: 'Technical' +} + +export interface V0BodyId_Unit { + __kind: 'Unit' +} + +export type V0NetworkId = V0NetworkId_Any | V0NetworkId_Kusama | V0NetworkId_Named | V0NetworkId_Polkadot + +export interface V0NetworkId_Any { + __kind: 'Any' +} + +export interface V0NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V0NetworkId_Named { + __kind: 'Named' + value: Bytes +} + +export interface V0NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export const V1Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V1Junction, + X2: sts.tuple(() => [V1Junction, V1Junction]), + X3: sts.tuple(() => [V1Junction, V1Junction, V1Junction]), + X4: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction]), + X5: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X6: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X7: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X8: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + } +}) + +export const V1Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.bytes(), + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export const V0BodyId: sts.Type = sts.closedEnum(() => { + return { + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: sts.bytes(), + Technical: sts.unit(), + Unit: sts.unit(), + } +}) + +export const V0NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: sts.bytes(), + Polkadot: sts.unit(), + } +}) + +export const V1MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V1MultiAsset), + Wild: V1WildMultiAsset, + } +}) + +export const V1WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllOf: sts.enumStruct({ + id: V1AssetId, + fun: V1WildFungibility, + }), + } +}) + +export const V1WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V1WildFungibility = V1WildFungibility_Fungible | V1WildFungibility_NonFungible + +export interface V1WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V1WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V1AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V1MultiLocation, + } +}) + +export type V1WildMultiAsset = V1WildMultiAsset_All | V1WildMultiAsset_AllOf + +export interface V1WildMultiAsset_All { + __kind: 'All' +} + +export interface V1WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V1AssetId + fun: V1WildFungibility +} + +export type V1MultiAssetFilter = V1MultiAssetFilter_Definite | V1MultiAssetFilter_Wild + +export interface V1MultiAssetFilter_Definite { + __kind: 'Definite' + value: V1MultiAsset[] +} + +export interface V1MultiAssetFilter_Wild { + __kind: 'Wild' + value: V1WildMultiAsset +} + +export const V1MultiAsset: sts.Type = sts.struct(() => { + return { + id: V1AssetId, + fun: V1Fungibility, + } +}) + +export const V1Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V1AssetInstance, + } +}) + +export const V1AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V2Instruction = V2Instruction_BuyExecution | V2Instruction_ClaimAsset | V2Instruction_ClearError | V2Instruction_ClearOrigin | V2Instruction_DepositAsset | V2Instruction_DepositReserveAsset | V2Instruction_DescendOrigin | V2Instruction_ExchangeAsset | V2Instruction_HrmpChannelAccepted | V2Instruction_HrmpChannelClosing | V2Instruction_HrmpNewChannelOpenRequest | V2Instruction_InitiateReserveWithdraw | V2Instruction_InitiateTeleport | V2Instruction_QueryHolding | V2Instruction_QueryResponse | V2Instruction_ReceiveTeleportedAsset | V2Instruction_RefundSurplus | V2Instruction_ReportError | V2Instruction_ReserveAssetDeposited | V2Instruction_SetAppendix | V2Instruction_SetErrorHandler | V2Instruction_SubscribeVersion | V2Instruction_Transact | V2Instruction_TransferAsset | V2Instruction_TransferReserveAsset | V2Instruction_Trap | V2Instruction_UnsubscribeVersion | V2Instruction_WithdrawAsset + +export interface V2Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface V2Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface V2Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V2Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V2Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V2Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface V2Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V2Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V2Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V2Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V2Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface V2Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface V2Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface V2Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V2Instruction_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface V2Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface V2Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V2Instruction[] +} + +export interface V2Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V2Instruction[] +} + +export interface V2Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V2Instruction_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V2Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V2Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V2Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export type V2WeightLimit = V2WeightLimit_Limited | V2WeightLimit_Unlimited + +export interface V2WeightLimit_Limited { + __kind: 'Limited' + value: bigint +} + +export interface V2WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V1Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: V1Xcm, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + } +}) + +export const V1Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => V1Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type V1Order = V1Order_BuyExecution | V1Order_DepositAsset | V1Order_DepositReserveAsset | V1Order_ExchangeAsset | V1Order_InitiateReserveWithdraw | V1Order_InitiateTeleport | V1Order_Noop | V1Order_QueryHolding + +export interface V1Order_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: V1Xcm[] +} + +export interface V1Order_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V1Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V1Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_Noop { + __kind: 'Noop' +} + +export interface V1Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export const V1Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + Version: sts.number(), + } +}) + +export type V1Response = V1Response_Assets | V1Response_Version + +export interface V1Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V1Response_Version { + __kind: 'Version' + value: number +} + +export type V1Xcm = V1Xcm_HrmpChannelAccepted | V1Xcm_HrmpChannelClosing | V1Xcm_HrmpNewChannelOpenRequest | V1Xcm_QueryResponse | V1Xcm_ReceiveTeleportedAsset | V1Xcm_RelayedFrom | V1Xcm_ReserveAssetDeposited | V1Xcm_SubscribeVersion | V1Xcm_Transact | V1Xcm_TransferAsset | V1Xcm_TransferReserveAsset | V1Xcm_UnsubscribeVersion | V1Xcm_WithdrawAsset + +export interface V1Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V1Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V1Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V1Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface V1Xcm_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: V1Xcm +} + +export interface V1Xcm_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V1Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V1Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V1Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Xcm_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V1Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export const V0Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: V0Xcm, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + } +}) + +export const V0Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => V0Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type V0Order = V0Order_BuyExecution | V0Order_DepositAsset | V0Order_DepositReserveAsset | V0Order_ExchangeAsset | V0Order_InitiateReserveWithdraw | V0Order_InitiateTeleport | V0Order_Null | V0Order_QueryHolding + +export interface V0Order_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: V0Xcm[] +} + +export interface V0Order_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface V0Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_Null { + __kind: 'Null' +} + +export interface V0Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type V0MultiLocation = V0MultiLocation_Null | V0MultiLocation_X1 | V0MultiLocation_X2 | V0MultiLocation_X3 | V0MultiLocation_X4 | V0MultiLocation_X5 | V0MultiLocation_X6 | V0MultiLocation_X7 | V0MultiLocation_X8 + +export interface V0MultiLocation_Null { + __kind: 'Null' +} + +export interface V0MultiLocation_X1 { + __kind: 'X1' + value: V0Junction +} + +export interface V0MultiLocation_X2 { + __kind: 'X2' + value: [V0Junction, V0Junction] +} + +export interface V0MultiLocation_X3 { + __kind: 'X3' + value: [V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X4 { + __kind: 'X4' + value: [V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X5 { + __kind: 'X5' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X6 { + __kind: 'X6' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X7 { + __kind: 'X7' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X8 { + __kind: 'X8' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export type V0Junction = V0Junction_AccountId32 | V0Junction_AccountIndex64 | V0Junction_AccountKey20 | V0Junction_GeneralIndex | V0Junction_GeneralKey | V0Junction_OnlyChild | V0Junction_PalletInstance | V0Junction_Parachain | V0Junction_Parent | V0Junction_Plurality + +export interface V0Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V0Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V0Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V0Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V0Junction_GeneralKey { + __kind: 'GeneralKey' + value: Bytes +} + +export interface V0Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V0Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V0Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V0Junction_Parent { + __kind: 'Parent' +} + +export interface V0Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0MultiAsset = V0MultiAsset_AbstractFungible | V0MultiAsset_AbstractNonFungible | V0MultiAsset_All | V0MultiAsset_AllAbstractFungible | V0MultiAsset_AllAbstractNonFungible | V0MultiAsset_AllConcreteFungible | V0MultiAsset_AllConcreteNonFungible | V0MultiAsset_AllFungible | V0MultiAsset_AllNonFungible | V0MultiAsset_ConcreteFungible | V0MultiAsset_ConcreteNonFungible | V0MultiAsset_None + +export interface V0MultiAsset_AbstractFungible { + __kind: 'AbstractFungible' + id: Bytes + amount: bigint +} + +export interface V0MultiAsset_AbstractNonFungible { + __kind: 'AbstractNonFungible' + class: Bytes + instance: V1AssetInstance +} + +export interface V0MultiAsset_All { + __kind: 'All' +} + +export interface V0MultiAsset_AllAbstractFungible { + __kind: 'AllAbstractFungible' + id: Bytes +} + +export interface V0MultiAsset_AllAbstractNonFungible { + __kind: 'AllAbstractNonFungible' + class: Bytes +} + +export interface V0MultiAsset_AllConcreteFungible { + __kind: 'AllConcreteFungible' + id: V0MultiLocation +} + +export interface V0MultiAsset_AllConcreteNonFungible { + __kind: 'AllConcreteNonFungible' + class: V0MultiLocation +} + +export interface V0MultiAsset_AllFungible { + __kind: 'AllFungible' +} + +export interface V0MultiAsset_AllNonFungible { + __kind: 'AllNonFungible' +} + +export interface V0MultiAsset_ConcreteFungible { + __kind: 'ConcreteFungible' + id: V0MultiLocation + amount: bigint +} + +export interface V0MultiAsset_ConcreteNonFungible { + __kind: 'ConcreteNonFungible' + class: V0MultiLocation + instance: V1AssetInstance +} + +export interface V0MultiAsset_None { + __kind: 'None' +} + +export const V0MultiAsset: sts.Type = sts.closedEnum(() => { + return { + AbstractFungible: sts.enumStruct({ + id: sts.bytes(), + amount: sts.bigint(), + }), + AbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + instance: V1AssetInstance, + }), + All: sts.unit(), + AllAbstractFungible: sts.enumStruct({ + id: sts.bytes(), + }), + AllAbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + }), + AllConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + }), + AllConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + }), + AllFungible: sts.unit(), + AllNonFungible: sts.unit(), + ConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + amount: sts.bigint(), + }), + ConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + instance: V1AssetInstance, + }), + None: sts.unit(), + } +}) + +export const V0MultiLocation: sts.Type = sts.closedEnum(() => { + return { + Null: sts.unit(), + X1: V0Junction, + X2: sts.tuple(() => [V0Junction, V0Junction]), + X3: sts.tuple(() => [V0Junction, V0Junction, V0Junction]), + X4: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction]), + X5: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X6: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X7: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X8: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + } +}) + +export const V0Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.bytes(), + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Parent: sts.unit(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V0MultiAsset), + } +}) + +export type V0Response = V0Response_Assets + +export interface V0Response_Assets { + __kind: 'Assets' + value: V0MultiAsset[] +} + +export type V0Xcm = V0Xcm_HrmpChannelAccepted | V0Xcm_HrmpChannelClosing | V0Xcm_HrmpNewChannelOpenRequest | V0Xcm_QueryResponse | V0Xcm_RelayedFrom | V0Xcm_ReserveAssetDeposit | V0Xcm_TeleportAsset | V0Xcm_Transact | V0Xcm_TransferAsset | V0Xcm_TransferReserveAsset | V0Xcm_WithdrawAsset + +export interface V0Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V0Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V0Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V0Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface V0Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: V0Xcm +} + +export interface V0Xcm_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V0Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export type VersionedXcm = VersionedXcm_V0 | VersionedXcm_V1 | VersionedXcm_V2 + +export interface VersionedXcm_V0 { + __kind: 'V0' + value: V0Xcm +} + +export interface VersionedXcm_V1 { + __kind: 'V1' + value: V1Xcm +} + +export interface VersionedXcm_V2 { + __kind: 'V2' + value: V2Instruction[] +} + +export const V2WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: sts.bigint(), + Unlimited: sts.unit(), + } +}) + +export const VersionedMultiAssets: sts.Type = sts.closedEnum(() => { + return { + V0: sts.array(() => V0MultiAsset), + V1: sts.array(() => V1MultiAsset), + } +}) + +export type VersionedMultiAssets = VersionedMultiAssets_V0 | VersionedMultiAssets_V1 + +export interface VersionedMultiAssets_V0 { + __kind: 'V0' + value: V0MultiAsset[] +} + +export interface VersionedMultiAssets_V1 { + __kind: 'V1' + value: V1MultiAsset[] +} + +export const V1MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V1Junctions, + } +}) + +export const VersionedMultiLocation: sts.Type = sts.closedEnum(() => { + return { + V0: V0MultiLocation, + V1: V1MultiLocation, + } +}) + +export type VersionedMultiLocation = VersionedMultiLocation_V0 | VersionedMultiLocation_V1 + +export interface VersionedMultiLocation_V0 { + __kind: 'V0' + value: V0MultiLocation +} + +export interface VersionedMultiLocation_V1 { + __kind: 'V1' + value: V1MultiLocation +} + +export const Type_515: sts.Type = sts.closedEnum(() => { + return { + V0: Type_516, + V1: Type_521, + V2: sts.array(() => Type_527), + } +}) + +export const Type_527: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => Type_527), + SetErrorHandler: sts.array(() => Type_527), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_520, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const Type_520: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface Type_520 { + encoded: Bytes +} + +export type Type_527 = Type_527_BuyExecution | Type_527_ClaimAsset | Type_527_ClearError | Type_527_ClearOrigin | Type_527_DepositAsset | Type_527_DepositReserveAsset | Type_527_DescendOrigin | Type_527_ExchangeAsset | Type_527_HrmpChannelAccepted | Type_527_HrmpChannelClosing | Type_527_HrmpNewChannelOpenRequest | Type_527_InitiateReserveWithdraw | Type_527_InitiateTeleport | Type_527_QueryHolding | Type_527_QueryResponse | Type_527_ReceiveTeleportedAsset | Type_527_RefundSurplus | Type_527_ReportError | Type_527_ReserveAssetDeposited | Type_527_SetAppendix | Type_527_SetErrorHandler | Type_527_SubscribeVersion | Type_527_Transact | Type_527_TransferAsset | Type_527_TransferReserveAsset | Type_527_Trap | Type_527_UnsubscribeVersion | Type_527_WithdrawAsset + +export interface Type_527_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface Type_527_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface Type_527_ClearError { + __kind: 'ClearError' +} + +export interface Type_527_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_527_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_527_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_527_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface Type_527_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_527_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_527_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_527_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_527_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_527_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_527_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface Type_527_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface Type_527_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface Type_527_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_527_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface Type_527_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface Type_527_SetAppendix { + __kind: 'SetAppendix' + value: Type_527[] +} + +export interface Type_527_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_527[] +} + +export interface Type_527_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_527_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_520 +} + +export interface Type_527_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_527_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_527_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_527_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_527_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export const Type_521: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_523), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: Type_521, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_523), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_520, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_523), + }), + } +}) + +export const Type_523: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => Type_521), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type Type_523 = Type_523_BuyExecution | Type_523_DepositAsset | Type_523_DepositReserveAsset | Type_523_ExchangeAsset | Type_523_InitiateReserveWithdraw | Type_523_InitiateTeleport | Type_523_Noop | Type_523_QueryHolding + +export interface Type_523_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: Type_521[] +} + +export interface Type_523_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_523_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_523_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_523_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface Type_523_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_523_Noop { + __kind: 'Noop' +} + +export interface Type_523_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export type Type_521 = Type_521_HrmpChannelAccepted | Type_521_HrmpChannelClosing | Type_521_HrmpNewChannelOpenRequest | Type_521_QueryResponse | Type_521_ReceiveTeleportedAsset | Type_521_RelayedFrom | Type_521_ReserveAssetDeposited | Type_521_SubscribeVersion | Type_521_Transact | Type_521_TransferAsset | Type_521_TransferReserveAsset | Type_521_UnsubscribeVersion | Type_521_WithdrawAsset + +export interface Type_521_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_521_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_521_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_521_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface Type_521_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: Type_523[] +} + +export interface Type_521_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: Type_521 +} + +export interface Type_521_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: Type_523[] +} + +export interface Type_521_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_521_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_520 +} + +export interface Type_521_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_521_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_521_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_521_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: Type_523[] +} + +export const Type_516: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: Type_516, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_518), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_518), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_520, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_518), + }), + } +}) + +export const Type_518: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => Type_516), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type Type_518 = Type_518_BuyExecution | Type_518_DepositAsset | Type_518_DepositReserveAsset | Type_518_ExchangeAsset | Type_518_InitiateReserveWithdraw | Type_518_InitiateTeleport | Type_518_Null | Type_518_QueryHolding + +export interface Type_518_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: Type_516[] +} + +export interface Type_518_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_518_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_518_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface Type_518_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface Type_518_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_518_Null { + __kind: 'Null' +} + +export interface Type_518_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type Type_516 = Type_516_HrmpChannelAccepted | Type_516_HrmpChannelClosing | Type_516_HrmpNewChannelOpenRequest | Type_516_QueryResponse | Type_516_RelayedFrom | Type_516_ReserveAssetDeposit | Type_516_TeleportAsset | Type_516_Transact | Type_516_TransferAsset | Type_516_TransferReserveAsset | Type_516_WithdrawAsset + +export interface Type_516_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_516_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_516_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_516_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface Type_516_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: Type_516 +} + +export interface Type_516_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: Type_518[] +} + +export interface Type_516_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: Type_518[] +} + +export interface Type_516_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_520 +} + +export interface Type_516_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_516_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_516_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: Type_518[] +} + +export type Type_515 = Type_515_V0 | Type_515_V1 | Type_515_V2 + +export interface Type_515_V0 { + __kind: 'V0' + value: Type_516 +} + +export interface Type_515_V1 { + __kind: 'V1' + value: Type_521 +} + +export interface Type_515_V2 { + __kind: 'V2' + value: Type_527[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type XcmPalletCall = XcmPalletCall_execute | XcmPalletCall_force_default_xcm_version | XcmPalletCall_force_subscribe_version_notify | XcmPalletCall_force_unsubscribe_version_notify | XcmPalletCall_force_xcm_version | XcmPalletCall_limited_reserve_transfer_assets | XcmPalletCall_limited_teleport_assets | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets + +/** + * Execute an XCM message from a local, signed, origin. + * + * An event is deposited indicating whether `msg` could be executed completely or only + * partially. + * + * No more than `max_weight` will be used in its attempted execution. If this is less than the + * maximum amount of weight that the message could take to be executed, then no execution + * attempt will be made. + * + * NOTE: A successful return to this does *not* imply that the `msg` was executed successfully + * to completion; only that *some* of it was executed. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Type_515 + maxWeight: bigint +} + +/** + * Set a safe XCM version (the version that XCM should be encoded with if the most recent + * version a destination can accept is unknown). + * + * - `origin`: Must be Root. + * - `maybe_xcm_version`: The default XCM encoding version, or `None` to disable. + */ +export interface XcmPalletCall_force_default_xcm_version { + __kind: 'force_default_xcm_version' + maybeXcmVersion?: (number | undefined) +} + +/** + * Ask a location to notify us regarding their XCM version and any changes to it. + * + * - `origin`: Must be Root. + * - `location`: The location to which we should subscribe for XCM version notifications. + */ +export interface XcmPalletCall_force_subscribe_version_notify { + __kind: 'force_subscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Require that a particular destination should no longer notify us regarding any XCM + * version changes. + * + * - `origin`: Must be Root. + * - `location`: The location to which we are currently subscribed for XCM version + * notifications which we no longer desire. + */ +export interface XcmPalletCall_force_unsubscribe_version_notify { + __kind: 'force_unsubscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Extoll that a particular destination can be communicated with through a particular + * version of XCM. + * + * - `origin`: Must be Root. + * - `location`: The destination that is being described. + * - `xcm_version`: The latest version of XCM that `location` supports. + */ +export interface XcmPalletCall_force_xcm_version { + __kind: 'force_xcm_version' + location: V1MultiLocation + xcmVersion: number +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination chain and forward + * a notification XCM. + * + * Fee payment on the destination side is made from the first asset listed in the `assets` vector. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_reserve_transfer_assets { + __kind: 'limited_reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the first asset listed in the `assets` vector. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `dest_weight`: Equal to the total weight on `dest` of the XCM message + * `Teleport { assets, effects: [ BuyExecution{..}, DepositAsset{..} ] }`. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_teleport_assets { + __kind: 'limited_teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination chain and forward + * a notification XCM. + * + * Fee payment on the destination side is made from the first asset listed in the `assets` vector and + * fee-weight is calculated locally and thus remote weights are assumed to be equal to + * local weights. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +export interface XcmPalletCall_send { + __kind: 'send' + dest: VersionedMultiLocation + message: VersionedXcm +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the first asset listed in the `assets` vector and + * fee-weight is calculated locally and thus remote weights are assumed to be equal to + * local weights. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `dest_weight`: Equal to the total weight on `dest` of the XCM message + * `Teleport { assets, effects: [ BuyExecution{..}, DepositAsset{..} ] }`. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: MultiAddress, + target: MultiAddress, + schedule: VestingInfo, + }), + merge_schedules: sts.enumStruct({ + schedule1Index: sts.number(), + schedule2Index: sts.number(), + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: MultiAddress, + }), + vested_transfer: sts.enumStruct({ + target: MultiAddress, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: sts.bigint(), + perBlock: sts.bigint(), + startingBlock: sts.number(), + } +}) + +export interface VestingInfo { + locked: bigint + perBlock: bigint + startingBlock: number +} + +export const MultiAddress: sts.Type = sts.closedEnum(() => { + return { + Address20: sts.bytes(), + Address32: sts.bytes(), + Id: AccountId32, + Index: sts.unit(), + Raw: sts.bytes(), + } +}) + +export type MultiAddress = MultiAddress_Address20 | MultiAddress_Address32 | MultiAddress_Id | MultiAddress_Index | MultiAddress_Raw + +export interface MultiAddress_Address20 { + __kind: 'Address20' + value: Bytes +} + +export interface MultiAddress_Address32 { + __kind: 'Address32' + value: Bytes +} + +export interface MultiAddress_Id { + __kind: 'Id' + value: AccountId32 +} + +export interface MultiAddress_Index { + __kind: 'Index' +} + +export interface MultiAddress_Raw { + __kind: 'Raw' + value: Bytes +} + +export type AccountId32 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_merge_schedules | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: MultiAddress + target: MultiAddress + schedule: VestingInfo +} + +/** + * Merge two vesting schedules together, creating a new vesting schedule that unlocks over + * the highest possible start and end blocks. If both schedules have already started the + * current block will be used as the schedule start; with the caveat that if one schedule + * is finished by the current block, the other will be treated as the new merged schedule, + * unmodified. + * + * NOTE: If `schedule1_index == schedule2_index` this is a no-op. + * NOTE: This will unlock all schedules through the current block prior to merging. + * NOTE: If both schedules have ended by the current block, no new schedule will be created + * and both will be removed. + * + * Merged schedule attributes: + * - `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block, + * current_block)`. + * - `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`. + * - `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`. + * + * The dispatch origin for this call must be _Signed_. + * + * - `schedule1_index`: index of the first schedule to merge. + * - `schedule2_index`: index of the second schedule to merge. + */ +export interface VestingCall_merge_schedules { + __kind: 'merge_schedules' + schedule1Index: number + schedule2Index: number +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: MultiAddress +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account receiving the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: MultiAddress + schedule: VestingInfo +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Call, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Call), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Call +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Call[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Call[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UmpCall: sts.Type = sts.closedEnum(() => { + return { + service_overweight: sts.enumStruct({ + index: sts.bigint(), + weightLimit: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UmpCall = UmpCall_service_overweight + +/** + * Service a single overweight upward message. + * + * - `origin`: Must pass `ExecuteOverweightOrigin`. + * - `index`: The index of the overweight message to service. + * - `weight_limit`: The amount of weight that message execution may take. + * + * Errors: + * - `UnknownMessageIndex`: Message of `index` is unknown. + * - `WeightOverLimit`: Message execution may use greater than `weight_limit`. + * + * Events: + * - `OverweightServiced`: On success. + */ +export interface UmpCall_service_overweight { + __kind: 'service_overweight' + index: bigint + weightLimit: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: MultiAddress, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: MultiAddress +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TipsCall: sts.Type = sts.closedEnum(() => { + return { + close_tip: sts.enumStruct({ + hash: H256, + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId32, + }), + retract_tip: sts.enumStruct({ + hash: H256, + }), + slash_tip: sts.enumStruct({ + hash: H256, + }), + tip: sts.enumStruct({ + hash: H256, + tipValue: sts.bigint(), + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId32, + tipValue: sts.bigint(), + }), + } +}) + +export const H256 = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TipsCall = TipsCall_close_tip | TipsCall_report_awesome | TipsCall_retract_tip | TipsCall_slash_tip | TipsCall_tip | TipsCall_tip_new + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost + * depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TipsCall_close_tip { + __kind: 'close_tip' + hash: H256 +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId32 +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TipsCall_retract_tip { + __kind: 'retract_tip' + hash: H256 +} + +/** + * Remove and slash an already-open tip. + * + * May only be called from `T::RejectOrigin`. + * + * As a result, the finder is slashed and the deposits are lost. + * + * Emits `TipSlashed` if successful. + * + * # + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * # + */ +export interface TipsCall_slash_tip { + __kind: 'slash_tip' + hash: H256 +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`, insert tip and check closing, `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TipsCall_tip { + __kind: 'tip' + hash: H256 + tipValue: bigint +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of + * `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId32 + tipValue: bigint +} + +export type H256 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in + * `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId32, + }), + change_key: sts.enumStruct({ + new: AccountId32, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId32, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId32), + }), + set_prime: sts.enumStruct({ + who: AccountId32, + }), + swap_member: sts.enumStruct({ + remove: AccountId32, + add: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId32 +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId32 +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId32 +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId32[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId32 +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId32 + add: AccountId32 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: sts.bytes(), + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => sts.bytes()), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_changes_trie_config: sts.enumStruct({ + changesTrieConfig: sts.option(() => ChangesTrieConfiguration), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + }), + } +}) + +export const ChangesTrieConfiguration: sts.Type = sts.struct(() => { + return { + digestInterval: sts.number(), + digestLevels: sts.number(), + } +}) + +export interface ChangesTrieConfiguration { + digestInterval: number + digestLevels: number +} + +export const Perbill = sts.number() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_changes_trie_config | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + * + * # + * - `O(P)` where `P` amount of keys with prefix `prefix` + * - `P` storage deletions. + * - Base Weight: 0.834 * P µs + * - Writes: Number of subkeys + 1 + * # + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Bytes + subkeys: number +} + +/** + * Kill some items from storage. + * + * # + * - `O(IK)` where `I` length of `keys` and `K` length of one key + * - `I` storage deletions. + * - Base Weight: .378 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Bytes[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Make some on-chain remark and emit event. + * + * # + * - `O(b)` where b is the length of the remark. + * - 1 event. + * # + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * Set the new changes trie configuration. + * + * # + * - `O(1)` + * - 1 storage write or delete (codec `O(1)`). + * - 1 call to `deposit_log`: Uses `append` API, so O(1) + * - Base Weight: 7.218 µs + * - DB Weight: + * - Writes: Changes Trie, System Digest + * # + */ +export interface SystemCall_set_changes_trie_config { + __kind: 'set_changes_trie_config' + changesTrieConfig?: (ChangesTrieConfiguration | undefined) +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is + * expensive). + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very + * expensive. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full + * block. # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + * + * # + * - `O(1)` + * - 1 storage write. + * - Base Weight: 1.405 µs + * - 1 write to HEAP_PAGES + * - 1 digest item + * # + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + * + * # + * - `O(I)` where `I` length of `items` + * - `I` storage writes (`O(1)`). + * - Base Weight: 0.568 * i µs + * - Writes: Number of items + * # + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: [Bytes, Bytes][] +} + +export type Perbill = number + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: MultiAddress, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: sts.number(), + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + controller: AccountId32, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => MultiAddress), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => MultiAddress), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + }), + reap_stash: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: MultiAddress, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId32), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_staking_limits: sts.enumStruct({ + minNominatorBond: sts.bigint(), + minValidatorBond: sts.bigint(), + maxNominatorCount: sts.option(() => sts.number()), + maxValidatorCount: sts.option(() => sts.number()), + threshold: sts.option(() => Percent), + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export const Percent = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_staking_limits | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: MultiAddress + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose + * any limitation on the amount that can be added. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + * + * # + * Complexity: O(U + S) + * with U unapplied slashes weighted with U=1000 + * and S is the number of slash indices to be canceled. + * - Read: Unapplied Slashes + * - Write: Unapplied Slashes + * # + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: number + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Declare a `controller` to stop participating as either a validator or nominator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_, but can be called by anyone. + * + * If the caller is the same as the controller being targeted, then no further checks are + * enforced, and this function behaves just like `chill`. + * + * If the caller is different than the controller being targeted, the following conditions + * must be met: + * * A `ChillThreshold` must be set and checked which defines how close to the max + * nominators or validators we must reach before users can start chilling one-another. + * * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine + * how close we are to the threshold. + * * A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines + * if this is a person that should be chilled because they have not met the threshold + * bond required. + * + * This can be helpful if bond requirements are updated, and we need to remove old users + * who do not satisfy these requirements. + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + controller: AccountId32 +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * # + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * Thus the election process may be ongoing when this is called. In this case the + * election will continue until the next era is triggered. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + * + * # + * O(S) where S is the number of slashing spans to be removed + * Reads: Bonded, Slashing Spans, Account, Locks + * Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, + * Account, Locks Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: MultiAddress[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS). + * - Both the reads and writes follow a similar pattern. + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: MultiAddress[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId32 + era: number +} + +/** + * Remove all data structure concerning a staker/stash once its balance is at the minimum. + * This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone + * and the target `stash` must have no funds left beyond the ED. + * + * This can be called from any origin. + * + * - `stash`: The stash account to reap. Its balance must be zero. + * + * # + * Complexity: O(S) where S is the number of slashing spans on the account. + * DB Weight: + * - Reads: Stash Account, Bonded, Slashing Spans, Locks + * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, + * Stash Account, Locks + * - Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MAX_UNLOCKING_CHUNKS`. + * - Storage changes: Can't increase storage, only decrease it. + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: MultiAddress +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. This + * should report all the storage items that will be deleted by clearing old era history. + * Needed to report an accurate weight for the dispatch. Trusted by `Root` to report an + * accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Weight: O(E) + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, + * ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + * + * # + * - O(V) + * - Write: Invulnerables + * # + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId32[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Update the various staking limits this pallet. + * + * * `min_nominator_bond`: The minimum active bond needed to be a nominator. + * * `min_validator_bond`: The minimum active bond needed to be a validator. + * * `max_nominator_count`: The max number of users who can be a nominator at once. When + * set to `None`, no limit is enforced. + * * `max_validator_count`: The max number of users who can be a validator at once. When + * set to `None`, no limit is enforced. + * + * Origin must be Root to call this function. + * + * NOTE: Existing nominators and validators will not be affected by this update. + * to kick people under the new limits, `chill_other` should be called. + */ +export interface StakingCall_set_staking_limits { + __kind: 'set_staking_limits' + minNominatorBond: bigint + minValidatorBond: bigint + maxNominatorCount?: (number | undefined) + maxValidatorCount?: (number | undefined) + threshold?: (Percent | undefined) +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * If a user encounters the `InsufficientBond` error when calling this extrinsic, + * they should call `chill` first in order to free up their bonded funds. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * Complexity O(S) where S is the number of slashing spans to remove + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +export type Percent = number + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: sts.bigint(), + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId32, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId32, + judgement: Type_357, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId32, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: MultiAddress, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId32, + value: sts.bigint(), + tip: sts.bigint(), + }), + } +}) + +export const Type_357: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export type Type_357 = Type_357_Approve | Type_357_Rebid | Type_357_Reject + +export interface Type_357_Approve { + __kind: 'Approve' +} + +export interface Type_357_Rebid { + __kind: 'Rebid' +} + +export interface Type_357_Reject { + __kind: 'Reject' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: bigint +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * pallet to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId32 + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId32 + judgement: Type_357 +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin forgives + * (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to + * society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId32 + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured + * payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be approved (`true`) or + * rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: MultiAddress + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId32 + value: bigint + tip: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: Id, + }), + force_lease: sts.enumStruct({ + para: Id, + leaser: AccountId32, + amount: sts.bigint(), + periodBegin: sts.number(), + periodCount: sts.number(), + }), + trigger_onboard: sts.enumStruct({ + para: Id, + }), + } +}) + +export const Id = sts.number() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * Clear all leases for a Para Id, refunding any deposits back to the original owners. + * + * Can only be called by the Root origin. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: Id +} + +/** + * Just a connect into the `lease_out` call, in case Root wants to force some lease to happen + * independently of any other on-chain mechanism to use it. + * + * Can only be called by the Root origin. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: Id + leaser: AccountId32 + amount: bigint + periodBegin: number + periodCount: number +} + +/** + * Try to onboard a parachain that has a lease for the current lease period. + * + * This function can be useful if there was some state issue with a para that should + * have onboarded, but was unable to. As long as they have a lease period, we can + * let them onboard from here. + * + * Origin must be signed, but can be called by anyone. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: Id +} + +export type Id = number + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: SessionKeys, + proof: sts.bytes(), + }), + } +}) + +export const SessionKeys: sts.Type = sts.struct(() => { + return { + grandpa: Public, + babe: sts.bytes(), + imOnline: sts.bytes(), + paraValidator: sts.bytes(), + paraAssignment: V1Public, + authorityDiscovery: sts.bytes(), + } +}) + +export const V1Public = sts.bytes() + +export const Public = sts.bytes() + +export interface SessionKeys { + grandpa: Public + babe: Bytes + imOnline: Bytes + paraValidator: Bytes + paraAssignment: V1Public + authorityDiscovery: Bytes +} + +export type V1Public = Bytes + +export type Public = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be Signed and the account must be either be + * convertible to a validator ID using the chain's typical addressing system (this usually + * means being a controller account) or directly convertible into a validator ID (which + * usually means being a stash account). + * + * # + * - Complexity: `O(1)` in number of key types. Actual cost depends on the number of length + * of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)`. Actual cost depends on the number of length of + * `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: SessionKeys + proof: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: sts.number(), + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_after: sts.enumStruct({ + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.15 + 2.869 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: number + index: number +} + +/** + * Cancel a named scheduled task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 24.91 + 2.907 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 100 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 22.29 + .126 * S µs + * - DB Weight: + * - Read: Agenda + * - Write: Agenda + * - Will use base weight of 25 which should be good for up to 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Schedule a named task. + * + * # + * - S = Number of already scheduled calls + * - Base Weight: 29.6 + .159 * S µs + * - DB Weight: + * - Read: Agenda, Lookup + * - Write: Agenda, Lookup + * - Will use base weight of 35 which should be good for more than 30 scheduled calls + * # + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`](Self::schedule_named). + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + deregister: sts.enumStruct({ + id: Id, + }), + force_register: sts.enumStruct({ + who: AccountId32, + deposit: sts.bigint(), + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + force_remove_lock: sts.enumStruct({ + para: Id, + }), + register: sts.enumStruct({ + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + reserve: sts.unit(), + swap: sts.enumStruct({ + id: Id, + other: Id, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RegistrarCall = RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_force_remove_lock | RegistrarCall_register | RegistrarCall_reserve | RegistrarCall_swap + +/** + * Deregister a Para Id, freeing all data and returning any deposit. + * + * The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: Id +} + +/** + * Force the registration of a Para Id on the relay chain. + * + * This function must be called by a Root origin. + * + * The deposit taken can be specified for this registration. Any `ParaId` + * can be registered, including sub-1000 IDs which are System Parachains. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId32 + deposit: bigint + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Remove a manager lock from a para. This will allow the manager of a + * previously locked para to deregister or swap a para without using governance. + * + * Can only be called by the Root origin. + */ +export interface RegistrarCall_force_remove_lock { + __kind: 'force_remove_lock' + para: Id +} + +/** + * Register head data and validation code for a reserved Para Id. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. + * - `id`: The para ID. Must be owned/managed by the `origin` signing account. + * - `genesis_head`: The genesis head data of the parachain/thread. + * - `validation_code`: The initial validation code of the parachain/thread. + * + * ## Deposits/Fees + * The origin signed account must reserve a corresponding deposit for the registration. Anything already + * reserved previously for this para ID is accounted for. + * + * ## Events + * The `Registered` event is emitted in case of success. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Reserve a Para Id on the relay chain. + * + * This function will reserve a new Para Id to be owned/managed by the origin account. + * The origin account is able to register head data and validation code using `register` to create + * a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID. + * + * ## Deposits/Fees + * The origin must reserve a deposit of `ParaDeposit` for the registration. + * + * ## Events + * The `Reserved` event is emitted in case of success, which provides the ID reserved for use. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * Swap a parachain with another parachain or parathread. + * + * The origin must be Root, the `para` owner, or the `para` itself. + * + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: Id + other: Id +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId32, + call: Call, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId32, + }), + claim_recovery: sts.enumStruct({ + account: AccountId32, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId32, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId32), + threshold: sts.number(), + delayPeriod: sts.number(), + }), + initiate_recovery: sts.enumStruct({ + account: AccountId32, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId32, + rescuer: AccountId32, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId32, + rescuer: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + * + * # + * - The weight of the `call` + 10,000. + * - One storage lookup to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId32 + call: Call +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + * + * # + * - One storage mutation to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId32 +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully recovered by + * you. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + V) + * # + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId32 +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + * + * # + * Key: V (len of vouching friends) + * - One storage read/remove to get the active recovery process. O(1), Codec O(V) + * - One balance call to repatriate reserved. O(X) + * - One event. + * + * Total Complexity: O(V + X) + * # + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId32 +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. Should be + * ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt before the + * account can be recovered. Should be less than or equal to the length of the list of + * friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized that + * needs to pass before the account can be recovered. + * + * # + * - Key: F (len of friends) + * - One storage read to check that account is not already recoverable. O(1). + * - A check that the friends list is sorted and unique. O(F) + * - One currency reserve operation. O(X) + * - One storage write. O(1). Codec O(F). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId32[] + threshold: number + delayPeriod: number +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account needs to be + * recoverable (i.e. have a recovery configuration). + * + * # + * - One storage read to check that account is recoverable. O(F) + * - One storage read to check that this recovery process hasn't already started. O(1) + * - One currency reserve operation. O(X) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId32 +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + * + * # + * Key: F (len of friends) + * - One storage read to get the prefix iterator for active recoveries. O(1) + * - One storage read/remove to get the recovery configuration. O(1), Codec O(F) + * - One balance call to unreserved. O(X) + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + * + * # + * - One storage write O(1) + * - One event + * # + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId32 + rescuer: AccountId32 +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One binary search to confirm caller is a friend. O(logF) + * - One binary search to confirm caller has not already vouched. O(logV) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + logF + V + logV) + * # + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId32 + rescuer: AccountId32 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: AccountId32, + proxyType: ProxyType, + delay: sts.number(), + }), + announce: sts.enumStruct({ + real: AccountId32, + callHash: H256, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + delay: sts.number(), + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId32, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId32, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + proxy_announced: sts.enumStruct({ + delegate: AccountId32, + real: AccountId32, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + reject_announcement: sts.enumStruct({ + delegate: AccountId32, + callHash: H256, + }), + remove_announcement: sts.enumStruct({ + real: AccountId32, + callHash: H256, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: AccountId32, + proxyType: ProxyType, + delay: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: AccountId32 + proxyType: ProxyType + delay: number +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: AccountId32 + callHash: H256 +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + * TODO: Might be over counting 1 read + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: number + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId32 + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId32 + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Dispatch the given `call` from an account that the sender is authorized for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: AccountId32 + real: AccountId32 + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: AccountId32 + callHash: H256 +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: AccountId32 + callHash: H256 +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: AccountId32 + proxyType: ProxyType + delay: number +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PhragmenElectionCall: sts.Type = sts.closedEnum(() => { + return { + clean_defunct_voters: sts.enumStruct({ + numVoters: sts.number(), + numDefunct: sts.number(), + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + hasReplacement: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId32), + value: sts.bigint(), + }), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PhragmenElectionCall = PhragmenElectionCall_clean_defunct_voters | PhragmenElectionCall_remove_member | PhragmenElectionCall_remove_voter | PhragmenElectionCall_renounce_candidacy | PhragmenElectionCall_submit_candidacy | PhragmenElectionCall_vote + +/** + * Clean all voters who are defunct (i.e. they do not serve any purpose at all). The + * deposit of the removed voters are returned. + * + * This is an root function to be used only for cleaning the state. + * + * The dispatch origin of this call must be root. + * + * # + * The total number of voters and those that are defunct must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_clean_defunct_voters { + __kind: 'clean_defunct_voters' + numVoters: number + numDefunct: number +} + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, a new phragmen election is started. + * + * The dispatch origin of this call must be root. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement, we use a small weight. Else, since this is a root call and + * will go into phragmen, we assume full block for now. + * # + */ +export interface PhragmenElectionCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + hasReplacement: boolean +} + +/** + * Remove `origin` as a voter. + * + * This removes the lock and returns the deposit. + * + * The dispatch origin of this call must be signed and be a voter. + */ +export interface PhragmenElectionCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * + * - `origin` is a candidate and not elected in any set. In this case, the deposit is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the deposit is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the deposit is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_member`](Self::remove_member), if replacement runners exists, they + * are immediately used. If the prime is renouncing, then no prime will exist until the + * next round. + * + * The dispatch origin of this call must be signed, and have one of the above roles. + * + * # + * The type of renouncing must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Submit oneself for candidacy. A fixed amount of deposit is recorded. + * + * All candidates are wiped at the end of the term. They either become a member/runner-up, + * or leave the system while their deposit is slashed. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`] + * to get their deposit back. Losing the spot in an election will always lead to a slash. + * + * # + * The number of current candidates must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is + * reserved. The deposit is based on the number of votes and can be updated over time. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * If `value` is more than `who`'s total balance, then the maximum of the two is used. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * It is the responsibility of the caller to **NOT** place all of their balance into the + * lock and keep some for further operations. + * + * # + * We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less. + * # + */ +export interface PhragmenElectionCall_vote { + __kind: 'vote' + votes: AccountId32[] + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasSharedCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + force_note_new_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: Id, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + relayParentNumber: sts.number(), + }), + force_set_current_code: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasCall = ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head + +/** + * Note a new block head for para within the context of the current block. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: Id + newHead: HeadData +} + +/** + * Put a parachain directly into the next session's action queue. + * We can't queue it any sooner than this without going into the + * initializer... + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: Id +} + +/** + * Schedule an upgrade as if it was scheduled in the given relay parent block. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: Id + newCode: ValidationCode + relayParentNumber: number +} + +/** + * Set the storage for the parachain validation code immediately. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: Id + newCode: ValidationCode +} + +/** + * Set the storage for the current parachain head data immediately. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: Id + newHead: HeadData +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: V1InherentData, + }), + } +}) + +export const V1InherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => V1UncheckedSigned), + backedCandidates: sts.array(() => V1BackedCandidate), + disputes: sts.array(() => V1DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: H256, + number: sts.number(), + stateRoot: H256, + extrinsicsRoot: H256, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + ChangesTrieRoot: H256, + ChangesTrieSignal: ChangesTrieSignal, + Consensus: sts.tuple(() => [sts.bytes(), sts.bytes()]), + Other: sts.bytes(), + PreRuntime: sts.tuple(() => [sts.bytes(), sts.bytes()]), + RuntimeEnvironmentUpdated: sts.unit(), + Seal: sts.tuple(() => [sts.bytes(), sts.bytes()]), + } +}) + +export const ChangesTrieSignal: sts.Type = sts.closedEnum(() => { + return { + NewConfiguration: sts.option(() => ChangesTrieConfiguration), + } +}) + +export type ChangesTrieSignal = ChangesTrieSignal_NewConfiguration + +export interface ChangesTrieSignal_NewConfiguration { + __kind: 'NewConfiguration' + value?: (ChangesTrieConfiguration | undefined) +} + +export type DigestItem = DigestItem_ChangesTrieRoot | DigestItem_ChangesTrieSignal | DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal + +export interface DigestItem_ChangesTrieRoot { + __kind: 'ChangesTrieRoot' + value: H256 +} + +export interface DigestItem_ChangesTrieSignal { + __kind: 'ChangesTrieSignal' + value: ChangesTrieSignal +} + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: [Bytes, Bytes] +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: [Bytes, Bytes] +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: [Bytes, Bytes] +} + +export interface Digest { + logs: DigestItem[] +} + +export interface Header { + parentHash: H256 + number: number + stateRoot: H256 + extrinsicsRoot: H256 + digest: Digest +} + +export const V1DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: sts.number(), + statements: sts.array(() => sts.tuple(() => [V1DisputeStatement, V0ValidatorIndex, sts.bytes()])), + } +}) + +export const V0ValidatorIndex = sts.number() + +export const V1DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: V1InvalidDisputeStatementKind, + Valid: V1ValidDisputeStatementKind, + } +}) + +export const V1ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + BackingSeconded: H256, + BackingValid: H256, + Explicit: sts.unit(), + } +}) + +export type V1ValidDisputeStatementKind = V1ValidDisputeStatementKind_ApprovalChecking | V1ValidDisputeStatementKind_BackingSeconded | V1ValidDisputeStatementKind_BackingValid | V1ValidDisputeStatementKind_Explicit + +export interface V1ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface V1ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: H256 +} + +export interface V1ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: H256 +} + +export interface V1ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export const V1InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export type V1InvalidDisputeStatementKind = V1InvalidDisputeStatementKind_Explicit + +export interface V1InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type V1DisputeStatement = V1DisputeStatement_Invalid | V1DisputeStatement_Valid + +export interface V1DisputeStatement_Invalid { + __kind: 'Invalid' + value: V1InvalidDisputeStatementKind +} + +export interface V1DisputeStatement_Valid { + __kind: 'Valid' + value: V1ValidDisputeStatementKind +} + +export const CandidateHash = sts.bytes() + +export interface V1DisputeStatementSet { + candidateHash: CandidateHash + session: number + statements: [V1DisputeStatement, V0ValidatorIndex, Bytes][] +} + +export type V0ValidatorIndex = number + +export type CandidateHash = Bytes + +export const V1BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: V1CommittedCandidateReceipt, + validityVotes: sts.array(() => V0ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const V0ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.bytes(), + Implicit: sts.bytes(), + } +}) + +export type V0ValidityAttestation = V0ValidityAttestation_Explicit | V0ValidityAttestation_Implicit + +export interface V0ValidityAttestation_Explicit { + __kind: 'Explicit' + value: Bytes +} + +export interface V0ValidityAttestation_Implicit { + __kind: 'Implicit' + value: Bytes +} + +export const V1CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: V1CandidateDescriptor, + commitments: V1CandidateCommitments, + } +}) + +export const V1CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => sts.bytes()), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: sts.number(), + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: Id, + data: sts.bytes(), + } +}) + +export interface OutboundHrmpMessage { + recipient: Id + data: Bytes +} + +export interface V1CandidateCommitments { + upwardMessages: Bytes[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: number +} + +export const V1CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: Id, + relayParent: H256, + collator: V0Public, + persistedValidationDataHash: H256, + povHash: H256, + erasureRoot: H256, + signature: V0Signature, + paraHead: H256, + validationCodeHash: ValidationCodeHash, + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const V0Signature = sts.bytes() + +export const V0Public = sts.bytes() + +export interface V1CandidateDescriptor { + paraId: Id + relayParent: H256 + collator: V0Public + persistedValidationDataHash: H256 + povHash: H256 + erasureRoot: H256 + signature: V0Signature + paraHead: H256 + validationCodeHash: ValidationCodeHash +} + +export type ValidationCodeHash = Bytes + +export type V0Signature = Bytes + +export type V0Public = Bytes + +export interface V1CommittedCandidateReceipt { + descriptor: V1CandidateDescriptor + commitments: V1CandidateCommitments +} + +export interface V1BackedCandidate { + candidate: V1CommittedCandidateReceipt + validityVotes: V0ValidityAttestation[] + validatorIndices: BitSequence +} + +export const V1UncheckedSigned: sts.Type = sts.struct(() => { + return { + payload: V1AvailabilityBitfield, + validatorIndex: V0ValidatorIndex, + signature: sts.bytes(), + } +}) + +export const V1AvailabilityBitfield = sts.bitseq() + +export interface V1UncheckedSigned { + payload: V1AvailabilityBitfield + validatorIndex: V0ValidatorIndex + signature: Bytes +} + +export type V1AvailabilityBitfield = BitSequence + +export interface V1InherentData { + bitfields: V1UncheckedSigned[] + backedCandidates: V1BackedCandidate[] + disputes: V1DisputeStatementSet[] + parentHeader: Header +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInherentCall = ParaInherentCall_enter + +/** + * Enter the paras inherent. This will process bitfields and backed candidates. + */ +export interface ParaInherentCall_enter { + __kind: 'enter' + data: V1InherentData +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInclusionCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: sts.bigint(), + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + call: sts.bytes(), + storeCall: sts.boolean(), + maxWeight: sts.bigint(), + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId32), + call: Call, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: sts.number(), + index: sts.number(), + } +}) + +export interface Timepoint { + height: number + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: bigint +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + call: Bytes + storeCall: boolean + maxWeight: bigint +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId32[] + call: Call +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId32[] + timepoint: Timepoint + callHash: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const InitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type InitializerCall = InitializerCall_force_approve + +/** + * Issue a signal to the consensus engine to forcibly act as though all parachain + * blocks in all relay chain blocks up to and including the given number in the current + * chain are valid and should be finalized. + */ +export interface InitializerCall_force_approve { + __kind: 'force_approve' + upTo: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: sts.number(), + }), + force_transfer: sts.enumStruct({ + new: AccountId32, + index: sts.number(), + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: sts.number(), + }), + freeze: sts.enumStruct({ + index: sts.number(), + }), + transfer: sts.enumStruct({ + new: AccountId32, + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: number +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId32 + index: number + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: number +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the + * deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: number +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: sts.bytes(), + }), + } +}) + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: sts.number(), + networkState: OpaqueNetworkState, + sessionIndex: sts.number(), + authorityIndex: sts.number(), + validatorsLen: sts.number(), + } +}) + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export interface Heartbeat { + blockNumber: number + networkState: OpaqueNetworkState + sessionIndex: number + authorityIndex: number + validatorsLen: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is + * length of `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Bytes +} + +/** + * Identity pallet declaration. + */ +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId32, + }), + add_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: sts.number(), + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: MultiAddress, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: MultiAddress, + judgement: Judgement, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: MultiAddress, + }), + rename_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId32, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: BitFlags, + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId32, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => sts.tuple(() => [Data, Data])), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => sts.bytes()), + image: Data, + twitter: Data, + } +}) + +export interface IdentityInfo { + additional: [Data, Data][] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (Bytes | undefined) + image: Data + twitter: Data +} + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: Bytes +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: Bytes +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: Bytes +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: Bytes +} + +export const BitFlags = sts.bigint() + +export const Judgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: sts.bigint(), + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export type Judgement = Judgement_Erroneous | Judgement_FeePaid | Judgement_KnownGood | Judgement_LowQuality | Judgement_OutOfDate | Judgement_Reasonable | Judgement_Unknown + +export interface Judgement_Erroneous { + __kind: 'Erroneous' +} + +export interface Judgement_FeePaid { + __kind: 'FeePaid' + value: bigint +} + +export interface Judgement_KnownGood { + __kind: 'KnownGood' +} + +export interface Judgement_LowQuality { + __kind: 'LowQuality' +} + +export interface Judgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface Judgement_Reasonable { + __kind: 'Reasonable' +} + +export interface Judgement_Unknown { + __kind: 'Unknown' +} + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: sts.bytes(), + Keccak256: sts.bytes(), + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: sts.bytes(), + ShaThree256: sts.bytes(), + } +}) + +/** + * Identity pallet declaration. + */ +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId32 +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: MultiAddress + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: number +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: MultiAddress +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: MultiAddress + judgement: Judgement +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: MultiAddress +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: MultiAddress + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId32 +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: BitFlags +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId32, Data][] +} + +export type BitFlags = bigint + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const HrmpCall: sts.Type = sts.closedEnum(() => { + return { + force_clean_hrmp: sts.enumStruct({ + para: Id, + }), + force_process_hrmp_close: sts.unit(), + force_process_hrmp_open: sts.unit(), + hrmp_accept_open_channel: sts.enumStruct({ + sender: Id, + }), + hrmp_cancel_open_request: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: Id, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: Id, + recipient: Id, + } +}) + +export interface HrmpChannelId { + sender: Id + recipient: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type HrmpCall = HrmpCall_force_clean_hrmp | HrmpCall_force_process_hrmp_close | HrmpCall_force_process_hrmp_open | HrmpCall_hrmp_accept_open_channel | HrmpCall_hrmp_cancel_open_request | HrmpCall_hrmp_close_channel | HrmpCall_hrmp_init_open_channel + +/** + * This extrinsic triggers the cleanup of all the HRMP storage items that + * a para may have. Normally this happens once per session, but this allows + * you to trigger the cleanup immediately for a specific parachain. + * + * Origin must be Root. + */ +export interface HrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: Id +} + +/** + * Force process HRMP close channel requests. + * + * If there are pending HRMP close channel requests, you can use this + * function process all of those requests immediately. + */ +export interface HrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' +} + +/** + * Force process HRMP open channel requests. + * + * If there are pending HRMP open channel requests, you can use this + * function process all of those requests immediately. + */ +export interface HrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' +} + +/** + * Accept a pending open channel request from the given sender. + * + * The channel will be opened only on the next session boundary. + */ +export interface HrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: Id +} + +/** + * This cancels a pending open channel request. It can be canceled be either of the sender + * or the recipient for that request. The origin must be either of those. + * + * The cancelling happens immediately. It is not possible to cancel the request if it is + * already accepted. + */ +export interface HrmpCall_hrmp_cancel_open_request { + __kind: 'hrmp_cancel_open_request' + channelId: HrmpChannelId +} + +/** + * Initiate unilateral closing of a channel. The origin must be either the sender or the + * recipient in the channel being closed. + * + * The closure can only happen on a session change. + */ +export interface HrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * Initiate opening a channel from a parachain to a given recipient with given channel + * parameters. + * + * - `proposed_max_capacity` - specifies how many messages can be in the channel at once. + * - `proposed_max_message_size` - specifies the maximum size of the messages. + * + * These numbers are a subject to the relay-chain configuration limits. + * + * The channel can be opened only after the recipient confirms it and only on a session + * change. + */ +export interface HrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: Id + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: sts.number(), + bestFinalizedBlockNumber: sts.number(), + }), + report_equivocation: sts.enumStruct({ + equivocationProof: Type_253, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_253, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: sts.number(), + trieNodes: sts.array(() => sts.bytes()), + validatorCount: sts.number(), + } +}) + +export interface MembershipProof { + session: number + trieNodes: Bytes[] + validatorCount: number +} + +export const Type_253: sts.Type = sts.struct(() => { + return { + setId: sts.bigint(), + equivocation: Equivocation, + } +}) + +export const Equivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: Type_260, + Prevote: Type_255, + } +}) + +export const Type_255: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Prevote, sts.bytes()]), + second: sts.tuple(() => [Prevote, sts.bytes()]), + } +}) + +export const Prevote: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Prevote { + targetHash: H256 + targetNumber: number +} + +export interface Type_255 { + roundNumber: bigint + identity: Public + first: [Prevote, Bytes] + second: [Prevote, Bytes] +} + +export const Type_260: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Precommit, sts.bytes()]), + second: sts.tuple(() => [Precommit, sts.bytes()]), + } +}) + +export const Precommit: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Precommit { + targetHash: H256 + targetNumber: number +} + +export interface Type_260 { + roundNumber: bigint + identity: Public + first: [Precommit, Bytes] + second: [Precommit, Bytes] +} + +export type Equivocation = Equivocation_Precommit | Equivocation_Prevote + +export interface Equivocation_Precommit { + __kind: 'Precommit' + value: Type_260 +} + +export interface Equivocation_Prevote { + __kind: 'Prevote' + value: Type_255 +} + +export interface Type_253 { + setId: bigint + equivocation: Equivocation +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has + * stalled. This will trigger a forced authority set change at the beginning + * of the next session, to be enacted `delay` blocks after that. The delay + * should be high enough to safely assume that the block signalling the + * forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters + * will start the new authority set using the given finalized block as base. + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: number + bestFinalizedBlockNumber: number +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_253 + keyOwnerProof: MembershipProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_253 + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GiltCall: sts.Type = sts.closedEnum(() => { + return { + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + set_target: sts.enumStruct({ + target: sts.bigint(), + }), + thaw: sts.enumStruct({ + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GiltCall = GiltCall_place_bid | GiltCall_retract_bid | GiltCall_set_target | GiltCall_thaw + +/** + * Place a bid for a gilt to be issued. + * + * Origin must be Signed, and account must have at least `amount` in free balance. + * + * - `amount`: The amount of the bid; these funds will be reserved. If the bid is + * successfully elevated into an issued gilt, then these funds will continue to be + * reserved until the gilt expires. Must be at least `MinFreeze`. + * - `duration`: The number of periods for which the funds will be locked if the gilt is + * issued. It will expire only after this period has elapsed after the point of issuance. + * Must be greater than 1 and no more than `QueueCount`. + * + * Complexities: + * - `Queues[duration].len()` (just take max). + */ +export interface GiltCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * Retract a previously placed bid. + * + * Origin must be Signed, and the account should have previously issued a still-active bid + * of `amount` for `duration`. + * + * - `amount`: The amount of the previous bid. + * - `duration`: The duration of the previous bid. + */ +export interface GiltCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * Set target proportion of gilt-funds. + * + * Origin must be `AdminOrigin`. + * + * - `target`: The target proportion of effective issued funds that should be under gilts + * at any one time. + */ +export interface GiltCall_set_target { + __kind: 'set_target' + target: bigint +} + +/** + * Remove an active but expired gilt. Reserved funds under gilt are freed and balance is + * adjusted to ensure that the funds grow or shrink to maintain the equivalent proportion + * of effective total issued funds. + * + * Origin must be Signed and the account must be the owner of the gilt of the given index. + * + * - `index`: The index of the gilt to be thawed. + */ +export interface GiltCall_thaw { + __kind: 'thaw' + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + set_emergency_election_result: sts.enumStruct({ + supports: sts.array(() => sts.tuple(() => [AccountId32, Support])), + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => sts.array(() => sts.bigint())), + }), + submit: sts.enumStruct({ + rawSolution: RawSolution, + numSignedSubmissions: sts.number(), + }), + submit_unsigned: sts.enumStruct({ + rawSolution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export const RawSolution: sts.Type = sts.struct(() => { + return { + solution: NposCompactSolution24, + score: sts.array(() => sts.bigint()), + round: sts.number(), + } +}) + +export const NposCompactSolution24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), + votes2: sts.array(() => sts.tuple(() => [sts.number(), sts.tuple(() => [sts.number(), sts.number()]), sts.number()])), + votes3: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes4: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes5: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes6: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes7: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes8: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes9: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes10: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes11: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes12: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes13: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes14: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes15: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes16: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes17: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes18: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes19: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes20: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes21: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes22: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes23: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes24: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + } +}) + +export interface NposCompactSolution24 { + votes1: [number, number][] + votes2: [number, [number, number], number][] + votes3: [number, [number, number][], number][] + votes4: [number, [number, number][], number][] + votes5: [number, [number, number][], number][] + votes6: [number, [number, number][], number][] + votes7: [number, [number, number][], number][] + votes8: [number, [number, number][], number][] + votes9: [number, [number, number][], number][] + votes10: [number, [number, number][], number][] + votes11: [number, [number, number][], number][] + votes12: [number, [number, number][], number][] + votes13: [number, [number, number][], number][] + votes14: [number, [number, number][], number][] + votes15: [number, [number, number][], number][] + votes16: [number, [number, number][], number][] + votes17: [number, [number, number][], number][] + votes18: [number, [number, number][], number][] + votes19: [number, [number, number][], number][] + votes20: [number, [number, number][], number][] + votes21: [number, [number, number][], number][] + votes22: [number, [number, number][], number][] + votes23: [number, [number, number][], number][] + votes24: [number, [number, number][], number][] +} + +export interface RawSolution { + solution: NposCompactSolution24 + score: bigint[] + round: number +} + +export const Support: sts.Type = sts.struct(() => { + return { + total: sts.bigint(), + voters: sts.array(() => sts.tuple(() => [AccountId32, sts.bigint()])), + } +}) + +export interface Support { + total: bigint + voters: [AccountId32, bigint][] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * Set a solution in the queue, to be handed out to the client of this pallet in the next + * call to `ElectionProvider::elect`. + * + * This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`. + * + * The solution is not checked for any feasibility and is assumed to be trustworthy, as any + * feasibility check itself can in principle cause the election process to fail (due to + * memory/weight constrains). + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + supports: [AccountId32, Support][] +} + +/** + * Set a new value for `MinimumUntrustedScore`. + * + * Dispatch origin must be aligned with `T::ForceOrigin`. + * + * This check can be turned off by setting the value to `None`. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (bigint[] | undefined) +} + +/** + * Submit a solution for the signed phase. + * + * The dispatch origin fo this call must be __signed__. + * + * The solution is potentially queued, based on the claimed score and processed at the end + * of the signed phase. + * + * A deposit is reserved and recorded for the solution. Based on the outcome, the solution + * might be rewarded, slashed, or get all or a part of the deposit back. + * + * # + * Queue size must be provided as witness data. + * # + */ +export interface ElectionProviderMultiPhaseCall_submit { + __kind: 'submit' + rawSolution: RawSolution + numSignedSubmissions: number +} + +/** + * Submit a solution for the unsigned phase. + * + * The dispatch origin fo this call must be __none__. + * + * This submission is checked on the fly. Moreover, this unsigned solution is only + * validated when submitted to the pool from the **local** node. Effectively, this means + * that only active validators can submit this transaction when authoring a block (similar + * to an inherent). + * + * To prevent any incorrect solution (and thus wasted time/weight), this transaction will + * panic if the solution submitted by the validator is invalid in any way, effectively + * putting their authoring reward at risk. + * + * No deposit or reward is associated with this submission. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + rawSolution: RawSolution + witness: SolutionOrSnapshotSize +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DmpCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + blacklist: sts.enumStruct({ + proposalHash: H256, + maybeRefIndex: sts.option(() => sts.number()), + }), + cancel_proposal: sts.enumStruct({ + propIndex: sts.number(), + }), + cancel_queued: sts.enumStruct({ + which: sts.number(), + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId32, + conviction: Conviction, + balance: sts.bigint(), + }), + emergency_cancel: sts.enumStruct({ + refIndex: sts.number(), + }), + enact_proposal: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + }), + external_propose: sts.enumStruct({ + proposalHash: H256, + }), + external_propose_default: sts.enumStruct({ + proposalHash: H256, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: H256, + }), + fast_track: sts.enumStruct({ + proposalHash: H256, + votingPeriod: sts.number(), + delay: sts.number(), + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: H256, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: H256, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId32, + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + index: sts.number(), + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId32, + }), + veto_external: sts.enumStruct({ + proposalHash: H256, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface AccountVote_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DemocracyCall = DemocracyCall_blacklist | DemocracyCall_cancel_proposal | DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. + * + * If called on a queued public or external proposal, then this will result in it being + * removed. If the `ref_index` supplied is an active referendum with the proposal hash, + * then it will be cancelled. + * + * The dispatch origin of this call must be `BlacklistOrigin`. + * + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. + * + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). + */ +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: H256 + maybeRefIndex?: (number | undefined) +} + +/** + * Remove a proposal. + * + * The dispatch origin of this call must be `CancelProposalOrigin`. + * + * - `prop_index`: The index of the proposal to cancel. + * + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number +} + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: number +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must not + * be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId32 + conviction: Conviction + balance: bigint +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: number +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: H256 + index: number +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Weight: `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: H256 +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: H256 +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: H256 +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * `FastTrackVotingPeriod` if too low. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: H256 + votingPeriod: number + delay: number +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. When this call is successful, i.e. + * the preimage has not been uploaded before and matches some imminent proposal, + * no fee is paid. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * Weight: `O(p)` + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: H256 + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. Extrinsic is + * weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * Weight: `O(D)` where D is length of proposal. + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: H256 + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId32 + index: number +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: number +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * Weight: `O(S)` where S is the number of seconds a proposal already has. + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId32 +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * Weight: `O(V + log(V))` where V is number of `existing vetoers` + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: H256 +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of referendums the voter has voted on. + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: Id, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: Id, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId32, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: Signature, + } +}) + +export const Signature = sts.bytes() + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Signature +} + +export type Signature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * Add an optional memo to an existing crowdloan contribution. + * + * Origin must be Signed, and the user must have contributed to the crowdloan. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: Id + memo: Bytes +} + +/** + * Contribute to a crowd sale. This will transfer some balance over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * Create a new crowdloaning campaign for a parachain slot with the given lease period range. + * + * This applies a lock to your parachain configuration, ensuring that it cannot be changed + * by the parachain manager. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Remove a fund after the retirement period has ended and all funds have been returned. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * Edit the configuration for an in-progress crowdloan. + * + * Can only be called by Root origin. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Poke the fund into `NewRaise` + * + * Origin must be Signed, and the fund has non-zero raise. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: Id +} + +/** + * Automatically refund contributors of an ended crowdloan. + * Due to weight restrictions, this function may need to be called multiple + * times to fully refund all users. We will refund `RemoveKeysLimit` users at a time. + * + * Origin must be signed, but can come from anyone. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * Withdraw full balance of a specific contributor. + * + * Origin must be signed, but can come from anyone. + * + * The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement + * flag must be set. For a fund to be ready for retirement, then: + * - it must not already be in retirement; + * - the amount of raised funds must be bigger than the _free_ balance of the account; + * - and either: + * - the block number must be at least `end`; or + * - the current lease period must be greater than the fund's `last_period`. + * + * In this case, the fund's retirement flag is set and its `end` is reset to the current block + * number. + * + * - `who`: The account whose contribution should be withdrawn. + * - `index`: The parachain to whose crowdloan the contribution was made. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_chain_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_code_retention_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_conclusion_by_time_out_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_max_spam_slots: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: sts.number(), + }), + set_group_rotation_frequency: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_cores: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_retries: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_thread_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_ump_max_individual_weight: sts.enumStruct({ + new: sts.bigint(), + }), + set_ump_service_total_weight: sts.enumStruct({ + new: sts.bigint(), + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_frequency: sts.enumStruct({ + new: sts.number(), + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ConfigurationCall = ConfigurationCall_set_chain_availability_period | ConfigurationCall_set_code_retention_period | ConfigurationCall_set_dispute_conclusion_by_time_out_period | ConfigurationCall_set_dispute_max_spam_slots | ConfigurationCall_set_dispute_period | ConfigurationCall_set_dispute_post_conclusion_acceptance_period | ConfigurationCall_set_group_rotation_frequency | ConfigurationCall_set_hrmp_channel_max_capacity | ConfigurationCall_set_hrmp_channel_max_message_size | ConfigurationCall_set_hrmp_channel_max_total_size | ConfigurationCall_set_hrmp_max_message_num_per_candidate | ConfigurationCall_set_hrmp_max_parachain_inbound_channels | ConfigurationCall_set_hrmp_max_parachain_outbound_channels | ConfigurationCall_set_hrmp_max_parathread_inbound_channels | ConfigurationCall_set_hrmp_max_parathread_outbound_channels | ConfigurationCall_set_hrmp_open_request_ttl | ConfigurationCall_set_hrmp_recipient_deposit | ConfigurationCall_set_hrmp_sender_deposit | ConfigurationCall_set_max_code_size | ConfigurationCall_set_max_downward_message_size | ConfigurationCall_set_max_head_data_size | ConfigurationCall_set_max_pov_size | ConfigurationCall_set_max_upward_message_num_per_candidate | ConfigurationCall_set_max_upward_message_size | ConfigurationCall_set_max_upward_queue_count | ConfigurationCall_set_max_upward_queue_size | ConfigurationCall_set_max_validators | ConfigurationCall_set_max_validators_per_core | ConfigurationCall_set_n_delay_tranches | ConfigurationCall_set_needed_approvals | ConfigurationCall_set_no_show_slots | ConfigurationCall_set_parathread_cores | ConfigurationCall_set_parathread_retries | ConfigurationCall_set_relay_vrf_modulo_samples | ConfigurationCall_set_scheduling_lookahead | ConfigurationCall_set_thread_availability_period | ConfigurationCall_set_ump_max_individual_weight | ConfigurationCall_set_ump_service_total_weight | ConfigurationCall_set_validation_upgrade_delay | ConfigurationCall_set_validation_upgrade_frequency | ConfigurationCall_set_zeroth_delay_tranche_width + +/** + * Set the availability period for parachains. + */ +export interface ConfigurationCall_set_chain_availability_period { + __kind: 'set_chain_availability_period' + new: number +} + +/** + * Set the acceptance period for an included candidate. + */ +export interface ConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: number +} + +/** + * Set the dispute conclusion by time out period. + */ +export interface ConfigurationCall_set_dispute_conclusion_by_time_out_period { + __kind: 'set_dispute_conclusion_by_time_out_period' + new: number +} + +/** + * Set the maximum number of dispute spam slots. + */ +export interface ConfigurationCall_set_dispute_max_spam_slots { + __kind: 'set_dispute_max_spam_slots' + new: number +} + +/** + * Set the dispute period, in number of sessions to keep for disputes. + */ +export interface ConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: number +} + +/** + * Set the dispute post conclusion acceptance period. + */ +export interface ConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: number +} + +/** + * Set the parachain validator-group rotation frequency + */ +export interface ConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: number +} + +/** + * Sets the maximum number of messages allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * Sets the maximum size of a message that could ever be put into an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * Sets the maximum total size of messages in bytes allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * Sets the maximum number of outbound HRMP messages can be sent by a candidate. + */ +export interface ConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parachain is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parachain is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parathread is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_inbound_channels { + __kind: 'set_hrmp_max_parathread_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parathread is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_outbound_channels { + __kind: 'set_hrmp_max_parathread_outbound_channels' + new: number +} + +/** + * Sets the number of sessions after which an HRMP open channel request expires. + */ +export interface ConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * Sets the amount of funds that the recipient should provide for accepting opening an HRMP + * channel. + */ +export interface ConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: bigint +} + +/** + * Sets the amount of funds that the sender should provide for opening an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: bigint +} + +/** + * Set the max validation code size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * Set the critical downward message size. + */ +export interface ConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * Set the max head data size for paras. + */ +export interface ConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * Set the max POV block size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * Sets the maximum number of messages that a candidate can contain. + */ +export interface ConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum size of an upward message that can be sent by a candidate. + */ +export interface ConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * Sets the maximum items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * Sets the maximum total size of items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * Set the maximum number of validators to use in parachain consensus. + */ +export interface ConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * Set the maximum number of validators to assign to any core. + */ +export interface ConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * Set the total number of delay tranches. + */ +export interface ConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * Set the number of validators needed to approve a block. + */ +export interface ConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * Set the no show slots, in number of number of consensus slots. + * Must be at least 1. + */ +export interface ConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * Set the number of parathread execution cores. + */ +export interface ConfigurationCall_set_parathread_cores { + __kind: 'set_parathread_cores' + new: number +} + +/** + * Set the number of retries for a particular parathread. + */ +export interface ConfigurationCall_set_parathread_retries { + __kind: 'set_parathread_retries' + new: number +} + +/** + * Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion. + */ +export interface ConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * Set the scheduling lookahead, in expected number of blocks at peak throughput. + */ +export interface ConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * Set the availability period for parathreads. + */ +export interface ConfigurationCall_set_thread_availability_period { + __kind: 'set_thread_availability_period' + new: number +} + +/** + * Sets the maximum amount of weight any individual upward message may consume. + */ +export interface ConfigurationCall_set_ump_max_individual_weight { + __kind: 'set_ump_max_individual_weight' + new: bigint +} + +/** + * Sets the soft limit for the phase of dispatching dispatchable upward messages. + */ +export interface ConfigurationCall_set_ump_service_total_weight { + __kind: 'set_ump_service_total_weight' + new: bigint +} + +/** + * Set the validation upgrade delay. + */ +export interface ConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: number +} + +/** + * Set the validation upgrade frequency. + */ +export interface ConfigurationCall_set_validation_upgrade_frequency { + __kind: 'set_validation_upgrade_frequency' + new: number +} + +/** + * Set the zeroth delay tranche width. + */ +export interface ConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: sts.bigint(), + vestingSchedule: sts.option(() => sts.tuple(() => [sts.bigint(), sts.bigint(), sts.number()])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId32), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId32 + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId32 + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: bigint + vestingSchedule?: ([bigint, bigint, number] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId32 | undefined) +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds + * after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is + * malicious or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_force_unreserve | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_all | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is not + * assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * Unreserve some balance from a user by force. + * + * Can only be called by ROOT. + */ +export interface BalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also decrease the total issuance of the system (`TotalIssuance`). + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + * + * # + * - Independent of the arguments. + * - Contains a limited number of reads and writes. + * --------------------- + * - Base Weight: + * - Creating: 27.56 µs + * - Killing: 35.11 µs + * - DB Weight: 1 Read, 1 Write to `who` + * # + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: MultiAddress + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * It will decrease the total issuance of the system by the `TransferFee`. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for input config + * types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex + * computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional check + * that the transfer will not kill the origin account. + * --------------------------------- + * - Base Weight: 73.64 µs, worst case scenario (account created, account removed) + * - DB Weight: 1 Read and 1 Write to destination account + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: MultiAddress + value: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). # + * - O(1). Just like transfer, but reading the user's transferable balance first. + * # + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + * # + * - Cheaper than transfer because account cannot be killed. + * - Base Weight: 51.4 µs + * - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already) + * # + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BagsListCall: sts.Type = sts.closedEnum(() => { + return { + rebag: sts.enumStruct({ + dislocated: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BagsListCall = BagsListCall_rebag + +/** + * Declare that some `dislocated` account has, through rewards or penalties, sufficiently + * changed its weight that it should properly fall into a different bag than its current + * one. + * + * Anyone can call this function about any potentially dislocated account. + * + * Will never return an error; if `dislocated` does not exist or doesn't need a rebag, then + * it is a noop and fees are still collected from `origin`. + */ +export interface BagsListCall_rebag { + __kind: 'rebag' + dislocated: AccountId32 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const EquivocationProof: sts.Type = sts.struct(() => { + return { + offender: sts.bytes(), + slot: Slot, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Slot = sts.bigint() + +export interface EquivocationProof { + offender: Bytes + slot: Slot + firstHeader: Header + secondHeader: Header +} + +export type Slot = bigint + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V1: sts.enumStruct({ + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + }), + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type NextConfigDescriptor = NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Plan an epoch config change. The epoch config change is recorded and will be enacted on + * the next call to `enact_epoch_change`. The config will be activated one epoch after. + * Multiple calls to this method will replace any existing planned config change that had + * not been enacted yet. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Cancel an in-progress auction. + * + * Can only be called by Root origin. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +export type Call = Call_Auctions | Call_Authorship | Call_Babe | Call_BagsList | Call_Balances | Call_Bounties | Call_Claims | Call_Configuration | Call_Council | Call_Crowdloan | Call_Democracy | Call_Dmp | Call_ElectionProviderMultiPhase | Call_Gilt | Call_Grandpa | Call_Hrmp | Call_Identity | Call_ImOnline | Call_Indices | Call_Initializer | Call_Multisig | Call_ParaInclusion | Call_ParaInherent | Call_Paras | Call_ParasShared | Call_PhragmenElection | Call_Proxy | Call_Recovery | Call_Registrar | Call_Scheduler | Call_Session | Call_Slots | Call_Society | Call_Staking | Call_System | Call_TechnicalCommittee | Call_TechnicalMembership | Call_Timestamp | Call_Tips | Call_Treasury | Call_Ump | Call_Utility | Call_Vesting | Call_XcmPallet + +export interface Call_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Call_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Call_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Call_BagsList { + __kind: 'BagsList' + value: BagsListCall +} + +export interface Call_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Call_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Call_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Call_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Call_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Call_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Call_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Call_Dmp { + __kind: 'Dmp' + value: DmpCall +} + +export interface Call_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Call_Gilt { + __kind: 'Gilt' + value: GiltCall +} + +export interface Call_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Call_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Call_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Call_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Call_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Call_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Call_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Call_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Call_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Call_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Call_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Call_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Call_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Call_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Call_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Call_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Call_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Call_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Call_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Call_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Call_System { + __kind: 'System' + value: SystemCall +} + +export interface Call_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Call_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Call_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Call_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Call_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Call_Ump { + __kind: 'Ump' + value: UmpCall +} + +export interface Call_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Call_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Call_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId32 = sts.bytes() diff --git a/squid/src/types/v9130.ts b/squid/src/types/v9130.ts new file mode 100644 index 00000000..42ce1645 --- /dev/null +++ b/squid/src/types/v9130.ts @@ -0,0 +1,11119 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Call: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + BagsList: BagsListCall, + Balances: BalancesCall, + Bounties: BountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + Dmp: DmpCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + Gilt: GiltCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Initializer: InitializerCall, + Multisig: MultisigCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Paras: ParasCall, + ParasDisputes: ParasDisputesCall, + ParasShared: ParasSharedCall, + PhragmenElection: PhragmenElectionCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Ump: UmpCall, + Utility: UtilityCall, + Vesting: VestingCall, + XcmPallet: XcmPalletCall, + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + execute: sts.enumStruct({ + message: Type_524, + maxWeight: sts.bigint(), + }), + force_default_xcm_version: sts.enumStruct({ + maybeXcmVersion: sts.option(() => sts.number()), + }), + force_subscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_unsubscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_xcm_version: sts.enumStruct({ + location: V1MultiLocation, + xcmVersion: sts.number(), + }), + limited_reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + limited_teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + send: sts.enumStruct({ + dest: VersionedMultiLocation, + message: VersionedXcm, + }), + teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + } +}) + +export const VersionedXcm: sts.Type = sts.closedEnum(() => { + return { + V0: V0Xcm, + V1: V1Xcm, + V2: sts.array(() => V2Instruction), + } +}) + +export const V2Instruction: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => V2Instruction), + SetErrorHandler: sts.array(() => V2Instruction), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const DoubleEncoded: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncoded { + encoded: Bytes +} + +export const V0OriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type V0OriginKind = V0OriginKind_Native | V0OriginKind_SovereignAccount | V0OriginKind_Superuser | V0OriginKind_Xcm + +export interface V0OriginKind_Native { + __kind: 'Native' +} + +export interface V0OriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface V0OriginKind_Superuser { + __kind: 'Superuser' +} + +export interface V0OriginKind_Xcm { + __kind: 'Xcm' +} + +export const V2Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V2Error])), + Null: sts.unit(), + Version: sts.number(), + } +}) + +export const V2Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + MultiLocationFull: sts.unit(), + MultiLocationNotInvertible: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + TooExpensive: sts.unit(), + TooMuchWeightRequired: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + WeightLimitReached: sts.bigint(), + WeightNotComputable: sts.unit(), + } +}) + +export type V2Error = V2Error_AssetNotFound | V2Error_BadOrigin | V2Error_Barrier | V2Error_DestinationUnsupported | V2Error_ExceedsMaxMessageSize | V2Error_FailedToDecode | V2Error_FailedToTransactAsset | V2Error_InvalidLocation | V2Error_LocationCannotHold | V2Error_MultiLocationFull | V2Error_MultiLocationNotInvertible | V2Error_NotHoldingFees | V2Error_NotWithdrawable | V2Error_Overflow | V2Error_TooExpensive | V2Error_TooMuchWeightRequired | V2Error_Transport | V2Error_Trap | V2Error_UnhandledXcmVersion | V2Error_Unimplemented | V2Error_UnknownClaim | V2Error_Unroutable | V2Error_UntrustedReserveLocation | V2Error_UntrustedTeleportLocation | V2Error_WeightLimitReached | V2Error_WeightNotComputable + +export interface V2Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V2Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V2Error_Barrier { + __kind: 'Barrier' +} + +export interface V2Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V2Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V2Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V2Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V2Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V2Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V2Error_MultiLocationFull { + __kind: 'MultiLocationFull' +} + +export interface V2Error_MultiLocationNotInvertible { + __kind: 'MultiLocationNotInvertible' +} + +export interface V2Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V2Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V2Error_Overflow { + __kind: 'Overflow' +} + +export interface V2Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V2Error_TooMuchWeightRequired { + __kind: 'TooMuchWeightRequired' +} + +export interface V2Error_Transport { + __kind: 'Transport' +} + +export interface V2Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V2Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V2Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V2Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V2Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V2Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V2Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: bigint +} + +export interface V2Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V2Response = V2Response_Assets | V2Response_ExecutionResult | V2Response_Null | V2Response_Version + +export interface V2Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V2Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V2Error] | undefined) +} + +export interface V2Response_Null { + __kind: 'Null' +} + +export interface V2Response_Version { + __kind: 'Version' + value: number +} + +export interface V1MultiAsset { + id: V1AssetId + fun: V1Fungibility +} + +export type V1Fungibility = V1Fungibility_Fungible | V1Fungibility_NonFungible + +export interface V1Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V1Fungibility_NonFungible { + __kind: 'NonFungible' + value: V1AssetInstance +} + +export type V1AssetInstance = V1AssetInstance_Array16 | V1AssetInstance_Array32 | V1AssetInstance_Array4 | V1AssetInstance_Array8 | V1AssetInstance_Blob | V1AssetInstance_Index | V1AssetInstance_Undefined + +export interface V1AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V1AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V1AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V1AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V1AssetInstance_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface V1AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V1AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V1AssetId = V1AssetId_Abstract | V1AssetId_Concrete + +export interface V1AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V1AssetId_Concrete { + __kind: 'Concrete' + value: V1MultiLocation +} + +export interface V1MultiLocation { + parents: number + interior: V1Junctions +} + +export type V1Junctions = V1Junctions_Here | V1Junctions_X1 | V1Junctions_X2 | V1Junctions_X3 | V1Junctions_X4 | V1Junctions_X5 | V1Junctions_X6 | V1Junctions_X7 | V1Junctions_X8 + +export interface V1Junctions_Here { + __kind: 'Here' +} + +export interface V1Junctions_X1 { + __kind: 'X1' + value: V1Junction +} + +export interface V1Junctions_X2 { + __kind: 'X2' + value: [V1Junction, V1Junction] +} + +export interface V1Junctions_X3 { + __kind: 'X3' + value: [V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X4 { + __kind: 'X4' + value: [V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X5 { + __kind: 'X5' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X6 { + __kind: 'X6' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X7 { + __kind: 'X7' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X8 { + __kind: 'X8' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export type V1Junction = V1Junction_AccountId32 | V1Junction_AccountIndex64 | V1Junction_AccountKey20 | V1Junction_GeneralIndex | V1Junction_GeneralKey | V1Junction_OnlyChild | V1Junction_PalletInstance | V1Junction_Parachain | V1Junction_Plurality + +export interface V1Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V1Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V1Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V1Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V1Junction_GeneralKey { + __kind: 'GeneralKey' + value: Bytes +} + +export interface V1Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V1Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V1Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V1Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0BodyPart = V0BodyPart_AtLeastProportion | V0BodyPart_Fraction | V0BodyPart_Members | V0BodyPart_MoreThanProportion | V0BodyPart_Voice + +export interface V0BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V0BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V0BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Voice { + __kind: 'Voice' +} + +export type V0BodyId = V0BodyId_Executive | V0BodyId_Index | V0BodyId_Judicial | V0BodyId_Legislative | V0BodyId_Named | V0BodyId_Technical | V0BodyId_Unit + +export interface V0BodyId_Executive { + __kind: 'Executive' +} + +export interface V0BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V0BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V0BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V0BodyId_Named { + __kind: 'Named' + value: Bytes +} + +export interface V0BodyId_Technical { + __kind: 'Technical' +} + +export interface V0BodyId_Unit { + __kind: 'Unit' +} + +export type V0NetworkId = V0NetworkId_Any | V0NetworkId_Kusama | V0NetworkId_Named | V0NetworkId_Polkadot + +export interface V0NetworkId_Any { + __kind: 'Any' +} + +export interface V0NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V0NetworkId_Named { + __kind: 'Named' + value: Bytes +} + +export interface V0NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export const V1Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V1Junction, + X2: sts.tuple(() => [V1Junction, V1Junction]), + X3: sts.tuple(() => [V1Junction, V1Junction, V1Junction]), + X4: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction]), + X5: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X6: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X7: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X8: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + } +}) + +export const V1Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.bytes(), + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export const V0BodyId: sts.Type = sts.closedEnum(() => { + return { + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: sts.bytes(), + Technical: sts.unit(), + Unit: sts.unit(), + } +}) + +export const V0NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: sts.bytes(), + Polkadot: sts.unit(), + } +}) + +export const V1MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V1MultiAsset), + Wild: V1WildMultiAsset, + } +}) + +export const V1WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllOf: sts.enumStruct({ + id: V1AssetId, + fun: V1WildFungibility, + }), + } +}) + +export const V1WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V1WildFungibility = V1WildFungibility_Fungible | V1WildFungibility_NonFungible + +export interface V1WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V1WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V1AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V1MultiLocation, + } +}) + +export type V1WildMultiAsset = V1WildMultiAsset_All | V1WildMultiAsset_AllOf + +export interface V1WildMultiAsset_All { + __kind: 'All' +} + +export interface V1WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V1AssetId + fun: V1WildFungibility +} + +export type V1MultiAssetFilter = V1MultiAssetFilter_Definite | V1MultiAssetFilter_Wild + +export interface V1MultiAssetFilter_Definite { + __kind: 'Definite' + value: V1MultiAsset[] +} + +export interface V1MultiAssetFilter_Wild { + __kind: 'Wild' + value: V1WildMultiAsset +} + +export const V1MultiAsset: sts.Type = sts.struct(() => { + return { + id: V1AssetId, + fun: V1Fungibility, + } +}) + +export const V1Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V1AssetInstance, + } +}) + +export const V1AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V2Instruction = V2Instruction_BuyExecution | V2Instruction_ClaimAsset | V2Instruction_ClearError | V2Instruction_ClearOrigin | V2Instruction_DepositAsset | V2Instruction_DepositReserveAsset | V2Instruction_DescendOrigin | V2Instruction_ExchangeAsset | V2Instruction_HrmpChannelAccepted | V2Instruction_HrmpChannelClosing | V2Instruction_HrmpNewChannelOpenRequest | V2Instruction_InitiateReserveWithdraw | V2Instruction_InitiateTeleport | V2Instruction_QueryHolding | V2Instruction_QueryResponse | V2Instruction_ReceiveTeleportedAsset | V2Instruction_RefundSurplus | V2Instruction_ReportError | V2Instruction_ReserveAssetDeposited | V2Instruction_SetAppendix | V2Instruction_SetErrorHandler | V2Instruction_SubscribeVersion | V2Instruction_Transact | V2Instruction_TransferAsset | V2Instruction_TransferReserveAsset | V2Instruction_Trap | V2Instruction_UnsubscribeVersion | V2Instruction_WithdrawAsset + +export interface V2Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface V2Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface V2Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V2Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V2Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V2Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface V2Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V2Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V2Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V2Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V2Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface V2Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface V2Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface V2Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V2Instruction_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface V2Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface V2Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V2Instruction[] +} + +export interface V2Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V2Instruction[] +} + +export interface V2Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V2Instruction_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V2Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V2Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V2Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export type V2WeightLimit = V2WeightLimit_Limited | V2WeightLimit_Unlimited + +export interface V2WeightLimit_Limited { + __kind: 'Limited' + value: bigint +} + +export interface V2WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V1Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: V1Xcm, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + } +}) + +export const V1Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => V1Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type V1Order = V1Order_BuyExecution | V1Order_DepositAsset | V1Order_DepositReserveAsset | V1Order_ExchangeAsset | V1Order_InitiateReserveWithdraw | V1Order_InitiateTeleport | V1Order_Noop | V1Order_QueryHolding + +export interface V1Order_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: V1Xcm[] +} + +export interface V1Order_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V1Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V1Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_Noop { + __kind: 'Noop' +} + +export interface V1Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export const V1Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + Version: sts.number(), + } +}) + +export type V1Response = V1Response_Assets | V1Response_Version + +export interface V1Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V1Response_Version { + __kind: 'Version' + value: number +} + +export type V1Xcm = V1Xcm_HrmpChannelAccepted | V1Xcm_HrmpChannelClosing | V1Xcm_HrmpNewChannelOpenRequest | V1Xcm_QueryResponse | V1Xcm_ReceiveTeleportedAsset | V1Xcm_RelayedFrom | V1Xcm_ReserveAssetDeposited | V1Xcm_SubscribeVersion | V1Xcm_Transact | V1Xcm_TransferAsset | V1Xcm_TransferReserveAsset | V1Xcm_UnsubscribeVersion | V1Xcm_WithdrawAsset + +export interface V1Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V1Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V1Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V1Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface V1Xcm_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: V1Xcm +} + +export interface V1Xcm_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V1Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V1Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V1Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Xcm_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V1Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export const V0Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: V0Xcm, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + } +}) + +export const V0Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => V0Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type V0Order = V0Order_BuyExecution | V0Order_DepositAsset | V0Order_DepositReserveAsset | V0Order_ExchangeAsset | V0Order_InitiateReserveWithdraw | V0Order_InitiateTeleport | V0Order_Null | V0Order_QueryHolding + +export interface V0Order_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: V0Xcm[] +} + +export interface V0Order_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface V0Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_Null { + __kind: 'Null' +} + +export interface V0Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type V0MultiLocation = V0MultiLocation_Null | V0MultiLocation_X1 | V0MultiLocation_X2 | V0MultiLocation_X3 | V0MultiLocation_X4 | V0MultiLocation_X5 | V0MultiLocation_X6 | V0MultiLocation_X7 | V0MultiLocation_X8 + +export interface V0MultiLocation_Null { + __kind: 'Null' +} + +export interface V0MultiLocation_X1 { + __kind: 'X1' + value: V0Junction +} + +export interface V0MultiLocation_X2 { + __kind: 'X2' + value: [V0Junction, V0Junction] +} + +export interface V0MultiLocation_X3 { + __kind: 'X3' + value: [V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X4 { + __kind: 'X4' + value: [V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X5 { + __kind: 'X5' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X6 { + __kind: 'X6' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X7 { + __kind: 'X7' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X8 { + __kind: 'X8' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export type V0Junction = V0Junction_AccountId32 | V0Junction_AccountIndex64 | V0Junction_AccountKey20 | V0Junction_GeneralIndex | V0Junction_GeneralKey | V0Junction_OnlyChild | V0Junction_PalletInstance | V0Junction_Parachain | V0Junction_Parent | V0Junction_Plurality + +export interface V0Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V0Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V0Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V0Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V0Junction_GeneralKey { + __kind: 'GeneralKey' + value: Bytes +} + +export interface V0Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V0Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V0Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V0Junction_Parent { + __kind: 'Parent' +} + +export interface V0Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0MultiAsset = V0MultiAsset_AbstractFungible | V0MultiAsset_AbstractNonFungible | V0MultiAsset_All | V0MultiAsset_AllAbstractFungible | V0MultiAsset_AllAbstractNonFungible | V0MultiAsset_AllConcreteFungible | V0MultiAsset_AllConcreteNonFungible | V0MultiAsset_AllFungible | V0MultiAsset_AllNonFungible | V0MultiAsset_ConcreteFungible | V0MultiAsset_ConcreteNonFungible | V0MultiAsset_None + +export interface V0MultiAsset_AbstractFungible { + __kind: 'AbstractFungible' + id: Bytes + amount: bigint +} + +export interface V0MultiAsset_AbstractNonFungible { + __kind: 'AbstractNonFungible' + class: Bytes + instance: V1AssetInstance +} + +export interface V0MultiAsset_All { + __kind: 'All' +} + +export interface V0MultiAsset_AllAbstractFungible { + __kind: 'AllAbstractFungible' + id: Bytes +} + +export interface V0MultiAsset_AllAbstractNonFungible { + __kind: 'AllAbstractNonFungible' + class: Bytes +} + +export interface V0MultiAsset_AllConcreteFungible { + __kind: 'AllConcreteFungible' + id: V0MultiLocation +} + +export interface V0MultiAsset_AllConcreteNonFungible { + __kind: 'AllConcreteNonFungible' + class: V0MultiLocation +} + +export interface V0MultiAsset_AllFungible { + __kind: 'AllFungible' +} + +export interface V0MultiAsset_AllNonFungible { + __kind: 'AllNonFungible' +} + +export interface V0MultiAsset_ConcreteFungible { + __kind: 'ConcreteFungible' + id: V0MultiLocation + amount: bigint +} + +export interface V0MultiAsset_ConcreteNonFungible { + __kind: 'ConcreteNonFungible' + class: V0MultiLocation + instance: V1AssetInstance +} + +export interface V0MultiAsset_None { + __kind: 'None' +} + +export const V0MultiAsset: sts.Type = sts.closedEnum(() => { + return { + AbstractFungible: sts.enumStruct({ + id: sts.bytes(), + amount: sts.bigint(), + }), + AbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + instance: V1AssetInstance, + }), + All: sts.unit(), + AllAbstractFungible: sts.enumStruct({ + id: sts.bytes(), + }), + AllAbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + }), + AllConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + }), + AllConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + }), + AllFungible: sts.unit(), + AllNonFungible: sts.unit(), + ConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + amount: sts.bigint(), + }), + ConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + instance: V1AssetInstance, + }), + None: sts.unit(), + } +}) + +export const V0MultiLocation: sts.Type = sts.closedEnum(() => { + return { + Null: sts.unit(), + X1: V0Junction, + X2: sts.tuple(() => [V0Junction, V0Junction]), + X3: sts.tuple(() => [V0Junction, V0Junction, V0Junction]), + X4: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction]), + X5: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X6: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X7: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X8: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + } +}) + +export const V0Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.bytes(), + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Parent: sts.unit(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V0MultiAsset), + } +}) + +export type V0Response = V0Response_Assets + +export interface V0Response_Assets { + __kind: 'Assets' + value: V0MultiAsset[] +} + +export type V0Xcm = V0Xcm_HrmpChannelAccepted | V0Xcm_HrmpChannelClosing | V0Xcm_HrmpNewChannelOpenRequest | V0Xcm_QueryResponse | V0Xcm_RelayedFrom | V0Xcm_ReserveAssetDeposit | V0Xcm_TeleportAsset | V0Xcm_Transact | V0Xcm_TransferAsset | V0Xcm_TransferReserveAsset | V0Xcm_WithdrawAsset + +export interface V0Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V0Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V0Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V0Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface V0Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: V0Xcm +} + +export interface V0Xcm_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V0Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export type VersionedXcm = VersionedXcm_V0 | VersionedXcm_V1 | VersionedXcm_V2 + +export interface VersionedXcm_V0 { + __kind: 'V0' + value: V0Xcm +} + +export interface VersionedXcm_V1 { + __kind: 'V1' + value: V1Xcm +} + +export interface VersionedXcm_V2 { + __kind: 'V2' + value: V2Instruction[] +} + +export const V2WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: sts.bigint(), + Unlimited: sts.unit(), + } +}) + +export const VersionedMultiAssets: sts.Type = sts.closedEnum(() => { + return { + V0: sts.array(() => V0MultiAsset), + V1: sts.array(() => V1MultiAsset), + } +}) + +export type VersionedMultiAssets = VersionedMultiAssets_V0 | VersionedMultiAssets_V1 + +export interface VersionedMultiAssets_V0 { + __kind: 'V0' + value: V0MultiAsset[] +} + +export interface VersionedMultiAssets_V1 { + __kind: 'V1' + value: V1MultiAsset[] +} + +export const V1MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V1Junctions, + } +}) + +export const VersionedMultiLocation: sts.Type = sts.closedEnum(() => { + return { + V0: V0MultiLocation, + V1: V1MultiLocation, + } +}) + +export type VersionedMultiLocation = VersionedMultiLocation_V0 | VersionedMultiLocation_V1 + +export interface VersionedMultiLocation_V0 { + __kind: 'V0' + value: V0MultiLocation +} + +export interface VersionedMultiLocation_V1 { + __kind: 'V1' + value: V1MultiLocation +} + +export const Type_524: sts.Type = sts.closedEnum(() => { + return { + V0: Type_525, + V1: Type_530, + V2: sts.array(() => Type_536), + } +}) + +export const Type_536: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => Type_536), + SetErrorHandler: sts.array(() => Type_536), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_529, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const Type_529: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface Type_529 { + encoded: Bytes +} + +export type Type_536 = Type_536_BuyExecution | Type_536_ClaimAsset | Type_536_ClearError | Type_536_ClearOrigin | Type_536_DepositAsset | Type_536_DepositReserveAsset | Type_536_DescendOrigin | Type_536_ExchangeAsset | Type_536_HrmpChannelAccepted | Type_536_HrmpChannelClosing | Type_536_HrmpNewChannelOpenRequest | Type_536_InitiateReserveWithdraw | Type_536_InitiateTeleport | Type_536_QueryHolding | Type_536_QueryResponse | Type_536_ReceiveTeleportedAsset | Type_536_RefundSurplus | Type_536_ReportError | Type_536_ReserveAssetDeposited | Type_536_SetAppendix | Type_536_SetErrorHandler | Type_536_SubscribeVersion | Type_536_Transact | Type_536_TransferAsset | Type_536_TransferReserveAsset | Type_536_Trap | Type_536_UnsubscribeVersion | Type_536_WithdrawAsset + +export interface Type_536_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface Type_536_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface Type_536_ClearError { + __kind: 'ClearError' +} + +export interface Type_536_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_536_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_536_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_536_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface Type_536_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_536_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_536_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_536_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_536_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_536_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_536_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface Type_536_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface Type_536_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface Type_536_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_536_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface Type_536_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface Type_536_SetAppendix { + __kind: 'SetAppendix' + value: Type_536[] +} + +export interface Type_536_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_536[] +} + +export interface Type_536_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_536_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_529 +} + +export interface Type_536_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_536_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_536_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_536_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_536_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export const Type_530: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_532), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: Type_530, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_532), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_529, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_532), + }), + } +}) + +export const Type_532: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => Type_530), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type Type_532 = Type_532_BuyExecution | Type_532_DepositAsset | Type_532_DepositReserveAsset | Type_532_ExchangeAsset | Type_532_InitiateReserveWithdraw | Type_532_InitiateTeleport | Type_532_Noop | Type_532_QueryHolding + +export interface Type_532_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: Type_530[] +} + +export interface Type_532_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_532_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_532_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_532_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface Type_532_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_532_Noop { + __kind: 'Noop' +} + +export interface Type_532_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export type Type_530 = Type_530_HrmpChannelAccepted | Type_530_HrmpChannelClosing | Type_530_HrmpNewChannelOpenRequest | Type_530_QueryResponse | Type_530_ReceiveTeleportedAsset | Type_530_RelayedFrom | Type_530_ReserveAssetDeposited | Type_530_SubscribeVersion | Type_530_Transact | Type_530_TransferAsset | Type_530_TransferReserveAsset | Type_530_UnsubscribeVersion | Type_530_WithdrawAsset + +export interface Type_530_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_530_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_530_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_530_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface Type_530_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: Type_532[] +} + +export interface Type_530_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: Type_530 +} + +export interface Type_530_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: Type_532[] +} + +export interface Type_530_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_530_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_529 +} + +export interface Type_530_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_530_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_530_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_530_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: Type_532[] +} + +export const Type_525: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: Type_525, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_527), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_527), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_529, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_527), + }), + } +}) + +export const Type_527: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => Type_525), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type Type_527 = Type_527_BuyExecution | Type_527_DepositAsset | Type_527_DepositReserveAsset | Type_527_ExchangeAsset | Type_527_InitiateReserveWithdraw | Type_527_InitiateTeleport | Type_527_Null | Type_527_QueryHolding + +export interface Type_527_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: Type_525[] +} + +export interface Type_527_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_527_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_527_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface Type_527_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface Type_527_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_527_Null { + __kind: 'Null' +} + +export interface Type_527_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type Type_525 = Type_525_HrmpChannelAccepted | Type_525_HrmpChannelClosing | Type_525_HrmpNewChannelOpenRequest | Type_525_QueryResponse | Type_525_RelayedFrom | Type_525_ReserveAssetDeposit | Type_525_TeleportAsset | Type_525_Transact | Type_525_TransferAsset | Type_525_TransferReserveAsset | Type_525_WithdrawAsset + +export interface Type_525_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_525_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_525_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_525_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface Type_525_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: Type_525 +} + +export interface Type_525_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: Type_527[] +} + +export interface Type_525_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: Type_527[] +} + +export interface Type_525_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_529 +} + +export interface Type_525_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_525_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_525_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: Type_527[] +} + +export type Type_524 = Type_524_V0 | Type_524_V1 | Type_524_V2 + +export interface Type_524_V0 { + __kind: 'V0' + value: Type_525 +} + +export interface Type_524_V1 { + __kind: 'V1' + value: Type_530 +} + +export interface Type_524_V2 { + __kind: 'V2' + value: Type_536[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type XcmPalletCall = XcmPalletCall_execute | XcmPalletCall_force_default_xcm_version | XcmPalletCall_force_subscribe_version_notify | XcmPalletCall_force_unsubscribe_version_notify | XcmPalletCall_force_xcm_version | XcmPalletCall_limited_reserve_transfer_assets | XcmPalletCall_limited_teleport_assets | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets + +/** + * Execute an XCM message from a local, signed, origin. + * + * An event is deposited indicating whether `msg` could be executed completely or only + * partially. + * + * No more than `max_weight` will be used in its attempted execution. If this is less than the + * maximum amount of weight that the message could take to be executed, then no execution + * attempt will be made. + * + * NOTE: A successful return to this does *not* imply that the `msg` was executed successfully + * to completion; only that *some* of it was executed. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Type_524 + maxWeight: bigint +} + +/** + * Set a safe XCM version (the version that XCM should be encoded with if the most recent + * version a destination can accept is unknown). + * + * - `origin`: Must be Root. + * - `maybe_xcm_version`: The default XCM encoding version, or `None` to disable. + */ +export interface XcmPalletCall_force_default_xcm_version { + __kind: 'force_default_xcm_version' + maybeXcmVersion?: (number | undefined) +} + +/** + * Ask a location to notify us regarding their XCM version and any changes to it. + * + * - `origin`: Must be Root. + * - `location`: The location to which we should subscribe for XCM version notifications. + */ +export interface XcmPalletCall_force_subscribe_version_notify { + __kind: 'force_subscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Require that a particular destination should no longer notify us regarding any XCM + * version changes. + * + * - `origin`: Must be Root. + * - `location`: The location to which we are currently subscribed for XCM version + * notifications which we no longer desire. + */ +export interface XcmPalletCall_force_unsubscribe_version_notify { + __kind: 'force_unsubscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Extoll that a particular destination can be communicated with through a particular + * version of XCM. + * + * - `origin`: Must be Root. + * - `location`: The destination that is being described. + * - `xcm_version`: The latest version of XCM that `location` supports. + */ +export interface XcmPalletCall_force_xcm_version { + __kind: 'force_xcm_version' + location: V1MultiLocation + xcmVersion: number +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination chain and forward + * a notification XCM. + * + * Fee payment on the destination side is made from the first asset listed in the `assets` vector. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_reserve_transfer_assets { + __kind: 'limited_reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the first asset listed in the `assets` vector. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `dest_weight`: Equal to the total weight on `dest` of the XCM message + * `Teleport { assets, effects: [ BuyExecution{..}, DepositAsset{..} ] }`. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_teleport_assets { + __kind: 'limited_teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination chain and forward + * a notification XCM. + * + * Fee payment on the destination side is made from the first asset listed in the `assets` vector and + * fee-weight is calculated locally and thus remote weights are assumed to be equal to + * local weights. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +export interface XcmPalletCall_send { + __kind: 'send' + dest: VersionedMultiLocation + message: VersionedXcm +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the first asset listed in the `assets` vector and + * fee-weight is calculated locally and thus remote weights are assumed to be equal to + * local weights. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `dest_weight`: Equal to the total weight on `dest` of the XCM message + * `Teleport { assets, effects: [ BuyExecution{..}, DepositAsset{..} ] }`. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: MultiAddress, + target: MultiAddress, + schedule: VestingInfo, + }), + merge_schedules: sts.enumStruct({ + schedule1Index: sts.number(), + schedule2Index: sts.number(), + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: MultiAddress, + }), + vested_transfer: sts.enumStruct({ + target: MultiAddress, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: sts.bigint(), + perBlock: sts.bigint(), + startingBlock: sts.number(), + } +}) + +export interface VestingInfo { + locked: bigint + perBlock: bigint + startingBlock: number +} + +export const MultiAddress: sts.Type = sts.closedEnum(() => { + return { + Address20: sts.bytes(), + Address32: sts.bytes(), + Id: AccountId32, + Index: sts.unit(), + Raw: sts.bytes(), + } +}) + +export type MultiAddress = MultiAddress_Address20 | MultiAddress_Address32 | MultiAddress_Id | MultiAddress_Index | MultiAddress_Raw + +export interface MultiAddress_Address20 { + __kind: 'Address20' + value: Bytes +} + +export interface MultiAddress_Address32 { + __kind: 'Address32' + value: Bytes +} + +export interface MultiAddress_Id { + __kind: 'Id' + value: AccountId32 +} + +export interface MultiAddress_Index { + __kind: 'Index' +} + +export interface MultiAddress_Raw { + __kind: 'Raw' + value: Bytes +} + +export type AccountId32 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_merge_schedules | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: MultiAddress + target: MultiAddress + schedule: VestingInfo +} + +/** + * Merge two vesting schedules together, creating a new vesting schedule that unlocks over + * the highest possible start and end blocks. If both schedules have already started the + * current block will be used as the schedule start; with the caveat that if one schedule + * is finished by the current block, the other will be treated as the new merged schedule, + * unmodified. + * + * NOTE: If `schedule1_index == schedule2_index` this is a no-op. + * NOTE: This will unlock all schedules through the current block prior to merging. + * NOTE: If both schedules have ended by the current block, no new schedule will be created + * and both will be removed. + * + * Merged schedule attributes: + * - `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block, + * current_block)`. + * - `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`. + * - `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`. + * + * The dispatch origin for this call must be _Signed_. + * + * - `schedule1_index`: index of the first schedule to merge. + * - `schedule2_index`: index of the second schedule to merge. + */ +export interface VestingCall_merge_schedules { + __kind: 'merge_schedules' + schedule1Index: number + schedule2Index: number +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: MultiAddress +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account receiving the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: MultiAddress + schedule: VestingInfo +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Call, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Call), + }), + dispatch_as: sts.enumStruct({ + asOrigin: OriginCaller, + call: Call, + }), + } +}) + +export const OriginCaller: sts.Type = sts.closedEnum(() => { + return { + Council: Type_319, + ParachainsOrigin: Origin, + TechnicalCommittee: Type_320, + Void: Void, + XcmPallet: Type_322, + system: RawOrigin, + } +}) + +export const RawOrigin: sts.Type = sts.closedEnum(() => { + return { + None: sts.unit(), + Root: sts.unit(), + Signed: AccountId32, + } +}) + +export type RawOrigin = RawOrigin_None | RawOrigin_Root | RawOrigin_Signed + +export interface RawOrigin_None { + __kind: 'None' +} + +export interface RawOrigin_Root { + __kind: 'Root' +} + +export interface RawOrigin_Signed { + __kind: 'Signed' + value: AccountId32 +} + +export const Type_322: sts.Type = sts.closedEnum(() => { + return { + Response: V1MultiLocation, + Xcm: V1MultiLocation, + } +}) + +export type Type_322 = Type_322_Response | Type_322_Xcm + +export interface Type_322_Response { + __kind: 'Response' + value: V1MultiLocation +} + +export interface Type_322_Xcm { + __kind: 'Xcm' + value: V1MultiLocation +} + +export const Void: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Void = never + +export const Type_320: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_320 = Type_320_Member | Type_320_Members | Type_320__Phantom + +export interface Type_320_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_320_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_320__Phantom { + __kind: '_Phantom' +} + +export const Origin: sts.Type = sts.closedEnum(() => { + return { + Parachain: Id, + } +}) + +export const Id = sts.number() + +export type Origin = Origin_Parachain + +export interface Origin_Parachain { + __kind: 'Parachain' + value: Id +} + +export type Id = number + +export const Type_319: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_319 = Type_319_Member | Type_319_Members | Type_319__Phantom + +export interface Type_319_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_319_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_319__Phantom { + __kind: '_Phantom' +} + +export type OriginCaller = OriginCaller_Council | OriginCaller_ParachainsOrigin | OriginCaller_TechnicalCommittee | OriginCaller_Void | OriginCaller_XcmPallet | OriginCaller_system + +export interface OriginCaller_Council { + __kind: 'Council' + value: Type_319 +} + +export interface OriginCaller_ParachainsOrigin { + __kind: 'ParachainsOrigin' + value: Origin +} + +export interface OriginCaller_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: Type_320 +} + +export interface OriginCaller_Void { + __kind: 'Void' + value: Void +} + +export interface OriginCaller_XcmPallet { + __kind: 'XcmPallet' + value: Type_322 +} + +export interface OriginCaller_system { + __kind: 'system' + value: RawOrigin +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all | UtilityCall_dispatch_as + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Call +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Call[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Call[] +} + +/** + * Dispatches a function call with a provided origin. + * + * The dispatch origin for this call must be _Root_. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB write (event). + * - Weight of derivative `call` execution + T::WeightInfo::dispatch_as(). + * # + */ +export interface UtilityCall_dispatch_as { + __kind: 'dispatch_as' + asOrigin: OriginCaller + call: Call +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UmpCall: sts.Type = sts.closedEnum(() => { + return { + service_overweight: sts.enumStruct({ + index: sts.bigint(), + weightLimit: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UmpCall = UmpCall_service_overweight + +/** + * Service a single overweight upward message. + * + * - `origin`: Must pass `ExecuteOverweightOrigin`. + * - `index`: The index of the overweight message to service. + * - `weight_limit`: The amount of weight that message execution may take. + * + * Errors: + * - `UnknownMessageIndex`: Message of `index` is unknown. + * - `WeightOverLimit`: Message execution may use greater than `weight_limit`. + * + * Events: + * - `OverweightServiced`: On success. + */ +export interface UmpCall_service_overweight { + __kind: 'service_overweight' + index: bigint + weightLimit: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: MultiAddress, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: MultiAddress +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TipsCall: sts.Type = sts.closedEnum(() => { + return { + close_tip: sts.enumStruct({ + hash: H256, + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId32, + }), + retract_tip: sts.enumStruct({ + hash: H256, + }), + slash_tip: sts.enumStruct({ + hash: H256, + }), + tip: sts.enumStruct({ + hash: H256, + tipValue: sts.bigint(), + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId32, + tipValue: sts.bigint(), + }), + } +}) + +export const H256 = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TipsCall = TipsCall_close_tip | TipsCall_report_awesome | TipsCall_retract_tip | TipsCall_slash_tip | TipsCall_tip | TipsCall_tip_new + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost + * depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TipsCall_close_tip { + __kind: 'close_tip' + hash: H256 +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId32 +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TipsCall_retract_tip { + __kind: 'retract_tip' + hash: H256 +} + +/** + * Remove and slash an already-open tip. + * + * May only be called from `T::RejectOrigin`. + * + * As a result, the finder is slashed and the deposits are lost. + * + * Emits `TipSlashed` if successful. + * + * # + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * # + */ +export interface TipsCall_slash_tip { + __kind: 'slash_tip' + hash: H256 +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`, insert tip and check closing, `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TipsCall_tip { + __kind: 'tip' + hash: H256 + tipValue: bigint +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of + * `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId32 + tipValue: bigint +} + +export type H256 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in + * `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId32, + }), + change_key: sts.enumStruct({ + new: AccountId32, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId32, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId32), + }), + set_prime: sts.enumStruct({ + who: AccountId32, + }), + swap_member: sts.enumStruct({ + remove: AccountId32, + add: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId32 +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId32 +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId32 +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId32[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId32 +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId32 + add: AccountId32 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: sts.bytes(), + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => sts.bytes()), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + }), + } +}) + +export const Perbill = sts.number() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Bytes + subkeys: number +} + +/** + * Kill some items from storage. + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Bytes[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Make some on-chain remark and emit event. + * + * # + * - `O(b)` where b is the length of the remark. + * - 1 event. + * # + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is + * expensive). + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very + * expensive. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full + * block. # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: [Bytes, Bytes][] +} + +export type Perbill = number + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: MultiAddress, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: sts.number(), + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + controller: AccountId32, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => MultiAddress), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => MultiAddress), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + }), + reap_stash: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: MultiAddress, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId32), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_staking_limits: sts.enumStruct({ + minNominatorBond: sts.bigint(), + minValidatorBond: sts.bigint(), + maxNominatorCount: sts.option(() => sts.number()), + maxValidatorCount: sts.option(() => sts.number()), + threshold: sts.option(() => Percent), + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export const Percent = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_staking_limits | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: MultiAddress + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose + * any limitation on the amount that can be added. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + * + * # + * Complexity: O(U + S) + * with U unapplied slashes weighted with U=1000 + * and S is the number of slash indices to be canceled. + * - Read: Unapplied Slashes + * - Write: Unapplied Slashes + * # + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: number + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Declare a `controller` to stop participating as either a validator or nominator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_, but can be called by anyone. + * + * If the caller is the same as the controller being targeted, then no further checks are + * enforced, and this function behaves just like `chill`. + * + * If the caller is different than the controller being targeted, the following conditions + * must be met: + * * A `ChillThreshold` must be set and checked which defines how close to the max + * nominators or validators we must reach before users can start chilling one-another. + * * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine + * how close we are to the threshold. + * * A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines + * if this is a person that should be chilled because they have not met the threshold + * bond required. + * + * This can be helpful if bond requirements are updated, and we need to remove old users + * who do not satisfy these requirements. + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + controller: AccountId32 +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * # + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * Thus the election process may be ongoing when this is called. In this case the + * election will continue until the next era is triggered. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + * + * # + * O(S) where S is the number of slashing spans to be removed + * Reads: Bonded, Slashing Spans, Account, Locks + * Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, + * Account, Locks Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: MultiAddress[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS). + * - Both the reads and writes follow a similar pattern. + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: MultiAddress[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId32 + era: number +} + +/** + * Remove all data structures concerning a staker/stash once it is at a state where it can + * be considered `dust` in the staking system. The requirements are: + * + * 1. the `total_balance` of the stash is below existential deposit. + * 2. or, the `ledger.total` of the stash is below existential deposit. + * + * The former can happen in cases like a slash; the latter when a fully unbonded account + * is still receiving staking rewards in `RewardDestination::Staked`. + * + * It can be called by anyone, as long as `stash` meets the above requirements. + * + * Refunds the transaction fees upon successful execution. + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MAX_UNLOCKING_CHUNKS`. + * - Storage changes: Can't increase storage, only decrease it. + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: MultiAddress +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. This + * should report all the storage items that will be deleted by clearing old era history. + * Needed to report an accurate weight for the dispatch. Trusted by `Root` to report an + * accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Weight: O(E) + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, + * ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + * + * # + * - O(V) + * - Write: Invulnerables + * # + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId32[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Update the various staking limits this pallet. + * + * * `min_nominator_bond`: The minimum active bond needed to be a nominator. + * * `min_validator_bond`: The minimum active bond needed to be a validator. + * * `max_nominator_count`: The max number of users who can be a nominator at once. When + * set to `None`, no limit is enforced. + * * `max_validator_count`: The max number of users who can be a validator at once. When + * set to `None`, no limit is enforced. + * + * Origin must be Root to call this function. + * + * NOTE: Existing nominators and validators will not be affected by this update. + * to kick people under the new limits, `chill_other` should be called. + */ +export interface StakingCall_set_staking_limits { + __kind: 'set_staking_limits' + minNominatorBond: bigint + minValidatorBond: bigint + maxNominatorCount?: (number | undefined) + maxValidatorCount?: (number | undefined) + threshold?: (Percent | undefined) +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * If a user encounters the `InsufficientBond` error when calling this extrinsic, + * they should call `chill` first in order to free up their bonded funds. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * Complexity O(S) where S is the number of slashing spans to remove + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +export type Percent = number + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: sts.bigint(), + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId32, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId32, + judgement: Type_365, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId32, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: MultiAddress, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId32, + value: sts.bigint(), + tip: sts.bigint(), + }), + } +}) + +export const Type_365: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export type Type_365 = Type_365_Approve | Type_365_Rebid | Type_365_Reject + +export interface Type_365_Approve { + __kind: 'Approve' +} + +export interface Type_365_Rebid { + __kind: 'Rebid' +} + +export interface Type_365_Reject { + __kind: 'Reject' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: bigint +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * pallet to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId32 + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId32 + judgement: Type_365 +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin forgives + * (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to + * society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId32 + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured + * payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be approved (`true`) or + * rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: MultiAddress + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId32 + value: bigint + tip: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: Id, + }), + force_lease: sts.enumStruct({ + para: Id, + leaser: AccountId32, + amount: sts.bigint(), + periodBegin: sts.number(), + periodCount: sts.number(), + }), + trigger_onboard: sts.enumStruct({ + para: Id, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * Clear all leases for a Para Id, refunding any deposits back to the original owners. + * + * Can only be called by the Root origin. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: Id +} + +/** + * Just a connect into the `lease_out` call, in case Root wants to force some lease to happen + * independently of any other on-chain mechanism to use it. + * + * Can only be called by the Root origin. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: Id + leaser: AccountId32 + amount: bigint + periodBegin: number + periodCount: number +} + +/** + * Try to onboard a parachain that has a lease for the current lease period. + * + * This function can be useful if there was some state issue with a para that should + * have onboarded, but was unable to. As long as they have a lease period, we can + * let them onboard from here. + * + * Origin must be signed, but can be called by anyone. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: SessionKeys, + proof: sts.bytes(), + }), + } +}) + +export const SessionKeys: sts.Type = sts.struct(() => { + return { + grandpa: Public, + babe: sts.bytes(), + imOnline: sts.bytes(), + paraValidator: sts.bytes(), + paraAssignment: V1Public, + authorityDiscovery: sts.bytes(), + } +}) + +export const V1Public = sts.bytes() + +export const Public = sts.bytes() + +export interface SessionKeys { + grandpa: Public + babe: Bytes + imOnline: Bytes + paraValidator: Bytes + paraAssignment: V1Public + authorityDiscovery: Bytes +} + +export type V1Public = Bytes + +export type Public = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be Signed and the account must be either be + * convertible to a validator ID using the chain's typical addressing system (this usually + * means being a controller account) or directly convertible into a validator ID (which + * usually means being a stash account). + * + * # + * - Complexity: `O(1)` in number of key types. Actual cost depends on the number of length + * of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)`. Actual cost depends on the number of length of + * `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: SessionKeys + proof: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: sts.number(), + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_after: sts.enumStruct({ + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: number + index: number +} + +/** + * Cancel a named scheduled task. + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Schedule a named task. + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`](Self::schedule_named). + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + deregister: sts.enumStruct({ + id: Id, + }), + force_register: sts.enumStruct({ + who: AccountId32, + deposit: sts.bigint(), + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + force_remove_lock: sts.enumStruct({ + para: Id, + }), + register: sts.enumStruct({ + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + reserve: sts.unit(), + swap: sts.enumStruct({ + id: Id, + other: Id, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RegistrarCall = RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_force_remove_lock | RegistrarCall_register | RegistrarCall_reserve | RegistrarCall_swap + +/** + * Deregister a Para Id, freeing all data and returning any deposit. + * + * The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: Id +} + +/** + * Force the registration of a Para Id on the relay chain. + * + * This function must be called by a Root origin. + * + * The deposit taken can be specified for this registration. Any `ParaId` + * can be registered, including sub-1000 IDs which are System Parachains. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId32 + deposit: bigint + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Remove a manager lock from a para. This will allow the manager of a + * previously locked para to deregister or swap a para without using governance. + * + * Can only be called by the Root origin. + */ +export interface RegistrarCall_force_remove_lock { + __kind: 'force_remove_lock' + para: Id +} + +/** + * Register head data and validation code for a reserved Para Id. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. + * - `id`: The para ID. Must be owned/managed by the `origin` signing account. + * - `genesis_head`: The genesis head data of the parachain/thread. + * - `validation_code`: The initial validation code of the parachain/thread. + * + * ## Deposits/Fees + * The origin signed account must reserve a corresponding deposit for the registration. Anything already + * reserved previously for this para ID is accounted for. + * + * ## Events + * The `Registered` event is emitted in case of success. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Reserve a Para Id on the relay chain. + * + * This function will reserve a new Para Id to be owned/managed by the origin account. + * The origin account is able to register head data and validation code using `register` to create + * a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID. + * + * ## Deposits/Fees + * The origin must reserve a deposit of `ParaDeposit` for the registration. + * + * ## Events + * The `Reserved` event is emitted in case of success, which provides the ID reserved for use. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * Swap a parachain with another parachain or parathread. + * + * The origin must be Root, the `para` owner, or the `para` itself. + * + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: Id + other: Id +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId32, + call: Call, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId32, + }), + claim_recovery: sts.enumStruct({ + account: AccountId32, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId32, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId32), + threshold: sts.number(), + delayPeriod: sts.number(), + }), + initiate_recovery: sts.enumStruct({ + account: AccountId32, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId32, + rescuer: AccountId32, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId32, + rescuer: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + * + * # + * - The weight of the `call` + 10,000. + * - One storage lookup to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId32 + call: Call +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + * + * # + * - One storage mutation to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId32 +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully recovered by + * you. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + V) + * # + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId32 +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + * + * # + * Key: V (len of vouching friends) + * - One storage read/remove to get the active recovery process. O(1), Codec O(V) + * - One balance call to repatriate reserved. O(X) + * - One event. + * + * Total Complexity: O(V + X) + * # + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId32 +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. Should be + * ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt before the + * account can be recovered. Should be less than or equal to the length of the list of + * friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized that + * needs to pass before the account can be recovered. + * + * # + * - Key: F (len of friends) + * - One storage read to check that account is not already recoverable. O(1). + * - A check that the friends list is sorted and unique. O(F) + * - One currency reserve operation. O(X) + * - One storage write. O(1). Codec O(F). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId32[] + threshold: number + delayPeriod: number +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account needs to be + * recoverable (i.e. have a recovery configuration). + * + * # + * - One storage read to check that account is recoverable. O(F) + * - One storage read to check that this recovery process hasn't already started. O(1) + * - One currency reserve operation. O(X) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId32 +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + * + * # + * Key: F (len of friends) + * - One storage read to get the prefix iterator for active recoveries. O(1) + * - One storage read/remove to get the recovery configuration. O(1), Codec O(F) + * - One balance call to unreserved. O(X) + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + * + * # + * - One storage write O(1) + * - One event + * # + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId32 + rescuer: AccountId32 +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One binary search to confirm caller is a friend. O(logF) + * - One binary search to confirm caller has not already vouched. O(logV) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + logF + V + logV) + * # + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId32 + rescuer: AccountId32 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: AccountId32, + proxyType: ProxyType, + delay: sts.number(), + }), + announce: sts.enumStruct({ + real: AccountId32, + callHash: H256, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + delay: sts.number(), + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId32, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId32, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + proxy_announced: sts.enumStruct({ + delegate: AccountId32, + real: AccountId32, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + reject_announcement: sts.enumStruct({ + delegate: AccountId32, + callHash: H256, + }), + remove_announcement: sts.enumStruct({ + real: AccountId32, + callHash: H256, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: AccountId32, + proxyType: ProxyType, + delay: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: AccountId32 + proxyType: ProxyType + delay: number +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: AccountId32 + callHash: H256 +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + * TODO: Might be over counting 1 read + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: number + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId32 + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId32 + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Dispatch the given `call` from an account that the sender is authorized for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: AccountId32 + real: AccountId32 + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: AccountId32 + callHash: H256 +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: AccountId32 + callHash: H256 +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: AccountId32 + proxyType: ProxyType + delay: number +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PhragmenElectionCall: sts.Type = sts.closedEnum(() => { + return { + clean_defunct_voters: sts.enumStruct({ + numVoters: sts.number(), + numDefunct: sts.number(), + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + hasReplacement: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId32), + value: sts.bigint(), + }), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PhragmenElectionCall = PhragmenElectionCall_clean_defunct_voters | PhragmenElectionCall_remove_member | PhragmenElectionCall_remove_voter | PhragmenElectionCall_renounce_candidacy | PhragmenElectionCall_submit_candidacy | PhragmenElectionCall_vote + +/** + * Clean all voters who are defunct (i.e. they do not serve any purpose at all). The + * deposit of the removed voters are returned. + * + * This is an root function to be used only for cleaning the state. + * + * The dispatch origin of this call must be root. + * + * # + * The total number of voters and those that are defunct must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_clean_defunct_voters { + __kind: 'clean_defunct_voters' + numVoters: number + numDefunct: number +} + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, a new phragmen election is started. + * + * The dispatch origin of this call must be root. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement, we use a small weight. Else, since this is a root call and + * will go into phragmen, we assume full block for now. + * # + */ +export interface PhragmenElectionCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + hasReplacement: boolean +} + +/** + * Remove `origin` as a voter. + * + * This removes the lock and returns the deposit. + * + * The dispatch origin of this call must be signed and be a voter. + */ +export interface PhragmenElectionCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * + * - `origin` is a candidate and not elected in any set. In this case, the deposit is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the deposit is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the deposit is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_member`](Self::remove_member), if replacement runners exists, they + * are immediately used. If the prime is renouncing, then no prime will exist until the + * next round. + * + * The dispatch origin of this call must be signed, and have one of the above roles. + * + * # + * The type of renouncing must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Submit oneself for candidacy. A fixed amount of deposit is recorded. + * + * All candidates are wiped at the end of the term. They either become a member/runner-up, + * or leave the system while their deposit is slashed. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`] + * to get their deposit back. Losing the spot in an election will always lead to a slash. + * + * # + * The number of current candidates must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is + * reserved. The deposit is based on the number of votes and can be updated over time. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * If `value` is more than `who`'s total balance, then the maximum of the two is used. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * It is the responsibility of the caller to **NOT** place all of their balance into the + * lock and keep some for further operations. + * + * # + * We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less. + * # + */ +export interface PhragmenElectionCall_vote { + __kind: 'vote' + votes: AccountId32[] + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasSharedCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasDisputesCall: sts.Type = sts.closedEnum(() => { + return { + force_unfreeze: sts.unit(), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasDisputesCall = ParasDisputesCall_force_unfreeze + +export interface ParasDisputesCall_force_unfreeze { + __kind: 'force_unfreeze' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + force_note_new_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: Id, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + relayParentNumber: sts.number(), + }), + force_set_current_code: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasCall = ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head + +/** + * Note a new block head for para within the context of the current block. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: Id + newHead: HeadData +} + +/** + * Put a parachain directly into the next session's action queue. + * We can't queue it any sooner than this without going into the + * initializer... + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: Id +} + +/** + * Schedule an upgrade as if it was scheduled in the given relay parent block. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: Id + newCode: ValidationCode + relayParentNumber: number +} + +/** + * Set the storage for the parachain validation code immediately. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: Id + newCode: ValidationCode +} + +/** + * Set the storage for the current parachain head data immediately. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: Id + newHead: HeadData +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: V1InherentData, + }), + } +}) + +export const V1InherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => V1UncheckedSigned), + backedCandidates: sts.array(() => V1BackedCandidate), + disputes: sts.array(() => V1DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: H256, + number: sts.number(), + stateRoot: H256, + extrinsicsRoot: H256, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + Consensus: sts.tuple(() => [sts.bytes(), sts.bytes()]), + Other: sts.bytes(), + PreRuntime: sts.tuple(() => [sts.bytes(), sts.bytes()]), + RuntimeEnvironmentUpdated: sts.unit(), + Seal: sts.tuple(() => [sts.bytes(), sts.bytes()]), + } +}) + +export type DigestItem = DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: [Bytes, Bytes] +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: [Bytes, Bytes] +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: [Bytes, Bytes] +} + +export interface Digest { + logs: DigestItem[] +} + +export interface Header { + parentHash: H256 + number: number + stateRoot: H256 + extrinsicsRoot: H256 + digest: Digest +} + +export const V1DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: sts.number(), + statements: sts.array(() => sts.tuple(() => [V1DisputeStatement, V0ValidatorIndex, sts.bytes()])), + } +}) + +export const V0ValidatorIndex = sts.number() + +export const V1DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: V1InvalidDisputeStatementKind, + Valid: V1ValidDisputeStatementKind, + } +}) + +export const V1ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + BackingSeconded: H256, + BackingValid: H256, + Explicit: sts.unit(), + } +}) + +export type V1ValidDisputeStatementKind = V1ValidDisputeStatementKind_ApprovalChecking | V1ValidDisputeStatementKind_BackingSeconded | V1ValidDisputeStatementKind_BackingValid | V1ValidDisputeStatementKind_Explicit + +export interface V1ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface V1ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: H256 +} + +export interface V1ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: H256 +} + +export interface V1ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export const V1InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export type V1InvalidDisputeStatementKind = V1InvalidDisputeStatementKind_Explicit + +export interface V1InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type V1DisputeStatement = V1DisputeStatement_Invalid | V1DisputeStatement_Valid + +export interface V1DisputeStatement_Invalid { + __kind: 'Invalid' + value: V1InvalidDisputeStatementKind +} + +export interface V1DisputeStatement_Valid { + __kind: 'Valid' + value: V1ValidDisputeStatementKind +} + +export const CandidateHash = sts.bytes() + +export interface V1DisputeStatementSet { + candidateHash: CandidateHash + session: number + statements: [V1DisputeStatement, V0ValidatorIndex, Bytes][] +} + +export type V0ValidatorIndex = number + +export type CandidateHash = Bytes + +export const V1BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: V1CommittedCandidateReceipt, + validityVotes: sts.array(() => V0ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const V0ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.bytes(), + Implicit: sts.bytes(), + } +}) + +export type V0ValidityAttestation = V0ValidityAttestation_Explicit | V0ValidityAttestation_Implicit + +export interface V0ValidityAttestation_Explicit { + __kind: 'Explicit' + value: Bytes +} + +export interface V0ValidityAttestation_Implicit { + __kind: 'Implicit' + value: Bytes +} + +export const V1CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: V1CandidateDescriptor, + commitments: V1CandidateCommitments, + } +}) + +export const V1CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => sts.bytes()), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: sts.number(), + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: Id, + data: sts.bytes(), + } +}) + +export interface OutboundHrmpMessage { + recipient: Id + data: Bytes +} + +export interface V1CandidateCommitments { + upwardMessages: Bytes[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: number +} + +export const V1CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: Id, + relayParent: H256, + collator: V0Public, + persistedValidationDataHash: H256, + povHash: H256, + erasureRoot: H256, + signature: V0Signature, + paraHead: H256, + validationCodeHash: ValidationCodeHash, + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const V0Signature = sts.bytes() + +export const V0Public = sts.bytes() + +export interface V1CandidateDescriptor { + paraId: Id + relayParent: H256 + collator: V0Public + persistedValidationDataHash: H256 + povHash: H256 + erasureRoot: H256 + signature: V0Signature + paraHead: H256 + validationCodeHash: ValidationCodeHash +} + +export type ValidationCodeHash = Bytes + +export type V0Signature = Bytes + +export type V0Public = Bytes + +export interface V1CommittedCandidateReceipt { + descriptor: V1CandidateDescriptor + commitments: V1CandidateCommitments +} + +export interface V1BackedCandidate { + candidate: V1CommittedCandidateReceipt + validityVotes: V0ValidityAttestation[] + validatorIndices: BitSequence +} + +export const V1UncheckedSigned: sts.Type = sts.struct(() => { + return { + payload: V1AvailabilityBitfield, + validatorIndex: V0ValidatorIndex, + signature: sts.bytes(), + } +}) + +export const V1AvailabilityBitfield = sts.bitseq() + +export interface V1UncheckedSigned { + payload: V1AvailabilityBitfield + validatorIndex: V0ValidatorIndex + signature: Bytes +} + +export type V1AvailabilityBitfield = BitSequence + +export interface V1InherentData { + bitfields: V1UncheckedSigned[] + backedCandidates: V1BackedCandidate[] + disputes: V1DisputeStatementSet[] + parentHeader: Header +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInherentCall = ParaInherentCall_enter + +/** + * Enter the paras inherent. This will process bitfields and backed candidates. + */ +export interface ParaInherentCall_enter { + __kind: 'enter' + data: V1InherentData +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInclusionCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: sts.bigint(), + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + call: sts.bytes(), + storeCall: sts.boolean(), + maxWeight: sts.bigint(), + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId32), + call: Call, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: sts.number(), + index: sts.number(), + } +}) + +export interface Timepoint { + height: number + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: bigint +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + call: Bytes + storeCall: boolean + maxWeight: bigint +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId32[] + call: Call +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId32[] + timepoint: Timepoint + callHash: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const InitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type InitializerCall = InitializerCall_force_approve + +/** + * Issue a signal to the consensus engine to forcibly act as though all parachain + * blocks in all relay chain blocks up to and including the given number in the current + * chain are valid and should be finalized. + */ +export interface InitializerCall_force_approve { + __kind: 'force_approve' + upTo: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: sts.number(), + }), + force_transfer: sts.enumStruct({ + new: AccountId32, + index: sts.number(), + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: sts.number(), + }), + freeze: sts.enumStruct({ + index: sts.number(), + }), + transfer: sts.enumStruct({ + new: AccountId32, + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: number +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId32 + index: number + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: number +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the + * deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: number +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: sts.bytes(), + }), + } +}) + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: sts.number(), + networkState: OpaqueNetworkState, + sessionIndex: sts.number(), + authorityIndex: sts.number(), + validatorsLen: sts.number(), + } +}) + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export interface Heartbeat { + blockNumber: number + networkState: OpaqueNetworkState + sessionIndex: number + authorityIndex: number + validatorsLen: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is + * length of `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Bytes +} + +/** + * Identity pallet declaration. + */ +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId32, + }), + add_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: sts.number(), + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: MultiAddress, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: MultiAddress, + judgement: Judgement, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: MultiAddress, + }), + rename_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId32, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: BitFlags, + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId32, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => sts.tuple(() => [Data, Data])), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => sts.bytes()), + image: Data, + twitter: Data, + } +}) + +export interface IdentityInfo { + additional: [Data, Data][] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (Bytes | undefined) + image: Data + twitter: Data +} + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: Bytes +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: Bytes +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: Bytes +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: Bytes +} + +export const BitFlags = sts.bigint() + +export const Judgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: sts.bigint(), + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export type Judgement = Judgement_Erroneous | Judgement_FeePaid | Judgement_KnownGood | Judgement_LowQuality | Judgement_OutOfDate | Judgement_Reasonable | Judgement_Unknown + +export interface Judgement_Erroneous { + __kind: 'Erroneous' +} + +export interface Judgement_FeePaid { + __kind: 'FeePaid' + value: bigint +} + +export interface Judgement_KnownGood { + __kind: 'KnownGood' +} + +export interface Judgement_LowQuality { + __kind: 'LowQuality' +} + +export interface Judgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface Judgement_Reasonable { + __kind: 'Reasonable' +} + +export interface Judgement_Unknown { + __kind: 'Unknown' +} + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: sts.bytes(), + Keccak256: sts.bytes(), + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: sts.bytes(), + ShaThree256: sts.bytes(), + } +}) + +/** + * Identity pallet declaration. + */ +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId32 +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: MultiAddress + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: number +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: MultiAddress +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: MultiAddress + judgement: Judgement +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: MultiAddress +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: MultiAddress + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId32 +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: BitFlags +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId32, Data][] +} + +export type BitFlags = bigint + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const HrmpCall: sts.Type = sts.closedEnum(() => { + return { + force_clean_hrmp: sts.enumStruct({ + para: Id, + }), + force_process_hrmp_close: sts.unit(), + force_process_hrmp_open: sts.unit(), + hrmp_accept_open_channel: sts.enumStruct({ + sender: Id, + }), + hrmp_cancel_open_request: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: Id, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: Id, + recipient: Id, + } +}) + +export interface HrmpChannelId { + sender: Id + recipient: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type HrmpCall = HrmpCall_force_clean_hrmp | HrmpCall_force_process_hrmp_close | HrmpCall_force_process_hrmp_open | HrmpCall_hrmp_accept_open_channel | HrmpCall_hrmp_cancel_open_request | HrmpCall_hrmp_close_channel | HrmpCall_hrmp_init_open_channel + +/** + * This extrinsic triggers the cleanup of all the HRMP storage items that + * a para may have. Normally this happens once per session, but this allows + * you to trigger the cleanup immediately for a specific parachain. + * + * Origin must be Root. + */ +export interface HrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: Id +} + +/** + * Force process HRMP close channel requests. + * + * If there are pending HRMP close channel requests, you can use this + * function process all of those requests immediately. + */ +export interface HrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' +} + +/** + * Force process HRMP open channel requests. + * + * If there are pending HRMP open channel requests, you can use this + * function process all of those requests immediately. + */ +export interface HrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' +} + +/** + * Accept a pending open channel request from the given sender. + * + * The channel will be opened only on the next session boundary. + */ +export interface HrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: Id +} + +/** + * This cancels a pending open channel request. It can be canceled be either of the sender + * or the recipient for that request. The origin must be either of those. + * + * The cancellation happens immediately. It is not possible to cancel the request if it is + * already accepted. + */ +export interface HrmpCall_hrmp_cancel_open_request { + __kind: 'hrmp_cancel_open_request' + channelId: HrmpChannelId +} + +/** + * Initiate unilateral closing of a channel. The origin must be either the sender or the + * recipient in the channel being closed. + * + * The closure can only happen on a session change. + */ +export interface HrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * Initiate opening a channel from a parachain to a given recipient with given channel + * parameters. + * + * - `proposed_max_capacity` - specifies how many messages can be in the channel at once. + * - `proposed_max_message_size` - specifies the maximum size of the messages. + * + * These numbers are a subject to the relay-chain configuration limits. + * + * The channel can be opened only after the recipient confirms it and only on a session + * change. + */ +export interface HrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: Id + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: sts.number(), + bestFinalizedBlockNumber: sts.number(), + }), + report_equivocation: sts.enumStruct({ + equivocationProof: Type_254, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_254, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: sts.number(), + trieNodes: sts.array(() => sts.bytes()), + validatorCount: sts.number(), + } +}) + +export interface MembershipProof { + session: number + trieNodes: Bytes[] + validatorCount: number +} + +export const Type_254: sts.Type = sts.struct(() => { + return { + setId: sts.bigint(), + equivocation: Equivocation, + } +}) + +export const Equivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: Type_261, + Prevote: Type_256, + } +}) + +export const Type_256: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Prevote, sts.bytes()]), + second: sts.tuple(() => [Prevote, sts.bytes()]), + } +}) + +export const Prevote: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Prevote { + targetHash: H256 + targetNumber: number +} + +export interface Type_256 { + roundNumber: bigint + identity: Public + first: [Prevote, Bytes] + second: [Prevote, Bytes] +} + +export const Type_261: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Precommit, sts.bytes()]), + second: sts.tuple(() => [Precommit, sts.bytes()]), + } +}) + +export const Precommit: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Precommit { + targetHash: H256 + targetNumber: number +} + +export interface Type_261 { + roundNumber: bigint + identity: Public + first: [Precommit, Bytes] + second: [Precommit, Bytes] +} + +export type Equivocation = Equivocation_Precommit | Equivocation_Prevote + +export interface Equivocation_Precommit { + __kind: 'Precommit' + value: Type_261 +} + +export interface Equivocation_Prevote { + __kind: 'Prevote' + value: Type_256 +} + +export interface Type_254 { + setId: bigint + equivocation: Equivocation +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has + * stalled. This will trigger a forced authority set change at the beginning + * of the next session, to be enacted `delay` blocks after that. The delay + * should be high enough to safely assume that the block signalling the + * forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters + * will start the new authority set using the given finalized block as base. + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: number + bestFinalizedBlockNumber: number +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_254 + keyOwnerProof: MembershipProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_254 + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GiltCall: sts.Type = sts.closedEnum(() => { + return { + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + set_target: sts.enumStruct({ + target: sts.bigint(), + }), + thaw: sts.enumStruct({ + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GiltCall = GiltCall_place_bid | GiltCall_retract_bid | GiltCall_set_target | GiltCall_thaw + +/** + * Place a bid for a gilt to be issued. + * + * Origin must be Signed, and account must have at least `amount` in free balance. + * + * - `amount`: The amount of the bid; these funds will be reserved. If the bid is + * successfully elevated into an issued gilt, then these funds will continue to be + * reserved until the gilt expires. Must be at least `MinFreeze`. + * - `duration`: The number of periods for which the funds will be locked if the gilt is + * issued. It will expire only after this period has elapsed after the point of issuance. + * Must be greater than 1 and no more than `QueueCount`. + * + * Complexities: + * - `Queues[duration].len()` (just take max). + */ +export interface GiltCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * Retract a previously placed bid. + * + * Origin must be Signed, and the account should have previously issued a still-active bid + * of `amount` for `duration`. + * + * - `amount`: The amount of the previous bid. + * - `duration`: The duration of the previous bid. + */ +export interface GiltCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * Set target proportion of gilt-funds. + * + * Origin must be `AdminOrigin`. + * + * - `target`: The target proportion of effective issued funds that should be under gilts + * at any one time. + */ +export interface GiltCall_set_target { + __kind: 'set_target' + target: bigint +} + +/** + * Remove an active but expired gilt. Reserved funds under gilt are freed and balance is + * adjusted to ensure that the funds grow or shrink to maintain the equivalent proportion + * of effective total issued funds. + * + * Origin must be Signed and the account must be the owner of the gilt of the given index. + * + * - `index`: The index of the gilt to be thawed. + */ +export interface GiltCall_thaw { + __kind: 'thaw' + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + set_emergency_election_result: sts.enumStruct({ + supports: sts.array(() => sts.tuple(() => [AccountId32, Support])), + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => sts.array(() => sts.bigint())), + }), + submit: sts.enumStruct({ + rawSolution: RawSolution, + numSignedSubmissions: sts.number(), + }), + submit_unsigned: sts.enumStruct({ + rawSolution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export const RawSolution: sts.Type = sts.struct(() => { + return { + solution: NposCompactSolution24, + score: sts.array(() => sts.bigint()), + round: sts.number(), + } +}) + +export const NposCompactSolution24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), + votes2: sts.array(() => sts.tuple(() => [sts.number(), sts.tuple(() => [sts.number(), sts.number()]), sts.number()])), + votes3: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes4: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes5: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes6: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes7: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes8: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes9: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes10: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes11: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes12: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes13: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes14: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes15: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes16: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes17: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes18: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes19: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes20: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes21: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes22: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes23: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes24: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + } +}) + +export interface NposCompactSolution24 { + votes1: [number, number][] + votes2: [number, [number, number], number][] + votes3: [number, [number, number][], number][] + votes4: [number, [number, number][], number][] + votes5: [number, [number, number][], number][] + votes6: [number, [number, number][], number][] + votes7: [number, [number, number][], number][] + votes8: [number, [number, number][], number][] + votes9: [number, [number, number][], number][] + votes10: [number, [number, number][], number][] + votes11: [number, [number, number][], number][] + votes12: [number, [number, number][], number][] + votes13: [number, [number, number][], number][] + votes14: [number, [number, number][], number][] + votes15: [number, [number, number][], number][] + votes16: [number, [number, number][], number][] + votes17: [number, [number, number][], number][] + votes18: [number, [number, number][], number][] + votes19: [number, [number, number][], number][] + votes20: [number, [number, number][], number][] + votes21: [number, [number, number][], number][] + votes22: [number, [number, number][], number][] + votes23: [number, [number, number][], number][] + votes24: [number, [number, number][], number][] +} + +export interface RawSolution { + solution: NposCompactSolution24 + score: bigint[] + round: number +} + +export const Support: sts.Type = sts.struct(() => { + return { + total: sts.bigint(), + voters: sts.array(() => sts.tuple(() => [AccountId32, sts.bigint()])), + } +}) + +export interface Support { + total: bigint + voters: [AccountId32, bigint][] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * Set a solution in the queue, to be handed out to the client of this pallet in the next + * call to `ElectionProvider::elect`. + * + * This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`. + * + * The solution is not checked for any feasibility and is assumed to be trustworthy, as any + * feasibility check itself can in principle cause the election process to fail (due to + * memory/weight constrains). + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + supports: [AccountId32, Support][] +} + +/** + * Set a new value for `MinimumUntrustedScore`. + * + * Dispatch origin must be aligned with `T::ForceOrigin`. + * + * This check can be turned off by setting the value to `None`. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (bigint[] | undefined) +} + +/** + * Submit a solution for the signed phase. + * + * The dispatch origin fo this call must be __signed__. + * + * The solution is potentially queued, based on the claimed score and processed at the end + * of the signed phase. + * + * A deposit is reserved and recorded for the solution. Based on the outcome, the solution + * might be rewarded, slashed, or get all or a part of the deposit back. + * + * # + * Queue size must be provided as witness data. + * # + */ +export interface ElectionProviderMultiPhaseCall_submit { + __kind: 'submit' + rawSolution: RawSolution + numSignedSubmissions: number +} + +/** + * Submit a solution for the unsigned phase. + * + * The dispatch origin fo this call must be __none__. + * + * This submission is checked on the fly. Moreover, this unsigned solution is only + * validated when submitted to the pool from the **local** node. Effectively, this means + * that only active validators can submit this transaction when authoring a block (similar + * to an inherent). + * + * To prevent any incorrect solution (and thus wasted time/weight), this transaction will + * panic if the solution submitted by the validator is invalid in any way, effectively + * putting their authoring reward at risk. + * + * No deposit or reward is associated with this submission. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + rawSolution: RawSolution + witness: SolutionOrSnapshotSize +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DmpCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + blacklist: sts.enumStruct({ + proposalHash: H256, + maybeRefIndex: sts.option(() => sts.number()), + }), + cancel_proposal: sts.enumStruct({ + propIndex: sts.number(), + }), + cancel_queued: sts.enumStruct({ + which: sts.number(), + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId32, + conviction: Conviction, + balance: sts.bigint(), + }), + emergency_cancel: sts.enumStruct({ + refIndex: sts.number(), + }), + enact_proposal: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + }), + external_propose: sts.enumStruct({ + proposalHash: H256, + }), + external_propose_default: sts.enumStruct({ + proposalHash: H256, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: H256, + }), + fast_track: sts.enumStruct({ + proposalHash: H256, + votingPeriod: sts.number(), + delay: sts.number(), + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: H256, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: H256, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId32, + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + index: sts.number(), + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId32, + }), + veto_external: sts.enumStruct({ + proposalHash: H256, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface AccountVote_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DemocracyCall = DemocracyCall_blacklist | DemocracyCall_cancel_proposal | DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. + * + * If called on a queued public or external proposal, then this will result in it being + * removed. If the `ref_index` supplied is an active referendum with the proposal hash, + * then it will be cancelled. + * + * The dispatch origin of this call must be `BlacklistOrigin`. + * + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. + * + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). + */ +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: H256 + maybeRefIndex?: (number | undefined) +} + +/** + * Remove a proposal. + * + * The dispatch origin of this call must be `CancelProposalOrigin`. + * + * - `prop_index`: The index of the proposal to cancel. + * + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number +} + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: number +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must not + * be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId32 + conviction: Conviction + balance: bigint +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: number +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: H256 + index: number +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Weight: `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: H256 +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: H256 +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: H256 +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * `FastTrackVotingPeriod` if too low. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: H256 + votingPeriod: number + delay: number +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. When this call is successful, i.e. + * the preimage has not been uploaded before and matches some imminent proposal, + * no fee is paid. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * Weight: `O(p)` + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: H256 + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. Extrinsic is + * weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * Weight: `O(D)` where D is length of proposal. + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: H256 + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId32 + index: number +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: number +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * Weight: `O(S)` where S is the number of seconds a proposal already has. + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId32 +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * Weight: `O(V + log(V))` where V is number of `existing vetoers` + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: H256 +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of referendums the voter has voted on. + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: Id, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: Id, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId32, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: Signature, + } +}) + +export const Signature = sts.bytes() + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Signature +} + +export type Signature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * Add an optional memo to an existing crowdloan contribution. + * + * Origin must be Signed, and the user must have contributed to the crowdloan. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: Id + memo: Bytes +} + +/** + * Contribute to a crowd sale. This will transfer some balance over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * Create a new crowdloaning campaign for a parachain slot with the given lease period range. + * + * This applies a lock to your parachain configuration, ensuring that it cannot be changed + * by the parachain manager. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Remove a fund after the retirement period has ended and all funds have been returned. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * Edit the configuration for an in-progress crowdloan. + * + * Can only be called by Root origin. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Poke the fund into `NewRaise` + * + * Origin must be Signed, and the fund has non-zero raise. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: Id +} + +/** + * Automatically refund contributors of an ended crowdloan. + * Due to weight restrictions, this function may need to be called multiple + * times to fully refund all users. We will refund `RemoveKeysLimit` users at a time. + * + * Origin must be signed, but can come from anyone. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * Withdraw full balance of a specific contributor. + * + * Origin must be signed, but can come from anyone. + * + * The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement + * flag must be set. For a fund to be ready for retirement, then: + * - it must not already be in retirement; + * - the amount of raised funds must be bigger than the _free_ balance of the account; + * - and either: + * - the block number must be at least `end`; or + * - the current lease period must be greater than the fund's `last_period`. + * + * In this case, the fund's retirement flag is set and its `end` is reset to the current block + * number. + * + * - `who`: The account whose contribution should be withdrawn. + * - `index`: The parachain to whose crowdloan the contribution was made. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_chain_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_code_retention_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_conclusion_by_time_out_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_max_spam_slots: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: sts.number(), + }), + set_group_rotation_frequency: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_cores: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_retries: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_thread_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_ump_max_individual_weight: sts.enumStruct({ + new: sts.bigint(), + }), + set_ump_service_total_weight: sts.enumStruct({ + new: sts.bigint(), + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_frequency: sts.enumStruct({ + new: sts.number(), + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ConfigurationCall = ConfigurationCall_set_chain_availability_period | ConfigurationCall_set_code_retention_period | ConfigurationCall_set_dispute_conclusion_by_time_out_period | ConfigurationCall_set_dispute_max_spam_slots | ConfigurationCall_set_dispute_period | ConfigurationCall_set_dispute_post_conclusion_acceptance_period | ConfigurationCall_set_group_rotation_frequency | ConfigurationCall_set_hrmp_channel_max_capacity | ConfigurationCall_set_hrmp_channel_max_message_size | ConfigurationCall_set_hrmp_channel_max_total_size | ConfigurationCall_set_hrmp_max_message_num_per_candidate | ConfigurationCall_set_hrmp_max_parachain_inbound_channels | ConfigurationCall_set_hrmp_max_parachain_outbound_channels | ConfigurationCall_set_hrmp_max_parathread_inbound_channels | ConfigurationCall_set_hrmp_max_parathread_outbound_channels | ConfigurationCall_set_hrmp_open_request_ttl | ConfigurationCall_set_hrmp_recipient_deposit | ConfigurationCall_set_hrmp_sender_deposit | ConfigurationCall_set_max_code_size | ConfigurationCall_set_max_downward_message_size | ConfigurationCall_set_max_head_data_size | ConfigurationCall_set_max_pov_size | ConfigurationCall_set_max_upward_message_num_per_candidate | ConfigurationCall_set_max_upward_message_size | ConfigurationCall_set_max_upward_queue_count | ConfigurationCall_set_max_upward_queue_size | ConfigurationCall_set_max_validators | ConfigurationCall_set_max_validators_per_core | ConfigurationCall_set_n_delay_tranches | ConfigurationCall_set_needed_approvals | ConfigurationCall_set_no_show_slots | ConfigurationCall_set_parathread_cores | ConfigurationCall_set_parathread_retries | ConfigurationCall_set_relay_vrf_modulo_samples | ConfigurationCall_set_scheduling_lookahead | ConfigurationCall_set_thread_availability_period | ConfigurationCall_set_ump_max_individual_weight | ConfigurationCall_set_ump_service_total_weight | ConfigurationCall_set_validation_upgrade_delay | ConfigurationCall_set_validation_upgrade_frequency | ConfigurationCall_set_zeroth_delay_tranche_width + +/** + * Set the availability period for parachains. + */ +export interface ConfigurationCall_set_chain_availability_period { + __kind: 'set_chain_availability_period' + new: number +} + +/** + * Set the acceptance period for an included candidate. + */ +export interface ConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: number +} + +/** + * Set the dispute conclusion by time out period. + */ +export interface ConfigurationCall_set_dispute_conclusion_by_time_out_period { + __kind: 'set_dispute_conclusion_by_time_out_period' + new: number +} + +/** + * Set the maximum number of dispute spam slots. + */ +export interface ConfigurationCall_set_dispute_max_spam_slots { + __kind: 'set_dispute_max_spam_slots' + new: number +} + +/** + * Set the dispute period, in number of sessions to keep for disputes. + */ +export interface ConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: number +} + +/** + * Set the dispute post conclusion acceptance period. + */ +export interface ConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: number +} + +/** + * Set the parachain validator-group rotation frequency + */ +export interface ConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: number +} + +/** + * Sets the maximum number of messages allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * Sets the maximum size of a message that could ever be put into an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * Sets the maximum total size of messages in bytes allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * Sets the maximum number of outbound HRMP messages can be sent by a candidate. + */ +export interface ConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parachain is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parachain is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parathread is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_inbound_channels { + __kind: 'set_hrmp_max_parathread_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parathread is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_outbound_channels { + __kind: 'set_hrmp_max_parathread_outbound_channels' + new: number +} + +/** + * Sets the number of sessions after which an HRMP open channel request expires. + */ +export interface ConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * Sets the amount of funds that the recipient should provide for accepting opening an HRMP + * channel. + */ +export interface ConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: bigint +} + +/** + * Sets the amount of funds that the sender should provide for opening an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: bigint +} + +/** + * Set the max validation code size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * Set the critical downward message size. + */ +export interface ConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * Set the max head data size for paras. + */ +export interface ConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * Set the max POV block size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * Sets the maximum number of messages that a candidate can contain. + */ +export interface ConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum size of an upward message that can be sent by a candidate. + */ +export interface ConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * Sets the maximum items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * Sets the maximum total size of items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * Set the maximum number of validators to use in parachain consensus. + */ +export interface ConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * Set the maximum number of validators to assign to any core. + */ +export interface ConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * Set the total number of delay tranches. + */ +export interface ConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * Set the number of validators needed to approve a block. + */ +export interface ConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * Set the no show slots, in number of number of consensus slots. + * Must be at least 1. + */ +export interface ConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * Set the number of parathread execution cores. + */ +export interface ConfigurationCall_set_parathread_cores { + __kind: 'set_parathread_cores' + new: number +} + +/** + * Set the number of retries for a particular parathread. + */ +export interface ConfigurationCall_set_parathread_retries { + __kind: 'set_parathread_retries' + new: number +} + +/** + * Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion. + */ +export interface ConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * Set the scheduling lookahead, in expected number of blocks at peak throughput. + */ +export interface ConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * Set the availability period for parathreads. + */ +export interface ConfigurationCall_set_thread_availability_period { + __kind: 'set_thread_availability_period' + new: number +} + +/** + * Sets the maximum amount of weight any individual upward message may consume. + */ +export interface ConfigurationCall_set_ump_max_individual_weight { + __kind: 'set_ump_max_individual_weight' + new: bigint +} + +/** + * Sets the soft limit for the phase of dispatching dispatchable upward messages. + */ +export interface ConfigurationCall_set_ump_service_total_weight { + __kind: 'set_ump_service_total_weight' + new: bigint +} + +/** + * Set the validation upgrade delay. + */ +export interface ConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: number +} + +/** + * Set the validation upgrade frequency. + */ +export interface ConfigurationCall_set_validation_upgrade_frequency { + __kind: 'set_validation_upgrade_frequency' + new: number +} + +/** + * Set the zeroth delay tranche width. + */ +export interface ConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: sts.bigint(), + vestingSchedule: sts.option(() => sts.tuple(() => [sts.bigint(), sts.bigint(), sts.number()])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId32), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId32 + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId32 + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: bigint + vestingSchedule?: ([bigint, bigint, number] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId32 | undefined) +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds + * after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is + * malicious or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_force_unreserve | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_all | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is not + * assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * Unreserve some balance from a user by force. + * + * Can only be called by ROOT. + */ +export interface BalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also decrease the total issuance of the system (`TotalIssuance`). + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: MultiAddress + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * It will decrease the total issuance of the system by the `TransferFee`. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for input config + * types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex + * computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional check + * that the transfer will not kill the origin account. + * --------------------------------- + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: MultiAddress + value: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). # + * - O(1). Just like transfer, but reading the user's transferable balance first. + * # + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BagsListCall: sts.Type = sts.closedEnum(() => { + return { + rebag: sts.enumStruct({ + dislocated: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BagsListCall = BagsListCall_rebag + +/** + * Declare that some `dislocated` account has, through rewards or penalties, sufficiently + * changed its weight that it should properly fall into a different bag than its current + * one. + * + * Anyone can call this function about any potentially dislocated account. + * + * Will never return an error; if `dislocated` does not exist or doesn't need a rebag, then + * it is a noop and fees are still collected from `origin`. + */ +export interface BagsListCall_rebag { + __kind: 'rebag' + dislocated: AccountId32 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const EquivocationProof: sts.Type = sts.struct(() => { + return { + offender: sts.bytes(), + slot: Slot, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Slot = sts.bigint() + +export interface EquivocationProof { + offender: Bytes + slot: Slot + firstHeader: Header + secondHeader: Header +} + +export type Slot = bigint + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V1: sts.enumStruct({ + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + }), + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type NextConfigDescriptor = NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Plan an epoch config change. The epoch config change is recorded and will be enacted on + * the next call to `enact_epoch_change`. The config will be activated one epoch after. + * Multiple calls to this method will replace any existing planned config change that had + * not been enacted yet. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Cancel an in-progress auction. + * + * Can only be called by Root origin. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +export type Call = Call_Auctions | Call_Authorship | Call_Babe | Call_BagsList | Call_Balances | Call_Bounties | Call_Claims | Call_Configuration | Call_Council | Call_Crowdloan | Call_Democracy | Call_Dmp | Call_ElectionProviderMultiPhase | Call_Gilt | Call_Grandpa | Call_Hrmp | Call_Identity | Call_ImOnline | Call_Indices | Call_Initializer | Call_Multisig | Call_ParaInclusion | Call_ParaInherent | Call_Paras | Call_ParasDisputes | Call_ParasShared | Call_PhragmenElection | Call_Proxy | Call_Recovery | Call_Registrar | Call_Scheduler | Call_Session | Call_Slots | Call_Society | Call_Staking | Call_System | Call_TechnicalCommittee | Call_TechnicalMembership | Call_Timestamp | Call_Tips | Call_Treasury | Call_Ump | Call_Utility | Call_Vesting | Call_XcmPallet + +export interface Call_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Call_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Call_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Call_BagsList { + __kind: 'BagsList' + value: BagsListCall +} + +export interface Call_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Call_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Call_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Call_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Call_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Call_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Call_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Call_Dmp { + __kind: 'Dmp' + value: DmpCall +} + +export interface Call_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Call_Gilt { + __kind: 'Gilt' + value: GiltCall +} + +export interface Call_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Call_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Call_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Call_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Call_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Call_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Call_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Call_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Call_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Call_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Call_ParasDisputes { + __kind: 'ParasDisputes' + value: ParasDisputesCall +} + +export interface Call_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Call_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Call_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Call_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Call_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Call_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Call_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Call_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Call_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Call_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Call_System { + __kind: 'System' + value: SystemCall +} + +export interface Call_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Call_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Call_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Call_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Call_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Call_Ump { + __kind: 'Ump' + value: UmpCall +} + +export interface Call_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Call_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Call_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId32 = sts.bytes() diff --git a/squid/src/types/v9160.ts b/squid/src/types/v9160.ts new file mode 100644 index 00000000..9669ca15 --- /dev/null +++ b/squid/src/types/v9160.ts @@ -0,0 +1,11362 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Call: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + BagsList: BagsListCall, + Balances: BalancesCall, + Bounties: BountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + Dmp: DmpCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + Gilt: GiltCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Initializer: InitializerCall, + Multisig: MultisigCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Paras: ParasCall, + ParasDisputes: ParasDisputesCall, + ParasShared: ParasSharedCall, + PhragmenElection: PhragmenElectionCall, + Preimage: PreimageCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Ump: UmpCall, + Utility: UtilityCall, + Vesting: VestingCall, + XcmPallet: XcmPalletCall, + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + execute: sts.enumStruct({ + message: Type_529, + maxWeight: sts.bigint(), + }), + force_default_xcm_version: sts.enumStruct({ + maybeXcmVersion: sts.option(() => sts.number()), + }), + force_subscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_unsubscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_xcm_version: sts.enumStruct({ + location: V1MultiLocation, + xcmVersion: sts.number(), + }), + limited_reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + limited_teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + send: sts.enumStruct({ + dest: VersionedMultiLocation, + message: VersionedXcm, + }), + teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + } +}) + +export const VersionedXcm: sts.Type = sts.closedEnum(() => { + return { + V0: V0Xcm, + V1: V1Xcm, + V2: sts.array(() => V2Instruction), + } +}) + +export const V2Instruction: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => V2Instruction), + SetErrorHandler: sts.array(() => V2Instruction), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const DoubleEncoded: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncoded { + encoded: Bytes +} + +export const V0OriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type V0OriginKind = V0OriginKind_Native | V0OriginKind_SovereignAccount | V0OriginKind_Superuser | V0OriginKind_Xcm + +export interface V0OriginKind_Native { + __kind: 'Native' +} + +export interface V0OriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface V0OriginKind_Superuser { + __kind: 'Superuser' +} + +export interface V0OriginKind_Xcm { + __kind: 'Xcm' +} + +export const V2Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V2Error])), + Null: sts.unit(), + Version: sts.number(), + } +}) + +export const V2Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + MaxWeightInvalid: sts.unit(), + MultiLocationFull: sts.unit(), + MultiLocationNotInvertible: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + WeightLimitReached: sts.bigint(), + WeightNotComputable: sts.unit(), + } +}) + +export type V2Error = V2Error_AssetNotFound | V2Error_BadOrigin | V2Error_Barrier | V2Error_DestinationUnsupported | V2Error_ExceedsMaxMessageSize | V2Error_FailedToDecode | V2Error_FailedToTransactAsset | V2Error_InvalidLocation | V2Error_LocationCannotHold | V2Error_MaxWeightInvalid | V2Error_MultiLocationFull | V2Error_MultiLocationNotInvertible | V2Error_NotHoldingFees | V2Error_NotWithdrawable | V2Error_Overflow | V2Error_TooExpensive | V2Error_Transport | V2Error_Trap | V2Error_UnhandledXcmVersion | V2Error_Unimplemented | V2Error_UnknownClaim | V2Error_Unroutable | V2Error_UntrustedReserveLocation | V2Error_UntrustedTeleportLocation | V2Error_WeightLimitReached | V2Error_WeightNotComputable + +export interface V2Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V2Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V2Error_Barrier { + __kind: 'Barrier' +} + +export interface V2Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V2Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V2Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V2Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V2Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V2Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V2Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V2Error_MultiLocationFull { + __kind: 'MultiLocationFull' +} + +export interface V2Error_MultiLocationNotInvertible { + __kind: 'MultiLocationNotInvertible' +} + +export interface V2Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V2Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V2Error_Overflow { + __kind: 'Overflow' +} + +export interface V2Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V2Error_Transport { + __kind: 'Transport' +} + +export interface V2Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V2Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V2Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V2Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V2Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V2Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V2Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: bigint +} + +export interface V2Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V2Response = V2Response_Assets | V2Response_ExecutionResult | V2Response_Null | V2Response_Version + +export interface V2Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V2Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V2Error] | undefined) +} + +export interface V2Response_Null { + __kind: 'Null' +} + +export interface V2Response_Version { + __kind: 'Version' + value: number +} + +export interface V1MultiAsset { + id: V1AssetId + fun: V1Fungibility +} + +export type V1Fungibility = V1Fungibility_Fungible | V1Fungibility_NonFungible + +export interface V1Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V1Fungibility_NonFungible { + __kind: 'NonFungible' + value: V1AssetInstance +} + +export type V1AssetInstance = V1AssetInstance_Array16 | V1AssetInstance_Array32 | V1AssetInstance_Array4 | V1AssetInstance_Array8 | V1AssetInstance_Blob | V1AssetInstance_Index | V1AssetInstance_Undefined + +export interface V1AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V1AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V1AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V1AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V1AssetInstance_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface V1AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V1AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V1AssetId = V1AssetId_Abstract | V1AssetId_Concrete + +export interface V1AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V1AssetId_Concrete { + __kind: 'Concrete' + value: V1MultiLocation +} + +export interface V1MultiLocation { + parents: number + interior: V1Junctions +} + +export type V1Junctions = V1Junctions_Here | V1Junctions_X1 | V1Junctions_X2 | V1Junctions_X3 | V1Junctions_X4 | V1Junctions_X5 | V1Junctions_X6 | V1Junctions_X7 | V1Junctions_X8 + +export interface V1Junctions_Here { + __kind: 'Here' +} + +export interface V1Junctions_X1 { + __kind: 'X1' + value: V1Junction +} + +export interface V1Junctions_X2 { + __kind: 'X2' + value: [V1Junction, V1Junction] +} + +export interface V1Junctions_X3 { + __kind: 'X3' + value: [V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X4 { + __kind: 'X4' + value: [V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X5 { + __kind: 'X5' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X6 { + __kind: 'X6' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X7 { + __kind: 'X7' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X8 { + __kind: 'X8' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export type V1Junction = V1Junction_AccountId32 | V1Junction_AccountIndex64 | V1Junction_AccountKey20 | V1Junction_GeneralIndex | V1Junction_GeneralKey | V1Junction_OnlyChild | V1Junction_PalletInstance | V1Junction_Parachain | V1Junction_Plurality + +export interface V1Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V1Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V1Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V1Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V1Junction_GeneralKey { + __kind: 'GeneralKey' + value: Bytes +} + +export interface V1Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V1Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V1Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V1Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0BodyPart = V0BodyPart_AtLeastProportion | V0BodyPart_Fraction | V0BodyPart_Members | V0BodyPart_MoreThanProportion | V0BodyPart_Voice + +export interface V0BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V0BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V0BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Voice { + __kind: 'Voice' +} + +export type V0BodyId = V0BodyId_Executive | V0BodyId_Index | V0BodyId_Judicial | V0BodyId_Legislative | V0BodyId_Named | V0BodyId_Technical | V0BodyId_Unit + +export interface V0BodyId_Executive { + __kind: 'Executive' +} + +export interface V0BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V0BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V0BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V0BodyId_Named { + __kind: 'Named' + value: Bytes +} + +export interface V0BodyId_Technical { + __kind: 'Technical' +} + +export interface V0BodyId_Unit { + __kind: 'Unit' +} + +export type V0NetworkId = V0NetworkId_Any | V0NetworkId_Kusama | V0NetworkId_Named | V0NetworkId_Polkadot + +export interface V0NetworkId_Any { + __kind: 'Any' +} + +export interface V0NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V0NetworkId_Named { + __kind: 'Named' + value: Bytes +} + +export interface V0NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export const V1Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V1Junction, + X2: sts.tuple(() => [V1Junction, V1Junction]), + X3: sts.tuple(() => [V1Junction, V1Junction, V1Junction]), + X4: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction]), + X5: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X6: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X7: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X8: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + } +}) + +export const V1Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.bytes(), + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export const V0BodyId: sts.Type = sts.closedEnum(() => { + return { + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: sts.bytes(), + Technical: sts.unit(), + Unit: sts.unit(), + } +}) + +export const V0NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: sts.bytes(), + Polkadot: sts.unit(), + } +}) + +export const V1MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V1MultiAsset), + Wild: V1WildMultiAsset, + } +}) + +export const V1WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllOf: sts.enumStruct({ + id: V1AssetId, + fun: V1WildFungibility, + }), + } +}) + +export const V1WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V1WildFungibility = V1WildFungibility_Fungible | V1WildFungibility_NonFungible + +export interface V1WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V1WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V1AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V1MultiLocation, + } +}) + +export type V1WildMultiAsset = V1WildMultiAsset_All | V1WildMultiAsset_AllOf + +export interface V1WildMultiAsset_All { + __kind: 'All' +} + +export interface V1WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V1AssetId + fun: V1WildFungibility +} + +export type V1MultiAssetFilter = V1MultiAssetFilter_Definite | V1MultiAssetFilter_Wild + +export interface V1MultiAssetFilter_Definite { + __kind: 'Definite' + value: V1MultiAsset[] +} + +export interface V1MultiAssetFilter_Wild { + __kind: 'Wild' + value: V1WildMultiAsset +} + +export const V1MultiAsset: sts.Type = sts.struct(() => { + return { + id: V1AssetId, + fun: V1Fungibility, + } +}) + +export const V1Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V1AssetInstance, + } +}) + +export const V1AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V2Instruction = V2Instruction_BuyExecution | V2Instruction_ClaimAsset | V2Instruction_ClearError | V2Instruction_ClearOrigin | V2Instruction_DepositAsset | V2Instruction_DepositReserveAsset | V2Instruction_DescendOrigin | V2Instruction_ExchangeAsset | V2Instruction_HrmpChannelAccepted | V2Instruction_HrmpChannelClosing | V2Instruction_HrmpNewChannelOpenRequest | V2Instruction_InitiateReserveWithdraw | V2Instruction_InitiateTeleport | V2Instruction_QueryHolding | V2Instruction_QueryResponse | V2Instruction_ReceiveTeleportedAsset | V2Instruction_RefundSurplus | V2Instruction_ReportError | V2Instruction_ReserveAssetDeposited | V2Instruction_SetAppendix | V2Instruction_SetErrorHandler | V2Instruction_SubscribeVersion | V2Instruction_Transact | V2Instruction_TransferAsset | V2Instruction_TransferReserveAsset | V2Instruction_Trap | V2Instruction_UnsubscribeVersion | V2Instruction_WithdrawAsset + +export interface V2Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface V2Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface V2Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V2Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V2Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V2Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface V2Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V2Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V2Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V2Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V2Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface V2Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface V2Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface V2Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V2Instruction_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface V2Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface V2Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V2Instruction[] +} + +export interface V2Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V2Instruction[] +} + +export interface V2Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V2Instruction_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V2Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V2Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V2Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export type V2WeightLimit = V2WeightLimit_Limited | V2WeightLimit_Unlimited + +export interface V2WeightLimit_Limited { + __kind: 'Limited' + value: bigint +} + +export interface V2WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V1Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: V1Xcm, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + } +}) + +export const V1Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => V1Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type V1Order = V1Order_BuyExecution | V1Order_DepositAsset | V1Order_DepositReserveAsset | V1Order_ExchangeAsset | V1Order_InitiateReserveWithdraw | V1Order_InitiateTeleport | V1Order_Noop | V1Order_QueryHolding + +export interface V1Order_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: V1Xcm[] +} + +export interface V1Order_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V1Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V1Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_Noop { + __kind: 'Noop' +} + +export interface V1Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export const V1Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + Version: sts.number(), + } +}) + +export type V1Response = V1Response_Assets | V1Response_Version + +export interface V1Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V1Response_Version { + __kind: 'Version' + value: number +} + +export type V1Xcm = V1Xcm_HrmpChannelAccepted | V1Xcm_HrmpChannelClosing | V1Xcm_HrmpNewChannelOpenRequest | V1Xcm_QueryResponse | V1Xcm_ReceiveTeleportedAsset | V1Xcm_RelayedFrom | V1Xcm_ReserveAssetDeposited | V1Xcm_SubscribeVersion | V1Xcm_Transact | V1Xcm_TransferAsset | V1Xcm_TransferReserveAsset | V1Xcm_UnsubscribeVersion | V1Xcm_WithdrawAsset + +export interface V1Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V1Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V1Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V1Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface V1Xcm_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: V1Xcm +} + +export interface V1Xcm_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V1Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V1Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V1Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Xcm_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V1Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export const V0Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: V0Xcm, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + } +}) + +export const V0Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => V0Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type V0Order = V0Order_BuyExecution | V0Order_DepositAsset | V0Order_DepositReserveAsset | V0Order_ExchangeAsset | V0Order_InitiateReserveWithdraw | V0Order_InitiateTeleport | V0Order_Null | V0Order_QueryHolding + +export interface V0Order_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: V0Xcm[] +} + +export interface V0Order_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface V0Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_Null { + __kind: 'Null' +} + +export interface V0Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type V0MultiLocation = V0MultiLocation_Null | V0MultiLocation_X1 | V0MultiLocation_X2 | V0MultiLocation_X3 | V0MultiLocation_X4 | V0MultiLocation_X5 | V0MultiLocation_X6 | V0MultiLocation_X7 | V0MultiLocation_X8 + +export interface V0MultiLocation_Null { + __kind: 'Null' +} + +export interface V0MultiLocation_X1 { + __kind: 'X1' + value: V0Junction +} + +export interface V0MultiLocation_X2 { + __kind: 'X2' + value: [V0Junction, V0Junction] +} + +export interface V0MultiLocation_X3 { + __kind: 'X3' + value: [V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X4 { + __kind: 'X4' + value: [V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X5 { + __kind: 'X5' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X6 { + __kind: 'X6' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X7 { + __kind: 'X7' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X8 { + __kind: 'X8' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export type V0Junction = V0Junction_AccountId32 | V0Junction_AccountIndex64 | V0Junction_AccountKey20 | V0Junction_GeneralIndex | V0Junction_GeneralKey | V0Junction_OnlyChild | V0Junction_PalletInstance | V0Junction_Parachain | V0Junction_Parent | V0Junction_Plurality + +export interface V0Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V0Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V0Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V0Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V0Junction_GeneralKey { + __kind: 'GeneralKey' + value: Bytes +} + +export interface V0Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V0Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V0Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V0Junction_Parent { + __kind: 'Parent' +} + +export interface V0Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0MultiAsset = V0MultiAsset_AbstractFungible | V0MultiAsset_AbstractNonFungible | V0MultiAsset_All | V0MultiAsset_AllAbstractFungible | V0MultiAsset_AllAbstractNonFungible | V0MultiAsset_AllConcreteFungible | V0MultiAsset_AllConcreteNonFungible | V0MultiAsset_AllFungible | V0MultiAsset_AllNonFungible | V0MultiAsset_ConcreteFungible | V0MultiAsset_ConcreteNonFungible | V0MultiAsset_None + +export interface V0MultiAsset_AbstractFungible { + __kind: 'AbstractFungible' + id: Bytes + amount: bigint +} + +export interface V0MultiAsset_AbstractNonFungible { + __kind: 'AbstractNonFungible' + class: Bytes + instance: V1AssetInstance +} + +export interface V0MultiAsset_All { + __kind: 'All' +} + +export interface V0MultiAsset_AllAbstractFungible { + __kind: 'AllAbstractFungible' + id: Bytes +} + +export interface V0MultiAsset_AllAbstractNonFungible { + __kind: 'AllAbstractNonFungible' + class: Bytes +} + +export interface V0MultiAsset_AllConcreteFungible { + __kind: 'AllConcreteFungible' + id: V0MultiLocation +} + +export interface V0MultiAsset_AllConcreteNonFungible { + __kind: 'AllConcreteNonFungible' + class: V0MultiLocation +} + +export interface V0MultiAsset_AllFungible { + __kind: 'AllFungible' +} + +export interface V0MultiAsset_AllNonFungible { + __kind: 'AllNonFungible' +} + +export interface V0MultiAsset_ConcreteFungible { + __kind: 'ConcreteFungible' + id: V0MultiLocation + amount: bigint +} + +export interface V0MultiAsset_ConcreteNonFungible { + __kind: 'ConcreteNonFungible' + class: V0MultiLocation + instance: V1AssetInstance +} + +export interface V0MultiAsset_None { + __kind: 'None' +} + +export const V0MultiAsset: sts.Type = sts.closedEnum(() => { + return { + AbstractFungible: sts.enumStruct({ + id: sts.bytes(), + amount: sts.bigint(), + }), + AbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + instance: V1AssetInstance, + }), + All: sts.unit(), + AllAbstractFungible: sts.enumStruct({ + id: sts.bytes(), + }), + AllAbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + }), + AllConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + }), + AllConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + }), + AllFungible: sts.unit(), + AllNonFungible: sts.unit(), + ConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + amount: sts.bigint(), + }), + ConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + instance: V1AssetInstance, + }), + None: sts.unit(), + } +}) + +export const V0MultiLocation: sts.Type = sts.closedEnum(() => { + return { + Null: sts.unit(), + X1: V0Junction, + X2: sts.tuple(() => [V0Junction, V0Junction]), + X3: sts.tuple(() => [V0Junction, V0Junction, V0Junction]), + X4: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction]), + X5: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X6: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X7: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X8: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + } +}) + +export const V0Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.bytes(), + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Parent: sts.unit(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V0MultiAsset), + } +}) + +export type V0Response = V0Response_Assets + +export interface V0Response_Assets { + __kind: 'Assets' + value: V0MultiAsset[] +} + +export type V0Xcm = V0Xcm_HrmpChannelAccepted | V0Xcm_HrmpChannelClosing | V0Xcm_HrmpNewChannelOpenRequest | V0Xcm_QueryResponse | V0Xcm_RelayedFrom | V0Xcm_ReserveAssetDeposit | V0Xcm_TeleportAsset | V0Xcm_Transact | V0Xcm_TransferAsset | V0Xcm_TransferReserveAsset | V0Xcm_WithdrawAsset + +export interface V0Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V0Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V0Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V0Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface V0Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: V0Xcm +} + +export interface V0Xcm_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V0Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export type VersionedXcm = VersionedXcm_V0 | VersionedXcm_V1 | VersionedXcm_V2 + +export interface VersionedXcm_V0 { + __kind: 'V0' + value: V0Xcm +} + +export interface VersionedXcm_V1 { + __kind: 'V1' + value: V1Xcm +} + +export interface VersionedXcm_V2 { + __kind: 'V2' + value: V2Instruction[] +} + +export const V2WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: sts.bigint(), + Unlimited: sts.unit(), + } +}) + +export const VersionedMultiAssets: sts.Type = sts.closedEnum(() => { + return { + V0: sts.array(() => V0MultiAsset), + V1: sts.array(() => V1MultiAsset), + } +}) + +export type VersionedMultiAssets = VersionedMultiAssets_V0 | VersionedMultiAssets_V1 + +export interface VersionedMultiAssets_V0 { + __kind: 'V0' + value: V0MultiAsset[] +} + +export interface VersionedMultiAssets_V1 { + __kind: 'V1' + value: V1MultiAsset[] +} + +export const V1MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V1Junctions, + } +}) + +export const VersionedMultiLocation: sts.Type = sts.closedEnum(() => { + return { + V0: V0MultiLocation, + V1: V1MultiLocation, + } +}) + +export type VersionedMultiLocation = VersionedMultiLocation_V0 | VersionedMultiLocation_V1 + +export interface VersionedMultiLocation_V0 { + __kind: 'V0' + value: V0MultiLocation +} + +export interface VersionedMultiLocation_V1 { + __kind: 'V1' + value: V1MultiLocation +} + +export const Type_529: sts.Type = sts.closedEnum(() => { + return { + V0: Type_530, + V1: Type_535, + V2: sts.array(() => Type_541), + } +}) + +export const Type_541: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => Type_541), + SetErrorHandler: sts.array(() => Type_541), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_534, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const Type_534: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface Type_534 { + encoded: Bytes +} + +export type Type_541 = Type_541_BuyExecution | Type_541_ClaimAsset | Type_541_ClearError | Type_541_ClearOrigin | Type_541_DepositAsset | Type_541_DepositReserveAsset | Type_541_DescendOrigin | Type_541_ExchangeAsset | Type_541_HrmpChannelAccepted | Type_541_HrmpChannelClosing | Type_541_HrmpNewChannelOpenRequest | Type_541_InitiateReserveWithdraw | Type_541_InitiateTeleport | Type_541_QueryHolding | Type_541_QueryResponse | Type_541_ReceiveTeleportedAsset | Type_541_RefundSurplus | Type_541_ReportError | Type_541_ReserveAssetDeposited | Type_541_SetAppendix | Type_541_SetErrorHandler | Type_541_SubscribeVersion | Type_541_Transact | Type_541_TransferAsset | Type_541_TransferReserveAsset | Type_541_Trap | Type_541_UnsubscribeVersion | Type_541_WithdrawAsset + +export interface Type_541_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface Type_541_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface Type_541_ClearError { + __kind: 'ClearError' +} + +export interface Type_541_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_541_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_541_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_541_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface Type_541_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_541_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_541_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_541_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_541_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_541_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_541_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface Type_541_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface Type_541_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface Type_541_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_541_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface Type_541_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface Type_541_SetAppendix { + __kind: 'SetAppendix' + value: Type_541[] +} + +export interface Type_541_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_541[] +} + +export interface Type_541_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_541_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_534 +} + +export interface Type_541_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_541_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_541_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_541_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_541_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export const Type_535: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_537), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: Type_535, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_537), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_534, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_537), + }), + } +}) + +export const Type_537: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => Type_535), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type Type_537 = Type_537_BuyExecution | Type_537_DepositAsset | Type_537_DepositReserveAsset | Type_537_ExchangeAsset | Type_537_InitiateReserveWithdraw | Type_537_InitiateTeleport | Type_537_Noop | Type_537_QueryHolding + +export interface Type_537_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: Type_535[] +} + +export interface Type_537_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_537_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_537_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_537_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface Type_537_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_537_Noop { + __kind: 'Noop' +} + +export interface Type_537_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export type Type_535 = Type_535_HrmpChannelAccepted | Type_535_HrmpChannelClosing | Type_535_HrmpNewChannelOpenRequest | Type_535_QueryResponse | Type_535_ReceiveTeleportedAsset | Type_535_RelayedFrom | Type_535_ReserveAssetDeposited | Type_535_SubscribeVersion | Type_535_Transact | Type_535_TransferAsset | Type_535_TransferReserveAsset | Type_535_UnsubscribeVersion | Type_535_WithdrawAsset + +export interface Type_535_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_535_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_535_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_535_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface Type_535_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: Type_537[] +} + +export interface Type_535_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: Type_535 +} + +export interface Type_535_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: Type_537[] +} + +export interface Type_535_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_535_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_534 +} + +export interface Type_535_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_535_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_535_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_535_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: Type_537[] +} + +export const Type_530: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: Type_530, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_532), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_532), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_534, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_532), + }), + } +}) + +export const Type_532: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => Type_530), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type Type_532 = Type_532_BuyExecution | Type_532_DepositAsset | Type_532_DepositReserveAsset | Type_532_ExchangeAsset | Type_532_InitiateReserveWithdraw | Type_532_InitiateTeleport | Type_532_Null | Type_532_QueryHolding + +export interface Type_532_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: Type_530[] +} + +export interface Type_532_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_532_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_532_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface Type_532_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface Type_532_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_532_Null { + __kind: 'Null' +} + +export interface Type_532_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type Type_530 = Type_530_HrmpChannelAccepted | Type_530_HrmpChannelClosing | Type_530_HrmpNewChannelOpenRequest | Type_530_QueryResponse | Type_530_RelayedFrom | Type_530_ReserveAssetDeposit | Type_530_TeleportAsset | Type_530_Transact | Type_530_TransferAsset | Type_530_TransferReserveAsset | Type_530_WithdrawAsset + +export interface Type_530_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_530_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_530_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_530_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface Type_530_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: Type_530 +} + +export interface Type_530_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: Type_532[] +} + +export interface Type_530_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: Type_532[] +} + +export interface Type_530_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_534 +} + +export interface Type_530_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_530_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_530_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: Type_532[] +} + +export type Type_529 = Type_529_V0 | Type_529_V1 | Type_529_V2 + +export interface Type_529_V0 { + __kind: 'V0' + value: Type_530 +} + +export interface Type_529_V1 { + __kind: 'V1' + value: Type_535 +} + +export interface Type_529_V2 { + __kind: 'V2' + value: Type_541[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type XcmPalletCall = XcmPalletCall_execute | XcmPalletCall_force_default_xcm_version | XcmPalletCall_force_subscribe_version_notify | XcmPalletCall_force_unsubscribe_version_notify | XcmPalletCall_force_xcm_version | XcmPalletCall_limited_reserve_transfer_assets | XcmPalletCall_limited_teleport_assets | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets + +/** + * Execute an XCM message from a local, signed, origin. + * + * An event is deposited indicating whether `msg` could be executed completely or only + * partially. + * + * No more than `max_weight` will be used in its attempted execution. If this is less than the + * maximum amount of weight that the message could take to be executed, then no execution + * attempt will be made. + * + * NOTE: A successful return to this does *not* imply that the `msg` was executed successfully + * to completion; only that *some* of it was executed. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Type_529 + maxWeight: bigint +} + +/** + * Set a safe XCM version (the version that XCM should be encoded with if the most recent + * version a destination can accept is unknown). + * + * - `origin`: Must be Root. + * - `maybe_xcm_version`: The default XCM encoding version, or `None` to disable. + */ +export interface XcmPalletCall_force_default_xcm_version { + __kind: 'force_default_xcm_version' + maybeXcmVersion?: (number | undefined) +} + +/** + * Ask a location to notify us regarding their XCM version and any changes to it. + * + * - `origin`: Must be Root. + * - `location`: The location to which we should subscribe for XCM version notifications. + */ +export interface XcmPalletCall_force_subscribe_version_notify { + __kind: 'force_subscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Require that a particular destination should no longer notify us regarding any XCM + * version changes. + * + * - `origin`: Must be Root. + * - `location`: The location to which we are currently subscribed for XCM version + * notifications which we no longer desire. + */ +export interface XcmPalletCall_force_unsubscribe_version_notify { + __kind: 'force_unsubscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Extoll that a particular destination can be communicated with through a particular + * version of XCM. + * + * - `origin`: Must be Root. + * - `location`: The destination that is being described. + * - `xcm_version`: The latest version of XCM that `location` supports. + */ +export interface XcmPalletCall_force_xcm_version { + __kind: 'force_xcm_version' + location: V1MultiLocation + xcmVersion: number +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination chain and forward + * a notification XCM. + * + * Fee payment on the destination side is made from the first asset listed in the `assets` vector. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_reserve_transfer_assets { + __kind: 'limited_reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the first asset listed in the `assets` vector. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_teleport_assets { + __kind: 'limited_teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination chain and forward + * a notification XCM. + * + * Fee payment on the destination side is made from the first asset listed in the `assets` vector and + * fee-weight is calculated locally and thus remote weights are assumed to be equal to + * local weights. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +export interface XcmPalletCall_send { + __kind: 'send' + dest: VersionedMultiLocation + message: VersionedXcm +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the first asset listed in the `assets` vector and + * fee-weight is calculated locally and thus remote weights are assumed to be equal to + * local weights. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: MultiAddress, + target: MultiAddress, + schedule: VestingInfo, + }), + merge_schedules: sts.enumStruct({ + schedule1Index: sts.number(), + schedule2Index: sts.number(), + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: MultiAddress, + }), + vested_transfer: sts.enumStruct({ + target: MultiAddress, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: sts.bigint(), + perBlock: sts.bigint(), + startingBlock: sts.number(), + } +}) + +export interface VestingInfo { + locked: bigint + perBlock: bigint + startingBlock: number +} + +export const MultiAddress: sts.Type = sts.closedEnum(() => { + return { + Address20: sts.bytes(), + Address32: sts.bytes(), + Id: AccountId32, + Index: sts.unit(), + Raw: sts.bytes(), + } +}) + +export type MultiAddress = MultiAddress_Address20 | MultiAddress_Address32 | MultiAddress_Id | MultiAddress_Index | MultiAddress_Raw + +export interface MultiAddress_Address20 { + __kind: 'Address20' + value: Bytes +} + +export interface MultiAddress_Address32 { + __kind: 'Address32' + value: Bytes +} + +export interface MultiAddress_Id { + __kind: 'Id' + value: AccountId32 +} + +export interface MultiAddress_Index { + __kind: 'Index' +} + +export interface MultiAddress_Raw { + __kind: 'Raw' + value: Bytes +} + +export type AccountId32 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_merge_schedules | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: MultiAddress + target: MultiAddress + schedule: VestingInfo +} + +/** + * Merge two vesting schedules together, creating a new vesting schedule that unlocks over + * the highest possible start and end blocks. If both schedules have already started the + * current block will be used as the schedule start; with the caveat that if one schedule + * is finished by the current block, the other will be treated as the new merged schedule, + * unmodified. + * + * NOTE: If `schedule1_index == schedule2_index` this is a no-op. + * NOTE: This will unlock all schedules through the current block prior to merging. + * NOTE: If both schedules have ended by the current block, no new schedule will be created + * and both will be removed. + * + * Merged schedule attributes: + * - `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block, + * current_block)`. + * - `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`. + * - `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`. + * + * The dispatch origin for this call must be _Signed_. + * + * - `schedule1_index`: index of the first schedule to merge. + * - `schedule2_index`: index of the second schedule to merge. + */ +export interface VestingCall_merge_schedules { + __kind: 'merge_schedules' + schedule1Index: number + schedule2Index: number +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: MultiAddress +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account receiving the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: MultiAddress + schedule: VestingInfo +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Call, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Call), + }), + dispatch_as: sts.enumStruct({ + asOrigin: OriginCaller, + call: Call, + }), + } +}) + +export const OriginCaller: sts.Type = sts.closedEnum(() => { + return { + Council: Type_321, + ParachainsOrigin: Origin, + TechnicalCommittee: Type_322, + Void: Void, + XcmPallet: Type_324, + system: RawOrigin, + } +}) + +export const RawOrigin: sts.Type = sts.closedEnum(() => { + return { + None: sts.unit(), + Root: sts.unit(), + Signed: AccountId32, + } +}) + +export type RawOrigin = RawOrigin_None | RawOrigin_Root | RawOrigin_Signed + +export interface RawOrigin_None { + __kind: 'None' +} + +export interface RawOrigin_Root { + __kind: 'Root' +} + +export interface RawOrigin_Signed { + __kind: 'Signed' + value: AccountId32 +} + +export const Type_324: sts.Type = sts.closedEnum(() => { + return { + Response: V1MultiLocation, + Xcm: V1MultiLocation, + } +}) + +export type Type_324 = Type_324_Response | Type_324_Xcm + +export interface Type_324_Response { + __kind: 'Response' + value: V1MultiLocation +} + +export interface Type_324_Xcm { + __kind: 'Xcm' + value: V1MultiLocation +} + +export const Void: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Void = never + +export const Type_322: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_322 = Type_322_Member | Type_322_Members | Type_322__Phantom + +export interface Type_322_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_322_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_322__Phantom { + __kind: '_Phantom' +} + +export const Origin: sts.Type = sts.closedEnum(() => { + return { + Parachain: Id, + } +}) + +export const Id = sts.number() + +export type Origin = Origin_Parachain + +export interface Origin_Parachain { + __kind: 'Parachain' + value: Id +} + +export type Id = number + +export const Type_321: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_321 = Type_321_Member | Type_321_Members | Type_321__Phantom + +export interface Type_321_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_321_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_321__Phantom { + __kind: '_Phantom' +} + +export type OriginCaller = OriginCaller_Council | OriginCaller_ParachainsOrigin | OriginCaller_TechnicalCommittee | OriginCaller_Void | OriginCaller_XcmPallet | OriginCaller_system + +export interface OriginCaller_Council { + __kind: 'Council' + value: Type_321 +} + +export interface OriginCaller_ParachainsOrigin { + __kind: 'ParachainsOrigin' + value: Origin +} + +export interface OriginCaller_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: Type_322 +} + +export interface OriginCaller_Void { + __kind: 'Void' + value: Void +} + +export interface OriginCaller_XcmPallet { + __kind: 'XcmPallet' + value: Type_324 +} + +export interface OriginCaller_system { + __kind: 'system' + value: RawOrigin +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all | UtilityCall_dispatch_as + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Call +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Call[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Call[] +} + +/** + * Dispatches a function call with a provided origin. + * + * The dispatch origin for this call must be _Root_. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB write (event). + * - Weight of derivative `call` execution + T::WeightInfo::dispatch_as(). + * # + */ +export interface UtilityCall_dispatch_as { + __kind: 'dispatch_as' + asOrigin: OriginCaller + call: Call +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UmpCall: sts.Type = sts.closedEnum(() => { + return { + service_overweight: sts.enumStruct({ + index: sts.bigint(), + weightLimit: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UmpCall = UmpCall_service_overweight + +/** + * Service a single overweight upward message. + * + * - `origin`: Must pass `ExecuteOverweightOrigin`. + * - `index`: The index of the overweight message to service. + * - `weight_limit`: The amount of weight that message execution may take. + * + * Errors: + * - `UnknownMessageIndex`: Message of `index` is unknown. + * - `WeightOverLimit`: Message execution may use greater than `weight_limit`. + * + * Events: + * - `OverweightServiced`: On success. + */ +export interface UmpCall_service_overweight { + __kind: 'service_overweight' + index: bigint + weightLimit: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: MultiAddress, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: MultiAddress +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TipsCall: sts.Type = sts.closedEnum(() => { + return { + close_tip: sts.enumStruct({ + hash: H256, + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId32, + }), + retract_tip: sts.enumStruct({ + hash: H256, + }), + slash_tip: sts.enumStruct({ + hash: H256, + }), + tip: sts.enumStruct({ + hash: H256, + tipValue: sts.bigint(), + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId32, + tipValue: sts.bigint(), + }), + } +}) + +export const H256 = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TipsCall = TipsCall_close_tip | TipsCall_report_awesome | TipsCall_retract_tip | TipsCall_slash_tip | TipsCall_tip | TipsCall_tip_new + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost + * depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TipsCall_close_tip { + __kind: 'close_tip' + hash: H256 +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId32 +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TipsCall_retract_tip { + __kind: 'retract_tip' + hash: H256 +} + +/** + * Remove and slash an already-open tip. + * + * May only be called from `T::RejectOrigin`. + * + * As a result, the finder is slashed and the deposits are lost. + * + * Emits `TipSlashed` if successful. + * + * # + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * # + */ +export interface TipsCall_slash_tip { + __kind: 'slash_tip' + hash: H256 +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`, insert tip and check closing, `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TipsCall_tip { + __kind: 'tip' + hash: H256 + tipValue: bigint +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of + * `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId32 + tipValue: bigint +} + +export type H256 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in + * `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId32, + }), + change_key: sts.enumStruct({ + new: AccountId32, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId32, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId32), + }), + set_prime: sts.enumStruct({ + who: AccountId32, + }), + swap_member: sts.enumStruct({ + remove: AccountId32, + add: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId32 +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId32 +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId32 +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId32[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId32 +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId32 + add: AccountId32 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: sts.bytes(), + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => sts.bytes()), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + }), + } +}) + +export const Perbill = sts.number() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Bytes + subkeys: number +} + +/** + * Kill some items from storage. + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Bytes[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Make some on-chain remark and emit event. + * + * # + * - `O(b)` where b is the length of the remark. + * - 1 event. + * # + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is + * expensive). + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very + * expensive. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full + * block. # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: [Bytes, Bytes][] +} + +export type Perbill = number + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: MultiAddress, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: sts.number(), + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + controller: AccountId32, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => MultiAddress), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => MultiAddress), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + }), + reap_stash: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: MultiAddress, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId32), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_staking_configs: sts.enumStruct({ + minNominatorBond: sts.bigint(), + minValidatorBond: sts.bigint(), + maxNominatorCount: sts.option(() => sts.number()), + maxValidatorCount: sts.option(() => sts.number()), + chillThreshold: sts.option(() => Percent), + minCommission: Perbill, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export const Percent = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_staking_configs | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: MultiAddress + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose + * any limitation on the amount that can be added. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + * + * # + * Complexity: O(U + S) + * with U unapplied slashes weighted with U=1000 + * and S is the number of slash indices to be canceled. + * - Read: Unapplied Slashes + * - Write: Unapplied Slashes + * # + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: number + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Declare a `controller` to stop participating as either a validator or nominator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_, but can be called by anyone. + * + * If the caller is the same as the controller being targeted, then no further checks are + * enforced, and this function behaves just like `chill`. + * + * If the caller is different than the controller being targeted, the following conditions + * must be met: + * * A `ChillThreshold` must be set and checked which defines how close to the max + * nominators or validators we must reach before users can start chilling one-another. + * * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine + * how close we are to the threshold. + * * A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines + * if this is a person that should be chilled because they have not met the threshold + * bond required. + * + * This can be helpful if bond requirements are updated, and we need to remove old users + * who do not satisfy these requirements. + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + controller: AccountId32 +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * # + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * Thus the election process may be ongoing when this is called. In this case the + * election will continue until the next era is triggered. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + * + * # + * O(S) where S is the number of slashing spans to be removed + * Reads: Bonded, Slashing Spans, Account, Locks + * Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, + * Account, Locks Writes Each: SpanSlash * S + * # + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: MultiAddress[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS). + * - Both the reads and writes follow a similar pattern. + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: MultiAddress[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId32 + era: number +} + +/** + * Remove all data structures concerning a staker/stash once it is at a state where it can + * be considered `dust` in the staking system. The requirements are: + * + * 1. the `total_balance` of the stash is below existential deposit. + * 2. or, the `ledger.total` of the stash is below existential deposit. + * + * The former can happen in cases like a slash; the latter when a fully unbonded account + * is still receiving staking rewards in `RewardDestination::Staked`. + * + * It can be called by anyone, as long as `stash` meets the above requirements. + * + * Refunds the transaction fees upon successful execution. + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MAX_UNLOCKING_CHUNKS`. + * - Storage changes: Can't increase storage, only decrease it. + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: MultiAddress +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. This + * should report all the storage items that will be deleted by clearing old era history. + * Needed to report an accurate weight for the dispatch. Trusted by `Root` to report an + * accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Weight: O(E) + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, + * ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + * + * # + * - O(V) + * - Write: Invulnerables + * # + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId32[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Update the various staking configurations . + * + * * `min_nominator_bond`: The minimum active bond needed to be a nominator. + * * `min_validator_bond`: The minimum active bond needed to be a validator. + * * `max_nominator_count`: The max number of users who can be a nominator at once. When + * set to `None`, no limit is enforced. + * * `max_validator_count`: The max number of users who can be a validator at once. When + * set to `None`, no limit is enforced. + * * `chill_threshold`: The ratio of `max_nominator_count` or `max_validator_count` which + * should be filled in order for the `chill_other` transaction to work. + * * `min_commission`: The minimum amount of commission that each validators must maintain. + * This is checked only upon calling `validate`. Existing validators are not affected. + * + * Origin must be Root to call this function. + * + * NOTE: Existing nominators and validators will not be affected by this update. + * to kick people under the new limits, `chill_other` should be called. + */ +export interface StakingCall_set_staking_configs { + __kind: 'set_staking_configs' + minNominatorBond: bigint + minValidatorBond: bigint + maxNominatorCount?: (number | undefined) + maxValidatorCount?: (number | undefined) + chillThreshold?: (Percent | undefined) + minCommission: Perbill +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * If a user encounters the `InsufficientBond` error when calling this extrinsic, + * they should call `chill` first in order to free up their bonded funds. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * Complexity O(S) where S is the number of slashing spans to remove + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +export type Percent = number + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: sts.bigint(), + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId32, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId32, + judgement: Type_367, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId32, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: MultiAddress, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId32, + value: sts.bigint(), + tip: sts.bigint(), + }), + } +}) + +export const Type_367: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export type Type_367 = Type_367_Approve | Type_367_Rebid | Type_367_Reject + +export interface Type_367_Approve { + __kind: 'Approve' +} + +export interface Type_367_Rebid { + __kind: 'Rebid' +} + +export interface Type_367_Reject { + __kind: 'Reject' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: bigint +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * pallet to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId32 + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId32 + judgement: Type_367 +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin forgives + * (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to + * society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId32 + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured + * payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be approved (`true`) or + * rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: MultiAddress + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId32 + value: bigint + tip: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: Id, + }), + force_lease: sts.enumStruct({ + para: Id, + leaser: AccountId32, + amount: sts.bigint(), + periodBegin: sts.number(), + periodCount: sts.number(), + }), + trigger_onboard: sts.enumStruct({ + para: Id, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * Clear all leases for a Para Id, refunding any deposits back to the original owners. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: Id +} + +/** + * Just a connect into the `lease_out` call, in case Root wants to force some lease to happen + * independently of any other on-chain mechanism to use it. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: Id + leaser: AccountId32 + amount: bigint + periodBegin: number + periodCount: number +} + +/** + * Try to onboard a parachain that has a lease for the current lease period. + * + * This function can be useful if there was some state issue with a para that should + * have onboarded, but was unable to. As long as they have a lease period, we can + * let them onboard from here. + * + * Origin must be signed, but can be called by anyone. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: SessionKeys, + proof: sts.bytes(), + }), + } +}) + +export const SessionKeys: sts.Type = sts.struct(() => { + return { + grandpa: Public, + babe: sts.bytes(), + imOnline: sts.bytes(), + paraValidator: sts.bytes(), + paraAssignment: V1Public, + authorityDiscovery: sts.bytes(), + } +}) + +export const V1Public = sts.bytes() + +export const Public = sts.bytes() + +export interface SessionKeys { + grandpa: Public + babe: Bytes + imOnline: Bytes + paraValidator: Bytes + paraAssignment: V1Public + authorityDiscovery: Bytes +} + +export type V1Public = Bytes + +export type Public = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be Signed and the account must be either be + * convertible to a validator ID using the chain's typical addressing system (this usually + * means being a controller account) or directly convertible into a validator ID (which + * usually means being a stash account). + * + * # + * - Complexity: `O(1)` in number of key types. Actual cost depends on the number of length + * of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)`. Actual cost depends on the number of length of + * `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: SessionKeys + proof: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: sts.number(), + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + schedule_after: sts.enumStruct({ + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + } +}) + +export const MaybeHashed: sts.Type = sts.closedEnum(() => { + return { + Hash: H256, + Value: Call, + } +}) + +export type MaybeHashed = MaybeHashed_Hash | MaybeHashed_Value + +export interface MaybeHashed_Hash { + __kind: 'Hash' + value: H256 +} + +export interface MaybeHashed_Value { + __kind: 'Value' + value: Call +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: number + index: number +} + +/** + * Cancel a named scheduled task. + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Schedule a named task. + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`](Self::schedule_named). + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + deregister: sts.enumStruct({ + id: Id, + }), + force_register: sts.enumStruct({ + who: AccountId32, + deposit: sts.bigint(), + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + force_remove_lock: sts.enumStruct({ + para: Id, + }), + register: sts.enumStruct({ + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + reserve: sts.unit(), + swap: sts.enumStruct({ + id: Id, + other: Id, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RegistrarCall = RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_force_remove_lock | RegistrarCall_register | RegistrarCall_reserve | RegistrarCall_swap + +/** + * Deregister a Para Id, freeing all data and returning any deposit. + * + * The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: Id +} + +/** + * Force the registration of a Para Id on the relay chain. + * + * This function must be called by a Root origin. + * + * The deposit taken can be specified for this registration. Any `ParaId` + * can be registered, including sub-1000 IDs which are System Parachains. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId32 + deposit: bigint + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Remove a manager lock from a para. This will allow the manager of a + * previously locked para to deregister or swap a para without using governance. + * + * Can only be called by the Root origin. + */ +export interface RegistrarCall_force_remove_lock { + __kind: 'force_remove_lock' + para: Id +} + +/** + * Register head data and validation code for a reserved Para Id. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. + * - `id`: The para ID. Must be owned/managed by the `origin` signing account. + * - `genesis_head`: The genesis head data of the parachain/thread. + * - `validation_code`: The initial validation code of the parachain/thread. + * + * ## Deposits/Fees + * The origin signed account must reserve a corresponding deposit for the registration. Anything already + * reserved previously for this para ID is accounted for. + * + * ## Events + * The `Registered` event is emitted in case of success. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Reserve a Para Id on the relay chain. + * + * This function will reserve a new Para Id to be owned/managed by the origin account. + * The origin account is able to register head data and validation code using `register` to create + * a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID. + * + * ## Deposits/Fees + * The origin must reserve a deposit of `ParaDeposit` for the registration. + * + * ## Events + * The `Reserved` event is emitted in case of success, which provides the ID reserved for use. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * Swap a parachain with another parachain or parathread. + * + * The origin must be Root, the `para` owner, or the `para` itself. + * + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: Id + other: Id +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId32, + call: Call, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId32, + }), + claim_recovery: sts.enumStruct({ + account: AccountId32, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId32, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId32), + threshold: sts.number(), + delayPeriod: sts.number(), + }), + initiate_recovery: sts.enumStruct({ + account: AccountId32, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId32, + rescuer: AccountId32, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId32, + rescuer: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + * + * # + * - The weight of the `call` + 10,000. + * - One storage lookup to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId32 + call: Call +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + * + * # + * - One storage mutation to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId32 +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully recovered by + * you. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + V) + * # + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId32 +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + * + * # + * Key: V (len of vouching friends) + * - One storage read/remove to get the active recovery process. O(1), Codec O(V) + * - One balance call to repatriate reserved. O(X) + * - One event. + * + * Total Complexity: O(V + X) + * # + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId32 +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. Should be + * ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt before the + * account can be recovered. Should be less than or equal to the length of the list of + * friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized that + * needs to pass before the account can be recovered. + * + * # + * - Key: F (len of friends) + * - One storage read to check that account is not already recoverable. O(1). + * - A check that the friends list is sorted and unique. O(F) + * - One currency reserve operation. O(X) + * - One storage write. O(1). Codec O(F). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId32[] + threshold: number + delayPeriod: number +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account needs to be + * recoverable (i.e. have a recovery configuration). + * + * # + * - One storage read to check that account is recoverable. O(F) + * - One storage read to check that this recovery process hasn't already started. O(1) + * - One currency reserve operation. O(X) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId32 +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + * + * # + * Key: F (len of friends) + * - One storage read to get the prefix iterator for active recoveries. O(1) + * - One storage read/remove to get the recovery configuration. O(1), Codec O(F) + * - One balance call to unreserved. O(X) + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + * + * # + * - One storage write O(1) + * - One event + * # + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId32 + rescuer: AccountId32 +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One binary search to confirm caller is a friend. O(logF) + * - One binary search to confirm caller has not already vouched. O(logV) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + logF + V + logV) + * # + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId32 + rescuer: AccountId32 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: AccountId32, + proxyType: ProxyType, + delay: sts.number(), + }), + announce: sts.enumStruct({ + real: AccountId32, + callHash: H256, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + delay: sts.number(), + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId32, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId32, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + proxy_announced: sts.enumStruct({ + delegate: AccountId32, + real: AccountId32, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + reject_announcement: sts.enumStruct({ + delegate: AccountId32, + callHash: H256, + }), + remove_announcement: sts.enumStruct({ + real: AccountId32, + callHash: H256, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: AccountId32, + proxyType: ProxyType, + delay: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: AccountId32 + proxyType: ProxyType + delay: number +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: AccountId32 + callHash: H256 +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + * TODO: Might be over counting 1 read + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: number + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId32 + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId32 + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Dispatch the given `call` from an account that the sender is authorized for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: AccountId32 + real: AccountId32 + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: AccountId32 + callHash: H256 +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: AccountId32 + callHash: H256 +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: AccountId32 + proxyType: ProxyType + delay: number +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PreimageCall: sts.Type = sts.closedEnum(() => { + return { + note_preimage: sts.enumStruct({ + bytes: sts.bytes(), + }), + request_preimage: sts.enumStruct({ + hash: H256, + }), + unnote_preimage: sts.enumStruct({ + hash: H256, + }), + unrequest_preimage: sts.enumStruct({ + hash: H256, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PreimageCall = PreimageCall_note_preimage | PreimageCall_request_preimage | PreimageCall_unnote_preimage | PreimageCall_unrequest_preimage + +/** + * Register a preimage on-chain. + * + * If the preimage was previously requested, no fees or deposits are taken for providing + * the preimage. Otherwise, a deposit is taken proportional to the size of the preimage. + */ +export interface PreimageCall_note_preimage { + __kind: 'note_preimage' + bytes: Bytes +} + +/** + * Request a preimage be uploaded to the chain without paying any fees or deposits. + * + * If the preimage requests has already been provided on-chain, we unreserve any deposit + * a user may have paid, and take the control of the preimage out of their hands. + */ +export interface PreimageCall_request_preimage { + __kind: 'request_preimage' + hash: H256 +} + +/** + * Clear an unrequested preimage from the runtime storage. + */ +export interface PreimageCall_unnote_preimage { + __kind: 'unnote_preimage' + hash: H256 +} + +/** + * Clear a previously made request for a preimage. + * + * NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. + */ +export interface PreimageCall_unrequest_preimage { + __kind: 'unrequest_preimage' + hash: H256 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PhragmenElectionCall: sts.Type = sts.closedEnum(() => { + return { + clean_defunct_voters: sts.enumStruct({ + numVoters: sts.number(), + numDefunct: sts.number(), + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + hasReplacement: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId32), + value: sts.bigint(), + }), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PhragmenElectionCall = PhragmenElectionCall_clean_defunct_voters | PhragmenElectionCall_remove_member | PhragmenElectionCall_remove_voter | PhragmenElectionCall_renounce_candidacy | PhragmenElectionCall_submit_candidacy | PhragmenElectionCall_vote + +/** + * Clean all voters who are defunct (i.e. they do not serve any purpose at all). The + * deposit of the removed voters are returned. + * + * This is an root function to be used only for cleaning the state. + * + * The dispatch origin of this call must be root. + * + * # + * The total number of voters and those that are defunct must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_clean_defunct_voters { + __kind: 'clean_defunct_voters' + numVoters: number + numDefunct: number +} + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, a new phragmen election is started. + * + * The dispatch origin of this call must be root. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement, we use a small weight. Else, since this is a root call and + * will go into phragmen, we assume full block for now. + * # + */ +export interface PhragmenElectionCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + hasReplacement: boolean +} + +/** + * Remove `origin` as a voter. + * + * This removes the lock and returns the deposit. + * + * The dispatch origin of this call must be signed and be a voter. + */ +export interface PhragmenElectionCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * + * - `origin` is a candidate and not elected in any set. In this case, the deposit is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the deposit is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the deposit is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_member`](Self::remove_member), if replacement runners exists, they + * are immediately used. If the prime is renouncing, then no prime will exist until the + * next round. + * + * The dispatch origin of this call must be signed, and have one of the above roles. + * + * # + * The type of renouncing must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Submit oneself for candidacy. A fixed amount of deposit is recorded. + * + * All candidates are wiped at the end of the term. They either become a member/runner-up, + * or leave the system while their deposit is slashed. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`] + * to get their deposit back. Losing the spot in an election will always lead to a slash. + * + * # + * The number of current candidates must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is + * reserved. The deposit is based on the number of votes and can be updated over time. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * If `value` is more than `who`'s free balance, then the maximum of the two is used. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * It is the responsibility of the caller to **NOT** place all of their balance into the + * lock and keep some for further operations. + * + * # + * We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less. + * # + */ +export interface PhragmenElectionCall_vote { + __kind: 'vote' + votes: AccountId32[] + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasSharedCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasDisputesCall: sts.Type = sts.closedEnum(() => { + return { + force_unfreeze: sts.unit(), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasDisputesCall = ParasDisputesCall_force_unfreeze + +export interface ParasDisputesCall_force_unfreeze { + __kind: 'force_unfreeze' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + add_trusted_validation_code: sts.enumStruct({ + validationCode: ValidationCode, + }), + force_note_new_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: Id, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + relayParentNumber: sts.number(), + }), + force_set_current_code: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + include_pvf_check_statement: sts.enumStruct({ + stmt: V2PvfCheckStatement, + signature: sts.bytes(), + }), + poke_unused_validation_code: sts.enumStruct({ + validationCodeHash: ValidationCodeHash, + }), + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const V2PvfCheckStatement: sts.Type = sts.struct(() => { + return { + accept: sts.boolean(), + subject: ValidationCodeHash, + sessionIndex: sts.number(), + validatorIndex: V0ValidatorIndex, + } +}) + +export const V0ValidatorIndex = sts.number() + +export interface V2PvfCheckStatement { + accept: boolean + subject: ValidationCodeHash + sessionIndex: number + validatorIndex: V0ValidatorIndex +} + +export type V0ValidatorIndex = number + +export type ValidationCodeHash = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasCall = ParasCall_add_trusted_validation_code | ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head | ParasCall_include_pvf_check_statement | ParasCall_poke_unused_validation_code + +/** + * Adds the validation code to the storage. + * + * The code will not be added if it is already present. Additionally, if PVF pre-checking + * is running for that code, it will be instantly accepted. + * + * Otherwise, the code will be added into the storage. Note that the code will be added + * into storage with reference count 0. This is to account the fact that there are no users + * for this code yet. The caller will have to make sure that this code eventually gets + * used by some parachain or removed from the storage to avoid storage leaks. For the latter + * prefer to use the `poke_unused_validation_code` dispatchable to raw storage manipulation. + * + * This function is mainly meant to be used for upgrading parachains that do not follow + * the go-ahead signal while the PVF pre-checking feature is enabled. + */ +export interface ParasCall_add_trusted_validation_code { + __kind: 'add_trusted_validation_code' + validationCode: ValidationCode +} + +/** + * Note a new block head for para within the context of the current block. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: Id + newHead: HeadData +} + +/** + * Put a parachain directly into the next session's action queue. + * We can't queue it any sooner than this without going into the + * initializer... + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: Id +} + +/** + * Schedule an upgrade as if it was scheduled in the given relay parent block. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: Id + newCode: ValidationCode + relayParentNumber: number +} + +/** + * Set the storage for the parachain validation code immediately. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: Id + newCode: ValidationCode +} + +/** + * Set the storage for the current parachain head data immediately. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: Id + newHead: HeadData +} + +/** + * Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and + * enacts the results if that was the last vote before achieving the supermajority. + */ +export interface ParasCall_include_pvf_check_statement { + __kind: 'include_pvf_check_statement' + stmt: V2PvfCheckStatement + signature: Bytes +} + +/** + * Remove the validation code from the storage iff the reference count is 0. + * + * This is better than removing the storage directly, because it will not remove the code + * that was suddenly got used by some parachain while this dispatchable was pending + * dispatching. + */ +export interface ParasCall_poke_unused_validation_code { + __kind: 'poke_unused_validation_code' + validationCodeHash: ValidationCodeHash +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: V1InherentData, + }), + } +}) + +export const V1InherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => V1UncheckedSigned), + backedCandidates: sts.array(() => V1BackedCandidate), + disputes: sts.array(() => V1DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: H256, + number: sts.number(), + stateRoot: H256, + extrinsicsRoot: H256, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + Consensus: sts.tuple(() => [sts.bytes(), sts.bytes()]), + Other: sts.bytes(), + PreRuntime: sts.tuple(() => [sts.bytes(), sts.bytes()]), + RuntimeEnvironmentUpdated: sts.unit(), + Seal: sts.tuple(() => [sts.bytes(), sts.bytes()]), + } +}) + +export type DigestItem = DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: [Bytes, Bytes] +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: [Bytes, Bytes] +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: [Bytes, Bytes] +} + +export interface Digest { + logs: DigestItem[] +} + +export interface Header { + parentHash: H256 + number: number + stateRoot: H256 + extrinsicsRoot: H256 + digest: Digest +} + +export const V1DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: sts.number(), + statements: sts.array(() => sts.tuple(() => [V1DisputeStatement, V0ValidatorIndex, sts.bytes()])), + } +}) + +export const V1DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: V1InvalidDisputeStatementKind, + Valid: V1ValidDisputeStatementKind, + } +}) + +export const V1ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + BackingSeconded: H256, + BackingValid: H256, + Explicit: sts.unit(), + } +}) + +export type V1ValidDisputeStatementKind = V1ValidDisputeStatementKind_ApprovalChecking | V1ValidDisputeStatementKind_BackingSeconded | V1ValidDisputeStatementKind_BackingValid | V1ValidDisputeStatementKind_Explicit + +export interface V1ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface V1ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: H256 +} + +export interface V1ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: H256 +} + +export interface V1ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export const V1InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export type V1InvalidDisputeStatementKind = V1InvalidDisputeStatementKind_Explicit + +export interface V1InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type V1DisputeStatement = V1DisputeStatement_Invalid | V1DisputeStatement_Valid + +export interface V1DisputeStatement_Invalid { + __kind: 'Invalid' + value: V1InvalidDisputeStatementKind +} + +export interface V1DisputeStatement_Valid { + __kind: 'Valid' + value: V1ValidDisputeStatementKind +} + +export const CandidateHash = sts.bytes() + +export interface V1DisputeStatementSet { + candidateHash: CandidateHash + session: number + statements: [V1DisputeStatement, V0ValidatorIndex, Bytes][] +} + +export type CandidateHash = Bytes + +export const V1BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: V1CommittedCandidateReceipt, + validityVotes: sts.array(() => V0ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const V0ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.bytes(), + Implicit: sts.bytes(), + } +}) + +export type V0ValidityAttestation = V0ValidityAttestation_Explicit | V0ValidityAttestation_Implicit + +export interface V0ValidityAttestation_Explicit { + __kind: 'Explicit' + value: Bytes +} + +export interface V0ValidityAttestation_Implicit { + __kind: 'Implicit' + value: Bytes +} + +export const V1CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: V1CandidateDescriptor, + commitments: V1CandidateCommitments, + } +}) + +export const V1CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => sts.bytes()), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: sts.number(), + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: Id, + data: sts.bytes(), + } +}) + +export interface OutboundHrmpMessage { + recipient: Id + data: Bytes +} + +export interface V1CandidateCommitments { + upwardMessages: Bytes[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: number +} + +export const V1CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: Id, + relayParent: H256, + collator: V0Public, + persistedValidationDataHash: H256, + povHash: H256, + erasureRoot: H256, + signature: V0Signature, + paraHead: H256, + validationCodeHash: ValidationCodeHash, + } +}) + +export const V0Signature = sts.bytes() + +export const V0Public = sts.bytes() + +export interface V1CandidateDescriptor { + paraId: Id + relayParent: H256 + collator: V0Public + persistedValidationDataHash: H256 + povHash: H256 + erasureRoot: H256 + signature: V0Signature + paraHead: H256 + validationCodeHash: ValidationCodeHash +} + +export type V0Signature = Bytes + +export type V0Public = Bytes + +export interface V1CommittedCandidateReceipt { + descriptor: V1CandidateDescriptor + commitments: V1CandidateCommitments +} + +export interface V1BackedCandidate { + candidate: V1CommittedCandidateReceipt + validityVotes: V0ValidityAttestation[] + validatorIndices: BitSequence +} + +export const V1UncheckedSigned: sts.Type = sts.struct(() => { + return { + payload: V1AvailabilityBitfield, + validatorIndex: V0ValidatorIndex, + signature: sts.bytes(), + } +}) + +export const V1AvailabilityBitfield = sts.bitseq() + +export interface V1UncheckedSigned { + payload: V1AvailabilityBitfield + validatorIndex: V0ValidatorIndex + signature: Bytes +} + +export type V1AvailabilityBitfield = BitSequence + +export interface V1InherentData { + bitfields: V1UncheckedSigned[] + backedCandidates: V1BackedCandidate[] + disputes: V1DisputeStatementSet[] + parentHeader: Header +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInherentCall = ParaInherentCall_enter + +/** + * Enter the paras inherent. This will process bitfields and backed candidates. + */ +export interface ParaInherentCall_enter { + __kind: 'enter' + data: V1InherentData +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInclusionCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: sts.bigint(), + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + call: sts.bytes(), + storeCall: sts.boolean(), + maxWeight: sts.bigint(), + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId32), + call: Call, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: sts.number(), + index: sts.number(), + } +}) + +export interface Timepoint { + height: number + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: bigint +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + call: Bytes + storeCall: boolean + maxWeight: bigint +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId32[] + call: Call +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId32[] + timepoint: Timepoint + callHash: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const InitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type InitializerCall = InitializerCall_force_approve + +/** + * Issue a signal to the consensus engine to forcibly act as though all parachain + * blocks in all relay chain blocks up to and including the given number in the current + * chain are valid and should be finalized. + */ +export interface InitializerCall_force_approve { + __kind: 'force_approve' + upTo: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: sts.number(), + }), + force_transfer: sts.enumStruct({ + new: AccountId32, + index: sts.number(), + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: sts.number(), + }), + freeze: sts.enumStruct({ + index: sts.number(), + }), + transfer: sts.enumStruct({ + new: AccountId32, + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: number +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId32 + index: number + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: number +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the + * deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: number +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: sts.bytes(), + }), + } +}) + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: sts.number(), + networkState: OpaqueNetworkState, + sessionIndex: sts.number(), + authorityIndex: sts.number(), + validatorsLen: sts.number(), + } +}) + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export interface Heartbeat { + blockNumber: number + networkState: OpaqueNetworkState + sessionIndex: number + authorityIndex: number + validatorsLen: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is + * length of `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Bytes +} + +/** + * Identity pallet declaration. + */ +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId32, + }), + add_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: sts.number(), + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: MultiAddress, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: MultiAddress, + judgement: Judgement, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: MultiAddress, + }), + rename_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId32, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: BitFlags, + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId32, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => sts.tuple(() => [Data, Data])), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => sts.bytes()), + image: Data, + twitter: Data, + } +}) + +export interface IdentityInfo { + additional: [Data, Data][] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (Bytes | undefined) + image: Data + twitter: Data +} + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: Bytes +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: Bytes +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: Bytes +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: Bytes +} + +export const BitFlags = sts.bigint() + +export const Judgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: sts.bigint(), + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export type Judgement = Judgement_Erroneous | Judgement_FeePaid | Judgement_KnownGood | Judgement_LowQuality | Judgement_OutOfDate | Judgement_Reasonable | Judgement_Unknown + +export interface Judgement_Erroneous { + __kind: 'Erroneous' +} + +export interface Judgement_FeePaid { + __kind: 'FeePaid' + value: bigint +} + +export interface Judgement_KnownGood { + __kind: 'KnownGood' +} + +export interface Judgement_LowQuality { + __kind: 'LowQuality' +} + +export interface Judgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface Judgement_Reasonable { + __kind: 'Reasonable' +} + +export interface Judgement_Unknown { + __kind: 'Unknown' +} + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: sts.bytes(), + Keccak256: sts.bytes(), + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: sts.bytes(), + ShaThree256: sts.bytes(), + } +}) + +/** + * Identity pallet declaration. + */ +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId32 +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: MultiAddress + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: number +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: MultiAddress +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: MultiAddress + judgement: Judgement +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: MultiAddress +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: MultiAddress + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId32 +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: BitFlags +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId32, Data][] +} + +export type BitFlags = bigint + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const HrmpCall: sts.Type = sts.closedEnum(() => { + return { + force_clean_hrmp: sts.enumStruct({ + para: Id, + }), + force_process_hrmp_close: sts.unit(), + force_process_hrmp_open: sts.unit(), + hrmp_accept_open_channel: sts.enumStruct({ + sender: Id, + }), + hrmp_cancel_open_request: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: Id, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: Id, + recipient: Id, + } +}) + +export interface HrmpChannelId { + sender: Id + recipient: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type HrmpCall = HrmpCall_force_clean_hrmp | HrmpCall_force_process_hrmp_close | HrmpCall_force_process_hrmp_open | HrmpCall_hrmp_accept_open_channel | HrmpCall_hrmp_cancel_open_request | HrmpCall_hrmp_close_channel | HrmpCall_hrmp_init_open_channel + +/** + * This extrinsic triggers the cleanup of all the HRMP storage items that + * a para may have. Normally this happens once per session, but this allows + * you to trigger the cleanup immediately for a specific parachain. + * + * Origin must be Root. + */ +export interface HrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: Id +} + +/** + * Force process HRMP close channel requests. + * + * If there are pending HRMP close channel requests, you can use this + * function process all of those requests immediately. + */ +export interface HrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' +} + +/** + * Force process HRMP open channel requests. + * + * If there are pending HRMP open channel requests, you can use this + * function process all of those requests immediately. + */ +export interface HrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' +} + +/** + * Accept a pending open channel request from the given sender. + * + * The channel will be opened only on the next session boundary. + */ +export interface HrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: Id +} + +/** + * This cancels a pending open channel request. It can be canceled be either of the sender + * or the recipient for that request. The origin must be either of those. + * + * The cancellation happens immediately. It is not possible to cancel the request if it is + * already accepted. + */ +export interface HrmpCall_hrmp_cancel_open_request { + __kind: 'hrmp_cancel_open_request' + channelId: HrmpChannelId +} + +/** + * Initiate unilateral closing of a channel. The origin must be either the sender or the + * recipient in the channel being closed. + * + * The closure can only happen on a session change. + */ +export interface HrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * Initiate opening a channel from a parachain to a given recipient with given channel + * parameters. + * + * - `proposed_max_capacity` - specifies how many messages can be in the channel at once. + * - `proposed_max_message_size` - specifies the maximum size of the messages. + * + * These numbers are a subject to the relay-chain configuration limits. + * + * The channel can be opened only after the recipient confirms it and only on a session + * change. + */ +export interface HrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: Id + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: sts.number(), + bestFinalizedBlockNumber: sts.number(), + }), + report_equivocation: sts.enumStruct({ + equivocationProof: Type_258, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_258, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: sts.number(), + trieNodes: sts.array(() => sts.bytes()), + validatorCount: sts.number(), + } +}) + +export interface MembershipProof { + session: number + trieNodes: Bytes[] + validatorCount: number +} + +export const Type_258: sts.Type = sts.struct(() => { + return { + setId: sts.bigint(), + equivocation: Equivocation, + } +}) + +export const Equivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: Type_265, + Prevote: Type_260, + } +}) + +export const Type_260: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Prevote, sts.bytes()]), + second: sts.tuple(() => [Prevote, sts.bytes()]), + } +}) + +export const Prevote: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Prevote { + targetHash: H256 + targetNumber: number +} + +export interface Type_260 { + roundNumber: bigint + identity: Public + first: [Prevote, Bytes] + second: [Prevote, Bytes] +} + +export const Type_265: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Precommit, sts.bytes()]), + second: sts.tuple(() => [Precommit, sts.bytes()]), + } +}) + +export const Precommit: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Precommit { + targetHash: H256 + targetNumber: number +} + +export interface Type_265 { + roundNumber: bigint + identity: Public + first: [Precommit, Bytes] + second: [Precommit, Bytes] +} + +export type Equivocation = Equivocation_Precommit | Equivocation_Prevote + +export interface Equivocation_Precommit { + __kind: 'Precommit' + value: Type_265 +} + +export interface Equivocation_Prevote { + __kind: 'Prevote' + value: Type_260 +} + +export interface Type_258 { + setId: bigint + equivocation: Equivocation +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has + * stalled. This will trigger a forced authority set change at the beginning + * of the next session, to be enacted `delay` blocks after that. The delay + * should be high enough to safely assume that the block signalling the + * forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters + * will start the new authority set using the given finalized block as base. + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: number + bestFinalizedBlockNumber: number +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_258 + keyOwnerProof: MembershipProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_258 + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GiltCall: sts.Type = sts.closedEnum(() => { + return { + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + set_target: sts.enumStruct({ + target: sts.bigint(), + }), + thaw: sts.enumStruct({ + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GiltCall = GiltCall_place_bid | GiltCall_retract_bid | GiltCall_set_target | GiltCall_thaw + +/** + * Place a bid for a gilt to be issued. + * + * Origin must be Signed, and account must have at least `amount` in free balance. + * + * - `amount`: The amount of the bid; these funds will be reserved. If the bid is + * successfully elevated into an issued gilt, then these funds will continue to be + * reserved until the gilt expires. Must be at least `MinFreeze`. + * - `duration`: The number of periods for which the funds will be locked if the gilt is + * issued. It will expire only after this period has elapsed after the point of issuance. + * Must be greater than 1 and no more than `QueueCount`. + * + * Complexities: + * - `Queues[duration].len()` (just take max). + */ +export interface GiltCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * Retract a previously placed bid. + * + * Origin must be Signed, and the account should have previously issued a still-active bid + * of `amount` for `duration`. + * + * - `amount`: The amount of the previous bid. + * - `duration`: The duration of the previous bid. + */ +export interface GiltCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * Set target proportion of gilt-funds. + * + * Origin must be `AdminOrigin`. + * + * - `target`: The target proportion of effective issued funds that should be under gilts + * at any one time. + */ +export interface GiltCall_set_target { + __kind: 'set_target' + target: bigint +} + +/** + * Remove an active but expired gilt. Reserved funds under gilt are freed and balance is + * adjusted to ensure that the funds grow or shrink to maintain the equivalent proportion + * of effective total issued funds. + * + * Origin must be Signed and the account must be the owner of the gilt of the given index. + * + * - `index`: The index of the gilt to be thawed. + */ +export interface GiltCall_thaw { + __kind: 'thaw' + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + set_emergency_election_result: sts.enumStruct({ + supports: sts.array(() => sts.tuple(() => [AccountId32, Support])), + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => sts.array(() => sts.bigint())), + }), + submit: sts.enumStruct({ + rawSolution: RawSolution, + numSignedSubmissions: sts.number(), + }), + submit_unsigned: sts.enumStruct({ + rawSolution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export const RawSolution: sts.Type = sts.struct(() => { + return { + solution: NposCompactSolution24, + score: sts.array(() => sts.bigint()), + round: sts.number(), + } +}) + +export const NposCompactSolution24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), + votes2: sts.array(() => sts.tuple(() => [sts.number(), sts.tuple(() => [sts.number(), sts.number()]), sts.number()])), + votes3: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes4: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes5: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes6: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes7: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes8: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes9: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes10: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes11: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes12: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes13: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes14: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes15: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes16: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes17: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes18: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes19: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes20: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes21: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes22: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes23: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes24: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + } +}) + +export interface NposCompactSolution24 { + votes1: [number, number][] + votes2: [number, [number, number], number][] + votes3: [number, [number, number][], number][] + votes4: [number, [number, number][], number][] + votes5: [number, [number, number][], number][] + votes6: [number, [number, number][], number][] + votes7: [number, [number, number][], number][] + votes8: [number, [number, number][], number][] + votes9: [number, [number, number][], number][] + votes10: [number, [number, number][], number][] + votes11: [number, [number, number][], number][] + votes12: [number, [number, number][], number][] + votes13: [number, [number, number][], number][] + votes14: [number, [number, number][], number][] + votes15: [number, [number, number][], number][] + votes16: [number, [number, number][], number][] + votes17: [number, [number, number][], number][] + votes18: [number, [number, number][], number][] + votes19: [number, [number, number][], number][] + votes20: [number, [number, number][], number][] + votes21: [number, [number, number][], number][] + votes22: [number, [number, number][], number][] + votes23: [number, [number, number][], number][] + votes24: [number, [number, number][], number][] +} + +export interface RawSolution { + solution: NposCompactSolution24 + score: bigint[] + round: number +} + +export const Support: sts.Type = sts.struct(() => { + return { + total: sts.bigint(), + voters: sts.array(() => sts.tuple(() => [AccountId32, sts.bigint()])), + } +}) + +export interface Support { + total: bigint + voters: [AccountId32, bigint][] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * Set a solution in the queue, to be handed out to the client of this pallet in the next + * call to `ElectionProvider::elect`. + * + * This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`. + * + * The solution is not checked for any feasibility and is assumed to be trustworthy, as any + * feasibility check itself can in principle cause the election process to fail (due to + * memory/weight constrains). + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + supports: [AccountId32, Support][] +} + +/** + * Set a new value for `MinimumUntrustedScore`. + * + * Dispatch origin must be aligned with `T::ForceOrigin`. + * + * This check can be turned off by setting the value to `None`. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (bigint[] | undefined) +} + +/** + * Submit a solution for the signed phase. + * + * The dispatch origin fo this call must be __signed__. + * + * The solution is potentially queued, based on the claimed score and processed at the end + * of the signed phase. + * + * A deposit is reserved and recorded for the solution. Based on the outcome, the solution + * might be rewarded, slashed, or get all or a part of the deposit back. + * + * # + * Queue size must be provided as witness data. + * # + */ +export interface ElectionProviderMultiPhaseCall_submit { + __kind: 'submit' + rawSolution: RawSolution + numSignedSubmissions: number +} + +/** + * Submit a solution for the unsigned phase. + * + * The dispatch origin fo this call must be __none__. + * + * This submission is checked on the fly. Moreover, this unsigned solution is only + * validated when submitted to the pool from the **local** node. Effectively, this means + * that only active validators can submit this transaction when authoring a block (similar + * to an inherent). + * + * To prevent any incorrect solution (and thus wasted time/weight), this transaction will + * panic if the solution submitted by the validator is invalid in any way, effectively + * putting their authoring reward at risk. + * + * No deposit or reward is associated with this submission. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + rawSolution: RawSolution + witness: SolutionOrSnapshotSize +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DmpCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + blacklist: sts.enumStruct({ + proposalHash: H256, + maybeRefIndex: sts.option(() => sts.number()), + }), + cancel_proposal: sts.enumStruct({ + propIndex: sts.number(), + }), + cancel_queued: sts.enumStruct({ + which: sts.number(), + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId32, + conviction: Conviction, + balance: sts.bigint(), + }), + emergency_cancel: sts.enumStruct({ + refIndex: sts.number(), + }), + enact_proposal: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + }), + external_propose: sts.enumStruct({ + proposalHash: H256, + }), + external_propose_default: sts.enumStruct({ + proposalHash: H256, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: H256, + }), + fast_track: sts.enumStruct({ + proposalHash: H256, + votingPeriod: sts.number(), + delay: sts.number(), + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: H256, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: H256, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId32, + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + index: sts.number(), + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId32, + }), + veto_external: sts.enumStruct({ + proposalHash: H256, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface AccountVote_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DemocracyCall = DemocracyCall_blacklist | DemocracyCall_cancel_proposal | DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. + * + * If called on a queued public or external proposal, then this will result in it being + * removed. If the `ref_index` supplied is an active referendum with the proposal hash, + * then it will be cancelled. + * + * The dispatch origin of this call must be `BlacklistOrigin`. + * + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. + * + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). + */ +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: H256 + maybeRefIndex?: (number | undefined) +} + +/** + * Remove a proposal. + * + * The dispatch origin of this call must be `CancelProposalOrigin`. + * + * - `prop_index`: The index of the proposal to cancel. + * + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number +} + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: number +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must not + * be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId32 + conviction: Conviction + balance: bigint +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: number +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: H256 + index: number +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Weight: `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: H256 +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: H256 +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: H256 +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * `FastTrackVotingPeriod` if too low. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: H256 + votingPeriod: number + delay: number +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. When this call is successful, i.e. + * the preimage has not been uploaded before and matches some imminent proposal, + * no fee is paid. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * Weight: `O(p)` + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: H256 + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. Extrinsic is + * weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * Weight: `O(D)` where D is length of proposal. + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: H256 + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId32 + index: number +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: number +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * Weight: `O(S)` where S is the number of seconds a proposal already has. + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId32 +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * Weight: `O(V + log(V))` where V is number of `existing vetoers` + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: H256 +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of referendums the voter has voted on. + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: Id, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + contribute_all: sts.enumStruct({ + index: sts.number(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: Id, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId32, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: Signature, + } +}) + +export const Signature = sts.bytes() + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Signature +} + +export type Signature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_contribute_all | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * Add an optional memo to an existing crowdloan contribution. + * + * Origin must be Signed, and the user must have contributed to the crowdloan. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: Id + memo: Bytes +} + +/** + * Contribute to a crowd sale. This will transfer some balance over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * Contribute your entire balance to a crowd sale. This will transfer the entire balance of a user over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute_all { + __kind: 'contribute_all' + index: number + signature?: (MultiSignature | undefined) +} + +/** + * Create a new crowdloaning campaign for a parachain slot with the given lease period range. + * + * This applies a lock to your parachain configuration, ensuring that it cannot be changed + * by the parachain manager. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Remove a fund after the retirement period has ended and all funds have been returned. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * Edit the configuration for an in-progress crowdloan. + * + * Can only be called by Root origin. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Poke the fund into `NewRaise` + * + * Origin must be Signed, and the fund has non-zero raise. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: Id +} + +/** + * Automatically refund contributors of an ended crowdloan. + * Due to weight restrictions, this function may need to be called multiple + * times to fully refund all users. We will refund `RemoveKeysLimit` users at a time. + * + * Origin must be signed, but can come from anyone. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * Withdraw full balance of a specific contributor. + * + * Origin must be signed, but can come from anyone. + * + * The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement + * flag must be set. For a fund to be ready for retirement, then: + * - it must not already be in retirement; + * - the amount of raised funds must be bigger than the _free_ balance of the account; + * - and either: + * - the block number must be at least `end`; or + * - the current lease period must be greater than the fund's `last_period`. + * + * In this case, the fund's retirement flag is set and its `end` is reset to the current block + * number. + * + * - `who`: The account whose contribution should be withdrawn. + * - `index`: The parachain to whose crowdloan the contribution was made. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_bypass_consistency_check: sts.enumStruct({ + new: sts.boolean(), + }), + set_chain_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_code_retention_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_conclusion_by_time_out_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_max_spam_slots: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: sts.number(), + }), + set_group_rotation_frequency: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_minimum_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_cores: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_retries: sts.enumStruct({ + new: sts.number(), + }), + set_pvf_checking_enabled: sts.enumStruct({ + new: sts.boolean(), + }), + set_pvf_voting_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_thread_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_ump_max_individual_weight: sts.enumStruct({ + new: sts.bigint(), + }), + set_ump_service_total_weight: sts.enumStruct({ + new: sts.bigint(), + }), + set_validation_upgrade_cooldown: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ConfigurationCall = ConfigurationCall_set_bypass_consistency_check | ConfigurationCall_set_chain_availability_period | ConfigurationCall_set_code_retention_period | ConfigurationCall_set_dispute_conclusion_by_time_out_period | ConfigurationCall_set_dispute_max_spam_slots | ConfigurationCall_set_dispute_period | ConfigurationCall_set_dispute_post_conclusion_acceptance_period | ConfigurationCall_set_group_rotation_frequency | ConfigurationCall_set_hrmp_channel_max_capacity | ConfigurationCall_set_hrmp_channel_max_message_size | ConfigurationCall_set_hrmp_channel_max_total_size | ConfigurationCall_set_hrmp_max_message_num_per_candidate | ConfigurationCall_set_hrmp_max_parachain_inbound_channels | ConfigurationCall_set_hrmp_max_parachain_outbound_channels | ConfigurationCall_set_hrmp_max_parathread_inbound_channels | ConfigurationCall_set_hrmp_max_parathread_outbound_channels | ConfigurationCall_set_hrmp_open_request_ttl | ConfigurationCall_set_hrmp_recipient_deposit | ConfigurationCall_set_hrmp_sender_deposit | ConfigurationCall_set_max_code_size | ConfigurationCall_set_max_downward_message_size | ConfigurationCall_set_max_head_data_size | ConfigurationCall_set_max_pov_size | ConfigurationCall_set_max_upward_message_num_per_candidate | ConfigurationCall_set_max_upward_message_size | ConfigurationCall_set_max_upward_queue_count | ConfigurationCall_set_max_upward_queue_size | ConfigurationCall_set_max_validators | ConfigurationCall_set_max_validators_per_core | ConfigurationCall_set_minimum_validation_upgrade_delay | ConfigurationCall_set_n_delay_tranches | ConfigurationCall_set_needed_approvals | ConfigurationCall_set_no_show_slots | ConfigurationCall_set_parathread_cores | ConfigurationCall_set_parathread_retries | ConfigurationCall_set_pvf_checking_enabled | ConfigurationCall_set_pvf_voting_ttl | ConfigurationCall_set_relay_vrf_modulo_samples | ConfigurationCall_set_scheduling_lookahead | ConfigurationCall_set_thread_availability_period | ConfigurationCall_set_ump_max_individual_weight | ConfigurationCall_set_ump_service_total_weight | ConfigurationCall_set_validation_upgrade_cooldown | ConfigurationCall_set_validation_upgrade_delay | ConfigurationCall_set_zeroth_delay_tranche_width + +/** + * Setting this to true will disable consistency checks for the configuration setters. + * Use with caution. + */ +export interface ConfigurationCall_set_bypass_consistency_check { + __kind: 'set_bypass_consistency_check' + new: boolean +} + +/** + * Set the availability period for parachains. + */ +export interface ConfigurationCall_set_chain_availability_period { + __kind: 'set_chain_availability_period' + new: number +} + +/** + * Set the acceptance period for an included candidate. + */ +export interface ConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: number +} + +/** + * Set the dispute conclusion by time out period. + */ +export interface ConfigurationCall_set_dispute_conclusion_by_time_out_period { + __kind: 'set_dispute_conclusion_by_time_out_period' + new: number +} + +/** + * Set the maximum number of dispute spam slots. + */ +export interface ConfigurationCall_set_dispute_max_spam_slots { + __kind: 'set_dispute_max_spam_slots' + new: number +} + +/** + * Set the dispute period, in number of sessions to keep for disputes. + */ +export interface ConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: number +} + +/** + * Set the dispute post conclusion acceptance period. + */ +export interface ConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: number +} + +/** + * Set the parachain validator-group rotation frequency + */ +export interface ConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: number +} + +/** + * Sets the maximum number of messages allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * Sets the maximum size of a message that could ever be put into an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * Sets the maximum total size of messages in bytes allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * Sets the maximum number of outbound HRMP messages can be sent by a candidate. + */ +export interface ConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parachain is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parachain is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parathread is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_inbound_channels { + __kind: 'set_hrmp_max_parathread_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parathread is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_outbound_channels { + __kind: 'set_hrmp_max_parathread_outbound_channels' + new: number +} + +/** + * Sets the number of sessions after which an HRMP open channel request expires. + */ +export interface ConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * Sets the amount of funds that the recipient should provide for accepting opening an HRMP + * channel. + */ +export interface ConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: bigint +} + +/** + * Sets the amount of funds that the sender should provide for opening an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: bigint +} + +/** + * Set the max validation code size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * Set the critical downward message size. + */ +export interface ConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * Set the max head data size for paras. + */ +export interface ConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * Set the max POV block size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * Sets the maximum number of messages that a candidate can contain. + */ +export interface ConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum size of an upward message that can be sent by a candidate. + */ +export interface ConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * Sets the maximum items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * Sets the maximum total size of items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * Set the maximum number of validators to use in parachain consensus. + */ +export interface ConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * Set the maximum number of validators to assign to any core. + */ +export interface ConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * Sets the minimum delay between announcing the upgrade block for a parachain until the + * upgrade taking place. + * + * See the field documentation for information and constraints for the new value. + */ +export interface ConfigurationCall_set_minimum_validation_upgrade_delay { + __kind: 'set_minimum_validation_upgrade_delay' + new: number +} + +/** + * Set the total number of delay tranches. + */ +export interface ConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * Set the number of validators needed to approve a block. + */ +export interface ConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * Set the no show slots, in number of number of consensus slots. + * Must be at least 1. + */ +export interface ConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * Set the number of parathread execution cores. + */ +export interface ConfigurationCall_set_parathread_cores { + __kind: 'set_parathread_cores' + new: number +} + +/** + * Set the number of retries for a particular parathread. + */ +export interface ConfigurationCall_set_parathread_retries { + __kind: 'set_parathread_retries' + new: number +} + +/** + * Enable or disable PVF pre-checking. Consult the field documentation prior executing. + */ +export interface ConfigurationCall_set_pvf_checking_enabled { + __kind: 'set_pvf_checking_enabled' + new: boolean +} + +/** + * Set the number of session changes after which a PVF pre-checking voting is rejected. + */ +export interface ConfigurationCall_set_pvf_voting_ttl { + __kind: 'set_pvf_voting_ttl' + new: number +} + +/** + * Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion. + */ +export interface ConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * Set the scheduling lookahead, in expected number of blocks at peak throughput. + */ +export interface ConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * Set the availability period for parathreads. + */ +export interface ConfigurationCall_set_thread_availability_period { + __kind: 'set_thread_availability_period' + new: number +} + +/** + * Sets the maximum amount of weight any individual upward message may consume. + */ +export interface ConfigurationCall_set_ump_max_individual_weight { + __kind: 'set_ump_max_individual_weight' + new: bigint +} + +/** + * Sets the soft limit for the phase of dispatching dispatchable upward messages. + */ +export interface ConfigurationCall_set_ump_service_total_weight { + __kind: 'set_ump_service_total_weight' + new: bigint +} + +/** + * Set the validation upgrade cooldown. + */ +export interface ConfigurationCall_set_validation_upgrade_cooldown { + __kind: 'set_validation_upgrade_cooldown' + new: number +} + +/** + * Set the validation upgrade delay. + */ +export interface ConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: number +} + +/** + * Set the zeroth delay tranche width. + */ +export interface ConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: sts.bigint(), + vestingSchedule: sts.option(() => sts.tuple(() => [sts.bigint(), sts.bigint(), sts.number()])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId32), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId32 + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId32 + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: bigint + vestingSchedule?: ([bigint, bigint, number] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId32 | undefined) +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds + * after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is + * malicious or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_force_unreserve | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_all | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is not + * assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * Unreserve some balance from a user by force. + * + * Can only be called by ROOT. + */ +export interface BalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also alter the total issuance of the system (`TotalIssuance`) appropriately. + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: MultiAddress + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for input config + * types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex + * computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional check + * that the transfer will not kill the origin account. + * --------------------------------- + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: MultiAddress + value: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). # + * - O(1). Just like transfer, but reading the user's transferable balance first. + * # + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BagsListCall: sts.Type = sts.closedEnum(() => { + return { + put_in_front_of: sts.enumStruct({ + lighter: AccountId32, + }), + rebag: sts.enumStruct({ + dislocated: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BagsListCall = BagsListCall_put_in_front_of | BagsListCall_rebag + +/** + * Move the caller's Id directly in front of `lighter`. + * + * The dispatch origin for this call must be _Signed_ and can only be called by the Id of + * the account going in front of `lighter`. + * + * Only works if + * - both nodes are within the same bag, + * - and `origin` has a greater `VoteWeight` than `lighter`. + */ +export interface BagsListCall_put_in_front_of { + __kind: 'put_in_front_of' + lighter: AccountId32 +} + +/** + * Declare that some `dislocated` account has, through rewards or penalties, sufficiently + * changed its weight that it should properly fall into a different bag than its current + * one. + * + * Anyone can call this function about any potentially dislocated account. + * + * Will never return an error; if `dislocated` does not exist or doesn't need a rebag, then + * it is a noop and fees are still collected from `origin`. + */ +export interface BagsListCall_rebag { + __kind: 'rebag' + dislocated: AccountId32 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const EquivocationProof: sts.Type = sts.struct(() => { + return { + offender: sts.bytes(), + slot: Slot, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Slot = sts.bigint() + +export interface EquivocationProof { + offender: Bytes + slot: Slot + firstHeader: Header + secondHeader: Header +} + +export type Slot = bigint + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V1: sts.enumStruct({ + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + }), + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type NextConfigDescriptor = NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Plan an epoch config change. The epoch config change is recorded and will be enacted on + * the next call to `enact_epoch_change`. The config will be activated one epoch after. + * Multiple calls to this method will replace any existing planned config change that had + * not been enacted yet. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Cancel an in-progress auction. + * + * Can only be called by Root origin. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +export type Call = Call_Auctions | Call_Authorship | Call_Babe | Call_BagsList | Call_Balances | Call_Bounties | Call_Claims | Call_Configuration | Call_Council | Call_Crowdloan | Call_Democracy | Call_Dmp | Call_ElectionProviderMultiPhase | Call_Gilt | Call_Grandpa | Call_Hrmp | Call_Identity | Call_ImOnline | Call_Indices | Call_Initializer | Call_Multisig | Call_ParaInclusion | Call_ParaInherent | Call_Paras | Call_ParasDisputes | Call_ParasShared | Call_PhragmenElection | Call_Preimage | Call_Proxy | Call_Recovery | Call_Registrar | Call_Scheduler | Call_Session | Call_Slots | Call_Society | Call_Staking | Call_System | Call_TechnicalCommittee | Call_TechnicalMembership | Call_Timestamp | Call_Tips | Call_Treasury | Call_Ump | Call_Utility | Call_Vesting | Call_XcmPallet + +export interface Call_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Call_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Call_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Call_BagsList { + __kind: 'BagsList' + value: BagsListCall +} + +export interface Call_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Call_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Call_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Call_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Call_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Call_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Call_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Call_Dmp { + __kind: 'Dmp' + value: DmpCall +} + +export interface Call_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Call_Gilt { + __kind: 'Gilt' + value: GiltCall +} + +export interface Call_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Call_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Call_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Call_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Call_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Call_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Call_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Call_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Call_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Call_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Call_ParasDisputes { + __kind: 'ParasDisputes' + value: ParasDisputesCall +} + +export interface Call_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Call_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Call_Preimage { + __kind: 'Preimage' + value: PreimageCall +} + +export interface Call_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Call_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Call_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Call_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Call_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Call_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Call_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Call_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Call_System { + __kind: 'System' + value: SystemCall +} + +export interface Call_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Call_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Call_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Call_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Call_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Call_Ump { + __kind: 'Ump' + value: UmpCall +} + +export interface Call_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Call_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Call_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId32 = sts.bytes() diff --git a/squid/src/types/v9170.ts b/squid/src/types/v9170.ts new file mode 100644 index 00000000..cf85d6e7 --- /dev/null +++ b/squid/src/types/v9170.ts @@ -0,0 +1,11387 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Call: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + BagsList: BagsListCall, + Balances: BalancesCall, + Bounties: BountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + Dmp: DmpCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + Gilt: GiltCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Initializer: InitializerCall, + Multisig: MultisigCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Paras: ParasCall, + ParasDisputes: ParasDisputesCall, + ParasShared: ParasSharedCall, + PhragmenElection: PhragmenElectionCall, + Preimage: PreimageCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Ump: UmpCall, + Utility: UtilityCall, + Vesting: VestingCall, + XcmPallet: XcmPalletCall, + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + execute: sts.enumStruct({ + message: Type_531, + maxWeight: sts.bigint(), + }), + force_default_xcm_version: sts.enumStruct({ + maybeXcmVersion: sts.option(() => sts.number()), + }), + force_subscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_unsubscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_xcm_version: sts.enumStruct({ + location: V1MultiLocation, + xcmVersion: sts.number(), + }), + limited_reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + limited_teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + send: sts.enumStruct({ + dest: VersionedMultiLocation, + message: VersionedXcm, + }), + teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + } +}) + +export const VersionedXcm: sts.Type = sts.closedEnum(() => { + return { + V0: V0Xcm, + V1: V1Xcm, + V2: sts.array(() => V2Instruction), + } +}) + +export const V2Instruction: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => V2Instruction), + SetErrorHandler: sts.array(() => V2Instruction), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const DoubleEncoded: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncoded { + encoded: Bytes +} + +export const V0OriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type V0OriginKind = V0OriginKind_Native | V0OriginKind_SovereignAccount | V0OriginKind_Superuser | V0OriginKind_Xcm + +export interface V0OriginKind_Native { + __kind: 'Native' +} + +export interface V0OriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface V0OriginKind_Superuser { + __kind: 'Superuser' +} + +export interface V0OriginKind_Xcm { + __kind: 'Xcm' +} + +export const V2Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V2Error])), + Null: sts.unit(), + Version: sts.number(), + } +}) + +export const V2Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + MaxWeightInvalid: sts.unit(), + MultiLocationFull: sts.unit(), + MultiLocationNotInvertible: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + WeightLimitReached: sts.bigint(), + WeightNotComputable: sts.unit(), + } +}) + +export type V2Error = V2Error_AssetNotFound | V2Error_BadOrigin | V2Error_Barrier | V2Error_DestinationUnsupported | V2Error_ExceedsMaxMessageSize | V2Error_FailedToDecode | V2Error_FailedToTransactAsset | V2Error_InvalidLocation | V2Error_LocationCannotHold | V2Error_MaxWeightInvalid | V2Error_MultiLocationFull | V2Error_MultiLocationNotInvertible | V2Error_NotHoldingFees | V2Error_NotWithdrawable | V2Error_Overflow | V2Error_TooExpensive | V2Error_Transport | V2Error_Trap | V2Error_UnhandledXcmVersion | V2Error_Unimplemented | V2Error_UnknownClaim | V2Error_Unroutable | V2Error_UntrustedReserveLocation | V2Error_UntrustedTeleportLocation | V2Error_WeightLimitReached | V2Error_WeightNotComputable + +export interface V2Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V2Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V2Error_Barrier { + __kind: 'Barrier' +} + +export interface V2Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V2Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V2Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V2Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V2Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V2Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V2Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V2Error_MultiLocationFull { + __kind: 'MultiLocationFull' +} + +export interface V2Error_MultiLocationNotInvertible { + __kind: 'MultiLocationNotInvertible' +} + +export interface V2Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V2Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V2Error_Overflow { + __kind: 'Overflow' +} + +export interface V2Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V2Error_Transport { + __kind: 'Transport' +} + +export interface V2Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V2Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V2Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V2Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V2Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V2Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V2Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: bigint +} + +export interface V2Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V2Response = V2Response_Assets | V2Response_ExecutionResult | V2Response_Null | V2Response_Version + +export interface V2Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V2Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V2Error] | undefined) +} + +export interface V2Response_Null { + __kind: 'Null' +} + +export interface V2Response_Version { + __kind: 'Version' + value: number +} + +export interface V1MultiAsset { + id: V1AssetId + fun: V1Fungibility +} + +export type V1Fungibility = V1Fungibility_Fungible | V1Fungibility_NonFungible + +export interface V1Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V1Fungibility_NonFungible { + __kind: 'NonFungible' + value: V1AssetInstance +} + +export type V1AssetInstance = V1AssetInstance_Array16 | V1AssetInstance_Array32 | V1AssetInstance_Array4 | V1AssetInstance_Array8 | V1AssetInstance_Blob | V1AssetInstance_Index | V1AssetInstance_Undefined + +export interface V1AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V1AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V1AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V1AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V1AssetInstance_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface V1AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V1AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V1AssetId = V1AssetId_Abstract | V1AssetId_Concrete + +export interface V1AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V1AssetId_Concrete { + __kind: 'Concrete' + value: V1MultiLocation +} + +export interface V1MultiLocation { + parents: number + interior: V1Junctions +} + +export type V1Junctions = V1Junctions_Here | V1Junctions_X1 | V1Junctions_X2 | V1Junctions_X3 | V1Junctions_X4 | V1Junctions_X5 | V1Junctions_X6 | V1Junctions_X7 | V1Junctions_X8 + +export interface V1Junctions_Here { + __kind: 'Here' +} + +export interface V1Junctions_X1 { + __kind: 'X1' + value: V1Junction +} + +export interface V1Junctions_X2 { + __kind: 'X2' + value: [V1Junction, V1Junction] +} + +export interface V1Junctions_X3 { + __kind: 'X3' + value: [V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X4 { + __kind: 'X4' + value: [V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X5 { + __kind: 'X5' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X6 { + __kind: 'X6' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X7 { + __kind: 'X7' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X8 { + __kind: 'X8' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export type V1Junction = V1Junction_AccountId32 | V1Junction_AccountIndex64 | V1Junction_AccountKey20 | V1Junction_GeneralIndex | V1Junction_GeneralKey | V1Junction_OnlyChild | V1Junction_PalletInstance | V1Junction_Parachain | V1Junction_Plurality + +export interface V1Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V1Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V1Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V1Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V1Junction_GeneralKey { + __kind: 'GeneralKey' + value: Bytes +} + +export interface V1Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V1Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V1Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V1Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0BodyPart = V0BodyPart_AtLeastProportion | V0BodyPart_Fraction | V0BodyPart_Members | V0BodyPart_MoreThanProportion | V0BodyPart_Voice + +export interface V0BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V0BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V0BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Voice { + __kind: 'Voice' +} + +export type V0BodyId = V0BodyId_Executive | V0BodyId_Index | V0BodyId_Judicial | V0BodyId_Legislative | V0BodyId_Named | V0BodyId_Technical | V0BodyId_Unit + +export interface V0BodyId_Executive { + __kind: 'Executive' +} + +export interface V0BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V0BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V0BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V0BodyId_Named { + __kind: 'Named' + value: Bytes +} + +export interface V0BodyId_Technical { + __kind: 'Technical' +} + +export interface V0BodyId_Unit { + __kind: 'Unit' +} + +export type V0NetworkId = V0NetworkId_Any | V0NetworkId_Kusama | V0NetworkId_Named | V0NetworkId_Polkadot + +export interface V0NetworkId_Any { + __kind: 'Any' +} + +export interface V0NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V0NetworkId_Named { + __kind: 'Named' + value: Bytes +} + +export interface V0NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export const V1Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V1Junction, + X2: sts.tuple(() => [V1Junction, V1Junction]), + X3: sts.tuple(() => [V1Junction, V1Junction, V1Junction]), + X4: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction]), + X5: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X6: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X7: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X8: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + } +}) + +export const V1Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.bytes(), + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export const V0BodyId: sts.Type = sts.closedEnum(() => { + return { + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: sts.bytes(), + Technical: sts.unit(), + Unit: sts.unit(), + } +}) + +export const V0NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: sts.bytes(), + Polkadot: sts.unit(), + } +}) + +export const V1MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V1MultiAsset), + Wild: V1WildMultiAsset, + } +}) + +export const V1WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllOf: sts.enumStruct({ + id: V1AssetId, + fun: V1WildFungibility, + }), + } +}) + +export const V1WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V1WildFungibility = V1WildFungibility_Fungible | V1WildFungibility_NonFungible + +export interface V1WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V1WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V1AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V1MultiLocation, + } +}) + +export type V1WildMultiAsset = V1WildMultiAsset_All | V1WildMultiAsset_AllOf + +export interface V1WildMultiAsset_All { + __kind: 'All' +} + +export interface V1WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V1AssetId + fun: V1WildFungibility +} + +export type V1MultiAssetFilter = V1MultiAssetFilter_Definite | V1MultiAssetFilter_Wild + +export interface V1MultiAssetFilter_Definite { + __kind: 'Definite' + value: V1MultiAsset[] +} + +export interface V1MultiAssetFilter_Wild { + __kind: 'Wild' + value: V1WildMultiAsset +} + +export const V1MultiAsset: sts.Type = sts.struct(() => { + return { + id: V1AssetId, + fun: V1Fungibility, + } +}) + +export const V1Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V1AssetInstance, + } +}) + +export const V1AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V2Instruction = V2Instruction_BuyExecution | V2Instruction_ClaimAsset | V2Instruction_ClearError | V2Instruction_ClearOrigin | V2Instruction_DepositAsset | V2Instruction_DepositReserveAsset | V2Instruction_DescendOrigin | V2Instruction_ExchangeAsset | V2Instruction_HrmpChannelAccepted | V2Instruction_HrmpChannelClosing | V2Instruction_HrmpNewChannelOpenRequest | V2Instruction_InitiateReserveWithdraw | V2Instruction_InitiateTeleport | V2Instruction_QueryHolding | V2Instruction_QueryResponse | V2Instruction_ReceiveTeleportedAsset | V2Instruction_RefundSurplus | V2Instruction_ReportError | V2Instruction_ReserveAssetDeposited | V2Instruction_SetAppendix | V2Instruction_SetErrorHandler | V2Instruction_SubscribeVersion | V2Instruction_Transact | V2Instruction_TransferAsset | V2Instruction_TransferReserveAsset | V2Instruction_Trap | V2Instruction_UnsubscribeVersion | V2Instruction_WithdrawAsset + +export interface V2Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface V2Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface V2Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V2Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V2Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V2Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface V2Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V2Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V2Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V2Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V2Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface V2Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface V2Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface V2Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V2Instruction_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface V2Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface V2Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V2Instruction[] +} + +export interface V2Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V2Instruction[] +} + +export interface V2Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V2Instruction_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V2Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V2Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V2Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export type V2WeightLimit = V2WeightLimit_Limited | V2WeightLimit_Unlimited + +export interface V2WeightLimit_Limited { + __kind: 'Limited' + value: bigint +} + +export interface V2WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V1Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: V1Xcm, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + } +}) + +export const V1Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => V1Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type V1Order = V1Order_BuyExecution | V1Order_DepositAsset | V1Order_DepositReserveAsset | V1Order_ExchangeAsset | V1Order_InitiateReserveWithdraw | V1Order_InitiateTeleport | V1Order_Noop | V1Order_QueryHolding + +export interface V1Order_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: V1Xcm[] +} + +export interface V1Order_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V1Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V1Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_Noop { + __kind: 'Noop' +} + +export interface V1Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export const V1Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + Version: sts.number(), + } +}) + +export type V1Response = V1Response_Assets | V1Response_Version + +export interface V1Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V1Response_Version { + __kind: 'Version' + value: number +} + +export type V1Xcm = V1Xcm_HrmpChannelAccepted | V1Xcm_HrmpChannelClosing | V1Xcm_HrmpNewChannelOpenRequest | V1Xcm_QueryResponse | V1Xcm_ReceiveTeleportedAsset | V1Xcm_RelayedFrom | V1Xcm_ReserveAssetDeposited | V1Xcm_SubscribeVersion | V1Xcm_Transact | V1Xcm_TransferAsset | V1Xcm_TransferReserveAsset | V1Xcm_UnsubscribeVersion | V1Xcm_WithdrawAsset + +export interface V1Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V1Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V1Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V1Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface V1Xcm_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: V1Xcm +} + +export interface V1Xcm_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V1Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V1Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V1Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Xcm_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V1Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export const V0Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: V0Xcm, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + } +}) + +export const V0Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => V0Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type V0Order = V0Order_BuyExecution | V0Order_DepositAsset | V0Order_DepositReserveAsset | V0Order_ExchangeAsset | V0Order_InitiateReserveWithdraw | V0Order_InitiateTeleport | V0Order_Null | V0Order_QueryHolding + +export interface V0Order_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: V0Xcm[] +} + +export interface V0Order_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface V0Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_Null { + __kind: 'Null' +} + +export interface V0Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type V0MultiLocation = V0MultiLocation_Null | V0MultiLocation_X1 | V0MultiLocation_X2 | V0MultiLocation_X3 | V0MultiLocation_X4 | V0MultiLocation_X5 | V0MultiLocation_X6 | V0MultiLocation_X7 | V0MultiLocation_X8 + +export interface V0MultiLocation_Null { + __kind: 'Null' +} + +export interface V0MultiLocation_X1 { + __kind: 'X1' + value: V0Junction +} + +export interface V0MultiLocation_X2 { + __kind: 'X2' + value: [V0Junction, V0Junction] +} + +export interface V0MultiLocation_X3 { + __kind: 'X3' + value: [V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X4 { + __kind: 'X4' + value: [V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X5 { + __kind: 'X5' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X6 { + __kind: 'X6' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X7 { + __kind: 'X7' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X8 { + __kind: 'X8' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export type V0Junction = V0Junction_AccountId32 | V0Junction_AccountIndex64 | V0Junction_AccountKey20 | V0Junction_GeneralIndex | V0Junction_GeneralKey | V0Junction_OnlyChild | V0Junction_PalletInstance | V0Junction_Parachain | V0Junction_Parent | V0Junction_Plurality + +export interface V0Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V0Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V0Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V0Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V0Junction_GeneralKey { + __kind: 'GeneralKey' + value: Bytes +} + +export interface V0Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V0Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V0Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V0Junction_Parent { + __kind: 'Parent' +} + +export interface V0Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0MultiAsset = V0MultiAsset_AbstractFungible | V0MultiAsset_AbstractNonFungible | V0MultiAsset_All | V0MultiAsset_AllAbstractFungible | V0MultiAsset_AllAbstractNonFungible | V0MultiAsset_AllConcreteFungible | V0MultiAsset_AllConcreteNonFungible | V0MultiAsset_AllFungible | V0MultiAsset_AllNonFungible | V0MultiAsset_ConcreteFungible | V0MultiAsset_ConcreteNonFungible | V0MultiAsset_None + +export interface V0MultiAsset_AbstractFungible { + __kind: 'AbstractFungible' + id: Bytes + amount: bigint +} + +export interface V0MultiAsset_AbstractNonFungible { + __kind: 'AbstractNonFungible' + class: Bytes + instance: V1AssetInstance +} + +export interface V0MultiAsset_All { + __kind: 'All' +} + +export interface V0MultiAsset_AllAbstractFungible { + __kind: 'AllAbstractFungible' + id: Bytes +} + +export interface V0MultiAsset_AllAbstractNonFungible { + __kind: 'AllAbstractNonFungible' + class: Bytes +} + +export interface V0MultiAsset_AllConcreteFungible { + __kind: 'AllConcreteFungible' + id: V0MultiLocation +} + +export interface V0MultiAsset_AllConcreteNonFungible { + __kind: 'AllConcreteNonFungible' + class: V0MultiLocation +} + +export interface V0MultiAsset_AllFungible { + __kind: 'AllFungible' +} + +export interface V0MultiAsset_AllNonFungible { + __kind: 'AllNonFungible' +} + +export interface V0MultiAsset_ConcreteFungible { + __kind: 'ConcreteFungible' + id: V0MultiLocation + amount: bigint +} + +export interface V0MultiAsset_ConcreteNonFungible { + __kind: 'ConcreteNonFungible' + class: V0MultiLocation + instance: V1AssetInstance +} + +export interface V0MultiAsset_None { + __kind: 'None' +} + +export const V0MultiAsset: sts.Type = sts.closedEnum(() => { + return { + AbstractFungible: sts.enumStruct({ + id: sts.bytes(), + amount: sts.bigint(), + }), + AbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + instance: V1AssetInstance, + }), + All: sts.unit(), + AllAbstractFungible: sts.enumStruct({ + id: sts.bytes(), + }), + AllAbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + }), + AllConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + }), + AllConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + }), + AllFungible: sts.unit(), + AllNonFungible: sts.unit(), + ConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + amount: sts.bigint(), + }), + ConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + instance: V1AssetInstance, + }), + None: sts.unit(), + } +}) + +export const V0MultiLocation: sts.Type = sts.closedEnum(() => { + return { + Null: sts.unit(), + X1: V0Junction, + X2: sts.tuple(() => [V0Junction, V0Junction]), + X3: sts.tuple(() => [V0Junction, V0Junction, V0Junction]), + X4: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction]), + X5: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X6: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X7: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X8: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + } +}) + +export const V0Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.bytes(), + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Parent: sts.unit(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V0MultiAsset), + } +}) + +export type V0Response = V0Response_Assets + +export interface V0Response_Assets { + __kind: 'Assets' + value: V0MultiAsset[] +} + +export type V0Xcm = V0Xcm_HrmpChannelAccepted | V0Xcm_HrmpChannelClosing | V0Xcm_HrmpNewChannelOpenRequest | V0Xcm_QueryResponse | V0Xcm_RelayedFrom | V0Xcm_ReserveAssetDeposit | V0Xcm_TeleportAsset | V0Xcm_Transact | V0Xcm_TransferAsset | V0Xcm_TransferReserveAsset | V0Xcm_WithdrawAsset + +export interface V0Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V0Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V0Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V0Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface V0Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: V0Xcm +} + +export interface V0Xcm_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V0Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export type VersionedXcm = VersionedXcm_V0 | VersionedXcm_V1 | VersionedXcm_V2 + +export interface VersionedXcm_V0 { + __kind: 'V0' + value: V0Xcm +} + +export interface VersionedXcm_V1 { + __kind: 'V1' + value: V1Xcm +} + +export interface VersionedXcm_V2 { + __kind: 'V2' + value: V2Instruction[] +} + +export const V2WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: sts.bigint(), + Unlimited: sts.unit(), + } +}) + +export const VersionedMultiAssets: sts.Type = sts.closedEnum(() => { + return { + V0: sts.array(() => V0MultiAsset), + V1: sts.array(() => V1MultiAsset), + } +}) + +export type VersionedMultiAssets = VersionedMultiAssets_V0 | VersionedMultiAssets_V1 + +export interface VersionedMultiAssets_V0 { + __kind: 'V0' + value: V0MultiAsset[] +} + +export interface VersionedMultiAssets_V1 { + __kind: 'V1' + value: V1MultiAsset[] +} + +export const V1MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V1Junctions, + } +}) + +export const VersionedMultiLocation: sts.Type = sts.closedEnum(() => { + return { + V0: V0MultiLocation, + V1: V1MultiLocation, + } +}) + +export type VersionedMultiLocation = VersionedMultiLocation_V0 | VersionedMultiLocation_V1 + +export interface VersionedMultiLocation_V0 { + __kind: 'V0' + value: V0MultiLocation +} + +export interface VersionedMultiLocation_V1 { + __kind: 'V1' + value: V1MultiLocation +} + +export const Type_531: sts.Type = sts.closedEnum(() => { + return { + V0: Type_532, + V1: Type_537, + V2: sts.array(() => Type_543), + } +}) + +export const Type_543: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => Type_543), + SetErrorHandler: sts.array(() => Type_543), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_536, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const Type_536: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface Type_536 { + encoded: Bytes +} + +export type Type_543 = Type_543_BuyExecution | Type_543_ClaimAsset | Type_543_ClearError | Type_543_ClearOrigin | Type_543_DepositAsset | Type_543_DepositReserveAsset | Type_543_DescendOrigin | Type_543_ExchangeAsset | Type_543_HrmpChannelAccepted | Type_543_HrmpChannelClosing | Type_543_HrmpNewChannelOpenRequest | Type_543_InitiateReserveWithdraw | Type_543_InitiateTeleport | Type_543_QueryHolding | Type_543_QueryResponse | Type_543_ReceiveTeleportedAsset | Type_543_RefundSurplus | Type_543_ReportError | Type_543_ReserveAssetDeposited | Type_543_SetAppendix | Type_543_SetErrorHandler | Type_543_SubscribeVersion | Type_543_Transact | Type_543_TransferAsset | Type_543_TransferReserveAsset | Type_543_Trap | Type_543_UnsubscribeVersion | Type_543_WithdrawAsset + +export interface Type_543_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface Type_543_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface Type_543_ClearError { + __kind: 'ClearError' +} + +export interface Type_543_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_543_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_543_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_543_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface Type_543_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_543_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_543_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_543_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_543_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_543_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_543_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface Type_543_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface Type_543_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface Type_543_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_543_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface Type_543_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface Type_543_SetAppendix { + __kind: 'SetAppendix' + value: Type_543[] +} + +export interface Type_543_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_543[] +} + +export interface Type_543_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_543_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_536 +} + +export interface Type_543_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_543_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_543_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_543_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_543_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export const Type_537: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_539), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: Type_537, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_539), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_536, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_539), + }), + } +}) + +export const Type_539: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => Type_537), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type Type_539 = Type_539_BuyExecution | Type_539_DepositAsset | Type_539_DepositReserveAsset | Type_539_ExchangeAsset | Type_539_InitiateReserveWithdraw | Type_539_InitiateTeleport | Type_539_Noop | Type_539_QueryHolding + +export interface Type_539_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: Type_537[] +} + +export interface Type_539_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_539_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_539_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_539_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface Type_539_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_539_Noop { + __kind: 'Noop' +} + +export interface Type_539_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export type Type_537 = Type_537_HrmpChannelAccepted | Type_537_HrmpChannelClosing | Type_537_HrmpNewChannelOpenRequest | Type_537_QueryResponse | Type_537_ReceiveTeleportedAsset | Type_537_RelayedFrom | Type_537_ReserveAssetDeposited | Type_537_SubscribeVersion | Type_537_Transact | Type_537_TransferAsset | Type_537_TransferReserveAsset | Type_537_UnsubscribeVersion | Type_537_WithdrawAsset + +export interface Type_537_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_537_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_537_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_537_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface Type_537_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: Type_539[] +} + +export interface Type_537_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: Type_537 +} + +export interface Type_537_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: Type_539[] +} + +export interface Type_537_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_537_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_536 +} + +export interface Type_537_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_537_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_537_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_537_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: Type_539[] +} + +export const Type_532: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: Type_532, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_534), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_534), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_536, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_534), + }), + } +}) + +export const Type_534: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => Type_532), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type Type_534 = Type_534_BuyExecution | Type_534_DepositAsset | Type_534_DepositReserveAsset | Type_534_ExchangeAsset | Type_534_InitiateReserveWithdraw | Type_534_InitiateTeleport | Type_534_Null | Type_534_QueryHolding + +export interface Type_534_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: Type_532[] +} + +export interface Type_534_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_534_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_534_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface Type_534_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface Type_534_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_534_Null { + __kind: 'Null' +} + +export interface Type_534_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type Type_532 = Type_532_HrmpChannelAccepted | Type_532_HrmpChannelClosing | Type_532_HrmpNewChannelOpenRequest | Type_532_QueryResponse | Type_532_RelayedFrom | Type_532_ReserveAssetDeposit | Type_532_TeleportAsset | Type_532_Transact | Type_532_TransferAsset | Type_532_TransferReserveAsset | Type_532_WithdrawAsset + +export interface Type_532_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_532_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_532_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_532_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface Type_532_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: Type_532 +} + +export interface Type_532_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: Type_534[] +} + +export interface Type_532_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: Type_534[] +} + +export interface Type_532_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_536 +} + +export interface Type_532_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_532_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_532_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: Type_534[] +} + +export type Type_531 = Type_531_V0 | Type_531_V1 | Type_531_V2 + +export interface Type_531_V0 { + __kind: 'V0' + value: Type_532 +} + +export interface Type_531_V1 { + __kind: 'V1' + value: Type_537 +} + +export interface Type_531_V2 { + __kind: 'V2' + value: Type_543[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type XcmPalletCall = XcmPalletCall_execute | XcmPalletCall_force_default_xcm_version | XcmPalletCall_force_subscribe_version_notify | XcmPalletCall_force_unsubscribe_version_notify | XcmPalletCall_force_xcm_version | XcmPalletCall_limited_reserve_transfer_assets | XcmPalletCall_limited_teleport_assets | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets + +/** + * Execute an XCM message from a local, signed, origin. + * + * An event is deposited indicating whether `msg` could be executed completely or only + * partially. + * + * No more than `max_weight` will be used in its attempted execution. If this is less than the + * maximum amount of weight that the message could take to be executed, then no execution + * attempt will be made. + * + * NOTE: A successful return to this does *not* imply that the `msg` was executed successfully + * to completion; only that *some* of it was executed. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Type_531 + maxWeight: bigint +} + +/** + * Set a safe XCM version (the version that XCM should be encoded with if the most recent + * version a destination can accept is unknown). + * + * - `origin`: Must be Root. + * - `maybe_xcm_version`: The default XCM encoding version, or `None` to disable. + */ +export interface XcmPalletCall_force_default_xcm_version { + __kind: 'force_default_xcm_version' + maybeXcmVersion?: (number | undefined) +} + +/** + * Ask a location to notify us regarding their XCM version and any changes to it. + * + * - `origin`: Must be Root. + * - `location`: The location to which we should subscribe for XCM version notifications. + */ +export interface XcmPalletCall_force_subscribe_version_notify { + __kind: 'force_subscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Require that a particular destination should no longer notify us regarding any XCM + * version changes. + * + * - `origin`: Must be Root. + * - `location`: The location to which we are currently subscribed for XCM version + * notifications which we no longer desire. + */ +export interface XcmPalletCall_force_unsubscribe_version_notify { + __kind: 'force_unsubscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Extoll that a particular destination can be communicated with through a particular + * version of XCM. + * + * - `origin`: Must be Root. + * - `location`: The destination that is being described. + * - `xcm_version`: The latest version of XCM that `location` supports. + */ +export interface XcmPalletCall_force_xcm_version { + __kind: 'force_xcm_version' + location: V1MultiLocation + xcmVersion: number +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination chain and forward + * a notification XCM. + * + * Fee payment on the destination side is made from the first asset listed in the `assets` vector. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_reserve_transfer_assets { + __kind: 'limited_reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the first asset listed in the `assets` vector. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_teleport_assets { + __kind: 'limited_teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination chain and forward + * a notification XCM. + * + * Fee payment on the destination side is made from the first asset listed in the `assets` vector and + * fee-weight is calculated locally and thus remote weights are assumed to be equal to + * local weights. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +export interface XcmPalletCall_send { + __kind: 'send' + dest: VersionedMultiLocation + message: VersionedXcm +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the first asset listed in the `assets` vector and + * fee-weight is calculated locally and thus remote weights are assumed to be equal to + * local weights. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: MultiAddress, + target: MultiAddress, + schedule: VestingInfo, + }), + merge_schedules: sts.enumStruct({ + schedule1Index: sts.number(), + schedule2Index: sts.number(), + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: MultiAddress, + }), + vested_transfer: sts.enumStruct({ + target: MultiAddress, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: sts.bigint(), + perBlock: sts.bigint(), + startingBlock: sts.number(), + } +}) + +export interface VestingInfo { + locked: bigint + perBlock: bigint + startingBlock: number +} + +export const MultiAddress: sts.Type = sts.closedEnum(() => { + return { + Address20: sts.bytes(), + Address32: sts.bytes(), + Id: AccountId32, + Index: sts.unit(), + Raw: sts.bytes(), + } +}) + +export type MultiAddress = MultiAddress_Address20 | MultiAddress_Address32 | MultiAddress_Id | MultiAddress_Index | MultiAddress_Raw + +export interface MultiAddress_Address20 { + __kind: 'Address20' + value: Bytes +} + +export interface MultiAddress_Address32 { + __kind: 'Address32' + value: Bytes +} + +export interface MultiAddress_Id { + __kind: 'Id' + value: AccountId32 +} + +export interface MultiAddress_Index { + __kind: 'Index' +} + +export interface MultiAddress_Raw { + __kind: 'Raw' + value: Bytes +} + +export type AccountId32 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_merge_schedules | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: MultiAddress + target: MultiAddress + schedule: VestingInfo +} + +/** + * Merge two vesting schedules together, creating a new vesting schedule that unlocks over + * the highest possible start and end blocks. If both schedules have already started the + * current block will be used as the schedule start; with the caveat that if one schedule + * is finished by the current block, the other will be treated as the new merged schedule, + * unmodified. + * + * NOTE: If `schedule1_index == schedule2_index` this is a no-op. + * NOTE: This will unlock all schedules through the current block prior to merging. + * NOTE: If both schedules have ended by the current block, no new schedule will be created + * and both will be removed. + * + * Merged schedule attributes: + * - `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block, + * current_block)`. + * - `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`. + * - `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`. + * + * The dispatch origin for this call must be _Signed_. + * + * - `schedule1_index`: index of the first schedule to merge. + * - `schedule2_index`: index of the second schedule to merge. + */ +export interface VestingCall_merge_schedules { + __kind: 'merge_schedules' + schedule1Index: number + schedule2Index: number +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: MultiAddress +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account receiving the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: MultiAddress + schedule: VestingInfo +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Call, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Call), + }), + dispatch_as: sts.enumStruct({ + asOrigin: OriginCaller, + call: Call, + }), + } +}) + +export const OriginCaller: sts.Type = sts.closedEnum(() => { + return { + Council: Type_323, + ParachainsOrigin: Origin, + TechnicalCommittee: Type_324, + Void: Void, + XcmPallet: Type_326, + system: RawOrigin, + } +}) + +export const RawOrigin: sts.Type = sts.closedEnum(() => { + return { + None: sts.unit(), + Root: sts.unit(), + Signed: AccountId32, + } +}) + +export type RawOrigin = RawOrigin_None | RawOrigin_Root | RawOrigin_Signed + +export interface RawOrigin_None { + __kind: 'None' +} + +export interface RawOrigin_Root { + __kind: 'Root' +} + +export interface RawOrigin_Signed { + __kind: 'Signed' + value: AccountId32 +} + +export const Type_326: sts.Type = sts.closedEnum(() => { + return { + Response: V1MultiLocation, + Xcm: V1MultiLocation, + } +}) + +export type Type_326 = Type_326_Response | Type_326_Xcm + +export interface Type_326_Response { + __kind: 'Response' + value: V1MultiLocation +} + +export interface Type_326_Xcm { + __kind: 'Xcm' + value: V1MultiLocation +} + +export const Void: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Void = never + +export const Type_324: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_324 = Type_324_Member | Type_324_Members | Type_324__Phantom + +export interface Type_324_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_324_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_324__Phantom { + __kind: '_Phantom' +} + +export const Origin: sts.Type = sts.closedEnum(() => { + return { + Parachain: Id, + } +}) + +export const Id = sts.number() + +export type Origin = Origin_Parachain + +export interface Origin_Parachain { + __kind: 'Parachain' + value: Id +} + +export type Id = number + +export const Type_323: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_323 = Type_323_Member | Type_323_Members | Type_323__Phantom + +export interface Type_323_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_323_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_323__Phantom { + __kind: '_Phantom' +} + +export type OriginCaller = OriginCaller_Council | OriginCaller_ParachainsOrigin | OriginCaller_TechnicalCommittee | OriginCaller_Void | OriginCaller_XcmPallet | OriginCaller_system + +export interface OriginCaller_Council { + __kind: 'Council' + value: Type_323 +} + +export interface OriginCaller_ParachainsOrigin { + __kind: 'ParachainsOrigin' + value: Origin +} + +export interface OriginCaller_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: Type_324 +} + +export interface OriginCaller_Void { + __kind: 'Void' + value: Void +} + +export interface OriginCaller_XcmPallet { + __kind: 'XcmPallet' + value: Type_326 +} + +export interface OriginCaller_system { + __kind: 'system' + value: RawOrigin +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all | UtilityCall_dispatch_as + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Call +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Call[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Call[] +} + +/** + * Dispatches a function call with a provided origin. + * + * The dispatch origin for this call must be _Root_. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB write (event). + * - Weight of derivative `call` execution + T::WeightInfo::dispatch_as(). + * # + */ +export interface UtilityCall_dispatch_as { + __kind: 'dispatch_as' + asOrigin: OriginCaller + call: Call +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UmpCall: sts.Type = sts.closedEnum(() => { + return { + service_overweight: sts.enumStruct({ + index: sts.bigint(), + weightLimit: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UmpCall = UmpCall_service_overweight + +/** + * Service a single overweight upward message. + * + * - `origin`: Must pass `ExecuteOverweightOrigin`. + * - `index`: The index of the overweight message to service. + * - `weight_limit`: The amount of weight that message execution may take. + * + * Errors: + * - `UnknownMessageIndex`: Message of `index` is unknown. + * - `WeightOverLimit`: Message execution may use greater than `weight_limit`. + * + * Events: + * - `OverweightServiced`: On success. + */ +export interface UmpCall_service_overweight { + __kind: 'service_overweight' + index: bigint + weightLimit: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: MultiAddress, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: MultiAddress +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TipsCall: sts.Type = sts.closedEnum(() => { + return { + close_tip: sts.enumStruct({ + hash: H256, + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId32, + }), + retract_tip: sts.enumStruct({ + hash: H256, + }), + slash_tip: sts.enumStruct({ + hash: H256, + }), + tip: sts.enumStruct({ + hash: H256, + tipValue: sts.bigint(), + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId32, + tipValue: sts.bigint(), + }), + } +}) + +export const H256 = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TipsCall = TipsCall_close_tip | TipsCall_report_awesome | TipsCall_retract_tip | TipsCall_slash_tip | TipsCall_tip | TipsCall_tip_new + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost + * depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TipsCall_close_tip { + __kind: 'close_tip' + hash: H256 +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId32 +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TipsCall_retract_tip { + __kind: 'retract_tip' + hash: H256 +} + +/** + * Remove and slash an already-open tip. + * + * May only be called from `T::RejectOrigin`. + * + * As a result, the finder is slashed and the deposits are lost. + * + * Emits `TipSlashed` if successful. + * + * # + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * # + */ +export interface TipsCall_slash_tip { + __kind: 'slash_tip' + hash: H256 +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`, insert tip and check closing, `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TipsCall_tip { + __kind: 'tip' + hash: H256 + tipValue: bigint +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of + * `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId32 + tipValue: bigint +} + +export type H256 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in + * `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId32, + }), + change_key: sts.enumStruct({ + new: AccountId32, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId32, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId32), + }), + set_prime: sts.enumStruct({ + who: AccountId32, + }), + swap_member: sts.enumStruct({ + remove: AccountId32, + add: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId32 +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId32 +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId32 +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId32[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId32 +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId32 + add: AccountId32 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: sts.bytes(), + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => sts.bytes()), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + }), + } +}) + +export const Perbill = sts.number() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Bytes + subkeys: number +} + +/** + * Kill some items from storage. + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Bytes[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Make some on-chain remark and emit event. + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is + * expensive). + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very + * expensive. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full + * block. # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: [Bytes, Bytes][] +} + +export type Perbill = number + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: MultiAddress, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: sts.number(), + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + controller: AccountId32, + }), + force_apply_min_commission: sts.enumStruct({ + validatorStash: AccountId32, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => MultiAddress), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => MultiAddress), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + }), + reap_stash: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: MultiAddress, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId32), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_staking_configs: sts.enumStruct({ + minNominatorBond: sts.bigint(), + minValidatorBond: sts.bigint(), + maxNominatorCount: sts.option(() => sts.number()), + maxValidatorCount: sts.option(() => sts.number()), + chillThreshold: sts.option(() => Percent), + minCommission: Perbill, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export const Percent = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_force_apply_min_commission | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_staking_configs | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: MultiAddress + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose + * any limitation on the amount that can be added. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: number + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Declare a `controller` to stop participating as either a validator or nominator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_, but can be called by anyone. + * + * If the caller is the same as the controller being targeted, then no further checks are + * enforced, and this function behaves just like `chill`. + * + * If the caller is different than the controller being targeted, the following conditions + * must be met: + * + * * `controller` must belong to a nominator who has become non-decodable, + * + * Or: + * + * * A `ChillThreshold` must be set and checked which defines how close to the max + * nominators or validators we must reach before users can start chilling one-another. + * * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine + * how close we are to the threshold. + * * A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines + * if this is a person that should be chilled because they have not met the threshold + * bond required. + * + * This can be helpful if bond requirements are updated, and we need to remove old users + * who do not satisfy these requirements. + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + controller: AccountId32 +} + +/** + * Force a validator to have at least the minimum commission. This will not affect a + * validator who already has a commission greater than or equal to the minimum. Any account + * can call this. + */ +export interface StakingCall_force_apply_min_commission { + __kind: 'force_apply_min_commission' + validatorStash: AccountId32 +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * Thus the election process may be ongoing when this is called. In this case the + * election will continue until the next era is triggered. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: MultiAddress[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (T::MaxNominations). + * - Both the reads and writes follow a similar pattern. + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: MultiAddress[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId32 + era: number +} + +/** + * Remove all data structures concerning a staker/stash once it is at a state where it can + * be considered `dust` in the staking system. The requirements are: + * + * 1. the `total_balance` of the stash is below existential deposit. + * 2. or, the `ledger.total` of the stash is below existential deposit. + * + * The former can happen in cases like a slash; the latter when a fully unbonded account + * is still receiving staking rewards in `RewardDestination::Staked`. + * + * It can be called by anyone, as long as `stash` meets the above requirements. + * + * Refunds the transaction fees upon successful execution. + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MAX_UNLOCKING_CHUNKS`. + * - Storage changes: Can't increase storage, only decrease it. + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: MultiAddress +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. This + * should report all the storage items that will be deleted by clearing old era history. + * Needed to report an accurate weight for the dispatch. Trusted by `Root` to report an + * accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Weight: O(E) + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, + * ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId32[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Update the various staking configurations . + * + * * `min_nominator_bond`: The minimum active bond needed to be a nominator. + * * `min_validator_bond`: The minimum active bond needed to be a validator. + * * `max_nominator_count`: The max number of users who can be a nominator at once. When + * set to `None`, no limit is enforced. + * * `max_validator_count`: The max number of users who can be a validator at once. When + * set to `None`, no limit is enforced. + * * `chill_threshold`: The ratio of `max_nominator_count` or `max_validator_count` which + * should be filled in order for the `chill_other` transaction to work. + * * `min_commission`: The minimum amount of commission that each validators must maintain. + * This is checked only upon calling `validate`. Existing validators are not affected. + * + * Origin must be Root to call this function. + * + * NOTE: Existing nominators and validators will not be affected by this update. + * to kick people under the new limits, `chill_other` should be called. + */ +export interface StakingCall_set_staking_configs { + __kind: 'set_staking_configs' + minNominatorBond: bigint + minValidatorBond: bigint + maxNominatorCount?: (number | undefined) + maxValidatorCount?: (number | undefined) + chillThreshold?: (Percent | undefined) + minCommission: Perbill +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * If a user encounters the `InsufficientBond` error when calling this extrinsic, + * they should call `chill` first in order to free up their bonded funds. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * Complexity O(S) where S is the number of slashing spans to remove + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +export type Percent = number + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: sts.bigint(), + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId32, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId32, + judgement: Type_369, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId32, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: MultiAddress, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId32, + value: sts.bigint(), + tip: sts.bigint(), + }), + } +}) + +export const Type_369: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export type Type_369 = Type_369_Approve | Type_369_Rebid | Type_369_Reject + +export interface Type_369_Approve { + __kind: 'Approve' +} + +export interface Type_369_Rebid { + __kind: 'Rebid' +} + +export interface Type_369_Reject { + __kind: 'Reject' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: bigint +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * pallet to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId32 + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId32 + judgement: Type_369 +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin forgives + * (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to + * society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId32 + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured + * payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be approved (`true`) or + * rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: MultiAddress + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId32 + value: bigint + tip: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: Id, + }), + force_lease: sts.enumStruct({ + para: Id, + leaser: AccountId32, + amount: sts.bigint(), + periodBegin: sts.number(), + periodCount: sts.number(), + }), + trigger_onboard: sts.enumStruct({ + para: Id, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * Clear all leases for a Para Id, refunding any deposits back to the original owners. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: Id +} + +/** + * Just a connect into the `lease_out` call, in case Root wants to force some lease to happen + * independently of any other on-chain mechanism to use it. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: Id + leaser: AccountId32 + amount: bigint + periodBegin: number + periodCount: number +} + +/** + * Try to onboard a parachain that has a lease for the current lease period. + * + * This function can be useful if there was some state issue with a para that should + * have onboarded, but was unable to. As long as they have a lease period, we can + * let them onboard from here. + * + * Origin must be signed, but can be called by anyone. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: SessionKeys, + proof: sts.bytes(), + }), + } +}) + +export const SessionKeys: sts.Type = sts.struct(() => { + return { + grandpa: Public, + babe: sts.bytes(), + imOnline: sts.bytes(), + paraValidator: sts.bytes(), + paraAssignment: V1Public, + authorityDiscovery: sts.bytes(), + } +}) + +export const V1Public = sts.bytes() + +export const Public = sts.bytes() + +export interface SessionKeys { + grandpa: Public + babe: Bytes + imOnline: Bytes + paraValidator: Bytes + paraAssignment: V1Public + authorityDiscovery: Bytes +} + +export type V1Public = Bytes + +export type Public = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be Signed and the account must be either be + * convertible to a validator ID using the chain's typical addressing system (this usually + * means being a controller account) or directly convertible into a validator ID (which + * usually means being a stash account). + * + * # + * - Complexity: `O(1)` in number of key types. Actual cost depends on the number of length + * of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)`. Actual cost depends on the number of length of + * `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: SessionKeys + proof: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: sts.number(), + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + schedule_after: sts.enumStruct({ + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + } +}) + +export const MaybeHashed: sts.Type = sts.closedEnum(() => { + return { + Hash: H256, + Value: Call, + } +}) + +export type MaybeHashed = MaybeHashed_Hash | MaybeHashed_Value + +export interface MaybeHashed_Hash { + __kind: 'Hash' + value: H256 +} + +export interface MaybeHashed_Value { + __kind: 'Value' + value: Call +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: number + index: number +} + +/** + * Cancel a named scheduled task. + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Schedule a named task. + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`](Self::schedule_named). + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + deregister: sts.enumStruct({ + id: Id, + }), + force_register: sts.enumStruct({ + who: AccountId32, + deposit: sts.bigint(), + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + force_remove_lock: sts.enumStruct({ + para: Id, + }), + register: sts.enumStruct({ + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + reserve: sts.unit(), + swap: sts.enumStruct({ + id: Id, + other: Id, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RegistrarCall = RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_force_remove_lock | RegistrarCall_register | RegistrarCall_reserve | RegistrarCall_swap + +/** + * Deregister a Para Id, freeing all data and returning any deposit. + * + * The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: Id +} + +/** + * Force the registration of a Para Id on the relay chain. + * + * This function must be called by a Root origin. + * + * The deposit taken can be specified for this registration. Any `ParaId` + * can be registered, including sub-1000 IDs which are System Parachains. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId32 + deposit: bigint + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Remove a manager lock from a para. This will allow the manager of a + * previously locked para to deregister or swap a para without using governance. + * + * Can only be called by the Root origin. + */ +export interface RegistrarCall_force_remove_lock { + __kind: 'force_remove_lock' + para: Id +} + +/** + * Register head data and validation code for a reserved Para Id. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. + * - `id`: The para ID. Must be owned/managed by the `origin` signing account. + * - `genesis_head`: The genesis head data of the parachain/thread. + * - `validation_code`: The initial validation code of the parachain/thread. + * + * ## Deposits/Fees + * The origin signed account must reserve a corresponding deposit for the registration. Anything already + * reserved previously for this para ID is accounted for. + * + * ## Events + * The `Registered` event is emitted in case of success. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Reserve a Para Id on the relay chain. + * + * This function will reserve a new Para Id to be owned/managed by the origin account. + * The origin account is able to register head data and validation code using `register` to create + * a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID. + * + * ## Deposits/Fees + * The origin must reserve a deposit of `ParaDeposit` for the registration. + * + * ## Events + * The `Reserved` event is emitted in case of success, which provides the ID reserved for use. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * Swap a parachain with another parachain or parathread. + * + * The origin must be Root, the `para` owner, or the `para` itself. + * + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: Id + other: Id +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId32, + call: Call, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId32, + }), + claim_recovery: sts.enumStruct({ + account: AccountId32, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId32, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId32), + threshold: sts.number(), + delayPeriod: sts.number(), + }), + initiate_recovery: sts.enumStruct({ + account: AccountId32, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId32, + rescuer: AccountId32, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId32, + rescuer: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + * + * # + * - The weight of the `call` + 10,000. + * - One storage lookup to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId32 + call: Call +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + * + * # + * - One storage mutation to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId32 +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully recovered by + * you. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + V) + * # + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId32 +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + * + * # + * Key: V (len of vouching friends) + * - One storage read/remove to get the active recovery process. O(1), Codec O(V) + * - One balance call to repatriate reserved. O(X) + * - One event. + * + * Total Complexity: O(V + X) + * # + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId32 +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. Should be + * ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt before the + * account can be recovered. Should be less than or equal to the length of the list of + * friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized that + * needs to pass before the account can be recovered. + * + * # + * - Key: F (len of friends) + * - One storage read to check that account is not already recoverable. O(1). + * - A check that the friends list is sorted and unique. O(F) + * - One currency reserve operation. O(X) + * - One storage write. O(1). Codec O(F). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId32[] + threshold: number + delayPeriod: number +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account needs to be + * recoverable (i.e. have a recovery configuration). + * + * # + * - One storage read to check that account is recoverable. O(F) + * - One storage read to check that this recovery process hasn't already started. O(1) + * - One currency reserve operation. O(X) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId32 +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + * + * # + * Key: F (len of friends) + * - One storage read to get the prefix iterator for active recoveries. O(1) + * - One storage read/remove to get the recovery configuration. O(1), Codec O(F) + * - One balance call to unreserved. O(X) + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + * + * # + * - One storage write O(1) + * - One event + * # + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId32 + rescuer: AccountId32 +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One binary search to confirm caller is a friend. O(logF) + * - One binary search to confirm caller has not already vouched. O(logV) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + logF + V + logV) + * # + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId32 + rescuer: AccountId32 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: AccountId32, + proxyType: ProxyType, + delay: sts.number(), + }), + announce: sts.enumStruct({ + real: AccountId32, + callHash: H256, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + delay: sts.number(), + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId32, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId32, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + proxy_announced: sts.enumStruct({ + delegate: AccountId32, + real: AccountId32, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + reject_announcement: sts.enumStruct({ + delegate: AccountId32, + callHash: H256, + }), + remove_announcement: sts.enumStruct({ + real: AccountId32, + callHash: H256, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: AccountId32, + proxyType: ProxyType, + delay: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: AccountId32 + proxyType: ProxyType + delay: number +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: AccountId32 + callHash: H256 +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + * TODO: Might be over counting 1 read + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: number + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId32 + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId32 + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Dispatch the given `call` from an account that the sender is authorized for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: AccountId32 + real: AccountId32 + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: AccountId32 + callHash: H256 +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: AccountId32 + callHash: H256 +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: AccountId32 + proxyType: ProxyType + delay: number +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PreimageCall: sts.Type = sts.closedEnum(() => { + return { + note_preimage: sts.enumStruct({ + bytes: sts.bytes(), + }), + request_preimage: sts.enumStruct({ + hash: H256, + }), + unnote_preimage: sts.enumStruct({ + hash: H256, + }), + unrequest_preimage: sts.enumStruct({ + hash: H256, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PreimageCall = PreimageCall_note_preimage | PreimageCall_request_preimage | PreimageCall_unnote_preimage | PreimageCall_unrequest_preimage + +/** + * Register a preimage on-chain. + * + * If the preimage was previously requested, no fees or deposits are taken for providing + * the preimage. Otherwise, a deposit is taken proportional to the size of the preimage. + */ +export interface PreimageCall_note_preimage { + __kind: 'note_preimage' + bytes: Bytes +} + +/** + * Request a preimage be uploaded to the chain without paying any fees or deposits. + * + * If the preimage requests has already been provided on-chain, we unreserve any deposit + * a user may have paid, and take the control of the preimage out of their hands. + */ +export interface PreimageCall_request_preimage { + __kind: 'request_preimage' + hash: H256 +} + +/** + * Clear an unrequested preimage from the runtime storage. + */ +export interface PreimageCall_unnote_preimage { + __kind: 'unnote_preimage' + hash: H256 +} + +/** + * Clear a previously made request for a preimage. + * + * NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. + */ +export interface PreimageCall_unrequest_preimage { + __kind: 'unrequest_preimage' + hash: H256 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PhragmenElectionCall: sts.Type = sts.closedEnum(() => { + return { + clean_defunct_voters: sts.enumStruct({ + numVoters: sts.number(), + numDefunct: sts.number(), + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + hasReplacement: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId32), + value: sts.bigint(), + }), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PhragmenElectionCall = PhragmenElectionCall_clean_defunct_voters | PhragmenElectionCall_remove_member | PhragmenElectionCall_remove_voter | PhragmenElectionCall_renounce_candidacy | PhragmenElectionCall_submit_candidacy | PhragmenElectionCall_vote + +/** + * Clean all voters who are defunct (i.e. they do not serve any purpose at all). The + * deposit of the removed voters are returned. + * + * This is an root function to be used only for cleaning the state. + * + * The dispatch origin of this call must be root. + * + * # + * The total number of voters and those that are defunct must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_clean_defunct_voters { + __kind: 'clean_defunct_voters' + numVoters: number + numDefunct: number +} + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, a new phragmen election is started. + * + * The dispatch origin of this call must be root. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement, we use a small weight. Else, since this is a root call and + * will go into phragmen, we assume full block for now. + * # + */ +export interface PhragmenElectionCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + hasReplacement: boolean +} + +/** + * Remove `origin` as a voter. + * + * This removes the lock and returns the deposit. + * + * The dispatch origin of this call must be signed and be a voter. + */ +export interface PhragmenElectionCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * + * - `origin` is a candidate and not elected in any set. In this case, the deposit is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the deposit is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the deposit is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_member`](Self::remove_member), if replacement runners exists, they + * are immediately used. If the prime is renouncing, then no prime will exist until the + * next round. + * + * The dispatch origin of this call must be signed, and have one of the above roles. + * + * # + * The type of renouncing must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Submit oneself for candidacy. A fixed amount of deposit is recorded. + * + * All candidates are wiped at the end of the term. They either become a member/runner-up, + * or leave the system while their deposit is slashed. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`] + * to get their deposit back. Losing the spot in an election will always lead to a slash. + * + * # + * The number of current candidates must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is + * reserved. The deposit is based on the number of votes and can be updated over time. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * If `value` is more than `who`'s free balance, then the maximum of the two is used. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * It is the responsibility of the caller to **NOT** place all of their balance into the + * lock and keep some for further operations. + * + * # + * We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less. + * # + */ +export interface PhragmenElectionCall_vote { + __kind: 'vote' + votes: AccountId32[] + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasSharedCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasDisputesCall: sts.Type = sts.closedEnum(() => { + return { + force_unfreeze: sts.unit(), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasDisputesCall = ParasDisputesCall_force_unfreeze + +export interface ParasDisputesCall_force_unfreeze { + __kind: 'force_unfreeze' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + add_trusted_validation_code: sts.enumStruct({ + validationCode: ValidationCode, + }), + force_note_new_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: Id, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + relayParentNumber: sts.number(), + }), + force_set_current_code: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + include_pvf_check_statement: sts.enumStruct({ + stmt: V2PvfCheckStatement, + signature: sts.bytes(), + }), + poke_unused_validation_code: sts.enumStruct({ + validationCodeHash: ValidationCodeHash, + }), + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const V2PvfCheckStatement: sts.Type = sts.struct(() => { + return { + accept: sts.boolean(), + subject: ValidationCodeHash, + sessionIndex: sts.number(), + validatorIndex: V0ValidatorIndex, + } +}) + +export const V0ValidatorIndex = sts.number() + +export interface V2PvfCheckStatement { + accept: boolean + subject: ValidationCodeHash + sessionIndex: number + validatorIndex: V0ValidatorIndex +} + +export type V0ValidatorIndex = number + +export type ValidationCodeHash = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasCall = ParasCall_add_trusted_validation_code | ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head | ParasCall_include_pvf_check_statement | ParasCall_poke_unused_validation_code + +/** + * Adds the validation code to the storage. + * + * The code will not be added if it is already present. Additionally, if PVF pre-checking + * is running for that code, it will be instantly accepted. + * + * Otherwise, the code will be added into the storage. Note that the code will be added + * into storage with reference count 0. This is to account the fact that there are no users + * for this code yet. The caller will have to make sure that this code eventually gets + * used by some parachain or removed from the storage to avoid storage leaks. For the latter + * prefer to use the `poke_unused_validation_code` dispatchable to raw storage manipulation. + * + * This function is mainly meant to be used for upgrading parachains that do not follow + * the go-ahead signal while the PVF pre-checking feature is enabled. + */ +export interface ParasCall_add_trusted_validation_code { + __kind: 'add_trusted_validation_code' + validationCode: ValidationCode +} + +/** + * Note a new block head for para within the context of the current block. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: Id + newHead: HeadData +} + +/** + * Put a parachain directly into the next session's action queue. + * We can't queue it any sooner than this without going into the + * initializer... + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: Id +} + +/** + * Schedule an upgrade as if it was scheduled in the given relay parent block. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: Id + newCode: ValidationCode + relayParentNumber: number +} + +/** + * Set the storage for the parachain validation code immediately. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: Id + newCode: ValidationCode +} + +/** + * Set the storage for the current parachain head data immediately. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: Id + newHead: HeadData +} + +/** + * Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and + * enacts the results if that was the last vote before achieving the supermajority. + */ +export interface ParasCall_include_pvf_check_statement { + __kind: 'include_pvf_check_statement' + stmt: V2PvfCheckStatement + signature: Bytes +} + +/** + * Remove the validation code from the storage iff the reference count is 0. + * + * This is better than removing the storage directly, because it will not remove the code + * that was suddenly got used by some parachain while this dispatchable was pending + * dispatching. + */ +export interface ParasCall_poke_unused_validation_code { + __kind: 'poke_unused_validation_code' + validationCodeHash: ValidationCodeHash +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: V1InherentData, + }), + } +}) + +export const V1InherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => V1UncheckedSigned), + backedCandidates: sts.array(() => V1BackedCandidate), + disputes: sts.array(() => V1DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: H256, + number: sts.number(), + stateRoot: H256, + extrinsicsRoot: H256, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + Consensus: sts.tuple(() => [sts.bytes(), sts.bytes()]), + Other: sts.bytes(), + PreRuntime: sts.tuple(() => [sts.bytes(), sts.bytes()]), + RuntimeEnvironmentUpdated: sts.unit(), + Seal: sts.tuple(() => [sts.bytes(), sts.bytes()]), + } +}) + +export type DigestItem = DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: [Bytes, Bytes] +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: [Bytes, Bytes] +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: [Bytes, Bytes] +} + +export interface Digest { + logs: DigestItem[] +} + +export interface Header { + parentHash: H256 + number: number + stateRoot: H256 + extrinsicsRoot: H256 + digest: Digest +} + +export const V1DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: sts.number(), + statements: sts.array(() => sts.tuple(() => [V1DisputeStatement, V0ValidatorIndex, sts.bytes()])), + } +}) + +export const V1DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: V1InvalidDisputeStatementKind, + Valid: V1ValidDisputeStatementKind, + } +}) + +export const V1ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + BackingSeconded: H256, + BackingValid: H256, + Explicit: sts.unit(), + } +}) + +export type V1ValidDisputeStatementKind = V1ValidDisputeStatementKind_ApprovalChecking | V1ValidDisputeStatementKind_BackingSeconded | V1ValidDisputeStatementKind_BackingValid | V1ValidDisputeStatementKind_Explicit + +export interface V1ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface V1ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: H256 +} + +export interface V1ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: H256 +} + +export interface V1ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export const V1InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export type V1InvalidDisputeStatementKind = V1InvalidDisputeStatementKind_Explicit + +export interface V1InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type V1DisputeStatement = V1DisputeStatement_Invalid | V1DisputeStatement_Valid + +export interface V1DisputeStatement_Invalid { + __kind: 'Invalid' + value: V1InvalidDisputeStatementKind +} + +export interface V1DisputeStatement_Valid { + __kind: 'Valid' + value: V1ValidDisputeStatementKind +} + +export const CandidateHash = sts.bytes() + +export interface V1DisputeStatementSet { + candidateHash: CandidateHash + session: number + statements: [V1DisputeStatement, V0ValidatorIndex, Bytes][] +} + +export type CandidateHash = Bytes + +export const V1BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: V1CommittedCandidateReceipt, + validityVotes: sts.array(() => V0ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const V0ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.bytes(), + Implicit: sts.bytes(), + } +}) + +export type V0ValidityAttestation = V0ValidityAttestation_Explicit | V0ValidityAttestation_Implicit + +export interface V0ValidityAttestation_Explicit { + __kind: 'Explicit' + value: Bytes +} + +export interface V0ValidityAttestation_Implicit { + __kind: 'Implicit' + value: Bytes +} + +export const V1CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: V1CandidateDescriptor, + commitments: V1CandidateCommitments, + } +}) + +export const V1CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => sts.bytes()), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: sts.number(), + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: Id, + data: sts.bytes(), + } +}) + +export interface OutboundHrmpMessage { + recipient: Id + data: Bytes +} + +export interface V1CandidateCommitments { + upwardMessages: Bytes[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: number +} + +export const V1CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: Id, + relayParent: H256, + collator: V0Public, + persistedValidationDataHash: H256, + povHash: H256, + erasureRoot: H256, + signature: V0Signature, + paraHead: H256, + validationCodeHash: ValidationCodeHash, + } +}) + +export const V0Signature = sts.bytes() + +export const V0Public = sts.bytes() + +export interface V1CandidateDescriptor { + paraId: Id + relayParent: H256 + collator: V0Public + persistedValidationDataHash: H256 + povHash: H256 + erasureRoot: H256 + signature: V0Signature + paraHead: H256 + validationCodeHash: ValidationCodeHash +} + +export type V0Signature = Bytes + +export type V0Public = Bytes + +export interface V1CommittedCandidateReceipt { + descriptor: V1CandidateDescriptor + commitments: V1CandidateCommitments +} + +export interface V1BackedCandidate { + candidate: V1CommittedCandidateReceipt + validityVotes: V0ValidityAttestation[] + validatorIndices: BitSequence +} + +export const V1UncheckedSigned: sts.Type = sts.struct(() => { + return { + payload: V1AvailabilityBitfield, + validatorIndex: V0ValidatorIndex, + signature: sts.bytes(), + } +}) + +export const V1AvailabilityBitfield = sts.bitseq() + +export interface V1UncheckedSigned { + payload: V1AvailabilityBitfield + validatorIndex: V0ValidatorIndex + signature: Bytes +} + +export type V1AvailabilityBitfield = BitSequence + +export interface V1InherentData { + bitfields: V1UncheckedSigned[] + backedCandidates: V1BackedCandidate[] + disputes: V1DisputeStatementSet[] + parentHeader: Header +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInherentCall = ParaInherentCall_enter + +/** + * Enter the paras inherent. This will process bitfields and backed candidates. + */ +export interface ParaInherentCall_enter { + __kind: 'enter' + data: V1InherentData +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInclusionCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: sts.bigint(), + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + call: sts.bytes(), + storeCall: sts.boolean(), + maxWeight: sts.bigint(), + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId32), + call: Call, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: sts.number(), + index: sts.number(), + } +}) + +export interface Timepoint { + height: number + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: bigint +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + call: Bytes + storeCall: boolean + maxWeight: bigint +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId32[] + call: Call +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId32[] + timepoint: Timepoint + callHash: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const InitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type InitializerCall = InitializerCall_force_approve + +/** + * Issue a signal to the consensus engine to forcibly act as though all parachain + * blocks in all relay chain blocks up to and including the given number in the current + * chain are valid and should be finalized. + */ +export interface InitializerCall_force_approve { + __kind: 'force_approve' + upTo: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: sts.number(), + }), + force_transfer: sts.enumStruct({ + new: AccountId32, + index: sts.number(), + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: sts.number(), + }), + freeze: sts.enumStruct({ + index: sts.number(), + }), + transfer: sts.enumStruct({ + new: AccountId32, + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: number +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId32 + index: number + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: number +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the + * deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: number +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: sts.bytes(), + }), + } +}) + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: sts.number(), + networkState: OpaqueNetworkState, + sessionIndex: sts.number(), + authorityIndex: sts.number(), + validatorsLen: sts.number(), + } +}) + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export interface Heartbeat { + blockNumber: number + networkState: OpaqueNetworkState + sessionIndex: number + authorityIndex: number + validatorsLen: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is + * length of `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Bytes +} + +/** + * Identity pallet declaration. + */ +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId32, + }), + add_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: sts.number(), + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: MultiAddress, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: MultiAddress, + judgement: Judgement, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: MultiAddress, + }), + rename_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId32, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: BitFlags, + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId32, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => sts.tuple(() => [Data, Data])), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => sts.bytes()), + image: Data, + twitter: Data, + } +}) + +export interface IdentityInfo { + additional: [Data, Data][] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (Bytes | undefined) + image: Data + twitter: Data +} + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: Bytes +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: Bytes +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: Bytes +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: Bytes +} + +export const BitFlags = sts.bigint() + +export const Judgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: sts.bigint(), + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export type Judgement = Judgement_Erroneous | Judgement_FeePaid | Judgement_KnownGood | Judgement_LowQuality | Judgement_OutOfDate | Judgement_Reasonable | Judgement_Unknown + +export interface Judgement_Erroneous { + __kind: 'Erroneous' +} + +export interface Judgement_FeePaid { + __kind: 'FeePaid' + value: bigint +} + +export interface Judgement_KnownGood { + __kind: 'KnownGood' +} + +export interface Judgement_LowQuality { + __kind: 'LowQuality' +} + +export interface Judgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface Judgement_Reasonable { + __kind: 'Reasonable' +} + +export interface Judgement_Unknown { + __kind: 'Unknown' +} + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: sts.bytes(), + Keccak256: sts.bytes(), + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: sts.bytes(), + ShaThree256: sts.bytes(), + } +}) + +/** + * Identity pallet declaration. + */ +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId32 +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: MultiAddress + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: number +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: MultiAddress +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: MultiAddress + judgement: Judgement +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: MultiAddress +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: MultiAddress + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId32 +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: BitFlags +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId32, Data][] +} + +export type BitFlags = bigint + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const HrmpCall: sts.Type = sts.closedEnum(() => { + return { + force_clean_hrmp: sts.enumStruct({ + para: Id, + inbound: sts.number(), + outbound: sts.number(), + }), + force_process_hrmp_close: sts.enumStruct({ + channels: sts.number(), + }), + force_process_hrmp_open: sts.enumStruct({ + channels: sts.number(), + }), + hrmp_accept_open_channel: sts.enumStruct({ + sender: Id, + }), + hrmp_cancel_open_request: sts.enumStruct({ + channelId: HrmpChannelId, + openRequests: sts.number(), + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: Id, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: Id, + recipient: Id, + } +}) + +export interface HrmpChannelId { + sender: Id + recipient: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type HrmpCall = HrmpCall_force_clean_hrmp | HrmpCall_force_process_hrmp_close | HrmpCall_force_process_hrmp_open | HrmpCall_hrmp_accept_open_channel | HrmpCall_hrmp_cancel_open_request | HrmpCall_hrmp_close_channel | HrmpCall_hrmp_init_open_channel + +/** + * This extrinsic triggers the cleanup of all the HRMP storage items that + * a para may have. Normally this happens once per session, but this allows + * you to trigger the cleanup immediately for a specific parachain. + * + * Origin must be Root. + * + * Number of inbound and outbound channels for `para` must be provided as witness data of weighing. + */ +export interface HrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: Id + inbound: number + outbound: number +} + +/** + * Force process HRMP close channel requests. + * + * If there are pending HRMP close channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of closing channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' + channels: number +} + +/** + * Force process HRMP open channel requests. + * + * If there are pending HRMP open channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of opening channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' + channels: number +} + +/** + * Accept a pending open channel request from the given sender. + * + * The channel will be opened only on the next session boundary. + */ +export interface HrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: Id +} + +/** + * This cancels a pending open channel request. It can be canceled by either of the sender + * or the recipient for that request. The origin must be either of those. + * + * The cancellation happens immediately. It is not possible to cancel the request if it is + * already accepted. + * + * Total number of open requests (i.e. `HrmpOpenChannelRequestsList`) must be provided as + * witness data. + */ +export interface HrmpCall_hrmp_cancel_open_request { + __kind: 'hrmp_cancel_open_request' + channelId: HrmpChannelId + openRequests: number +} + +/** + * Initiate unilateral closing of a channel. The origin must be either the sender or the + * recipient in the channel being closed. + * + * The closure can only happen on a session change. + */ +export interface HrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * Initiate opening a channel from a parachain to a given recipient with given channel + * parameters. + * + * - `proposed_max_capacity` - specifies how many messages can be in the channel at once. + * - `proposed_max_message_size` - specifies the maximum size of the messages. + * + * These numbers are a subject to the relay-chain configuration limits. + * + * The channel can be opened only after the recipient confirms it and only on a session + * change. + */ +export interface HrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: Id + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: sts.number(), + bestFinalizedBlockNumber: sts.number(), + }), + report_equivocation: sts.enumStruct({ + equivocationProof: Type_260, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_260, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: sts.number(), + trieNodes: sts.array(() => sts.bytes()), + validatorCount: sts.number(), + } +}) + +export interface MembershipProof { + session: number + trieNodes: Bytes[] + validatorCount: number +} + +export const Type_260: sts.Type = sts.struct(() => { + return { + setId: sts.bigint(), + equivocation: Equivocation, + } +}) + +export const Equivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: Type_267, + Prevote: Type_262, + } +}) + +export const Type_262: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Prevote, sts.bytes()]), + second: sts.tuple(() => [Prevote, sts.bytes()]), + } +}) + +export const Prevote: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Prevote { + targetHash: H256 + targetNumber: number +} + +export interface Type_262 { + roundNumber: bigint + identity: Public + first: [Prevote, Bytes] + second: [Prevote, Bytes] +} + +export const Type_267: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Precommit, sts.bytes()]), + second: sts.tuple(() => [Precommit, sts.bytes()]), + } +}) + +export const Precommit: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Precommit { + targetHash: H256 + targetNumber: number +} + +export interface Type_267 { + roundNumber: bigint + identity: Public + first: [Precommit, Bytes] + second: [Precommit, Bytes] +} + +export type Equivocation = Equivocation_Precommit | Equivocation_Prevote + +export interface Equivocation_Precommit { + __kind: 'Precommit' + value: Type_267 +} + +export interface Equivocation_Prevote { + __kind: 'Prevote' + value: Type_262 +} + +export interface Type_260 { + setId: bigint + equivocation: Equivocation +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has + * stalled. This will trigger a forced authority set change at the beginning + * of the next session, to be enacted `delay` blocks after that. The delay + * should be high enough to safely assume that the block signalling the + * forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters + * will start the new authority set using the given finalized block as base. + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: number + bestFinalizedBlockNumber: number +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_260 + keyOwnerProof: MembershipProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_260 + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GiltCall: sts.Type = sts.closedEnum(() => { + return { + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + set_target: sts.enumStruct({ + target: sts.bigint(), + }), + thaw: sts.enumStruct({ + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GiltCall = GiltCall_place_bid | GiltCall_retract_bid | GiltCall_set_target | GiltCall_thaw + +/** + * Place a bid for a gilt to be issued. + * + * Origin must be Signed, and account must have at least `amount` in free balance. + * + * - `amount`: The amount of the bid; these funds will be reserved. If the bid is + * successfully elevated into an issued gilt, then these funds will continue to be + * reserved until the gilt expires. Must be at least `MinFreeze`. + * - `duration`: The number of periods for which the funds will be locked if the gilt is + * issued. It will expire only after this period has elapsed after the point of issuance. + * Must be greater than 1 and no more than `QueueCount`. + * + * Complexities: + * - `Queues[duration].len()` (just take max). + */ +export interface GiltCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * Retract a previously placed bid. + * + * Origin must be Signed, and the account should have previously issued a still-active bid + * of `amount` for `duration`. + * + * - `amount`: The amount of the previous bid. + * - `duration`: The duration of the previous bid. + */ +export interface GiltCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * Set target proportion of gilt-funds. + * + * Origin must be `AdminOrigin`. + * + * - `target`: The target proportion of effective issued funds that should be under gilts + * at any one time. + */ +export interface GiltCall_set_target { + __kind: 'set_target' + target: bigint +} + +/** + * Remove an active but expired gilt. Reserved funds under gilt are freed and balance is + * adjusted to ensure that the funds grow or shrink to maintain the equivalent proportion + * of effective total issued funds. + * + * Origin must be Signed and the account must be the owner of the gilt of the given index. + * + * - `index`: The index of the gilt to be thawed. + */ +export interface GiltCall_thaw { + __kind: 'thaw' + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + governance_fallback: sts.enumStruct({ + maybeMaxVoters: sts.option(() => sts.number()), + maybeMaxTargets: sts.option(() => sts.number()), + }), + set_emergency_election_result: sts.enumStruct({ + supports: sts.array(() => sts.tuple(() => [AccountId32, Support])), + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => sts.array(() => sts.bigint())), + }), + submit: sts.enumStruct({ + rawSolution: RawSolution, + numSignedSubmissions: sts.number(), + }), + submit_unsigned: sts.enumStruct({ + rawSolution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export const RawSolution: sts.Type = sts.struct(() => { + return { + solution: NposCompactSolution24, + score: sts.array(() => sts.bigint()), + round: sts.number(), + } +}) + +export const NposCompactSolution24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), + votes2: sts.array(() => sts.tuple(() => [sts.number(), sts.tuple(() => [sts.number(), sts.number()]), sts.number()])), + votes3: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes4: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes5: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes6: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes7: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes8: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes9: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes10: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes11: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes12: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes13: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes14: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes15: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes16: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes17: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes18: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes19: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes20: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes21: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes22: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes23: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes24: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + } +}) + +export interface NposCompactSolution24 { + votes1: [number, number][] + votes2: [number, [number, number], number][] + votes3: [number, [number, number][], number][] + votes4: [number, [number, number][], number][] + votes5: [number, [number, number][], number][] + votes6: [number, [number, number][], number][] + votes7: [number, [number, number][], number][] + votes8: [number, [number, number][], number][] + votes9: [number, [number, number][], number][] + votes10: [number, [number, number][], number][] + votes11: [number, [number, number][], number][] + votes12: [number, [number, number][], number][] + votes13: [number, [number, number][], number][] + votes14: [number, [number, number][], number][] + votes15: [number, [number, number][], number][] + votes16: [number, [number, number][], number][] + votes17: [number, [number, number][], number][] + votes18: [number, [number, number][], number][] + votes19: [number, [number, number][], number][] + votes20: [number, [number, number][], number][] + votes21: [number, [number, number][], number][] + votes22: [number, [number, number][], number][] + votes23: [number, [number, number][], number][] + votes24: [number, [number, number][], number][] +} + +export interface RawSolution { + solution: NposCompactSolution24 + score: bigint[] + round: number +} + +export const Support: sts.Type = sts.struct(() => { + return { + total: sts.bigint(), + voters: sts.array(() => sts.tuple(() => [AccountId32, sts.bigint()])), + } +}) + +export interface Support { + total: bigint + voters: [AccountId32, bigint][] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_governance_fallback | ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * Trigger the governance fallback. + * + * This can only be called when [`Phase::Emergency`] is enabled, as an alternative to + * calling [`Call::set_emergency_election_result`]. + */ +export interface ElectionProviderMultiPhaseCall_governance_fallback { + __kind: 'governance_fallback' + maybeMaxVoters?: (number | undefined) + maybeMaxTargets?: (number | undefined) +} + +/** + * Set a solution in the queue, to be handed out to the client of this pallet in the next + * call to `ElectionProvider::elect`. + * + * This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`. + * + * The solution is not checked for any feasibility and is assumed to be trustworthy, as any + * feasibility check itself can in principle cause the election process to fail (due to + * memory/weight constrains). + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + supports: [AccountId32, Support][] +} + +/** + * Set a new value for `MinimumUntrustedScore`. + * + * Dispatch origin must be aligned with `T::ForceOrigin`. + * + * This check can be turned off by setting the value to `None`. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (bigint[] | undefined) +} + +/** + * Submit a solution for the signed phase. + * + * The dispatch origin fo this call must be __signed__. + * + * The solution is potentially queued, based on the claimed score and processed at the end + * of the signed phase. + * + * A deposit is reserved and recorded for the solution. Based on the outcome, the solution + * might be rewarded, slashed, or get all or a part of the deposit back. + * + * # + * Queue size must be provided as witness data. + * # + */ +export interface ElectionProviderMultiPhaseCall_submit { + __kind: 'submit' + rawSolution: RawSolution + numSignedSubmissions: number +} + +/** + * Submit a solution for the unsigned phase. + * + * The dispatch origin fo this call must be __none__. + * + * This submission is checked on the fly. Moreover, this unsigned solution is only + * validated when submitted to the pool from the **local** node. Effectively, this means + * that only active validators can submit this transaction when authoring a block (similar + * to an inherent). + * + * To prevent any incorrect solution (and thus wasted time/weight), this transaction will + * panic if the solution submitted by the validator is invalid in any way, effectively + * putting their authoring reward at risk. + * + * No deposit or reward is associated with this submission. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + rawSolution: RawSolution + witness: SolutionOrSnapshotSize +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DmpCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + blacklist: sts.enumStruct({ + proposalHash: H256, + maybeRefIndex: sts.option(() => sts.number()), + }), + cancel_proposal: sts.enumStruct({ + propIndex: sts.number(), + }), + cancel_queued: sts.enumStruct({ + which: sts.number(), + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId32, + conviction: Conviction, + balance: sts.bigint(), + }), + emergency_cancel: sts.enumStruct({ + refIndex: sts.number(), + }), + enact_proposal: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + }), + external_propose: sts.enumStruct({ + proposalHash: H256, + }), + external_propose_default: sts.enumStruct({ + proposalHash: H256, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: H256, + }), + fast_track: sts.enumStruct({ + proposalHash: H256, + votingPeriod: sts.number(), + delay: sts.number(), + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: H256, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: H256, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId32, + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + index: sts.number(), + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId32, + }), + veto_external: sts.enumStruct({ + proposalHash: H256, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface AccountVote_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DemocracyCall = DemocracyCall_blacklist | DemocracyCall_cancel_proposal | DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. + * + * If called on a queued public or external proposal, then this will result in it being + * removed. If the `ref_index` supplied is an active referendum with the proposal hash, + * then it will be cancelled. + * + * The dispatch origin of this call must be `BlacklistOrigin`. + * + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. + * + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). + */ +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: H256 + maybeRefIndex?: (number | undefined) +} + +/** + * Remove a proposal. + * + * The dispatch origin of this call must be `CancelProposalOrigin`. + * + * - `prop_index`: The index of the proposal to cancel. + * + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number +} + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: number +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must not + * be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId32 + conviction: Conviction + balance: bigint +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: number +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: H256 + index: number +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Weight: `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: H256 +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: H256 +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: H256 +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * `FastTrackVotingPeriod` if too low. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: H256 + votingPeriod: number + delay: number +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. When this call is successful, i.e. + * the preimage has not been uploaded before and matches some imminent proposal, + * no fee is paid. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * Weight: `O(p)` + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: H256 + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. Extrinsic is + * weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * Weight: `O(D)` where D is length of proposal. + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: H256 + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId32 + index: number +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: number +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * Weight: `O(S)` where S is the number of seconds a proposal already has. + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId32 +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * Weight: `O(V + log(V))` where V is number of `existing vetoers` + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: H256 +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of referendums the voter has voted on. + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: Id, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + contribute_all: sts.enumStruct({ + index: sts.number(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: Id, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId32, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: Signature, + } +}) + +export const Signature = sts.bytes() + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Signature +} + +export type Signature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_contribute_all | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * Add an optional memo to an existing crowdloan contribution. + * + * Origin must be Signed, and the user must have contributed to the crowdloan. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: Id + memo: Bytes +} + +/** + * Contribute to a crowd sale. This will transfer some balance over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * Contribute your entire balance to a crowd sale. This will transfer the entire balance of a user over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute_all { + __kind: 'contribute_all' + index: number + signature?: (MultiSignature | undefined) +} + +/** + * Create a new crowdloaning campaign for a parachain slot with the given lease period range. + * + * This applies a lock to your parachain configuration, ensuring that it cannot be changed + * by the parachain manager. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Remove a fund after the retirement period has ended and all funds have been returned. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * Edit the configuration for an in-progress crowdloan. + * + * Can only be called by Root origin. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Poke the fund into `NewRaise` + * + * Origin must be Signed, and the fund has non-zero raise. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: Id +} + +/** + * Automatically refund contributors of an ended crowdloan. + * Due to weight restrictions, this function may need to be called multiple + * times to fully refund all users. We will refund `RemoveKeysLimit` users at a time. + * + * Origin must be signed, but can come from anyone. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * Withdraw full balance of a specific contributor. + * + * Origin must be signed, but can come from anyone. + * + * The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement + * flag must be set. For a fund to be ready for retirement, then: + * - it must not already be in retirement; + * - the amount of raised funds must be bigger than the _free_ balance of the account; + * - and either: + * - the block number must be at least `end`; or + * - the current lease period must be greater than the fund's `last_period`. + * + * In this case, the fund's retirement flag is set and its `end` is reset to the current block + * number. + * + * - `who`: The account whose contribution should be withdrawn. + * - `index`: The parachain to whose crowdloan the contribution was made. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_bypass_consistency_check: sts.enumStruct({ + new: sts.boolean(), + }), + set_chain_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_code_retention_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_conclusion_by_time_out_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_max_spam_slots: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: sts.number(), + }), + set_group_rotation_frequency: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_minimum_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_cores: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_retries: sts.enumStruct({ + new: sts.number(), + }), + set_pvf_checking_enabled: sts.enumStruct({ + new: sts.boolean(), + }), + set_pvf_voting_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_thread_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_ump_max_individual_weight: sts.enumStruct({ + new: sts.bigint(), + }), + set_ump_service_total_weight: sts.enumStruct({ + new: sts.bigint(), + }), + set_validation_upgrade_cooldown: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ConfigurationCall = ConfigurationCall_set_bypass_consistency_check | ConfigurationCall_set_chain_availability_period | ConfigurationCall_set_code_retention_period | ConfigurationCall_set_dispute_conclusion_by_time_out_period | ConfigurationCall_set_dispute_max_spam_slots | ConfigurationCall_set_dispute_period | ConfigurationCall_set_dispute_post_conclusion_acceptance_period | ConfigurationCall_set_group_rotation_frequency | ConfigurationCall_set_hrmp_channel_max_capacity | ConfigurationCall_set_hrmp_channel_max_message_size | ConfigurationCall_set_hrmp_channel_max_total_size | ConfigurationCall_set_hrmp_max_message_num_per_candidate | ConfigurationCall_set_hrmp_max_parachain_inbound_channels | ConfigurationCall_set_hrmp_max_parachain_outbound_channels | ConfigurationCall_set_hrmp_max_parathread_inbound_channels | ConfigurationCall_set_hrmp_max_parathread_outbound_channels | ConfigurationCall_set_hrmp_open_request_ttl | ConfigurationCall_set_hrmp_recipient_deposit | ConfigurationCall_set_hrmp_sender_deposit | ConfigurationCall_set_max_code_size | ConfigurationCall_set_max_downward_message_size | ConfigurationCall_set_max_head_data_size | ConfigurationCall_set_max_pov_size | ConfigurationCall_set_max_upward_message_num_per_candidate | ConfigurationCall_set_max_upward_message_size | ConfigurationCall_set_max_upward_queue_count | ConfigurationCall_set_max_upward_queue_size | ConfigurationCall_set_max_validators | ConfigurationCall_set_max_validators_per_core | ConfigurationCall_set_minimum_validation_upgrade_delay | ConfigurationCall_set_n_delay_tranches | ConfigurationCall_set_needed_approvals | ConfigurationCall_set_no_show_slots | ConfigurationCall_set_parathread_cores | ConfigurationCall_set_parathread_retries | ConfigurationCall_set_pvf_checking_enabled | ConfigurationCall_set_pvf_voting_ttl | ConfigurationCall_set_relay_vrf_modulo_samples | ConfigurationCall_set_scheduling_lookahead | ConfigurationCall_set_thread_availability_period | ConfigurationCall_set_ump_max_individual_weight | ConfigurationCall_set_ump_service_total_weight | ConfigurationCall_set_validation_upgrade_cooldown | ConfigurationCall_set_validation_upgrade_delay | ConfigurationCall_set_zeroth_delay_tranche_width + +/** + * Setting this to true will disable consistency checks for the configuration setters. + * Use with caution. + */ +export interface ConfigurationCall_set_bypass_consistency_check { + __kind: 'set_bypass_consistency_check' + new: boolean +} + +/** + * Set the availability period for parachains. + */ +export interface ConfigurationCall_set_chain_availability_period { + __kind: 'set_chain_availability_period' + new: number +} + +/** + * Set the acceptance period for an included candidate. + */ +export interface ConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: number +} + +/** + * Set the dispute conclusion by time out period. + */ +export interface ConfigurationCall_set_dispute_conclusion_by_time_out_period { + __kind: 'set_dispute_conclusion_by_time_out_period' + new: number +} + +/** + * Set the maximum number of dispute spam slots. + */ +export interface ConfigurationCall_set_dispute_max_spam_slots { + __kind: 'set_dispute_max_spam_slots' + new: number +} + +/** + * Set the dispute period, in number of sessions to keep for disputes. + */ +export interface ConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: number +} + +/** + * Set the dispute post conclusion acceptance period. + */ +export interface ConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: number +} + +/** + * Set the parachain validator-group rotation frequency + */ +export interface ConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: number +} + +/** + * Sets the maximum number of messages allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * Sets the maximum size of a message that could ever be put into an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * Sets the maximum total size of messages in bytes allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * Sets the maximum number of outbound HRMP messages can be sent by a candidate. + */ +export interface ConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parachain is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parachain is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parathread is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_inbound_channels { + __kind: 'set_hrmp_max_parathread_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parathread is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_outbound_channels { + __kind: 'set_hrmp_max_parathread_outbound_channels' + new: number +} + +/** + * Sets the number of sessions after which an HRMP open channel request expires. + */ +export interface ConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * Sets the amount of funds that the recipient should provide for accepting opening an HRMP + * channel. + */ +export interface ConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: bigint +} + +/** + * Sets the amount of funds that the sender should provide for opening an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: bigint +} + +/** + * Set the max validation code size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * Set the critical downward message size. + */ +export interface ConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * Set the max head data size for paras. + */ +export interface ConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * Set the max POV block size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * Sets the maximum number of messages that a candidate can contain. + */ +export interface ConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum size of an upward message that can be sent by a candidate. + */ +export interface ConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * Sets the maximum items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * Sets the maximum total size of items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * Set the maximum number of validators to use in parachain consensus. + */ +export interface ConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * Set the maximum number of validators to assign to any core. + */ +export interface ConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * Sets the minimum delay between announcing the upgrade block for a parachain until the + * upgrade taking place. + * + * See the field documentation for information and constraints for the new value. + */ +export interface ConfigurationCall_set_minimum_validation_upgrade_delay { + __kind: 'set_minimum_validation_upgrade_delay' + new: number +} + +/** + * Set the total number of delay tranches. + */ +export interface ConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * Set the number of validators needed to approve a block. + */ +export interface ConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * Set the no show slots, in number of number of consensus slots. + * Must be at least 1. + */ +export interface ConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * Set the number of parathread execution cores. + */ +export interface ConfigurationCall_set_parathread_cores { + __kind: 'set_parathread_cores' + new: number +} + +/** + * Set the number of retries for a particular parathread. + */ +export interface ConfigurationCall_set_parathread_retries { + __kind: 'set_parathread_retries' + new: number +} + +/** + * Enable or disable PVF pre-checking. Consult the field documentation prior executing. + */ +export interface ConfigurationCall_set_pvf_checking_enabled { + __kind: 'set_pvf_checking_enabled' + new: boolean +} + +/** + * Set the number of session changes after which a PVF pre-checking voting is rejected. + */ +export interface ConfigurationCall_set_pvf_voting_ttl { + __kind: 'set_pvf_voting_ttl' + new: number +} + +/** + * Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion. + */ +export interface ConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * Set the scheduling lookahead, in expected number of blocks at peak throughput. + */ +export interface ConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * Set the availability period for parathreads. + */ +export interface ConfigurationCall_set_thread_availability_period { + __kind: 'set_thread_availability_period' + new: number +} + +/** + * Sets the maximum amount of weight any individual upward message may consume. + */ +export interface ConfigurationCall_set_ump_max_individual_weight { + __kind: 'set_ump_max_individual_weight' + new: bigint +} + +/** + * Sets the soft limit for the phase of dispatching dispatchable upward messages. + */ +export interface ConfigurationCall_set_ump_service_total_weight { + __kind: 'set_ump_service_total_weight' + new: bigint +} + +/** + * Set the validation upgrade cooldown. + */ +export interface ConfigurationCall_set_validation_upgrade_cooldown { + __kind: 'set_validation_upgrade_cooldown' + new: number +} + +/** + * Set the validation upgrade delay. + */ +export interface ConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: number +} + +/** + * Set the zeroth delay tranche width. + */ +export interface ConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: sts.bigint(), + vestingSchedule: sts.option(() => sts.tuple(() => [sts.bigint(), sts.bigint(), sts.number()])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId32), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId32 + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId32 + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: bigint + vestingSchedule?: ([bigint, bigint, number] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId32 | undefined) +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds + * after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is + * malicious or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_force_unreserve | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_all | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is not + * assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * Unreserve some balance from a user by force. + * + * Can only be called by ROOT. + */ +export interface BalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also alter the total issuance of the system (`TotalIssuance`) appropriately. + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: MultiAddress + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for input config + * types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex + * computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional check + * that the transfer will not kill the origin account. + * --------------------------------- + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: MultiAddress + value: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). # + * - O(1). Just like transfer, but reading the user's transferable balance first. + * # + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BagsListCall: sts.Type = sts.closedEnum(() => { + return { + put_in_front_of: sts.enumStruct({ + lighter: AccountId32, + }), + rebag: sts.enumStruct({ + dislocated: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BagsListCall = BagsListCall_put_in_front_of | BagsListCall_rebag + +/** + * Move the caller's Id directly in front of `lighter`. + * + * The dispatch origin for this call must be _Signed_ and can only be called by the Id of + * the account going in front of `lighter`. + * + * Only works if + * - both nodes are within the same bag, + * - and `origin` has a greater `VoteWeight` than `lighter`. + */ +export interface BagsListCall_put_in_front_of { + __kind: 'put_in_front_of' + lighter: AccountId32 +} + +/** + * Declare that some `dislocated` account has, through rewards or penalties, sufficiently + * changed its weight that it should properly fall into a different bag than its current + * one. + * + * Anyone can call this function about any potentially dislocated account. + * + * Will never return an error; if `dislocated` does not exist or doesn't need a rebag, then + * it is a noop and fees are still collected from `origin`. + */ +export interface BagsListCall_rebag { + __kind: 'rebag' + dislocated: AccountId32 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const EquivocationProof: sts.Type = sts.struct(() => { + return { + offender: sts.bytes(), + slot: Slot, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Slot = sts.bigint() + +export interface EquivocationProof { + offender: Bytes + slot: Slot + firstHeader: Header + secondHeader: Header +} + +export type Slot = bigint + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V1: sts.enumStruct({ + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + }), + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type NextConfigDescriptor = NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Plan an epoch config change. The epoch config change is recorded and will be enacted on + * the next call to `enact_epoch_change`. The config will be activated one epoch after. + * Multiple calls to this method will replace any existing planned config change that had + * not been enacted yet. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Cancel an in-progress auction. + * + * Can only be called by Root origin. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +export type Call = Call_Auctions | Call_Authorship | Call_Babe | Call_BagsList | Call_Balances | Call_Bounties | Call_Claims | Call_Configuration | Call_Council | Call_Crowdloan | Call_Democracy | Call_Dmp | Call_ElectionProviderMultiPhase | Call_Gilt | Call_Grandpa | Call_Hrmp | Call_Identity | Call_ImOnline | Call_Indices | Call_Initializer | Call_Multisig | Call_ParaInclusion | Call_ParaInherent | Call_Paras | Call_ParasDisputes | Call_ParasShared | Call_PhragmenElection | Call_Preimage | Call_Proxy | Call_Recovery | Call_Registrar | Call_Scheduler | Call_Session | Call_Slots | Call_Society | Call_Staking | Call_System | Call_TechnicalCommittee | Call_TechnicalMembership | Call_Timestamp | Call_Tips | Call_Treasury | Call_Ump | Call_Utility | Call_Vesting | Call_XcmPallet + +export interface Call_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Call_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Call_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Call_BagsList { + __kind: 'BagsList' + value: BagsListCall +} + +export interface Call_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Call_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Call_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Call_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Call_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Call_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Call_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Call_Dmp { + __kind: 'Dmp' + value: DmpCall +} + +export interface Call_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Call_Gilt { + __kind: 'Gilt' + value: GiltCall +} + +export interface Call_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Call_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Call_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Call_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Call_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Call_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Call_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Call_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Call_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Call_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Call_ParasDisputes { + __kind: 'ParasDisputes' + value: ParasDisputesCall +} + +export interface Call_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Call_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Call_Preimage { + __kind: 'Preimage' + value: PreimageCall +} + +export interface Call_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Call_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Call_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Call_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Call_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Call_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Call_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Call_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Call_System { + __kind: 'System' + value: SystemCall +} + +export interface Call_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Call_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Call_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Call_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Call_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Call_Ump { + __kind: 'Ump' + value: UmpCall +} + +export interface Call_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Call_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Call_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId32 = sts.bytes() diff --git a/squid/src/types/v9180.ts b/squid/src/types/v9180.ts new file mode 100644 index 00000000..1c4d8ccc --- /dev/null +++ b/squid/src/types/v9180.ts @@ -0,0 +1,11492 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Call: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + BagsList: BagsListCall, + Balances: BalancesCall, + Bounties: BountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + Dmp: DmpCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + Gilt: GiltCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Initializer: InitializerCall, + Multisig: MultisigCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Paras: ParasCall, + ParasDisputes: ParasDisputesCall, + ParasShared: ParasSharedCall, + PhragmenElection: PhragmenElectionCall, + Preimage: PreimageCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Ump: UmpCall, + Utility: UtilityCall, + Vesting: VestingCall, + XcmPallet: XcmPalletCall, + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + execute: sts.enumStruct({ + message: Type_535, + maxWeight: sts.bigint(), + }), + force_default_xcm_version: sts.enumStruct({ + maybeXcmVersion: sts.option(() => sts.number()), + }), + force_subscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_unsubscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_xcm_version: sts.enumStruct({ + location: V1MultiLocation, + xcmVersion: sts.number(), + }), + limited_reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + limited_teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + send: sts.enumStruct({ + dest: VersionedMultiLocation, + message: VersionedXcm, + }), + teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + } +}) + +export const VersionedXcm: sts.Type = sts.closedEnum(() => { + return { + V0: V0Xcm, + V1: V1Xcm, + V2: sts.array(() => V2Instruction), + } +}) + +export const V2Instruction: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => V2Instruction), + SetErrorHandler: sts.array(() => V2Instruction), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const DoubleEncoded: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncoded { + encoded: Bytes +} + +export const V0OriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type V0OriginKind = V0OriginKind_Native | V0OriginKind_SovereignAccount | V0OriginKind_Superuser | V0OriginKind_Xcm + +export interface V0OriginKind_Native { + __kind: 'Native' +} + +export interface V0OriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface V0OriginKind_Superuser { + __kind: 'Superuser' +} + +export interface V0OriginKind_Xcm { + __kind: 'Xcm' +} + +export const V2Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V2Error])), + Null: sts.unit(), + Version: sts.number(), + } +}) + +export const V2Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + MaxWeightInvalid: sts.unit(), + MultiLocationFull: sts.unit(), + MultiLocationNotInvertible: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + WeightLimitReached: sts.bigint(), + WeightNotComputable: sts.unit(), + } +}) + +export type V2Error = V2Error_AssetNotFound | V2Error_BadOrigin | V2Error_Barrier | V2Error_DestinationUnsupported | V2Error_ExceedsMaxMessageSize | V2Error_FailedToDecode | V2Error_FailedToTransactAsset | V2Error_InvalidLocation | V2Error_LocationCannotHold | V2Error_MaxWeightInvalid | V2Error_MultiLocationFull | V2Error_MultiLocationNotInvertible | V2Error_NotHoldingFees | V2Error_NotWithdrawable | V2Error_Overflow | V2Error_TooExpensive | V2Error_Transport | V2Error_Trap | V2Error_UnhandledXcmVersion | V2Error_Unimplemented | V2Error_UnknownClaim | V2Error_Unroutable | V2Error_UntrustedReserveLocation | V2Error_UntrustedTeleportLocation | V2Error_WeightLimitReached | V2Error_WeightNotComputable + +export interface V2Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V2Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V2Error_Barrier { + __kind: 'Barrier' +} + +export interface V2Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V2Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V2Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V2Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V2Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V2Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V2Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V2Error_MultiLocationFull { + __kind: 'MultiLocationFull' +} + +export interface V2Error_MultiLocationNotInvertible { + __kind: 'MultiLocationNotInvertible' +} + +export interface V2Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V2Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V2Error_Overflow { + __kind: 'Overflow' +} + +export interface V2Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V2Error_Transport { + __kind: 'Transport' +} + +export interface V2Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V2Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V2Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V2Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V2Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V2Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V2Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: bigint +} + +export interface V2Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V2Response = V2Response_Assets | V2Response_ExecutionResult | V2Response_Null | V2Response_Version + +export interface V2Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V2Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V2Error] | undefined) +} + +export interface V2Response_Null { + __kind: 'Null' +} + +export interface V2Response_Version { + __kind: 'Version' + value: number +} + +export interface V1MultiAsset { + id: V1AssetId + fun: V1Fungibility +} + +export type V1Fungibility = V1Fungibility_Fungible | V1Fungibility_NonFungible + +export interface V1Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V1Fungibility_NonFungible { + __kind: 'NonFungible' + value: V1AssetInstance +} + +export type V1AssetInstance = V1AssetInstance_Array16 | V1AssetInstance_Array32 | V1AssetInstance_Array4 | V1AssetInstance_Array8 | V1AssetInstance_Blob | V1AssetInstance_Index | V1AssetInstance_Undefined + +export interface V1AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V1AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V1AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V1AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V1AssetInstance_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface V1AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V1AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V1AssetId = V1AssetId_Abstract | V1AssetId_Concrete + +export interface V1AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V1AssetId_Concrete { + __kind: 'Concrete' + value: V1MultiLocation +} + +export interface V1MultiLocation { + parents: number + interior: V1Junctions +} + +export type V1Junctions = V1Junctions_Here | V1Junctions_X1 | V1Junctions_X2 | V1Junctions_X3 | V1Junctions_X4 | V1Junctions_X5 | V1Junctions_X6 | V1Junctions_X7 | V1Junctions_X8 + +export interface V1Junctions_Here { + __kind: 'Here' +} + +export interface V1Junctions_X1 { + __kind: 'X1' + value: V1Junction +} + +export interface V1Junctions_X2 { + __kind: 'X2' + value: [V1Junction, V1Junction] +} + +export interface V1Junctions_X3 { + __kind: 'X3' + value: [V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X4 { + __kind: 'X4' + value: [V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X5 { + __kind: 'X5' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X6 { + __kind: 'X6' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X7 { + __kind: 'X7' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X8 { + __kind: 'X8' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export type V1Junction = V1Junction_AccountId32 | V1Junction_AccountIndex64 | V1Junction_AccountKey20 | V1Junction_GeneralIndex | V1Junction_GeneralKey | V1Junction_OnlyChild | V1Junction_PalletInstance | V1Junction_Parachain | V1Junction_Plurality + +export interface V1Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V1Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V1Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V1Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V1Junction_GeneralKey { + __kind: 'GeneralKey' + value: Bytes +} + +export interface V1Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V1Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V1Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V1Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0BodyPart = V0BodyPart_AtLeastProportion | V0BodyPart_Fraction | V0BodyPart_Members | V0BodyPart_MoreThanProportion | V0BodyPart_Voice + +export interface V0BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V0BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V0BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Voice { + __kind: 'Voice' +} + +export type V0BodyId = V0BodyId_Executive | V0BodyId_Index | V0BodyId_Judicial | V0BodyId_Legislative | V0BodyId_Named | V0BodyId_Technical | V0BodyId_Unit + +export interface V0BodyId_Executive { + __kind: 'Executive' +} + +export interface V0BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V0BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V0BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V0BodyId_Named { + __kind: 'Named' + value: Bytes +} + +export interface V0BodyId_Technical { + __kind: 'Technical' +} + +export interface V0BodyId_Unit { + __kind: 'Unit' +} + +export type V0NetworkId = V0NetworkId_Any | V0NetworkId_Kusama | V0NetworkId_Named | V0NetworkId_Polkadot + +export interface V0NetworkId_Any { + __kind: 'Any' +} + +export interface V0NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V0NetworkId_Named { + __kind: 'Named' + value: Bytes +} + +export interface V0NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export const V1Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V1Junction, + X2: sts.tuple(() => [V1Junction, V1Junction]), + X3: sts.tuple(() => [V1Junction, V1Junction, V1Junction]), + X4: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction]), + X5: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X6: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X7: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X8: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + } +}) + +export const V1Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.bytes(), + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export const V0BodyId: sts.Type = sts.closedEnum(() => { + return { + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: sts.bytes(), + Technical: sts.unit(), + Unit: sts.unit(), + } +}) + +export const V0NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: sts.bytes(), + Polkadot: sts.unit(), + } +}) + +export const V1MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V1MultiAsset), + Wild: V1WildMultiAsset, + } +}) + +export const V1WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllOf: sts.enumStruct({ + id: V1AssetId, + fun: V1WildFungibility, + }), + } +}) + +export const V1WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V1WildFungibility = V1WildFungibility_Fungible | V1WildFungibility_NonFungible + +export interface V1WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V1WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V1AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V1MultiLocation, + } +}) + +export type V1WildMultiAsset = V1WildMultiAsset_All | V1WildMultiAsset_AllOf + +export interface V1WildMultiAsset_All { + __kind: 'All' +} + +export interface V1WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V1AssetId + fun: V1WildFungibility +} + +export type V1MultiAssetFilter = V1MultiAssetFilter_Definite | V1MultiAssetFilter_Wild + +export interface V1MultiAssetFilter_Definite { + __kind: 'Definite' + value: V1MultiAsset[] +} + +export interface V1MultiAssetFilter_Wild { + __kind: 'Wild' + value: V1WildMultiAsset +} + +export const V1MultiAsset: sts.Type = sts.struct(() => { + return { + id: V1AssetId, + fun: V1Fungibility, + } +}) + +export const V1Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V1AssetInstance, + } +}) + +export const V1AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V2Instruction = V2Instruction_BuyExecution | V2Instruction_ClaimAsset | V2Instruction_ClearError | V2Instruction_ClearOrigin | V2Instruction_DepositAsset | V2Instruction_DepositReserveAsset | V2Instruction_DescendOrigin | V2Instruction_ExchangeAsset | V2Instruction_HrmpChannelAccepted | V2Instruction_HrmpChannelClosing | V2Instruction_HrmpNewChannelOpenRequest | V2Instruction_InitiateReserveWithdraw | V2Instruction_InitiateTeleport | V2Instruction_QueryHolding | V2Instruction_QueryResponse | V2Instruction_ReceiveTeleportedAsset | V2Instruction_RefundSurplus | V2Instruction_ReportError | V2Instruction_ReserveAssetDeposited | V2Instruction_SetAppendix | V2Instruction_SetErrorHandler | V2Instruction_SubscribeVersion | V2Instruction_Transact | V2Instruction_TransferAsset | V2Instruction_TransferReserveAsset | V2Instruction_Trap | V2Instruction_UnsubscribeVersion | V2Instruction_WithdrawAsset + +export interface V2Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface V2Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface V2Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V2Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V2Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V2Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface V2Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V2Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V2Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V2Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V2Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface V2Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface V2Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface V2Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V2Instruction_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface V2Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface V2Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V2Instruction[] +} + +export interface V2Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V2Instruction[] +} + +export interface V2Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V2Instruction_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V2Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V2Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V2Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export type V2WeightLimit = V2WeightLimit_Limited | V2WeightLimit_Unlimited + +export interface V2WeightLimit_Limited { + __kind: 'Limited' + value: bigint +} + +export interface V2WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V1Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: V1Xcm, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + } +}) + +export const V1Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => V1Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type V1Order = V1Order_BuyExecution | V1Order_DepositAsset | V1Order_DepositReserveAsset | V1Order_ExchangeAsset | V1Order_InitiateReserveWithdraw | V1Order_InitiateTeleport | V1Order_Noop | V1Order_QueryHolding + +export interface V1Order_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: V1Xcm[] +} + +export interface V1Order_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V1Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V1Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_Noop { + __kind: 'Noop' +} + +export interface V1Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export const V1Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + Version: sts.number(), + } +}) + +export type V1Response = V1Response_Assets | V1Response_Version + +export interface V1Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V1Response_Version { + __kind: 'Version' + value: number +} + +export type V1Xcm = V1Xcm_HrmpChannelAccepted | V1Xcm_HrmpChannelClosing | V1Xcm_HrmpNewChannelOpenRequest | V1Xcm_QueryResponse | V1Xcm_ReceiveTeleportedAsset | V1Xcm_RelayedFrom | V1Xcm_ReserveAssetDeposited | V1Xcm_SubscribeVersion | V1Xcm_Transact | V1Xcm_TransferAsset | V1Xcm_TransferReserveAsset | V1Xcm_UnsubscribeVersion | V1Xcm_WithdrawAsset + +export interface V1Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V1Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V1Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V1Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface V1Xcm_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: V1Xcm +} + +export interface V1Xcm_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V1Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V1Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V1Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Xcm_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V1Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export const V0Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: V0Xcm, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + } +}) + +export const V0Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => V0Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type V0Order = V0Order_BuyExecution | V0Order_DepositAsset | V0Order_DepositReserveAsset | V0Order_ExchangeAsset | V0Order_InitiateReserveWithdraw | V0Order_InitiateTeleport | V0Order_Null | V0Order_QueryHolding + +export interface V0Order_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: V0Xcm[] +} + +export interface V0Order_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface V0Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_Null { + __kind: 'Null' +} + +export interface V0Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type V0MultiLocation = V0MultiLocation_Null | V0MultiLocation_X1 | V0MultiLocation_X2 | V0MultiLocation_X3 | V0MultiLocation_X4 | V0MultiLocation_X5 | V0MultiLocation_X6 | V0MultiLocation_X7 | V0MultiLocation_X8 + +export interface V0MultiLocation_Null { + __kind: 'Null' +} + +export interface V0MultiLocation_X1 { + __kind: 'X1' + value: V0Junction +} + +export interface V0MultiLocation_X2 { + __kind: 'X2' + value: [V0Junction, V0Junction] +} + +export interface V0MultiLocation_X3 { + __kind: 'X3' + value: [V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X4 { + __kind: 'X4' + value: [V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X5 { + __kind: 'X5' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X6 { + __kind: 'X6' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X7 { + __kind: 'X7' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X8 { + __kind: 'X8' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export type V0Junction = V0Junction_AccountId32 | V0Junction_AccountIndex64 | V0Junction_AccountKey20 | V0Junction_GeneralIndex | V0Junction_GeneralKey | V0Junction_OnlyChild | V0Junction_PalletInstance | V0Junction_Parachain | V0Junction_Parent | V0Junction_Plurality + +export interface V0Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V0Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V0Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V0Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V0Junction_GeneralKey { + __kind: 'GeneralKey' + value: Bytes +} + +export interface V0Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V0Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V0Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V0Junction_Parent { + __kind: 'Parent' +} + +export interface V0Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0MultiAsset = V0MultiAsset_AbstractFungible | V0MultiAsset_AbstractNonFungible | V0MultiAsset_All | V0MultiAsset_AllAbstractFungible | V0MultiAsset_AllAbstractNonFungible | V0MultiAsset_AllConcreteFungible | V0MultiAsset_AllConcreteNonFungible | V0MultiAsset_AllFungible | V0MultiAsset_AllNonFungible | V0MultiAsset_ConcreteFungible | V0MultiAsset_ConcreteNonFungible | V0MultiAsset_None + +export interface V0MultiAsset_AbstractFungible { + __kind: 'AbstractFungible' + id: Bytes + amount: bigint +} + +export interface V0MultiAsset_AbstractNonFungible { + __kind: 'AbstractNonFungible' + class: Bytes + instance: V1AssetInstance +} + +export interface V0MultiAsset_All { + __kind: 'All' +} + +export interface V0MultiAsset_AllAbstractFungible { + __kind: 'AllAbstractFungible' + id: Bytes +} + +export interface V0MultiAsset_AllAbstractNonFungible { + __kind: 'AllAbstractNonFungible' + class: Bytes +} + +export interface V0MultiAsset_AllConcreteFungible { + __kind: 'AllConcreteFungible' + id: V0MultiLocation +} + +export interface V0MultiAsset_AllConcreteNonFungible { + __kind: 'AllConcreteNonFungible' + class: V0MultiLocation +} + +export interface V0MultiAsset_AllFungible { + __kind: 'AllFungible' +} + +export interface V0MultiAsset_AllNonFungible { + __kind: 'AllNonFungible' +} + +export interface V0MultiAsset_ConcreteFungible { + __kind: 'ConcreteFungible' + id: V0MultiLocation + amount: bigint +} + +export interface V0MultiAsset_ConcreteNonFungible { + __kind: 'ConcreteNonFungible' + class: V0MultiLocation + instance: V1AssetInstance +} + +export interface V0MultiAsset_None { + __kind: 'None' +} + +export const V0MultiAsset: sts.Type = sts.closedEnum(() => { + return { + AbstractFungible: sts.enumStruct({ + id: sts.bytes(), + amount: sts.bigint(), + }), + AbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + instance: V1AssetInstance, + }), + All: sts.unit(), + AllAbstractFungible: sts.enumStruct({ + id: sts.bytes(), + }), + AllAbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + }), + AllConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + }), + AllConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + }), + AllFungible: sts.unit(), + AllNonFungible: sts.unit(), + ConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + amount: sts.bigint(), + }), + ConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + instance: V1AssetInstance, + }), + None: sts.unit(), + } +}) + +export const V0MultiLocation: sts.Type = sts.closedEnum(() => { + return { + Null: sts.unit(), + X1: V0Junction, + X2: sts.tuple(() => [V0Junction, V0Junction]), + X3: sts.tuple(() => [V0Junction, V0Junction, V0Junction]), + X4: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction]), + X5: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X6: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X7: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X8: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + } +}) + +export const V0Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.bytes(), + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Parent: sts.unit(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V0MultiAsset), + } +}) + +export type V0Response = V0Response_Assets + +export interface V0Response_Assets { + __kind: 'Assets' + value: V0MultiAsset[] +} + +export type V0Xcm = V0Xcm_HrmpChannelAccepted | V0Xcm_HrmpChannelClosing | V0Xcm_HrmpNewChannelOpenRequest | V0Xcm_QueryResponse | V0Xcm_RelayedFrom | V0Xcm_ReserveAssetDeposit | V0Xcm_TeleportAsset | V0Xcm_Transact | V0Xcm_TransferAsset | V0Xcm_TransferReserveAsset | V0Xcm_WithdrawAsset + +export interface V0Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V0Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V0Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V0Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface V0Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: V0Xcm +} + +export interface V0Xcm_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V0Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export type VersionedXcm = VersionedXcm_V0 | VersionedXcm_V1 | VersionedXcm_V2 + +export interface VersionedXcm_V0 { + __kind: 'V0' + value: V0Xcm +} + +export interface VersionedXcm_V1 { + __kind: 'V1' + value: V1Xcm +} + +export interface VersionedXcm_V2 { + __kind: 'V2' + value: V2Instruction[] +} + +export const V2WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: sts.bigint(), + Unlimited: sts.unit(), + } +}) + +export const VersionedMultiAssets: sts.Type = sts.closedEnum(() => { + return { + V0: sts.array(() => V0MultiAsset), + V1: sts.array(() => V1MultiAsset), + } +}) + +export type VersionedMultiAssets = VersionedMultiAssets_V0 | VersionedMultiAssets_V1 + +export interface VersionedMultiAssets_V0 { + __kind: 'V0' + value: V0MultiAsset[] +} + +export interface VersionedMultiAssets_V1 { + __kind: 'V1' + value: V1MultiAsset[] +} + +export const V1MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V1Junctions, + } +}) + +export const VersionedMultiLocation: sts.Type = sts.closedEnum(() => { + return { + V0: V0MultiLocation, + V1: V1MultiLocation, + } +}) + +export type VersionedMultiLocation = VersionedMultiLocation_V0 | VersionedMultiLocation_V1 + +export interface VersionedMultiLocation_V0 { + __kind: 'V0' + value: V0MultiLocation +} + +export interface VersionedMultiLocation_V1 { + __kind: 'V1' + value: V1MultiLocation +} + +export const Type_535: sts.Type = sts.closedEnum(() => { + return { + V0: Type_536, + V1: Type_541, + V2: sts.array(() => Type_547), + } +}) + +export const Type_547: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => Type_547), + SetErrorHandler: sts.array(() => Type_547), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_540, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const Type_540: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface Type_540 { + encoded: Bytes +} + +export type Type_547 = Type_547_BuyExecution | Type_547_ClaimAsset | Type_547_ClearError | Type_547_ClearOrigin | Type_547_DepositAsset | Type_547_DepositReserveAsset | Type_547_DescendOrigin | Type_547_ExchangeAsset | Type_547_HrmpChannelAccepted | Type_547_HrmpChannelClosing | Type_547_HrmpNewChannelOpenRequest | Type_547_InitiateReserveWithdraw | Type_547_InitiateTeleport | Type_547_QueryHolding | Type_547_QueryResponse | Type_547_ReceiveTeleportedAsset | Type_547_RefundSurplus | Type_547_ReportError | Type_547_ReserveAssetDeposited | Type_547_SetAppendix | Type_547_SetErrorHandler | Type_547_SubscribeVersion | Type_547_Transact | Type_547_TransferAsset | Type_547_TransferReserveAsset | Type_547_Trap | Type_547_UnsubscribeVersion | Type_547_WithdrawAsset + +export interface Type_547_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface Type_547_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface Type_547_ClearError { + __kind: 'ClearError' +} + +export interface Type_547_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_547_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_547_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_547_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface Type_547_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_547_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_547_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_547_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_547_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_547_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_547_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface Type_547_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface Type_547_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface Type_547_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_547_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface Type_547_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface Type_547_SetAppendix { + __kind: 'SetAppendix' + value: Type_547[] +} + +export interface Type_547_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_547[] +} + +export interface Type_547_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_547_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_540 +} + +export interface Type_547_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_547_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_547_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_547_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_547_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export const Type_541: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_543), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: Type_541, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_543), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_540, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_543), + }), + } +}) + +export const Type_543: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => Type_541), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type Type_543 = Type_543_BuyExecution | Type_543_DepositAsset | Type_543_DepositReserveAsset | Type_543_ExchangeAsset | Type_543_InitiateReserveWithdraw | Type_543_InitiateTeleport | Type_543_Noop | Type_543_QueryHolding + +export interface Type_543_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: Type_541[] +} + +export interface Type_543_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_543_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_543_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_543_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface Type_543_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_543_Noop { + __kind: 'Noop' +} + +export interface Type_543_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export type Type_541 = Type_541_HrmpChannelAccepted | Type_541_HrmpChannelClosing | Type_541_HrmpNewChannelOpenRequest | Type_541_QueryResponse | Type_541_ReceiveTeleportedAsset | Type_541_RelayedFrom | Type_541_ReserveAssetDeposited | Type_541_SubscribeVersion | Type_541_Transact | Type_541_TransferAsset | Type_541_TransferReserveAsset | Type_541_UnsubscribeVersion | Type_541_WithdrawAsset + +export interface Type_541_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_541_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_541_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_541_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface Type_541_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: Type_543[] +} + +export interface Type_541_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: Type_541 +} + +export interface Type_541_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: Type_543[] +} + +export interface Type_541_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_541_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_540 +} + +export interface Type_541_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_541_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_541_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_541_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: Type_543[] +} + +export const Type_536: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: Type_536, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_538), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_538), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_540, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_538), + }), + } +}) + +export const Type_538: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => Type_536), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type Type_538 = Type_538_BuyExecution | Type_538_DepositAsset | Type_538_DepositReserveAsset | Type_538_ExchangeAsset | Type_538_InitiateReserveWithdraw | Type_538_InitiateTeleport | Type_538_Null | Type_538_QueryHolding + +export interface Type_538_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: Type_536[] +} + +export interface Type_538_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_538_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_538_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface Type_538_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface Type_538_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_538_Null { + __kind: 'Null' +} + +export interface Type_538_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type Type_536 = Type_536_HrmpChannelAccepted | Type_536_HrmpChannelClosing | Type_536_HrmpNewChannelOpenRequest | Type_536_QueryResponse | Type_536_RelayedFrom | Type_536_ReserveAssetDeposit | Type_536_TeleportAsset | Type_536_Transact | Type_536_TransferAsset | Type_536_TransferReserveAsset | Type_536_WithdrawAsset + +export interface Type_536_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_536_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_536_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_536_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface Type_536_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: Type_536 +} + +export interface Type_536_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: Type_538[] +} + +export interface Type_536_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: Type_538[] +} + +export interface Type_536_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_540 +} + +export interface Type_536_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_536_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_536_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: Type_538[] +} + +export type Type_535 = Type_535_V0 | Type_535_V1 | Type_535_V2 + +export interface Type_535_V0 { + __kind: 'V0' + value: Type_536 +} + +export interface Type_535_V1 { + __kind: 'V1' + value: Type_541 +} + +export interface Type_535_V2 { + __kind: 'V2' + value: Type_547[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type XcmPalletCall = XcmPalletCall_execute | XcmPalletCall_force_default_xcm_version | XcmPalletCall_force_subscribe_version_notify | XcmPalletCall_force_unsubscribe_version_notify | XcmPalletCall_force_xcm_version | XcmPalletCall_limited_reserve_transfer_assets | XcmPalletCall_limited_teleport_assets | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets + +/** + * Execute an XCM message from a local, signed, origin. + * + * An event is deposited indicating whether `msg` could be executed completely or only + * partially. + * + * No more than `max_weight` will be used in its attempted execution. If this is less than the + * maximum amount of weight that the message could take to be executed, then no execution + * attempt will be made. + * + * NOTE: A successful return to this does *not* imply that the `msg` was executed successfully + * to completion; only that *some* of it was executed. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Type_535 + maxWeight: bigint +} + +/** + * Set a safe XCM version (the version that XCM should be encoded with if the most recent + * version a destination can accept is unknown). + * + * - `origin`: Must be Root. + * - `maybe_xcm_version`: The default XCM encoding version, or `None` to disable. + */ +export interface XcmPalletCall_force_default_xcm_version { + __kind: 'force_default_xcm_version' + maybeXcmVersion?: (number | undefined) +} + +/** + * Ask a location to notify us regarding their XCM version and any changes to it. + * + * - `origin`: Must be Root. + * - `location`: The location to which we should subscribe for XCM version notifications. + */ +export interface XcmPalletCall_force_subscribe_version_notify { + __kind: 'force_subscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Require that a particular destination should no longer notify us regarding any XCM + * version changes. + * + * - `origin`: Must be Root. + * - `location`: The location to which we are currently subscribed for XCM version + * notifications which we no longer desire. + */ +export interface XcmPalletCall_force_unsubscribe_version_notify { + __kind: 'force_unsubscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Extoll that a particular destination can be communicated with through a particular + * version of XCM. + * + * - `origin`: Must be Root. + * - `location`: The destination that is being described. + * - `xcm_version`: The latest version of XCM that `location` supports. + */ +export interface XcmPalletCall_force_xcm_version { + __kind: 'force_xcm_version' + location: V1MultiLocation + xcmVersion: number +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination chain and forward + * a notification XCM. + * + * Fee payment on the destination side is made from the first asset listed in the `assets` vector. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_reserve_transfer_assets { + __kind: 'limited_reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the first asset listed in the `assets` vector. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_teleport_assets { + __kind: 'limited_teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination chain and forward + * a notification XCM. + * + * Fee payment on the destination side is made from the first asset listed in the `assets` vector and + * fee-weight is calculated locally and thus remote weights are assumed to be equal to + * local weights. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +export interface XcmPalletCall_send { + __kind: 'send' + dest: VersionedMultiLocation + message: VersionedXcm +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the first asset listed in the `assets` vector and + * fee-weight is calculated locally and thus remote weights are assumed to be equal to + * local weights. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: MultiAddress, + target: MultiAddress, + schedule: VestingInfo, + }), + merge_schedules: sts.enumStruct({ + schedule1Index: sts.number(), + schedule2Index: sts.number(), + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: MultiAddress, + }), + vested_transfer: sts.enumStruct({ + target: MultiAddress, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: sts.bigint(), + perBlock: sts.bigint(), + startingBlock: sts.number(), + } +}) + +export interface VestingInfo { + locked: bigint + perBlock: bigint + startingBlock: number +} + +export const MultiAddress: sts.Type = sts.closedEnum(() => { + return { + Address20: sts.bytes(), + Address32: sts.bytes(), + Id: AccountId32, + Index: sts.unit(), + Raw: sts.bytes(), + } +}) + +export type MultiAddress = MultiAddress_Address20 | MultiAddress_Address32 | MultiAddress_Id | MultiAddress_Index | MultiAddress_Raw + +export interface MultiAddress_Address20 { + __kind: 'Address20' + value: Bytes +} + +export interface MultiAddress_Address32 { + __kind: 'Address32' + value: Bytes +} + +export interface MultiAddress_Id { + __kind: 'Id' + value: AccountId32 +} + +export interface MultiAddress_Index { + __kind: 'Index' +} + +export interface MultiAddress_Raw { + __kind: 'Raw' + value: Bytes +} + +export type AccountId32 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_merge_schedules | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: MultiAddress + target: MultiAddress + schedule: VestingInfo +} + +/** + * Merge two vesting schedules together, creating a new vesting schedule that unlocks over + * the highest possible start and end blocks. If both schedules have already started the + * current block will be used as the schedule start; with the caveat that if one schedule + * is finished by the current block, the other will be treated as the new merged schedule, + * unmodified. + * + * NOTE: If `schedule1_index == schedule2_index` this is a no-op. + * NOTE: This will unlock all schedules through the current block prior to merging. + * NOTE: If both schedules have ended by the current block, no new schedule will be created + * and both will be removed. + * + * Merged schedule attributes: + * - `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block, + * current_block)`. + * - `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`. + * - `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`. + * + * The dispatch origin for this call must be _Signed_. + * + * - `schedule1_index`: index of the first schedule to merge. + * - `schedule2_index`: index of the second schedule to merge. + */ +export interface VestingCall_merge_schedules { + __kind: 'merge_schedules' + schedule1Index: number + schedule2Index: number +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: MultiAddress +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account receiving the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: MultiAddress + schedule: VestingInfo +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Call, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Call), + }), + dispatch_as: sts.enumStruct({ + asOrigin: OriginCaller, + call: Call, + }), + } +}) + +export const OriginCaller: sts.Type = sts.closedEnum(() => { + return { + Council: Type_327, + ParachainsOrigin: Origin, + TechnicalCommittee: Type_328, + Void: Void, + XcmPallet: Type_330, + system: RawOrigin, + } +}) + +export const RawOrigin: sts.Type = sts.closedEnum(() => { + return { + None: sts.unit(), + Root: sts.unit(), + Signed: AccountId32, + } +}) + +export type RawOrigin = RawOrigin_None | RawOrigin_Root | RawOrigin_Signed + +export interface RawOrigin_None { + __kind: 'None' +} + +export interface RawOrigin_Root { + __kind: 'Root' +} + +export interface RawOrigin_Signed { + __kind: 'Signed' + value: AccountId32 +} + +export const Type_330: sts.Type = sts.closedEnum(() => { + return { + Response: V1MultiLocation, + Xcm: V1MultiLocation, + } +}) + +export type Type_330 = Type_330_Response | Type_330_Xcm + +export interface Type_330_Response { + __kind: 'Response' + value: V1MultiLocation +} + +export interface Type_330_Xcm { + __kind: 'Xcm' + value: V1MultiLocation +} + +export const Void: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Void = never + +export const Type_328: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_328 = Type_328_Member | Type_328_Members | Type_328__Phantom + +export interface Type_328_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_328_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_328__Phantom { + __kind: '_Phantom' +} + +export const Origin: sts.Type = sts.closedEnum(() => { + return { + Parachain: Id, + } +}) + +export const Id = sts.number() + +export type Origin = Origin_Parachain + +export interface Origin_Parachain { + __kind: 'Parachain' + value: Id +} + +export type Id = number + +export const Type_327: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_327 = Type_327_Member | Type_327_Members | Type_327__Phantom + +export interface Type_327_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_327_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_327__Phantom { + __kind: '_Phantom' +} + +export type OriginCaller = OriginCaller_Council | OriginCaller_ParachainsOrigin | OriginCaller_TechnicalCommittee | OriginCaller_Void | OriginCaller_XcmPallet | OriginCaller_system + +export interface OriginCaller_Council { + __kind: 'Council' + value: Type_327 +} + +export interface OriginCaller_ParachainsOrigin { + __kind: 'ParachainsOrigin' + value: Origin +} + +export interface OriginCaller_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: Type_328 +} + +export interface OriginCaller_Void { + __kind: 'Void' + value: Void +} + +export interface OriginCaller_XcmPallet { + __kind: 'XcmPallet' + value: Type_330 +} + +export interface OriginCaller_system { + __kind: 'system' + value: RawOrigin +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all | UtilityCall_dispatch_as + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Call +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Call[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Call[] +} + +/** + * Dispatches a function call with a provided origin. + * + * The dispatch origin for this call must be _Root_. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB write (event). + * - Weight of derivative `call` execution + T::WeightInfo::dispatch_as(). + * # + */ +export interface UtilityCall_dispatch_as { + __kind: 'dispatch_as' + asOrigin: OriginCaller + call: Call +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UmpCall: sts.Type = sts.closedEnum(() => { + return { + service_overweight: sts.enumStruct({ + index: sts.bigint(), + weightLimit: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UmpCall = UmpCall_service_overweight + +/** + * Service a single overweight upward message. + * + * - `origin`: Must pass `ExecuteOverweightOrigin`. + * - `index`: The index of the overweight message to service. + * - `weight_limit`: The amount of weight that message execution may take. + * + * Errors: + * - `UnknownMessageIndex`: Message of `index` is unknown. + * - `WeightOverLimit`: Message execution may use greater than `weight_limit`. + * + * Events: + * - `OverweightServiced`: On success. + */ +export interface UmpCall_service_overweight { + __kind: 'service_overweight' + index: bigint + weightLimit: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: MultiAddress, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: MultiAddress +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TipsCall: sts.Type = sts.closedEnum(() => { + return { + close_tip: sts.enumStruct({ + hash: H256, + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId32, + }), + retract_tip: sts.enumStruct({ + hash: H256, + }), + slash_tip: sts.enumStruct({ + hash: H256, + }), + tip: sts.enumStruct({ + hash: H256, + tipValue: sts.bigint(), + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId32, + tipValue: sts.bigint(), + }), + } +}) + +export const H256 = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TipsCall = TipsCall_close_tip | TipsCall_report_awesome | TipsCall_retract_tip | TipsCall_slash_tip | TipsCall_tip | TipsCall_tip_new + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost + * depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TipsCall_close_tip { + __kind: 'close_tip' + hash: H256 +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId32 +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TipsCall_retract_tip { + __kind: 'retract_tip' + hash: H256 +} + +/** + * Remove and slash an already-open tip. + * + * May only be called from `T::RejectOrigin`. + * + * As a result, the finder is slashed and the deposits are lost. + * + * Emits `TipSlashed` if successful. + * + * # + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * # + */ +export interface TipsCall_slash_tip { + __kind: 'slash_tip' + hash: H256 +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`, insert tip and check closing, `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TipsCall_tip { + __kind: 'tip' + hash: H256 + tipValue: bigint +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of + * `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId32 + tipValue: bigint +} + +export type H256 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in + * `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId32, + }), + change_key: sts.enumStruct({ + new: AccountId32, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId32, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId32), + }), + set_prime: sts.enumStruct({ + who: AccountId32, + }), + swap_member: sts.enumStruct({ + remove: AccountId32, + add: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId32 +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId32 +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId32 +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId32[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId32 +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId32 + add: AccountId32 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: sts.bytes(), + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => sts.bytes()), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + }), + } +}) + +export const Perbill = sts.number() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Bytes + subkeys: number +} + +/** + * Kill some items from storage. + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Bytes[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Make some on-chain remark and emit event. + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is + * expensive). + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very + * expensive. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full + * block. # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: [Bytes, Bytes][] +} + +export type Perbill = number + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: MultiAddress, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: sts.number(), + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + controller: AccountId32, + }), + force_apply_min_commission: sts.enumStruct({ + validatorStash: AccountId32, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => MultiAddress), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => MultiAddress), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + }), + reap_stash: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: MultiAddress, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId32), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_staking_configs: sts.enumStruct({ + minNominatorBond: ConfigOp, + minValidatorBond: ConfigOp, + maxNominatorCount: Type_243, + maxValidatorCount: Type_243, + chillThreshold: Type_244, + minCommission: Type_245, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export const Type_245: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export type Type_245 = Type_245_Noop | Type_245_Remove | Type_245_Set + +export interface Type_245_Noop { + __kind: 'Noop' +} + +export interface Type_245_Remove { + __kind: 'Remove' +} + +export interface Type_245_Set { + __kind: 'Set' + value: Perbill +} + +export const Type_244: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Percent, + } +}) + +export type Type_244 = Type_244_Noop | Type_244_Remove | Type_244_Set + +export interface Type_244_Noop { + __kind: 'Noop' +} + +export interface Type_244_Remove { + __kind: 'Remove' +} + +export interface Type_244_Set { + __kind: 'Set' + value: Percent +} + +export type Percent = number + +export const Type_243: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_243 = Type_243_Noop | Type_243_Remove | Type_243_Set + +export interface Type_243_Noop { + __kind: 'Noop' +} + +export interface Type_243_Remove { + __kind: 'Remove' +} + +export interface Type_243_Set { + __kind: 'Set' + value: number +} + +export const ConfigOp: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type ConfigOp = ConfigOp_Noop | ConfigOp_Remove | ConfigOp_Set + +export interface ConfigOp_Noop { + __kind: 'Noop' +} + +export interface ConfigOp_Remove { + __kind: 'Remove' +} + +export interface ConfigOp_Set { + __kind: 'Set' + value: bigint +} + +export const Percent = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_force_apply_min_commission | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_staking_configs | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: MultiAddress + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose + * any limitation on the amount that can be added. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: number + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Declare a `controller` to stop participating as either a validator or nominator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_, but can be called by anyone. + * + * If the caller is the same as the controller being targeted, then no further checks are + * enforced, and this function behaves just like `chill`. + * + * If the caller is different than the controller being targeted, the following conditions + * must be met: + * + * * `controller` must belong to a nominator who has become non-decodable, + * + * Or: + * + * * A `ChillThreshold` must be set and checked which defines how close to the max + * nominators or validators we must reach before users can start chilling one-another. + * * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine + * how close we are to the threshold. + * * A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines + * if this is a person that should be chilled because they have not met the threshold + * bond required. + * + * This can be helpful if bond requirements are updated, and we need to remove old users + * who do not satisfy these requirements. + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + controller: AccountId32 +} + +/** + * Force a validator to have at least the minimum commission. This will not affect a + * validator who already has a commission greater than or equal to the minimum. Any account + * can call this. + */ +export interface StakingCall_force_apply_min_commission { + __kind: 'force_apply_min_commission' + validatorStash: AccountId32 +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * Thus the election process may be ongoing when this is called. In this case the + * election will continue until the next era is triggered. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: MultiAddress[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (T::MaxNominations). + * - Both the reads and writes follow a similar pattern. + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: MultiAddress[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId32 + era: number +} + +/** + * Remove all data structures concerning a staker/stash once it is at a state where it can + * be considered `dust` in the staking system. The requirements are: + * + * 1. the `total_balance` of the stash is below existential deposit. + * 2. or, the `ledger.total` of the stash is below existential deposit. + * + * The former can happen in cases like a slash; the latter when a fully unbonded account + * is still receiving staking rewards in `RewardDestination::Staked`. + * + * It can be called by anyone, as long as `stash` meets the above requirements. + * + * Refunds the transaction fees upon successful execution. + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MaxUnlockingChunks`. + * - Storage changes: Can't increase storage, only decrease it. + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: MultiAddress +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. This + * should report all the storage items that will be deleted by clearing old era history. + * Needed to report an accurate weight for the dispatch. Trusted by `Root` to report an + * accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Weight: O(E) + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, + * ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId32[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Update the various staking configurations . + * + * * `min_nominator_bond`: The minimum active bond needed to be a nominator. + * * `min_validator_bond`: The minimum active bond needed to be a validator. + * * `max_nominator_count`: The max number of users who can be a nominator at once. When + * set to `None`, no limit is enforced. + * * `max_validator_count`: The max number of users who can be a validator at once. When + * set to `None`, no limit is enforced. + * * `chill_threshold`: The ratio of `max_nominator_count` or `max_validator_count` which + * should be filled in order for the `chill_other` transaction to work. + * * `min_commission`: The minimum amount of commission that each validators must maintain. + * This is checked only upon calling `validate`. Existing validators are not affected. + * + * Origin must be Root to call this function. + * + * NOTE: Existing nominators and validators will not be affected by this update. + * to kick people under the new limits, `chill_other` should be called. + */ +export interface StakingCall_set_staking_configs { + __kind: 'set_staking_configs' + minNominatorBond: ConfigOp + minValidatorBond: ConfigOp + maxNominatorCount: Type_243 + maxValidatorCount: Type_243 + chillThreshold: Type_244 + minCommission: Type_245 +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * If a user encounters the `InsufficientBond` error when calling this extrinsic, + * they should call `chill` first in order to free up their bonded funds. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * Complexity O(S) where S is the number of slashing spans to remove + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: sts.bigint(), + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId32, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId32, + judgement: Type_373, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId32, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: MultiAddress, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId32, + value: sts.bigint(), + tip: sts.bigint(), + }), + } +}) + +export const Type_373: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export type Type_373 = Type_373_Approve | Type_373_Rebid | Type_373_Reject + +export interface Type_373_Approve { + __kind: 'Approve' +} + +export interface Type_373_Rebid { + __kind: 'Rebid' +} + +export interface Type_373_Reject { + __kind: 'Reject' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: bigint +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * pallet to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId32 + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId32 + judgement: Type_373 +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin forgives + * (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to + * society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId32 + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured + * payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be approved (`true`) or + * rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: MultiAddress + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId32 + value: bigint + tip: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: Id, + }), + force_lease: sts.enumStruct({ + para: Id, + leaser: AccountId32, + amount: sts.bigint(), + periodBegin: sts.number(), + periodCount: sts.number(), + }), + trigger_onboard: sts.enumStruct({ + para: Id, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * Clear all leases for a Para Id, refunding any deposits back to the original owners. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: Id +} + +/** + * Just a connect into the `lease_out` call, in case Root wants to force some lease to happen + * independently of any other on-chain mechanism to use it. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: Id + leaser: AccountId32 + amount: bigint + periodBegin: number + periodCount: number +} + +/** + * Try to onboard a parachain that has a lease for the current lease period. + * + * This function can be useful if there was some state issue with a para that should + * have onboarded, but was unable to. As long as they have a lease period, we can + * let them onboard from here. + * + * Origin must be signed, but can be called by anyone. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: SessionKeys, + proof: sts.bytes(), + }), + } +}) + +export const SessionKeys: sts.Type = sts.struct(() => { + return { + grandpa: Public, + babe: sts.bytes(), + imOnline: sts.bytes(), + paraValidator: sts.bytes(), + paraAssignment: V1Public, + authorityDiscovery: sts.bytes(), + } +}) + +export const V1Public = sts.bytes() + +export const Public = sts.bytes() + +export interface SessionKeys { + grandpa: Public + babe: Bytes + imOnline: Bytes + paraValidator: Bytes + paraAssignment: V1Public + authorityDiscovery: Bytes +} + +export type V1Public = Bytes + +export type Public = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be Signed and the account must be either be + * convertible to a validator ID using the chain's typical addressing system (this usually + * means being a controller account) or directly convertible into a validator ID (which + * usually means being a stash account). + * + * # + * - Complexity: `O(1)` in number of key types. Actual cost depends on the number of length + * of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)`. Actual cost depends on the number of length of + * `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: SessionKeys + proof: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: sts.number(), + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + schedule_after: sts.enumStruct({ + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + } +}) + +export const MaybeHashed: sts.Type = sts.closedEnum(() => { + return { + Hash: H256, + Value: Call, + } +}) + +export type MaybeHashed = MaybeHashed_Hash | MaybeHashed_Value + +export interface MaybeHashed_Hash { + __kind: 'Hash' + value: H256 +} + +export interface MaybeHashed_Value { + __kind: 'Value' + value: Call +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: number + index: number +} + +/** + * Cancel a named scheduled task. + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Schedule a named task. + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`](Self::schedule_named). + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + deregister: sts.enumStruct({ + id: Id, + }), + force_register: sts.enumStruct({ + who: AccountId32, + deposit: sts.bigint(), + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + force_remove_lock: sts.enumStruct({ + para: Id, + }), + register: sts.enumStruct({ + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + reserve: sts.unit(), + swap: sts.enumStruct({ + id: Id, + other: Id, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RegistrarCall = RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_force_remove_lock | RegistrarCall_register | RegistrarCall_reserve | RegistrarCall_swap + +/** + * Deregister a Para Id, freeing all data and returning any deposit. + * + * The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: Id +} + +/** + * Force the registration of a Para Id on the relay chain. + * + * This function must be called by a Root origin. + * + * The deposit taken can be specified for this registration. Any `ParaId` + * can be registered, including sub-1000 IDs which are System Parachains. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId32 + deposit: bigint + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Remove a manager lock from a para. This will allow the manager of a + * previously locked para to deregister or swap a para without using governance. + * + * Can only be called by the Root origin. + */ +export interface RegistrarCall_force_remove_lock { + __kind: 'force_remove_lock' + para: Id +} + +/** + * Register head data and validation code for a reserved Para Id. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. + * - `id`: The para ID. Must be owned/managed by the `origin` signing account. + * - `genesis_head`: The genesis head data of the parachain/thread. + * - `validation_code`: The initial validation code of the parachain/thread. + * + * ## Deposits/Fees + * The origin signed account must reserve a corresponding deposit for the registration. Anything already + * reserved previously for this para ID is accounted for. + * + * ## Events + * The `Registered` event is emitted in case of success. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Reserve a Para Id on the relay chain. + * + * This function will reserve a new Para Id to be owned/managed by the origin account. + * The origin account is able to register head data and validation code using `register` to create + * a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID. + * + * ## Deposits/Fees + * The origin must reserve a deposit of `ParaDeposit` for the registration. + * + * ## Events + * The `Reserved` event is emitted in case of success, which provides the ID reserved for use. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * Swap a parachain with another parachain or parathread. + * + * The origin must be Root, the `para` owner, or the `para` itself. + * + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: Id + other: Id +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId32, + call: Call, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId32, + }), + claim_recovery: sts.enumStruct({ + account: AccountId32, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId32, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId32), + threshold: sts.number(), + delayPeriod: sts.number(), + }), + initiate_recovery: sts.enumStruct({ + account: AccountId32, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId32, + rescuer: AccountId32, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId32, + rescuer: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + * + * # + * - The weight of the `call` + 10,000. + * - One storage lookup to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId32 + call: Call +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + * + * # + * - One storage mutation to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId32 +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully recovered by + * you. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + V) + * # + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId32 +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + * + * # + * Key: V (len of vouching friends) + * - One storage read/remove to get the active recovery process. O(1), Codec O(V) + * - One balance call to repatriate reserved. O(X) + * - One event. + * + * Total Complexity: O(V + X) + * # + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId32 +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. Should be + * ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt before the + * account can be recovered. Should be less than or equal to the length of the list of + * friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized that + * needs to pass before the account can be recovered. + * + * # + * - Key: F (len of friends) + * - One storage read to check that account is not already recoverable. O(1). + * - A check that the friends list is sorted and unique. O(F) + * - One currency reserve operation. O(X) + * - One storage write. O(1). Codec O(F). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId32[] + threshold: number + delayPeriod: number +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account needs to be + * recoverable (i.e. have a recovery configuration). + * + * # + * - One storage read to check that account is recoverable. O(F) + * - One storage read to check that this recovery process hasn't already started. O(1) + * - One currency reserve operation. O(X) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId32 +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + * + * # + * Key: F (len of friends) + * - One storage read to get the prefix iterator for active recoveries. O(1) + * - One storage read/remove to get the recovery configuration. O(1), Codec O(F) + * - One balance call to unreserved. O(X) + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + * + * # + * - One storage write O(1) + * - One event + * # + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId32 + rescuer: AccountId32 +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One binary search to confirm caller is a friend. O(logF) + * - One binary search to confirm caller has not already vouched. O(logV) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + logF + V + logV) + * # + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId32 + rescuer: AccountId32 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: AccountId32, + proxyType: ProxyType, + delay: sts.number(), + }), + announce: sts.enumStruct({ + real: AccountId32, + callHash: H256, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + delay: sts.number(), + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId32, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId32, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + proxy_announced: sts.enumStruct({ + delegate: AccountId32, + real: AccountId32, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + reject_announcement: sts.enumStruct({ + delegate: AccountId32, + callHash: H256, + }), + remove_announcement: sts.enumStruct({ + real: AccountId32, + callHash: H256, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: AccountId32, + proxyType: ProxyType, + delay: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: AccountId32 + proxyType: ProxyType + delay: number +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: AccountId32 + callHash: H256 +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + * TODO: Might be over counting 1 read + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: number + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId32 + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId32 + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Dispatch the given `call` from an account that the sender is authorized for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: AccountId32 + real: AccountId32 + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: AccountId32 + callHash: H256 +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: AccountId32 + callHash: H256 +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: AccountId32 + proxyType: ProxyType + delay: number +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Society | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Society { + __kind: 'Society' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PreimageCall: sts.Type = sts.closedEnum(() => { + return { + note_preimage: sts.enumStruct({ + bytes: sts.bytes(), + }), + request_preimage: sts.enumStruct({ + hash: H256, + }), + unnote_preimage: sts.enumStruct({ + hash: H256, + }), + unrequest_preimage: sts.enumStruct({ + hash: H256, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PreimageCall = PreimageCall_note_preimage | PreimageCall_request_preimage | PreimageCall_unnote_preimage | PreimageCall_unrequest_preimage + +/** + * Register a preimage on-chain. + * + * If the preimage was previously requested, no fees or deposits are taken for providing + * the preimage. Otherwise, a deposit is taken proportional to the size of the preimage. + */ +export interface PreimageCall_note_preimage { + __kind: 'note_preimage' + bytes: Bytes +} + +/** + * Request a preimage be uploaded to the chain without paying any fees or deposits. + * + * If the preimage requests has already been provided on-chain, we unreserve any deposit + * a user may have paid, and take the control of the preimage out of their hands. + */ +export interface PreimageCall_request_preimage { + __kind: 'request_preimage' + hash: H256 +} + +/** + * Clear an unrequested preimage from the runtime storage. + */ +export interface PreimageCall_unnote_preimage { + __kind: 'unnote_preimage' + hash: H256 +} + +/** + * Clear a previously made request for a preimage. + * + * NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. + */ +export interface PreimageCall_unrequest_preimage { + __kind: 'unrequest_preimage' + hash: H256 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PhragmenElectionCall: sts.Type = sts.closedEnum(() => { + return { + clean_defunct_voters: sts.enumStruct({ + numVoters: sts.number(), + numDefunct: sts.number(), + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + hasReplacement: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId32), + value: sts.bigint(), + }), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PhragmenElectionCall = PhragmenElectionCall_clean_defunct_voters | PhragmenElectionCall_remove_member | PhragmenElectionCall_remove_voter | PhragmenElectionCall_renounce_candidacy | PhragmenElectionCall_submit_candidacy | PhragmenElectionCall_vote + +/** + * Clean all voters who are defunct (i.e. they do not serve any purpose at all). The + * deposit of the removed voters are returned. + * + * This is an root function to be used only for cleaning the state. + * + * The dispatch origin of this call must be root. + * + * # + * The total number of voters and those that are defunct must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_clean_defunct_voters { + __kind: 'clean_defunct_voters' + numVoters: number + numDefunct: number +} + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, a new phragmen election is started. + * + * The dispatch origin of this call must be root. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement, we use a small weight. Else, since this is a root call and + * will go into phragmen, we assume full block for now. + * # + */ +export interface PhragmenElectionCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + hasReplacement: boolean +} + +/** + * Remove `origin` as a voter. + * + * This removes the lock and returns the deposit. + * + * The dispatch origin of this call must be signed and be a voter. + */ +export interface PhragmenElectionCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * + * - `origin` is a candidate and not elected in any set. In this case, the deposit is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the deposit is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the deposit is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_member`](Self::remove_member), if replacement runners exists, they + * are immediately used. If the prime is renouncing, then no prime will exist until the + * next round. + * + * The dispatch origin of this call must be signed, and have one of the above roles. + * + * # + * The type of renouncing must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Submit oneself for candidacy. A fixed amount of deposit is recorded. + * + * All candidates are wiped at the end of the term. They either become a member/runner-up, + * or leave the system while their deposit is slashed. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`] + * to get their deposit back. Losing the spot in an election will always lead to a slash. + * + * # + * The number of current candidates must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is + * reserved. The deposit is based on the number of votes and can be updated over time. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * If `value` is more than `who`'s free balance, then the maximum of the two is used. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * It is the responsibility of the caller to **NOT** place all of their balance into the + * lock and keep some for further operations. + * + * # + * We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less. + * # + */ +export interface PhragmenElectionCall_vote { + __kind: 'vote' + votes: AccountId32[] + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasSharedCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasDisputesCall: sts.Type = sts.closedEnum(() => { + return { + force_unfreeze: sts.unit(), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasDisputesCall = ParasDisputesCall_force_unfreeze + +export interface ParasDisputesCall_force_unfreeze { + __kind: 'force_unfreeze' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + add_trusted_validation_code: sts.enumStruct({ + validationCode: ValidationCode, + }), + force_note_new_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: Id, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + relayParentNumber: sts.number(), + }), + force_set_current_code: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + include_pvf_check_statement: sts.enumStruct({ + stmt: V2PvfCheckStatement, + signature: sts.bytes(), + }), + poke_unused_validation_code: sts.enumStruct({ + validationCodeHash: ValidationCodeHash, + }), + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const V2PvfCheckStatement: sts.Type = sts.struct(() => { + return { + accept: sts.boolean(), + subject: ValidationCodeHash, + sessionIndex: sts.number(), + validatorIndex: V0ValidatorIndex, + } +}) + +export const V0ValidatorIndex = sts.number() + +export interface V2PvfCheckStatement { + accept: boolean + subject: ValidationCodeHash + sessionIndex: number + validatorIndex: V0ValidatorIndex +} + +export type V0ValidatorIndex = number + +export type ValidationCodeHash = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasCall = ParasCall_add_trusted_validation_code | ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head | ParasCall_include_pvf_check_statement | ParasCall_poke_unused_validation_code + +/** + * Adds the validation code to the storage. + * + * The code will not be added if it is already present. Additionally, if PVF pre-checking + * is running for that code, it will be instantly accepted. + * + * Otherwise, the code will be added into the storage. Note that the code will be added + * into storage with reference count 0. This is to account the fact that there are no users + * for this code yet. The caller will have to make sure that this code eventually gets + * used by some parachain or removed from the storage to avoid storage leaks. For the latter + * prefer to use the `poke_unused_validation_code` dispatchable to raw storage manipulation. + * + * This function is mainly meant to be used for upgrading parachains that do not follow + * the go-ahead signal while the PVF pre-checking feature is enabled. + */ +export interface ParasCall_add_trusted_validation_code { + __kind: 'add_trusted_validation_code' + validationCode: ValidationCode +} + +/** + * Note a new block head for para within the context of the current block. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: Id + newHead: HeadData +} + +/** + * Put a parachain directly into the next session's action queue. + * We can't queue it any sooner than this without going into the + * initializer... + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: Id +} + +/** + * Schedule an upgrade as if it was scheduled in the given relay parent block. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: Id + newCode: ValidationCode + relayParentNumber: number +} + +/** + * Set the storage for the parachain validation code immediately. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: Id + newCode: ValidationCode +} + +/** + * Set the storage for the current parachain head data immediately. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: Id + newHead: HeadData +} + +/** + * Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and + * enacts the results if that was the last vote before achieving the supermajority. + */ +export interface ParasCall_include_pvf_check_statement { + __kind: 'include_pvf_check_statement' + stmt: V2PvfCheckStatement + signature: Bytes +} + +/** + * Remove the validation code from the storage iff the reference count is 0. + * + * This is better than removing the storage directly, because it will not remove the code + * that was suddenly got used by some parachain while this dispatchable was pending + * dispatching. + */ +export interface ParasCall_poke_unused_validation_code { + __kind: 'poke_unused_validation_code' + validationCodeHash: ValidationCodeHash +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: V1InherentData, + }), + } +}) + +export const V1InherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => V1UncheckedSigned), + backedCandidates: sts.array(() => V1BackedCandidate), + disputes: sts.array(() => V1DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: H256, + number: sts.number(), + stateRoot: H256, + extrinsicsRoot: H256, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + Consensus: sts.tuple(() => [sts.bytes(), sts.bytes()]), + Other: sts.bytes(), + PreRuntime: sts.tuple(() => [sts.bytes(), sts.bytes()]), + RuntimeEnvironmentUpdated: sts.unit(), + Seal: sts.tuple(() => [sts.bytes(), sts.bytes()]), + } +}) + +export type DigestItem = DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: [Bytes, Bytes] +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: [Bytes, Bytes] +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: [Bytes, Bytes] +} + +export interface Digest { + logs: DigestItem[] +} + +export interface Header { + parentHash: H256 + number: number + stateRoot: H256 + extrinsicsRoot: H256 + digest: Digest +} + +export const V1DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: sts.number(), + statements: sts.array(() => sts.tuple(() => [V1DisputeStatement, V0ValidatorIndex, sts.bytes()])), + } +}) + +export const V1DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: V1InvalidDisputeStatementKind, + Valid: V1ValidDisputeStatementKind, + } +}) + +export const V1ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + BackingSeconded: H256, + BackingValid: H256, + Explicit: sts.unit(), + } +}) + +export type V1ValidDisputeStatementKind = V1ValidDisputeStatementKind_ApprovalChecking | V1ValidDisputeStatementKind_BackingSeconded | V1ValidDisputeStatementKind_BackingValid | V1ValidDisputeStatementKind_Explicit + +export interface V1ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface V1ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: H256 +} + +export interface V1ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: H256 +} + +export interface V1ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export const V1InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export type V1InvalidDisputeStatementKind = V1InvalidDisputeStatementKind_Explicit + +export interface V1InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type V1DisputeStatement = V1DisputeStatement_Invalid | V1DisputeStatement_Valid + +export interface V1DisputeStatement_Invalid { + __kind: 'Invalid' + value: V1InvalidDisputeStatementKind +} + +export interface V1DisputeStatement_Valid { + __kind: 'Valid' + value: V1ValidDisputeStatementKind +} + +export const CandidateHash = sts.bytes() + +export interface V1DisputeStatementSet { + candidateHash: CandidateHash + session: number + statements: [V1DisputeStatement, V0ValidatorIndex, Bytes][] +} + +export type CandidateHash = Bytes + +export const V1BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: V1CommittedCandidateReceipt, + validityVotes: sts.array(() => V0ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const V0ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.bytes(), + Implicit: sts.bytes(), + } +}) + +export type V0ValidityAttestation = V0ValidityAttestation_Explicit | V0ValidityAttestation_Implicit + +export interface V0ValidityAttestation_Explicit { + __kind: 'Explicit' + value: Bytes +} + +export interface V0ValidityAttestation_Implicit { + __kind: 'Implicit' + value: Bytes +} + +export const V1CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: V1CandidateDescriptor, + commitments: V1CandidateCommitments, + } +}) + +export const V1CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => sts.bytes()), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: sts.number(), + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: Id, + data: sts.bytes(), + } +}) + +export interface OutboundHrmpMessage { + recipient: Id + data: Bytes +} + +export interface V1CandidateCommitments { + upwardMessages: Bytes[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: number +} + +export const V1CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: Id, + relayParent: H256, + collator: V0Public, + persistedValidationDataHash: H256, + povHash: H256, + erasureRoot: H256, + signature: V0Signature, + paraHead: H256, + validationCodeHash: ValidationCodeHash, + } +}) + +export const V0Signature = sts.bytes() + +export const V0Public = sts.bytes() + +export interface V1CandidateDescriptor { + paraId: Id + relayParent: H256 + collator: V0Public + persistedValidationDataHash: H256 + povHash: H256 + erasureRoot: H256 + signature: V0Signature + paraHead: H256 + validationCodeHash: ValidationCodeHash +} + +export type V0Signature = Bytes + +export type V0Public = Bytes + +export interface V1CommittedCandidateReceipt { + descriptor: V1CandidateDescriptor + commitments: V1CandidateCommitments +} + +export interface V1BackedCandidate { + candidate: V1CommittedCandidateReceipt + validityVotes: V0ValidityAttestation[] + validatorIndices: BitSequence +} + +export const V1UncheckedSigned: sts.Type = sts.struct(() => { + return { + payload: V1AvailabilityBitfield, + validatorIndex: V0ValidatorIndex, + signature: sts.bytes(), + } +}) + +export const V1AvailabilityBitfield = sts.bitseq() + +export interface V1UncheckedSigned { + payload: V1AvailabilityBitfield + validatorIndex: V0ValidatorIndex + signature: Bytes +} + +export type V1AvailabilityBitfield = BitSequence + +export interface V1InherentData { + bitfields: V1UncheckedSigned[] + backedCandidates: V1BackedCandidate[] + disputes: V1DisputeStatementSet[] + parentHeader: Header +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInherentCall = ParaInherentCall_enter + +/** + * Enter the paras inherent. This will process bitfields and backed candidates. + */ +export interface ParaInherentCall_enter { + __kind: 'enter' + data: V1InherentData +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInclusionCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: sts.bigint(), + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + call: sts.bytes(), + storeCall: sts.boolean(), + maxWeight: sts.bigint(), + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId32), + call: Call, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: sts.number(), + index: sts.number(), + } +}) + +export interface Timepoint { + height: number + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: bigint +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + call: Bytes + storeCall: boolean + maxWeight: bigint +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId32[] + call: Call +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId32[] + timepoint: Timepoint + callHash: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const InitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type InitializerCall = InitializerCall_force_approve + +/** + * Issue a signal to the consensus engine to forcibly act as though all parachain + * blocks in all relay chain blocks up to and including the given number in the current + * chain are valid and should be finalized. + */ +export interface InitializerCall_force_approve { + __kind: 'force_approve' + upTo: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: sts.number(), + }), + force_transfer: sts.enumStruct({ + new: AccountId32, + index: sts.number(), + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: sts.number(), + }), + freeze: sts.enumStruct({ + index: sts.number(), + }), + transfer: sts.enumStruct({ + new: AccountId32, + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: number +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId32 + index: number + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: number +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the + * deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: number +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: sts.bytes(), + }), + } +}) + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: sts.number(), + networkState: OpaqueNetworkState, + sessionIndex: sts.number(), + authorityIndex: sts.number(), + validatorsLen: sts.number(), + } +}) + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export interface Heartbeat { + blockNumber: number + networkState: OpaqueNetworkState + sessionIndex: number + authorityIndex: number + validatorsLen: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is + * length of `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Bytes +} + +/** + * Identity pallet declaration. + */ +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId32, + }), + add_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: sts.number(), + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: MultiAddress, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: MultiAddress, + judgement: Judgement, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: MultiAddress, + }), + rename_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId32, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: BitFlags, + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId32, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => sts.tuple(() => [Data, Data])), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => sts.bytes()), + image: Data, + twitter: Data, + } +}) + +export interface IdentityInfo { + additional: [Data, Data][] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (Bytes | undefined) + image: Data + twitter: Data +} + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: Bytes +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: Bytes +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: Bytes +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: Bytes +} + +export const BitFlags = sts.bigint() + +export const Judgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: sts.bigint(), + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export type Judgement = Judgement_Erroneous | Judgement_FeePaid | Judgement_KnownGood | Judgement_LowQuality | Judgement_OutOfDate | Judgement_Reasonable | Judgement_Unknown + +export interface Judgement_Erroneous { + __kind: 'Erroneous' +} + +export interface Judgement_FeePaid { + __kind: 'FeePaid' + value: bigint +} + +export interface Judgement_KnownGood { + __kind: 'KnownGood' +} + +export interface Judgement_LowQuality { + __kind: 'LowQuality' +} + +export interface Judgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface Judgement_Reasonable { + __kind: 'Reasonable' +} + +export interface Judgement_Unknown { + __kind: 'Unknown' +} + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: sts.bytes(), + Keccak256: sts.bytes(), + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: sts.bytes(), + ShaThree256: sts.bytes(), + } +}) + +/** + * Identity pallet declaration. + */ +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId32 +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: MultiAddress + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: number +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: MultiAddress +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: MultiAddress + judgement: Judgement +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: MultiAddress +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: MultiAddress + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId32 +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: BitFlags +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId32, Data][] +} + +export type BitFlags = bigint + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const HrmpCall: sts.Type = sts.closedEnum(() => { + return { + force_clean_hrmp: sts.enumStruct({ + para: Id, + inbound: sts.number(), + outbound: sts.number(), + }), + force_process_hrmp_close: sts.enumStruct({ + channels: sts.number(), + }), + force_process_hrmp_open: sts.enumStruct({ + channels: sts.number(), + }), + hrmp_accept_open_channel: sts.enumStruct({ + sender: Id, + }), + hrmp_cancel_open_request: sts.enumStruct({ + channelId: HrmpChannelId, + openRequests: sts.number(), + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: Id, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: Id, + recipient: Id, + } +}) + +export interface HrmpChannelId { + sender: Id + recipient: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type HrmpCall = HrmpCall_force_clean_hrmp | HrmpCall_force_process_hrmp_close | HrmpCall_force_process_hrmp_open | HrmpCall_hrmp_accept_open_channel | HrmpCall_hrmp_cancel_open_request | HrmpCall_hrmp_close_channel | HrmpCall_hrmp_init_open_channel + +/** + * This extrinsic triggers the cleanup of all the HRMP storage items that + * a para may have. Normally this happens once per session, but this allows + * you to trigger the cleanup immediately for a specific parachain. + * + * Origin must be Root. + * + * Number of inbound and outbound channels for `para` must be provided as witness data of weighing. + */ +export interface HrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: Id + inbound: number + outbound: number +} + +/** + * Force process HRMP close channel requests. + * + * If there are pending HRMP close channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of closing channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' + channels: number +} + +/** + * Force process HRMP open channel requests. + * + * If there are pending HRMP open channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of opening channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' + channels: number +} + +/** + * Accept a pending open channel request from the given sender. + * + * The channel will be opened only on the next session boundary. + */ +export interface HrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: Id +} + +/** + * This cancels a pending open channel request. It can be canceled by either of the sender + * or the recipient for that request. The origin must be either of those. + * + * The cancellation happens immediately. It is not possible to cancel the request if it is + * already accepted. + * + * Total number of open requests (i.e. `HrmpOpenChannelRequestsList`) must be provided as + * witness data. + */ +export interface HrmpCall_hrmp_cancel_open_request { + __kind: 'hrmp_cancel_open_request' + channelId: HrmpChannelId + openRequests: number +} + +/** + * Initiate unilateral closing of a channel. The origin must be either the sender or the + * recipient in the channel being closed. + * + * The closure can only happen on a session change. + */ +export interface HrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * Initiate opening a channel from a parachain to a given recipient with given channel + * parameters. + * + * - `proposed_max_capacity` - specifies how many messages can be in the channel at once. + * - `proposed_max_message_size` - specifies the maximum size of the messages. + * + * These numbers are a subject to the relay-chain configuration limits. + * + * The channel can be opened only after the recipient confirms it and only on a session + * change. + */ +export interface HrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: Id + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: sts.number(), + bestFinalizedBlockNumber: sts.number(), + }), + report_equivocation: sts.enumStruct({ + equivocationProof: Type_264, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_264, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: sts.number(), + trieNodes: sts.array(() => sts.bytes()), + validatorCount: sts.number(), + } +}) + +export interface MembershipProof { + session: number + trieNodes: Bytes[] + validatorCount: number +} + +export const Type_264: sts.Type = sts.struct(() => { + return { + setId: sts.bigint(), + equivocation: Equivocation, + } +}) + +export const Equivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: Type_271, + Prevote: Type_266, + } +}) + +export const Type_266: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Prevote, sts.bytes()]), + second: sts.tuple(() => [Prevote, sts.bytes()]), + } +}) + +export const Prevote: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Prevote { + targetHash: H256 + targetNumber: number +} + +export interface Type_266 { + roundNumber: bigint + identity: Public + first: [Prevote, Bytes] + second: [Prevote, Bytes] +} + +export const Type_271: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Precommit, sts.bytes()]), + second: sts.tuple(() => [Precommit, sts.bytes()]), + } +}) + +export const Precommit: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Precommit { + targetHash: H256 + targetNumber: number +} + +export interface Type_271 { + roundNumber: bigint + identity: Public + first: [Precommit, Bytes] + second: [Precommit, Bytes] +} + +export type Equivocation = Equivocation_Precommit | Equivocation_Prevote + +export interface Equivocation_Precommit { + __kind: 'Precommit' + value: Type_271 +} + +export interface Equivocation_Prevote { + __kind: 'Prevote' + value: Type_266 +} + +export interface Type_264 { + setId: bigint + equivocation: Equivocation +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has + * stalled. This will trigger a forced authority set change at the beginning + * of the next session, to be enacted `delay` blocks after that. The delay + * should be high enough to safely assume that the block signalling the + * forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters + * will start the new authority set using the given finalized block as base. + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: number + bestFinalizedBlockNumber: number +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_264 + keyOwnerProof: MembershipProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_264 + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GiltCall: sts.Type = sts.closedEnum(() => { + return { + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + set_target: sts.enumStruct({ + target: sts.bigint(), + }), + thaw: sts.enumStruct({ + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GiltCall = GiltCall_place_bid | GiltCall_retract_bid | GiltCall_set_target | GiltCall_thaw + +/** + * Place a bid for a gilt to be issued. + * + * Origin must be Signed, and account must have at least `amount` in free balance. + * + * - `amount`: The amount of the bid; these funds will be reserved. If the bid is + * successfully elevated into an issued gilt, then these funds will continue to be + * reserved until the gilt expires. Must be at least `MinFreeze`. + * - `duration`: The number of periods for which the funds will be locked if the gilt is + * issued. It will expire only after this period has elapsed after the point of issuance. + * Must be greater than 1 and no more than `QueueCount`. + * + * Complexities: + * - `Queues[duration].len()` (just take max). + */ +export interface GiltCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * Retract a previously placed bid. + * + * Origin must be Signed, and the account should have previously issued a still-active bid + * of `amount` for `duration`. + * + * - `amount`: The amount of the previous bid. + * - `duration`: The duration of the previous bid. + */ +export interface GiltCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * Set target proportion of gilt-funds. + * + * Origin must be `AdminOrigin`. + * + * - `target`: The target proportion of effective issued funds that should be under gilts + * at any one time. + */ +export interface GiltCall_set_target { + __kind: 'set_target' + target: bigint +} + +/** + * Remove an active but expired gilt. Reserved funds under gilt are freed and balance is + * adjusted to ensure that the funds grow or shrink to maintain the equivalent proportion + * of effective total issued funds. + * + * Origin must be Signed and the account must be the owner of the gilt of the given index. + * + * - `index`: The index of the gilt to be thawed. + */ +export interface GiltCall_thaw { + __kind: 'thaw' + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + governance_fallback: sts.enumStruct({ + maybeMaxVoters: sts.option(() => sts.number()), + maybeMaxTargets: sts.option(() => sts.number()), + }), + set_emergency_election_result: sts.enumStruct({ + supports: sts.array(() => sts.tuple(() => [AccountId32, Support])), + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => ElectionScore), + }), + submit: sts.enumStruct({ + rawSolution: RawSolution, + }), + submit_unsigned: sts.enumStruct({ + rawSolution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export const RawSolution: sts.Type = sts.struct(() => { + return { + solution: NposCompactSolution24, + score: ElectionScore, + round: sts.number(), + } +}) + +export const NposCompactSolution24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), + votes2: sts.array(() => sts.tuple(() => [sts.number(), sts.tuple(() => [sts.number(), sts.number()]), sts.number()])), + votes3: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes4: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes5: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes6: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes7: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes8: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes9: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes10: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes11: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes12: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes13: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes14: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes15: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes16: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes17: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes18: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes19: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes20: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes21: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes22: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes23: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes24: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + } +}) + +export interface NposCompactSolution24 { + votes1: [number, number][] + votes2: [number, [number, number], number][] + votes3: [number, [number, number][], number][] + votes4: [number, [number, number][], number][] + votes5: [number, [number, number][], number][] + votes6: [number, [number, number][], number][] + votes7: [number, [number, number][], number][] + votes8: [number, [number, number][], number][] + votes9: [number, [number, number][], number][] + votes10: [number, [number, number][], number][] + votes11: [number, [number, number][], number][] + votes12: [number, [number, number][], number][] + votes13: [number, [number, number][], number][] + votes14: [number, [number, number][], number][] + votes15: [number, [number, number][], number][] + votes16: [number, [number, number][], number][] + votes17: [number, [number, number][], number][] + votes18: [number, [number, number][], number][] + votes19: [number, [number, number][], number][] + votes20: [number, [number, number][], number][] + votes21: [number, [number, number][], number][] + votes22: [number, [number, number][], number][] + votes23: [number, [number, number][], number][] + votes24: [number, [number, number][], number][] +} + +export interface RawSolution { + solution: NposCompactSolution24 + score: ElectionScore + round: number +} + +export interface ElectionScore { + minimalStake: bigint + sumStake: bigint + sumStakeSquared: bigint +} + +export const ElectionScore: sts.Type = sts.struct(() => { + return { + minimalStake: sts.bigint(), + sumStake: sts.bigint(), + sumStakeSquared: sts.bigint(), + } +}) + +export const Support: sts.Type = sts.struct(() => { + return { + total: sts.bigint(), + voters: sts.array(() => sts.tuple(() => [AccountId32, sts.bigint()])), + } +}) + +export interface Support { + total: bigint + voters: [AccountId32, bigint][] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_governance_fallback | ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * Trigger the governance fallback. + * + * This can only be called when [`Phase::Emergency`] is enabled, as an alternative to + * calling [`Call::set_emergency_election_result`]. + */ +export interface ElectionProviderMultiPhaseCall_governance_fallback { + __kind: 'governance_fallback' + maybeMaxVoters?: (number | undefined) + maybeMaxTargets?: (number | undefined) +} + +/** + * Set a solution in the queue, to be handed out to the client of this pallet in the next + * call to `ElectionProvider::elect`. + * + * This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`. + * + * The solution is not checked for any feasibility and is assumed to be trustworthy, as any + * feasibility check itself can in principle cause the election process to fail (due to + * memory/weight constrains). + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + supports: [AccountId32, Support][] +} + +/** + * Set a new value for `MinimumUntrustedScore`. + * + * Dispatch origin must be aligned with `T::ForceOrigin`. + * + * This check can be turned off by setting the value to `None`. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (ElectionScore | undefined) +} + +/** + * Submit a solution for the signed phase. + * + * The dispatch origin fo this call must be __signed__. + * + * The solution is potentially queued, based on the claimed score and processed at the end + * of the signed phase. + * + * A deposit is reserved and recorded for the solution. Based on the outcome, the solution + * might be rewarded, slashed, or get all or a part of the deposit back. + */ +export interface ElectionProviderMultiPhaseCall_submit { + __kind: 'submit' + rawSolution: RawSolution +} + +/** + * Submit a solution for the unsigned phase. + * + * The dispatch origin fo this call must be __none__. + * + * This submission is checked on the fly. Moreover, this unsigned solution is only + * validated when submitted to the pool from the **local** node. Effectively, this means + * that only active validators can submit this transaction when authoring a block (similar + * to an inherent). + * + * To prevent any incorrect solution (and thus wasted time/weight), this transaction will + * panic if the solution submitted by the validator is invalid in any way, effectively + * putting their authoring reward at risk. + * + * No deposit or reward is associated with this submission. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + rawSolution: RawSolution + witness: SolutionOrSnapshotSize +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DmpCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + blacklist: sts.enumStruct({ + proposalHash: H256, + maybeRefIndex: sts.option(() => sts.number()), + }), + cancel_proposal: sts.enumStruct({ + propIndex: sts.number(), + }), + cancel_queued: sts.enumStruct({ + which: sts.number(), + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId32, + conviction: Conviction, + balance: sts.bigint(), + }), + emergency_cancel: sts.enumStruct({ + refIndex: sts.number(), + }), + enact_proposal: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + }), + external_propose: sts.enumStruct({ + proposalHash: H256, + }), + external_propose_default: sts.enumStruct({ + proposalHash: H256, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: H256, + }), + fast_track: sts.enumStruct({ + proposalHash: H256, + votingPeriod: sts.number(), + delay: sts.number(), + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: H256, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: H256, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId32, + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + index: sts.number(), + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId32, + }), + veto_external: sts.enumStruct({ + proposalHash: H256, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface AccountVote_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DemocracyCall = DemocracyCall_blacklist | DemocracyCall_cancel_proposal | DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. + * + * If called on a queued public or external proposal, then this will result in it being + * removed. If the `ref_index` supplied is an active referendum with the proposal hash, + * then it will be cancelled. + * + * The dispatch origin of this call must be `BlacklistOrigin`. + * + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. + * + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). + */ +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: H256 + maybeRefIndex?: (number | undefined) +} + +/** + * Remove a proposal. + * + * The dispatch origin of this call must be `CancelProposalOrigin`. + * + * - `prop_index`: The index of the proposal to cancel. + * + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number +} + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: number +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must not + * be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId32 + conviction: Conviction + balance: bigint +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: number +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: H256 + index: number +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Weight: `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: H256 +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: H256 +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: H256 +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * `FastTrackVotingPeriod` if too low. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: H256 + votingPeriod: number + delay: number +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. When this call is successful, i.e. + * the preimage has not been uploaded before and matches some imminent proposal, + * no fee is paid. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * Weight: `O(p)` + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: H256 + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. Extrinsic is + * weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * Weight: `O(D)` where D is length of proposal. + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: H256 + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId32 + index: number +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: number +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * Weight: `O(S)` where S is the number of seconds a proposal already has. + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId32 +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * Weight: `O(V + log(V))` where V is number of `existing vetoers` + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: H256 +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of referendums the voter has voted on. + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: Id, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + contribute_all: sts.enumStruct({ + index: sts.number(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: Id, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId32, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: Signature, + } +}) + +export const Signature = sts.bytes() + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Signature +} + +export type Signature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_contribute_all | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * Add an optional memo to an existing crowdloan contribution. + * + * Origin must be Signed, and the user must have contributed to the crowdloan. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: Id + memo: Bytes +} + +/** + * Contribute to a crowd sale. This will transfer some balance over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * Contribute your entire balance to a crowd sale. This will transfer the entire balance of a user over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute_all { + __kind: 'contribute_all' + index: number + signature?: (MultiSignature | undefined) +} + +/** + * Create a new crowdloaning campaign for a parachain slot with the given lease period range. + * + * This applies a lock to your parachain configuration, ensuring that it cannot be changed + * by the parachain manager. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Remove a fund after the retirement period has ended and all funds have been returned. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * Edit the configuration for an in-progress crowdloan. + * + * Can only be called by Root origin. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Poke the fund into `NewRaise` + * + * Origin must be Signed, and the fund has non-zero raise. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: Id +} + +/** + * Automatically refund contributors of an ended crowdloan. + * Due to weight restrictions, this function may need to be called multiple + * times to fully refund all users. We will refund `RemoveKeysLimit` users at a time. + * + * Origin must be signed, but can come from anyone. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * Withdraw full balance of a specific contributor. + * + * Origin must be signed, but can come from anyone. + * + * The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement + * flag must be set. For a fund to be ready for retirement, then: + * - it must not already be in retirement; + * - the amount of raised funds must be bigger than the _free_ balance of the account; + * - and either: + * - the block number must be at least `end`; or + * - the current lease period must be greater than the fund's `last_period`. + * + * In this case, the fund's retirement flag is set and its `end` is reset to the current block + * number. + * + * - `who`: The account whose contribution should be withdrawn. + * - `index`: The parachain to whose crowdloan the contribution was made. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_bypass_consistency_check: sts.enumStruct({ + new: sts.boolean(), + }), + set_chain_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_code_retention_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_conclusion_by_time_out_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_max_spam_slots: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: sts.number(), + }), + set_group_rotation_frequency: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_minimum_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_cores: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_retries: sts.enumStruct({ + new: sts.number(), + }), + set_pvf_checking_enabled: sts.enumStruct({ + new: sts.boolean(), + }), + set_pvf_voting_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_thread_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_ump_max_individual_weight: sts.enumStruct({ + new: sts.bigint(), + }), + set_ump_service_total_weight: sts.enumStruct({ + new: sts.bigint(), + }), + set_validation_upgrade_cooldown: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ConfigurationCall = ConfigurationCall_set_bypass_consistency_check | ConfigurationCall_set_chain_availability_period | ConfigurationCall_set_code_retention_period | ConfigurationCall_set_dispute_conclusion_by_time_out_period | ConfigurationCall_set_dispute_max_spam_slots | ConfigurationCall_set_dispute_period | ConfigurationCall_set_dispute_post_conclusion_acceptance_period | ConfigurationCall_set_group_rotation_frequency | ConfigurationCall_set_hrmp_channel_max_capacity | ConfigurationCall_set_hrmp_channel_max_message_size | ConfigurationCall_set_hrmp_channel_max_total_size | ConfigurationCall_set_hrmp_max_message_num_per_candidate | ConfigurationCall_set_hrmp_max_parachain_inbound_channels | ConfigurationCall_set_hrmp_max_parachain_outbound_channels | ConfigurationCall_set_hrmp_max_parathread_inbound_channels | ConfigurationCall_set_hrmp_max_parathread_outbound_channels | ConfigurationCall_set_hrmp_open_request_ttl | ConfigurationCall_set_hrmp_recipient_deposit | ConfigurationCall_set_hrmp_sender_deposit | ConfigurationCall_set_max_code_size | ConfigurationCall_set_max_downward_message_size | ConfigurationCall_set_max_head_data_size | ConfigurationCall_set_max_pov_size | ConfigurationCall_set_max_upward_message_num_per_candidate | ConfigurationCall_set_max_upward_message_size | ConfigurationCall_set_max_upward_queue_count | ConfigurationCall_set_max_upward_queue_size | ConfigurationCall_set_max_validators | ConfigurationCall_set_max_validators_per_core | ConfigurationCall_set_minimum_validation_upgrade_delay | ConfigurationCall_set_n_delay_tranches | ConfigurationCall_set_needed_approvals | ConfigurationCall_set_no_show_slots | ConfigurationCall_set_parathread_cores | ConfigurationCall_set_parathread_retries | ConfigurationCall_set_pvf_checking_enabled | ConfigurationCall_set_pvf_voting_ttl | ConfigurationCall_set_relay_vrf_modulo_samples | ConfigurationCall_set_scheduling_lookahead | ConfigurationCall_set_thread_availability_period | ConfigurationCall_set_ump_max_individual_weight | ConfigurationCall_set_ump_service_total_weight | ConfigurationCall_set_validation_upgrade_cooldown | ConfigurationCall_set_validation_upgrade_delay | ConfigurationCall_set_zeroth_delay_tranche_width + +/** + * Setting this to true will disable consistency checks for the configuration setters. + * Use with caution. + */ +export interface ConfigurationCall_set_bypass_consistency_check { + __kind: 'set_bypass_consistency_check' + new: boolean +} + +/** + * Set the availability period for parachains. + */ +export interface ConfigurationCall_set_chain_availability_period { + __kind: 'set_chain_availability_period' + new: number +} + +/** + * Set the acceptance period for an included candidate. + */ +export interface ConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: number +} + +/** + * Set the dispute conclusion by time out period. + */ +export interface ConfigurationCall_set_dispute_conclusion_by_time_out_period { + __kind: 'set_dispute_conclusion_by_time_out_period' + new: number +} + +/** + * Set the maximum number of dispute spam slots. + */ +export interface ConfigurationCall_set_dispute_max_spam_slots { + __kind: 'set_dispute_max_spam_slots' + new: number +} + +/** + * Set the dispute period, in number of sessions to keep for disputes. + */ +export interface ConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: number +} + +/** + * Set the dispute post conclusion acceptance period. + */ +export interface ConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: number +} + +/** + * Set the parachain validator-group rotation frequency + */ +export interface ConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: number +} + +/** + * Sets the maximum number of messages allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * Sets the maximum size of a message that could ever be put into an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * Sets the maximum total size of messages in bytes allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * Sets the maximum number of outbound HRMP messages can be sent by a candidate. + */ +export interface ConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parachain is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parachain is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parathread is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_inbound_channels { + __kind: 'set_hrmp_max_parathread_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parathread is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_outbound_channels { + __kind: 'set_hrmp_max_parathread_outbound_channels' + new: number +} + +/** + * Sets the number of sessions after which an HRMP open channel request expires. + */ +export interface ConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * Sets the amount of funds that the recipient should provide for accepting opening an HRMP + * channel. + */ +export interface ConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: bigint +} + +/** + * Sets the amount of funds that the sender should provide for opening an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: bigint +} + +/** + * Set the max validation code size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * Set the critical downward message size. + */ +export interface ConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * Set the max head data size for paras. + */ +export interface ConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * Set the max POV block size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * Sets the maximum number of messages that a candidate can contain. + */ +export interface ConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum size of an upward message that can be sent by a candidate. + */ +export interface ConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * Sets the maximum items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * Sets the maximum total size of items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * Set the maximum number of validators to use in parachain consensus. + */ +export interface ConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * Set the maximum number of validators to assign to any core. + */ +export interface ConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * Sets the minimum delay between announcing the upgrade block for a parachain until the + * upgrade taking place. + * + * See the field documentation for information and constraints for the new value. + */ +export interface ConfigurationCall_set_minimum_validation_upgrade_delay { + __kind: 'set_minimum_validation_upgrade_delay' + new: number +} + +/** + * Set the total number of delay tranches. + */ +export interface ConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * Set the number of validators needed to approve a block. + */ +export interface ConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * Set the no show slots, in number of number of consensus slots. + * Must be at least 1. + */ +export interface ConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * Set the number of parathread execution cores. + */ +export interface ConfigurationCall_set_parathread_cores { + __kind: 'set_parathread_cores' + new: number +} + +/** + * Set the number of retries for a particular parathread. + */ +export interface ConfigurationCall_set_parathread_retries { + __kind: 'set_parathread_retries' + new: number +} + +/** + * Enable or disable PVF pre-checking. Consult the field documentation prior executing. + */ +export interface ConfigurationCall_set_pvf_checking_enabled { + __kind: 'set_pvf_checking_enabled' + new: boolean +} + +/** + * Set the number of session changes after which a PVF pre-checking voting is rejected. + */ +export interface ConfigurationCall_set_pvf_voting_ttl { + __kind: 'set_pvf_voting_ttl' + new: number +} + +/** + * Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion. + */ +export interface ConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * Set the scheduling lookahead, in expected number of blocks at peak throughput. + */ +export interface ConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * Set the availability period for parathreads. + */ +export interface ConfigurationCall_set_thread_availability_period { + __kind: 'set_thread_availability_period' + new: number +} + +/** + * Sets the maximum amount of weight any individual upward message may consume. + */ +export interface ConfigurationCall_set_ump_max_individual_weight { + __kind: 'set_ump_max_individual_weight' + new: bigint +} + +/** + * Sets the soft limit for the phase of dispatching dispatchable upward messages. + */ +export interface ConfigurationCall_set_ump_service_total_weight { + __kind: 'set_ump_service_total_weight' + new: bigint +} + +/** + * Set the validation upgrade cooldown. + */ +export interface ConfigurationCall_set_validation_upgrade_cooldown { + __kind: 'set_validation_upgrade_cooldown' + new: number +} + +/** + * Set the validation upgrade delay. + */ +export interface ConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: number +} + +/** + * Set the zeroth delay tranche width. + */ +export interface ConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: sts.bigint(), + vestingSchedule: sts.option(() => sts.tuple(() => [sts.bigint(), sts.bigint(), sts.number()])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId32), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId32 + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId32 + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: bigint + vestingSchedule?: ([bigint, bigint, number] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId32 | undefined) +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds + * after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is + * malicious or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_force_unreserve | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_all | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is not + * assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * Unreserve some balance from a user by force. + * + * Can only be called by ROOT. + */ +export interface BalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also alter the total issuance of the system (`TotalIssuance`) appropriately. + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: MultiAddress + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for input config + * types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex + * computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional check + * that the transfer will not kill the origin account. + * --------------------------------- + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: MultiAddress + value: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). # + * - O(1). Just like transfer, but reading the user's transferable balance first. + * # + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BagsListCall: sts.Type = sts.closedEnum(() => { + return { + put_in_front_of: sts.enumStruct({ + lighter: AccountId32, + }), + rebag: sts.enumStruct({ + dislocated: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BagsListCall = BagsListCall_put_in_front_of | BagsListCall_rebag + +/** + * Move the caller's Id directly in front of `lighter`. + * + * The dispatch origin for this call must be _Signed_ and can only be called by the Id of + * the account going in front of `lighter`. + * + * Only works if + * - both nodes are within the same bag, + * - and `origin` has a greater `VoteWeight` than `lighter`. + */ +export interface BagsListCall_put_in_front_of { + __kind: 'put_in_front_of' + lighter: AccountId32 +} + +/** + * Declare that some `dislocated` account has, through rewards or penalties, sufficiently + * changed its weight that it should properly fall into a different bag than its current + * one. + * + * Anyone can call this function about any potentially dislocated account. + * + * Will never return an error; if `dislocated` does not exist or doesn't need a rebag, then + * it is a noop and fees are still collected from `origin`. + */ +export interface BagsListCall_rebag { + __kind: 'rebag' + dislocated: AccountId32 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const EquivocationProof: sts.Type = sts.struct(() => { + return { + offender: sts.bytes(), + slot: Slot, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Slot = sts.bigint() + +export interface EquivocationProof { + offender: Bytes + slot: Slot + firstHeader: Header + secondHeader: Header +} + +export type Slot = bigint + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V1: sts.enumStruct({ + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + }), + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type NextConfigDescriptor = NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Plan an epoch config change. The epoch config change is recorded and will be enacted on + * the next call to `enact_epoch_change`. The config will be activated one epoch after. + * Multiple calls to this method will replace any existing planned config change that had + * not been enacted yet. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Cancel an in-progress auction. + * + * Can only be called by Root origin. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +export type Call = Call_Auctions | Call_Authorship | Call_Babe | Call_BagsList | Call_Balances | Call_Bounties | Call_Claims | Call_Configuration | Call_Council | Call_Crowdloan | Call_Democracy | Call_Dmp | Call_ElectionProviderMultiPhase | Call_Gilt | Call_Grandpa | Call_Hrmp | Call_Identity | Call_ImOnline | Call_Indices | Call_Initializer | Call_Multisig | Call_ParaInclusion | Call_ParaInherent | Call_Paras | Call_ParasDisputes | Call_ParasShared | Call_PhragmenElection | Call_Preimage | Call_Proxy | Call_Recovery | Call_Registrar | Call_Scheduler | Call_Session | Call_Slots | Call_Society | Call_Staking | Call_System | Call_TechnicalCommittee | Call_TechnicalMembership | Call_Timestamp | Call_Tips | Call_Treasury | Call_Ump | Call_Utility | Call_Vesting | Call_XcmPallet + +export interface Call_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Call_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Call_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Call_BagsList { + __kind: 'BagsList' + value: BagsListCall +} + +export interface Call_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Call_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Call_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Call_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Call_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Call_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Call_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Call_Dmp { + __kind: 'Dmp' + value: DmpCall +} + +export interface Call_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Call_Gilt { + __kind: 'Gilt' + value: GiltCall +} + +export interface Call_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Call_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Call_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Call_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Call_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Call_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Call_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Call_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Call_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Call_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Call_ParasDisputes { + __kind: 'ParasDisputes' + value: ParasDisputesCall +} + +export interface Call_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Call_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Call_Preimage { + __kind: 'Preimage' + value: PreimageCall +} + +export interface Call_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Call_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Call_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Call_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Call_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Call_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Call_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Call_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Call_System { + __kind: 'System' + value: SystemCall +} + +export interface Call_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Call_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Call_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Call_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Call_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Call_Ump { + __kind: 'Ump' + value: UmpCall +} + +export interface Call_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Call_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Call_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Society: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId32 = sts.bytes() diff --git a/squid/src/types/v9190.ts b/squid/src/types/v9190.ts new file mode 100644 index 00000000..6381c34a --- /dev/null +++ b/squid/src/types/v9190.ts @@ -0,0 +1,11747 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Call: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + BagsList: BagsListCall, + Balances: BalancesCall, + Bounties: BountiesCall, + ChildBounties: ChildBountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + Dmp: DmpCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + Gilt: GiltCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Initializer: InitializerCall, + Multisig: MultisigCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Paras: ParasCall, + ParasDisputes: ParasDisputesCall, + ParasShared: ParasSharedCall, + PhragmenElection: PhragmenElectionCall, + Preimage: PreimageCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Ump: UmpCall, + Utility: UtilityCall, + Vesting: VestingCall, + XcmPallet: XcmPalletCall, + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + execute: sts.enumStruct({ + message: Type_538, + maxWeight: sts.bigint(), + }), + force_default_xcm_version: sts.enumStruct({ + maybeXcmVersion: sts.option(() => sts.number()), + }), + force_subscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_unsubscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_xcm_version: sts.enumStruct({ + location: V1MultiLocation, + xcmVersion: sts.number(), + }), + limited_reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + limited_teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + send: sts.enumStruct({ + dest: VersionedMultiLocation, + message: VersionedXcm, + }), + teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + } +}) + +export const VersionedXcm: sts.Type = sts.closedEnum(() => { + return { + V0: V0Xcm, + V1: V1Xcm, + V2: sts.array(() => V2Instruction), + } +}) + +export const V2Instruction: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => V2Instruction), + SetErrorHandler: sts.array(() => V2Instruction), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const DoubleEncoded: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncoded { + encoded: Bytes +} + +export const V0OriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type V0OriginKind = V0OriginKind_Native | V0OriginKind_SovereignAccount | V0OriginKind_Superuser | V0OriginKind_Xcm + +export interface V0OriginKind_Native { + __kind: 'Native' +} + +export interface V0OriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface V0OriginKind_Superuser { + __kind: 'Superuser' +} + +export interface V0OriginKind_Xcm { + __kind: 'Xcm' +} + +export const V2Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V2Error])), + Null: sts.unit(), + Version: sts.number(), + } +}) + +export const V2Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + MaxWeightInvalid: sts.unit(), + MultiLocationFull: sts.unit(), + MultiLocationNotInvertible: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + WeightLimitReached: sts.bigint(), + WeightNotComputable: sts.unit(), + } +}) + +export type V2Error = V2Error_AssetNotFound | V2Error_BadOrigin | V2Error_Barrier | V2Error_DestinationUnsupported | V2Error_ExceedsMaxMessageSize | V2Error_FailedToDecode | V2Error_FailedToTransactAsset | V2Error_InvalidLocation | V2Error_LocationCannotHold | V2Error_MaxWeightInvalid | V2Error_MultiLocationFull | V2Error_MultiLocationNotInvertible | V2Error_NotHoldingFees | V2Error_NotWithdrawable | V2Error_Overflow | V2Error_TooExpensive | V2Error_Transport | V2Error_Trap | V2Error_UnhandledXcmVersion | V2Error_Unimplemented | V2Error_UnknownClaim | V2Error_Unroutable | V2Error_UntrustedReserveLocation | V2Error_UntrustedTeleportLocation | V2Error_WeightLimitReached | V2Error_WeightNotComputable + +export interface V2Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V2Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V2Error_Barrier { + __kind: 'Barrier' +} + +export interface V2Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V2Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V2Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V2Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V2Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V2Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V2Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V2Error_MultiLocationFull { + __kind: 'MultiLocationFull' +} + +export interface V2Error_MultiLocationNotInvertible { + __kind: 'MultiLocationNotInvertible' +} + +export interface V2Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V2Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V2Error_Overflow { + __kind: 'Overflow' +} + +export interface V2Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V2Error_Transport { + __kind: 'Transport' +} + +export interface V2Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V2Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V2Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V2Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V2Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V2Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V2Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: bigint +} + +export interface V2Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V2Response = V2Response_Assets | V2Response_ExecutionResult | V2Response_Null | V2Response_Version + +export interface V2Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V2Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V2Error] | undefined) +} + +export interface V2Response_Null { + __kind: 'Null' +} + +export interface V2Response_Version { + __kind: 'Version' + value: number +} + +export interface V1MultiAsset { + id: V1AssetId + fun: V1Fungibility +} + +export type V1Fungibility = V1Fungibility_Fungible | V1Fungibility_NonFungible + +export interface V1Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V1Fungibility_NonFungible { + __kind: 'NonFungible' + value: V1AssetInstance +} + +export type V1AssetInstance = V1AssetInstance_Array16 | V1AssetInstance_Array32 | V1AssetInstance_Array4 | V1AssetInstance_Array8 | V1AssetInstance_Blob | V1AssetInstance_Index | V1AssetInstance_Undefined + +export interface V1AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V1AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V1AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V1AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V1AssetInstance_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface V1AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V1AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V1AssetId = V1AssetId_Abstract | V1AssetId_Concrete + +export interface V1AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V1AssetId_Concrete { + __kind: 'Concrete' + value: V1MultiLocation +} + +export interface V1MultiLocation { + parents: number + interior: V1Junctions +} + +export type V1Junctions = V1Junctions_Here | V1Junctions_X1 | V1Junctions_X2 | V1Junctions_X3 | V1Junctions_X4 | V1Junctions_X5 | V1Junctions_X6 | V1Junctions_X7 | V1Junctions_X8 + +export interface V1Junctions_Here { + __kind: 'Here' +} + +export interface V1Junctions_X1 { + __kind: 'X1' + value: V1Junction +} + +export interface V1Junctions_X2 { + __kind: 'X2' + value: [V1Junction, V1Junction] +} + +export interface V1Junctions_X3 { + __kind: 'X3' + value: [V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X4 { + __kind: 'X4' + value: [V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X5 { + __kind: 'X5' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X6 { + __kind: 'X6' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X7 { + __kind: 'X7' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X8 { + __kind: 'X8' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export type V1Junction = V1Junction_AccountId32 | V1Junction_AccountIndex64 | V1Junction_AccountKey20 | V1Junction_GeneralIndex | V1Junction_GeneralKey | V1Junction_OnlyChild | V1Junction_PalletInstance | V1Junction_Parachain | V1Junction_Plurality + +export interface V1Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V1Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V1Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V1Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V1Junction_GeneralKey { + __kind: 'GeneralKey' + value: Bytes +} + +export interface V1Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V1Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V1Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V1Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0BodyPart = V0BodyPart_AtLeastProportion | V0BodyPart_Fraction | V0BodyPart_Members | V0BodyPart_MoreThanProportion | V0BodyPart_Voice + +export interface V0BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V0BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V0BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Voice { + __kind: 'Voice' +} + +export type V0BodyId = V0BodyId_Executive | V0BodyId_Index | V0BodyId_Judicial | V0BodyId_Legislative | V0BodyId_Named | V0BodyId_Technical | V0BodyId_Unit + +export interface V0BodyId_Executive { + __kind: 'Executive' +} + +export interface V0BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V0BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V0BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V0BodyId_Named { + __kind: 'Named' + value: Bytes +} + +export interface V0BodyId_Technical { + __kind: 'Technical' +} + +export interface V0BodyId_Unit { + __kind: 'Unit' +} + +export type V0NetworkId = V0NetworkId_Any | V0NetworkId_Kusama | V0NetworkId_Named | V0NetworkId_Polkadot + +export interface V0NetworkId_Any { + __kind: 'Any' +} + +export interface V0NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V0NetworkId_Named { + __kind: 'Named' + value: Bytes +} + +export interface V0NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export const V1Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V1Junction, + X2: sts.tuple(() => [V1Junction, V1Junction]), + X3: sts.tuple(() => [V1Junction, V1Junction, V1Junction]), + X4: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction]), + X5: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X6: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X7: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X8: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + } +}) + +export const V1Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.bytes(), + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export const V0BodyId: sts.Type = sts.closedEnum(() => { + return { + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: sts.bytes(), + Technical: sts.unit(), + Unit: sts.unit(), + } +}) + +export const V0NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: sts.bytes(), + Polkadot: sts.unit(), + } +}) + +export const V1MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V1MultiAsset), + Wild: V1WildMultiAsset, + } +}) + +export const V1WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllOf: sts.enumStruct({ + id: V1AssetId, + fun: V1WildFungibility, + }), + } +}) + +export const V1WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V1WildFungibility = V1WildFungibility_Fungible | V1WildFungibility_NonFungible + +export interface V1WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V1WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V1AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V1MultiLocation, + } +}) + +export type V1WildMultiAsset = V1WildMultiAsset_All | V1WildMultiAsset_AllOf + +export interface V1WildMultiAsset_All { + __kind: 'All' +} + +export interface V1WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V1AssetId + fun: V1WildFungibility +} + +export type V1MultiAssetFilter = V1MultiAssetFilter_Definite | V1MultiAssetFilter_Wild + +export interface V1MultiAssetFilter_Definite { + __kind: 'Definite' + value: V1MultiAsset[] +} + +export interface V1MultiAssetFilter_Wild { + __kind: 'Wild' + value: V1WildMultiAsset +} + +export const V1MultiAsset: sts.Type = sts.struct(() => { + return { + id: V1AssetId, + fun: V1Fungibility, + } +}) + +export const V1Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V1AssetInstance, + } +}) + +export const V1AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V2Instruction = V2Instruction_BuyExecution | V2Instruction_ClaimAsset | V2Instruction_ClearError | V2Instruction_ClearOrigin | V2Instruction_DepositAsset | V2Instruction_DepositReserveAsset | V2Instruction_DescendOrigin | V2Instruction_ExchangeAsset | V2Instruction_HrmpChannelAccepted | V2Instruction_HrmpChannelClosing | V2Instruction_HrmpNewChannelOpenRequest | V2Instruction_InitiateReserveWithdraw | V2Instruction_InitiateTeleport | V2Instruction_QueryHolding | V2Instruction_QueryResponse | V2Instruction_ReceiveTeleportedAsset | V2Instruction_RefundSurplus | V2Instruction_ReportError | V2Instruction_ReserveAssetDeposited | V2Instruction_SetAppendix | V2Instruction_SetErrorHandler | V2Instruction_SubscribeVersion | V2Instruction_Transact | V2Instruction_TransferAsset | V2Instruction_TransferReserveAsset | V2Instruction_Trap | V2Instruction_UnsubscribeVersion | V2Instruction_WithdrawAsset + +export interface V2Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface V2Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface V2Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V2Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V2Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V2Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface V2Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V2Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V2Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V2Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V2Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface V2Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface V2Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface V2Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V2Instruction_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface V2Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface V2Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V2Instruction[] +} + +export interface V2Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V2Instruction[] +} + +export interface V2Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V2Instruction_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V2Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V2Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V2Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export type V2WeightLimit = V2WeightLimit_Limited | V2WeightLimit_Unlimited + +export interface V2WeightLimit_Limited { + __kind: 'Limited' + value: bigint +} + +export interface V2WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V1Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: V1Xcm, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + } +}) + +export const V1Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => V1Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type V1Order = V1Order_BuyExecution | V1Order_DepositAsset | V1Order_DepositReserveAsset | V1Order_ExchangeAsset | V1Order_InitiateReserveWithdraw | V1Order_InitiateTeleport | V1Order_Noop | V1Order_QueryHolding + +export interface V1Order_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: V1Xcm[] +} + +export interface V1Order_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V1Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V1Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_Noop { + __kind: 'Noop' +} + +export interface V1Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export const V1Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + Version: sts.number(), + } +}) + +export type V1Response = V1Response_Assets | V1Response_Version + +export interface V1Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V1Response_Version { + __kind: 'Version' + value: number +} + +export type V1Xcm = V1Xcm_HrmpChannelAccepted | V1Xcm_HrmpChannelClosing | V1Xcm_HrmpNewChannelOpenRequest | V1Xcm_QueryResponse | V1Xcm_ReceiveTeleportedAsset | V1Xcm_RelayedFrom | V1Xcm_ReserveAssetDeposited | V1Xcm_SubscribeVersion | V1Xcm_Transact | V1Xcm_TransferAsset | V1Xcm_TransferReserveAsset | V1Xcm_UnsubscribeVersion | V1Xcm_WithdrawAsset + +export interface V1Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V1Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V1Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V1Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface V1Xcm_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: V1Xcm +} + +export interface V1Xcm_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V1Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V1Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V1Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Xcm_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V1Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export const V0Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: V0Xcm, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + } +}) + +export const V0Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => V0Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type V0Order = V0Order_BuyExecution | V0Order_DepositAsset | V0Order_DepositReserveAsset | V0Order_ExchangeAsset | V0Order_InitiateReserveWithdraw | V0Order_InitiateTeleport | V0Order_Null | V0Order_QueryHolding + +export interface V0Order_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: V0Xcm[] +} + +export interface V0Order_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface V0Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_Null { + __kind: 'Null' +} + +export interface V0Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type V0MultiLocation = V0MultiLocation_Null | V0MultiLocation_X1 | V0MultiLocation_X2 | V0MultiLocation_X3 | V0MultiLocation_X4 | V0MultiLocation_X5 | V0MultiLocation_X6 | V0MultiLocation_X7 | V0MultiLocation_X8 + +export interface V0MultiLocation_Null { + __kind: 'Null' +} + +export interface V0MultiLocation_X1 { + __kind: 'X1' + value: V0Junction +} + +export interface V0MultiLocation_X2 { + __kind: 'X2' + value: [V0Junction, V0Junction] +} + +export interface V0MultiLocation_X3 { + __kind: 'X3' + value: [V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X4 { + __kind: 'X4' + value: [V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X5 { + __kind: 'X5' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X6 { + __kind: 'X6' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X7 { + __kind: 'X7' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X8 { + __kind: 'X8' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export type V0Junction = V0Junction_AccountId32 | V0Junction_AccountIndex64 | V0Junction_AccountKey20 | V0Junction_GeneralIndex | V0Junction_GeneralKey | V0Junction_OnlyChild | V0Junction_PalletInstance | V0Junction_Parachain | V0Junction_Parent | V0Junction_Plurality + +export interface V0Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V0Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V0Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V0Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V0Junction_GeneralKey { + __kind: 'GeneralKey' + value: Bytes +} + +export interface V0Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V0Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V0Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V0Junction_Parent { + __kind: 'Parent' +} + +export interface V0Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0MultiAsset = V0MultiAsset_AbstractFungible | V0MultiAsset_AbstractNonFungible | V0MultiAsset_All | V0MultiAsset_AllAbstractFungible | V0MultiAsset_AllAbstractNonFungible | V0MultiAsset_AllConcreteFungible | V0MultiAsset_AllConcreteNonFungible | V0MultiAsset_AllFungible | V0MultiAsset_AllNonFungible | V0MultiAsset_ConcreteFungible | V0MultiAsset_ConcreteNonFungible | V0MultiAsset_None + +export interface V0MultiAsset_AbstractFungible { + __kind: 'AbstractFungible' + id: Bytes + amount: bigint +} + +export interface V0MultiAsset_AbstractNonFungible { + __kind: 'AbstractNonFungible' + class: Bytes + instance: V1AssetInstance +} + +export interface V0MultiAsset_All { + __kind: 'All' +} + +export interface V0MultiAsset_AllAbstractFungible { + __kind: 'AllAbstractFungible' + id: Bytes +} + +export interface V0MultiAsset_AllAbstractNonFungible { + __kind: 'AllAbstractNonFungible' + class: Bytes +} + +export interface V0MultiAsset_AllConcreteFungible { + __kind: 'AllConcreteFungible' + id: V0MultiLocation +} + +export interface V0MultiAsset_AllConcreteNonFungible { + __kind: 'AllConcreteNonFungible' + class: V0MultiLocation +} + +export interface V0MultiAsset_AllFungible { + __kind: 'AllFungible' +} + +export interface V0MultiAsset_AllNonFungible { + __kind: 'AllNonFungible' +} + +export interface V0MultiAsset_ConcreteFungible { + __kind: 'ConcreteFungible' + id: V0MultiLocation + amount: bigint +} + +export interface V0MultiAsset_ConcreteNonFungible { + __kind: 'ConcreteNonFungible' + class: V0MultiLocation + instance: V1AssetInstance +} + +export interface V0MultiAsset_None { + __kind: 'None' +} + +export const V0MultiAsset: sts.Type = sts.closedEnum(() => { + return { + AbstractFungible: sts.enumStruct({ + id: sts.bytes(), + amount: sts.bigint(), + }), + AbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + instance: V1AssetInstance, + }), + All: sts.unit(), + AllAbstractFungible: sts.enumStruct({ + id: sts.bytes(), + }), + AllAbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + }), + AllConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + }), + AllConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + }), + AllFungible: sts.unit(), + AllNonFungible: sts.unit(), + ConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + amount: sts.bigint(), + }), + ConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + instance: V1AssetInstance, + }), + None: sts.unit(), + } +}) + +export const V0MultiLocation: sts.Type = sts.closedEnum(() => { + return { + Null: sts.unit(), + X1: V0Junction, + X2: sts.tuple(() => [V0Junction, V0Junction]), + X3: sts.tuple(() => [V0Junction, V0Junction, V0Junction]), + X4: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction]), + X5: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X6: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X7: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X8: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + } +}) + +export const V0Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.bytes(), + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Parent: sts.unit(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V0MultiAsset), + } +}) + +export type V0Response = V0Response_Assets + +export interface V0Response_Assets { + __kind: 'Assets' + value: V0MultiAsset[] +} + +export type V0Xcm = V0Xcm_HrmpChannelAccepted | V0Xcm_HrmpChannelClosing | V0Xcm_HrmpNewChannelOpenRequest | V0Xcm_QueryResponse | V0Xcm_RelayedFrom | V0Xcm_ReserveAssetDeposit | V0Xcm_TeleportAsset | V0Xcm_Transact | V0Xcm_TransferAsset | V0Xcm_TransferReserveAsset | V0Xcm_WithdrawAsset + +export interface V0Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V0Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V0Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V0Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface V0Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: V0Xcm +} + +export interface V0Xcm_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V0Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export type VersionedXcm = VersionedXcm_V0 | VersionedXcm_V1 | VersionedXcm_V2 + +export interface VersionedXcm_V0 { + __kind: 'V0' + value: V0Xcm +} + +export interface VersionedXcm_V1 { + __kind: 'V1' + value: V1Xcm +} + +export interface VersionedXcm_V2 { + __kind: 'V2' + value: V2Instruction[] +} + +export const V2WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: sts.bigint(), + Unlimited: sts.unit(), + } +}) + +export const VersionedMultiAssets: sts.Type = sts.closedEnum(() => { + return { + V0: sts.array(() => V0MultiAsset), + V1: sts.array(() => V1MultiAsset), + } +}) + +export type VersionedMultiAssets = VersionedMultiAssets_V0 | VersionedMultiAssets_V1 + +export interface VersionedMultiAssets_V0 { + __kind: 'V0' + value: V0MultiAsset[] +} + +export interface VersionedMultiAssets_V1 { + __kind: 'V1' + value: V1MultiAsset[] +} + +export const V1MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V1Junctions, + } +}) + +export const VersionedMultiLocation: sts.Type = sts.closedEnum(() => { + return { + V0: V0MultiLocation, + V1: V1MultiLocation, + } +}) + +export type VersionedMultiLocation = VersionedMultiLocation_V0 | VersionedMultiLocation_V1 + +export interface VersionedMultiLocation_V0 { + __kind: 'V0' + value: V0MultiLocation +} + +export interface VersionedMultiLocation_V1 { + __kind: 'V1' + value: V1MultiLocation +} + +export const Type_538: sts.Type = sts.closedEnum(() => { + return { + V0: Type_539, + V1: Type_544, + V2: sts.array(() => Type_550), + } +}) + +export const Type_550: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => Type_550), + SetErrorHandler: sts.array(() => Type_550), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_543, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const Type_543: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface Type_543 { + encoded: Bytes +} + +export type Type_550 = Type_550_BuyExecution | Type_550_ClaimAsset | Type_550_ClearError | Type_550_ClearOrigin | Type_550_DepositAsset | Type_550_DepositReserveAsset | Type_550_DescendOrigin | Type_550_ExchangeAsset | Type_550_HrmpChannelAccepted | Type_550_HrmpChannelClosing | Type_550_HrmpNewChannelOpenRequest | Type_550_InitiateReserveWithdraw | Type_550_InitiateTeleport | Type_550_QueryHolding | Type_550_QueryResponse | Type_550_ReceiveTeleportedAsset | Type_550_RefundSurplus | Type_550_ReportError | Type_550_ReserveAssetDeposited | Type_550_SetAppendix | Type_550_SetErrorHandler | Type_550_SubscribeVersion | Type_550_Transact | Type_550_TransferAsset | Type_550_TransferReserveAsset | Type_550_Trap | Type_550_UnsubscribeVersion | Type_550_WithdrawAsset + +export interface Type_550_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface Type_550_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface Type_550_ClearError { + __kind: 'ClearError' +} + +export interface Type_550_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_550_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_550_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_550_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface Type_550_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_550_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_550_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_550_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_550_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_550_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_550_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface Type_550_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface Type_550_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface Type_550_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_550_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface Type_550_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface Type_550_SetAppendix { + __kind: 'SetAppendix' + value: Type_550[] +} + +export interface Type_550_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_550[] +} + +export interface Type_550_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_550_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_543 +} + +export interface Type_550_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_550_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_550_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_550_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_550_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export const Type_544: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_546), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: Type_544, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_546), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_543, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_546), + }), + } +}) + +export const Type_546: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => Type_544), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type Type_546 = Type_546_BuyExecution | Type_546_DepositAsset | Type_546_DepositReserveAsset | Type_546_ExchangeAsset | Type_546_InitiateReserveWithdraw | Type_546_InitiateTeleport | Type_546_Noop | Type_546_QueryHolding + +export interface Type_546_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: Type_544[] +} + +export interface Type_546_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_546_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_546_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_546_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface Type_546_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_546_Noop { + __kind: 'Noop' +} + +export interface Type_546_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export type Type_544 = Type_544_HrmpChannelAccepted | Type_544_HrmpChannelClosing | Type_544_HrmpNewChannelOpenRequest | Type_544_QueryResponse | Type_544_ReceiveTeleportedAsset | Type_544_RelayedFrom | Type_544_ReserveAssetDeposited | Type_544_SubscribeVersion | Type_544_Transact | Type_544_TransferAsset | Type_544_TransferReserveAsset | Type_544_UnsubscribeVersion | Type_544_WithdrawAsset + +export interface Type_544_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_544_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_544_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_544_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface Type_544_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: Type_546[] +} + +export interface Type_544_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: Type_544 +} + +export interface Type_544_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: Type_546[] +} + +export interface Type_544_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_544_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_543 +} + +export interface Type_544_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_544_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_544_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_544_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: Type_546[] +} + +export const Type_539: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: Type_539, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_541), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_541), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_543, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_541), + }), + } +}) + +export const Type_541: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => Type_539), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type Type_541 = Type_541_BuyExecution | Type_541_DepositAsset | Type_541_DepositReserveAsset | Type_541_ExchangeAsset | Type_541_InitiateReserveWithdraw | Type_541_InitiateTeleport | Type_541_Null | Type_541_QueryHolding + +export interface Type_541_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: Type_539[] +} + +export interface Type_541_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_541_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_541_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface Type_541_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface Type_541_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_541_Null { + __kind: 'Null' +} + +export interface Type_541_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type Type_539 = Type_539_HrmpChannelAccepted | Type_539_HrmpChannelClosing | Type_539_HrmpNewChannelOpenRequest | Type_539_QueryResponse | Type_539_RelayedFrom | Type_539_ReserveAssetDeposit | Type_539_TeleportAsset | Type_539_Transact | Type_539_TransferAsset | Type_539_TransferReserveAsset | Type_539_WithdrawAsset + +export interface Type_539_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_539_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_539_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_539_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface Type_539_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: Type_539 +} + +export interface Type_539_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: Type_541[] +} + +export interface Type_539_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: Type_541[] +} + +export interface Type_539_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_543 +} + +export interface Type_539_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_539_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_539_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: Type_541[] +} + +export type Type_538 = Type_538_V0 | Type_538_V1 | Type_538_V2 + +export interface Type_538_V0 { + __kind: 'V0' + value: Type_539 +} + +export interface Type_538_V1 { + __kind: 'V1' + value: Type_544 +} + +export interface Type_538_V2 { + __kind: 'V2' + value: Type_550[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type XcmPalletCall = XcmPalletCall_execute | XcmPalletCall_force_default_xcm_version | XcmPalletCall_force_subscribe_version_notify | XcmPalletCall_force_unsubscribe_version_notify | XcmPalletCall_force_xcm_version | XcmPalletCall_limited_reserve_transfer_assets | XcmPalletCall_limited_teleport_assets | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets + +/** + * Execute an XCM message from a local, signed, origin. + * + * An event is deposited indicating whether `msg` could be executed completely or only + * partially. + * + * No more than `max_weight` will be used in its attempted execution. If this is less than the + * maximum amount of weight that the message could take to be executed, then no execution + * attempt will be made. + * + * NOTE: A successful return to this does *not* imply that the `msg` was executed successfully + * to completion; only that *some* of it was executed. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Type_538 + maxWeight: bigint +} + +/** + * Set a safe XCM version (the version that XCM should be encoded with if the most recent + * version a destination can accept is unknown). + * + * - `origin`: Must be Root. + * - `maybe_xcm_version`: The default XCM encoding version, or `None` to disable. + */ +export interface XcmPalletCall_force_default_xcm_version { + __kind: 'force_default_xcm_version' + maybeXcmVersion?: (number | undefined) +} + +/** + * Ask a location to notify us regarding their XCM version and any changes to it. + * + * - `origin`: Must be Root. + * - `location`: The location to which we should subscribe for XCM version notifications. + */ +export interface XcmPalletCall_force_subscribe_version_notify { + __kind: 'force_subscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Require that a particular destination should no longer notify us regarding any XCM + * version changes. + * + * - `origin`: Must be Root. + * - `location`: The location to which we are currently subscribed for XCM version + * notifications which we no longer desire. + */ +export interface XcmPalletCall_force_unsubscribe_version_notify { + __kind: 'force_unsubscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Extoll that a particular destination can be communicated with through a particular + * version of XCM. + * + * - `origin`: Must be Root. + * - `location`: The destination that is being described. + * - `xcm_version`: The latest version of XCM that `location` supports. + */ +export interface XcmPalletCall_force_xcm_version { + __kind: 'force_xcm_version' + location: V1MultiLocation + xcmVersion: number +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination + * chain and forward a notification XCM. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight + * is needed than `weight_limit`, then the operation will fail and the assets send may be + * at risk. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_reserve_transfer_assets { + __kind: 'limited_reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight + * is needed than `weight_limit`, then the operation will fail and the assets send may be + * at risk. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_teleport_assets { + __kind: 'limited_teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination + * chain and forward a notification XCM. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, + * with all fees taken as needed from the asset. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +export interface XcmPalletCall_send { + __kind: 'send' + dest: VersionedMultiLocation + message: VersionedXcm +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, + * with all fees taken as needed from the asset. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: MultiAddress, + target: MultiAddress, + schedule: VestingInfo, + }), + merge_schedules: sts.enumStruct({ + schedule1Index: sts.number(), + schedule2Index: sts.number(), + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: MultiAddress, + }), + vested_transfer: sts.enumStruct({ + target: MultiAddress, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: sts.bigint(), + perBlock: sts.bigint(), + startingBlock: sts.number(), + } +}) + +export interface VestingInfo { + locked: bigint + perBlock: bigint + startingBlock: number +} + +export const MultiAddress: sts.Type = sts.closedEnum(() => { + return { + Address20: sts.bytes(), + Address32: sts.bytes(), + Id: AccountId32, + Index: sts.unit(), + Raw: sts.bytes(), + } +}) + +export type MultiAddress = MultiAddress_Address20 | MultiAddress_Address32 | MultiAddress_Id | MultiAddress_Index | MultiAddress_Raw + +export interface MultiAddress_Address20 { + __kind: 'Address20' + value: Bytes +} + +export interface MultiAddress_Address32 { + __kind: 'Address32' + value: Bytes +} + +export interface MultiAddress_Id { + __kind: 'Id' + value: AccountId32 +} + +export interface MultiAddress_Index { + __kind: 'Index' +} + +export interface MultiAddress_Raw { + __kind: 'Raw' + value: Bytes +} + +export type AccountId32 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_merge_schedules | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: MultiAddress + target: MultiAddress + schedule: VestingInfo +} + +/** + * Merge two vesting schedules together, creating a new vesting schedule that unlocks over + * the highest possible start and end blocks. If both schedules have already started the + * current block will be used as the schedule start; with the caveat that if one schedule + * is finished by the current block, the other will be treated as the new merged schedule, + * unmodified. + * + * NOTE: If `schedule1_index == schedule2_index` this is a no-op. + * NOTE: This will unlock all schedules through the current block prior to merging. + * NOTE: If both schedules have ended by the current block, no new schedule will be created + * and both will be removed. + * + * Merged schedule attributes: + * - `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block, + * current_block)`. + * - `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`. + * - `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`. + * + * The dispatch origin for this call must be _Signed_. + * + * - `schedule1_index`: index of the first schedule to merge. + * - `schedule2_index`: index of the second schedule to merge. + */ +export interface VestingCall_merge_schedules { + __kind: 'merge_schedules' + schedule1Index: number + schedule2Index: number +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: MultiAddress +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account receiving the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: MultiAddress + schedule: VestingInfo +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Call, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Call), + }), + dispatch_as: sts.enumStruct({ + asOrigin: OriginCaller, + call: Call, + }), + } +}) + +export const OriginCaller: sts.Type = sts.closedEnum(() => { + return { + Council: Type_329, + ParachainsOrigin: Origin, + TechnicalCommittee: Type_330, + Void: Void, + XcmPallet: Type_332, + system: RawOrigin, + } +}) + +export const RawOrigin: sts.Type = sts.closedEnum(() => { + return { + None: sts.unit(), + Root: sts.unit(), + Signed: AccountId32, + } +}) + +export type RawOrigin = RawOrigin_None | RawOrigin_Root | RawOrigin_Signed + +export interface RawOrigin_None { + __kind: 'None' +} + +export interface RawOrigin_Root { + __kind: 'Root' +} + +export interface RawOrigin_Signed { + __kind: 'Signed' + value: AccountId32 +} + +export const Type_332: sts.Type = sts.closedEnum(() => { + return { + Response: V1MultiLocation, + Xcm: V1MultiLocation, + } +}) + +export type Type_332 = Type_332_Response | Type_332_Xcm + +export interface Type_332_Response { + __kind: 'Response' + value: V1MultiLocation +} + +export interface Type_332_Xcm { + __kind: 'Xcm' + value: V1MultiLocation +} + +export const Void: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Void = never + +export const Type_330: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_330 = Type_330_Member | Type_330_Members | Type_330__Phantom + +export interface Type_330_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_330_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_330__Phantom { + __kind: '_Phantom' +} + +export const Origin: sts.Type = sts.closedEnum(() => { + return { + Parachain: Id, + } +}) + +export const Id = sts.number() + +export type Origin = Origin_Parachain + +export interface Origin_Parachain { + __kind: 'Parachain' + value: Id +} + +export type Id = number + +export const Type_329: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_329 = Type_329_Member | Type_329_Members | Type_329__Phantom + +export interface Type_329_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_329_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_329__Phantom { + __kind: '_Phantom' +} + +export type OriginCaller = OriginCaller_Council | OriginCaller_ParachainsOrigin | OriginCaller_TechnicalCommittee | OriginCaller_Void | OriginCaller_XcmPallet | OriginCaller_system + +export interface OriginCaller_Council { + __kind: 'Council' + value: Type_329 +} + +export interface OriginCaller_ParachainsOrigin { + __kind: 'ParachainsOrigin' + value: Origin +} + +export interface OriginCaller_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: Type_330 +} + +export interface OriginCaller_Void { + __kind: 'Void' + value: Void +} + +export interface OriginCaller_XcmPallet { + __kind: 'XcmPallet' + value: Type_332 +} + +export interface OriginCaller_system { + __kind: 'system' + value: RawOrigin +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all | UtilityCall_dispatch_as + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Call +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Call[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Call[] +} + +/** + * Dispatches a function call with a provided origin. + * + * The dispatch origin for this call must be _Root_. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB write (event). + * - Weight of derivative `call` execution + T::WeightInfo::dispatch_as(). + * # + */ +export interface UtilityCall_dispatch_as { + __kind: 'dispatch_as' + asOrigin: OriginCaller + call: Call +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UmpCall: sts.Type = sts.closedEnum(() => { + return { + service_overweight: sts.enumStruct({ + index: sts.bigint(), + weightLimit: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UmpCall = UmpCall_service_overweight + +/** + * Service a single overweight upward message. + * + * - `origin`: Must pass `ExecuteOverweightOrigin`. + * - `index`: The index of the overweight message to service. + * - `weight_limit`: The amount of weight that message execution may take. + * + * Errors: + * - `UnknownMessageIndex`: Message of `index` is unknown. + * - `WeightOverLimit`: Message execution may use greater than `weight_limit`. + * + * Events: + * - `OverweightServiced`: On success. + */ +export interface UmpCall_service_overweight { + __kind: 'service_overweight' + index: bigint + weightLimit: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: MultiAddress, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: MultiAddress +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TipsCall: sts.Type = sts.closedEnum(() => { + return { + close_tip: sts.enumStruct({ + hash: H256, + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId32, + }), + retract_tip: sts.enumStruct({ + hash: H256, + }), + slash_tip: sts.enumStruct({ + hash: H256, + }), + tip: sts.enumStruct({ + hash: H256, + tipValue: sts.bigint(), + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId32, + tipValue: sts.bigint(), + }), + } +}) + +export const H256 = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TipsCall = TipsCall_close_tip | TipsCall_report_awesome | TipsCall_retract_tip | TipsCall_slash_tip | TipsCall_tip | TipsCall_tip_new + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost + * depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TipsCall_close_tip { + __kind: 'close_tip' + hash: H256 +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId32 +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TipsCall_retract_tip { + __kind: 'retract_tip' + hash: H256 +} + +/** + * Remove and slash an already-open tip. + * + * May only be called from `T::RejectOrigin`. + * + * As a result, the finder is slashed and the deposits are lost. + * + * Emits `TipSlashed` if successful. + * + * # + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * # + */ +export interface TipsCall_slash_tip { + __kind: 'slash_tip' + hash: H256 +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`, insert tip and check closing, `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TipsCall_tip { + __kind: 'tip' + hash: H256 + tipValue: bigint +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of + * `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId32 + tipValue: bigint +} + +export type H256 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in + * `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId32, + }), + change_key: sts.enumStruct({ + new: AccountId32, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId32, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId32), + }), + set_prime: sts.enumStruct({ + who: AccountId32, + }), + swap_member: sts.enumStruct({ + remove: AccountId32, + add: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId32 +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId32 +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId32 +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId32[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId32 +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId32 + add: AccountId32 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: sts.bytes(), + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => sts.bytes()), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + }), + } +}) + +export const Perbill = sts.number() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Bytes + subkeys: number +} + +/** + * Kill some items from storage. + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Bytes[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Make some on-chain remark and emit event. + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is + * expensive). + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very + * expensive. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full + * block. # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: [Bytes, Bytes][] +} + +export type Perbill = number + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: MultiAddress, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: sts.number(), + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + controller: AccountId32, + }), + force_apply_min_commission: sts.enumStruct({ + validatorStash: AccountId32, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => MultiAddress), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => MultiAddress), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + }), + reap_stash: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: MultiAddress, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId32), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_staking_configs: sts.enumStruct({ + minNominatorBond: ConfigOp, + minValidatorBond: ConfigOp, + maxNominatorCount: Type_245, + maxValidatorCount: Type_245, + chillThreshold: Type_246, + minCommission: Type_247, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export const Type_247: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export type Type_247 = Type_247_Noop | Type_247_Remove | Type_247_Set + +export interface Type_247_Noop { + __kind: 'Noop' +} + +export interface Type_247_Remove { + __kind: 'Remove' +} + +export interface Type_247_Set { + __kind: 'Set' + value: Perbill +} + +export const Type_246: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Percent, + } +}) + +export type Type_246 = Type_246_Noop | Type_246_Remove | Type_246_Set + +export interface Type_246_Noop { + __kind: 'Noop' +} + +export interface Type_246_Remove { + __kind: 'Remove' +} + +export interface Type_246_Set { + __kind: 'Set' + value: Percent +} + +export type Percent = number + +export const Type_245: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_245 = Type_245_Noop | Type_245_Remove | Type_245_Set + +export interface Type_245_Noop { + __kind: 'Noop' +} + +export interface Type_245_Remove { + __kind: 'Remove' +} + +export interface Type_245_Set { + __kind: 'Set' + value: number +} + +export const ConfigOp: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type ConfigOp = ConfigOp_Noop | ConfigOp_Remove | ConfigOp_Set + +export interface ConfigOp_Noop { + __kind: 'Noop' +} + +export interface ConfigOp_Remove { + __kind: 'Remove' +} + +export interface ConfigOp_Set { + __kind: 'Set' + value: bigint +} + +export const Percent = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_force_apply_min_commission | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_staking_configs | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: MultiAddress + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose + * any limitation on the amount that can be added. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: number + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Declare a `controller` to stop participating as either a validator or nominator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_, but can be called by anyone. + * + * If the caller is the same as the controller being targeted, then no further checks are + * enforced, and this function behaves just like `chill`. + * + * If the caller is different than the controller being targeted, the following conditions + * must be met: + * + * * `controller` must belong to a nominator who has become non-decodable, + * + * Or: + * + * * A `ChillThreshold` must be set and checked which defines how close to the max + * nominators or validators we must reach before users can start chilling one-another. + * * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine + * how close we are to the threshold. + * * A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines + * if this is a person that should be chilled because they have not met the threshold + * bond required. + * + * This can be helpful if bond requirements are updated, and we need to remove old users + * who do not satisfy these requirements. + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + controller: AccountId32 +} + +/** + * Force a validator to have at least the minimum commission. This will not affect a + * validator who already has a commission greater than or equal to the minimum. Any account + * can call this. + */ +export interface StakingCall_force_apply_min_commission { + __kind: 'force_apply_min_commission' + validatorStash: AccountId32 +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * Thus the election process may be ongoing when this is called. In this case the + * election will continue until the next era is triggered. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: MultiAddress[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (T::MaxNominations). + * - Both the reads and writes follow a similar pattern. + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: MultiAddress[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId32 + era: number +} + +/** + * Remove all data structures concerning a staker/stash once it is at a state where it can + * be considered `dust` in the staking system. The requirements are: + * + * 1. the `total_balance` of the stash is below existential deposit. + * 2. or, the `ledger.total` of the stash is below existential deposit. + * + * The former can happen in cases like a slash; the latter when a fully unbonded account + * is still receiving staking rewards in `RewardDestination::Staked`. + * + * It can be called by anyone, as long as `stash` meets the above requirements. + * + * Refunds the transaction fees upon successful execution. + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MaxUnlockingChunks`. + * - Storage changes: Can't increase storage, only decrease it. + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: MultiAddress +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. This + * should report all the storage items that will be deleted by clearing old era history. + * Needed to report an accurate weight for the dispatch. Trusted by `Root` to report an + * accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Weight: O(E) + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, + * ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId32[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Update the various staking configurations . + * + * * `min_nominator_bond`: The minimum active bond needed to be a nominator. + * * `min_validator_bond`: The minimum active bond needed to be a validator. + * * `max_nominator_count`: The max number of users who can be a nominator at once. When + * set to `None`, no limit is enforced. + * * `max_validator_count`: The max number of users who can be a validator at once. When + * set to `None`, no limit is enforced. + * * `chill_threshold`: The ratio of `max_nominator_count` or `max_validator_count` which + * should be filled in order for the `chill_other` transaction to work. + * * `min_commission`: The minimum amount of commission that each validators must maintain. + * This is checked only upon calling `validate`. Existing validators are not affected. + * + * Origin must be Root to call this function. + * + * NOTE: Existing nominators and validators will not be affected by this update. + * to kick people under the new limits, `chill_other` should be called. + */ +export interface StakingCall_set_staking_configs { + __kind: 'set_staking_configs' + minNominatorBond: ConfigOp + minValidatorBond: ConfigOp + maxNominatorCount: Type_245 + maxValidatorCount: Type_245 + chillThreshold: Type_246 + minCommission: Type_247 +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * If a user encounters the `InsufficientBond` error when calling this extrinsic, + * they should call `chill` first in order to free up their bonded funds. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * Complexity O(S) where S is the number of slashing spans to remove + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: sts.bigint(), + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId32, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId32, + judgement: Type_375, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId32, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: MultiAddress, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId32, + value: sts.bigint(), + tip: sts.bigint(), + }), + } +}) + +export const Type_375: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export type Type_375 = Type_375_Approve | Type_375_Rebid | Type_375_Reject + +export interface Type_375_Approve { + __kind: 'Approve' +} + +export interface Type_375_Rebid { + __kind: 'Rebid' +} + +export interface Type_375_Reject { + __kind: 'Reject' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: bigint +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * pallet to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId32 + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId32 + judgement: Type_375 +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin forgives + * (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to + * society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId32 + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured + * payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be approved (`true`) or + * rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: MultiAddress + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId32 + value: bigint + tip: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: Id, + }), + force_lease: sts.enumStruct({ + para: Id, + leaser: AccountId32, + amount: sts.bigint(), + periodBegin: sts.number(), + periodCount: sts.number(), + }), + trigger_onboard: sts.enumStruct({ + para: Id, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * Clear all leases for a Para Id, refunding any deposits back to the original owners. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: Id +} + +/** + * Just a connect into the `lease_out` call, in case Root wants to force some lease to happen + * independently of any other on-chain mechanism to use it. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: Id + leaser: AccountId32 + amount: bigint + periodBegin: number + periodCount: number +} + +/** + * Try to onboard a parachain that has a lease for the current lease period. + * + * This function can be useful if there was some state issue with a para that should + * have onboarded, but was unable to. As long as they have a lease period, we can + * let them onboard from here. + * + * Origin must be signed, but can be called by anyone. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: SessionKeys, + proof: sts.bytes(), + }), + } +}) + +export const SessionKeys: sts.Type = sts.struct(() => { + return { + grandpa: Public, + babe: sts.bytes(), + imOnline: sts.bytes(), + paraValidator: sts.bytes(), + paraAssignment: sts.bytes(), + authorityDiscovery: sts.bytes(), + } +}) + +export const Public = sts.bytes() + +export interface SessionKeys { + grandpa: Public + babe: Bytes + imOnline: Bytes + paraValidator: Bytes + paraAssignment: Bytes + authorityDiscovery: Bytes +} + +export type Public = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be Signed and the account must be either be + * convertible to a validator ID using the chain's typical addressing system (this usually + * means being a controller account) or directly convertible into a validator ID (which + * usually means being a stash account). + * + * # + * - Complexity: `O(1)` in number of key types. Actual cost depends on the number of length + * of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)`. Actual cost depends on the number of length of + * `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: SessionKeys + proof: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: sts.number(), + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + schedule_after: sts.enumStruct({ + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + } +}) + +export const MaybeHashed: sts.Type = sts.closedEnum(() => { + return { + Hash: H256, + Value: Call, + } +}) + +export type MaybeHashed = MaybeHashed_Hash | MaybeHashed_Value + +export interface MaybeHashed_Hash { + __kind: 'Hash' + value: H256 +} + +export interface MaybeHashed_Value { + __kind: 'Value' + value: Call +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: number + index: number +} + +/** + * Cancel a named scheduled task. + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Schedule a named task. + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`](Self::schedule_named). + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + deregister: sts.enumStruct({ + id: Id, + }), + force_register: sts.enumStruct({ + who: AccountId32, + deposit: sts.bigint(), + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + force_remove_lock: sts.enumStruct({ + para: Id, + }), + register: sts.enumStruct({ + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + reserve: sts.unit(), + swap: sts.enumStruct({ + id: Id, + other: Id, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RegistrarCall = RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_force_remove_lock | RegistrarCall_register | RegistrarCall_reserve | RegistrarCall_swap + +/** + * Deregister a Para Id, freeing all data and returning any deposit. + * + * The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: Id +} + +/** + * Force the registration of a Para Id on the relay chain. + * + * This function must be called by a Root origin. + * + * The deposit taken can be specified for this registration. Any `ParaId` + * can be registered, including sub-1000 IDs which are System Parachains. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId32 + deposit: bigint + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Remove a manager lock from a para. This will allow the manager of a + * previously locked para to deregister or swap a para without using governance. + * + * Can only be called by the Root origin. + */ +export interface RegistrarCall_force_remove_lock { + __kind: 'force_remove_lock' + para: Id +} + +/** + * Register head data and validation code for a reserved Para Id. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. + * - `id`: The para ID. Must be owned/managed by the `origin` signing account. + * - `genesis_head`: The genesis head data of the parachain/thread. + * - `validation_code`: The initial validation code of the parachain/thread. + * + * ## Deposits/Fees + * The origin signed account must reserve a corresponding deposit for the registration. Anything already + * reserved previously for this para ID is accounted for. + * + * ## Events + * The `Registered` event is emitted in case of success. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Reserve a Para Id on the relay chain. + * + * This function will reserve a new Para Id to be owned/managed by the origin account. + * The origin account is able to register head data and validation code using `register` to create + * a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID. + * + * ## Deposits/Fees + * The origin must reserve a deposit of `ParaDeposit` for the registration. + * + * ## Events + * The `Reserved` event is emitted in case of success, which provides the ID reserved for use. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * Swap a parachain with another parachain or parathread. + * + * The origin must be Root, the `para` owner, or the `para` itself. + * + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: Id + other: Id +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId32, + call: Call, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId32, + }), + claim_recovery: sts.enumStruct({ + account: AccountId32, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId32, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId32), + threshold: sts.number(), + delayPeriod: sts.number(), + }), + initiate_recovery: sts.enumStruct({ + account: AccountId32, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId32, + rescuer: AccountId32, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId32, + rescuer: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + * + * # + * - The weight of the `call` + 10,000. + * - One storage lookup to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId32 + call: Call +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + * + * # + * - One storage mutation to check account is recovered by `who`. O(1) + * # + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId32 +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully recovered by + * you. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + V) + * # + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId32 +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + * + * # + * Key: V (len of vouching friends) + * - One storage read/remove to get the active recovery process. O(1), Codec O(V) + * - One balance call to repatriate reserved. O(X) + * - One event. + * + * Total Complexity: O(V + X) + * # + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId32 +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. Should be + * ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt before the + * account can be recovered. Should be less than or equal to the length of the list of + * friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized that + * needs to pass before the account can be recovered. + * + * # + * - Key: F (len of friends) + * - One storage read to check that account is not already recoverable. O(1). + * - A check that the friends list is sorted and unique. O(F) + * - One currency reserve operation. O(X) + * - One storage write. O(1). Codec O(F). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId32[] + threshold: number + delayPeriod: number +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account needs to be + * recoverable (i.e. have a recovery configuration). + * + * # + * - One storage read to check that account is recoverable. O(F) + * - One storage read to check that this recovery process hasn't already started. O(1) + * - One currency reserve operation. O(X) + * - One storage read to get the current block number. O(1) + * - One storage write. O(1). + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId32 +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + * + * # + * Key: F (len of friends) + * - One storage read to get the prefix iterator for active recoveries. O(1) + * - One storage read/remove to get the recovery configuration. O(1), Codec O(F) + * - One balance call to unreserved. O(X) + * - One event. + * + * Total Complexity: O(F + X) + * # + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + * + * # + * - One storage write O(1) + * - One event + * # + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId32 + rescuer: AccountId32 +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + * + * # + * Key: F (len of friends in config), V (len of vouching friends) + * - One storage read to get the recovery configuration. O(1), Codec O(F) + * - One storage read to get the active recovery process. O(1), Codec O(V) + * - One binary search to confirm caller is a friend. O(logF) + * - One binary search to confirm caller has not already vouched. O(logV) + * - One storage write. O(1), Codec O(V). + * - One event. + * + * Total Complexity: O(F + logF + V + logV) + * # + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId32 + rescuer: AccountId32 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: AccountId32, + proxyType: ProxyType, + delay: sts.number(), + }), + announce: sts.enumStruct({ + real: AccountId32, + callHash: H256, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + delay: sts.number(), + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId32, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId32, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + proxy_announced: sts.enumStruct({ + delegate: AccountId32, + real: AccountId32, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + reject_announcement: sts.enumStruct({ + delegate: AccountId32, + callHash: H256, + }), + remove_announcement: sts.enumStruct({ + real: AccountId32, + callHash: H256, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: AccountId32, + proxyType: ProxyType, + delay: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: AccountId32 + proxyType: ProxyType + delay: number +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: AccountId32 + callHash: H256 +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + * TODO: Might be over counting 1 read + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: number + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId32 + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId32 + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Dispatch the given `call` from an account that the sender is authorized for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: AccountId32 + real: AccountId32 + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: AccountId32 + callHash: H256 +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: AccountId32 + callHash: H256 +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: AccountId32 + proxyType: ProxyType + delay: number +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Society | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Society { + __kind: 'Society' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PreimageCall: sts.Type = sts.closedEnum(() => { + return { + note_preimage: sts.enumStruct({ + bytes: sts.bytes(), + }), + request_preimage: sts.enumStruct({ + hash: H256, + }), + unnote_preimage: sts.enumStruct({ + hash: H256, + }), + unrequest_preimage: sts.enumStruct({ + hash: H256, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PreimageCall = PreimageCall_note_preimage | PreimageCall_request_preimage | PreimageCall_unnote_preimage | PreimageCall_unrequest_preimage + +/** + * Register a preimage on-chain. + * + * If the preimage was previously requested, no fees or deposits are taken for providing + * the preimage. Otherwise, a deposit is taken proportional to the size of the preimage. + */ +export interface PreimageCall_note_preimage { + __kind: 'note_preimage' + bytes: Bytes +} + +/** + * Request a preimage be uploaded to the chain without paying any fees or deposits. + * + * If the preimage requests has already been provided on-chain, we unreserve any deposit + * a user may have paid, and take the control of the preimage out of their hands. + */ +export interface PreimageCall_request_preimage { + __kind: 'request_preimage' + hash: H256 +} + +/** + * Clear an unrequested preimage from the runtime storage. + */ +export interface PreimageCall_unnote_preimage { + __kind: 'unnote_preimage' + hash: H256 +} + +/** + * Clear a previously made request for a preimage. + * + * NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. + */ +export interface PreimageCall_unrequest_preimage { + __kind: 'unrequest_preimage' + hash: H256 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PhragmenElectionCall: sts.Type = sts.closedEnum(() => { + return { + clean_defunct_voters: sts.enumStruct({ + numVoters: sts.number(), + numDefunct: sts.number(), + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + hasReplacement: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId32), + value: sts.bigint(), + }), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PhragmenElectionCall = PhragmenElectionCall_clean_defunct_voters | PhragmenElectionCall_remove_member | PhragmenElectionCall_remove_voter | PhragmenElectionCall_renounce_candidacy | PhragmenElectionCall_submit_candidacy | PhragmenElectionCall_vote + +/** + * Clean all voters who are defunct (i.e. they do not serve any purpose at all). The + * deposit of the removed voters are returned. + * + * This is an root function to be used only for cleaning the state. + * + * The dispatch origin of this call must be root. + * + * # + * The total number of voters and those that are defunct must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_clean_defunct_voters { + __kind: 'clean_defunct_voters' + numVoters: number + numDefunct: number +} + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, a new phragmen election is started. + * + * The dispatch origin of this call must be root. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement, we use a small weight. Else, since this is a root call and + * will go into phragmen, we assume full block for now. + * # + */ +export interface PhragmenElectionCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + hasReplacement: boolean +} + +/** + * Remove `origin` as a voter. + * + * This removes the lock and returns the deposit. + * + * The dispatch origin of this call must be signed and be a voter. + */ +export interface PhragmenElectionCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * + * - `origin` is a candidate and not elected in any set. In this case, the deposit is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the deposit is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the deposit is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_member`](Self::remove_member), if replacement runners exists, they + * are immediately used. If the prime is renouncing, then no prime will exist until the + * next round. + * + * The dispatch origin of this call must be signed, and have one of the above roles. + * + * # + * The type of renouncing must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Submit oneself for candidacy. A fixed amount of deposit is recorded. + * + * All candidates are wiped at the end of the term. They either become a member/runner-up, + * or leave the system while their deposit is slashed. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`] + * to get their deposit back. Losing the spot in an election will always lead to a slash. + * + * # + * The number of current candidates must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is + * reserved. The deposit is based on the number of votes and can be updated over time. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * If `value` is more than `who`'s free balance, then the maximum of the two is used. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * It is the responsibility of the caller to **NOT** place all of their balance into the + * lock and keep some for further operations. + * + * # + * We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less. + * # + */ +export interface PhragmenElectionCall_vote { + __kind: 'vote' + votes: AccountId32[] + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasSharedCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasDisputesCall: sts.Type = sts.closedEnum(() => { + return { + force_unfreeze: sts.unit(), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasDisputesCall = ParasDisputesCall_force_unfreeze + +export interface ParasDisputesCall_force_unfreeze { + __kind: 'force_unfreeze' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + add_trusted_validation_code: sts.enumStruct({ + validationCode: ValidationCode, + }), + force_note_new_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: Id, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + relayParentNumber: sts.number(), + }), + force_set_current_code: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + include_pvf_check_statement: sts.enumStruct({ + stmt: V2PvfCheckStatement, + signature: sts.bytes(), + }), + poke_unused_validation_code: sts.enumStruct({ + validationCodeHash: ValidationCodeHash, + }), + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const V2PvfCheckStatement: sts.Type = sts.struct(() => { + return { + accept: sts.boolean(), + subject: ValidationCodeHash, + sessionIndex: sts.number(), + validatorIndex: V2ValidatorIndex, + } +}) + +export const V2ValidatorIndex = sts.number() + +export interface V2PvfCheckStatement { + accept: boolean + subject: ValidationCodeHash + sessionIndex: number + validatorIndex: V2ValidatorIndex +} + +export type V2ValidatorIndex = number + +export type ValidationCodeHash = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasCall = ParasCall_add_trusted_validation_code | ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head | ParasCall_include_pvf_check_statement | ParasCall_poke_unused_validation_code + +/** + * Adds the validation code to the storage. + * + * The code will not be added if it is already present. Additionally, if PVF pre-checking + * is running for that code, it will be instantly accepted. + * + * Otherwise, the code will be added into the storage. Note that the code will be added + * into storage with reference count 0. This is to account the fact that there are no users + * for this code yet. The caller will have to make sure that this code eventually gets + * used by some parachain or removed from the storage to avoid storage leaks. For the latter + * prefer to use the `poke_unused_validation_code` dispatchable to raw storage manipulation. + * + * This function is mainly meant to be used for upgrading parachains that do not follow + * the go-ahead signal while the PVF pre-checking feature is enabled. + */ +export interface ParasCall_add_trusted_validation_code { + __kind: 'add_trusted_validation_code' + validationCode: ValidationCode +} + +/** + * Note a new block head for para within the context of the current block. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: Id + newHead: HeadData +} + +/** + * Put a parachain directly into the next session's action queue. + * We can't queue it any sooner than this without going into the + * initializer... + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: Id +} + +/** + * Schedule an upgrade as if it was scheduled in the given relay parent block. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: Id + newCode: ValidationCode + relayParentNumber: number +} + +/** + * Set the storage for the parachain validation code immediately. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: Id + newCode: ValidationCode +} + +/** + * Set the storage for the current parachain head data immediately. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: Id + newHead: HeadData +} + +/** + * Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and + * enacts the results if that was the last vote before achieving the supermajority. + */ +export interface ParasCall_include_pvf_check_statement { + __kind: 'include_pvf_check_statement' + stmt: V2PvfCheckStatement + signature: Bytes +} + +/** + * Remove the validation code from the storage iff the reference count is 0. + * + * This is better than removing the storage directly, because it will not remove the code + * that was suddenly got used by some parachain while this dispatchable was pending + * dispatching. + */ +export interface ParasCall_poke_unused_validation_code { + __kind: 'poke_unused_validation_code' + validationCodeHash: ValidationCodeHash +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: V2InherentData, + }), + } +}) + +export const V2InherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => V2UncheckedSigned), + backedCandidates: sts.array(() => V2BackedCandidate), + disputes: sts.array(() => V2DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: H256, + number: sts.number(), + stateRoot: H256, + extrinsicsRoot: H256, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + Consensus: sts.tuple(() => [sts.bytes(), sts.bytes()]), + Other: sts.bytes(), + PreRuntime: sts.tuple(() => [sts.bytes(), sts.bytes()]), + RuntimeEnvironmentUpdated: sts.unit(), + Seal: sts.tuple(() => [sts.bytes(), sts.bytes()]), + } +}) + +export type DigestItem = DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: [Bytes, Bytes] +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: [Bytes, Bytes] +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: [Bytes, Bytes] +} + +export interface Digest { + logs: DigestItem[] +} + +export interface Header { + parentHash: H256 + number: number + stateRoot: H256 + extrinsicsRoot: H256 + digest: Digest +} + +export const V2DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: sts.number(), + statements: sts.array(() => sts.tuple(() => [V2DisputeStatement, V2ValidatorIndex, sts.bytes()])), + } +}) + +export const V2DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: V2InvalidDisputeStatementKind, + Valid: V2ValidDisputeStatementKind, + } +}) + +export const V2ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + BackingSeconded: H256, + BackingValid: H256, + Explicit: sts.unit(), + } +}) + +export type V2ValidDisputeStatementKind = V2ValidDisputeStatementKind_ApprovalChecking | V2ValidDisputeStatementKind_BackingSeconded | V2ValidDisputeStatementKind_BackingValid | V2ValidDisputeStatementKind_Explicit + +export interface V2ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface V2ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: H256 +} + +export interface V2ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: H256 +} + +export interface V2ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export const V2InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export type V2InvalidDisputeStatementKind = V2InvalidDisputeStatementKind_Explicit + +export interface V2InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type V2DisputeStatement = V2DisputeStatement_Invalid | V2DisputeStatement_Valid + +export interface V2DisputeStatement_Invalid { + __kind: 'Invalid' + value: V2InvalidDisputeStatementKind +} + +export interface V2DisputeStatement_Valid { + __kind: 'Valid' + value: V2ValidDisputeStatementKind +} + +export const CandidateHash = sts.bytes() + +export interface V2DisputeStatementSet { + candidateHash: CandidateHash + session: number + statements: [V2DisputeStatement, V2ValidatorIndex, Bytes][] +} + +export type CandidateHash = Bytes + +export const V2BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: V2CommittedCandidateReceipt, + validityVotes: sts.array(() => V2ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const V2ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.bytes(), + Implicit: sts.bytes(), + } +}) + +export type V2ValidityAttestation = V2ValidityAttestation_Explicit | V2ValidityAttestation_Implicit + +export interface V2ValidityAttestation_Explicit { + __kind: 'Explicit' + value: Bytes +} + +export interface V2ValidityAttestation_Implicit { + __kind: 'Implicit' + value: Bytes +} + +export const V2CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: V2CandidateDescriptor, + commitments: V2CandidateCommitments, + } +}) + +export const V2CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => sts.bytes()), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: sts.number(), + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: Id, + data: sts.bytes(), + } +}) + +export interface OutboundHrmpMessage { + recipient: Id + data: Bytes +} + +export interface V2CandidateCommitments { + upwardMessages: Bytes[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: number +} + +export const V2CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: Id, + relayParent: H256, + collator: V2Public, + persistedValidationDataHash: H256, + povHash: H256, + erasureRoot: H256, + signature: V2Signature, + paraHead: H256, + validationCodeHash: ValidationCodeHash, + } +}) + +export const V2Signature = sts.bytes() + +export const V2Public = sts.bytes() + +export interface V2CandidateDescriptor { + paraId: Id + relayParent: H256 + collator: V2Public + persistedValidationDataHash: H256 + povHash: H256 + erasureRoot: H256 + signature: V2Signature + paraHead: H256 + validationCodeHash: ValidationCodeHash +} + +export type V2Signature = Bytes + +export type V2Public = Bytes + +export interface V2CommittedCandidateReceipt { + descriptor: V2CandidateDescriptor + commitments: V2CandidateCommitments +} + +export interface V2BackedCandidate { + candidate: V2CommittedCandidateReceipt + validityVotes: V2ValidityAttestation[] + validatorIndices: BitSequence +} + +export const V2UncheckedSigned: sts.Type = sts.struct(() => { + return { + payload: V2AvailabilityBitfield, + validatorIndex: V2ValidatorIndex, + signature: sts.bytes(), + } +}) + +export const V2AvailabilityBitfield = sts.bitseq() + +export interface V2UncheckedSigned { + payload: V2AvailabilityBitfield + validatorIndex: V2ValidatorIndex + signature: Bytes +} + +export type V2AvailabilityBitfield = BitSequence + +export interface V2InherentData { + bitfields: V2UncheckedSigned[] + backedCandidates: V2BackedCandidate[] + disputes: V2DisputeStatementSet[] + parentHeader: Header +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInherentCall = ParaInherentCall_enter + +/** + * Enter the paras inherent. This will process bitfields and backed candidates. + */ +export interface ParaInherentCall_enter { + __kind: 'enter' + data: V2InherentData +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInclusionCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: sts.bigint(), + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + call: sts.bytes(), + storeCall: sts.boolean(), + maxWeight: sts.bigint(), + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId32), + call: Call, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: sts.number(), + index: sts.number(), + } +}) + +export interface Timepoint { + height: number + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: bigint +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + call: Bytes + storeCall: boolean + maxWeight: bigint +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId32[] + call: Call +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId32[] + timepoint: Timepoint + callHash: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const InitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type InitializerCall = InitializerCall_force_approve + +/** + * Issue a signal to the consensus engine to forcibly act as though all parachain + * blocks in all relay chain blocks up to and including the given number in the current + * chain are valid and should be finalized. + */ +export interface InitializerCall_force_approve { + __kind: 'force_approve' + upTo: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: sts.number(), + }), + force_transfer: sts.enumStruct({ + new: AccountId32, + index: sts.number(), + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: sts.number(), + }), + freeze: sts.enumStruct({ + index: sts.number(), + }), + transfer: sts.enumStruct({ + new: AccountId32, + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: number +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId32 + index: number + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: number +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the + * deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: number +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: sts.bytes(), + }), + } +}) + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: sts.number(), + networkState: OpaqueNetworkState, + sessionIndex: sts.number(), + authorityIndex: sts.number(), + validatorsLen: sts.number(), + } +}) + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export interface Heartbeat { + blockNumber: number + networkState: OpaqueNetworkState + sessionIndex: number + authorityIndex: number + validatorsLen: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is + * length of `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Bytes +} + +/** + * Identity pallet declaration. + */ +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId32, + }), + add_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: sts.number(), + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: MultiAddress, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: MultiAddress, + judgement: Judgement, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: MultiAddress, + }), + rename_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId32, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: BitFlags, + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId32, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => sts.tuple(() => [Data, Data])), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => sts.bytes()), + image: Data, + twitter: Data, + } +}) + +export interface IdentityInfo { + additional: [Data, Data][] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (Bytes | undefined) + image: Data + twitter: Data +} + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: Bytes +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: Bytes +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: Bytes +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: Bytes +} + +export const BitFlags = sts.bigint() + +export const Judgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: sts.bigint(), + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export type Judgement = Judgement_Erroneous | Judgement_FeePaid | Judgement_KnownGood | Judgement_LowQuality | Judgement_OutOfDate | Judgement_Reasonable | Judgement_Unknown + +export interface Judgement_Erroneous { + __kind: 'Erroneous' +} + +export interface Judgement_FeePaid { + __kind: 'FeePaid' + value: bigint +} + +export interface Judgement_KnownGood { + __kind: 'KnownGood' +} + +export interface Judgement_LowQuality { + __kind: 'LowQuality' +} + +export interface Judgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface Judgement_Reasonable { + __kind: 'Reasonable' +} + +export interface Judgement_Unknown { + __kind: 'Unknown' +} + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: sts.bytes(), + Keccak256: sts.bytes(), + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: sts.bytes(), + ShaThree256: sts.bytes(), + } +}) + +/** + * Identity pallet declaration. + */ +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId32 +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: MultiAddress + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: number +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: MultiAddress +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: MultiAddress + judgement: Judgement +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: MultiAddress +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: MultiAddress + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId32 +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: BitFlags +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId32, Data][] +} + +export type BitFlags = bigint + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const HrmpCall: sts.Type = sts.closedEnum(() => { + return { + force_clean_hrmp: sts.enumStruct({ + para: Id, + inbound: sts.number(), + outbound: sts.number(), + }), + force_process_hrmp_close: sts.enumStruct({ + channels: sts.number(), + }), + force_process_hrmp_open: sts.enumStruct({ + channels: sts.number(), + }), + hrmp_accept_open_channel: sts.enumStruct({ + sender: Id, + }), + hrmp_cancel_open_request: sts.enumStruct({ + channelId: HrmpChannelId, + openRequests: sts.number(), + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: Id, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: Id, + recipient: Id, + } +}) + +export interface HrmpChannelId { + sender: Id + recipient: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type HrmpCall = HrmpCall_force_clean_hrmp | HrmpCall_force_process_hrmp_close | HrmpCall_force_process_hrmp_open | HrmpCall_hrmp_accept_open_channel | HrmpCall_hrmp_cancel_open_request | HrmpCall_hrmp_close_channel | HrmpCall_hrmp_init_open_channel + +/** + * This extrinsic triggers the cleanup of all the HRMP storage items that + * a para may have. Normally this happens once per session, but this allows + * you to trigger the cleanup immediately for a specific parachain. + * + * Origin must be Root. + * + * Number of inbound and outbound channels for `para` must be provided as witness data of weighing. + */ +export interface HrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: Id + inbound: number + outbound: number +} + +/** + * Force process HRMP close channel requests. + * + * If there are pending HRMP close channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of closing channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' + channels: number +} + +/** + * Force process HRMP open channel requests. + * + * If there are pending HRMP open channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of opening channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' + channels: number +} + +/** + * Accept a pending open channel request from the given sender. + * + * The channel will be opened only on the next session boundary. + */ +export interface HrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: Id +} + +/** + * This cancels a pending open channel request. It can be canceled by either of the sender + * or the recipient for that request. The origin must be either of those. + * + * The cancellation happens immediately. It is not possible to cancel the request if it is + * already accepted. + * + * Total number of open requests (i.e. `HrmpOpenChannelRequestsList`) must be provided as + * witness data. + */ +export interface HrmpCall_hrmp_cancel_open_request { + __kind: 'hrmp_cancel_open_request' + channelId: HrmpChannelId + openRequests: number +} + +/** + * Initiate unilateral closing of a channel. The origin must be either the sender or the + * recipient in the channel being closed. + * + * The closure can only happen on a session change. + */ +export interface HrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * Initiate opening a channel from a parachain to a given recipient with given channel + * parameters. + * + * - `proposed_max_capacity` - specifies how many messages can be in the channel at once. + * - `proposed_max_message_size` - specifies the maximum size of the messages. + * + * These numbers are a subject to the relay-chain configuration limits. + * + * The channel can be opened only after the recipient confirms it and only on a session + * change. + */ +export interface HrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: Id + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: sts.number(), + bestFinalizedBlockNumber: sts.number(), + }), + report_equivocation: sts.enumStruct({ + equivocationProof: Type_266, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_266, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: sts.number(), + trieNodes: sts.array(() => sts.bytes()), + validatorCount: sts.number(), + } +}) + +export interface MembershipProof { + session: number + trieNodes: Bytes[] + validatorCount: number +} + +export const Type_266: sts.Type = sts.struct(() => { + return { + setId: sts.bigint(), + equivocation: Equivocation, + } +}) + +export const Equivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: Type_273, + Prevote: Type_268, + } +}) + +export const Type_268: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Prevote, sts.bytes()]), + second: sts.tuple(() => [Prevote, sts.bytes()]), + } +}) + +export const Prevote: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Prevote { + targetHash: H256 + targetNumber: number +} + +export interface Type_268 { + roundNumber: bigint + identity: Public + first: [Prevote, Bytes] + second: [Prevote, Bytes] +} + +export const Type_273: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Precommit, sts.bytes()]), + second: sts.tuple(() => [Precommit, sts.bytes()]), + } +}) + +export const Precommit: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Precommit { + targetHash: H256 + targetNumber: number +} + +export interface Type_273 { + roundNumber: bigint + identity: Public + first: [Precommit, Bytes] + second: [Precommit, Bytes] +} + +export type Equivocation = Equivocation_Precommit | Equivocation_Prevote + +export interface Equivocation_Precommit { + __kind: 'Precommit' + value: Type_273 +} + +export interface Equivocation_Prevote { + __kind: 'Prevote' + value: Type_268 +} + +export interface Type_266 { + setId: bigint + equivocation: Equivocation +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has + * stalled. This will trigger a forced authority set change at the beginning + * of the next session, to be enacted `delay` blocks after that. The delay + * should be high enough to safely assume that the block signalling the + * forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters + * will start the new authority set using the given finalized block as base. + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: number + bestFinalizedBlockNumber: number +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_266 + keyOwnerProof: MembershipProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_266 + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GiltCall: sts.Type = sts.closedEnum(() => { + return { + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + set_target: sts.enumStruct({ + target: sts.bigint(), + }), + thaw: sts.enumStruct({ + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GiltCall = GiltCall_place_bid | GiltCall_retract_bid | GiltCall_set_target | GiltCall_thaw + +/** + * Place a bid for a gilt to be issued. + * + * Origin must be Signed, and account must have at least `amount` in free balance. + * + * - `amount`: The amount of the bid; these funds will be reserved. If the bid is + * successfully elevated into an issued gilt, then these funds will continue to be + * reserved until the gilt expires. Must be at least `MinFreeze`. + * - `duration`: The number of periods for which the funds will be locked if the gilt is + * issued. It will expire only after this period has elapsed after the point of issuance. + * Must be greater than 1 and no more than `QueueCount`. + * + * Complexities: + * - `Queues[duration].len()` (just take max). + */ +export interface GiltCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * Retract a previously placed bid. + * + * Origin must be Signed, and the account should have previously issued a still-active bid + * of `amount` for `duration`. + * + * - `amount`: The amount of the previous bid. + * - `duration`: The duration of the previous bid. + */ +export interface GiltCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * Set target proportion of gilt-funds. + * + * Origin must be `AdminOrigin`. + * + * - `target`: The target proportion of effective issued funds that should be under gilts + * at any one time. + */ +export interface GiltCall_set_target { + __kind: 'set_target' + target: bigint +} + +/** + * Remove an active but expired gilt. Reserved funds under gilt are freed and balance is + * adjusted to ensure that the funds grow or shrink to maintain the equivalent proportion + * of effective total issued funds. + * + * Origin must be Signed and the account must be the owner of the gilt of the given index. + * + * - `index`: The index of the gilt to be thawed. + */ +export interface GiltCall_thaw { + __kind: 'thaw' + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + governance_fallback: sts.enumStruct({ + maybeMaxVoters: sts.option(() => sts.number()), + maybeMaxTargets: sts.option(() => sts.number()), + }), + set_emergency_election_result: sts.enumStruct({ + supports: sts.array(() => sts.tuple(() => [AccountId32, Support])), + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => ElectionScore), + }), + submit: sts.enumStruct({ + rawSolution: RawSolution, + }), + submit_unsigned: sts.enumStruct({ + rawSolution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export const RawSolution: sts.Type = sts.struct(() => { + return { + solution: NposCompactSolution24, + score: ElectionScore, + round: sts.number(), + } +}) + +export const NposCompactSolution24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), + votes2: sts.array(() => sts.tuple(() => [sts.number(), sts.tuple(() => [sts.number(), sts.number()]), sts.number()])), + votes3: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes4: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes5: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes6: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes7: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes8: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes9: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes10: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes11: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes12: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes13: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes14: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes15: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes16: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes17: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes18: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes19: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes20: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes21: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes22: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes23: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes24: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + } +}) + +export interface NposCompactSolution24 { + votes1: [number, number][] + votes2: [number, [number, number], number][] + votes3: [number, [number, number][], number][] + votes4: [number, [number, number][], number][] + votes5: [number, [number, number][], number][] + votes6: [number, [number, number][], number][] + votes7: [number, [number, number][], number][] + votes8: [number, [number, number][], number][] + votes9: [number, [number, number][], number][] + votes10: [number, [number, number][], number][] + votes11: [number, [number, number][], number][] + votes12: [number, [number, number][], number][] + votes13: [number, [number, number][], number][] + votes14: [number, [number, number][], number][] + votes15: [number, [number, number][], number][] + votes16: [number, [number, number][], number][] + votes17: [number, [number, number][], number][] + votes18: [number, [number, number][], number][] + votes19: [number, [number, number][], number][] + votes20: [number, [number, number][], number][] + votes21: [number, [number, number][], number][] + votes22: [number, [number, number][], number][] + votes23: [number, [number, number][], number][] + votes24: [number, [number, number][], number][] +} + +export interface RawSolution { + solution: NposCompactSolution24 + score: ElectionScore + round: number +} + +export interface ElectionScore { + minimalStake: bigint + sumStake: bigint + sumStakeSquared: bigint +} + +export const ElectionScore: sts.Type = sts.struct(() => { + return { + minimalStake: sts.bigint(), + sumStake: sts.bigint(), + sumStakeSquared: sts.bigint(), + } +}) + +export const Support: sts.Type = sts.struct(() => { + return { + total: sts.bigint(), + voters: sts.array(() => sts.tuple(() => [AccountId32, sts.bigint()])), + } +}) + +export interface Support { + total: bigint + voters: [AccountId32, bigint][] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_governance_fallback | ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * Trigger the governance fallback. + * + * This can only be called when [`Phase::Emergency`] is enabled, as an alternative to + * calling [`Call::set_emergency_election_result`]. + */ +export interface ElectionProviderMultiPhaseCall_governance_fallback { + __kind: 'governance_fallback' + maybeMaxVoters?: (number | undefined) + maybeMaxTargets?: (number | undefined) +} + +/** + * Set a solution in the queue, to be handed out to the client of this pallet in the next + * call to `ElectionProvider::elect`. + * + * This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`. + * + * The solution is not checked for any feasibility and is assumed to be trustworthy, as any + * feasibility check itself can in principle cause the election process to fail (due to + * memory/weight constrains). + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + supports: [AccountId32, Support][] +} + +/** + * Set a new value for `MinimumUntrustedScore`. + * + * Dispatch origin must be aligned with `T::ForceOrigin`. + * + * This check can be turned off by setting the value to `None`. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (ElectionScore | undefined) +} + +/** + * Submit a solution for the signed phase. + * + * The dispatch origin fo this call must be __signed__. + * + * The solution is potentially queued, based on the claimed score and processed at the end + * of the signed phase. + * + * A deposit is reserved and recorded for the solution. Based on the outcome, the solution + * might be rewarded, slashed, or get all or a part of the deposit back. + */ +export interface ElectionProviderMultiPhaseCall_submit { + __kind: 'submit' + rawSolution: RawSolution +} + +/** + * Submit a solution for the unsigned phase. + * + * The dispatch origin fo this call must be __none__. + * + * This submission is checked on the fly. Moreover, this unsigned solution is only + * validated when submitted to the pool from the **local** node. Effectively, this means + * that only active validators can submit this transaction when authoring a block (similar + * to an inherent). + * + * To prevent any incorrect solution (and thus wasted time/weight), this transaction will + * panic if the solution submitted by the validator is invalid in any way, effectively + * putting their authoring reward at risk. + * + * No deposit or reward is associated with this submission. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + rawSolution: RawSolution + witness: SolutionOrSnapshotSize +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DmpCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + blacklist: sts.enumStruct({ + proposalHash: H256, + maybeRefIndex: sts.option(() => sts.number()), + }), + cancel_proposal: sts.enumStruct({ + propIndex: sts.number(), + }), + cancel_queued: sts.enumStruct({ + which: sts.number(), + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId32, + conviction: Conviction, + balance: sts.bigint(), + }), + emergency_cancel: sts.enumStruct({ + refIndex: sts.number(), + }), + enact_proposal: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + }), + external_propose: sts.enumStruct({ + proposalHash: H256, + }), + external_propose_default: sts.enumStruct({ + proposalHash: H256, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: H256, + }), + fast_track: sts.enumStruct({ + proposalHash: H256, + votingPeriod: sts.number(), + delay: sts.number(), + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: H256, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: H256, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId32, + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + index: sts.number(), + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId32, + }), + veto_external: sts.enumStruct({ + proposalHash: H256, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface AccountVote_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DemocracyCall = DemocracyCall_blacklist | DemocracyCall_cancel_proposal | DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. + * + * If called on a queued public or external proposal, then this will result in it being + * removed. If the `ref_index` supplied is an active referendum with the proposal hash, + * then it will be cancelled. + * + * The dispatch origin of this call must be `BlacklistOrigin`. + * + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. + * + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). + */ +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: H256 + maybeRefIndex?: (number | undefined) +} + +/** + * Remove a proposal. + * + * The dispatch origin of this call must be `CancelProposalOrigin`. + * + * - `prop_index`: The index of the proposal to cancel. + * + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number +} + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: number +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must not + * be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId32 + conviction: Conviction + balance: bigint +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: number +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: H256 + index: number +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Weight: `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: H256 +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: H256 +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: H256 +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * `FastTrackVotingPeriod` if too low. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: H256 + votingPeriod: number + delay: number +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. When this call is successful, i.e. + * the preimage has not been uploaded before and matches some imminent proposal, + * no fee is paid. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * Weight: `O(p)` + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: H256 + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. Extrinsic is + * weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * Weight: `O(D)` where D is length of proposal. + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: H256 + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId32 + index: number +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: number +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * Weight: `O(S)` where S is the number of seconds a proposal already has. + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId32 +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * Weight: `O(V + log(V))` where V is number of `existing vetoers` + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: H256 +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of referendums the voter has voted on. + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: Id, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + contribute_all: sts.enumStruct({ + index: sts.number(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: Id, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId32, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: Signature, + } +}) + +export const Signature = sts.bytes() + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Signature +} + +export type Signature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_contribute_all | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * Add an optional memo to an existing crowdloan contribution. + * + * Origin must be Signed, and the user must have contributed to the crowdloan. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: Id + memo: Bytes +} + +/** + * Contribute to a crowd sale. This will transfer some balance over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * Contribute your entire balance to a crowd sale. This will transfer the entire balance of a user over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute_all { + __kind: 'contribute_all' + index: number + signature?: (MultiSignature | undefined) +} + +/** + * Create a new crowdloaning campaign for a parachain slot with the given lease period range. + * + * This applies a lock to your parachain configuration, ensuring that it cannot be changed + * by the parachain manager. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Remove a fund after the retirement period has ended and all funds have been returned. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * Edit the configuration for an in-progress crowdloan. + * + * Can only be called by Root origin. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Poke the fund into `NewRaise` + * + * Origin must be Signed, and the fund has non-zero raise. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: Id +} + +/** + * Automatically refund contributors of an ended crowdloan. + * Due to weight restrictions, this function may need to be called multiple + * times to fully refund all users. We will refund `RemoveKeysLimit` users at a time. + * + * Origin must be signed, but can come from anyone. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * Withdraw full balance of a specific contributor. + * + * Origin must be signed, but can come from anyone. + * + * The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement + * flag must be set. For a fund to be ready for retirement, then: + * - it must not already be in retirement; + * - the amount of raised funds must be bigger than the _free_ balance of the account; + * - and either: + * - the block number must be at least `end`; or + * - the current lease period must be greater than the fund's `last_period`. + * + * In this case, the fund's retirement flag is set and its `end` is reset to the current block + * number. + * + * - `who`: The account whose contribution should be withdrawn. + * - `index`: The parachain to whose crowdloan the contribution was made. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_bypass_consistency_check: sts.enumStruct({ + new: sts.boolean(), + }), + set_chain_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_code_retention_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_conclusion_by_time_out_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_max_spam_slots: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: sts.number(), + }), + set_group_rotation_frequency: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_minimum_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_cores: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_retries: sts.enumStruct({ + new: sts.number(), + }), + set_pvf_checking_enabled: sts.enumStruct({ + new: sts.boolean(), + }), + set_pvf_voting_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_thread_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_ump_max_individual_weight: sts.enumStruct({ + new: sts.bigint(), + }), + set_ump_service_total_weight: sts.enumStruct({ + new: sts.bigint(), + }), + set_validation_upgrade_cooldown: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ConfigurationCall = ConfigurationCall_set_bypass_consistency_check | ConfigurationCall_set_chain_availability_period | ConfigurationCall_set_code_retention_period | ConfigurationCall_set_dispute_conclusion_by_time_out_period | ConfigurationCall_set_dispute_max_spam_slots | ConfigurationCall_set_dispute_period | ConfigurationCall_set_dispute_post_conclusion_acceptance_period | ConfigurationCall_set_group_rotation_frequency | ConfigurationCall_set_hrmp_channel_max_capacity | ConfigurationCall_set_hrmp_channel_max_message_size | ConfigurationCall_set_hrmp_channel_max_total_size | ConfigurationCall_set_hrmp_max_message_num_per_candidate | ConfigurationCall_set_hrmp_max_parachain_inbound_channels | ConfigurationCall_set_hrmp_max_parachain_outbound_channels | ConfigurationCall_set_hrmp_max_parathread_inbound_channels | ConfigurationCall_set_hrmp_max_parathread_outbound_channels | ConfigurationCall_set_hrmp_open_request_ttl | ConfigurationCall_set_hrmp_recipient_deposit | ConfigurationCall_set_hrmp_sender_deposit | ConfigurationCall_set_max_code_size | ConfigurationCall_set_max_downward_message_size | ConfigurationCall_set_max_head_data_size | ConfigurationCall_set_max_pov_size | ConfigurationCall_set_max_upward_message_num_per_candidate | ConfigurationCall_set_max_upward_message_size | ConfigurationCall_set_max_upward_queue_count | ConfigurationCall_set_max_upward_queue_size | ConfigurationCall_set_max_validators | ConfigurationCall_set_max_validators_per_core | ConfigurationCall_set_minimum_validation_upgrade_delay | ConfigurationCall_set_n_delay_tranches | ConfigurationCall_set_needed_approvals | ConfigurationCall_set_no_show_slots | ConfigurationCall_set_parathread_cores | ConfigurationCall_set_parathread_retries | ConfigurationCall_set_pvf_checking_enabled | ConfigurationCall_set_pvf_voting_ttl | ConfigurationCall_set_relay_vrf_modulo_samples | ConfigurationCall_set_scheduling_lookahead | ConfigurationCall_set_thread_availability_period | ConfigurationCall_set_ump_max_individual_weight | ConfigurationCall_set_ump_service_total_weight | ConfigurationCall_set_validation_upgrade_cooldown | ConfigurationCall_set_validation_upgrade_delay | ConfigurationCall_set_zeroth_delay_tranche_width + +/** + * Setting this to true will disable consistency checks for the configuration setters. + * Use with caution. + */ +export interface ConfigurationCall_set_bypass_consistency_check { + __kind: 'set_bypass_consistency_check' + new: boolean +} + +/** + * Set the availability period for parachains. + */ +export interface ConfigurationCall_set_chain_availability_period { + __kind: 'set_chain_availability_period' + new: number +} + +/** + * Set the acceptance period for an included candidate. + */ +export interface ConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: number +} + +/** + * Set the dispute conclusion by time out period. + */ +export interface ConfigurationCall_set_dispute_conclusion_by_time_out_period { + __kind: 'set_dispute_conclusion_by_time_out_period' + new: number +} + +/** + * Set the maximum number of dispute spam slots. + */ +export interface ConfigurationCall_set_dispute_max_spam_slots { + __kind: 'set_dispute_max_spam_slots' + new: number +} + +/** + * Set the dispute period, in number of sessions to keep for disputes. + */ +export interface ConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: number +} + +/** + * Set the dispute post conclusion acceptance period. + */ +export interface ConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: number +} + +/** + * Set the parachain validator-group rotation frequency + */ +export interface ConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: number +} + +/** + * Sets the maximum number of messages allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * Sets the maximum size of a message that could ever be put into an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * Sets the maximum total size of messages in bytes allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * Sets the maximum number of outbound HRMP messages can be sent by a candidate. + */ +export interface ConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parachain is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parachain is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parathread is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_inbound_channels { + __kind: 'set_hrmp_max_parathread_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parathread is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_outbound_channels { + __kind: 'set_hrmp_max_parathread_outbound_channels' + new: number +} + +/** + * Sets the number of sessions after which an HRMP open channel request expires. + */ +export interface ConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * Sets the amount of funds that the recipient should provide for accepting opening an HRMP + * channel. + */ +export interface ConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: bigint +} + +/** + * Sets the amount of funds that the sender should provide for opening an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: bigint +} + +/** + * Set the max validation code size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * Set the critical downward message size. + */ +export interface ConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * Set the max head data size for paras. + */ +export interface ConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * Set the max POV block size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * Sets the maximum number of messages that a candidate can contain. + */ +export interface ConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum size of an upward message that can be sent by a candidate. + */ +export interface ConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * Sets the maximum items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * Sets the maximum total size of items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * Set the maximum number of validators to use in parachain consensus. + */ +export interface ConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * Set the maximum number of validators to assign to any core. + */ +export interface ConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * Sets the minimum delay between announcing the upgrade block for a parachain until the + * upgrade taking place. + * + * See the field documentation for information and constraints for the new value. + */ +export interface ConfigurationCall_set_minimum_validation_upgrade_delay { + __kind: 'set_minimum_validation_upgrade_delay' + new: number +} + +/** + * Set the total number of delay tranches. + */ +export interface ConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * Set the number of validators needed to approve a block. + */ +export interface ConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * Set the no show slots, in number of number of consensus slots. + * Must be at least 1. + */ +export interface ConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * Set the number of parathread execution cores. + */ +export interface ConfigurationCall_set_parathread_cores { + __kind: 'set_parathread_cores' + new: number +} + +/** + * Set the number of retries for a particular parathread. + */ +export interface ConfigurationCall_set_parathread_retries { + __kind: 'set_parathread_retries' + new: number +} + +/** + * Enable or disable PVF pre-checking. Consult the field documentation prior executing. + */ +export interface ConfigurationCall_set_pvf_checking_enabled { + __kind: 'set_pvf_checking_enabled' + new: boolean +} + +/** + * Set the number of session changes after which a PVF pre-checking voting is rejected. + */ +export interface ConfigurationCall_set_pvf_voting_ttl { + __kind: 'set_pvf_voting_ttl' + new: number +} + +/** + * Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion. + */ +export interface ConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * Set the scheduling lookahead, in expected number of blocks at peak throughput. + */ +export interface ConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * Set the availability period for parathreads. + */ +export interface ConfigurationCall_set_thread_availability_period { + __kind: 'set_thread_availability_period' + new: number +} + +/** + * Sets the maximum amount of weight any individual upward message may consume. + */ +export interface ConfigurationCall_set_ump_max_individual_weight { + __kind: 'set_ump_max_individual_weight' + new: bigint +} + +/** + * Sets the soft limit for the phase of dispatching dispatchable upward messages. + */ +export interface ConfigurationCall_set_ump_service_total_weight { + __kind: 'set_ump_service_total_weight' + new: bigint +} + +/** + * Set the validation upgrade cooldown. + */ +export interface ConfigurationCall_set_validation_upgrade_cooldown { + __kind: 'set_validation_upgrade_cooldown' + new: number +} + +/** + * Set the validation upgrade delay. + */ +export interface ConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: number +} + +/** + * Set the zeroth delay tranche width. + */ +export interface ConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: sts.bigint(), + vestingSchedule: sts.option(() => sts.tuple(() => [sts.bigint(), sts.bigint(), sts.number()])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId32), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId32 + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId32 + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: bigint + vestingSchedule?: ([bigint, bigint, number] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId32 | undefined) +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ChildBountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + add_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + value: sts.bigint(), + description: sts.bytes(), + }), + award_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + close_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + propose_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ChildBountiesCall = ChildBountiesCall_accept_curator | ChildBountiesCall_add_child_bounty | ChildBountiesCall_award_child_bounty | ChildBountiesCall_claim_child_bounty | ChildBountiesCall_close_child_bounty | ChildBountiesCall_propose_curator | ChildBountiesCall_unassign_curator + +/** + * Accept the curator role for the child-bounty. + * + * The dispatch origin for this call must be the curator of this + * child-bounty. + * + * A deposit will be reserved from the curator and refund upon + * successful payout or cancellation. + * + * Fee for curator is deducted from curator fee of parent bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in "CuratorProposed" state, for processing the + * call. And state of child-bounty is moved to "Active" on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_accept_curator { + __kind: 'accept_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Add a new child-bounty. + * + * The dispatch origin for this call must be the curator of parent + * bounty and the parent bounty must be in "active" state. + * + * Child-bounty gets added successfully & fund gets transferred from + * parent bounty to child-bounty account, if parent bounty has enough + * funds, else the call fails. + * + * Upper bound to maximum number of active child-bounties that can be + * added are managed via runtime trait config + * [`Config::MaxActiveChildBountyCount`]. + * + * If the call is success, the status of child-bounty is updated to + * "Added". + * + * - `parent_bounty_id`: Index of parent bounty for which child-bounty is being added. + * - `value`: Value for executing the proposal. + * - `description`: Text description for the child-bounty. + */ +export interface ChildBountiesCall_add_child_bounty { + __kind: 'add_child_bounty' + parentBountyId: number + value: bigint + description: Bytes +} + +/** + * Award child-bounty to a beneficiary. + * + * The beneficiary will be able to claim the funds after a delay. + * + * The dispatch origin for this call must be the master curator or + * curator of this child-bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in active state, for processing the call. And + * state of child-bounty is moved to "PendingPayout" on successful call + * completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + * - `beneficiary`: Beneficiary account. + */ +export interface ChildBountiesCall_award_child_bounty { + __kind: 'award_child_bounty' + parentBountyId: number + childBountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded child-bounty after payout delay. + * + * The dispatch origin for this call may be any signed origin. + * + * Call works independent of parent bounty state, No need for parent + * bounty to be in active state. + * + * The Beneficiary is paid out with agreed bounty value. Curator fee is + * paid & curator deposit is unreserved. + * + * Child-bounty must be in "PendingPayout" state, for processing the + * call. And instance of child-bounty is removed from the state on + * successful call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_claim_child_bounty { + __kind: 'claim_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * Cancel a proposed or active child-bounty. Child-bounty account funds + * are transferred to parent bounty account. The child-bounty curator + * deposit may be unreserved if possible. + * + * The dispatch origin for this call must be either parent curator or + * `T::RejectOrigin`. + * + * If the state of child-bounty is `Active`, curator deposit is + * unreserved. + * + * If the state of child-bounty is `PendingPayout`, call fails & + * returns `PendingPayout` error. + * + * For the origin other than T::RejectOrigin, parent bounty must be in + * active state, for this child-bounty call to work. For origin + * T::RejectOrigin execution is forced. + * + * Instance of child-bounty is removed from the state on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_close_child_bounty { + __kind: 'close_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * Propose curator for funded child-bounty. + * + * The dispatch origin for this call must be curator of parent bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in "Added" state, for processing the call. And + * state of child-bounty is moved to "CuratorProposed" on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + * - `curator`: Address of child-bounty curator. + * - `fee`: payment fee to child-bounty curator for execution. + */ +export interface ChildBountiesCall_propose_curator { + __kind: 'propose_curator' + parentBountyId: number + childBountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a child-bounty. + * + * The dispatch origin for this call can be either `RejectOrigin`, or + * the curator of the parent bounty, or any signed origin. + * + * For the origin other than T::RejectOrigin and the child-bounty + * curator, parent-bounty must be in active state, for this call to + * work. We allow child-bounty curator and T::RejectOrigin to execute + * this call irrespective of the parent-bounty state. + * + * If this function is called by the `RejectOrigin` or the + * parent-bounty curator, we assume that the child-bounty curator is + * malicious or inactive. As a result, child-bounty curator deposit is + * slashed. + * + * If the origin is the child-bounty curator, we take this as a sign + * that they are unable to do their job, and are willingly giving up. + * We could slash the deposit, but for now we allow them to unreserve + * their deposit and exit without issue. (We may want to change this if + * it is abused.) + * + * Finally, the origin can be anyone iff the child-bounty curator is + * "inactive". Expiry update due of parent bounty is used to estimate + * inactive state of child-bounty curator. + * + * This allows anyone in the community to call out that a child-bounty + * curator is not doing their due diligence, and we should pick a new + * one. In this case the child-bounty curator deposit is slashed. + * + * State of child-bounty is moved to Added state on successful call + * completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_unassign_curator { + __kind: 'unassign_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds + * after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is + * malicious or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_force_unreserve | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_all | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is not + * assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * Unreserve some balance from a user by force. + * + * Can only be called by ROOT. + */ +export interface BalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also alter the total issuance of the system (`TotalIssuance`) appropriately. + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: MultiAddress + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for input config + * types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex + * computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional check + * that the transfer will not kill the origin account. + * --------------------------------- + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: MultiAddress + value: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). # + * - O(1). Just like transfer, but reading the user's transferable balance first. + * # + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BagsListCall: sts.Type = sts.closedEnum(() => { + return { + put_in_front_of: sts.enumStruct({ + lighter: AccountId32, + }), + rebag: sts.enumStruct({ + dislocated: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BagsListCall = BagsListCall_put_in_front_of | BagsListCall_rebag + +/** + * Move the caller's Id directly in front of `lighter`. + * + * The dispatch origin for this call must be _Signed_ and can only be called by the Id of + * the account going in front of `lighter`. + * + * Only works if + * - both nodes are within the same bag, + * - and `origin` has a greater `Score` than `lighter`. + */ +export interface BagsListCall_put_in_front_of { + __kind: 'put_in_front_of' + lighter: AccountId32 +} + +/** + * Declare that some `dislocated` account has, through rewards or penalties, sufficiently + * changed its score that it should properly fall into a different bag than its current + * one. + * + * Anyone can call this function about any potentially dislocated account. + * + * Will never return an error; if `dislocated` does not exist or doesn't need a rebag, then + * it is a noop and fees are still collected from `origin`. + */ +export interface BagsListCall_rebag { + __kind: 'rebag' + dislocated: AccountId32 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const EquivocationProof: sts.Type = sts.struct(() => { + return { + offender: sts.bytes(), + slot: Slot, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Slot = sts.bigint() + +export interface EquivocationProof { + offender: Bytes + slot: Slot + firstHeader: Header + secondHeader: Header +} + +export type Slot = bigint + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V1: sts.enumStruct({ + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + }), + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type NextConfigDescriptor = NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Plan an epoch config change. The epoch config change is recorded and will be enacted on + * the next call to `enact_epoch_change`. The config will be activated one epoch after. + * Multiple calls to this method will replace any existing planned config change that had + * not been enacted yet. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Cancel an in-progress auction. + * + * Can only be called by Root origin. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +export type Call = Call_Auctions | Call_Authorship | Call_Babe | Call_BagsList | Call_Balances | Call_Bounties | Call_ChildBounties | Call_Claims | Call_Configuration | Call_Council | Call_Crowdloan | Call_Democracy | Call_Dmp | Call_ElectionProviderMultiPhase | Call_Gilt | Call_Grandpa | Call_Hrmp | Call_Identity | Call_ImOnline | Call_Indices | Call_Initializer | Call_Multisig | Call_ParaInclusion | Call_ParaInherent | Call_Paras | Call_ParasDisputes | Call_ParasShared | Call_PhragmenElection | Call_Preimage | Call_Proxy | Call_Recovery | Call_Registrar | Call_Scheduler | Call_Session | Call_Slots | Call_Society | Call_Staking | Call_System | Call_TechnicalCommittee | Call_TechnicalMembership | Call_Timestamp | Call_Tips | Call_Treasury | Call_Ump | Call_Utility | Call_Vesting | Call_XcmPallet + +export interface Call_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Call_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Call_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Call_BagsList { + __kind: 'BagsList' + value: BagsListCall +} + +export interface Call_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Call_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Call_ChildBounties { + __kind: 'ChildBounties' + value: ChildBountiesCall +} + +export interface Call_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Call_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Call_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Call_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Call_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Call_Dmp { + __kind: 'Dmp' + value: DmpCall +} + +export interface Call_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Call_Gilt { + __kind: 'Gilt' + value: GiltCall +} + +export interface Call_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Call_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Call_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Call_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Call_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Call_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Call_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Call_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Call_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Call_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Call_ParasDisputes { + __kind: 'ParasDisputes' + value: ParasDisputesCall +} + +export interface Call_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Call_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Call_Preimage { + __kind: 'Preimage' + value: PreimageCall +} + +export interface Call_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Call_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Call_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Call_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Call_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Call_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Call_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Call_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Call_System { + __kind: 'System' + value: SystemCall +} + +export interface Call_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Call_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Call_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Call_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Call_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Call_Ump { + __kind: 'Ump' + value: UmpCall +} + +export interface Call_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Call_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Call_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Society: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId32 = sts.bytes() diff --git a/squid/src/types/v9220.ts b/squid/src/types/v9220.ts new file mode 100644 index 00000000..7beb3b4a --- /dev/null +++ b/squid/src/types/v9220.ts @@ -0,0 +1,12075 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Call: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + BagsList: BagsListCall, + Balances: BalancesCall, + Bounties: BountiesCall, + ChildBounties: ChildBountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + Dmp: DmpCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + Gilt: GiltCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Initializer: InitializerCall, + Multisig: MultisigCall, + NominationPools: NominationPoolsCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Paras: ParasCall, + ParasDisputes: ParasDisputesCall, + ParasShared: ParasSharedCall, + PhragmenElection: PhragmenElectionCall, + Preimage: PreimageCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Ump: UmpCall, + Utility: UtilityCall, + Vesting: VestingCall, + XcmPallet: XcmPalletCall, + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + execute: sts.enumStruct({ + message: Type_549, + maxWeight: sts.bigint(), + }), + force_default_xcm_version: sts.enumStruct({ + maybeXcmVersion: sts.option(() => sts.number()), + }), + force_subscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_unsubscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_xcm_version: sts.enumStruct({ + location: V1MultiLocation, + xcmVersion: sts.number(), + }), + limited_reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + limited_teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + send: sts.enumStruct({ + dest: VersionedMultiLocation, + message: VersionedXcm, + }), + teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + } +}) + +export const VersionedXcm: sts.Type = sts.closedEnum(() => { + return { + V0: V0Xcm, + V1: V1Xcm, + V2: sts.array(() => V2Instruction), + } +}) + +export const V2Instruction: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => V2Instruction), + SetErrorHandler: sts.array(() => V2Instruction), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const DoubleEncoded: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncoded { + encoded: Bytes +} + +export const V0OriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type V0OriginKind = V0OriginKind_Native | V0OriginKind_SovereignAccount | V0OriginKind_Superuser | V0OriginKind_Xcm + +export interface V0OriginKind_Native { + __kind: 'Native' +} + +export interface V0OriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface V0OriginKind_Superuser { + __kind: 'Superuser' +} + +export interface V0OriginKind_Xcm { + __kind: 'Xcm' +} + +export const V2Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V2Error])), + Null: sts.unit(), + Version: sts.number(), + } +}) + +export const V2Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + MaxWeightInvalid: sts.unit(), + MultiLocationFull: sts.unit(), + MultiLocationNotInvertible: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + WeightLimitReached: sts.bigint(), + WeightNotComputable: sts.unit(), + } +}) + +export type V2Error = V2Error_AssetNotFound | V2Error_BadOrigin | V2Error_Barrier | V2Error_DestinationUnsupported | V2Error_ExceedsMaxMessageSize | V2Error_FailedToDecode | V2Error_FailedToTransactAsset | V2Error_InvalidLocation | V2Error_LocationCannotHold | V2Error_MaxWeightInvalid | V2Error_MultiLocationFull | V2Error_MultiLocationNotInvertible | V2Error_NotHoldingFees | V2Error_NotWithdrawable | V2Error_Overflow | V2Error_TooExpensive | V2Error_Transport | V2Error_Trap | V2Error_UnhandledXcmVersion | V2Error_Unimplemented | V2Error_UnknownClaim | V2Error_Unroutable | V2Error_UntrustedReserveLocation | V2Error_UntrustedTeleportLocation | V2Error_WeightLimitReached | V2Error_WeightNotComputable + +export interface V2Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V2Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V2Error_Barrier { + __kind: 'Barrier' +} + +export interface V2Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V2Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V2Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V2Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V2Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V2Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V2Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V2Error_MultiLocationFull { + __kind: 'MultiLocationFull' +} + +export interface V2Error_MultiLocationNotInvertible { + __kind: 'MultiLocationNotInvertible' +} + +export interface V2Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V2Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V2Error_Overflow { + __kind: 'Overflow' +} + +export interface V2Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V2Error_Transport { + __kind: 'Transport' +} + +export interface V2Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V2Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V2Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V2Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V2Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V2Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V2Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: bigint +} + +export interface V2Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V2Response = V2Response_Assets | V2Response_ExecutionResult | V2Response_Null | V2Response_Version + +export interface V2Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V2Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V2Error] | undefined) +} + +export interface V2Response_Null { + __kind: 'Null' +} + +export interface V2Response_Version { + __kind: 'Version' + value: number +} + +export interface V1MultiAsset { + id: V1AssetId + fun: V1Fungibility +} + +export type V1Fungibility = V1Fungibility_Fungible | V1Fungibility_NonFungible + +export interface V1Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V1Fungibility_NonFungible { + __kind: 'NonFungible' + value: V1AssetInstance +} + +export type V1AssetInstance = V1AssetInstance_Array16 | V1AssetInstance_Array32 | V1AssetInstance_Array4 | V1AssetInstance_Array8 | V1AssetInstance_Blob | V1AssetInstance_Index | V1AssetInstance_Undefined + +export interface V1AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V1AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V1AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V1AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V1AssetInstance_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface V1AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V1AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V1AssetId = V1AssetId_Abstract | V1AssetId_Concrete + +export interface V1AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V1AssetId_Concrete { + __kind: 'Concrete' + value: V1MultiLocation +} + +export interface V1MultiLocation { + parents: number + interior: V1Junctions +} + +export type V1Junctions = V1Junctions_Here | V1Junctions_X1 | V1Junctions_X2 | V1Junctions_X3 | V1Junctions_X4 | V1Junctions_X5 | V1Junctions_X6 | V1Junctions_X7 | V1Junctions_X8 + +export interface V1Junctions_Here { + __kind: 'Here' +} + +export interface V1Junctions_X1 { + __kind: 'X1' + value: V1Junction +} + +export interface V1Junctions_X2 { + __kind: 'X2' + value: [V1Junction, V1Junction] +} + +export interface V1Junctions_X3 { + __kind: 'X3' + value: [V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X4 { + __kind: 'X4' + value: [V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X5 { + __kind: 'X5' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X6 { + __kind: 'X6' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X7 { + __kind: 'X7' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X8 { + __kind: 'X8' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export type V1Junction = V1Junction_AccountId32 | V1Junction_AccountIndex64 | V1Junction_AccountKey20 | V1Junction_GeneralIndex | V1Junction_GeneralKey | V1Junction_OnlyChild | V1Junction_PalletInstance | V1Junction_Parachain | V1Junction_Plurality + +export interface V1Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V1Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V1Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V1Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V1Junction_GeneralKey { + __kind: 'GeneralKey' + value: Bytes +} + +export interface V1Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V1Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V1Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V1Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0BodyPart = V0BodyPart_AtLeastProportion | V0BodyPart_Fraction | V0BodyPart_Members | V0BodyPart_MoreThanProportion | V0BodyPart_Voice + +export interface V0BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V0BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V0BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Voice { + __kind: 'Voice' +} + +export type V0BodyId = V0BodyId_Executive | V0BodyId_Index | V0BodyId_Judicial | V0BodyId_Legislative | V0BodyId_Named | V0BodyId_Technical | V0BodyId_Unit + +export interface V0BodyId_Executive { + __kind: 'Executive' +} + +export interface V0BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V0BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V0BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V0BodyId_Named { + __kind: 'Named' + value: Bytes +} + +export interface V0BodyId_Technical { + __kind: 'Technical' +} + +export interface V0BodyId_Unit { + __kind: 'Unit' +} + +export type V0NetworkId = V0NetworkId_Any | V0NetworkId_Kusama | V0NetworkId_Named | V0NetworkId_Polkadot + +export interface V0NetworkId_Any { + __kind: 'Any' +} + +export interface V0NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V0NetworkId_Named { + __kind: 'Named' + value: Bytes +} + +export interface V0NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export const V1Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V1Junction, + X2: sts.tuple(() => [V1Junction, V1Junction]), + X3: sts.tuple(() => [V1Junction, V1Junction, V1Junction]), + X4: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction]), + X5: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X6: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X7: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X8: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + } +}) + +export const V1Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.bytes(), + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export const V0BodyId: sts.Type = sts.closedEnum(() => { + return { + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: sts.bytes(), + Technical: sts.unit(), + Unit: sts.unit(), + } +}) + +export const V0NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: sts.bytes(), + Polkadot: sts.unit(), + } +}) + +export const V1MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V1MultiAsset), + Wild: V1WildMultiAsset, + } +}) + +export const V1WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllOf: sts.enumStruct({ + id: V1AssetId, + fun: V1WildFungibility, + }), + } +}) + +export const V1WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V1WildFungibility = V1WildFungibility_Fungible | V1WildFungibility_NonFungible + +export interface V1WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V1WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V1AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V1MultiLocation, + } +}) + +export type V1WildMultiAsset = V1WildMultiAsset_All | V1WildMultiAsset_AllOf + +export interface V1WildMultiAsset_All { + __kind: 'All' +} + +export interface V1WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V1AssetId + fun: V1WildFungibility +} + +export type V1MultiAssetFilter = V1MultiAssetFilter_Definite | V1MultiAssetFilter_Wild + +export interface V1MultiAssetFilter_Definite { + __kind: 'Definite' + value: V1MultiAsset[] +} + +export interface V1MultiAssetFilter_Wild { + __kind: 'Wild' + value: V1WildMultiAsset +} + +export const V1MultiAsset: sts.Type = sts.struct(() => { + return { + id: V1AssetId, + fun: V1Fungibility, + } +}) + +export const V1Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V1AssetInstance, + } +}) + +export const V1AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V2Instruction = V2Instruction_BuyExecution | V2Instruction_ClaimAsset | V2Instruction_ClearError | V2Instruction_ClearOrigin | V2Instruction_DepositAsset | V2Instruction_DepositReserveAsset | V2Instruction_DescendOrigin | V2Instruction_ExchangeAsset | V2Instruction_HrmpChannelAccepted | V2Instruction_HrmpChannelClosing | V2Instruction_HrmpNewChannelOpenRequest | V2Instruction_InitiateReserveWithdraw | V2Instruction_InitiateTeleport | V2Instruction_QueryHolding | V2Instruction_QueryResponse | V2Instruction_ReceiveTeleportedAsset | V2Instruction_RefundSurplus | V2Instruction_ReportError | V2Instruction_ReserveAssetDeposited | V2Instruction_SetAppendix | V2Instruction_SetErrorHandler | V2Instruction_SubscribeVersion | V2Instruction_Transact | V2Instruction_TransferAsset | V2Instruction_TransferReserveAsset | V2Instruction_Trap | V2Instruction_UnsubscribeVersion | V2Instruction_WithdrawAsset + +export interface V2Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface V2Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface V2Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V2Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V2Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V2Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface V2Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V2Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V2Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V2Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V2Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface V2Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface V2Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface V2Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V2Instruction_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface V2Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface V2Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V2Instruction[] +} + +export interface V2Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V2Instruction[] +} + +export interface V2Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V2Instruction_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V2Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V2Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V2Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export type V2WeightLimit = V2WeightLimit_Limited | V2WeightLimit_Unlimited + +export interface V2WeightLimit_Limited { + __kind: 'Limited' + value: bigint +} + +export interface V2WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V1Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: V1Xcm, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + } +}) + +export const V1Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => V1Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type V1Order = V1Order_BuyExecution | V1Order_DepositAsset | V1Order_DepositReserveAsset | V1Order_ExchangeAsset | V1Order_InitiateReserveWithdraw | V1Order_InitiateTeleport | V1Order_Noop | V1Order_QueryHolding + +export interface V1Order_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: V1Xcm[] +} + +export interface V1Order_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V1Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V1Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_Noop { + __kind: 'Noop' +} + +export interface V1Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export const V1Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + Version: sts.number(), + } +}) + +export type V1Response = V1Response_Assets | V1Response_Version + +export interface V1Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V1Response_Version { + __kind: 'Version' + value: number +} + +export type V1Xcm = V1Xcm_HrmpChannelAccepted | V1Xcm_HrmpChannelClosing | V1Xcm_HrmpNewChannelOpenRequest | V1Xcm_QueryResponse | V1Xcm_ReceiveTeleportedAsset | V1Xcm_RelayedFrom | V1Xcm_ReserveAssetDeposited | V1Xcm_SubscribeVersion | V1Xcm_Transact | V1Xcm_TransferAsset | V1Xcm_TransferReserveAsset | V1Xcm_UnsubscribeVersion | V1Xcm_WithdrawAsset + +export interface V1Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V1Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V1Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V1Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface V1Xcm_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: V1Xcm +} + +export interface V1Xcm_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V1Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V1Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V1Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Xcm_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V1Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export const V0Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: V0Xcm, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + } +}) + +export const V0Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => V0Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type V0Order = V0Order_BuyExecution | V0Order_DepositAsset | V0Order_DepositReserveAsset | V0Order_ExchangeAsset | V0Order_InitiateReserveWithdraw | V0Order_InitiateTeleport | V0Order_Null | V0Order_QueryHolding + +export interface V0Order_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: V0Xcm[] +} + +export interface V0Order_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface V0Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_Null { + __kind: 'Null' +} + +export interface V0Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type V0MultiLocation = V0MultiLocation_Null | V0MultiLocation_X1 | V0MultiLocation_X2 | V0MultiLocation_X3 | V0MultiLocation_X4 | V0MultiLocation_X5 | V0MultiLocation_X6 | V0MultiLocation_X7 | V0MultiLocation_X8 + +export interface V0MultiLocation_Null { + __kind: 'Null' +} + +export interface V0MultiLocation_X1 { + __kind: 'X1' + value: V0Junction +} + +export interface V0MultiLocation_X2 { + __kind: 'X2' + value: [V0Junction, V0Junction] +} + +export interface V0MultiLocation_X3 { + __kind: 'X3' + value: [V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X4 { + __kind: 'X4' + value: [V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X5 { + __kind: 'X5' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X6 { + __kind: 'X6' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X7 { + __kind: 'X7' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X8 { + __kind: 'X8' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export type V0Junction = V0Junction_AccountId32 | V0Junction_AccountIndex64 | V0Junction_AccountKey20 | V0Junction_GeneralIndex | V0Junction_GeneralKey | V0Junction_OnlyChild | V0Junction_PalletInstance | V0Junction_Parachain | V0Junction_Parent | V0Junction_Plurality + +export interface V0Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V0Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V0Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V0Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V0Junction_GeneralKey { + __kind: 'GeneralKey' + value: Bytes +} + +export interface V0Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V0Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V0Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V0Junction_Parent { + __kind: 'Parent' +} + +export interface V0Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0MultiAsset = V0MultiAsset_AbstractFungible | V0MultiAsset_AbstractNonFungible | V0MultiAsset_All | V0MultiAsset_AllAbstractFungible | V0MultiAsset_AllAbstractNonFungible | V0MultiAsset_AllConcreteFungible | V0MultiAsset_AllConcreteNonFungible | V0MultiAsset_AllFungible | V0MultiAsset_AllNonFungible | V0MultiAsset_ConcreteFungible | V0MultiAsset_ConcreteNonFungible | V0MultiAsset_None + +export interface V0MultiAsset_AbstractFungible { + __kind: 'AbstractFungible' + id: Bytes + amount: bigint +} + +export interface V0MultiAsset_AbstractNonFungible { + __kind: 'AbstractNonFungible' + class: Bytes + instance: V1AssetInstance +} + +export interface V0MultiAsset_All { + __kind: 'All' +} + +export interface V0MultiAsset_AllAbstractFungible { + __kind: 'AllAbstractFungible' + id: Bytes +} + +export interface V0MultiAsset_AllAbstractNonFungible { + __kind: 'AllAbstractNonFungible' + class: Bytes +} + +export interface V0MultiAsset_AllConcreteFungible { + __kind: 'AllConcreteFungible' + id: V0MultiLocation +} + +export interface V0MultiAsset_AllConcreteNonFungible { + __kind: 'AllConcreteNonFungible' + class: V0MultiLocation +} + +export interface V0MultiAsset_AllFungible { + __kind: 'AllFungible' +} + +export interface V0MultiAsset_AllNonFungible { + __kind: 'AllNonFungible' +} + +export interface V0MultiAsset_ConcreteFungible { + __kind: 'ConcreteFungible' + id: V0MultiLocation + amount: bigint +} + +export interface V0MultiAsset_ConcreteNonFungible { + __kind: 'ConcreteNonFungible' + class: V0MultiLocation + instance: V1AssetInstance +} + +export interface V0MultiAsset_None { + __kind: 'None' +} + +export const V0MultiAsset: sts.Type = sts.closedEnum(() => { + return { + AbstractFungible: sts.enumStruct({ + id: sts.bytes(), + amount: sts.bigint(), + }), + AbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + instance: V1AssetInstance, + }), + All: sts.unit(), + AllAbstractFungible: sts.enumStruct({ + id: sts.bytes(), + }), + AllAbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + }), + AllConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + }), + AllConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + }), + AllFungible: sts.unit(), + AllNonFungible: sts.unit(), + ConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + amount: sts.bigint(), + }), + ConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + instance: V1AssetInstance, + }), + None: sts.unit(), + } +}) + +export const V0MultiLocation: sts.Type = sts.closedEnum(() => { + return { + Null: sts.unit(), + X1: V0Junction, + X2: sts.tuple(() => [V0Junction, V0Junction]), + X3: sts.tuple(() => [V0Junction, V0Junction, V0Junction]), + X4: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction]), + X5: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X6: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X7: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X8: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + } +}) + +export const V0Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.bytes(), + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Parent: sts.unit(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V0MultiAsset), + } +}) + +export type V0Response = V0Response_Assets + +export interface V0Response_Assets { + __kind: 'Assets' + value: V0MultiAsset[] +} + +export type V0Xcm = V0Xcm_HrmpChannelAccepted | V0Xcm_HrmpChannelClosing | V0Xcm_HrmpNewChannelOpenRequest | V0Xcm_QueryResponse | V0Xcm_RelayedFrom | V0Xcm_ReserveAssetDeposit | V0Xcm_TeleportAsset | V0Xcm_Transact | V0Xcm_TransferAsset | V0Xcm_TransferReserveAsset | V0Xcm_WithdrawAsset + +export interface V0Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V0Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V0Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V0Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface V0Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: V0Xcm +} + +export interface V0Xcm_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V0Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export type VersionedXcm = VersionedXcm_V0 | VersionedXcm_V1 | VersionedXcm_V2 + +export interface VersionedXcm_V0 { + __kind: 'V0' + value: V0Xcm +} + +export interface VersionedXcm_V1 { + __kind: 'V1' + value: V1Xcm +} + +export interface VersionedXcm_V2 { + __kind: 'V2' + value: V2Instruction[] +} + +export const V2WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: sts.bigint(), + Unlimited: sts.unit(), + } +}) + +export const VersionedMultiAssets: sts.Type = sts.closedEnum(() => { + return { + V0: sts.array(() => V0MultiAsset), + V1: sts.array(() => V1MultiAsset), + } +}) + +export type VersionedMultiAssets = VersionedMultiAssets_V0 | VersionedMultiAssets_V1 + +export interface VersionedMultiAssets_V0 { + __kind: 'V0' + value: V0MultiAsset[] +} + +export interface VersionedMultiAssets_V1 { + __kind: 'V1' + value: V1MultiAsset[] +} + +export const V1MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V1Junctions, + } +}) + +export const VersionedMultiLocation: sts.Type = sts.closedEnum(() => { + return { + V0: V0MultiLocation, + V1: V1MultiLocation, + } +}) + +export type VersionedMultiLocation = VersionedMultiLocation_V0 | VersionedMultiLocation_V1 + +export interface VersionedMultiLocation_V0 { + __kind: 'V0' + value: V0MultiLocation +} + +export interface VersionedMultiLocation_V1 { + __kind: 'V1' + value: V1MultiLocation +} + +export const Type_549: sts.Type = sts.closedEnum(() => { + return { + V0: Type_550, + V1: Type_555, + V2: sts.array(() => Type_561), + } +}) + +export const Type_561: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => Type_561), + SetErrorHandler: sts.array(() => Type_561), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_554, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const Type_554: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface Type_554 { + encoded: Bytes +} + +export type Type_561 = Type_561_BuyExecution | Type_561_ClaimAsset | Type_561_ClearError | Type_561_ClearOrigin | Type_561_DepositAsset | Type_561_DepositReserveAsset | Type_561_DescendOrigin | Type_561_ExchangeAsset | Type_561_HrmpChannelAccepted | Type_561_HrmpChannelClosing | Type_561_HrmpNewChannelOpenRequest | Type_561_InitiateReserveWithdraw | Type_561_InitiateTeleport | Type_561_QueryHolding | Type_561_QueryResponse | Type_561_ReceiveTeleportedAsset | Type_561_RefundSurplus | Type_561_ReportError | Type_561_ReserveAssetDeposited | Type_561_SetAppendix | Type_561_SetErrorHandler | Type_561_SubscribeVersion | Type_561_Transact | Type_561_TransferAsset | Type_561_TransferReserveAsset | Type_561_Trap | Type_561_UnsubscribeVersion | Type_561_WithdrawAsset + +export interface Type_561_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface Type_561_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface Type_561_ClearError { + __kind: 'ClearError' +} + +export interface Type_561_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_561_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_561_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_561_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface Type_561_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_561_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_561_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_561_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_561_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_561_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_561_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface Type_561_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface Type_561_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface Type_561_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_561_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface Type_561_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface Type_561_SetAppendix { + __kind: 'SetAppendix' + value: Type_561[] +} + +export interface Type_561_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_561[] +} + +export interface Type_561_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_561_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_554 +} + +export interface Type_561_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_561_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_561_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_561_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_561_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export const Type_555: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_557), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: Type_555, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_557), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_554, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_557), + }), + } +}) + +export const Type_557: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => Type_555), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type Type_557 = Type_557_BuyExecution | Type_557_DepositAsset | Type_557_DepositReserveAsset | Type_557_ExchangeAsset | Type_557_InitiateReserveWithdraw | Type_557_InitiateTeleport | Type_557_Noop | Type_557_QueryHolding + +export interface Type_557_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: Type_555[] +} + +export interface Type_557_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_557_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_557_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_557_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface Type_557_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_557_Noop { + __kind: 'Noop' +} + +export interface Type_557_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export type Type_555 = Type_555_HrmpChannelAccepted | Type_555_HrmpChannelClosing | Type_555_HrmpNewChannelOpenRequest | Type_555_QueryResponse | Type_555_ReceiveTeleportedAsset | Type_555_RelayedFrom | Type_555_ReserveAssetDeposited | Type_555_SubscribeVersion | Type_555_Transact | Type_555_TransferAsset | Type_555_TransferReserveAsset | Type_555_UnsubscribeVersion | Type_555_WithdrawAsset + +export interface Type_555_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_555_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_555_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_555_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface Type_555_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: Type_557[] +} + +export interface Type_555_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: Type_555 +} + +export interface Type_555_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: Type_557[] +} + +export interface Type_555_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_555_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_554 +} + +export interface Type_555_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_555_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_555_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_555_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: Type_557[] +} + +export const Type_550: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: Type_550, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_552), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_552), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_554, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_552), + }), + } +}) + +export const Type_552: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => Type_550), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type Type_552 = Type_552_BuyExecution | Type_552_DepositAsset | Type_552_DepositReserveAsset | Type_552_ExchangeAsset | Type_552_InitiateReserveWithdraw | Type_552_InitiateTeleport | Type_552_Null | Type_552_QueryHolding + +export interface Type_552_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: Type_550[] +} + +export interface Type_552_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_552_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_552_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface Type_552_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface Type_552_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_552_Null { + __kind: 'Null' +} + +export interface Type_552_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type Type_550 = Type_550_HrmpChannelAccepted | Type_550_HrmpChannelClosing | Type_550_HrmpNewChannelOpenRequest | Type_550_QueryResponse | Type_550_RelayedFrom | Type_550_ReserveAssetDeposit | Type_550_TeleportAsset | Type_550_Transact | Type_550_TransferAsset | Type_550_TransferReserveAsset | Type_550_WithdrawAsset + +export interface Type_550_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_550_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_550_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_550_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface Type_550_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: Type_550 +} + +export interface Type_550_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: Type_552[] +} + +export interface Type_550_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: Type_552[] +} + +export interface Type_550_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_554 +} + +export interface Type_550_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_550_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_550_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: Type_552[] +} + +export type Type_549 = Type_549_V0 | Type_549_V1 | Type_549_V2 + +export interface Type_549_V0 { + __kind: 'V0' + value: Type_550 +} + +export interface Type_549_V1 { + __kind: 'V1' + value: Type_555 +} + +export interface Type_549_V2 { + __kind: 'V2' + value: Type_561[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type XcmPalletCall = XcmPalletCall_execute | XcmPalletCall_force_default_xcm_version | XcmPalletCall_force_subscribe_version_notify | XcmPalletCall_force_unsubscribe_version_notify | XcmPalletCall_force_xcm_version | XcmPalletCall_limited_reserve_transfer_assets | XcmPalletCall_limited_teleport_assets | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets + +/** + * Execute an XCM message from a local, signed, origin. + * + * An event is deposited indicating whether `msg` could be executed completely or only + * partially. + * + * No more than `max_weight` will be used in its attempted execution. If this is less than the + * maximum amount of weight that the message could take to be executed, then no execution + * attempt will be made. + * + * NOTE: A successful return to this does *not* imply that the `msg` was executed successfully + * to completion; only that *some* of it was executed. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Type_549 + maxWeight: bigint +} + +/** + * Set a safe XCM version (the version that XCM should be encoded with if the most recent + * version a destination can accept is unknown). + * + * - `origin`: Must be Root. + * - `maybe_xcm_version`: The default XCM encoding version, or `None` to disable. + */ +export interface XcmPalletCall_force_default_xcm_version { + __kind: 'force_default_xcm_version' + maybeXcmVersion?: (number | undefined) +} + +/** + * Ask a location to notify us regarding their XCM version and any changes to it. + * + * - `origin`: Must be Root. + * - `location`: The location to which we should subscribe for XCM version notifications. + */ +export interface XcmPalletCall_force_subscribe_version_notify { + __kind: 'force_subscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Require that a particular destination should no longer notify us regarding any XCM + * version changes. + * + * - `origin`: Must be Root. + * - `location`: The location to which we are currently subscribed for XCM version + * notifications which we no longer desire. + */ +export interface XcmPalletCall_force_unsubscribe_version_notify { + __kind: 'force_unsubscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Extoll that a particular destination can be communicated with through a particular + * version of XCM. + * + * - `origin`: Must be Root. + * - `location`: The destination that is being described. + * - `xcm_version`: The latest version of XCM that `location` supports. + */ +export interface XcmPalletCall_force_xcm_version { + __kind: 'force_xcm_version' + location: V1MultiLocation + xcmVersion: number +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination + * chain and forward a notification XCM. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight + * is needed than `weight_limit`, then the operation will fail and the assets send may be + * at risk. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_reserve_transfer_assets { + __kind: 'limited_reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight + * is needed than `weight_limit`, then the operation will fail and the assets send may be + * at risk. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_teleport_assets { + __kind: 'limited_teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination + * chain and forward a notification XCM. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, + * with all fees taken as needed from the asset. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +export interface XcmPalletCall_send { + __kind: 'send' + dest: VersionedMultiLocation + message: VersionedXcm +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, + * with all fees taken as needed from the asset. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: MultiAddress, + target: MultiAddress, + schedule: VestingInfo, + }), + merge_schedules: sts.enumStruct({ + schedule1Index: sts.number(), + schedule2Index: sts.number(), + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: MultiAddress, + }), + vested_transfer: sts.enumStruct({ + target: MultiAddress, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: sts.bigint(), + perBlock: sts.bigint(), + startingBlock: sts.number(), + } +}) + +export interface VestingInfo { + locked: bigint + perBlock: bigint + startingBlock: number +} + +export const MultiAddress: sts.Type = sts.closedEnum(() => { + return { + Address20: sts.bytes(), + Address32: sts.bytes(), + Id: AccountId32, + Index: sts.unit(), + Raw: sts.bytes(), + } +}) + +export type MultiAddress = MultiAddress_Address20 | MultiAddress_Address32 | MultiAddress_Id | MultiAddress_Index | MultiAddress_Raw + +export interface MultiAddress_Address20 { + __kind: 'Address20' + value: Bytes +} + +export interface MultiAddress_Address32 { + __kind: 'Address32' + value: Bytes +} + +export interface MultiAddress_Id { + __kind: 'Id' + value: AccountId32 +} + +export interface MultiAddress_Index { + __kind: 'Index' +} + +export interface MultiAddress_Raw { + __kind: 'Raw' + value: Bytes +} + +export type AccountId32 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_merge_schedules | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: MultiAddress + target: MultiAddress + schedule: VestingInfo +} + +/** + * Merge two vesting schedules together, creating a new vesting schedule that unlocks over + * the highest possible start and end blocks. If both schedules have already started the + * current block will be used as the schedule start; with the caveat that if one schedule + * is finished by the current block, the other will be treated as the new merged schedule, + * unmodified. + * + * NOTE: If `schedule1_index == schedule2_index` this is a no-op. + * NOTE: This will unlock all schedules through the current block prior to merging. + * NOTE: If both schedules have ended by the current block, no new schedule will be created + * and both will be removed. + * + * Merged schedule attributes: + * - `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block, + * current_block)`. + * - `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`. + * - `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`. + * + * The dispatch origin for this call must be _Signed_. + * + * - `schedule1_index`: index of the first schedule to merge. + * - `schedule2_index`: index of the second schedule to merge. + */ +export interface VestingCall_merge_schedules { + __kind: 'merge_schedules' + schedule1Index: number + schedule2Index: number +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: MultiAddress +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account receiving the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: MultiAddress + schedule: VestingInfo +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Call, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Call), + }), + dispatch_as: sts.enumStruct({ + asOrigin: OriginCaller, + call: Call, + }), + force_batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + } +}) + +export const OriginCaller: sts.Type = sts.closedEnum(() => { + return { + Council: Type_336, + ParachainsOrigin: Origin, + TechnicalCommittee: Type_337, + Void: Void, + XcmPallet: Type_339, + system: RawOrigin, + } +}) + +export const RawOrigin: sts.Type = sts.closedEnum(() => { + return { + None: sts.unit(), + Root: sts.unit(), + Signed: AccountId32, + } +}) + +export type RawOrigin = RawOrigin_None | RawOrigin_Root | RawOrigin_Signed + +export interface RawOrigin_None { + __kind: 'None' +} + +export interface RawOrigin_Root { + __kind: 'Root' +} + +export interface RawOrigin_Signed { + __kind: 'Signed' + value: AccountId32 +} + +export const Type_339: sts.Type = sts.closedEnum(() => { + return { + Response: V1MultiLocation, + Xcm: V1MultiLocation, + } +}) + +export type Type_339 = Type_339_Response | Type_339_Xcm + +export interface Type_339_Response { + __kind: 'Response' + value: V1MultiLocation +} + +export interface Type_339_Xcm { + __kind: 'Xcm' + value: V1MultiLocation +} + +export const Void: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Void = never + +export const Type_337: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_337 = Type_337_Member | Type_337_Members | Type_337__Phantom + +export interface Type_337_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_337_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_337__Phantom { + __kind: '_Phantom' +} + +export const Origin: sts.Type = sts.closedEnum(() => { + return { + Parachain: Id, + } +}) + +export const Id = sts.number() + +export type Origin = Origin_Parachain + +export interface Origin_Parachain { + __kind: 'Parachain' + value: Id +} + +export type Id = number + +export const Type_336: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_336 = Type_336_Member | Type_336_Members | Type_336__Phantom + +export interface Type_336_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_336_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_336__Phantom { + __kind: '_Phantom' +} + +export type OriginCaller = OriginCaller_Council | OriginCaller_ParachainsOrigin | OriginCaller_TechnicalCommittee | OriginCaller_Void | OriginCaller_XcmPallet | OriginCaller_system + +export interface OriginCaller_Council { + __kind: 'Council' + value: Type_336 +} + +export interface OriginCaller_ParachainsOrigin { + __kind: 'ParachainsOrigin' + value: Origin +} + +export interface OriginCaller_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: Type_337 +} + +export interface OriginCaller_Void { + __kind: 'Void' + value: Void +} + +export interface OriginCaller_XcmPallet { + __kind: 'XcmPallet' + value: Type_339 +} + +export interface OriginCaller_system { + __kind: 'system' + value: RawOrigin +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all | UtilityCall_dispatch_as | UtilityCall_force_batch + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Call +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Call[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Call[] +} + +/** + * Dispatches a function call with a provided origin. + * + * The dispatch origin for this call must be _Root_. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB write (event). + * - Weight of derivative `call` execution + T::WeightInfo::dispatch_as(). + * # + */ +export interface UtilityCall_dispatch_as { + __kind: 'dispatch_as' + asOrigin: OriginCaller + call: Call +} + +/** + * Send a batch of dispatch calls. + * Unlike `batch`, it allows errors and won't interrupt. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_force_batch { + __kind: 'force_batch' + calls: Call[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UmpCall: sts.Type = sts.closedEnum(() => { + return { + service_overweight: sts.enumStruct({ + index: sts.bigint(), + weightLimit: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UmpCall = UmpCall_service_overweight + +/** + * Service a single overweight upward message. + * + * - `origin`: Must pass `ExecuteOverweightOrigin`. + * - `index`: The index of the overweight message to service. + * - `weight_limit`: The amount of weight that message execution may take. + * + * Errors: + * - `UnknownMessageIndex`: Message of `index` is unknown. + * - `WeightOverLimit`: Message execution may use greater than `weight_limit`. + * + * Events: + * - `OverweightServiced`: On success. + */ +export interface UmpCall_service_overweight { + __kind: 'service_overweight' + index: bigint + weightLimit: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: MultiAddress, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + remove_approval: sts.enumStruct({ + proposalId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_remove_approval + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: MultiAddress +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Force a previously approved proposal to be removed from the approval queue. + * The original deposit will no longer be returned. + * + * May only be called from `T::RejectOrigin`. + * - `proposal_id`: The index of a proposal + * + * # + * - Complexity: O(A) where `A` is the number of approvals + * - Db reads and writes: `Approvals` + * # + * + * Errors: + * - `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue, + * i.e., the proposal has not been approved. This could also mean the proposal does not + * exist altogether, thus there is no way it would have been approved in the first place. + */ +export interface TreasuryCall_remove_approval { + __kind: 'remove_approval' + proposalId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TipsCall: sts.Type = sts.closedEnum(() => { + return { + close_tip: sts.enumStruct({ + hash: H256, + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId32, + }), + retract_tip: sts.enumStruct({ + hash: H256, + }), + slash_tip: sts.enumStruct({ + hash: H256, + }), + tip: sts.enumStruct({ + hash: H256, + tipValue: sts.bigint(), + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId32, + tipValue: sts.bigint(), + }), + } +}) + +export const H256 = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TipsCall = TipsCall_close_tip | TipsCall_report_awesome | TipsCall_retract_tip | TipsCall_slash_tip | TipsCall_tip | TipsCall_tip_new + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost + * depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TipsCall_close_tip { + __kind: 'close_tip' + hash: H256 +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId32 +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TipsCall_retract_tip { + __kind: 'retract_tip' + hash: H256 +} + +/** + * Remove and slash an already-open tip. + * + * May only be called from `T::RejectOrigin`. + * + * As a result, the finder is slashed and the deposits are lost. + * + * Emits `TipSlashed` if successful. + * + * # + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * # + */ +export interface TipsCall_slash_tip { + __kind: 'slash_tip' + hash: H256 +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`, insert tip and check closing, `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TipsCall_tip { + __kind: 'tip' + hash: H256 + tipValue: bigint +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of + * `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId32 + tipValue: bigint +} + +export type H256 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in + * `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId32, + }), + change_key: sts.enumStruct({ + new: AccountId32, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId32, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId32), + }), + set_prime: sts.enumStruct({ + who: AccountId32, + }), + swap_member: sts.enumStruct({ + remove: AccountId32, + add: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId32 +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId32 +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId32 +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId32[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId32 +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId32 + add: AccountId32 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: sts.bytes(), + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => sts.bytes()), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + }), + } +}) + +export const Perbill = sts.number() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Bytes + subkeys: number +} + +/** + * Kill some items from storage. + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Bytes[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Make some on-chain remark and emit event. + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is + * expensive). + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very + * expensive. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full + * block. # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: [Bytes, Bytes][] +} + +export type Perbill = number + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: MultiAddress, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: sts.number(), + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + controller: AccountId32, + }), + force_apply_min_commission: sts.enumStruct({ + validatorStash: AccountId32, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => MultiAddress), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => MultiAddress), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + }), + reap_stash: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: MultiAddress, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId32), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_staking_configs: sts.enumStruct({ + minNominatorBond: ConfigOp, + minValidatorBond: ConfigOp, + maxNominatorCount: Type_252, + maxValidatorCount: Type_252, + chillThreshold: Type_253, + minCommission: Type_254, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export const Type_254: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export type Type_254 = Type_254_Noop | Type_254_Remove | Type_254_Set + +export interface Type_254_Noop { + __kind: 'Noop' +} + +export interface Type_254_Remove { + __kind: 'Remove' +} + +export interface Type_254_Set { + __kind: 'Set' + value: Perbill +} + +export const Type_253: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Percent, + } +}) + +export type Type_253 = Type_253_Noop | Type_253_Remove | Type_253_Set + +export interface Type_253_Noop { + __kind: 'Noop' +} + +export interface Type_253_Remove { + __kind: 'Remove' +} + +export interface Type_253_Set { + __kind: 'Set' + value: Percent +} + +export type Percent = number + +export const Type_252: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_252 = Type_252_Noop | Type_252_Remove | Type_252_Set + +export interface Type_252_Noop { + __kind: 'Noop' +} + +export interface Type_252_Remove { + __kind: 'Remove' +} + +export interface Type_252_Set { + __kind: 'Set' + value: number +} + +export const ConfigOp: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type ConfigOp = ConfigOp_Noop | ConfigOp_Remove | ConfigOp_Set + +export interface ConfigOp_Noop { + __kind: 'Noop' +} + +export interface ConfigOp_Remove { + __kind: 'Remove' +} + +export interface ConfigOp_Set { + __kind: 'Set' + value: bigint +} + +export const Percent = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_force_apply_min_commission | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_staking_configs | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: MultiAddress + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose + * any limitation on the amount that can be added. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: number + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Declare a `controller` to stop participating as either a validator or nominator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_, but can be called by anyone. + * + * If the caller is the same as the controller being targeted, then no further checks are + * enforced, and this function behaves just like `chill`. + * + * If the caller is different than the controller being targeted, the following conditions + * must be met: + * + * * `controller` must belong to a nominator who has become non-decodable, + * + * Or: + * + * * A `ChillThreshold` must be set and checked which defines how close to the max + * nominators or validators we must reach before users can start chilling one-another. + * * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine + * how close we are to the threshold. + * * A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines + * if this is a person that should be chilled because they have not met the threshold + * bond required. + * + * This can be helpful if bond requirements are updated, and we need to remove old users + * who do not satisfy these requirements. + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + controller: AccountId32 +} + +/** + * Force a validator to have at least the minimum commission. This will not affect a + * validator who already has a commission greater than or equal to the minimum. Any account + * can call this. + */ +export interface StakingCall_force_apply_min_commission { + __kind: 'force_apply_min_commission' + validatorStash: AccountId32 +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * Thus the election process may be ongoing when this is called. In this case the + * election will continue until the next era is triggered. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: MultiAddress[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (T::MaxNominations). + * - Both the reads and writes follow a similar pattern. + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: MultiAddress[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId32 + era: number +} + +/** + * Remove all data structures concerning a staker/stash once it is at a state where it can + * be considered `dust` in the staking system. The requirements are: + * + * 1. the `total_balance` of the stash is below existential deposit. + * 2. or, the `ledger.total` of the stash is below existential deposit. + * + * The former can happen in cases like a slash; the latter when a fully unbonded account + * is still receiving staking rewards in `RewardDestination::Staked`. + * + * It can be called by anyone, as long as `stash` meets the above requirements. + * + * Refunds the transaction fees upon successful execution. + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MaxUnlockingChunks`. + * - Storage changes: Can't increase storage, only decrease it. + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt instantly (as soon as this function is completed successfully). + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: MultiAddress +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. This + * should report all the storage items that will be deleted by clearing old era history. + * Needed to report an accurate weight for the dispatch. Trusted by `Root` to report an + * accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Weight: O(E) + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, + * ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId32[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt instantly (as soon as this function is completed successfully). + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Update the various staking configurations . + * + * * `min_nominator_bond`: The minimum active bond needed to be a nominator. + * * `min_validator_bond`: The minimum active bond needed to be a validator. + * * `max_nominator_count`: The max number of users who can be a nominator at once. When + * set to `None`, no limit is enforced. + * * `max_validator_count`: The max number of users who can be a validator at once. When + * set to `None`, no limit is enforced. + * * `chill_threshold`: The ratio of `max_nominator_count` or `max_validator_count` which + * should be filled in order for the `chill_other` transaction to work. + * * `min_commission`: The minimum amount of commission that each validators must maintain. + * This is checked only upon calling `validate`. Existing validators are not affected. + * + * Origin must be Root to call this function. + * + * NOTE: Existing nominators and validators will not be affected by this update. + * to kick people under the new limits, `chill_other` should be called. + */ +export interface StakingCall_set_staking_configs { + __kind: 'set_staking_configs' + minNominatorBond: ConfigOp + minValidatorBond: ConfigOp + maxNominatorCount: Type_252 + maxValidatorCount: Type_252 + chillThreshold: Type_253 + minCommission: Type_254 +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * If a user encounters the `InsufficientBond` error when calling this extrinsic, + * they should call `chill` first in order to free up their bonded funds. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * Complexity O(S) where S is the number of slashing spans to remove + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: sts.bigint(), + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId32, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId32, + judgement: Type_382, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId32, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: MultiAddress, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId32, + value: sts.bigint(), + tip: sts.bigint(), + }), + } +}) + +export const Type_382: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export type Type_382 = Type_382_Approve | Type_382_Rebid | Type_382_Reject + +export interface Type_382_Approve { + __kind: 'Approve' +} + +export interface Type_382_Rebid { + __kind: 'Rebid' +} + +export interface Type_382_Reject { + __kind: 'Reject' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: bigint +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * pallet to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId32 + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId32 + judgement: Type_382 +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin forgives + * (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to + * society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId32 + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured + * payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be approved (`true`) or + * rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: MultiAddress + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId32 + value: bigint + tip: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: Id, + }), + force_lease: sts.enumStruct({ + para: Id, + leaser: AccountId32, + amount: sts.bigint(), + periodBegin: sts.number(), + periodCount: sts.number(), + }), + trigger_onboard: sts.enumStruct({ + para: Id, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * Clear all leases for a Para Id, refunding any deposits back to the original owners. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: Id +} + +/** + * Just a connect into the `lease_out` call, in case Root wants to force some lease to happen + * independently of any other on-chain mechanism to use it. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: Id + leaser: AccountId32 + amount: bigint + periodBegin: number + periodCount: number +} + +/** + * Try to onboard a parachain that has a lease for the current lease period. + * + * This function can be useful if there was some state issue with a para that should + * have onboarded, but was unable to. As long as they have a lease period, we can + * let them onboard from here. + * + * Origin must be signed, but can be called by anyone. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: SessionKeys, + proof: sts.bytes(), + }), + } +}) + +export const SessionKeys: sts.Type = sts.struct(() => { + return { + grandpa: Public, + babe: sts.bytes(), + imOnline: sts.bytes(), + paraValidator: sts.bytes(), + paraAssignment: sts.bytes(), + authorityDiscovery: sts.bytes(), + } +}) + +export const Public = sts.bytes() + +export interface SessionKeys { + grandpa: Public + babe: Bytes + imOnline: Bytes + paraValidator: Bytes + paraAssignment: Bytes + authorityDiscovery: Bytes +} + +export type Public = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be Signed and the account must be either be + * convertible to a validator ID using the chain's typical addressing system (this usually + * means being a controller account) or directly convertible into a validator ID (which + * usually means being a stash account). + * + * # + * - Complexity: `O(1)` in number of key types. Actual cost depends on the number of length + * of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)`. Actual cost depends on the number of length of + * `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: SessionKeys + proof: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: sts.number(), + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + schedule_after: sts.enumStruct({ + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + } +}) + +export const MaybeHashed: sts.Type = sts.closedEnum(() => { + return { + Hash: H256, + Value: Call, + } +}) + +export type MaybeHashed = MaybeHashed_Hash | MaybeHashed_Value + +export interface MaybeHashed_Hash { + __kind: 'Hash' + value: H256 +} + +export interface MaybeHashed_Value { + __kind: 'Value' + value: Call +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: number + index: number +} + +/** + * Cancel a named scheduled task. + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Schedule a named task. + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`](Self::schedule_named). + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + deregister: sts.enumStruct({ + id: Id, + }), + force_register: sts.enumStruct({ + who: AccountId32, + deposit: sts.bigint(), + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + force_remove_lock: sts.enumStruct({ + para: Id, + }), + register: sts.enumStruct({ + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + reserve: sts.unit(), + swap: sts.enumStruct({ + id: Id, + other: Id, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RegistrarCall = RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_force_remove_lock | RegistrarCall_register | RegistrarCall_reserve | RegistrarCall_swap + +/** + * Deregister a Para Id, freeing all data and returning any deposit. + * + * The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: Id +} + +/** + * Force the registration of a Para Id on the relay chain. + * + * This function must be called by a Root origin. + * + * The deposit taken can be specified for this registration. Any `ParaId` + * can be registered, including sub-1000 IDs which are System Parachains. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId32 + deposit: bigint + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Remove a manager lock from a para. This will allow the manager of a + * previously locked para to deregister or swap a para without using governance. + * + * Can only be called by the Root origin. + */ +export interface RegistrarCall_force_remove_lock { + __kind: 'force_remove_lock' + para: Id +} + +/** + * Register head data and validation code for a reserved Para Id. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. + * - `id`: The para ID. Must be owned/managed by the `origin` signing account. + * - `genesis_head`: The genesis head data of the parachain/thread. + * - `validation_code`: The initial validation code of the parachain/thread. + * + * ## Deposits/Fees + * The origin signed account must reserve a corresponding deposit for the registration. Anything already + * reserved previously for this para ID is accounted for. + * + * ## Events + * The `Registered` event is emitted in case of success. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Reserve a Para Id on the relay chain. + * + * This function will reserve a new Para Id to be owned/managed by the origin account. + * The origin account is able to register head data and validation code using `register` to create + * a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID. + * + * ## Deposits/Fees + * The origin must reserve a deposit of `ParaDeposit` for the registration. + * + * ## Events + * The `Reserved` event is emitted in case of success, which provides the ID reserved for use. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * Swap a parachain with another parachain or parathread. + * + * The origin must be Root, the `para` owner, or the `para` itself. + * + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: Id + other: Id +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId32, + call: Call, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId32, + }), + claim_recovery: sts.enumStruct({ + account: AccountId32, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId32, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId32), + threshold: sts.number(), + delayPeriod: sts.number(), + }), + initiate_recovery: sts.enumStruct({ + account: AccountId32, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId32, + rescuer: AccountId32, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId32, + rescuer: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId32 + call: Call +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId32 +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully recovered by + * you. + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId32 +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId32 +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. Should be + * ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt before the + * account can be recovered. Should be less than or equal to the length of the list of + * friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized that + * needs to pass before the account can be recovered. + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId32[] + threshold: number + delayPeriod: number +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account needs to be + * recoverable (i.e. have a recovery configuration). + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId32 +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId32 + rescuer: AccountId32 +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId32 + rescuer: AccountId32 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: AccountId32, + proxyType: ProxyType, + delay: sts.number(), + }), + announce: sts.enumStruct({ + real: AccountId32, + callHash: H256, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + delay: sts.number(), + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId32, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId32, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + proxy_announced: sts.enumStruct({ + delegate: AccountId32, + real: AccountId32, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + reject_announcement: sts.enumStruct({ + delegate: AccountId32, + callHash: H256, + }), + remove_announcement: sts.enumStruct({ + real: AccountId32, + callHash: H256, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: AccountId32, + proxyType: ProxyType, + delay: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: AccountId32 + proxyType: ProxyType + delay: number +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: AccountId32 + callHash: H256 +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + * TODO: Might be over counting 1 read + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: number + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId32 + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId32 + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Dispatch the given `call` from an account that the sender is authorized for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: AccountId32 + real: AccountId32 + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: AccountId32 + callHash: H256 +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: AccountId32 + callHash: H256 +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: AccountId32 + proxyType: ProxyType + delay: number +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Society | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Society { + __kind: 'Society' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PreimageCall: sts.Type = sts.closedEnum(() => { + return { + note_preimage: sts.enumStruct({ + bytes: sts.bytes(), + }), + request_preimage: sts.enumStruct({ + hash: H256, + }), + unnote_preimage: sts.enumStruct({ + hash: H256, + }), + unrequest_preimage: sts.enumStruct({ + hash: H256, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PreimageCall = PreimageCall_note_preimage | PreimageCall_request_preimage | PreimageCall_unnote_preimage | PreimageCall_unrequest_preimage + +/** + * Register a preimage on-chain. + * + * If the preimage was previously requested, no fees or deposits are taken for providing + * the preimage. Otherwise, a deposit is taken proportional to the size of the preimage. + */ +export interface PreimageCall_note_preimage { + __kind: 'note_preimage' + bytes: Bytes +} + +/** + * Request a preimage be uploaded to the chain without paying any fees or deposits. + * + * If the preimage requests has already been provided on-chain, we unreserve any deposit + * a user may have paid, and take the control of the preimage out of their hands. + */ +export interface PreimageCall_request_preimage { + __kind: 'request_preimage' + hash: H256 +} + +/** + * Clear an unrequested preimage from the runtime storage. + */ +export interface PreimageCall_unnote_preimage { + __kind: 'unnote_preimage' + hash: H256 +} + +/** + * Clear a previously made request for a preimage. + * + * NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. + */ +export interface PreimageCall_unrequest_preimage { + __kind: 'unrequest_preimage' + hash: H256 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PhragmenElectionCall: sts.Type = sts.closedEnum(() => { + return { + clean_defunct_voters: sts.enumStruct({ + numVoters: sts.number(), + numDefunct: sts.number(), + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + hasReplacement: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId32), + value: sts.bigint(), + }), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PhragmenElectionCall = PhragmenElectionCall_clean_defunct_voters | PhragmenElectionCall_remove_member | PhragmenElectionCall_remove_voter | PhragmenElectionCall_renounce_candidacy | PhragmenElectionCall_submit_candidacy | PhragmenElectionCall_vote + +/** + * Clean all voters who are defunct (i.e. they do not serve any purpose at all). The + * deposit of the removed voters are returned. + * + * This is an root function to be used only for cleaning the state. + * + * The dispatch origin of this call must be root. + * + * # + * The total number of voters and those that are defunct must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_clean_defunct_voters { + __kind: 'clean_defunct_voters' + numVoters: number + numDefunct: number +} + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, a new phragmen election is started. + * + * The dispatch origin of this call must be root. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement, we use a small weight. Else, since this is a root call and + * will go into phragmen, we assume full block for now. + * # + */ +export interface PhragmenElectionCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + hasReplacement: boolean +} + +/** + * Remove `origin` as a voter. + * + * This removes the lock and returns the deposit. + * + * The dispatch origin of this call must be signed and be a voter. + */ +export interface PhragmenElectionCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * + * - `origin` is a candidate and not elected in any set. In this case, the deposit is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the deposit is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the deposit is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_member`](Self::remove_member), if replacement runners exists, they + * are immediately used. If the prime is renouncing, then no prime will exist until the + * next round. + * + * The dispatch origin of this call must be signed, and have one of the above roles. + * + * # + * The type of renouncing must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Submit oneself for candidacy. A fixed amount of deposit is recorded. + * + * All candidates are wiped at the end of the term. They either become a member/runner-up, + * or leave the system while their deposit is slashed. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`] + * to get their deposit back. Losing the spot in an election will always lead to a slash. + * + * # + * The number of current candidates must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is + * reserved. The deposit is based on the number of votes and can be updated over time. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * If `value` is more than `who`'s free balance, then the maximum of the two is used. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * It is the responsibility of the caller to **NOT** place all of their balance into the + * lock and keep some for further operations. + * + * # + * We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less. + * # + */ +export interface PhragmenElectionCall_vote { + __kind: 'vote' + votes: AccountId32[] + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasSharedCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasDisputesCall: sts.Type = sts.closedEnum(() => { + return { + force_unfreeze: sts.unit(), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasDisputesCall = ParasDisputesCall_force_unfreeze + +export interface ParasDisputesCall_force_unfreeze { + __kind: 'force_unfreeze' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + add_trusted_validation_code: sts.enumStruct({ + validationCode: ValidationCode, + }), + force_note_new_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: Id, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + relayParentNumber: sts.number(), + }), + force_set_current_code: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + include_pvf_check_statement: sts.enumStruct({ + stmt: V2PvfCheckStatement, + signature: sts.bytes(), + }), + poke_unused_validation_code: sts.enumStruct({ + validationCodeHash: ValidationCodeHash, + }), + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const V2PvfCheckStatement: sts.Type = sts.struct(() => { + return { + accept: sts.boolean(), + subject: ValidationCodeHash, + sessionIndex: sts.number(), + validatorIndex: V2ValidatorIndex, + } +}) + +export const V2ValidatorIndex = sts.number() + +export interface V2PvfCheckStatement { + accept: boolean + subject: ValidationCodeHash + sessionIndex: number + validatorIndex: V2ValidatorIndex +} + +export type V2ValidatorIndex = number + +export type ValidationCodeHash = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasCall = ParasCall_add_trusted_validation_code | ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head | ParasCall_include_pvf_check_statement | ParasCall_poke_unused_validation_code + +/** + * Adds the validation code to the storage. + * + * The code will not be added if it is already present. Additionally, if PVF pre-checking + * is running for that code, it will be instantly accepted. + * + * Otherwise, the code will be added into the storage. Note that the code will be added + * into storage with reference count 0. This is to account the fact that there are no users + * for this code yet. The caller will have to make sure that this code eventually gets + * used by some parachain or removed from the storage to avoid storage leaks. For the latter + * prefer to use the `poke_unused_validation_code` dispatchable to raw storage manipulation. + * + * This function is mainly meant to be used for upgrading parachains that do not follow + * the go-ahead signal while the PVF pre-checking feature is enabled. + */ +export interface ParasCall_add_trusted_validation_code { + __kind: 'add_trusted_validation_code' + validationCode: ValidationCode +} + +/** + * Note a new block head for para within the context of the current block. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: Id + newHead: HeadData +} + +/** + * Put a parachain directly into the next session's action queue. + * We can't queue it any sooner than this without going into the + * initializer... + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: Id +} + +/** + * Schedule an upgrade as if it was scheduled in the given relay parent block. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: Id + newCode: ValidationCode + relayParentNumber: number +} + +/** + * Set the storage for the parachain validation code immediately. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: Id + newCode: ValidationCode +} + +/** + * Set the storage for the current parachain head data immediately. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: Id + newHead: HeadData +} + +/** + * Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and + * enacts the results if that was the last vote before achieving the supermajority. + */ +export interface ParasCall_include_pvf_check_statement { + __kind: 'include_pvf_check_statement' + stmt: V2PvfCheckStatement + signature: Bytes +} + +/** + * Remove the validation code from the storage iff the reference count is 0. + * + * This is better than removing the storage directly, because it will not remove the code + * that was suddenly got used by some parachain while this dispatchable was pending + * dispatching. + */ +export interface ParasCall_poke_unused_validation_code { + __kind: 'poke_unused_validation_code' + validationCodeHash: ValidationCodeHash +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: V2InherentData, + }), + } +}) + +export const V2InherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => V2UncheckedSigned), + backedCandidates: sts.array(() => V2BackedCandidate), + disputes: sts.array(() => V2DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: H256, + number: sts.number(), + stateRoot: H256, + extrinsicsRoot: H256, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + Consensus: sts.tuple(() => [sts.bytes(), sts.bytes()]), + Other: sts.bytes(), + PreRuntime: sts.tuple(() => [sts.bytes(), sts.bytes()]), + RuntimeEnvironmentUpdated: sts.unit(), + Seal: sts.tuple(() => [sts.bytes(), sts.bytes()]), + } +}) + +export type DigestItem = DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: [Bytes, Bytes] +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: [Bytes, Bytes] +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: [Bytes, Bytes] +} + +export interface Digest { + logs: DigestItem[] +} + +export interface Header { + parentHash: H256 + number: number + stateRoot: H256 + extrinsicsRoot: H256 + digest: Digest +} + +export const V2DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: sts.number(), + statements: sts.array(() => sts.tuple(() => [V2DisputeStatement, V2ValidatorIndex, sts.bytes()])), + } +}) + +export const V2DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: V2InvalidDisputeStatementKind, + Valid: V2ValidDisputeStatementKind, + } +}) + +export const V2ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + BackingSeconded: H256, + BackingValid: H256, + Explicit: sts.unit(), + } +}) + +export type V2ValidDisputeStatementKind = V2ValidDisputeStatementKind_ApprovalChecking | V2ValidDisputeStatementKind_BackingSeconded | V2ValidDisputeStatementKind_BackingValid | V2ValidDisputeStatementKind_Explicit + +export interface V2ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface V2ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: H256 +} + +export interface V2ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: H256 +} + +export interface V2ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export const V2InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export type V2InvalidDisputeStatementKind = V2InvalidDisputeStatementKind_Explicit + +export interface V2InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type V2DisputeStatement = V2DisputeStatement_Invalid | V2DisputeStatement_Valid + +export interface V2DisputeStatement_Invalid { + __kind: 'Invalid' + value: V2InvalidDisputeStatementKind +} + +export interface V2DisputeStatement_Valid { + __kind: 'Valid' + value: V2ValidDisputeStatementKind +} + +export const CandidateHash = sts.bytes() + +export interface V2DisputeStatementSet { + candidateHash: CandidateHash + session: number + statements: [V2DisputeStatement, V2ValidatorIndex, Bytes][] +} + +export type CandidateHash = Bytes + +export const V2BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: V2CommittedCandidateReceipt, + validityVotes: sts.array(() => V2ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const V2ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.bytes(), + Implicit: sts.bytes(), + } +}) + +export type V2ValidityAttestation = V2ValidityAttestation_Explicit | V2ValidityAttestation_Implicit + +export interface V2ValidityAttestation_Explicit { + __kind: 'Explicit' + value: Bytes +} + +export interface V2ValidityAttestation_Implicit { + __kind: 'Implicit' + value: Bytes +} + +export const V2CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: V2CandidateDescriptor, + commitments: V2CandidateCommitments, + } +}) + +export const V2CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => sts.bytes()), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: sts.number(), + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: Id, + data: sts.bytes(), + } +}) + +export interface OutboundHrmpMessage { + recipient: Id + data: Bytes +} + +export interface V2CandidateCommitments { + upwardMessages: Bytes[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: number +} + +export const V2CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: Id, + relayParent: H256, + collator: V2Public, + persistedValidationDataHash: H256, + povHash: H256, + erasureRoot: H256, + signature: V2Signature, + paraHead: H256, + validationCodeHash: ValidationCodeHash, + } +}) + +export const V2Signature = sts.bytes() + +export const V2Public = sts.bytes() + +export interface V2CandidateDescriptor { + paraId: Id + relayParent: H256 + collator: V2Public + persistedValidationDataHash: H256 + povHash: H256 + erasureRoot: H256 + signature: V2Signature + paraHead: H256 + validationCodeHash: ValidationCodeHash +} + +export type V2Signature = Bytes + +export type V2Public = Bytes + +export interface V2CommittedCandidateReceipt { + descriptor: V2CandidateDescriptor + commitments: V2CandidateCommitments +} + +export interface V2BackedCandidate { + candidate: V2CommittedCandidateReceipt + validityVotes: V2ValidityAttestation[] + validatorIndices: BitSequence +} + +export const V2UncheckedSigned: sts.Type = sts.struct(() => { + return { + payload: V2AvailabilityBitfield, + validatorIndex: V2ValidatorIndex, + signature: sts.bytes(), + } +}) + +export const V2AvailabilityBitfield = sts.bitseq() + +export interface V2UncheckedSigned { + payload: V2AvailabilityBitfield + validatorIndex: V2ValidatorIndex + signature: Bytes +} + +export type V2AvailabilityBitfield = BitSequence + +export interface V2InherentData { + bitfields: V2UncheckedSigned[] + backedCandidates: V2BackedCandidate[] + disputes: V2DisputeStatementSet[] + parentHeader: Header +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInherentCall = ParaInherentCall_enter + +/** + * Enter the paras inherent. This will process bitfields and backed candidates. + */ +export interface ParaInherentCall_enter { + __kind: 'enter' + data: V2InherentData +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInclusionCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const NominationPoolsCall: sts.Type = sts.closedEnum(() => { + return { + bond_extra: sts.enumStruct({ + extra: BondExtra, + }), + claim_payout: sts.unit(), + create: sts.enumStruct({ + amount: sts.bigint(), + root: AccountId32, + nominator: AccountId32, + stateToggler: AccountId32, + }), + join: sts.enumStruct({ + amount: sts.bigint(), + poolId: sts.number(), + }), + nominate: sts.enumStruct({ + poolId: sts.number(), + validators: sts.array(() => AccountId32), + }), + pool_withdraw_unbonded: sts.enumStruct({ + poolId: sts.number(), + numSlashingSpans: sts.number(), + }), + set_configs: sts.enumStruct({ + minJoinBond: Type_487, + minCreateBond: Type_487, + maxPools: Type_488, + maxMembers: Type_488, + maxMembersPerPool: Type_488, + }), + set_metadata: sts.enumStruct({ + poolId: sts.number(), + metadata: sts.bytes(), + }), + set_state: sts.enumStruct({ + poolId: sts.number(), + state: PoolState, + }), + unbond: sts.enumStruct({ + memberAccount: AccountId32, + unbondingPoints: sts.bigint(), + }), + update_roles: sts.enumStruct({ + poolId: sts.number(), + root: sts.option(() => AccountId32), + nominator: sts.option(() => AccountId32), + stateToggler: sts.option(() => AccountId32), + }), + withdraw_unbonded: sts.enumStruct({ + memberAccount: AccountId32, + numSlashingSpans: sts.number(), + }), + } +}) + +export const PoolState: sts.Type = sts.closedEnum(() => { + return { + Blocked: sts.unit(), + Destroying: sts.unit(), + Open: sts.unit(), + } +}) + +export type PoolState = PoolState_Blocked | PoolState_Destroying | PoolState_Open + +export interface PoolState_Blocked { + __kind: 'Blocked' +} + +export interface PoolState_Destroying { + __kind: 'Destroying' +} + +export interface PoolState_Open { + __kind: 'Open' +} + +export const Type_488: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_488 = Type_488_Noop | Type_488_Remove | Type_488_Set + +export interface Type_488_Noop { + __kind: 'Noop' +} + +export interface Type_488_Remove { + __kind: 'Remove' +} + +export interface Type_488_Set { + __kind: 'Set' + value: number +} + +export const Type_487: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type Type_487 = Type_487_Noop | Type_487_Remove | Type_487_Set + +export interface Type_487_Noop { + __kind: 'Noop' +} + +export interface Type_487_Remove { + __kind: 'Remove' +} + +export interface Type_487_Set { + __kind: 'Set' + value: bigint +} + +export const BondExtra: sts.Type = sts.closedEnum(() => { + return { + FreeBalance: sts.bigint(), + Rewards: sts.unit(), + } +}) + +export type BondExtra = BondExtra_FreeBalance | BondExtra_Rewards + +export interface BondExtra_FreeBalance { + __kind: 'FreeBalance' + value: bigint +} + +export interface BondExtra_Rewards { + __kind: 'Rewards' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type NominationPoolsCall = NominationPoolsCall_bond_extra | NominationPoolsCall_claim_payout | NominationPoolsCall_create | NominationPoolsCall_join | NominationPoolsCall_nominate | NominationPoolsCall_pool_withdraw_unbonded | NominationPoolsCall_set_configs | NominationPoolsCall_set_metadata | NominationPoolsCall_set_state | NominationPoolsCall_unbond | NominationPoolsCall_update_roles | NominationPoolsCall_withdraw_unbonded + +/** + * Bond `extra` more funds from `origin` into the pool to which they already belong. + * + * Additional funds can come from either the free balance of the account, of from the + * accumulated rewards, see [`BondExtra`]. + */ +export interface NominationPoolsCall_bond_extra { + __kind: 'bond_extra' + extra: BondExtra +} + +/** + * A bonded member can use this to claim their payout based on the rewards that the pool + * has accumulated since their last claimed payout (OR since joining if this is there first + * time claiming rewards). The payout will be transferred to the member's account. + * + * The member will earn rewards pro rata based on the members stake vs the sum of the + * members in the pools stake. Rewards do not "expire". + */ +export interface NominationPoolsCall_claim_payout { + __kind: 'claim_payout' +} + +/** + * Create a new delegation pool. + * + * # Arguments + * + * * `amount` - The amount of funds to delegate to the pool. This also acts of a sort of + * deposit since the pools creator cannot fully unbond funds until the pool is being + * destroyed. + * * `index` - A disambiguation index for creating the account. Likely only useful when + * creating multiple pools in the same extrinsic. + * * `root` - The account to set as [`PoolRoles::root`]. + * * `nominator` - The account to set as the [`PoolRoles::nominator`]. + * * `state_toggler` - The account to set as the [`PoolRoles::state_toggler`]. + * + * # Note + * + * In addition to `amount`, the caller will transfer the existential deposit; so the caller + * needs at have at least `amount + existential_deposit` transferrable. + */ +export interface NominationPoolsCall_create { + __kind: 'create' + amount: bigint + root: AccountId32 + nominator: AccountId32 + stateToggler: AccountId32 +} + +/** + * Stake funds with a pool. The amount to bond is transferred from the member to the + * pools account and immediately increases the pools bond. + * + * # Note + * + * * An account can only be a member of a single pool. + * * An account cannot join the same pool multiple times. + * * This call will *not* dust the member account, so the member must have at least + * `existential deposit + amount` in their account. + * * Only a pool with [`PoolState::Open`] can be joined + */ +export interface NominationPoolsCall_join { + __kind: 'join' + amount: bigint + poolId: number +} + +export interface NominationPoolsCall_nominate { + __kind: 'nominate' + poolId: number + validators: AccountId32[] +} + +/** + * Call `withdraw_unbonded` for the pools account. This call can be made by any account. + * + * This is useful if their are too many unlocking chunks to call `unbond`, and some + * can be cleared by withdrawing. In the case there are too many unlocking chunks, the user + * would probably see an error like `NoMoreChunks` emitted from the staking system when + * they attempt to unbond. + */ +export interface NominationPoolsCall_pool_withdraw_unbonded { + __kind: 'pool_withdraw_unbonded' + poolId: number + numSlashingSpans: number +} + +/** + * Update configurations for the nomination pools. The origin must for this call must be + * Root. + * + * # Arguments + * + * * `min_join_bond` - Set [`MinJoinBond`]. + * * `min_create_bond` - Set [`MinCreateBond`]. + * * `max_pools` - Set [`MaxPools`]. + * * `max_members` - Set [`MaxPoolMembers`]. + * * `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]. + */ +export interface NominationPoolsCall_set_configs { + __kind: 'set_configs' + minJoinBond: Type_487 + minCreateBond: Type_487 + maxPools: Type_488 + maxMembers: Type_488 + maxMembersPerPool: Type_488 +} + +export interface NominationPoolsCall_set_metadata { + __kind: 'set_metadata' + poolId: number + metadata: Bytes +} + +export interface NominationPoolsCall_set_state { + __kind: 'set_state' + poolId: number + state: PoolState +} + +/** + * Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It + * implicitly collects the rewards one last time, since not doing so would mean some + * rewards would go forfeited. + * + * Under certain conditions, this call can be dispatched permissionlessly (i.e. by any + * account). + * + * # Conditions for a permissionless dispatch. + * + * * The pool is blocked and the caller is either the root or state-toggler. This is + * refereed to as a kick. + * * The pool is destroying and the member is not the depositor. + * * The pool is destroying, the member is the depositor and no other members are in the + * pool. + * + * ## Conditions for permissioned dispatch (i.e. the caller is also the + * `member_account`): + * + * * The caller is not the depositor. + * * The caller is the depositor, the pool is destroying and no other members are in the + * pool. + * + * # Note + * + * If there are too many unlocking chunks to unbond with the pool account, + * [`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks. If + * there are too many unlocking chunks, the result of this call will likely be the + * `NoMoreChunks` error from the staking system. + */ +export interface NominationPoolsCall_unbond { + __kind: 'unbond' + memberAccount: AccountId32 + unbondingPoints: bigint +} + +/** + * Update the roles of the pool. + * + * The root is the only entity that can change any of the roles, including itself, + * excluding the depositor, who can never change. + * + * It emits an event, notifying UIs of the role change. This event is quite relevant to + * most pool members and they should be informed of changes to pool roles. + */ +export interface NominationPoolsCall_update_roles { + __kind: 'update_roles' + poolId: number + root?: (AccountId32 | undefined) + nominator?: (AccountId32 | undefined) + stateToggler?: (AccountId32 | undefined) +} + +/** + * Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an + * error is returned. + * + * Under certain conditions, this call can be dispatched permissionlessly (i.e. by any + * account). + * + * # Conditions for a permissionless dispatch + * + * * The pool is in destroy mode and the target is not the depositor. + * * The target is the depositor and they are the only member in the sub pools. + * * The pool is blocked and the caller is either the root or state-toggler. + * + * # Conditions for permissioned dispatch + * + * * The caller is the target and they are not the depositor. + * + * # Note + * + * If the target is the depositor, the pool will be destroyed. + */ +export interface NominationPoolsCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + memberAccount: AccountId32 + numSlashingSpans: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: sts.bigint(), + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + call: sts.bytes(), + storeCall: sts.boolean(), + maxWeight: sts.bigint(), + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId32), + call: Call, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: sts.number(), + index: sts.number(), + } +}) + +export interface Timepoint { + height: number + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: bigint +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + call: Bytes + storeCall: boolean + maxWeight: bigint +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId32[] + call: Call +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId32[] + timepoint: Timepoint + callHash: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const InitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type InitializerCall = InitializerCall_force_approve + +/** + * Issue a signal to the consensus engine to forcibly act as though all parachain + * blocks in all relay chain blocks up to and including the given number in the current + * chain are valid and should be finalized. + */ +export interface InitializerCall_force_approve { + __kind: 'force_approve' + upTo: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: sts.number(), + }), + force_transfer: sts.enumStruct({ + new: AccountId32, + index: sts.number(), + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: sts.number(), + }), + freeze: sts.enumStruct({ + index: sts.number(), + }), + transfer: sts.enumStruct({ + new: AccountId32, + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: number +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId32 + index: number + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: number +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the + * deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: number +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: sts.bytes(), + }), + } +}) + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: sts.number(), + networkState: OpaqueNetworkState, + sessionIndex: sts.number(), + authorityIndex: sts.number(), + validatorsLen: sts.number(), + } +}) + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export interface Heartbeat { + blockNumber: number + networkState: OpaqueNetworkState + sessionIndex: number + authorityIndex: number + validatorsLen: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is + * length of `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Bytes +} + +/** + * Identity pallet declaration. + */ +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId32, + }), + add_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: sts.number(), + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: MultiAddress, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: MultiAddress, + judgement: Judgement, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: MultiAddress, + }), + rename_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId32, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: BitFlags, + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId32, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => sts.tuple(() => [Data, Data])), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => sts.bytes()), + image: Data, + twitter: Data, + } +}) + +export interface IdentityInfo { + additional: [Data, Data][] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (Bytes | undefined) + image: Data + twitter: Data +} + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: Bytes +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: Bytes +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: Bytes +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: Bytes +} + +export const BitFlags = sts.bigint() + +export const Judgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: sts.bigint(), + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export type Judgement = Judgement_Erroneous | Judgement_FeePaid | Judgement_KnownGood | Judgement_LowQuality | Judgement_OutOfDate | Judgement_Reasonable | Judgement_Unknown + +export interface Judgement_Erroneous { + __kind: 'Erroneous' +} + +export interface Judgement_FeePaid { + __kind: 'FeePaid' + value: bigint +} + +export interface Judgement_KnownGood { + __kind: 'KnownGood' +} + +export interface Judgement_LowQuality { + __kind: 'LowQuality' +} + +export interface Judgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface Judgement_Reasonable { + __kind: 'Reasonable' +} + +export interface Judgement_Unknown { + __kind: 'Unknown' +} + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: sts.bytes(), + Keccak256: sts.bytes(), + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: sts.bytes(), + ShaThree256: sts.bytes(), + } +}) + +/** + * Identity pallet declaration. + */ +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId32 +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: MultiAddress + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: number +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: MultiAddress +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: MultiAddress + judgement: Judgement +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: MultiAddress +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: MultiAddress + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId32 +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: BitFlags +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId32, Data][] +} + +export type BitFlags = bigint + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const HrmpCall: sts.Type = sts.closedEnum(() => { + return { + force_clean_hrmp: sts.enumStruct({ + para: Id, + inbound: sts.number(), + outbound: sts.number(), + }), + force_process_hrmp_close: sts.enumStruct({ + channels: sts.number(), + }), + force_process_hrmp_open: sts.enumStruct({ + channels: sts.number(), + }), + hrmp_accept_open_channel: sts.enumStruct({ + sender: Id, + }), + hrmp_cancel_open_request: sts.enumStruct({ + channelId: HrmpChannelId, + openRequests: sts.number(), + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: Id, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: Id, + recipient: Id, + } +}) + +export interface HrmpChannelId { + sender: Id + recipient: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type HrmpCall = HrmpCall_force_clean_hrmp | HrmpCall_force_process_hrmp_close | HrmpCall_force_process_hrmp_open | HrmpCall_hrmp_accept_open_channel | HrmpCall_hrmp_cancel_open_request | HrmpCall_hrmp_close_channel | HrmpCall_hrmp_init_open_channel + +/** + * This extrinsic triggers the cleanup of all the HRMP storage items that + * a para may have. Normally this happens once per session, but this allows + * you to trigger the cleanup immediately for a specific parachain. + * + * Origin must be Root. + * + * Number of inbound and outbound channels for `para` must be provided as witness data of weighing. + */ +export interface HrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: Id + inbound: number + outbound: number +} + +/** + * Force process HRMP close channel requests. + * + * If there are pending HRMP close channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of closing channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' + channels: number +} + +/** + * Force process HRMP open channel requests. + * + * If there are pending HRMP open channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of opening channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' + channels: number +} + +/** + * Accept a pending open channel request from the given sender. + * + * The channel will be opened only on the next session boundary. + */ +export interface HrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: Id +} + +/** + * This cancels a pending open channel request. It can be canceled by either of the sender + * or the recipient for that request. The origin must be either of those. + * + * The cancellation happens immediately. It is not possible to cancel the request if it is + * already accepted. + * + * Total number of open requests (i.e. `HrmpOpenChannelRequestsList`) must be provided as + * witness data. + */ +export interface HrmpCall_hrmp_cancel_open_request { + __kind: 'hrmp_cancel_open_request' + channelId: HrmpChannelId + openRequests: number +} + +/** + * Initiate unilateral closing of a channel. The origin must be either the sender or the + * recipient in the channel being closed. + * + * The closure can only happen on a session change. + */ +export interface HrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * Initiate opening a channel from a parachain to a given recipient with given channel + * parameters. + * + * - `proposed_max_capacity` - specifies how many messages can be in the channel at once. + * - `proposed_max_message_size` - specifies the maximum size of the messages. + * + * These numbers are a subject to the relay-chain configuration limits. + * + * The channel can be opened only after the recipient confirms it and only on a session + * change. + */ +export interface HrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: Id + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: sts.number(), + bestFinalizedBlockNumber: sts.number(), + }), + report_equivocation: sts.enumStruct({ + equivocationProof: Type_273, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_273, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: sts.number(), + trieNodes: sts.array(() => sts.bytes()), + validatorCount: sts.number(), + } +}) + +export interface MembershipProof { + session: number + trieNodes: Bytes[] + validatorCount: number +} + +export const Type_273: sts.Type = sts.struct(() => { + return { + setId: sts.bigint(), + equivocation: Equivocation, + } +}) + +export const Equivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: Type_280, + Prevote: Type_275, + } +}) + +export const Type_275: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Prevote, sts.bytes()]), + second: sts.tuple(() => [Prevote, sts.bytes()]), + } +}) + +export const Prevote: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Prevote { + targetHash: H256 + targetNumber: number +} + +export interface Type_275 { + roundNumber: bigint + identity: Public + first: [Prevote, Bytes] + second: [Prevote, Bytes] +} + +export const Type_280: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Precommit, sts.bytes()]), + second: sts.tuple(() => [Precommit, sts.bytes()]), + } +}) + +export const Precommit: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Precommit { + targetHash: H256 + targetNumber: number +} + +export interface Type_280 { + roundNumber: bigint + identity: Public + first: [Precommit, Bytes] + second: [Precommit, Bytes] +} + +export type Equivocation = Equivocation_Precommit | Equivocation_Prevote + +export interface Equivocation_Precommit { + __kind: 'Precommit' + value: Type_280 +} + +export interface Equivocation_Prevote { + __kind: 'Prevote' + value: Type_275 +} + +export interface Type_273 { + setId: bigint + equivocation: Equivocation +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has + * stalled. This will trigger a forced authority set change at the beginning + * of the next session, to be enacted `delay` blocks after that. The delay + * should be high enough to safely assume that the block signalling the + * forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters + * will start the new authority set using the given finalized block as base. + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: number + bestFinalizedBlockNumber: number +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_273 + keyOwnerProof: MembershipProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_273 + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GiltCall: sts.Type = sts.closedEnum(() => { + return { + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + set_target: sts.enumStruct({ + target: sts.bigint(), + }), + thaw: sts.enumStruct({ + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GiltCall = GiltCall_place_bid | GiltCall_retract_bid | GiltCall_set_target | GiltCall_thaw + +/** + * Place a bid for a gilt to be issued. + * + * Origin must be Signed, and account must have at least `amount` in free balance. + * + * - `amount`: The amount of the bid; these funds will be reserved. If the bid is + * successfully elevated into an issued gilt, then these funds will continue to be + * reserved until the gilt expires. Must be at least `MinFreeze`. + * - `duration`: The number of periods for which the funds will be locked if the gilt is + * issued. It will expire only after this period has elapsed after the point of issuance. + * Must be greater than 1 and no more than `QueueCount`. + * + * Complexities: + * - `Queues[duration].len()` (just take max). + */ +export interface GiltCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * Retract a previously placed bid. + * + * Origin must be Signed, and the account should have previously issued a still-active bid + * of `amount` for `duration`. + * + * - `amount`: The amount of the previous bid. + * - `duration`: The duration of the previous bid. + */ +export interface GiltCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * Set target proportion of gilt-funds. + * + * Origin must be `AdminOrigin`. + * + * - `target`: The target proportion of effective issued funds that should be under gilts + * at any one time. + */ +export interface GiltCall_set_target { + __kind: 'set_target' + target: bigint +} + +/** + * Remove an active but expired gilt. Reserved funds under gilt are freed and balance is + * adjusted to ensure that the funds grow or shrink to maintain the equivalent proportion + * of effective total issued funds. + * + * Origin must be Signed and the account must be the owner of the gilt of the given index. + * + * - `index`: The index of the gilt to be thawed. + */ +export interface GiltCall_thaw { + __kind: 'thaw' + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + governance_fallback: sts.enumStruct({ + maybeMaxVoters: sts.option(() => sts.number()), + maybeMaxTargets: sts.option(() => sts.number()), + }), + set_emergency_election_result: sts.enumStruct({ + supports: sts.array(() => sts.tuple(() => [AccountId32, Support])), + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => ElectionScore), + }), + submit: sts.enumStruct({ + rawSolution: RawSolution, + }), + submit_unsigned: sts.enumStruct({ + rawSolution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export const RawSolution: sts.Type = sts.struct(() => { + return { + solution: NposCompactSolution24, + score: ElectionScore, + round: sts.number(), + } +}) + +export const NposCompactSolution24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), + votes2: sts.array(() => sts.tuple(() => [sts.number(), sts.tuple(() => [sts.number(), sts.number()]), sts.number()])), + votes3: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes4: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes5: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes6: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes7: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes8: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes9: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes10: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes11: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes12: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes13: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes14: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes15: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes16: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes17: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes18: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes19: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes20: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes21: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes22: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes23: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes24: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + } +}) + +export interface NposCompactSolution24 { + votes1: [number, number][] + votes2: [number, [number, number], number][] + votes3: [number, [number, number][], number][] + votes4: [number, [number, number][], number][] + votes5: [number, [number, number][], number][] + votes6: [number, [number, number][], number][] + votes7: [number, [number, number][], number][] + votes8: [number, [number, number][], number][] + votes9: [number, [number, number][], number][] + votes10: [number, [number, number][], number][] + votes11: [number, [number, number][], number][] + votes12: [number, [number, number][], number][] + votes13: [number, [number, number][], number][] + votes14: [number, [number, number][], number][] + votes15: [number, [number, number][], number][] + votes16: [number, [number, number][], number][] + votes17: [number, [number, number][], number][] + votes18: [number, [number, number][], number][] + votes19: [number, [number, number][], number][] + votes20: [number, [number, number][], number][] + votes21: [number, [number, number][], number][] + votes22: [number, [number, number][], number][] + votes23: [number, [number, number][], number][] + votes24: [number, [number, number][], number][] +} + +export interface RawSolution { + solution: NposCompactSolution24 + score: ElectionScore + round: number +} + +export interface ElectionScore { + minimalStake: bigint + sumStake: bigint + sumStakeSquared: bigint +} + +export const ElectionScore: sts.Type = sts.struct(() => { + return { + minimalStake: sts.bigint(), + sumStake: sts.bigint(), + sumStakeSquared: sts.bigint(), + } +}) + +export const Support: sts.Type = sts.struct(() => { + return { + total: sts.bigint(), + voters: sts.array(() => sts.tuple(() => [AccountId32, sts.bigint()])), + } +}) + +export interface Support { + total: bigint + voters: [AccountId32, bigint][] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_governance_fallback | ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * Trigger the governance fallback. + * + * This can only be called when [`Phase::Emergency`] is enabled, as an alternative to + * calling [`Call::set_emergency_election_result`]. + */ +export interface ElectionProviderMultiPhaseCall_governance_fallback { + __kind: 'governance_fallback' + maybeMaxVoters?: (number | undefined) + maybeMaxTargets?: (number | undefined) +} + +/** + * Set a solution in the queue, to be handed out to the client of this pallet in the next + * call to `ElectionProvider::elect`. + * + * This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`. + * + * The solution is not checked for any feasibility and is assumed to be trustworthy, as any + * feasibility check itself can in principle cause the election process to fail (due to + * memory/weight constrains). + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + supports: [AccountId32, Support][] +} + +/** + * Set a new value for `MinimumUntrustedScore`. + * + * Dispatch origin must be aligned with `T::ForceOrigin`. + * + * This check can be turned off by setting the value to `None`. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (ElectionScore | undefined) +} + +/** + * Submit a solution for the signed phase. + * + * The dispatch origin fo this call must be __signed__. + * + * The solution is potentially queued, based on the claimed score and processed at the end + * of the signed phase. + * + * A deposit is reserved and recorded for the solution. Based on the outcome, the solution + * might be rewarded, slashed, or get all or a part of the deposit back. + */ +export interface ElectionProviderMultiPhaseCall_submit { + __kind: 'submit' + rawSolution: RawSolution +} + +/** + * Submit a solution for the unsigned phase. + * + * The dispatch origin fo this call must be __none__. + * + * This submission is checked on the fly. Moreover, this unsigned solution is only + * validated when submitted to the pool from the **local** node. Effectively, this means + * that only active validators can submit this transaction when authoring a block (similar + * to an inherent). + * + * To prevent any incorrect solution (and thus wasted time/weight), this transaction will + * panic if the solution submitted by the validator is invalid in any way, effectively + * putting their authoring reward at risk. + * + * No deposit or reward is associated with this submission. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + rawSolution: RawSolution + witness: SolutionOrSnapshotSize +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DmpCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + blacklist: sts.enumStruct({ + proposalHash: H256, + maybeRefIndex: sts.option(() => sts.number()), + }), + cancel_proposal: sts.enumStruct({ + propIndex: sts.number(), + }), + cancel_queued: sts.enumStruct({ + which: sts.number(), + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId32, + conviction: Conviction, + balance: sts.bigint(), + }), + emergency_cancel: sts.enumStruct({ + refIndex: sts.number(), + }), + enact_proposal: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + }), + external_propose: sts.enumStruct({ + proposalHash: H256, + }), + external_propose_default: sts.enumStruct({ + proposalHash: H256, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: H256, + }), + fast_track: sts.enumStruct({ + proposalHash: H256, + votingPeriod: sts.number(), + delay: sts.number(), + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: H256, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: H256, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId32, + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + index: sts.number(), + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId32, + }), + veto_external: sts.enumStruct({ + proposalHash: H256, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface AccountVote_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DemocracyCall = DemocracyCall_blacklist | DemocracyCall_cancel_proposal | DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. + * + * If called on a queued public or external proposal, then this will result in it being + * removed. If the `ref_index` supplied is an active referendum with the proposal hash, + * then it will be cancelled. + * + * The dispatch origin of this call must be `BlacklistOrigin`. + * + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. + * + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). + */ +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: H256 + maybeRefIndex?: (number | undefined) +} + +/** + * Remove a proposal. + * + * The dispatch origin of this call must be `CancelProposalOrigin`. + * + * - `prop_index`: The index of the proposal to cancel. + * + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number +} + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: number +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must not + * be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId32 + conviction: Conviction + balance: bigint +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: number +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: H256 + index: number +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Weight: `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: H256 +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: H256 +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: H256 +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * `FastTrackVotingPeriod` if too low. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: H256 + votingPeriod: number + delay: number +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. When this call is successful, i.e. + * the preimage has not been uploaded before and matches some imminent proposal, + * no fee is paid. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * Weight: `O(p)` + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: H256 + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. Extrinsic is + * weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * Weight: `O(D)` where D is length of proposal. + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: H256 + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId32 + index: number +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: number +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * Weight: `O(S)` where S is the number of seconds a proposal already has. + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId32 +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * Weight: `O(V + log(V))` where V is number of `existing vetoers` + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: H256 +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of referendums the voter has voted on. + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: Id, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + contribute_all: sts.enumStruct({ + index: sts.number(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: Id, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId32, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: Signature, + } +}) + +export const Signature = sts.bytes() + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Signature +} + +export type Signature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_contribute_all | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * Add an optional memo to an existing crowdloan contribution. + * + * Origin must be Signed, and the user must have contributed to the crowdloan. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: Id + memo: Bytes +} + +/** + * Contribute to a crowd sale. This will transfer some balance over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * Contribute your entire balance to a crowd sale. This will transfer the entire balance of a user over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute_all { + __kind: 'contribute_all' + index: number + signature?: (MultiSignature | undefined) +} + +/** + * Create a new crowdloaning campaign for a parachain slot with the given lease period range. + * + * This applies a lock to your parachain configuration, ensuring that it cannot be changed + * by the parachain manager. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Remove a fund after the retirement period has ended and all funds have been returned. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * Edit the configuration for an in-progress crowdloan. + * + * Can only be called by Root origin. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Poke the fund into `NewRaise` + * + * Origin must be Signed, and the fund has non-zero raise. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: Id +} + +/** + * Automatically refund contributors of an ended crowdloan. + * Due to weight restrictions, this function may need to be called multiple + * times to fully refund all users. We will refund `RemoveKeysLimit` users at a time. + * + * Origin must be signed, but can come from anyone. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * Withdraw full balance of a specific contributor. + * + * Origin must be signed, but can come from anyone. + * + * The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement + * flag must be set. For a fund to be ready for retirement, then: + * - it must not already be in retirement; + * - the amount of raised funds must be bigger than the _free_ balance of the account; + * - and either: + * - the block number must be at least `end`; or + * - the current lease period must be greater than the fund's `last_period`. + * + * In this case, the fund's retirement flag is set and its `end` is reset to the current block + * number. + * + * - `who`: The account whose contribution should be withdrawn. + * - `index`: The parachain to whose crowdloan the contribution was made. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_bypass_consistency_check: sts.enumStruct({ + new: sts.boolean(), + }), + set_chain_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_code_retention_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_conclusion_by_time_out_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_max_spam_slots: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: sts.number(), + }), + set_group_rotation_frequency: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_minimum_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_cores: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_retries: sts.enumStruct({ + new: sts.number(), + }), + set_pvf_checking_enabled: sts.enumStruct({ + new: sts.boolean(), + }), + set_pvf_voting_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_thread_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_ump_max_individual_weight: sts.enumStruct({ + new: sts.bigint(), + }), + set_ump_service_total_weight: sts.enumStruct({ + new: sts.bigint(), + }), + set_validation_upgrade_cooldown: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ConfigurationCall = ConfigurationCall_set_bypass_consistency_check | ConfigurationCall_set_chain_availability_period | ConfigurationCall_set_code_retention_period | ConfigurationCall_set_dispute_conclusion_by_time_out_period | ConfigurationCall_set_dispute_max_spam_slots | ConfigurationCall_set_dispute_period | ConfigurationCall_set_dispute_post_conclusion_acceptance_period | ConfigurationCall_set_group_rotation_frequency | ConfigurationCall_set_hrmp_channel_max_capacity | ConfigurationCall_set_hrmp_channel_max_message_size | ConfigurationCall_set_hrmp_channel_max_total_size | ConfigurationCall_set_hrmp_max_message_num_per_candidate | ConfigurationCall_set_hrmp_max_parachain_inbound_channels | ConfigurationCall_set_hrmp_max_parachain_outbound_channels | ConfigurationCall_set_hrmp_max_parathread_inbound_channels | ConfigurationCall_set_hrmp_max_parathread_outbound_channels | ConfigurationCall_set_hrmp_open_request_ttl | ConfigurationCall_set_hrmp_recipient_deposit | ConfigurationCall_set_hrmp_sender_deposit | ConfigurationCall_set_max_code_size | ConfigurationCall_set_max_downward_message_size | ConfigurationCall_set_max_head_data_size | ConfigurationCall_set_max_pov_size | ConfigurationCall_set_max_upward_message_num_per_candidate | ConfigurationCall_set_max_upward_message_size | ConfigurationCall_set_max_upward_queue_count | ConfigurationCall_set_max_upward_queue_size | ConfigurationCall_set_max_validators | ConfigurationCall_set_max_validators_per_core | ConfigurationCall_set_minimum_validation_upgrade_delay | ConfigurationCall_set_n_delay_tranches | ConfigurationCall_set_needed_approvals | ConfigurationCall_set_no_show_slots | ConfigurationCall_set_parathread_cores | ConfigurationCall_set_parathread_retries | ConfigurationCall_set_pvf_checking_enabled | ConfigurationCall_set_pvf_voting_ttl | ConfigurationCall_set_relay_vrf_modulo_samples | ConfigurationCall_set_scheduling_lookahead | ConfigurationCall_set_thread_availability_period | ConfigurationCall_set_ump_max_individual_weight | ConfigurationCall_set_ump_service_total_weight | ConfigurationCall_set_validation_upgrade_cooldown | ConfigurationCall_set_validation_upgrade_delay | ConfigurationCall_set_zeroth_delay_tranche_width + +/** + * Setting this to true will disable consistency checks for the configuration setters. + * Use with caution. + */ +export interface ConfigurationCall_set_bypass_consistency_check { + __kind: 'set_bypass_consistency_check' + new: boolean +} + +/** + * Set the availability period for parachains. + */ +export interface ConfigurationCall_set_chain_availability_period { + __kind: 'set_chain_availability_period' + new: number +} + +/** + * Set the acceptance period for an included candidate. + */ +export interface ConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: number +} + +/** + * Set the dispute conclusion by time out period. + */ +export interface ConfigurationCall_set_dispute_conclusion_by_time_out_period { + __kind: 'set_dispute_conclusion_by_time_out_period' + new: number +} + +/** + * Set the maximum number of dispute spam slots. + */ +export interface ConfigurationCall_set_dispute_max_spam_slots { + __kind: 'set_dispute_max_spam_slots' + new: number +} + +/** + * Set the dispute period, in number of sessions to keep for disputes. + */ +export interface ConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: number +} + +/** + * Set the dispute post conclusion acceptance period. + */ +export interface ConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: number +} + +/** + * Set the parachain validator-group rotation frequency + */ +export interface ConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: number +} + +/** + * Sets the maximum number of messages allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * Sets the maximum size of a message that could ever be put into an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * Sets the maximum total size of messages in bytes allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * Sets the maximum number of outbound HRMP messages can be sent by a candidate. + */ +export interface ConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parachain is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parachain is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parathread is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_inbound_channels { + __kind: 'set_hrmp_max_parathread_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parathread is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_outbound_channels { + __kind: 'set_hrmp_max_parathread_outbound_channels' + new: number +} + +/** + * Sets the number of sessions after which an HRMP open channel request expires. + */ +export interface ConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * Sets the amount of funds that the recipient should provide for accepting opening an HRMP + * channel. + */ +export interface ConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: bigint +} + +/** + * Sets the amount of funds that the sender should provide for opening an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: bigint +} + +/** + * Set the max validation code size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * Set the critical downward message size. + */ +export interface ConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * Set the max head data size for paras. + */ +export interface ConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * Set the max POV block size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * Sets the maximum number of messages that a candidate can contain. + */ +export interface ConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum size of an upward message that can be sent by a candidate. + */ +export interface ConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * Sets the maximum items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * Sets the maximum total size of items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * Set the maximum number of validators to use in parachain consensus. + */ +export interface ConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * Set the maximum number of validators to assign to any core. + */ +export interface ConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * Sets the minimum delay between announcing the upgrade block for a parachain until the + * upgrade taking place. + * + * See the field documentation for information and constraints for the new value. + */ +export interface ConfigurationCall_set_minimum_validation_upgrade_delay { + __kind: 'set_minimum_validation_upgrade_delay' + new: number +} + +/** + * Set the total number of delay tranches. + */ +export interface ConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * Set the number of validators needed to approve a block. + */ +export interface ConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * Set the no show slots, in number of number of consensus slots. + * Must be at least 1. + */ +export interface ConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * Set the number of parathread execution cores. + */ +export interface ConfigurationCall_set_parathread_cores { + __kind: 'set_parathread_cores' + new: number +} + +/** + * Set the number of retries for a particular parathread. + */ +export interface ConfigurationCall_set_parathread_retries { + __kind: 'set_parathread_retries' + new: number +} + +/** + * Enable or disable PVF pre-checking. Consult the field documentation prior executing. + */ +export interface ConfigurationCall_set_pvf_checking_enabled { + __kind: 'set_pvf_checking_enabled' + new: boolean +} + +/** + * Set the number of session changes after which a PVF pre-checking voting is rejected. + */ +export interface ConfigurationCall_set_pvf_voting_ttl { + __kind: 'set_pvf_voting_ttl' + new: number +} + +/** + * Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion. + */ +export interface ConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * Set the scheduling lookahead, in expected number of blocks at peak throughput. + */ +export interface ConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * Set the availability period for parathreads. + */ +export interface ConfigurationCall_set_thread_availability_period { + __kind: 'set_thread_availability_period' + new: number +} + +/** + * Sets the maximum amount of weight any individual upward message may consume. + */ +export interface ConfigurationCall_set_ump_max_individual_weight { + __kind: 'set_ump_max_individual_weight' + new: bigint +} + +/** + * Sets the soft limit for the phase of dispatching dispatchable upward messages. + */ +export interface ConfigurationCall_set_ump_service_total_weight { + __kind: 'set_ump_service_total_weight' + new: bigint +} + +/** + * Set the validation upgrade cooldown. + */ +export interface ConfigurationCall_set_validation_upgrade_cooldown { + __kind: 'set_validation_upgrade_cooldown' + new: number +} + +/** + * Set the validation upgrade delay. + */ +export interface ConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: number +} + +/** + * Set the zeroth delay tranche width. + */ +export interface ConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: sts.bigint(), + vestingSchedule: sts.option(() => sts.tuple(() => [sts.bigint(), sts.bigint(), sts.number()])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId32), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId32 + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId32 + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: bigint + vestingSchedule?: ([bigint, bigint, number] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId32 | undefined) +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ChildBountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + add_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + value: sts.bigint(), + description: sts.bytes(), + }), + award_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + close_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + propose_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ChildBountiesCall = ChildBountiesCall_accept_curator | ChildBountiesCall_add_child_bounty | ChildBountiesCall_award_child_bounty | ChildBountiesCall_claim_child_bounty | ChildBountiesCall_close_child_bounty | ChildBountiesCall_propose_curator | ChildBountiesCall_unassign_curator + +/** + * Accept the curator role for the child-bounty. + * + * The dispatch origin for this call must be the curator of this + * child-bounty. + * + * A deposit will be reserved from the curator and refund upon + * successful payout or cancellation. + * + * Fee for curator is deducted from curator fee of parent bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in "CuratorProposed" state, for processing the + * call. And state of child-bounty is moved to "Active" on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_accept_curator { + __kind: 'accept_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Add a new child-bounty. + * + * The dispatch origin for this call must be the curator of parent + * bounty and the parent bounty must be in "active" state. + * + * Child-bounty gets added successfully & fund gets transferred from + * parent bounty to child-bounty account, if parent bounty has enough + * funds, else the call fails. + * + * Upper bound to maximum number of active child bounties that can be + * added are managed via runtime trait config + * [`Config::MaxActiveChildBountyCount`]. + * + * If the call is success, the status of child-bounty is updated to + * "Added". + * + * - `parent_bounty_id`: Index of parent bounty for which child-bounty is being added. + * - `value`: Value for executing the proposal. + * - `description`: Text description for the child-bounty. + */ +export interface ChildBountiesCall_add_child_bounty { + __kind: 'add_child_bounty' + parentBountyId: number + value: bigint + description: Bytes +} + +/** + * Award child-bounty to a beneficiary. + * + * The beneficiary will be able to claim the funds after a delay. + * + * The dispatch origin for this call must be the parent curator or + * curator of this child-bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in active state, for processing the call. And + * state of child-bounty is moved to "PendingPayout" on successful call + * completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + * - `beneficiary`: Beneficiary account. + */ +export interface ChildBountiesCall_award_child_bounty { + __kind: 'award_child_bounty' + parentBountyId: number + childBountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded child-bounty after payout delay. + * + * The dispatch origin for this call may be any signed origin. + * + * Call works independent of parent bounty state, No need for parent + * bounty to be in active state. + * + * The Beneficiary is paid out with agreed bounty value. Curator fee is + * paid & curator deposit is unreserved. + * + * Child-bounty must be in "PendingPayout" state, for processing the + * call. And instance of child-bounty is removed from the state on + * successful call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_claim_child_bounty { + __kind: 'claim_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * Cancel a proposed or active child-bounty. Child-bounty account funds + * are transferred to parent bounty account. The child-bounty curator + * deposit may be unreserved if possible. + * + * The dispatch origin for this call must be either parent curator or + * `T::RejectOrigin`. + * + * If the state of child-bounty is `Active`, curator deposit is + * unreserved. + * + * If the state of child-bounty is `PendingPayout`, call fails & + * returns `PendingPayout` error. + * + * For the origin other than T::RejectOrigin, parent bounty must be in + * active state, for this child-bounty call to work. For origin + * T::RejectOrigin execution is forced. + * + * Instance of child-bounty is removed from the state on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_close_child_bounty { + __kind: 'close_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * Propose curator for funded child-bounty. + * + * The dispatch origin for this call must be curator of parent bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in "Added" state, for processing the call. And + * state of child-bounty is moved to "CuratorProposed" on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + * - `curator`: Address of child-bounty curator. + * - `fee`: payment fee to child-bounty curator for execution. + */ +export interface ChildBountiesCall_propose_curator { + __kind: 'propose_curator' + parentBountyId: number + childBountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a child-bounty. + * + * The dispatch origin for this call can be either `RejectOrigin`, or + * the curator of the parent bounty, or any signed origin. + * + * For the origin other than T::RejectOrigin and the child-bounty + * curator, parent bounty must be in active state, for this call to + * work. We allow child-bounty curator and T::RejectOrigin to execute + * this call irrespective of the parent bounty state. + * + * If this function is called by the `RejectOrigin` or the + * parent bounty curator, we assume that the child-bounty curator is + * malicious or inactive. As a result, child-bounty curator deposit is + * slashed. + * + * If the origin is the child-bounty curator, we take this as a sign + * that they are unable to do their job, and are willingly giving up. + * We could slash the deposit, but for now we allow them to unreserve + * their deposit and exit without issue. (We may want to change this if + * it is abused.) + * + * Finally, the origin can be anyone iff the child-bounty curator is + * "inactive". Expiry update due of parent bounty is used to estimate + * inactive state of child-bounty curator. + * + * This allows anyone in the community to call out that a child-bounty + * curator is not doing their due diligence, and we should pick a new + * one. In this case the child-bounty curator deposit is slashed. + * + * State of child-bounty is moved to Added state on successful call + * completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_unassign_curator { + __kind: 'unassign_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds + * after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is + * malicious or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_force_unreserve | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_all | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is not + * assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * Unreserve some balance from a user by force. + * + * Can only be called by ROOT. + */ +export interface BalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also alter the total issuance of the system (`TotalIssuance`) appropriately. + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: MultiAddress + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for input config + * types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex + * computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional check + * that the transfer will not kill the origin account. + * --------------------------------- + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: MultiAddress + value: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). # + * - O(1). Just like transfer, but reading the user's transferable balance first. + * # + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BagsListCall: sts.Type = sts.closedEnum(() => { + return { + put_in_front_of: sts.enumStruct({ + lighter: AccountId32, + }), + rebag: sts.enumStruct({ + dislocated: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BagsListCall = BagsListCall_put_in_front_of | BagsListCall_rebag + +/** + * Move the caller's Id directly in front of `lighter`. + * + * The dispatch origin for this call must be _Signed_ and can only be called by the Id of + * the account going in front of `lighter`. + * + * Only works if + * - both nodes are within the same bag, + * - and `origin` has a greater `Score` than `lighter`. + */ +export interface BagsListCall_put_in_front_of { + __kind: 'put_in_front_of' + lighter: AccountId32 +} + +/** + * Declare that some `dislocated` account has, through rewards or penalties, sufficiently + * changed its score that it should properly fall into a different bag than its current + * one. + * + * Anyone can call this function about any potentially dislocated account. + * + * Will never return an error; if `dislocated` does not exist or doesn't need a rebag, then + * it is a noop and fees are still collected from `origin`. + */ +export interface BagsListCall_rebag { + __kind: 'rebag' + dislocated: AccountId32 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const EquivocationProof: sts.Type = sts.struct(() => { + return { + offender: sts.bytes(), + slot: Slot, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Slot = sts.bigint() + +export interface EquivocationProof { + offender: Bytes + slot: Slot + firstHeader: Header + secondHeader: Header +} + +export type Slot = bigint + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V1: sts.enumStruct({ + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + }), + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type NextConfigDescriptor = NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Plan an epoch config change. The epoch config change is recorded and will be enacted on + * the next call to `enact_epoch_change`. The config will be activated one epoch after. + * Multiple calls to this method will replace any existing planned config change that had + * not been enacted yet. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Cancel an in-progress auction. + * + * Can only be called by Root origin. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +export type Call = Call_Auctions | Call_Authorship | Call_Babe | Call_BagsList | Call_Balances | Call_Bounties | Call_ChildBounties | Call_Claims | Call_Configuration | Call_Council | Call_Crowdloan | Call_Democracy | Call_Dmp | Call_ElectionProviderMultiPhase | Call_Gilt | Call_Grandpa | Call_Hrmp | Call_Identity | Call_ImOnline | Call_Indices | Call_Initializer | Call_Multisig | Call_NominationPools | Call_ParaInclusion | Call_ParaInherent | Call_Paras | Call_ParasDisputes | Call_ParasShared | Call_PhragmenElection | Call_Preimage | Call_Proxy | Call_Recovery | Call_Registrar | Call_Scheduler | Call_Session | Call_Slots | Call_Society | Call_Staking | Call_System | Call_TechnicalCommittee | Call_TechnicalMembership | Call_Timestamp | Call_Tips | Call_Treasury | Call_Ump | Call_Utility | Call_Vesting | Call_XcmPallet + +export interface Call_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Call_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Call_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Call_BagsList { + __kind: 'BagsList' + value: BagsListCall +} + +export interface Call_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Call_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Call_ChildBounties { + __kind: 'ChildBounties' + value: ChildBountiesCall +} + +export interface Call_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Call_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Call_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Call_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Call_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Call_Dmp { + __kind: 'Dmp' + value: DmpCall +} + +export interface Call_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Call_Gilt { + __kind: 'Gilt' + value: GiltCall +} + +export interface Call_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Call_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Call_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Call_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Call_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Call_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Call_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Call_NominationPools { + __kind: 'NominationPools' + value: NominationPoolsCall +} + +export interface Call_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Call_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Call_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Call_ParasDisputes { + __kind: 'ParasDisputes' + value: ParasDisputesCall +} + +export interface Call_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Call_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Call_Preimage { + __kind: 'Preimage' + value: PreimageCall +} + +export interface Call_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Call_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Call_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Call_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Call_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Call_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Call_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Call_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Call_System { + __kind: 'System' + value: SystemCall +} + +export interface Call_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Call_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Call_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Call_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Call_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Call_Ump { + __kind: 'Ump' + value: UmpCall +} + +export interface Call_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Call_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Call_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Society: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId32 = sts.bytes() diff --git a/squid/src/types/v9230.ts b/squid/src/types/v9230.ts new file mode 100644 index 00000000..577165f2 --- /dev/null +++ b/squid/src/types/v9230.ts @@ -0,0 +1,12100 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Call: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + ChildBounties: ChildBountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + Dmp: DmpCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + Gilt: GiltCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Initializer: InitializerCall, + Multisig: MultisigCall, + NominationPools: NominationPoolsCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Paras: ParasCall, + ParasDisputes: ParasDisputesCall, + ParasShared: ParasSharedCall, + PhragmenElection: PhragmenElectionCall, + Preimage: PreimageCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Ump: UmpCall, + Utility: UtilityCall, + Vesting: VestingCall, + VoterList: VoterListCall, + XcmPallet: XcmPalletCall, + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + execute: sts.enumStruct({ + message: Type_548, + maxWeight: sts.bigint(), + }), + force_default_xcm_version: sts.enumStruct({ + maybeXcmVersion: sts.option(() => sts.number()), + }), + force_subscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_unsubscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_xcm_version: sts.enumStruct({ + location: V1MultiLocation, + xcmVersion: sts.number(), + }), + limited_reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + limited_teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + send: sts.enumStruct({ + dest: VersionedMultiLocation, + message: VersionedXcm, + }), + teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + } +}) + +export const VersionedXcm: sts.Type = sts.closedEnum(() => { + return { + V0: V0Xcm, + V1: V1Xcm, + V2: sts.array(() => V2Instruction), + } +}) + +export const V2Instruction: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => V2Instruction), + SetErrorHandler: sts.array(() => V2Instruction), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const DoubleEncoded: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncoded { + encoded: Bytes +} + +export const V0OriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type V0OriginKind = V0OriginKind_Native | V0OriginKind_SovereignAccount | V0OriginKind_Superuser | V0OriginKind_Xcm + +export interface V0OriginKind_Native { + __kind: 'Native' +} + +export interface V0OriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface V0OriginKind_Superuser { + __kind: 'Superuser' +} + +export interface V0OriginKind_Xcm { + __kind: 'Xcm' +} + +export const V2Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V2Error])), + Null: sts.unit(), + Version: sts.number(), + } +}) + +export const V2Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + MaxWeightInvalid: sts.unit(), + MultiLocationFull: sts.unit(), + MultiLocationNotInvertible: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + WeightLimitReached: sts.bigint(), + WeightNotComputable: sts.unit(), + } +}) + +export type V2Error = V2Error_AssetNotFound | V2Error_BadOrigin | V2Error_Barrier | V2Error_DestinationUnsupported | V2Error_ExceedsMaxMessageSize | V2Error_FailedToDecode | V2Error_FailedToTransactAsset | V2Error_InvalidLocation | V2Error_LocationCannotHold | V2Error_MaxWeightInvalid | V2Error_MultiLocationFull | V2Error_MultiLocationNotInvertible | V2Error_NotHoldingFees | V2Error_NotWithdrawable | V2Error_Overflow | V2Error_TooExpensive | V2Error_Transport | V2Error_Trap | V2Error_UnhandledXcmVersion | V2Error_Unimplemented | V2Error_UnknownClaim | V2Error_Unroutable | V2Error_UntrustedReserveLocation | V2Error_UntrustedTeleportLocation | V2Error_WeightLimitReached | V2Error_WeightNotComputable + +export interface V2Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V2Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V2Error_Barrier { + __kind: 'Barrier' +} + +export interface V2Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V2Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V2Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V2Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V2Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V2Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V2Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V2Error_MultiLocationFull { + __kind: 'MultiLocationFull' +} + +export interface V2Error_MultiLocationNotInvertible { + __kind: 'MultiLocationNotInvertible' +} + +export interface V2Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V2Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V2Error_Overflow { + __kind: 'Overflow' +} + +export interface V2Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V2Error_Transport { + __kind: 'Transport' +} + +export interface V2Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V2Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V2Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V2Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V2Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V2Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V2Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: bigint +} + +export interface V2Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V2Response = V2Response_Assets | V2Response_ExecutionResult | V2Response_Null | V2Response_Version + +export interface V2Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V2Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V2Error] | undefined) +} + +export interface V2Response_Null { + __kind: 'Null' +} + +export interface V2Response_Version { + __kind: 'Version' + value: number +} + +export interface V1MultiAsset { + id: V1AssetId + fun: V1Fungibility +} + +export type V1Fungibility = V1Fungibility_Fungible | V1Fungibility_NonFungible + +export interface V1Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V1Fungibility_NonFungible { + __kind: 'NonFungible' + value: V1AssetInstance +} + +export type V1AssetInstance = V1AssetInstance_Array16 | V1AssetInstance_Array32 | V1AssetInstance_Array4 | V1AssetInstance_Array8 | V1AssetInstance_Blob | V1AssetInstance_Index | V1AssetInstance_Undefined + +export interface V1AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V1AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V1AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V1AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V1AssetInstance_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface V1AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V1AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V1AssetId = V1AssetId_Abstract | V1AssetId_Concrete + +export interface V1AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V1AssetId_Concrete { + __kind: 'Concrete' + value: V1MultiLocation +} + +export interface V1MultiLocation { + parents: number + interior: V1Junctions +} + +export type V1Junctions = V1Junctions_Here | V1Junctions_X1 | V1Junctions_X2 | V1Junctions_X3 | V1Junctions_X4 | V1Junctions_X5 | V1Junctions_X6 | V1Junctions_X7 | V1Junctions_X8 + +export interface V1Junctions_Here { + __kind: 'Here' +} + +export interface V1Junctions_X1 { + __kind: 'X1' + value: V1Junction +} + +export interface V1Junctions_X2 { + __kind: 'X2' + value: [V1Junction, V1Junction] +} + +export interface V1Junctions_X3 { + __kind: 'X3' + value: [V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X4 { + __kind: 'X4' + value: [V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X5 { + __kind: 'X5' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X6 { + __kind: 'X6' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X7 { + __kind: 'X7' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X8 { + __kind: 'X8' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export type V1Junction = V1Junction_AccountId32 | V1Junction_AccountIndex64 | V1Junction_AccountKey20 | V1Junction_GeneralIndex | V1Junction_GeneralKey | V1Junction_OnlyChild | V1Junction_PalletInstance | V1Junction_Parachain | V1Junction_Plurality + +export interface V1Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V1Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V1Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V1Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V1Junction_GeneralKey { + __kind: 'GeneralKey' + value: Bytes +} + +export interface V1Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V1Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V1Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V1Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0BodyPart = V0BodyPart_AtLeastProportion | V0BodyPart_Fraction | V0BodyPart_Members | V0BodyPart_MoreThanProportion | V0BodyPart_Voice + +export interface V0BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V0BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V0BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Voice { + __kind: 'Voice' +} + +export type V0BodyId = V0BodyId_Executive | V0BodyId_Index | V0BodyId_Judicial | V0BodyId_Legislative | V0BodyId_Named | V0BodyId_Technical | V0BodyId_Unit + +export interface V0BodyId_Executive { + __kind: 'Executive' +} + +export interface V0BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V0BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V0BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V0BodyId_Named { + __kind: 'Named' + value: Bytes +} + +export interface V0BodyId_Technical { + __kind: 'Technical' +} + +export interface V0BodyId_Unit { + __kind: 'Unit' +} + +export type V0NetworkId = V0NetworkId_Any | V0NetworkId_Kusama | V0NetworkId_Named | V0NetworkId_Polkadot + +export interface V0NetworkId_Any { + __kind: 'Any' +} + +export interface V0NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V0NetworkId_Named { + __kind: 'Named' + value: Bytes +} + +export interface V0NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export const V1Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V1Junction, + X2: sts.tuple(() => [V1Junction, V1Junction]), + X3: sts.tuple(() => [V1Junction, V1Junction, V1Junction]), + X4: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction]), + X5: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X6: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X7: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X8: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + } +}) + +export const V1Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.bytes(), + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export const V0BodyId: sts.Type = sts.closedEnum(() => { + return { + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: sts.bytes(), + Technical: sts.unit(), + Unit: sts.unit(), + } +}) + +export const V0NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: sts.bytes(), + Polkadot: sts.unit(), + } +}) + +export const V1MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V1MultiAsset), + Wild: V1WildMultiAsset, + } +}) + +export const V1WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllOf: sts.enumStruct({ + id: V1AssetId, + fun: V1WildFungibility, + }), + } +}) + +export const V1WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V1WildFungibility = V1WildFungibility_Fungible | V1WildFungibility_NonFungible + +export interface V1WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V1WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V1AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V1MultiLocation, + } +}) + +export type V1WildMultiAsset = V1WildMultiAsset_All | V1WildMultiAsset_AllOf + +export interface V1WildMultiAsset_All { + __kind: 'All' +} + +export interface V1WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V1AssetId + fun: V1WildFungibility +} + +export type V1MultiAssetFilter = V1MultiAssetFilter_Definite | V1MultiAssetFilter_Wild + +export interface V1MultiAssetFilter_Definite { + __kind: 'Definite' + value: V1MultiAsset[] +} + +export interface V1MultiAssetFilter_Wild { + __kind: 'Wild' + value: V1WildMultiAsset +} + +export const V1MultiAsset: sts.Type = sts.struct(() => { + return { + id: V1AssetId, + fun: V1Fungibility, + } +}) + +export const V1Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V1AssetInstance, + } +}) + +export const V1AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V2Instruction = V2Instruction_BuyExecution | V2Instruction_ClaimAsset | V2Instruction_ClearError | V2Instruction_ClearOrigin | V2Instruction_DepositAsset | V2Instruction_DepositReserveAsset | V2Instruction_DescendOrigin | V2Instruction_ExchangeAsset | V2Instruction_HrmpChannelAccepted | V2Instruction_HrmpChannelClosing | V2Instruction_HrmpNewChannelOpenRequest | V2Instruction_InitiateReserveWithdraw | V2Instruction_InitiateTeleport | V2Instruction_QueryHolding | V2Instruction_QueryResponse | V2Instruction_ReceiveTeleportedAsset | V2Instruction_RefundSurplus | V2Instruction_ReportError | V2Instruction_ReserveAssetDeposited | V2Instruction_SetAppendix | V2Instruction_SetErrorHandler | V2Instruction_SubscribeVersion | V2Instruction_Transact | V2Instruction_TransferAsset | V2Instruction_TransferReserveAsset | V2Instruction_Trap | V2Instruction_UnsubscribeVersion | V2Instruction_WithdrawAsset + +export interface V2Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface V2Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface V2Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V2Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V2Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V2Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface V2Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V2Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V2Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V2Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V2Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface V2Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface V2Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface V2Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V2Instruction_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface V2Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface V2Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V2Instruction[] +} + +export interface V2Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V2Instruction[] +} + +export interface V2Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V2Instruction_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V2Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V2Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V2Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export type V2WeightLimit = V2WeightLimit_Limited | V2WeightLimit_Unlimited + +export interface V2WeightLimit_Limited { + __kind: 'Limited' + value: bigint +} + +export interface V2WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V1Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: V1Xcm, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + } +}) + +export const V1Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => V1Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type V1Order = V1Order_BuyExecution | V1Order_DepositAsset | V1Order_DepositReserveAsset | V1Order_ExchangeAsset | V1Order_InitiateReserveWithdraw | V1Order_InitiateTeleport | V1Order_Noop | V1Order_QueryHolding + +export interface V1Order_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: V1Xcm[] +} + +export interface V1Order_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V1Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V1Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_Noop { + __kind: 'Noop' +} + +export interface V1Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export const V1Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + Version: sts.number(), + } +}) + +export type V1Response = V1Response_Assets | V1Response_Version + +export interface V1Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V1Response_Version { + __kind: 'Version' + value: number +} + +export type V1Xcm = V1Xcm_HrmpChannelAccepted | V1Xcm_HrmpChannelClosing | V1Xcm_HrmpNewChannelOpenRequest | V1Xcm_QueryResponse | V1Xcm_ReceiveTeleportedAsset | V1Xcm_RelayedFrom | V1Xcm_ReserveAssetDeposited | V1Xcm_SubscribeVersion | V1Xcm_Transact | V1Xcm_TransferAsset | V1Xcm_TransferReserveAsset | V1Xcm_UnsubscribeVersion | V1Xcm_WithdrawAsset + +export interface V1Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V1Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V1Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V1Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface V1Xcm_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: V1Xcm +} + +export interface V1Xcm_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V1Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V1Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V1Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Xcm_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V1Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export const V0Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: V0Xcm, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + } +}) + +export const V0Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => V0Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type V0Order = V0Order_BuyExecution | V0Order_DepositAsset | V0Order_DepositReserveAsset | V0Order_ExchangeAsset | V0Order_InitiateReserveWithdraw | V0Order_InitiateTeleport | V0Order_Null | V0Order_QueryHolding + +export interface V0Order_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: V0Xcm[] +} + +export interface V0Order_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface V0Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_Null { + __kind: 'Null' +} + +export interface V0Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type V0MultiLocation = V0MultiLocation_Null | V0MultiLocation_X1 | V0MultiLocation_X2 | V0MultiLocation_X3 | V0MultiLocation_X4 | V0MultiLocation_X5 | V0MultiLocation_X6 | V0MultiLocation_X7 | V0MultiLocation_X8 + +export interface V0MultiLocation_Null { + __kind: 'Null' +} + +export interface V0MultiLocation_X1 { + __kind: 'X1' + value: V0Junction +} + +export interface V0MultiLocation_X2 { + __kind: 'X2' + value: [V0Junction, V0Junction] +} + +export interface V0MultiLocation_X3 { + __kind: 'X3' + value: [V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X4 { + __kind: 'X4' + value: [V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X5 { + __kind: 'X5' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X6 { + __kind: 'X6' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X7 { + __kind: 'X7' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X8 { + __kind: 'X8' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export type V0Junction = V0Junction_AccountId32 | V0Junction_AccountIndex64 | V0Junction_AccountKey20 | V0Junction_GeneralIndex | V0Junction_GeneralKey | V0Junction_OnlyChild | V0Junction_PalletInstance | V0Junction_Parachain | V0Junction_Parent | V0Junction_Plurality + +export interface V0Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V0Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V0Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V0Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V0Junction_GeneralKey { + __kind: 'GeneralKey' + value: Bytes +} + +export interface V0Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V0Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V0Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V0Junction_Parent { + __kind: 'Parent' +} + +export interface V0Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0MultiAsset = V0MultiAsset_AbstractFungible | V0MultiAsset_AbstractNonFungible | V0MultiAsset_All | V0MultiAsset_AllAbstractFungible | V0MultiAsset_AllAbstractNonFungible | V0MultiAsset_AllConcreteFungible | V0MultiAsset_AllConcreteNonFungible | V0MultiAsset_AllFungible | V0MultiAsset_AllNonFungible | V0MultiAsset_ConcreteFungible | V0MultiAsset_ConcreteNonFungible | V0MultiAsset_None + +export interface V0MultiAsset_AbstractFungible { + __kind: 'AbstractFungible' + id: Bytes + amount: bigint +} + +export interface V0MultiAsset_AbstractNonFungible { + __kind: 'AbstractNonFungible' + class: Bytes + instance: V1AssetInstance +} + +export interface V0MultiAsset_All { + __kind: 'All' +} + +export interface V0MultiAsset_AllAbstractFungible { + __kind: 'AllAbstractFungible' + id: Bytes +} + +export interface V0MultiAsset_AllAbstractNonFungible { + __kind: 'AllAbstractNonFungible' + class: Bytes +} + +export interface V0MultiAsset_AllConcreteFungible { + __kind: 'AllConcreteFungible' + id: V0MultiLocation +} + +export interface V0MultiAsset_AllConcreteNonFungible { + __kind: 'AllConcreteNonFungible' + class: V0MultiLocation +} + +export interface V0MultiAsset_AllFungible { + __kind: 'AllFungible' +} + +export interface V0MultiAsset_AllNonFungible { + __kind: 'AllNonFungible' +} + +export interface V0MultiAsset_ConcreteFungible { + __kind: 'ConcreteFungible' + id: V0MultiLocation + amount: bigint +} + +export interface V0MultiAsset_ConcreteNonFungible { + __kind: 'ConcreteNonFungible' + class: V0MultiLocation + instance: V1AssetInstance +} + +export interface V0MultiAsset_None { + __kind: 'None' +} + +export const V0MultiAsset: sts.Type = sts.closedEnum(() => { + return { + AbstractFungible: sts.enumStruct({ + id: sts.bytes(), + amount: sts.bigint(), + }), + AbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + instance: V1AssetInstance, + }), + All: sts.unit(), + AllAbstractFungible: sts.enumStruct({ + id: sts.bytes(), + }), + AllAbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + }), + AllConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + }), + AllConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + }), + AllFungible: sts.unit(), + AllNonFungible: sts.unit(), + ConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + amount: sts.bigint(), + }), + ConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + instance: V1AssetInstance, + }), + None: sts.unit(), + } +}) + +export const V0MultiLocation: sts.Type = sts.closedEnum(() => { + return { + Null: sts.unit(), + X1: V0Junction, + X2: sts.tuple(() => [V0Junction, V0Junction]), + X3: sts.tuple(() => [V0Junction, V0Junction, V0Junction]), + X4: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction]), + X5: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X6: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X7: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X8: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + } +}) + +export const V0Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.bytes(), + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Parent: sts.unit(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V0MultiAsset), + } +}) + +export type V0Response = V0Response_Assets + +export interface V0Response_Assets { + __kind: 'Assets' + value: V0MultiAsset[] +} + +export type V0Xcm = V0Xcm_HrmpChannelAccepted | V0Xcm_HrmpChannelClosing | V0Xcm_HrmpNewChannelOpenRequest | V0Xcm_QueryResponse | V0Xcm_RelayedFrom | V0Xcm_ReserveAssetDeposit | V0Xcm_TeleportAsset | V0Xcm_Transact | V0Xcm_TransferAsset | V0Xcm_TransferReserveAsset | V0Xcm_WithdrawAsset + +export interface V0Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V0Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V0Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V0Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface V0Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: V0Xcm +} + +export interface V0Xcm_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V0Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export type VersionedXcm = VersionedXcm_V0 | VersionedXcm_V1 | VersionedXcm_V2 + +export interface VersionedXcm_V0 { + __kind: 'V0' + value: V0Xcm +} + +export interface VersionedXcm_V1 { + __kind: 'V1' + value: V1Xcm +} + +export interface VersionedXcm_V2 { + __kind: 'V2' + value: V2Instruction[] +} + +export const V2WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: sts.bigint(), + Unlimited: sts.unit(), + } +}) + +export const VersionedMultiAssets: sts.Type = sts.closedEnum(() => { + return { + V0: sts.array(() => V0MultiAsset), + V1: sts.array(() => V1MultiAsset), + } +}) + +export type VersionedMultiAssets = VersionedMultiAssets_V0 | VersionedMultiAssets_V1 + +export interface VersionedMultiAssets_V0 { + __kind: 'V0' + value: V0MultiAsset[] +} + +export interface VersionedMultiAssets_V1 { + __kind: 'V1' + value: V1MultiAsset[] +} + +export const V1MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V1Junctions, + } +}) + +export const VersionedMultiLocation: sts.Type = sts.closedEnum(() => { + return { + V0: V0MultiLocation, + V1: V1MultiLocation, + } +}) + +export type VersionedMultiLocation = VersionedMultiLocation_V0 | VersionedMultiLocation_V1 + +export interface VersionedMultiLocation_V0 { + __kind: 'V0' + value: V0MultiLocation +} + +export interface VersionedMultiLocation_V1 { + __kind: 'V1' + value: V1MultiLocation +} + +export const Type_548: sts.Type = sts.closedEnum(() => { + return { + V0: Type_549, + V1: Type_554, + V2: sts.array(() => Type_560), + } +}) + +export const Type_560: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => Type_560), + SetErrorHandler: sts.array(() => Type_560), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_553, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const Type_553: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface Type_553 { + encoded: Bytes +} + +export type Type_560 = Type_560_BuyExecution | Type_560_ClaimAsset | Type_560_ClearError | Type_560_ClearOrigin | Type_560_DepositAsset | Type_560_DepositReserveAsset | Type_560_DescendOrigin | Type_560_ExchangeAsset | Type_560_HrmpChannelAccepted | Type_560_HrmpChannelClosing | Type_560_HrmpNewChannelOpenRequest | Type_560_InitiateReserveWithdraw | Type_560_InitiateTeleport | Type_560_QueryHolding | Type_560_QueryResponse | Type_560_ReceiveTeleportedAsset | Type_560_RefundSurplus | Type_560_ReportError | Type_560_ReserveAssetDeposited | Type_560_SetAppendix | Type_560_SetErrorHandler | Type_560_SubscribeVersion | Type_560_Transact | Type_560_TransferAsset | Type_560_TransferReserveAsset | Type_560_Trap | Type_560_UnsubscribeVersion | Type_560_WithdrawAsset + +export interface Type_560_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface Type_560_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface Type_560_ClearError { + __kind: 'ClearError' +} + +export interface Type_560_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_560_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_560_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_560_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface Type_560_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_560_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_560_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_560_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_560_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_560_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_560_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface Type_560_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface Type_560_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface Type_560_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_560_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface Type_560_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface Type_560_SetAppendix { + __kind: 'SetAppendix' + value: Type_560[] +} + +export interface Type_560_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_560[] +} + +export interface Type_560_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_560_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_553 +} + +export interface Type_560_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_560_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_560_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_560_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_560_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export const Type_554: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_556), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: Type_554, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_556), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_553, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_556), + }), + } +}) + +export const Type_556: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => Type_554), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type Type_556 = Type_556_BuyExecution | Type_556_DepositAsset | Type_556_DepositReserveAsset | Type_556_ExchangeAsset | Type_556_InitiateReserveWithdraw | Type_556_InitiateTeleport | Type_556_Noop | Type_556_QueryHolding + +export interface Type_556_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: Type_554[] +} + +export interface Type_556_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_556_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_556_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_556_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface Type_556_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_556_Noop { + __kind: 'Noop' +} + +export interface Type_556_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export type Type_554 = Type_554_HrmpChannelAccepted | Type_554_HrmpChannelClosing | Type_554_HrmpNewChannelOpenRequest | Type_554_QueryResponse | Type_554_ReceiveTeleportedAsset | Type_554_RelayedFrom | Type_554_ReserveAssetDeposited | Type_554_SubscribeVersion | Type_554_Transact | Type_554_TransferAsset | Type_554_TransferReserveAsset | Type_554_UnsubscribeVersion | Type_554_WithdrawAsset + +export interface Type_554_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_554_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_554_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_554_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface Type_554_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: Type_556[] +} + +export interface Type_554_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: Type_554 +} + +export interface Type_554_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: Type_556[] +} + +export interface Type_554_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_554_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_553 +} + +export interface Type_554_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_554_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_554_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_554_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: Type_556[] +} + +export const Type_549: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: Type_549, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_551), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_551), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_553, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_551), + }), + } +}) + +export const Type_551: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => Type_549), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type Type_551 = Type_551_BuyExecution | Type_551_DepositAsset | Type_551_DepositReserveAsset | Type_551_ExchangeAsset | Type_551_InitiateReserveWithdraw | Type_551_InitiateTeleport | Type_551_Null | Type_551_QueryHolding + +export interface Type_551_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: Type_549[] +} + +export interface Type_551_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_551_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_551_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface Type_551_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface Type_551_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_551_Null { + __kind: 'Null' +} + +export interface Type_551_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type Type_549 = Type_549_HrmpChannelAccepted | Type_549_HrmpChannelClosing | Type_549_HrmpNewChannelOpenRequest | Type_549_QueryResponse | Type_549_RelayedFrom | Type_549_ReserveAssetDeposit | Type_549_TeleportAsset | Type_549_Transact | Type_549_TransferAsset | Type_549_TransferReserveAsset | Type_549_WithdrawAsset + +export interface Type_549_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_549_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_549_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_549_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface Type_549_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: Type_549 +} + +export interface Type_549_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: Type_551[] +} + +export interface Type_549_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: Type_551[] +} + +export interface Type_549_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_553 +} + +export interface Type_549_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_549_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_549_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: Type_551[] +} + +export type Type_548 = Type_548_V0 | Type_548_V1 | Type_548_V2 + +export interface Type_548_V0 { + __kind: 'V0' + value: Type_549 +} + +export interface Type_548_V1 { + __kind: 'V1' + value: Type_554 +} + +export interface Type_548_V2 { + __kind: 'V2' + value: Type_560[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type XcmPalletCall = XcmPalletCall_execute | XcmPalletCall_force_default_xcm_version | XcmPalletCall_force_subscribe_version_notify | XcmPalletCall_force_unsubscribe_version_notify | XcmPalletCall_force_xcm_version | XcmPalletCall_limited_reserve_transfer_assets | XcmPalletCall_limited_teleport_assets | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets + +/** + * Execute an XCM message from a local, signed, origin. + * + * An event is deposited indicating whether `msg` could be executed completely or only + * partially. + * + * No more than `max_weight` will be used in its attempted execution. If this is less than the + * maximum amount of weight that the message could take to be executed, then no execution + * attempt will be made. + * + * NOTE: A successful return to this does *not* imply that the `msg` was executed successfully + * to completion; only that *some* of it was executed. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Type_548 + maxWeight: bigint +} + +/** + * Set a safe XCM version (the version that XCM should be encoded with if the most recent + * version a destination can accept is unknown). + * + * - `origin`: Must be Root. + * - `maybe_xcm_version`: The default XCM encoding version, or `None` to disable. + */ +export interface XcmPalletCall_force_default_xcm_version { + __kind: 'force_default_xcm_version' + maybeXcmVersion?: (number | undefined) +} + +/** + * Ask a location to notify us regarding their XCM version and any changes to it. + * + * - `origin`: Must be Root. + * - `location`: The location to which we should subscribe for XCM version notifications. + */ +export interface XcmPalletCall_force_subscribe_version_notify { + __kind: 'force_subscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Require that a particular destination should no longer notify us regarding any XCM + * version changes. + * + * - `origin`: Must be Root. + * - `location`: The location to which we are currently subscribed for XCM version + * notifications which we no longer desire. + */ +export interface XcmPalletCall_force_unsubscribe_version_notify { + __kind: 'force_unsubscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Extoll that a particular destination can be communicated with through a particular + * version of XCM. + * + * - `origin`: Must be Root. + * - `location`: The destination that is being described. + * - `xcm_version`: The latest version of XCM that `location` supports. + */ +export interface XcmPalletCall_force_xcm_version { + __kind: 'force_xcm_version' + location: V1MultiLocation + xcmVersion: number +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination + * chain and forward a notification XCM. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight + * is needed than `weight_limit`, then the operation will fail and the assets send may be + * at risk. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_reserve_transfer_assets { + __kind: 'limited_reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight + * is needed than `weight_limit`, then the operation will fail and the assets send may be + * at risk. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_teleport_assets { + __kind: 'limited_teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination + * chain and forward a notification XCM. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, + * with all fees taken as needed from the asset. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +export interface XcmPalletCall_send { + __kind: 'send' + dest: VersionedMultiLocation + message: VersionedXcm +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, + * with all fees taken as needed from the asset. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VoterListCall: sts.Type = sts.closedEnum(() => { + return { + put_in_front_of: sts.enumStruct({ + lighter: AccountId32, + }), + rebag: sts.enumStruct({ + dislocated: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VoterListCall = VoterListCall_put_in_front_of | VoterListCall_rebag + +/** + * Move the caller's Id directly in front of `lighter`. + * + * The dispatch origin for this call must be _Signed_ and can only be called by the Id of + * the account going in front of `lighter`. + * + * Only works if + * - both nodes are within the same bag, + * - and `origin` has a greater `Score` than `lighter`. + */ +export interface VoterListCall_put_in_front_of { + __kind: 'put_in_front_of' + lighter: AccountId32 +} + +/** + * Declare that some `dislocated` account has, through rewards or penalties, sufficiently + * changed its score that it should properly fall into a different bag than its current + * one. + * + * Anyone can call this function about any potentially dislocated account. + * + * Will always update the stored score of `dislocated` to the correct score, based on + * `ScoreProvider`. + * + * If `dislocated` does not exists, it returns an error. + */ +export interface VoterListCall_rebag { + __kind: 'rebag' + dislocated: AccountId32 +} + +export type AccountId32 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: MultiAddress, + target: MultiAddress, + schedule: VestingInfo, + }), + merge_schedules: sts.enumStruct({ + schedule1Index: sts.number(), + schedule2Index: sts.number(), + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: MultiAddress, + }), + vested_transfer: sts.enumStruct({ + target: MultiAddress, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: sts.bigint(), + perBlock: sts.bigint(), + startingBlock: sts.number(), + } +}) + +export interface VestingInfo { + locked: bigint + perBlock: bigint + startingBlock: number +} + +export const MultiAddress: sts.Type = sts.closedEnum(() => { + return { + Address20: sts.bytes(), + Address32: sts.bytes(), + Id: AccountId32, + Index: sts.unit(), + Raw: sts.bytes(), + } +}) + +export type MultiAddress = MultiAddress_Address20 | MultiAddress_Address32 | MultiAddress_Id | MultiAddress_Index | MultiAddress_Raw + +export interface MultiAddress_Address20 { + __kind: 'Address20' + value: Bytes +} + +export interface MultiAddress_Address32 { + __kind: 'Address32' + value: Bytes +} + +export interface MultiAddress_Id { + __kind: 'Id' + value: AccountId32 +} + +export interface MultiAddress_Index { + __kind: 'Index' +} + +export interface MultiAddress_Raw { + __kind: 'Raw' + value: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_merge_schedules | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: MultiAddress + target: MultiAddress + schedule: VestingInfo +} + +/** + * Merge two vesting schedules together, creating a new vesting schedule that unlocks over + * the highest possible start and end blocks. If both schedules have already started the + * current block will be used as the schedule start; with the caveat that if one schedule + * is finished by the current block, the other will be treated as the new merged schedule, + * unmodified. + * + * NOTE: If `schedule1_index == schedule2_index` this is a no-op. + * NOTE: This will unlock all schedules through the current block prior to merging. + * NOTE: If both schedules have ended by the current block, no new schedule will be created + * and both will be removed. + * + * Merged schedule attributes: + * - `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block, + * current_block)`. + * - `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`. + * - `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`. + * + * The dispatch origin for this call must be _Signed_. + * + * - `schedule1_index`: index of the first schedule to merge. + * - `schedule2_index`: index of the second schedule to merge. + */ +export interface VestingCall_merge_schedules { + __kind: 'merge_schedules' + schedule1Index: number + schedule2Index: number +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: MultiAddress +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account receiving the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: MultiAddress + schedule: VestingInfo +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Call, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Call), + }), + dispatch_as: sts.enumStruct({ + asOrigin: OriginCaller, + call: Call, + }), + force_batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + } +}) + +export const OriginCaller: sts.Type = sts.closedEnum(() => { + return { + Council: Type_334, + ParachainsOrigin: Origin, + TechnicalCommittee: Type_335, + Void: Void, + XcmPallet: Type_337, + system: RawOrigin, + } +}) + +export const RawOrigin: sts.Type = sts.closedEnum(() => { + return { + None: sts.unit(), + Root: sts.unit(), + Signed: AccountId32, + } +}) + +export type RawOrigin = RawOrigin_None | RawOrigin_Root | RawOrigin_Signed + +export interface RawOrigin_None { + __kind: 'None' +} + +export interface RawOrigin_Root { + __kind: 'Root' +} + +export interface RawOrigin_Signed { + __kind: 'Signed' + value: AccountId32 +} + +export const Type_337: sts.Type = sts.closedEnum(() => { + return { + Response: V1MultiLocation, + Xcm: V1MultiLocation, + } +}) + +export type Type_337 = Type_337_Response | Type_337_Xcm + +export interface Type_337_Response { + __kind: 'Response' + value: V1MultiLocation +} + +export interface Type_337_Xcm { + __kind: 'Xcm' + value: V1MultiLocation +} + +export const Void: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Void = never + +export const Type_335: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_335 = Type_335_Member | Type_335_Members | Type_335__Phantom + +export interface Type_335_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_335_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_335__Phantom { + __kind: '_Phantom' +} + +export const Origin: sts.Type = sts.closedEnum(() => { + return { + Parachain: Id, + } +}) + +export const Id = sts.number() + +export type Origin = Origin_Parachain + +export interface Origin_Parachain { + __kind: 'Parachain' + value: Id +} + +export type Id = number + +export const Type_334: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_334 = Type_334_Member | Type_334_Members | Type_334__Phantom + +export interface Type_334_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_334_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_334__Phantom { + __kind: '_Phantom' +} + +export type OriginCaller = OriginCaller_Council | OriginCaller_ParachainsOrigin | OriginCaller_TechnicalCommittee | OriginCaller_Void | OriginCaller_XcmPallet | OriginCaller_system + +export interface OriginCaller_Council { + __kind: 'Council' + value: Type_334 +} + +export interface OriginCaller_ParachainsOrigin { + __kind: 'ParachainsOrigin' + value: Origin +} + +export interface OriginCaller_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: Type_335 +} + +export interface OriginCaller_Void { + __kind: 'Void' + value: Void +} + +export interface OriginCaller_XcmPallet { + __kind: 'XcmPallet' + value: Type_337 +} + +export interface OriginCaller_system { + __kind: 'system' + value: RawOrigin +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all | UtilityCall_dispatch_as | UtilityCall_force_batch + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Call +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Call[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Call[] +} + +/** + * Dispatches a function call with a provided origin. + * + * The dispatch origin for this call must be _Root_. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB write (event). + * - Weight of derivative `call` execution + T::WeightInfo::dispatch_as(). + * # + */ +export interface UtilityCall_dispatch_as { + __kind: 'dispatch_as' + asOrigin: OriginCaller + call: Call +} + +/** + * Send a batch of dispatch calls. + * Unlike `batch`, it allows errors and won't interrupt. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_force_batch { + __kind: 'force_batch' + calls: Call[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UmpCall: sts.Type = sts.closedEnum(() => { + return { + service_overweight: sts.enumStruct({ + index: sts.bigint(), + weightLimit: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UmpCall = UmpCall_service_overweight + +/** + * Service a single overweight upward message. + * + * - `origin`: Must pass `ExecuteOverweightOrigin`. + * - `index`: The index of the overweight message to service. + * - `weight_limit`: The amount of weight that message execution may take. + * + * Errors: + * - `UnknownMessageIndex`: Message of `index` is unknown. + * - `WeightOverLimit`: Message execution may use greater than `weight_limit`. + * + * Events: + * - `OverweightServiced`: On success. + */ +export interface UmpCall_service_overweight { + __kind: 'service_overweight' + index: bigint + weightLimit: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: MultiAddress, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + remove_approval: sts.enumStruct({ + proposalId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_remove_approval + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: MultiAddress +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Force a previously approved proposal to be removed from the approval queue. + * The original deposit will no longer be returned. + * + * May only be called from `T::RejectOrigin`. + * - `proposal_id`: The index of a proposal + * + * # + * - Complexity: O(A) where `A` is the number of approvals + * - Db reads and writes: `Approvals` + * # + * + * Errors: + * - `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue, + * i.e., the proposal has not been approved. This could also mean the proposal does not + * exist altogether, thus there is no way it would have been approved in the first place. + */ +export interface TreasuryCall_remove_approval { + __kind: 'remove_approval' + proposalId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TipsCall: sts.Type = sts.closedEnum(() => { + return { + close_tip: sts.enumStruct({ + hash: H256, + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId32, + }), + retract_tip: sts.enumStruct({ + hash: H256, + }), + slash_tip: sts.enumStruct({ + hash: H256, + }), + tip: sts.enumStruct({ + hash: H256, + tipValue: sts.bigint(), + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId32, + tipValue: sts.bigint(), + }), + } +}) + +export const H256 = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TipsCall = TipsCall_close_tip | TipsCall_report_awesome | TipsCall_retract_tip | TipsCall_slash_tip | TipsCall_tip | TipsCall_tip_new + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost + * depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TipsCall_close_tip { + __kind: 'close_tip' + hash: H256 +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId32 +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TipsCall_retract_tip { + __kind: 'retract_tip' + hash: H256 +} + +/** + * Remove and slash an already-open tip. + * + * May only be called from `T::RejectOrigin`. + * + * As a result, the finder is slashed and the deposits are lost. + * + * Emits `TipSlashed` if successful. + * + * # + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * # + */ +export interface TipsCall_slash_tip { + __kind: 'slash_tip' + hash: H256 +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`, insert tip and check closing, `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TipsCall_tip { + __kind: 'tip' + hash: H256 + tipValue: bigint +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of + * `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId32 + tipValue: bigint +} + +export type H256 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in + * `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId32, + }), + change_key: sts.enumStruct({ + new: AccountId32, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId32, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId32), + }), + set_prime: sts.enumStruct({ + who: AccountId32, + }), + swap_member: sts.enumStruct({ + remove: AccountId32, + add: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId32 +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId32 +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId32 +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId32[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId32 +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId32 + add: AccountId32 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: sts.bytes(), + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => sts.bytes()), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + }), + } +}) + +export const Perbill = sts.number() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Bytes + subkeys: number +} + +/** + * Kill some items from storage. + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Bytes[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Make some on-chain remark and emit event. + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is + * expensive). + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very + * expensive. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full + * block. # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: [Bytes, Bytes][] +} + +export type Perbill = number + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: MultiAddress, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: sts.number(), + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + controller: AccountId32, + }), + force_apply_min_commission: sts.enumStruct({ + validatorStash: AccountId32, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => MultiAddress), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => MultiAddress), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + }), + reap_stash: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: MultiAddress, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId32), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_staking_configs: sts.enumStruct({ + minNominatorBond: ConfigOp, + minValidatorBond: ConfigOp, + maxNominatorCount: Type_250, + maxValidatorCount: Type_250, + chillThreshold: Type_251, + minCommission: Type_252, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export const Type_252: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export type Type_252 = Type_252_Noop | Type_252_Remove | Type_252_Set + +export interface Type_252_Noop { + __kind: 'Noop' +} + +export interface Type_252_Remove { + __kind: 'Remove' +} + +export interface Type_252_Set { + __kind: 'Set' + value: Perbill +} + +export const Type_251: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Percent, + } +}) + +export type Type_251 = Type_251_Noop | Type_251_Remove | Type_251_Set + +export interface Type_251_Noop { + __kind: 'Noop' +} + +export interface Type_251_Remove { + __kind: 'Remove' +} + +export interface Type_251_Set { + __kind: 'Set' + value: Percent +} + +export type Percent = number + +export const Type_250: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_250 = Type_250_Noop | Type_250_Remove | Type_250_Set + +export interface Type_250_Noop { + __kind: 'Noop' +} + +export interface Type_250_Remove { + __kind: 'Remove' +} + +export interface Type_250_Set { + __kind: 'Set' + value: number +} + +export const ConfigOp: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type ConfigOp = ConfigOp_Noop | ConfigOp_Remove | ConfigOp_Set + +export interface ConfigOp_Noop { + __kind: 'Noop' +} + +export interface ConfigOp_Remove { + __kind: 'Remove' +} + +export interface ConfigOp_Set { + __kind: 'Set' + value: bigint +} + +export const Percent = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_force_apply_min_commission | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_staking_configs | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: MultiAddress + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose + * any limitation on the amount that can be added. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: number + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Declare a `controller` to stop participating as either a validator or nominator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_, but can be called by anyone. + * + * If the caller is the same as the controller being targeted, then no further checks are + * enforced, and this function behaves just like `chill`. + * + * If the caller is different than the controller being targeted, the following conditions + * must be met: + * + * * `controller` must belong to a nominator who has become non-decodable, + * + * Or: + * + * * A `ChillThreshold` must be set and checked which defines how close to the max + * nominators or validators we must reach before users can start chilling one-another. + * * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine + * how close we are to the threshold. + * * A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines + * if this is a person that should be chilled because they have not met the threshold + * bond required. + * + * This can be helpful if bond requirements are updated, and we need to remove old users + * who do not satisfy these requirements. + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + controller: AccountId32 +} + +/** + * Force a validator to have at least the minimum commission. This will not affect a + * validator who already has a commission greater than or equal to the minimum. Any account + * can call this. + */ +export interface StakingCall_force_apply_min_commission { + __kind: 'force_apply_min_commission' + validatorStash: AccountId32 +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * Thus the election process may be ongoing when this is called. In this case the + * election will continue until the next era is triggered. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: MultiAddress[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (T::MaxNominations). + * - Both the reads and writes follow a similar pattern. + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: MultiAddress[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId32 + era: number +} + +/** + * Remove all data structures concerning a staker/stash once it is at a state where it can + * be considered `dust` in the staking system. The requirements are: + * + * 1. the `total_balance` of the stash is below existential deposit. + * 2. or, the `ledger.total` of the stash is below existential deposit. + * + * The former can happen in cases like a slash; the latter when a fully unbonded account + * is still receiving staking rewards in `RewardDestination::Staked`. + * + * It can be called by anyone, as long as `stash` meets the above requirements. + * + * Refunds the transaction fees upon successful execution. + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MaxUnlockingChunks`. + * - Storage changes: Can't increase storage, only decrease it. + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt instantly (as soon as this function is completed successfully). + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: MultiAddress +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. This + * should report all the storage items that will be deleted by clearing old era history. + * Needed to report an accurate weight for the dispatch. Trusted by `Root` to report an + * accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Weight: O(E) + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, + * ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId32[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt instantly (as soon as this function is completed successfully). + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Update the various staking configurations . + * + * * `min_nominator_bond`: The minimum active bond needed to be a nominator. + * * `min_validator_bond`: The minimum active bond needed to be a validator. + * * `max_nominator_count`: The max number of users who can be a nominator at once. When + * set to `None`, no limit is enforced. + * * `max_validator_count`: The max number of users who can be a validator at once. When + * set to `None`, no limit is enforced. + * * `chill_threshold`: The ratio of `max_nominator_count` or `max_validator_count` which + * should be filled in order for the `chill_other` transaction to work. + * * `min_commission`: The minimum amount of commission that each validators must maintain. + * This is checked only upon calling `validate`. Existing validators are not affected. + * + * Origin must be Root to call this function. + * + * NOTE: Existing nominators and validators will not be affected by this update. + * to kick people under the new limits, `chill_other` should be called. + */ +export interface StakingCall_set_staking_configs { + __kind: 'set_staking_configs' + minNominatorBond: ConfigOp + minValidatorBond: ConfigOp + maxNominatorCount: Type_250 + maxValidatorCount: Type_250 + chillThreshold: Type_251 + minCommission: Type_252 +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * If a user encounters the `InsufficientBond` error when calling this extrinsic, + * they should call `chill` first in order to free up their bonded funds. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * Complexity O(S) where S is the number of slashing spans to remove + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: sts.bigint(), + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId32, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId32, + judgement: Type_380, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId32, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: MultiAddress, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId32, + value: sts.bigint(), + tip: sts.bigint(), + }), + } +}) + +export const Type_380: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export type Type_380 = Type_380_Approve | Type_380_Rebid | Type_380_Reject + +export interface Type_380_Approve { + __kind: 'Approve' +} + +export interface Type_380_Rebid { + __kind: 'Rebid' +} + +export interface Type_380_Reject { + __kind: 'Reject' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: bigint +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * pallet to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId32 + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId32 + judgement: Type_380 +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin forgives + * (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to + * society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId32 + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured + * payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be approved (`true`) or + * rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: MultiAddress + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId32 + value: bigint + tip: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: Id, + }), + force_lease: sts.enumStruct({ + para: Id, + leaser: AccountId32, + amount: sts.bigint(), + periodBegin: sts.number(), + periodCount: sts.number(), + }), + trigger_onboard: sts.enumStruct({ + para: Id, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * Clear all leases for a Para Id, refunding any deposits back to the original owners. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: Id +} + +/** + * Just a connect into the `lease_out` call, in case Root wants to force some lease to happen + * independently of any other on-chain mechanism to use it. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: Id + leaser: AccountId32 + amount: bigint + periodBegin: number + periodCount: number +} + +/** + * Try to onboard a parachain that has a lease for the current lease period. + * + * This function can be useful if there was some state issue with a para that should + * have onboarded, but was unable to. As long as they have a lease period, we can + * let them onboard from here. + * + * Origin must be signed, but can be called by anyone. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: SessionKeys, + proof: sts.bytes(), + }), + } +}) + +export const SessionKeys: sts.Type = sts.struct(() => { + return { + grandpa: Public, + babe: sts.bytes(), + imOnline: sts.bytes(), + paraValidator: sts.bytes(), + paraAssignment: sts.bytes(), + authorityDiscovery: sts.bytes(), + } +}) + +export const Public = sts.bytes() + +export interface SessionKeys { + grandpa: Public + babe: Bytes + imOnline: Bytes + paraValidator: Bytes + paraAssignment: Bytes + authorityDiscovery: Bytes +} + +export type Public = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be Signed and the account must be either be + * convertible to a validator ID using the chain's typical addressing system (this usually + * means being a controller account) or directly convertible into a validator ID (which + * usually means being a stash account). + * + * # + * - Complexity: `O(1)` in number of key types. Actual cost depends on the number of length + * of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)`. Actual cost depends on the number of length of + * `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: SessionKeys + proof: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: sts.number(), + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + schedule_after: sts.enumStruct({ + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + } +}) + +export const MaybeHashed: sts.Type = sts.closedEnum(() => { + return { + Hash: H256, + Value: Call, + } +}) + +export type MaybeHashed = MaybeHashed_Hash | MaybeHashed_Value + +export interface MaybeHashed_Hash { + __kind: 'Hash' + value: H256 +} + +export interface MaybeHashed_Value { + __kind: 'Value' + value: Call +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: number + index: number +} + +/** + * Cancel a named scheduled task. + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Schedule a named task. + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`](Self::schedule_named). + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + deregister: sts.enumStruct({ + id: Id, + }), + force_register: sts.enumStruct({ + who: AccountId32, + deposit: sts.bigint(), + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + force_remove_lock: sts.enumStruct({ + para: Id, + }), + register: sts.enumStruct({ + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + reserve: sts.unit(), + swap: sts.enumStruct({ + id: Id, + other: Id, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RegistrarCall = RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_force_remove_lock | RegistrarCall_register | RegistrarCall_reserve | RegistrarCall_swap + +/** + * Deregister a Para Id, freeing all data and returning any deposit. + * + * The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: Id +} + +/** + * Force the registration of a Para Id on the relay chain. + * + * This function must be called by a Root origin. + * + * The deposit taken can be specified for this registration. Any `ParaId` + * can be registered, including sub-1000 IDs which are System Parachains. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId32 + deposit: bigint + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Remove a manager lock from a para. This will allow the manager of a + * previously locked para to deregister or swap a para without using governance. + * + * Can only be called by the Root origin. + */ +export interface RegistrarCall_force_remove_lock { + __kind: 'force_remove_lock' + para: Id +} + +/** + * Register head data and validation code for a reserved Para Id. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. + * - `id`: The para ID. Must be owned/managed by the `origin` signing account. + * - `genesis_head`: The genesis head data of the parachain/thread. + * - `validation_code`: The initial validation code of the parachain/thread. + * + * ## Deposits/Fees + * The origin signed account must reserve a corresponding deposit for the registration. Anything already + * reserved previously for this para ID is accounted for. + * + * ## Events + * The `Registered` event is emitted in case of success. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Reserve a Para Id on the relay chain. + * + * This function will reserve a new Para Id to be owned/managed by the origin account. + * The origin account is able to register head data and validation code using `register` to create + * a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID. + * + * ## Deposits/Fees + * The origin must reserve a deposit of `ParaDeposit` for the registration. + * + * ## Events + * The `Reserved` event is emitted in case of success, which provides the ID reserved for use. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * Swap a parachain with another parachain or parathread. + * + * The origin must be Root, the `para` owner, or the `para` itself. + * + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: Id + other: Id +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId32, + call: Call, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId32, + }), + claim_recovery: sts.enumStruct({ + account: AccountId32, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId32, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId32), + threshold: sts.number(), + delayPeriod: sts.number(), + }), + initiate_recovery: sts.enumStruct({ + account: AccountId32, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId32, + rescuer: AccountId32, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId32, + rescuer: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId32 + call: Call +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId32 +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully recovered by + * you. + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId32 +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId32 +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. Should be + * ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt before the + * account can be recovered. Should be less than or equal to the length of the list of + * friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized that + * needs to pass before the account can be recovered. + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId32[] + threshold: number + delayPeriod: number +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account needs to be + * recoverable (i.e. have a recovery configuration). + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId32 +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId32 + rescuer: AccountId32 +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId32 + rescuer: AccountId32 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: AccountId32, + proxyType: ProxyType, + delay: sts.number(), + }), + announce: sts.enumStruct({ + real: AccountId32, + callHash: H256, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + delay: sts.number(), + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId32, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId32, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + proxy_announced: sts.enumStruct({ + delegate: AccountId32, + real: AccountId32, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + reject_announcement: sts.enumStruct({ + delegate: AccountId32, + callHash: H256, + }), + remove_announcement: sts.enumStruct({ + real: AccountId32, + callHash: H256, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: AccountId32, + proxyType: ProxyType, + delay: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: AccountId32 + proxyType: ProxyType + delay: number +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: AccountId32 + callHash: H256 +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + * TODO: Might be over counting 1 read + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: number + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId32 + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId32 + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Dispatch the given `call` from an account that the sender is authorized for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: AccountId32 + real: AccountId32 + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: AccountId32 + callHash: H256 +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: AccountId32 + callHash: H256 +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: AccountId32 + proxyType: ProxyType + delay: number +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Society | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Society { + __kind: 'Society' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PreimageCall: sts.Type = sts.closedEnum(() => { + return { + note_preimage: sts.enumStruct({ + bytes: sts.bytes(), + }), + request_preimage: sts.enumStruct({ + hash: H256, + }), + unnote_preimage: sts.enumStruct({ + hash: H256, + }), + unrequest_preimage: sts.enumStruct({ + hash: H256, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PreimageCall = PreimageCall_note_preimage | PreimageCall_request_preimage | PreimageCall_unnote_preimage | PreimageCall_unrequest_preimage + +/** + * Register a preimage on-chain. + * + * If the preimage was previously requested, no fees or deposits are taken for providing + * the preimage. Otherwise, a deposit is taken proportional to the size of the preimage. + */ +export interface PreimageCall_note_preimage { + __kind: 'note_preimage' + bytes: Bytes +} + +/** + * Request a preimage be uploaded to the chain without paying any fees or deposits. + * + * If the preimage requests has already been provided on-chain, we unreserve any deposit + * a user may have paid, and take the control of the preimage out of their hands. + */ +export interface PreimageCall_request_preimage { + __kind: 'request_preimage' + hash: H256 +} + +/** + * Clear an unrequested preimage from the runtime storage. + */ +export interface PreimageCall_unnote_preimage { + __kind: 'unnote_preimage' + hash: H256 +} + +/** + * Clear a previously made request for a preimage. + * + * NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. + */ +export interface PreimageCall_unrequest_preimage { + __kind: 'unrequest_preimage' + hash: H256 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PhragmenElectionCall: sts.Type = sts.closedEnum(() => { + return { + clean_defunct_voters: sts.enumStruct({ + numVoters: sts.number(), + numDefunct: sts.number(), + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + hasReplacement: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId32), + value: sts.bigint(), + }), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PhragmenElectionCall = PhragmenElectionCall_clean_defunct_voters | PhragmenElectionCall_remove_member | PhragmenElectionCall_remove_voter | PhragmenElectionCall_renounce_candidacy | PhragmenElectionCall_submit_candidacy | PhragmenElectionCall_vote + +/** + * Clean all voters who are defunct (i.e. they do not serve any purpose at all). The + * deposit of the removed voters are returned. + * + * This is an root function to be used only for cleaning the state. + * + * The dispatch origin of this call must be root. + * + * # + * The total number of voters and those that are defunct must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_clean_defunct_voters { + __kind: 'clean_defunct_voters' + numVoters: number + numDefunct: number +} + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, a new phragmen election is started. + * + * The dispatch origin of this call must be root. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement, we use a small weight. Else, since this is a root call and + * will go into phragmen, we assume full block for now. + * # + */ +export interface PhragmenElectionCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + hasReplacement: boolean +} + +/** + * Remove `origin` as a voter. + * + * This removes the lock and returns the deposit. + * + * The dispatch origin of this call must be signed and be a voter. + */ +export interface PhragmenElectionCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * + * - `origin` is a candidate and not elected in any set. In this case, the deposit is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the deposit is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the deposit is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_member`](Self::remove_member), if replacement runners exists, they + * are immediately used. If the prime is renouncing, then no prime will exist until the + * next round. + * + * The dispatch origin of this call must be signed, and have one of the above roles. + * + * # + * The type of renouncing must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Submit oneself for candidacy. A fixed amount of deposit is recorded. + * + * All candidates are wiped at the end of the term. They either become a member/runner-up, + * or leave the system while their deposit is slashed. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`] + * to get their deposit back. Losing the spot in an election will always lead to a slash. + * + * # + * The number of current candidates must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is + * reserved. The deposit is based on the number of votes and can be updated over time. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * If `value` is more than `who`'s free balance, then the maximum of the two is used. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * It is the responsibility of the caller to **NOT** place all of their balance into the + * lock and keep some for further operations. + * + * # + * We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less. + * # + */ +export interface PhragmenElectionCall_vote { + __kind: 'vote' + votes: AccountId32[] + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasSharedCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasDisputesCall: sts.Type = sts.closedEnum(() => { + return { + force_unfreeze: sts.unit(), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasDisputesCall = ParasDisputesCall_force_unfreeze + +export interface ParasDisputesCall_force_unfreeze { + __kind: 'force_unfreeze' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + add_trusted_validation_code: sts.enumStruct({ + validationCode: ValidationCode, + }), + force_note_new_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: Id, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + relayParentNumber: sts.number(), + }), + force_set_current_code: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + include_pvf_check_statement: sts.enumStruct({ + stmt: V2PvfCheckStatement, + signature: sts.bytes(), + }), + poke_unused_validation_code: sts.enumStruct({ + validationCodeHash: ValidationCodeHash, + }), + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const V2PvfCheckStatement: sts.Type = sts.struct(() => { + return { + accept: sts.boolean(), + subject: ValidationCodeHash, + sessionIndex: sts.number(), + validatorIndex: V2ValidatorIndex, + } +}) + +export const V2ValidatorIndex = sts.number() + +export interface V2PvfCheckStatement { + accept: boolean + subject: ValidationCodeHash + sessionIndex: number + validatorIndex: V2ValidatorIndex +} + +export type V2ValidatorIndex = number + +export type ValidationCodeHash = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasCall = ParasCall_add_trusted_validation_code | ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head | ParasCall_include_pvf_check_statement | ParasCall_poke_unused_validation_code + +/** + * Adds the validation code to the storage. + * + * The code will not be added if it is already present. Additionally, if PVF pre-checking + * is running for that code, it will be instantly accepted. + * + * Otherwise, the code will be added into the storage. Note that the code will be added + * into storage with reference count 0. This is to account the fact that there are no users + * for this code yet. The caller will have to make sure that this code eventually gets + * used by some parachain or removed from the storage to avoid storage leaks. For the latter + * prefer to use the `poke_unused_validation_code` dispatchable to raw storage manipulation. + * + * This function is mainly meant to be used for upgrading parachains that do not follow + * the go-ahead signal while the PVF pre-checking feature is enabled. + */ +export interface ParasCall_add_trusted_validation_code { + __kind: 'add_trusted_validation_code' + validationCode: ValidationCode +} + +/** + * Note a new block head for para within the context of the current block. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: Id + newHead: HeadData +} + +/** + * Put a parachain directly into the next session's action queue. + * We can't queue it any sooner than this without going into the + * initializer... + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: Id +} + +/** + * Schedule an upgrade as if it was scheduled in the given relay parent block. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: Id + newCode: ValidationCode + relayParentNumber: number +} + +/** + * Set the storage for the parachain validation code immediately. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: Id + newCode: ValidationCode +} + +/** + * Set the storage for the current parachain head data immediately. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: Id + newHead: HeadData +} + +/** + * Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and + * enacts the results if that was the last vote before achieving the supermajority. + */ +export interface ParasCall_include_pvf_check_statement { + __kind: 'include_pvf_check_statement' + stmt: V2PvfCheckStatement + signature: Bytes +} + +/** + * Remove the validation code from the storage iff the reference count is 0. + * + * This is better than removing the storage directly, because it will not remove the code + * that was suddenly got used by some parachain while this dispatchable was pending + * dispatching. + */ +export interface ParasCall_poke_unused_validation_code { + __kind: 'poke_unused_validation_code' + validationCodeHash: ValidationCodeHash +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: V2InherentData, + }), + } +}) + +export const V2InherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => V2UncheckedSigned), + backedCandidates: sts.array(() => V2BackedCandidate), + disputes: sts.array(() => V2DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: H256, + number: sts.number(), + stateRoot: H256, + extrinsicsRoot: H256, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + Consensus: sts.tuple(() => [sts.bytes(), sts.bytes()]), + Other: sts.bytes(), + PreRuntime: sts.tuple(() => [sts.bytes(), sts.bytes()]), + RuntimeEnvironmentUpdated: sts.unit(), + Seal: sts.tuple(() => [sts.bytes(), sts.bytes()]), + } +}) + +export type DigestItem = DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: [Bytes, Bytes] +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: [Bytes, Bytes] +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: [Bytes, Bytes] +} + +export interface Digest { + logs: DigestItem[] +} + +export interface Header { + parentHash: H256 + number: number + stateRoot: H256 + extrinsicsRoot: H256 + digest: Digest +} + +export const V2DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: sts.number(), + statements: sts.array(() => sts.tuple(() => [V2DisputeStatement, V2ValidatorIndex, sts.bytes()])), + } +}) + +export const V2DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: V2InvalidDisputeStatementKind, + Valid: V2ValidDisputeStatementKind, + } +}) + +export const V2ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + BackingSeconded: H256, + BackingValid: H256, + Explicit: sts.unit(), + } +}) + +export type V2ValidDisputeStatementKind = V2ValidDisputeStatementKind_ApprovalChecking | V2ValidDisputeStatementKind_BackingSeconded | V2ValidDisputeStatementKind_BackingValid | V2ValidDisputeStatementKind_Explicit + +export interface V2ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface V2ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: H256 +} + +export interface V2ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: H256 +} + +export interface V2ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export const V2InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export type V2InvalidDisputeStatementKind = V2InvalidDisputeStatementKind_Explicit + +export interface V2InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type V2DisputeStatement = V2DisputeStatement_Invalid | V2DisputeStatement_Valid + +export interface V2DisputeStatement_Invalid { + __kind: 'Invalid' + value: V2InvalidDisputeStatementKind +} + +export interface V2DisputeStatement_Valid { + __kind: 'Valid' + value: V2ValidDisputeStatementKind +} + +export const CandidateHash = sts.bytes() + +export interface V2DisputeStatementSet { + candidateHash: CandidateHash + session: number + statements: [V2DisputeStatement, V2ValidatorIndex, Bytes][] +} + +export type CandidateHash = Bytes + +export const V2BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: V2CommittedCandidateReceipt, + validityVotes: sts.array(() => V2ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const V2ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.bytes(), + Implicit: sts.bytes(), + } +}) + +export type V2ValidityAttestation = V2ValidityAttestation_Explicit | V2ValidityAttestation_Implicit + +export interface V2ValidityAttestation_Explicit { + __kind: 'Explicit' + value: Bytes +} + +export interface V2ValidityAttestation_Implicit { + __kind: 'Implicit' + value: Bytes +} + +export const V2CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: V2CandidateDescriptor, + commitments: V2CandidateCommitments, + } +}) + +export const V2CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => sts.bytes()), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: sts.number(), + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: Id, + data: sts.bytes(), + } +}) + +export interface OutboundHrmpMessage { + recipient: Id + data: Bytes +} + +export interface V2CandidateCommitments { + upwardMessages: Bytes[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: number +} + +export const V2CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: Id, + relayParent: H256, + collator: V2Public, + persistedValidationDataHash: H256, + povHash: H256, + erasureRoot: H256, + signature: V2Signature, + paraHead: H256, + validationCodeHash: ValidationCodeHash, + } +}) + +export const V2Signature = sts.bytes() + +export const V2Public = sts.bytes() + +export interface V2CandidateDescriptor { + paraId: Id + relayParent: H256 + collator: V2Public + persistedValidationDataHash: H256 + povHash: H256 + erasureRoot: H256 + signature: V2Signature + paraHead: H256 + validationCodeHash: ValidationCodeHash +} + +export type V2Signature = Bytes + +export type V2Public = Bytes + +export interface V2CommittedCandidateReceipt { + descriptor: V2CandidateDescriptor + commitments: V2CandidateCommitments +} + +export interface V2BackedCandidate { + candidate: V2CommittedCandidateReceipt + validityVotes: V2ValidityAttestation[] + validatorIndices: BitSequence +} + +export const V2UncheckedSigned: sts.Type = sts.struct(() => { + return { + payload: V2AvailabilityBitfield, + validatorIndex: V2ValidatorIndex, + signature: sts.bytes(), + } +}) + +export const V2AvailabilityBitfield = sts.bitseq() + +export interface V2UncheckedSigned { + payload: V2AvailabilityBitfield + validatorIndex: V2ValidatorIndex + signature: Bytes +} + +export type V2AvailabilityBitfield = BitSequence + +export interface V2InherentData { + bitfields: V2UncheckedSigned[] + backedCandidates: V2BackedCandidate[] + disputes: V2DisputeStatementSet[] + parentHeader: Header +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInherentCall = ParaInherentCall_enter + +/** + * Enter the paras inherent. This will process bitfields and backed candidates. + */ +export interface ParaInherentCall_enter { + __kind: 'enter' + data: V2InherentData +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInclusionCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const NominationPoolsCall: sts.Type = sts.closedEnum(() => { + return { + bond_extra: sts.enumStruct({ + extra: BondExtra, + }), + claim_payout: sts.unit(), + create: sts.enumStruct({ + amount: sts.bigint(), + root: AccountId32, + nominator: AccountId32, + stateToggler: AccountId32, + }), + join: sts.enumStruct({ + amount: sts.bigint(), + poolId: sts.number(), + }), + nominate: sts.enumStruct({ + poolId: sts.number(), + validators: sts.array(() => AccountId32), + }), + pool_withdraw_unbonded: sts.enumStruct({ + poolId: sts.number(), + numSlashingSpans: sts.number(), + }), + set_configs: sts.enumStruct({ + minJoinBond: Type_485, + minCreateBond: Type_485, + maxPools: Type_486, + maxMembers: Type_486, + maxMembersPerPool: Type_486, + }), + set_metadata: sts.enumStruct({ + poolId: sts.number(), + metadata: sts.bytes(), + }), + set_state: sts.enumStruct({ + poolId: sts.number(), + state: PoolState, + }), + unbond: sts.enumStruct({ + memberAccount: AccountId32, + unbondingPoints: sts.bigint(), + }), + update_roles: sts.enumStruct({ + poolId: sts.number(), + newRoot: Type_487, + newNominator: Type_487, + newStateToggler: Type_487, + }), + withdraw_unbonded: sts.enumStruct({ + memberAccount: AccountId32, + numSlashingSpans: sts.number(), + }), + } +}) + +export const Type_487: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: AccountId32, + } +}) + +export type Type_487 = Type_487_Noop | Type_487_Remove | Type_487_Set + +export interface Type_487_Noop { + __kind: 'Noop' +} + +export interface Type_487_Remove { + __kind: 'Remove' +} + +export interface Type_487_Set { + __kind: 'Set' + value: AccountId32 +} + +export const PoolState: sts.Type = sts.closedEnum(() => { + return { + Blocked: sts.unit(), + Destroying: sts.unit(), + Open: sts.unit(), + } +}) + +export type PoolState = PoolState_Blocked | PoolState_Destroying | PoolState_Open + +export interface PoolState_Blocked { + __kind: 'Blocked' +} + +export interface PoolState_Destroying { + __kind: 'Destroying' +} + +export interface PoolState_Open { + __kind: 'Open' +} + +export const Type_486: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_486 = Type_486_Noop | Type_486_Remove | Type_486_Set + +export interface Type_486_Noop { + __kind: 'Noop' +} + +export interface Type_486_Remove { + __kind: 'Remove' +} + +export interface Type_486_Set { + __kind: 'Set' + value: number +} + +export const Type_485: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type Type_485 = Type_485_Noop | Type_485_Remove | Type_485_Set + +export interface Type_485_Noop { + __kind: 'Noop' +} + +export interface Type_485_Remove { + __kind: 'Remove' +} + +export interface Type_485_Set { + __kind: 'Set' + value: bigint +} + +export const BondExtra: sts.Type = sts.closedEnum(() => { + return { + FreeBalance: sts.bigint(), + Rewards: sts.unit(), + } +}) + +export type BondExtra = BondExtra_FreeBalance | BondExtra_Rewards + +export interface BondExtra_FreeBalance { + __kind: 'FreeBalance' + value: bigint +} + +export interface BondExtra_Rewards { + __kind: 'Rewards' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type NominationPoolsCall = NominationPoolsCall_bond_extra | NominationPoolsCall_claim_payout | NominationPoolsCall_create | NominationPoolsCall_join | NominationPoolsCall_nominate | NominationPoolsCall_pool_withdraw_unbonded | NominationPoolsCall_set_configs | NominationPoolsCall_set_metadata | NominationPoolsCall_set_state | NominationPoolsCall_unbond | NominationPoolsCall_update_roles | NominationPoolsCall_withdraw_unbonded + +/** + * Bond `extra` more funds from `origin` into the pool to which they already belong. + * + * Additional funds can come from either the free balance of the account, of from the + * accumulated rewards, see [`BondExtra`]. + */ +export interface NominationPoolsCall_bond_extra { + __kind: 'bond_extra' + extra: BondExtra +} + +/** + * A bonded member can use this to claim their payout based on the rewards that the pool + * has accumulated since their last claimed payout (OR since joining if this is there first + * time claiming rewards). The payout will be transferred to the member's account. + * + * The member will earn rewards pro rata based on the members stake vs the sum of the + * members in the pools stake. Rewards do not "expire". + */ +export interface NominationPoolsCall_claim_payout { + __kind: 'claim_payout' +} + +/** + * Create a new delegation pool. + * + * # Arguments + * + * * `amount` - The amount of funds to delegate to the pool. This also acts of a sort of + * deposit since the pools creator cannot fully unbond funds until the pool is being + * destroyed. + * * `index` - A disambiguation index for creating the account. Likely only useful when + * creating multiple pools in the same extrinsic. + * * `root` - The account to set as [`PoolRoles::root`]. + * * `nominator` - The account to set as the [`PoolRoles::nominator`]. + * * `state_toggler` - The account to set as the [`PoolRoles::state_toggler`]. + * + * # Note + * + * In addition to `amount`, the caller will transfer the existential deposit; so the caller + * needs at have at least `amount + existential_deposit` transferrable. + */ +export interface NominationPoolsCall_create { + __kind: 'create' + amount: bigint + root: AccountId32 + nominator: AccountId32 + stateToggler: AccountId32 +} + +/** + * Stake funds with a pool. The amount to bond is transferred from the member to the + * pools account and immediately increases the pools bond. + * + * # Note + * + * * An account can only be a member of a single pool. + * * An account cannot join the same pool multiple times. + * * This call will *not* dust the member account, so the member must have at least + * `existential deposit + amount` in their account. + * * Only a pool with [`PoolState::Open`] can be joined + */ +export interface NominationPoolsCall_join { + __kind: 'join' + amount: bigint + poolId: number +} + +export interface NominationPoolsCall_nominate { + __kind: 'nominate' + poolId: number + validators: AccountId32[] +} + +/** + * Call `withdraw_unbonded` for the pools account. This call can be made by any account. + * + * This is useful if their are too many unlocking chunks to call `unbond`, and some + * can be cleared by withdrawing. In the case there are too many unlocking chunks, the user + * would probably see an error like `NoMoreChunks` emitted from the staking system when + * they attempt to unbond. + */ +export interface NominationPoolsCall_pool_withdraw_unbonded { + __kind: 'pool_withdraw_unbonded' + poolId: number + numSlashingSpans: number +} + +/** + * Update configurations for the nomination pools. The origin for this call must be + * Root. + * + * # Arguments + * + * * `min_join_bond` - Set [`MinJoinBond`]. + * * `min_create_bond` - Set [`MinCreateBond`]. + * * `max_pools` - Set [`MaxPools`]. + * * `max_members` - Set [`MaxPoolMembers`]. + * * `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]. + */ +export interface NominationPoolsCall_set_configs { + __kind: 'set_configs' + minJoinBond: Type_485 + minCreateBond: Type_485 + maxPools: Type_486 + maxMembers: Type_486 + maxMembersPerPool: Type_486 +} + +export interface NominationPoolsCall_set_metadata { + __kind: 'set_metadata' + poolId: number + metadata: Bytes +} + +export interface NominationPoolsCall_set_state { + __kind: 'set_state' + poolId: number + state: PoolState +} + +/** + * Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It + * implicitly collects the rewards one last time, since not doing so would mean some + * rewards would go forfeited. + * + * Under certain conditions, this call can be dispatched permissionlessly (i.e. by any + * account). + * + * # Conditions for a permissionless dispatch. + * + * * The pool is blocked and the caller is either the root or state-toggler. This is + * refereed to as a kick. + * * The pool is destroying and the member is not the depositor. + * * The pool is destroying, the member is the depositor and no other members are in the + * pool. + * + * ## Conditions for permissioned dispatch (i.e. the caller is also the + * `member_account`): + * + * * The caller is not the depositor. + * * The caller is the depositor, the pool is destroying and no other members are in the + * pool. + * + * # Note + * + * If there are too many unlocking chunks to unbond with the pool account, + * [`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks. If + * there are too many unlocking chunks, the result of this call will likely be the + * `NoMoreChunks` error from the staking system. + */ +export interface NominationPoolsCall_unbond { + __kind: 'unbond' + memberAccount: AccountId32 + unbondingPoints: bigint +} + +/** + * Update the roles of the pool. + * + * The root is the only entity that can change any of the roles, including itself, + * excluding the depositor, who can never change. + * + * It emits an event, notifying UIs of the role change. This event is quite relevant to + * most pool members and they should be informed of changes to pool roles. + */ +export interface NominationPoolsCall_update_roles { + __kind: 'update_roles' + poolId: number + newRoot: Type_487 + newNominator: Type_487 + newStateToggler: Type_487 +} + +/** + * Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an + * error is returned. + * + * Under certain conditions, this call can be dispatched permissionlessly (i.e. by any + * account). + * + * # Conditions for a permissionless dispatch + * + * * The pool is in destroy mode and the target is not the depositor. + * * The target is the depositor and they are the only member in the sub pools. + * * The pool is blocked and the caller is either the root or state-toggler. + * + * # Conditions for permissioned dispatch + * + * * The caller is the target and they are not the depositor. + * + * # Note + * + * If the target is the depositor, the pool will be destroyed. + */ +export interface NominationPoolsCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + memberAccount: AccountId32 + numSlashingSpans: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: sts.bigint(), + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + call: sts.bytes(), + storeCall: sts.boolean(), + maxWeight: sts.bigint(), + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId32), + call: Call, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: sts.number(), + index: sts.number(), + } +}) + +export interface Timepoint { + height: number + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: bigint +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + call: Bytes + storeCall: boolean + maxWeight: bigint +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId32[] + call: Call +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId32[] + timepoint: Timepoint + callHash: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const InitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type InitializerCall = InitializerCall_force_approve + +/** + * Issue a signal to the consensus engine to forcibly act as though all parachain + * blocks in all relay chain blocks up to and including the given number in the current + * chain are valid and should be finalized. + */ +export interface InitializerCall_force_approve { + __kind: 'force_approve' + upTo: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: sts.number(), + }), + force_transfer: sts.enumStruct({ + new: AccountId32, + index: sts.number(), + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: sts.number(), + }), + freeze: sts.enumStruct({ + index: sts.number(), + }), + transfer: sts.enumStruct({ + new: AccountId32, + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: number +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId32 + index: number + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: number +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the + * deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: number +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: sts.bytes(), + }), + } +}) + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: sts.number(), + networkState: OpaqueNetworkState, + sessionIndex: sts.number(), + authorityIndex: sts.number(), + validatorsLen: sts.number(), + } +}) + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export interface Heartbeat { + blockNumber: number + networkState: OpaqueNetworkState + sessionIndex: number + authorityIndex: number + validatorsLen: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is + * length of `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Bytes +} + +/** + * Identity pallet declaration. + */ +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId32, + }), + add_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: sts.number(), + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: MultiAddress, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: MultiAddress, + judgement: Judgement, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: MultiAddress, + }), + rename_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId32, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: BitFlags, + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId32, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => sts.tuple(() => [Data, Data])), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => sts.bytes()), + image: Data, + twitter: Data, + } +}) + +export interface IdentityInfo { + additional: [Data, Data][] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (Bytes | undefined) + image: Data + twitter: Data +} + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: Bytes +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: Bytes +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: Bytes +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: Bytes +} + +export const BitFlags = sts.bigint() + +export const Judgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: sts.bigint(), + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export type Judgement = Judgement_Erroneous | Judgement_FeePaid | Judgement_KnownGood | Judgement_LowQuality | Judgement_OutOfDate | Judgement_Reasonable | Judgement_Unknown + +export interface Judgement_Erroneous { + __kind: 'Erroneous' +} + +export interface Judgement_FeePaid { + __kind: 'FeePaid' + value: bigint +} + +export interface Judgement_KnownGood { + __kind: 'KnownGood' +} + +export interface Judgement_LowQuality { + __kind: 'LowQuality' +} + +export interface Judgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface Judgement_Reasonable { + __kind: 'Reasonable' +} + +export interface Judgement_Unknown { + __kind: 'Unknown' +} + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: sts.bytes(), + Keccak256: sts.bytes(), + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: sts.bytes(), + ShaThree256: sts.bytes(), + } +}) + +/** + * Identity pallet declaration. + */ +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId32 +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: MultiAddress + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: number +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: MultiAddress +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: MultiAddress + judgement: Judgement +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: MultiAddress +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: MultiAddress + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId32 +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: BitFlags +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId32, Data][] +} + +export type BitFlags = bigint + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const HrmpCall: sts.Type = sts.closedEnum(() => { + return { + force_clean_hrmp: sts.enumStruct({ + para: Id, + inbound: sts.number(), + outbound: sts.number(), + }), + force_process_hrmp_close: sts.enumStruct({ + channels: sts.number(), + }), + force_process_hrmp_open: sts.enumStruct({ + channels: sts.number(), + }), + hrmp_accept_open_channel: sts.enumStruct({ + sender: Id, + }), + hrmp_cancel_open_request: sts.enumStruct({ + channelId: HrmpChannelId, + openRequests: sts.number(), + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: Id, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: Id, + recipient: Id, + } +}) + +export interface HrmpChannelId { + sender: Id + recipient: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type HrmpCall = HrmpCall_force_clean_hrmp | HrmpCall_force_process_hrmp_close | HrmpCall_force_process_hrmp_open | HrmpCall_hrmp_accept_open_channel | HrmpCall_hrmp_cancel_open_request | HrmpCall_hrmp_close_channel | HrmpCall_hrmp_init_open_channel + +/** + * This extrinsic triggers the cleanup of all the HRMP storage items that + * a para may have. Normally this happens once per session, but this allows + * you to trigger the cleanup immediately for a specific parachain. + * + * Origin must be Root. + * + * Number of inbound and outbound channels for `para` must be provided as witness data of weighing. + */ +export interface HrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: Id + inbound: number + outbound: number +} + +/** + * Force process HRMP close channel requests. + * + * If there are pending HRMP close channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of closing channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' + channels: number +} + +/** + * Force process HRMP open channel requests. + * + * If there are pending HRMP open channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of opening channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' + channels: number +} + +/** + * Accept a pending open channel request from the given sender. + * + * The channel will be opened only on the next session boundary. + */ +export interface HrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: Id +} + +/** + * This cancels a pending open channel request. It can be canceled by either of the sender + * or the recipient for that request. The origin must be either of those. + * + * The cancellation happens immediately. It is not possible to cancel the request if it is + * already accepted. + * + * Total number of open requests (i.e. `HrmpOpenChannelRequestsList`) must be provided as + * witness data. + */ +export interface HrmpCall_hrmp_cancel_open_request { + __kind: 'hrmp_cancel_open_request' + channelId: HrmpChannelId + openRequests: number +} + +/** + * Initiate unilateral closing of a channel. The origin must be either the sender or the + * recipient in the channel being closed. + * + * The closure can only happen on a session change. + */ +export interface HrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * Initiate opening a channel from a parachain to a given recipient with given channel + * parameters. + * + * - `proposed_max_capacity` - specifies how many messages can be in the channel at once. + * - `proposed_max_message_size` - specifies the maximum size of the messages. + * + * These numbers are a subject to the relay-chain configuration limits. + * + * The channel can be opened only after the recipient confirms it and only on a session + * change. + */ +export interface HrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: Id + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: sts.number(), + bestFinalizedBlockNumber: sts.number(), + }), + report_equivocation: sts.enumStruct({ + equivocationProof: Type_271, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_271, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: sts.number(), + trieNodes: sts.array(() => sts.bytes()), + validatorCount: sts.number(), + } +}) + +export interface MembershipProof { + session: number + trieNodes: Bytes[] + validatorCount: number +} + +export const Type_271: sts.Type = sts.struct(() => { + return { + setId: sts.bigint(), + equivocation: Equivocation, + } +}) + +export const Equivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: Type_278, + Prevote: Type_273, + } +}) + +export const Type_273: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Prevote, sts.bytes()]), + second: sts.tuple(() => [Prevote, sts.bytes()]), + } +}) + +export const Prevote: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Prevote { + targetHash: H256 + targetNumber: number +} + +export interface Type_273 { + roundNumber: bigint + identity: Public + first: [Prevote, Bytes] + second: [Prevote, Bytes] +} + +export const Type_278: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Precommit, sts.bytes()]), + second: sts.tuple(() => [Precommit, sts.bytes()]), + } +}) + +export const Precommit: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Precommit { + targetHash: H256 + targetNumber: number +} + +export interface Type_278 { + roundNumber: bigint + identity: Public + first: [Precommit, Bytes] + second: [Precommit, Bytes] +} + +export type Equivocation = Equivocation_Precommit | Equivocation_Prevote + +export interface Equivocation_Precommit { + __kind: 'Precommit' + value: Type_278 +} + +export interface Equivocation_Prevote { + __kind: 'Prevote' + value: Type_273 +} + +export interface Type_271 { + setId: bigint + equivocation: Equivocation +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has + * stalled. This will trigger a forced authority set change at the beginning + * of the next session, to be enacted `delay` blocks after that. The delay + * should be high enough to safely assume that the block signalling the + * forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters + * will start the new authority set using the given finalized block as base. + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: number + bestFinalizedBlockNumber: number +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_271 + keyOwnerProof: MembershipProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_271 + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GiltCall: sts.Type = sts.closedEnum(() => { + return { + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + set_target: sts.enumStruct({ + target: sts.bigint(), + }), + thaw: sts.enumStruct({ + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GiltCall = GiltCall_place_bid | GiltCall_retract_bid | GiltCall_set_target | GiltCall_thaw + +/** + * Place a bid for a gilt to be issued. + * + * Origin must be Signed, and account must have at least `amount` in free balance. + * + * - `amount`: The amount of the bid; these funds will be reserved. If the bid is + * successfully elevated into an issued gilt, then these funds will continue to be + * reserved until the gilt expires. Must be at least `MinFreeze`. + * - `duration`: The number of periods for which the funds will be locked if the gilt is + * issued. It will expire only after this period has elapsed after the point of issuance. + * Must be greater than 1 and no more than `QueueCount`. + * + * Complexities: + * - `Queues[duration].len()` (just take max). + */ +export interface GiltCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * Retract a previously placed bid. + * + * Origin must be Signed, and the account should have previously issued a still-active bid + * of `amount` for `duration`. + * + * - `amount`: The amount of the previous bid. + * - `duration`: The duration of the previous bid. + */ +export interface GiltCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * Set target proportion of gilt-funds. + * + * Origin must be `AdminOrigin`. + * + * - `target`: The target proportion of effective issued funds that should be under gilts + * at any one time. + */ +export interface GiltCall_set_target { + __kind: 'set_target' + target: bigint +} + +/** + * Remove an active but expired gilt. Reserved funds under gilt are freed and balance is + * adjusted to ensure that the funds grow or shrink to maintain the equivalent proportion + * of effective total issued funds. + * + * Origin must be Signed and the account must be the owner of the gilt of the given index. + * + * - `index`: The index of the gilt to be thawed. + */ +export interface GiltCall_thaw { + __kind: 'thaw' + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + governance_fallback: sts.enumStruct({ + maybeMaxVoters: sts.option(() => sts.number()), + maybeMaxTargets: sts.option(() => sts.number()), + }), + set_emergency_election_result: sts.enumStruct({ + supports: sts.array(() => sts.tuple(() => [AccountId32, Support])), + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => ElectionScore), + }), + submit: sts.enumStruct({ + rawSolution: RawSolution, + }), + submit_unsigned: sts.enumStruct({ + rawSolution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export const RawSolution: sts.Type = sts.struct(() => { + return { + solution: NposCompactSolution24, + score: ElectionScore, + round: sts.number(), + } +}) + +export const NposCompactSolution24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), + votes2: sts.array(() => sts.tuple(() => [sts.number(), sts.tuple(() => [sts.number(), sts.number()]), sts.number()])), + votes3: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes4: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes5: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes6: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes7: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes8: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes9: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes10: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes11: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes12: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes13: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes14: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes15: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes16: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes17: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes18: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes19: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes20: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes21: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes22: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes23: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes24: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + } +}) + +export interface NposCompactSolution24 { + votes1: [number, number][] + votes2: [number, [number, number], number][] + votes3: [number, [number, number][], number][] + votes4: [number, [number, number][], number][] + votes5: [number, [number, number][], number][] + votes6: [number, [number, number][], number][] + votes7: [number, [number, number][], number][] + votes8: [number, [number, number][], number][] + votes9: [number, [number, number][], number][] + votes10: [number, [number, number][], number][] + votes11: [number, [number, number][], number][] + votes12: [number, [number, number][], number][] + votes13: [number, [number, number][], number][] + votes14: [number, [number, number][], number][] + votes15: [number, [number, number][], number][] + votes16: [number, [number, number][], number][] + votes17: [number, [number, number][], number][] + votes18: [number, [number, number][], number][] + votes19: [number, [number, number][], number][] + votes20: [number, [number, number][], number][] + votes21: [number, [number, number][], number][] + votes22: [number, [number, number][], number][] + votes23: [number, [number, number][], number][] + votes24: [number, [number, number][], number][] +} + +export interface RawSolution { + solution: NposCompactSolution24 + score: ElectionScore + round: number +} + +export interface ElectionScore { + minimalStake: bigint + sumStake: bigint + sumStakeSquared: bigint +} + +export const ElectionScore: sts.Type = sts.struct(() => { + return { + minimalStake: sts.bigint(), + sumStake: sts.bigint(), + sumStakeSquared: sts.bigint(), + } +}) + +export const Support: sts.Type = sts.struct(() => { + return { + total: sts.bigint(), + voters: sts.array(() => sts.tuple(() => [AccountId32, sts.bigint()])), + } +}) + +export interface Support { + total: bigint + voters: [AccountId32, bigint][] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_governance_fallback | ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * Trigger the governance fallback. + * + * This can only be called when [`Phase::Emergency`] is enabled, as an alternative to + * calling [`Call::set_emergency_election_result`]. + */ +export interface ElectionProviderMultiPhaseCall_governance_fallback { + __kind: 'governance_fallback' + maybeMaxVoters?: (number | undefined) + maybeMaxTargets?: (number | undefined) +} + +/** + * Set a solution in the queue, to be handed out to the client of this pallet in the next + * call to `ElectionProvider::elect`. + * + * This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`. + * + * The solution is not checked for any feasibility and is assumed to be trustworthy, as any + * feasibility check itself can in principle cause the election process to fail (due to + * memory/weight constrains). + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + supports: [AccountId32, Support][] +} + +/** + * Set a new value for `MinimumUntrustedScore`. + * + * Dispatch origin must be aligned with `T::ForceOrigin`. + * + * This check can be turned off by setting the value to `None`. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (ElectionScore | undefined) +} + +/** + * Submit a solution for the signed phase. + * + * The dispatch origin fo this call must be __signed__. + * + * The solution is potentially queued, based on the claimed score and processed at the end + * of the signed phase. + * + * A deposit is reserved and recorded for the solution. Based on the outcome, the solution + * might be rewarded, slashed, or get all or a part of the deposit back. + */ +export interface ElectionProviderMultiPhaseCall_submit { + __kind: 'submit' + rawSolution: RawSolution +} + +/** + * Submit a solution for the unsigned phase. + * + * The dispatch origin fo this call must be __none__. + * + * This submission is checked on the fly. Moreover, this unsigned solution is only + * validated when submitted to the pool from the **local** node. Effectively, this means + * that only active validators can submit this transaction when authoring a block (similar + * to an inherent). + * + * To prevent any incorrect solution (and thus wasted time/weight), this transaction will + * panic if the solution submitted by the validator is invalid in any way, effectively + * putting their authoring reward at risk. + * + * No deposit or reward is associated with this submission. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + rawSolution: RawSolution + witness: SolutionOrSnapshotSize +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DmpCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + blacklist: sts.enumStruct({ + proposalHash: H256, + maybeRefIndex: sts.option(() => sts.number()), + }), + cancel_proposal: sts.enumStruct({ + propIndex: sts.number(), + }), + cancel_queued: sts.enumStruct({ + which: sts.number(), + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId32, + conviction: Conviction, + balance: sts.bigint(), + }), + emergency_cancel: sts.enumStruct({ + refIndex: sts.number(), + }), + enact_proposal: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + }), + external_propose: sts.enumStruct({ + proposalHash: H256, + }), + external_propose_default: sts.enumStruct({ + proposalHash: H256, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: H256, + }), + fast_track: sts.enumStruct({ + proposalHash: H256, + votingPeriod: sts.number(), + delay: sts.number(), + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: H256, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: H256, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId32, + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + index: sts.number(), + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId32, + }), + veto_external: sts.enumStruct({ + proposalHash: H256, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface AccountVote_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DemocracyCall = DemocracyCall_blacklist | DemocracyCall_cancel_proposal | DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. + * + * If called on a queued public or external proposal, then this will result in it being + * removed. If the `ref_index` supplied is an active referendum with the proposal hash, + * then it will be cancelled. + * + * The dispatch origin of this call must be `BlacklistOrigin`. + * + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. + * + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). + */ +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: H256 + maybeRefIndex?: (number | undefined) +} + +/** + * Remove a proposal. + * + * The dispatch origin of this call must be `CancelProposalOrigin`. + * + * - `prop_index`: The index of the proposal to cancel. + * + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number +} + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: number +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must not + * be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId32 + conviction: Conviction + balance: bigint +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: number +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: H256 + index: number +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Weight: `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: H256 +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: H256 +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: H256 +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * `FastTrackVotingPeriod` if too low. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: H256 + votingPeriod: number + delay: number +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. When this call is successful, i.e. + * the preimage has not been uploaded before and matches some imminent proposal, + * no fee is paid. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * Weight: `O(p)` + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: H256 + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. Extrinsic is + * weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * Weight: `O(D)` where D is length of proposal. + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: H256 + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId32 + index: number +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: number +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * Weight: `O(S)` where S is the number of seconds a proposal already has. + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId32 +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * Weight: `O(V + log(V))` where V is number of `existing vetoers` + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: H256 +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of referendums the voter has voted on. + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: Id, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + contribute_all: sts.enumStruct({ + index: sts.number(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: Id, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId32, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: Signature, + } +}) + +export const Signature = sts.bytes() + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Signature +} + +export type Signature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_contribute_all | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * Add an optional memo to an existing crowdloan contribution. + * + * Origin must be Signed, and the user must have contributed to the crowdloan. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: Id + memo: Bytes +} + +/** + * Contribute to a crowd sale. This will transfer some balance over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * Contribute your entire balance to a crowd sale. This will transfer the entire balance of a user over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute_all { + __kind: 'contribute_all' + index: number + signature?: (MultiSignature | undefined) +} + +/** + * Create a new crowdloaning campaign for a parachain slot with the given lease period range. + * + * This applies a lock to your parachain configuration, ensuring that it cannot be changed + * by the parachain manager. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Remove a fund after the retirement period has ended and all funds have been returned. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * Edit the configuration for an in-progress crowdloan. + * + * Can only be called by Root origin. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Poke the fund into `NewRaise` + * + * Origin must be Signed, and the fund has non-zero raise. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: Id +} + +/** + * Automatically refund contributors of an ended crowdloan. + * Due to weight restrictions, this function may need to be called multiple + * times to fully refund all users. We will refund `RemoveKeysLimit` users at a time. + * + * Origin must be signed, but can come from anyone. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * Withdraw full balance of a specific contributor. + * + * Origin must be signed, but can come from anyone. + * + * The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement + * flag must be set. For a fund to be ready for retirement, then: + * - it must not already be in retirement; + * - the amount of raised funds must be bigger than the _free_ balance of the account; + * - and either: + * - the block number must be at least `end`; or + * - the current lease period must be greater than the fund's `last_period`. + * + * In this case, the fund's retirement flag is set and its `end` is reset to the current block + * number. + * + * - `who`: The account whose contribution should be withdrawn. + * - `index`: The parachain to whose crowdloan the contribution was made. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_bypass_consistency_check: sts.enumStruct({ + new: sts.boolean(), + }), + set_chain_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_code_retention_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_conclusion_by_time_out_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_max_spam_slots: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: sts.number(), + }), + set_group_rotation_frequency: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_minimum_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_cores: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_retries: sts.enumStruct({ + new: sts.number(), + }), + set_pvf_checking_enabled: sts.enumStruct({ + new: sts.boolean(), + }), + set_pvf_voting_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_thread_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_ump_max_individual_weight: sts.enumStruct({ + new: sts.bigint(), + }), + set_ump_service_total_weight: sts.enumStruct({ + new: sts.bigint(), + }), + set_validation_upgrade_cooldown: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ConfigurationCall = ConfigurationCall_set_bypass_consistency_check | ConfigurationCall_set_chain_availability_period | ConfigurationCall_set_code_retention_period | ConfigurationCall_set_dispute_conclusion_by_time_out_period | ConfigurationCall_set_dispute_max_spam_slots | ConfigurationCall_set_dispute_period | ConfigurationCall_set_dispute_post_conclusion_acceptance_period | ConfigurationCall_set_group_rotation_frequency | ConfigurationCall_set_hrmp_channel_max_capacity | ConfigurationCall_set_hrmp_channel_max_message_size | ConfigurationCall_set_hrmp_channel_max_total_size | ConfigurationCall_set_hrmp_max_message_num_per_candidate | ConfigurationCall_set_hrmp_max_parachain_inbound_channels | ConfigurationCall_set_hrmp_max_parachain_outbound_channels | ConfigurationCall_set_hrmp_max_parathread_inbound_channels | ConfigurationCall_set_hrmp_max_parathread_outbound_channels | ConfigurationCall_set_hrmp_open_request_ttl | ConfigurationCall_set_hrmp_recipient_deposit | ConfigurationCall_set_hrmp_sender_deposit | ConfigurationCall_set_max_code_size | ConfigurationCall_set_max_downward_message_size | ConfigurationCall_set_max_head_data_size | ConfigurationCall_set_max_pov_size | ConfigurationCall_set_max_upward_message_num_per_candidate | ConfigurationCall_set_max_upward_message_size | ConfigurationCall_set_max_upward_queue_count | ConfigurationCall_set_max_upward_queue_size | ConfigurationCall_set_max_validators | ConfigurationCall_set_max_validators_per_core | ConfigurationCall_set_minimum_validation_upgrade_delay | ConfigurationCall_set_n_delay_tranches | ConfigurationCall_set_needed_approvals | ConfigurationCall_set_no_show_slots | ConfigurationCall_set_parathread_cores | ConfigurationCall_set_parathread_retries | ConfigurationCall_set_pvf_checking_enabled | ConfigurationCall_set_pvf_voting_ttl | ConfigurationCall_set_relay_vrf_modulo_samples | ConfigurationCall_set_scheduling_lookahead | ConfigurationCall_set_thread_availability_period | ConfigurationCall_set_ump_max_individual_weight | ConfigurationCall_set_ump_service_total_weight | ConfigurationCall_set_validation_upgrade_cooldown | ConfigurationCall_set_validation_upgrade_delay | ConfigurationCall_set_zeroth_delay_tranche_width + +/** + * Setting this to true will disable consistency checks for the configuration setters. + * Use with caution. + */ +export interface ConfigurationCall_set_bypass_consistency_check { + __kind: 'set_bypass_consistency_check' + new: boolean +} + +/** + * Set the availability period for parachains. + */ +export interface ConfigurationCall_set_chain_availability_period { + __kind: 'set_chain_availability_period' + new: number +} + +/** + * Set the acceptance period for an included candidate. + */ +export interface ConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: number +} + +/** + * Set the dispute conclusion by time out period. + */ +export interface ConfigurationCall_set_dispute_conclusion_by_time_out_period { + __kind: 'set_dispute_conclusion_by_time_out_period' + new: number +} + +/** + * Set the maximum number of dispute spam slots. + */ +export interface ConfigurationCall_set_dispute_max_spam_slots { + __kind: 'set_dispute_max_spam_slots' + new: number +} + +/** + * Set the dispute period, in number of sessions to keep for disputes. + */ +export interface ConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: number +} + +/** + * Set the dispute post conclusion acceptance period. + */ +export interface ConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: number +} + +/** + * Set the parachain validator-group rotation frequency + */ +export interface ConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: number +} + +/** + * Sets the maximum number of messages allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * Sets the maximum size of a message that could ever be put into an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * Sets the maximum total size of messages in bytes allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * Sets the maximum number of outbound HRMP messages can be sent by a candidate. + */ +export interface ConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parachain is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parachain is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parathread is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_inbound_channels { + __kind: 'set_hrmp_max_parathread_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parathread is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_outbound_channels { + __kind: 'set_hrmp_max_parathread_outbound_channels' + new: number +} + +/** + * Sets the number of sessions after which an HRMP open channel request expires. + */ +export interface ConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * Sets the amount of funds that the recipient should provide for accepting opening an HRMP + * channel. + */ +export interface ConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: bigint +} + +/** + * Sets the amount of funds that the sender should provide for opening an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: bigint +} + +/** + * Set the max validation code size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * Set the critical downward message size. + */ +export interface ConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * Set the max head data size for paras. + */ +export interface ConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * Set the max POV block size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * Sets the maximum number of messages that a candidate can contain. + */ +export interface ConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum size of an upward message that can be sent by a candidate. + */ +export interface ConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * Sets the maximum items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * Sets the maximum total size of items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * Set the maximum number of validators to use in parachain consensus. + */ +export interface ConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * Set the maximum number of validators to assign to any core. + */ +export interface ConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * Sets the minimum delay between announcing the upgrade block for a parachain until the + * upgrade taking place. + * + * See the field documentation for information and constraints for the new value. + */ +export interface ConfigurationCall_set_minimum_validation_upgrade_delay { + __kind: 'set_minimum_validation_upgrade_delay' + new: number +} + +/** + * Set the total number of delay tranches. + */ +export interface ConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * Set the number of validators needed to approve a block. + */ +export interface ConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * Set the no show slots, in number of number of consensus slots. + * Must be at least 1. + */ +export interface ConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * Set the number of parathread execution cores. + */ +export interface ConfigurationCall_set_parathread_cores { + __kind: 'set_parathread_cores' + new: number +} + +/** + * Set the number of retries for a particular parathread. + */ +export interface ConfigurationCall_set_parathread_retries { + __kind: 'set_parathread_retries' + new: number +} + +/** + * Enable or disable PVF pre-checking. Consult the field documentation prior executing. + */ +export interface ConfigurationCall_set_pvf_checking_enabled { + __kind: 'set_pvf_checking_enabled' + new: boolean +} + +/** + * Set the number of session changes after which a PVF pre-checking voting is rejected. + */ +export interface ConfigurationCall_set_pvf_voting_ttl { + __kind: 'set_pvf_voting_ttl' + new: number +} + +/** + * Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion. + */ +export interface ConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * Set the scheduling lookahead, in expected number of blocks at peak throughput. + */ +export interface ConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * Set the availability period for parathreads. + */ +export interface ConfigurationCall_set_thread_availability_period { + __kind: 'set_thread_availability_period' + new: number +} + +/** + * Sets the maximum amount of weight any individual upward message may consume. + */ +export interface ConfigurationCall_set_ump_max_individual_weight { + __kind: 'set_ump_max_individual_weight' + new: bigint +} + +/** + * Sets the soft limit for the phase of dispatching dispatchable upward messages. + */ +export interface ConfigurationCall_set_ump_service_total_weight { + __kind: 'set_ump_service_total_weight' + new: bigint +} + +/** + * Set the validation upgrade cooldown. + */ +export interface ConfigurationCall_set_validation_upgrade_cooldown { + __kind: 'set_validation_upgrade_cooldown' + new: number +} + +/** + * Set the validation upgrade delay. + */ +export interface ConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: number +} + +/** + * Set the zeroth delay tranche width. + */ +export interface ConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: sts.bigint(), + vestingSchedule: sts.option(() => sts.tuple(() => [sts.bigint(), sts.bigint(), sts.number()])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId32), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId32 + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId32 + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: bigint + vestingSchedule?: ([bigint, bigint, number] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId32 | undefined) +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ChildBountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + add_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + value: sts.bigint(), + description: sts.bytes(), + }), + award_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + close_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + propose_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ChildBountiesCall = ChildBountiesCall_accept_curator | ChildBountiesCall_add_child_bounty | ChildBountiesCall_award_child_bounty | ChildBountiesCall_claim_child_bounty | ChildBountiesCall_close_child_bounty | ChildBountiesCall_propose_curator | ChildBountiesCall_unassign_curator + +/** + * Accept the curator role for the child-bounty. + * + * The dispatch origin for this call must be the curator of this + * child-bounty. + * + * A deposit will be reserved from the curator and refund upon + * successful payout or cancellation. + * + * Fee for curator is deducted from curator fee of parent bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in "CuratorProposed" state, for processing the + * call. And state of child-bounty is moved to "Active" on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_accept_curator { + __kind: 'accept_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Add a new child-bounty. + * + * The dispatch origin for this call must be the curator of parent + * bounty and the parent bounty must be in "active" state. + * + * Child-bounty gets added successfully & fund gets transferred from + * parent bounty to child-bounty account, if parent bounty has enough + * funds, else the call fails. + * + * Upper bound to maximum number of active child bounties that can be + * added are managed via runtime trait config + * [`Config::MaxActiveChildBountyCount`]. + * + * If the call is success, the status of child-bounty is updated to + * "Added". + * + * - `parent_bounty_id`: Index of parent bounty for which child-bounty is being added. + * - `value`: Value for executing the proposal. + * - `description`: Text description for the child-bounty. + */ +export interface ChildBountiesCall_add_child_bounty { + __kind: 'add_child_bounty' + parentBountyId: number + value: bigint + description: Bytes +} + +/** + * Award child-bounty to a beneficiary. + * + * The beneficiary will be able to claim the funds after a delay. + * + * The dispatch origin for this call must be the parent curator or + * curator of this child-bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in active state, for processing the call. And + * state of child-bounty is moved to "PendingPayout" on successful call + * completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + * - `beneficiary`: Beneficiary account. + */ +export interface ChildBountiesCall_award_child_bounty { + __kind: 'award_child_bounty' + parentBountyId: number + childBountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded child-bounty after payout delay. + * + * The dispatch origin for this call may be any signed origin. + * + * Call works independent of parent bounty state, No need for parent + * bounty to be in active state. + * + * The Beneficiary is paid out with agreed bounty value. Curator fee is + * paid & curator deposit is unreserved. + * + * Child-bounty must be in "PendingPayout" state, for processing the + * call. And instance of child-bounty is removed from the state on + * successful call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_claim_child_bounty { + __kind: 'claim_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * Cancel a proposed or active child-bounty. Child-bounty account funds + * are transferred to parent bounty account. The child-bounty curator + * deposit may be unreserved if possible. + * + * The dispatch origin for this call must be either parent curator or + * `T::RejectOrigin`. + * + * If the state of child-bounty is `Active`, curator deposit is + * unreserved. + * + * If the state of child-bounty is `PendingPayout`, call fails & + * returns `PendingPayout` error. + * + * For the origin other than T::RejectOrigin, parent bounty must be in + * active state, for this child-bounty call to work. For origin + * T::RejectOrigin execution is forced. + * + * Instance of child-bounty is removed from the state on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_close_child_bounty { + __kind: 'close_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * Propose curator for funded child-bounty. + * + * The dispatch origin for this call must be curator of parent bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in "Added" state, for processing the call. And + * state of child-bounty is moved to "CuratorProposed" on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + * - `curator`: Address of child-bounty curator. + * - `fee`: payment fee to child-bounty curator for execution. + */ +export interface ChildBountiesCall_propose_curator { + __kind: 'propose_curator' + parentBountyId: number + childBountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a child-bounty. + * + * The dispatch origin for this call can be either `RejectOrigin`, or + * the curator of the parent bounty, or any signed origin. + * + * For the origin other than T::RejectOrigin and the child-bounty + * curator, parent bounty must be in active state, for this call to + * work. We allow child-bounty curator and T::RejectOrigin to execute + * this call irrespective of the parent bounty state. + * + * If this function is called by the `RejectOrigin` or the + * parent bounty curator, we assume that the child-bounty curator is + * malicious or inactive. As a result, child-bounty curator deposit is + * slashed. + * + * If the origin is the child-bounty curator, we take this as a sign + * that they are unable to do their job, and are willingly giving up. + * We could slash the deposit, but for now we allow them to unreserve + * their deposit and exit without issue. (We may want to change this if + * it is abused.) + * + * Finally, the origin can be anyone iff the child-bounty curator is + * "inactive". Expiry update due of parent bounty is used to estimate + * inactive state of child-bounty curator. + * + * This allows anyone in the community to call out that a child-bounty + * curator is not doing their due diligence, and we should pick a new + * one. In this case the child-bounty curator deposit is slashed. + * + * State of child-bounty is moved to Added state on successful call + * completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_unassign_curator { + __kind: 'unassign_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds + * after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is + * malicious or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_force_unreserve | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_all | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is not + * assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * Unreserve some balance from a user by force. + * + * Can only be called by ROOT. + */ +export interface BalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also alter the total issuance of the system (`TotalIssuance`) appropriately. + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: MultiAddress + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for input config + * types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex + * computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional check + * that the transfer will not kill the origin account. + * --------------------------------- + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: MultiAddress + value: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). # + * - O(1). Just like transfer, but reading the user's transferable balance first. + * # + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const EquivocationProof: sts.Type = sts.struct(() => { + return { + offender: sts.bytes(), + slot: Slot, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Slot = sts.bigint() + +export interface EquivocationProof { + offender: Bytes + slot: Slot + firstHeader: Header + secondHeader: Header +} + +export type Slot = bigint + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V1: sts.enumStruct({ + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + }), + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type NextConfigDescriptor = NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Plan an epoch config change. The epoch config change is recorded and will be enacted on + * the next call to `enact_epoch_change`. The config will be activated one epoch after. + * Multiple calls to this method will replace any existing planned config change that had + * not been enacted yet. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Cancel an in-progress auction. + * + * Can only be called by Root origin. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +export type Call = Call_Auctions | Call_Authorship | Call_Babe | Call_Balances | Call_Bounties | Call_ChildBounties | Call_Claims | Call_Configuration | Call_Council | Call_Crowdloan | Call_Democracy | Call_Dmp | Call_ElectionProviderMultiPhase | Call_Gilt | Call_Grandpa | Call_Hrmp | Call_Identity | Call_ImOnline | Call_Indices | Call_Initializer | Call_Multisig | Call_NominationPools | Call_ParaInclusion | Call_ParaInherent | Call_Paras | Call_ParasDisputes | Call_ParasShared | Call_PhragmenElection | Call_Preimage | Call_Proxy | Call_Recovery | Call_Registrar | Call_Scheduler | Call_Session | Call_Slots | Call_Society | Call_Staking | Call_System | Call_TechnicalCommittee | Call_TechnicalMembership | Call_Timestamp | Call_Tips | Call_Treasury | Call_Ump | Call_Utility | Call_Vesting | Call_VoterList | Call_XcmPallet + +export interface Call_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Call_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Call_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Call_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Call_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Call_ChildBounties { + __kind: 'ChildBounties' + value: ChildBountiesCall +} + +export interface Call_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Call_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Call_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Call_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Call_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Call_Dmp { + __kind: 'Dmp' + value: DmpCall +} + +export interface Call_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Call_Gilt { + __kind: 'Gilt' + value: GiltCall +} + +export interface Call_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Call_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Call_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Call_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Call_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Call_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Call_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Call_NominationPools { + __kind: 'NominationPools' + value: NominationPoolsCall +} + +export interface Call_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Call_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Call_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Call_ParasDisputes { + __kind: 'ParasDisputes' + value: ParasDisputesCall +} + +export interface Call_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Call_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Call_Preimage { + __kind: 'Preimage' + value: PreimageCall +} + +export interface Call_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Call_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Call_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Call_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Call_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Call_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Call_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Call_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Call_System { + __kind: 'System' + value: SystemCall +} + +export interface Call_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Call_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Call_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Call_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Call_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Call_Ump { + __kind: 'Ump' + value: UmpCall +} + +export interface Call_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Call_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Call_VoterList { + __kind: 'VoterList' + value: VoterListCall +} + +export interface Call_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Society: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId32 = sts.bytes() diff --git a/squid/src/types/v9250.ts b/squid/src/types/v9250.ts new file mode 100644 index 00000000..83eadd8c --- /dev/null +++ b/squid/src/types/v9250.ts @@ -0,0 +1,12163 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Call: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + ChildBounties: ChildBountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + Dmp: DmpCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + Gilt: GiltCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Initializer: InitializerCall, + Multisig: MultisigCall, + NominationPools: NominationPoolsCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Paras: ParasCall, + ParasDisputes: ParasDisputesCall, + ParasShared: ParasSharedCall, + PhragmenElection: PhragmenElectionCall, + Preimage: PreimageCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Ump: UmpCall, + Utility: UtilityCall, + Vesting: VestingCall, + VoterList: VoterListCall, + XcmPallet: XcmPalletCall, + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + execute: sts.enumStruct({ + message: Type_548, + maxWeight: sts.bigint(), + }), + force_default_xcm_version: sts.enumStruct({ + maybeXcmVersion: sts.option(() => sts.number()), + }), + force_subscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_unsubscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_xcm_version: sts.enumStruct({ + location: V1MultiLocation, + xcmVersion: sts.number(), + }), + limited_reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + limited_teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + send: sts.enumStruct({ + dest: VersionedMultiLocation, + message: VersionedXcm, + }), + teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + } +}) + +export const VersionedXcm: sts.Type = sts.closedEnum(() => { + return { + V0: V0Xcm, + V1: V1Xcm, + V2: sts.array(() => V2Instruction), + } +}) + +export const V2Instruction: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => V2Instruction), + SetErrorHandler: sts.array(() => V2Instruction), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const DoubleEncoded: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncoded { + encoded: Bytes +} + +export const V0OriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type V0OriginKind = V0OriginKind_Native | V0OriginKind_SovereignAccount | V0OriginKind_Superuser | V0OriginKind_Xcm + +export interface V0OriginKind_Native { + __kind: 'Native' +} + +export interface V0OriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface V0OriginKind_Superuser { + __kind: 'Superuser' +} + +export interface V0OriginKind_Xcm { + __kind: 'Xcm' +} + +export const V2Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V2Error])), + Null: sts.unit(), + Version: sts.number(), + } +}) + +export const V2Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + MaxWeightInvalid: sts.unit(), + MultiLocationFull: sts.unit(), + MultiLocationNotInvertible: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + WeightLimitReached: sts.bigint(), + WeightNotComputable: sts.unit(), + } +}) + +export type V2Error = V2Error_AssetNotFound | V2Error_BadOrigin | V2Error_Barrier | V2Error_DestinationUnsupported | V2Error_ExceedsMaxMessageSize | V2Error_FailedToDecode | V2Error_FailedToTransactAsset | V2Error_InvalidLocation | V2Error_LocationCannotHold | V2Error_MaxWeightInvalid | V2Error_MultiLocationFull | V2Error_MultiLocationNotInvertible | V2Error_NotHoldingFees | V2Error_NotWithdrawable | V2Error_Overflow | V2Error_TooExpensive | V2Error_Transport | V2Error_Trap | V2Error_UnhandledXcmVersion | V2Error_Unimplemented | V2Error_UnknownClaim | V2Error_Unroutable | V2Error_UntrustedReserveLocation | V2Error_UntrustedTeleportLocation | V2Error_WeightLimitReached | V2Error_WeightNotComputable + +export interface V2Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V2Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V2Error_Barrier { + __kind: 'Barrier' +} + +export interface V2Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V2Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V2Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V2Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V2Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V2Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V2Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V2Error_MultiLocationFull { + __kind: 'MultiLocationFull' +} + +export interface V2Error_MultiLocationNotInvertible { + __kind: 'MultiLocationNotInvertible' +} + +export interface V2Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V2Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V2Error_Overflow { + __kind: 'Overflow' +} + +export interface V2Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V2Error_Transport { + __kind: 'Transport' +} + +export interface V2Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V2Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V2Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V2Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V2Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V2Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V2Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: bigint +} + +export interface V2Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V2Response = V2Response_Assets | V2Response_ExecutionResult | V2Response_Null | V2Response_Version + +export interface V2Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V2Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V2Error] | undefined) +} + +export interface V2Response_Null { + __kind: 'Null' +} + +export interface V2Response_Version { + __kind: 'Version' + value: number +} + +export interface V1MultiAsset { + id: V1AssetId + fun: V1Fungibility +} + +export type V1Fungibility = V1Fungibility_Fungible | V1Fungibility_NonFungible + +export interface V1Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V1Fungibility_NonFungible { + __kind: 'NonFungible' + value: V1AssetInstance +} + +export type V1AssetInstance = V1AssetInstance_Array16 | V1AssetInstance_Array32 | V1AssetInstance_Array4 | V1AssetInstance_Array8 | V1AssetInstance_Blob | V1AssetInstance_Index | V1AssetInstance_Undefined + +export interface V1AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V1AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V1AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V1AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V1AssetInstance_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface V1AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V1AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V1AssetId = V1AssetId_Abstract | V1AssetId_Concrete + +export interface V1AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V1AssetId_Concrete { + __kind: 'Concrete' + value: V1MultiLocation +} + +export interface V1MultiLocation { + parents: number + interior: V1Junctions +} + +export type V1Junctions = V1Junctions_Here | V1Junctions_X1 | V1Junctions_X2 | V1Junctions_X3 | V1Junctions_X4 | V1Junctions_X5 | V1Junctions_X6 | V1Junctions_X7 | V1Junctions_X8 + +export interface V1Junctions_Here { + __kind: 'Here' +} + +export interface V1Junctions_X1 { + __kind: 'X1' + value: V1Junction +} + +export interface V1Junctions_X2 { + __kind: 'X2' + value: [V1Junction, V1Junction] +} + +export interface V1Junctions_X3 { + __kind: 'X3' + value: [V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X4 { + __kind: 'X4' + value: [V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X5 { + __kind: 'X5' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X6 { + __kind: 'X6' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X7 { + __kind: 'X7' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X8 { + __kind: 'X8' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export type V1Junction = V1Junction_AccountId32 | V1Junction_AccountIndex64 | V1Junction_AccountKey20 | V1Junction_GeneralIndex | V1Junction_GeneralKey | V1Junction_OnlyChild | V1Junction_PalletInstance | V1Junction_Parachain | V1Junction_Plurality + +export interface V1Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V1Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V1Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V1Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V1Junction_GeneralKey { + __kind: 'GeneralKey' + value: Bytes +} + +export interface V1Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V1Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V1Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V1Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0BodyPart = V0BodyPart_AtLeastProportion | V0BodyPart_Fraction | V0BodyPart_Members | V0BodyPart_MoreThanProportion | V0BodyPart_Voice + +export interface V0BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V0BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V0BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Voice { + __kind: 'Voice' +} + +export type V0BodyId = V0BodyId_Executive | V0BodyId_Index | V0BodyId_Judicial | V0BodyId_Legislative | V0BodyId_Named | V0BodyId_Technical | V0BodyId_Unit + +export interface V0BodyId_Executive { + __kind: 'Executive' +} + +export interface V0BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V0BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V0BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V0BodyId_Named { + __kind: 'Named' + value: Bytes +} + +export interface V0BodyId_Technical { + __kind: 'Technical' +} + +export interface V0BodyId_Unit { + __kind: 'Unit' +} + +export type V0NetworkId = V0NetworkId_Any | V0NetworkId_Kusama | V0NetworkId_Named | V0NetworkId_Polkadot + +export interface V0NetworkId_Any { + __kind: 'Any' +} + +export interface V0NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V0NetworkId_Named { + __kind: 'Named' + value: Bytes +} + +export interface V0NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export const V1Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V1Junction, + X2: sts.tuple(() => [V1Junction, V1Junction]), + X3: sts.tuple(() => [V1Junction, V1Junction, V1Junction]), + X4: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction]), + X5: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X6: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X7: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X8: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + } +}) + +export const V1Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.bytes(), + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export const V0BodyId: sts.Type = sts.closedEnum(() => { + return { + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: sts.bytes(), + Technical: sts.unit(), + Unit: sts.unit(), + } +}) + +export const V0NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: sts.bytes(), + Polkadot: sts.unit(), + } +}) + +export const V1MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V1MultiAsset), + Wild: V1WildMultiAsset, + } +}) + +export const V1WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllOf: sts.enumStruct({ + id: V1AssetId, + fun: V1WildFungibility, + }), + } +}) + +export const V1WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V1WildFungibility = V1WildFungibility_Fungible | V1WildFungibility_NonFungible + +export interface V1WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V1WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V1AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V1MultiLocation, + } +}) + +export type V1WildMultiAsset = V1WildMultiAsset_All | V1WildMultiAsset_AllOf + +export interface V1WildMultiAsset_All { + __kind: 'All' +} + +export interface V1WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V1AssetId + fun: V1WildFungibility +} + +export type V1MultiAssetFilter = V1MultiAssetFilter_Definite | V1MultiAssetFilter_Wild + +export interface V1MultiAssetFilter_Definite { + __kind: 'Definite' + value: V1MultiAsset[] +} + +export interface V1MultiAssetFilter_Wild { + __kind: 'Wild' + value: V1WildMultiAsset +} + +export const V1MultiAsset: sts.Type = sts.struct(() => { + return { + id: V1AssetId, + fun: V1Fungibility, + } +}) + +export const V1Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V1AssetInstance, + } +}) + +export const V1AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V2Instruction = V2Instruction_BuyExecution | V2Instruction_ClaimAsset | V2Instruction_ClearError | V2Instruction_ClearOrigin | V2Instruction_DepositAsset | V2Instruction_DepositReserveAsset | V2Instruction_DescendOrigin | V2Instruction_ExchangeAsset | V2Instruction_HrmpChannelAccepted | V2Instruction_HrmpChannelClosing | V2Instruction_HrmpNewChannelOpenRequest | V2Instruction_InitiateReserveWithdraw | V2Instruction_InitiateTeleport | V2Instruction_QueryHolding | V2Instruction_QueryResponse | V2Instruction_ReceiveTeleportedAsset | V2Instruction_RefundSurplus | V2Instruction_ReportError | V2Instruction_ReserveAssetDeposited | V2Instruction_SetAppendix | V2Instruction_SetErrorHandler | V2Instruction_SubscribeVersion | V2Instruction_Transact | V2Instruction_TransferAsset | V2Instruction_TransferReserveAsset | V2Instruction_Trap | V2Instruction_UnsubscribeVersion | V2Instruction_WithdrawAsset + +export interface V2Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface V2Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface V2Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V2Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V2Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V2Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface V2Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V2Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V2Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V2Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V2Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface V2Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface V2Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface V2Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V2Instruction_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface V2Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface V2Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V2Instruction[] +} + +export interface V2Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V2Instruction[] +} + +export interface V2Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V2Instruction_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V2Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V2Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V2Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export type V2WeightLimit = V2WeightLimit_Limited | V2WeightLimit_Unlimited + +export interface V2WeightLimit_Limited { + __kind: 'Limited' + value: bigint +} + +export interface V2WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V1Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: V1Xcm, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + } +}) + +export const V1Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => V1Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type V1Order = V1Order_BuyExecution | V1Order_DepositAsset | V1Order_DepositReserveAsset | V1Order_ExchangeAsset | V1Order_InitiateReserveWithdraw | V1Order_InitiateTeleport | V1Order_Noop | V1Order_QueryHolding + +export interface V1Order_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: V1Xcm[] +} + +export interface V1Order_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V1Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V1Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_Noop { + __kind: 'Noop' +} + +export interface V1Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export const V1Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + Version: sts.number(), + } +}) + +export type V1Response = V1Response_Assets | V1Response_Version + +export interface V1Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V1Response_Version { + __kind: 'Version' + value: number +} + +export type V1Xcm = V1Xcm_HrmpChannelAccepted | V1Xcm_HrmpChannelClosing | V1Xcm_HrmpNewChannelOpenRequest | V1Xcm_QueryResponse | V1Xcm_ReceiveTeleportedAsset | V1Xcm_RelayedFrom | V1Xcm_ReserveAssetDeposited | V1Xcm_SubscribeVersion | V1Xcm_Transact | V1Xcm_TransferAsset | V1Xcm_TransferReserveAsset | V1Xcm_UnsubscribeVersion | V1Xcm_WithdrawAsset + +export interface V1Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V1Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V1Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V1Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface V1Xcm_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: V1Xcm +} + +export interface V1Xcm_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V1Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V1Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V1Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Xcm_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V1Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export const V0Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: V0Xcm, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + } +}) + +export const V0Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => V0Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type V0Order = V0Order_BuyExecution | V0Order_DepositAsset | V0Order_DepositReserveAsset | V0Order_ExchangeAsset | V0Order_InitiateReserveWithdraw | V0Order_InitiateTeleport | V0Order_Null | V0Order_QueryHolding + +export interface V0Order_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: V0Xcm[] +} + +export interface V0Order_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface V0Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_Null { + __kind: 'Null' +} + +export interface V0Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type V0MultiLocation = V0MultiLocation_Null | V0MultiLocation_X1 | V0MultiLocation_X2 | V0MultiLocation_X3 | V0MultiLocation_X4 | V0MultiLocation_X5 | V0MultiLocation_X6 | V0MultiLocation_X7 | V0MultiLocation_X8 + +export interface V0MultiLocation_Null { + __kind: 'Null' +} + +export interface V0MultiLocation_X1 { + __kind: 'X1' + value: V0Junction +} + +export interface V0MultiLocation_X2 { + __kind: 'X2' + value: [V0Junction, V0Junction] +} + +export interface V0MultiLocation_X3 { + __kind: 'X3' + value: [V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X4 { + __kind: 'X4' + value: [V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X5 { + __kind: 'X5' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X6 { + __kind: 'X6' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X7 { + __kind: 'X7' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X8 { + __kind: 'X8' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export type V0Junction = V0Junction_AccountId32 | V0Junction_AccountIndex64 | V0Junction_AccountKey20 | V0Junction_GeneralIndex | V0Junction_GeneralKey | V0Junction_OnlyChild | V0Junction_PalletInstance | V0Junction_Parachain | V0Junction_Parent | V0Junction_Plurality + +export interface V0Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V0Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V0Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V0Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V0Junction_GeneralKey { + __kind: 'GeneralKey' + value: Bytes +} + +export interface V0Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V0Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V0Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V0Junction_Parent { + __kind: 'Parent' +} + +export interface V0Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0MultiAsset = V0MultiAsset_AbstractFungible | V0MultiAsset_AbstractNonFungible | V0MultiAsset_All | V0MultiAsset_AllAbstractFungible | V0MultiAsset_AllAbstractNonFungible | V0MultiAsset_AllConcreteFungible | V0MultiAsset_AllConcreteNonFungible | V0MultiAsset_AllFungible | V0MultiAsset_AllNonFungible | V0MultiAsset_ConcreteFungible | V0MultiAsset_ConcreteNonFungible | V0MultiAsset_None + +export interface V0MultiAsset_AbstractFungible { + __kind: 'AbstractFungible' + id: Bytes + amount: bigint +} + +export interface V0MultiAsset_AbstractNonFungible { + __kind: 'AbstractNonFungible' + class: Bytes + instance: V1AssetInstance +} + +export interface V0MultiAsset_All { + __kind: 'All' +} + +export interface V0MultiAsset_AllAbstractFungible { + __kind: 'AllAbstractFungible' + id: Bytes +} + +export interface V0MultiAsset_AllAbstractNonFungible { + __kind: 'AllAbstractNonFungible' + class: Bytes +} + +export interface V0MultiAsset_AllConcreteFungible { + __kind: 'AllConcreteFungible' + id: V0MultiLocation +} + +export interface V0MultiAsset_AllConcreteNonFungible { + __kind: 'AllConcreteNonFungible' + class: V0MultiLocation +} + +export interface V0MultiAsset_AllFungible { + __kind: 'AllFungible' +} + +export interface V0MultiAsset_AllNonFungible { + __kind: 'AllNonFungible' +} + +export interface V0MultiAsset_ConcreteFungible { + __kind: 'ConcreteFungible' + id: V0MultiLocation + amount: bigint +} + +export interface V0MultiAsset_ConcreteNonFungible { + __kind: 'ConcreteNonFungible' + class: V0MultiLocation + instance: V1AssetInstance +} + +export interface V0MultiAsset_None { + __kind: 'None' +} + +export const V0MultiAsset: sts.Type = sts.closedEnum(() => { + return { + AbstractFungible: sts.enumStruct({ + id: sts.bytes(), + amount: sts.bigint(), + }), + AbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + instance: V1AssetInstance, + }), + All: sts.unit(), + AllAbstractFungible: sts.enumStruct({ + id: sts.bytes(), + }), + AllAbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + }), + AllConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + }), + AllConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + }), + AllFungible: sts.unit(), + AllNonFungible: sts.unit(), + ConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + amount: sts.bigint(), + }), + ConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + instance: V1AssetInstance, + }), + None: sts.unit(), + } +}) + +export const V0MultiLocation: sts.Type = sts.closedEnum(() => { + return { + Null: sts.unit(), + X1: V0Junction, + X2: sts.tuple(() => [V0Junction, V0Junction]), + X3: sts.tuple(() => [V0Junction, V0Junction, V0Junction]), + X4: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction]), + X5: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X6: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X7: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X8: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + } +}) + +export const V0Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.bytes(), + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Parent: sts.unit(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V0MultiAsset), + } +}) + +export type V0Response = V0Response_Assets + +export interface V0Response_Assets { + __kind: 'Assets' + value: V0MultiAsset[] +} + +export type V0Xcm = V0Xcm_HrmpChannelAccepted | V0Xcm_HrmpChannelClosing | V0Xcm_HrmpNewChannelOpenRequest | V0Xcm_QueryResponse | V0Xcm_RelayedFrom | V0Xcm_ReserveAssetDeposit | V0Xcm_TeleportAsset | V0Xcm_Transact | V0Xcm_TransferAsset | V0Xcm_TransferReserveAsset | V0Xcm_WithdrawAsset + +export interface V0Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V0Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V0Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V0Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface V0Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: V0Xcm +} + +export interface V0Xcm_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V0Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export type VersionedXcm = VersionedXcm_V0 | VersionedXcm_V1 | VersionedXcm_V2 + +export interface VersionedXcm_V0 { + __kind: 'V0' + value: V0Xcm +} + +export interface VersionedXcm_V1 { + __kind: 'V1' + value: V1Xcm +} + +export interface VersionedXcm_V2 { + __kind: 'V2' + value: V2Instruction[] +} + +export const V2WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: sts.bigint(), + Unlimited: sts.unit(), + } +}) + +export const VersionedMultiAssets: sts.Type = sts.closedEnum(() => { + return { + V0: sts.array(() => V0MultiAsset), + V1: sts.array(() => V1MultiAsset), + } +}) + +export type VersionedMultiAssets = VersionedMultiAssets_V0 | VersionedMultiAssets_V1 + +export interface VersionedMultiAssets_V0 { + __kind: 'V0' + value: V0MultiAsset[] +} + +export interface VersionedMultiAssets_V1 { + __kind: 'V1' + value: V1MultiAsset[] +} + +export const V1MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V1Junctions, + } +}) + +export const VersionedMultiLocation: sts.Type = sts.closedEnum(() => { + return { + V0: V0MultiLocation, + V1: V1MultiLocation, + } +}) + +export type VersionedMultiLocation = VersionedMultiLocation_V0 | VersionedMultiLocation_V1 + +export interface VersionedMultiLocation_V0 { + __kind: 'V0' + value: V0MultiLocation +} + +export interface VersionedMultiLocation_V1 { + __kind: 'V1' + value: V1MultiLocation +} + +export const Type_548: sts.Type = sts.closedEnum(() => { + return { + V0: Type_549, + V1: Type_554, + V2: sts.array(() => Type_560), + } +}) + +export const Type_560: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => Type_560), + SetErrorHandler: sts.array(() => Type_560), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_553, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const Type_553: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface Type_553 { + encoded: Bytes +} + +export type Type_560 = Type_560_BuyExecution | Type_560_ClaimAsset | Type_560_ClearError | Type_560_ClearOrigin | Type_560_DepositAsset | Type_560_DepositReserveAsset | Type_560_DescendOrigin | Type_560_ExchangeAsset | Type_560_HrmpChannelAccepted | Type_560_HrmpChannelClosing | Type_560_HrmpNewChannelOpenRequest | Type_560_InitiateReserveWithdraw | Type_560_InitiateTeleport | Type_560_QueryHolding | Type_560_QueryResponse | Type_560_ReceiveTeleportedAsset | Type_560_RefundSurplus | Type_560_ReportError | Type_560_ReserveAssetDeposited | Type_560_SetAppendix | Type_560_SetErrorHandler | Type_560_SubscribeVersion | Type_560_Transact | Type_560_TransferAsset | Type_560_TransferReserveAsset | Type_560_Trap | Type_560_UnsubscribeVersion | Type_560_WithdrawAsset + +export interface Type_560_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface Type_560_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface Type_560_ClearError { + __kind: 'ClearError' +} + +export interface Type_560_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_560_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_560_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_560_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface Type_560_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_560_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_560_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_560_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_560_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_560_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_560_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface Type_560_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface Type_560_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface Type_560_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_560_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface Type_560_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface Type_560_SetAppendix { + __kind: 'SetAppendix' + value: Type_560[] +} + +export interface Type_560_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_560[] +} + +export interface Type_560_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_560_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_553 +} + +export interface Type_560_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_560_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_560_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_560_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_560_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export const Type_554: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_556), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: Type_554, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_556), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_553, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_556), + }), + } +}) + +export const Type_556: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => Type_554), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type Type_556 = Type_556_BuyExecution | Type_556_DepositAsset | Type_556_DepositReserveAsset | Type_556_ExchangeAsset | Type_556_InitiateReserveWithdraw | Type_556_InitiateTeleport | Type_556_Noop | Type_556_QueryHolding + +export interface Type_556_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: Type_554[] +} + +export interface Type_556_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_556_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_556_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_556_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface Type_556_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_556_Noop { + __kind: 'Noop' +} + +export interface Type_556_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export type Type_554 = Type_554_HrmpChannelAccepted | Type_554_HrmpChannelClosing | Type_554_HrmpNewChannelOpenRequest | Type_554_QueryResponse | Type_554_ReceiveTeleportedAsset | Type_554_RelayedFrom | Type_554_ReserveAssetDeposited | Type_554_SubscribeVersion | Type_554_Transact | Type_554_TransferAsset | Type_554_TransferReserveAsset | Type_554_UnsubscribeVersion | Type_554_WithdrawAsset + +export interface Type_554_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_554_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_554_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_554_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface Type_554_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: Type_556[] +} + +export interface Type_554_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: Type_554 +} + +export interface Type_554_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: Type_556[] +} + +export interface Type_554_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_554_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_553 +} + +export interface Type_554_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_554_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_554_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_554_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: Type_556[] +} + +export const Type_549: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: Type_549, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_551), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_551), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_553, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_551), + }), + } +}) + +export const Type_551: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => Type_549), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type Type_551 = Type_551_BuyExecution | Type_551_DepositAsset | Type_551_DepositReserveAsset | Type_551_ExchangeAsset | Type_551_InitiateReserveWithdraw | Type_551_InitiateTeleport | Type_551_Null | Type_551_QueryHolding + +export interface Type_551_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: Type_549[] +} + +export interface Type_551_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_551_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_551_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface Type_551_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface Type_551_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_551_Null { + __kind: 'Null' +} + +export interface Type_551_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type Type_549 = Type_549_HrmpChannelAccepted | Type_549_HrmpChannelClosing | Type_549_HrmpNewChannelOpenRequest | Type_549_QueryResponse | Type_549_RelayedFrom | Type_549_ReserveAssetDeposit | Type_549_TeleportAsset | Type_549_Transact | Type_549_TransferAsset | Type_549_TransferReserveAsset | Type_549_WithdrawAsset + +export interface Type_549_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_549_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_549_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_549_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface Type_549_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: Type_549 +} + +export interface Type_549_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: Type_551[] +} + +export interface Type_549_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: Type_551[] +} + +export interface Type_549_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_553 +} + +export interface Type_549_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_549_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_549_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: Type_551[] +} + +export type Type_548 = Type_548_V0 | Type_548_V1 | Type_548_V2 + +export interface Type_548_V0 { + __kind: 'V0' + value: Type_549 +} + +export interface Type_548_V1 { + __kind: 'V1' + value: Type_554 +} + +export interface Type_548_V2 { + __kind: 'V2' + value: Type_560[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type XcmPalletCall = XcmPalletCall_execute | XcmPalletCall_force_default_xcm_version | XcmPalletCall_force_subscribe_version_notify | XcmPalletCall_force_unsubscribe_version_notify | XcmPalletCall_force_xcm_version | XcmPalletCall_limited_reserve_transfer_assets | XcmPalletCall_limited_teleport_assets | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets + +/** + * Execute an XCM message from a local, signed, origin. + * + * An event is deposited indicating whether `msg` could be executed completely or only + * partially. + * + * No more than `max_weight` will be used in its attempted execution. If this is less than the + * maximum amount of weight that the message could take to be executed, then no execution + * attempt will be made. + * + * NOTE: A successful return to this does *not* imply that the `msg` was executed successfully + * to completion; only that *some* of it was executed. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Type_548 + maxWeight: bigint +} + +/** + * Set a safe XCM version (the version that XCM should be encoded with if the most recent + * version a destination can accept is unknown). + * + * - `origin`: Must be Root. + * - `maybe_xcm_version`: The default XCM encoding version, or `None` to disable. + */ +export interface XcmPalletCall_force_default_xcm_version { + __kind: 'force_default_xcm_version' + maybeXcmVersion?: (number | undefined) +} + +/** + * Ask a location to notify us regarding their XCM version and any changes to it. + * + * - `origin`: Must be Root. + * - `location`: The location to which we should subscribe for XCM version notifications. + */ +export interface XcmPalletCall_force_subscribe_version_notify { + __kind: 'force_subscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Require that a particular destination should no longer notify us regarding any XCM + * version changes. + * + * - `origin`: Must be Root. + * - `location`: The location to which we are currently subscribed for XCM version + * notifications which we no longer desire. + */ +export interface XcmPalletCall_force_unsubscribe_version_notify { + __kind: 'force_unsubscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Extoll that a particular destination can be communicated with through a particular + * version of XCM. + * + * - `origin`: Must be Root. + * - `location`: The destination that is being described. + * - `xcm_version`: The latest version of XCM that `location` supports. + */ +export interface XcmPalletCall_force_xcm_version { + __kind: 'force_xcm_version' + location: V1MultiLocation + xcmVersion: number +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination + * chain and forward a notification XCM. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight + * is needed than `weight_limit`, then the operation will fail and the assets send may be + * at risk. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_reserve_transfer_assets { + __kind: 'limited_reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight + * is needed than `weight_limit`, then the operation will fail and the assets send may be + * at risk. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_teleport_assets { + __kind: 'limited_teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination + * chain and forward a notification XCM. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, + * with all fees taken as needed from the asset. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +export interface XcmPalletCall_send { + __kind: 'send' + dest: VersionedMultiLocation + message: VersionedXcm +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, + * with all fees taken as needed from the asset. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VoterListCall: sts.Type = sts.closedEnum(() => { + return { + put_in_front_of: sts.enumStruct({ + lighter: AccountId32, + }), + rebag: sts.enumStruct({ + dislocated: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VoterListCall = VoterListCall_put_in_front_of | VoterListCall_rebag + +/** + * Move the caller's Id directly in front of `lighter`. + * + * The dispatch origin for this call must be _Signed_ and can only be called by the Id of + * the account going in front of `lighter`. + * + * Only works if + * - both nodes are within the same bag, + * - and `origin` has a greater `Score` than `lighter`. + */ +export interface VoterListCall_put_in_front_of { + __kind: 'put_in_front_of' + lighter: AccountId32 +} + +/** + * Declare that some `dislocated` account has, through rewards or penalties, sufficiently + * changed its score that it should properly fall into a different bag than its current + * one. + * + * Anyone can call this function about any potentially dislocated account. + * + * Will always update the stored score of `dislocated` to the correct score, based on + * `ScoreProvider`. + * + * If `dislocated` does not exists, it returns an error. + */ +export interface VoterListCall_rebag { + __kind: 'rebag' + dislocated: AccountId32 +} + +export type AccountId32 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: MultiAddress, + target: MultiAddress, + schedule: VestingInfo, + }), + merge_schedules: sts.enumStruct({ + schedule1Index: sts.number(), + schedule2Index: sts.number(), + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: MultiAddress, + }), + vested_transfer: sts.enumStruct({ + target: MultiAddress, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: sts.bigint(), + perBlock: sts.bigint(), + startingBlock: sts.number(), + } +}) + +export interface VestingInfo { + locked: bigint + perBlock: bigint + startingBlock: number +} + +export const MultiAddress: sts.Type = sts.closedEnum(() => { + return { + Address20: sts.bytes(), + Address32: sts.bytes(), + Id: AccountId32, + Index: sts.unit(), + Raw: sts.bytes(), + } +}) + +export type MultiAddress = MultiAddress_Address20 | MultiAddress_Address32 | MultiAddress_Id | MultiAddress_Index | MultiAddress_Raw + +export interface MultiAddress_Address20 { + __kind: 'Address20' + value: Bytes +} + +export interface MultiAddress_Address32 { + __kind: 'Address32' + value: Bytes +} + +export interface MultiAddress_Id { + __kind: 'Id' + value: AccountId32 +} + +export interface MultiAddress_Index { + __kind: 'Index' +} + +export interface MultiAddress_Raw { + __kind: 'Raw' + value: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_merge_schedules | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: MultiAddress + target: MultiAddress + schedule: VestingInfo +} + +/** + * Merge two vesting schedules together, creating a new vesting schedule that unlocks over + * the highest possible start and end blocks. If both schedules have already started the + * current block will be used as the schedule start; with the caveat that if one schedule + * is finished by the current block, the other will be treated as the new merged schedule, + * unmodified. + * + * NOTE: If `schedule1_index == schedule2_index` this is a no-op. + * NOTE: This will unlock all schedules through the current block prior to merging. + * NOTE: If both schedules have ended by the current block, no new schedule will be created + * and both will be removed. + * + * Merged schedule attributes: + * - `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block, + * current_block)`. + * - `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`. + * - `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`. + * + * The dispatch origin for this call must be _Signed_. + * + * - `schedule1_index`: index of the first schedule to merge. + * - `schedule2_index`: index of the second schedule to merge. + */ +export interface VestingCall_merge_schedules { + __kind: 'merge_schedules' + schedule1Index: number + schedule2Index: number +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: MultiAddress +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account receiving the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: MultiAddress + schedule: VestingInfo +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Call, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Call), + }), + dispatch_as: sts.enumStruct({ + asOrigin: OriginCaller, + call: Call, + }), + force_batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + } +}) + +export const OriginCaller: sts.Type = sts.closedEnum(() => { + return { + Council: Type_334, + ParachainsOrigin: Origin, + TechnicalCommittee: Type_335, + Void: Void, + XcmPallet: Type_337, + system: RawOrigin, + } +}) + +export const RawOrigin: sts.Type = sts.closedEnum(() => { + return { + None: sts.unit(), + Root: sts.unit(), + Signed: AccountId32, + } +}) + +export type RawOrigin = RawOrigin_None | RawOrigin_Root | RawOrigin_Signed + +export interface RawOrigin_None { + __kind: 'None' +} + +export interface RawOrigin_Root { + __kind: 'Root' +} + +export interface RawOrigin_Signed { + __kind: 'Signed' + value: AccountId32 +} + +export const Type_337: sts.Type = sts.closedEnum(() => { + return { + Response: V1MultiLocation, + Xcm: V1MultiLocation, + } +}) + +export type Type_337 = Type_337_Response | Type_337_Xcm + +export interface Type_337_Response { + __kind: 'Response' + value: V1MultiLocation +} + +export interface Type_337_Xcm { + __kind: 'Xcm' + value: V1MultiLocation +} + +export const Void: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Void = never + +export const Type_335: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_335 = Type_335_Member | Type_335_Members | Type_335__Phantom + +export interface Type_335_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_335_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_335__Phantom { + __kind: '_Phantom' +} + +export const Origin: sts.Type = sts.closedEnum(() => { + return { + Parachain: Id, + } +}) + +export const Id = sts.number() + +export type Origin = Origin_Parachain + +export interface Origin_Parachain { + __kind: 'Parachain' + value: Id +} + +export type Id = number + +export const Type_334: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_334 = Type_334_Member | Type_334_Members | Type_334__Phantom + +export interface Type_334_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_334_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_334__Phantom { + __kind: '_Phantom' +} + +export type OriginCaller = OriginCaller_Council | OriginCaller_ParachainsOrigin | OriginCaller_TechnicalCommittee | OriginCaller_Void | OriginCaller_XcmPallet | OriginCaller_system + +export interface OriginCaller_Council { + __kind: 'Council' + value: Type_334 +} + +export interface OriginCaller_ParachainsOrigin { + __kind: 'ParachainsOrigin' + value: Origin +} + +export interface OriginCaller_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: Type_335 +} + +export interface OriginCaller_Void { + __kind: 'Void' + value: Void +} + +export interface OriginCaller_XcmPallet { + __kind: 'XcmPallet' + value: Type_337 +} + +export interface OriginCaller_system { + __kind: 'system' + value: RawOrigin +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all | UtilityCall_dispatch_as | UtilityCall_force_batch + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Call +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Call[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Call[] +} + +/** + * Dispatches a function call with a provided origin. + * + * The dispatch origin for this call must be _Root_. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB write (event). + * - Weight of derivative `call` execution + T::WeightInfo::dispatch_as(). + * # + */ +export interface UtilityCall_dispatch_as { + __kind: 'dispatch_as' + asOrigin: OriginCaller + call: Call +} + +/** + * Send a batch of dispatch calls. + * Unlike `batch`, it allows errors and won't interrupt. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_force_batch { + __kind: 'force_batch' + calls: Call[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UmpCall: sts.Type = sts.closedEnum(() => { + return { + service_overweight: sts.enumStruct({ + index: sts.bigint(), + weightLimit: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UmpCall = UmpCall_service_overweight + +/** + * Service a single overweight upward message. + * + * - `origin`: Must pass `ExecuteOverweightOrigin`. + * - `index`: The index of the overweight message to service. + * - `weight_limit`: The amount of weight that message execution may take. + * + * Errors: + * - `UnknownMessageIndex`: Message of `index` is unknown. + * - `WeightOverLimit`: Message execution may use greater than `weight_limit`. + * + * Events: + * - `OverweightServiced`: On success. + */ +export interface UmpCall_service_overweight { + __kind: 'service_overweight' + index: bigint + weightLimit: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: MultiAddress, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + remove_approval: sts.enumStruct({ + proposalId: sts.number(), + }), + spend: sts.enumStruct({ + amount: sts.bigint(), + beneficiary: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_remove_approval | TreasuryCall_spend + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: MultiAddress +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Force a previously approved proposal to be removed from the approval queue. + * The original deposit will no longer be returned. + * + * May only be called from `T::RejectOrigin`. + * - `proposal_id`: The index of a proposal + * + * # + * - Complexity: O(A) where `A` is the number of approvals + * - Db reads and writes: `Approvals` + * # + * + * Errors: + * - `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue, + * i.e., the proposal has not been approved. This could also mean the proposal does not + * exist altogether, thus there is no way it would have been approved in the first place. + */ +export interface TreasuryCall_remove_approval { + __kind: 'remove_approval' + proposalId: number +} + +/** + * Propose and approve a spend of treasury funds. + * + * - `origin`: Must be `SpendOrigin` with the `Success` value being at least `amount`. + * - `amount`: The amount to be transferred from the treasury to the `beneficiary`. + * - `beneficiary`: The destination account for the transfer. + * + * NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the + * beneficiary. + */ +export interface TreasuryCall_spend { + __kind: 'spend' + amount: bigint + beneficiary: MultiAddress +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TipsCall: sts.Type = sts.closedEnum(() => { + return { + close_tip: sts.enumStruct({ + hash: H256, + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId32, + }), + retract_tip: sts.enumStruct({ + hash: H256, + }), + slash_tip: sts.enumStruct({ + hash: H256, + }), + tip: sts.enumStruct({ + hash: H256, + tipValue: sts.bigint(), + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId32, + tipValue: sts.bigint(), + }), + } +}) + +export const H256 = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TipsCall = TipsCall_close_tip | TipsCall_report_awesome | TipsCall_retract_tip | TipsCall_slash_tip | TipsCall_tip | TipsCall_tip_new + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost + * depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TipsCall_close_tip { + __kind: 'close_tip' + hash: H256 +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId32 +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TipsCall_retract_tip { + __kind: 'retract_tip' + hash: H256 +} + +/** + * Remove and slash an already-open tip. + * + * May only be called from `T::RejectOrigin`. + * + * As a result, the finder is slashed and the deposits are lost. + * + * Emits `TipSlashed` if successful. + * + * # + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * # + */ +export interface TipsCall_slash_tip { + __kind: 'slash_tip' + hash: H256 +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`, insert tip and check closing, `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TipsCall_tip { + __kind: 'tip' + hash: H256 + tipValue: bigint +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of + * `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId32 + tipValue: bigint +} + +export type H256 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in + * `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId32, + }), + change_key: sts.enumStruct({ + new: AccountId32, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId32, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId32), + }), + set_prime: sts.enumStruct({ + who: AccountId32, + }), + swap_member: sts.enumStruct({ + remove: AccountId32, + add: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId32 +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId32 +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId32 +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId32[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId32 +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId32 + add: AccountId32 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: sts.bytes(), + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => sts.bytes()), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + }), + } +}) + +export const Perbill = sts.number() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Bytes + subkeys: number +} + +/** + * Kill some items from storage. + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Bytes[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Make some on-chain remark and emit event. + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is + * expensive). + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very + * expensive. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full + * block. # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: [Bytes, Bytes][] +} + +export type Perbill = number + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: MultiAddress, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: sts.number(), + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + controller: AccountId32, + }), + force_apply_min_commission: sts.enumStruct({ + validatorStash: AccountId32, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => MultiAddress), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => MultiAddress), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + }), + reap_stash: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: MultiAddress, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId32), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_staking_configs: sts.enumStruct({ + minNominatorBond: ConfigOp, + minValidatorBond: ConfigOp, + maxNominatorCount: Type_250, + maxValidatorCount: Type_250, + chillThreshold: Type_251, + minCommission: Type_252, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export const Type_252: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export type Type_252 = Type_252_Noop | Type_252_Remove | Type_252_Set + +export interface Type_252_Noop { + __kind: 'Noop' +} + +export interface Type_252_Remove { + __kind: 'Remove' +} + +export interface Type_252_Set { + __kind: 'Set' + value: Perbill +} + +export const Type_251: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Percent, + } +}) + +export type Type_251 = Type_251_Noop | Type_251_Remove | Type_251_Set + +export interface Type_251_Noop { + __kind: 'Noop' +} + +export interface Type_251_Remove { + __kind: 'Remove' +} + +export interface Type_251_Set { + __kind: 'Set' + value: Percent +} + +export type Percent = number + +export const Type_250: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_250 = Type_250_Noop | Type_250_Remove | Type_250_Set + +export interface Type_250_Noop { + __kind: 'Noop' +} + +export interface Type_250_Remove { + __kind: 'Remove' +} + +export interface Type_250_Set { + __kind: 'Set' + value: number +} + +export const ConfigOp: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type ConfigOp = ConfigOp_Noop | ConfigOp_Remove | ConfigOp_Set + +export interface ConfigOp_Noop { + __kind: 'Noop' +} + +export interface ConfigOp_Remove { + __kind: 'Remove' +} + +export interface ConfigOp_Set { + __kind: 'Set' + value: bigint +} + +export const Percent = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_force_apply_min_commission | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_staking_configs | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: MultiAddress + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose + * any limitation on the amount that can be added. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: number + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Declare a `controller` to stop participating as either a validator or nominator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_, but can be called by anyone. + * + * If the caller is the same as the controller being targeted, then no further checks are + * enforced, and this function behaves just like `chill`. + * + * If the caller is different than the controller being targeted, the following conditions + * must be met: + * + * * `controller` must belong to a nominator who has become non-decodable, + * + * Or: + * + * * A `ChillThreshold` must be set and checked which defines how close to the max + * nominators or validators we must reach before users can start chilling one-another. + * * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine + * how close we are to the threshold. + * * A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines + * if this is a person that should be chilled because they have not met the threshold + * bond required. + * + * This can be helpful if bond requirements are updated, and we need to remove old users + * who do not satisfy these requirements. + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + controller: AccountId32 +} + +/** + * Force a validator to have at least the minimum commission. This will not affect a + * validator who already has a commission greater than or equal to the minimum. Any account + * can call this. + */ +export interface StakingCall_force_apply_min_commission { + __kind: 'force_apply_min_commission' + validatorStash: AccountId32 +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * Thus the election process may be ongoing when this is called. In this case the + * election will continue until the next era is triggered. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: MultiAddress[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (T::MaxNominations). + * - Both the reads and writes follow a similar pattern. + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: MultiAddress[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId32 + era: number +} + +/** + * Remove all data structures concerning a staker/stash once it is at a state where it can + * be considered `dust` in the staking system. The requirements are: + * + * 1. the `total_balance` of the stash is below existential deposit. + * 2. or, the `ledger.total` of the stash is below existential deposit. + * + * The former can happen in cases like a slash; the latter when a fully unbonded account + * is still receiving staking rewards in `RewardDestination::Staked`. + * + * It can be called by anyone, as long as `stash` meets the above requirements. + * + * Refunds the transaction fees upon successful execution. + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MaxUnlockingChunks`. + * - Storage changes: Can't increase storage, only decrease it. + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt instantly (as soon as this function is completed successfully). + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: MultiAddress +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. This + * should report all the storage items that will be deleted by clearing old era history. + * Needed to report an accurate weight for the dispatch. Trusted by `Root` to report an + * accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Weight: O(E) + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, + * ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId32[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt instantly (as soon as this function is completed successfully). + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Update the various staking configurations . + * + * * `min_nominator_bond`: The minimum active bond needed to be a nominator. + * * `min_validator_bond`: The minimum active bond needed to be a validator. + * * `max_nominator_count`: The max number of users who can be a nominator at once. When + * set to `None`, no limit is enforced. + * * `max_validator_count`: The max number of users who can be a validator at once. When + * set to `None`, no limit is enforced. + * * `chill_threshold`: The ratio of `max_nominator_count` or `max_validator_count` which + * should be filled in order for the `chill_other` transaction to work. + * * `min_commission`: The minimum amount of commission that each validators must maintain. + * This is checked only upon calling `validate`. Existing validators are not affected. + * + * Origin must be Root to call this function. + * + * NOTE: Existing nominators and validators will not be affected by this update. + * to kick people under the new limits, `chill_other` should be called. + */ +export interface StakingCall_set_staking_configs { + __kind: 'set_staking_configs' + minNominatorBond: ConfigOp + minValidatorBond: ConfigOp + maxNominatorCount: Type_250 + maxValidatorCount: Type_250 + chillThreshold: Type_251 + minCommission: Type_252 +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * If a user encounters the `InsufficientBond` error when calling this extrinsic, + * they should call `chill` first in order to free up their bonded funds. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * Complexity O(S) where S is the number of slashing spans to remove + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: sts.bigint(), + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId32, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId32, + judgement: Type_380, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId32, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: MultiAddress, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId32, + value: sts.bigint(), + tip: sts.bigint(), + }), + } +}) + +export const Type_380: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export type Type_380 = Type_380_Approve | Type_380_Rebid | Type_380_Reject + +export interface Type_380_Approve { + __kind: 'Approve' +} + +export interface Type_380_Rebid { + __kind: 'Rebid' +} + +export interface Type_380_Reject { + __kind: 'Reject' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: bigint +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * pallet to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId32 + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId32 + judgement: Type_380 +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin forgives + * (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to + * society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId32 + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured + * payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be approved (`true`) or + * rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: MultiAddress + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId32 + value: bigint + tip: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: Id, + }), + force_lease: sts.enumStruct({ + para: Id, + leaser: AccountId32, + amount: sts.bigint(), + periodBegin: sts.number(), + periodCount: sts.number(), + }), + trigger_onboard: sts.enumStruct({ + para: Id, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * Clear all leases for a Para Id, refunding any deposits back to the original owners. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: Id +} + +/** + * Just a connect into the `lease_out` call, in case Root wants to force some lease to happen + * independently of any other on-chain mechanism to use it. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: Id + leaser: AccountId32 + amount: bigint + periodBegin: number + periodCount: number +} + +/** + * Try to onboard a parachain that has a lease for the current lease period. + * + * This function can be useful if there was some state issue with a para that should + * have onboarded, but was unable to. As long as they have a lease period, we can + * let them onboard from here. + * + * Origin must be signed, but can be called by anyone. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: SessionKeys, + proof: sts.bytes(), + }), + } +}) + +export const SessionKeys: sts.Type = sts.struct(() => { + return { + grandpa: Public, + babe: sts.bytes(), + imOnline: sts.bytes(), + paraValidator: sts.bytes(), + paraAssignment: sts.bytes(), + authorityDiscovery: sts.bytes(), + } +}) + +export const Public = sts.bytes() + +export interface SessionKeys { + grandpa: Public + babe: Bytes + imOnline: Bytes + paraValidator: Bytes + paraAssignment: Bytes + authorityDiscovery: Bytes +} + +export type Public = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be Signed and the account must be either be + * convertible to a validator ID using the chain's typical addressing system (this usually + * means being a controller account) or directly convertible into a validator ID (which + * usually means being a stash account). + * + * # + * - Complexity: `O(1)` in number of key types. Actual cost depends on the number of length + * of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)`. Actual cost depends on the number of length of + * `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: SessionKeys + proof: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: sts.number(), + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + schedule_after: sts.enumStruct({ + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + } +}) + +export const MaybeHashed: sts.Type = sts.closedEnum(() => { + return { + Hash: H256, + Value: Call, + } +}) + +export type MaybeHashed = MaybeHashed_Hash | MaybeHashed_Value + +export interface MaybeHashed_Hash { + __kind: 'Hash' + value: H256 +} + +export interface MaybeHashed_Value { + __kind: 'Value' + value: Call +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: number + index: number +} + +/** + * Cancel a named scheduled task. + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Schedule a named task. + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`](Self::schedule_named). + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + deregister: sts.enumStruct({ + id: Id, + }), + force_register: sts.enumStruct({ + who: AccountId32, + deposit: sts.bigint(), + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + force_remove_lock: sts.enumStruct({ + para: Id, + }), + register: sts.enumStruct({ + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + reserve: sts.unit(), + swap: sts.enumStruct({ + id: Id, + other: Id, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RegistrarCall = RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_force_remove_lock | RegistrarCall_register | RegistrarCall_reserve | RegistrarCall_swap + +/** + * Deregister a Para Id, freeing all data and returning any deposit. + * + * The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: Id +} + +/** + * Force the registration of a Para Id on the relay chain. + * + * This function must be called by a Root origin. + * + * The deposit taken can be specified for this registration. Any `ParaId` + * can be registered, including sub-1000 IDs which are System Parachains. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId32 + deposit: bigint + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Remove a manager lock from a para. This will allow the manager of a + * previously locked para to deregister or swap a para without using governance. + * + * Can only be called by the Root origin. + */ +export interface RegistrarCall_force_remove_lock { + __kind: 'force_remove_lock' + para: Id +} + +/** + * Register head data and validation code for a reserved Para Id. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. + * - `id`: The para ID. Must be owned/managed by the `origin` signing account. + * - `genesis_head`: The genesis head data of the parachain/thread. + * - `validation_code`: The initial validation code of the parachain/thread. + * + * ## Deposits/Fees + * The origin signed account must reserve a corresponding deposit for the registration. Anything already + * reserved previously for this para ID is accounted for. + * + * ## Events + * The `Registered` event is emitted in case of success. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Reserve a Para Id on the relay chain. + * + * This function will reserve a new Para Id to be owned/managed by the origin account. + * The origin account is able to register head data and validation code using `register` to create + * a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID. + * + * ## Deposits/Fees + * The origin must reserve a deposit of `ParaDeposit` for the registration. + * + * ## Events + * The `Reserved` event is emitted in case of success, which provides the ID reserved for use. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * Swap a parachain with another parachain or parathread. + * + * The origin must be Root, the `para` owner, or the `para` itself. + * + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: Id + other: Id +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId32, + call: Call, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId32, + }), + claim_recovery: sts.enumStruct({ + account: AccountId32, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId32, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId32), + threshold: sts.number(), + delayPeriod: sts.number(), + }), + initiate_recovery: sts.enumStruct({ + account: AccountId32, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId32, + rescuer: AccountId32, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId32, + rescuer: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId32 + call: Call +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId32 +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully recovered by + * you. + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId32 +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId32 +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. Should be + * ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt before the + * account can be recovered. Should be less than or equal to the length of the list of + * friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized that + * needs to pass before the account can be recovered. + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId32[] + threshold: number + delayPeriod: number +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account needs to be + * recoverable (i.e. have a recovery configuration). + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId32 +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId32 + rescuer: AccountId32 +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId32 + rescuer: AccountId32 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: AccountId32, + proxyType: ProxyType, + delay: sts.number(), + }), + announce: sts.enumStruct({ + real: AccountId32, + callHash: H256, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + delay: sts.number(), + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId32, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId32, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + proxy_announced: sts.enumStruct({ + delegate: AccountId32, + real: AccountId32, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + reject_announcement: sts.enumStruct({ + delegate: AccountId32, + callHash: H256, + }), + remove_announcement: sts.enumStruct({ + real: AccountId32, + callHash: H256, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: AccountId32, + proxyType: ProxyType, + delay: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: AccountId32 + proxyType: ProxyType + delay: number +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: AccountId32 + callHash: H256 +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + * TODO: Might be over counting 1 read + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: number + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId32 + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId32 + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Dispatch the given `call` from an account that the sender is authorized for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: AccountId32 + real: AccountId32 + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: AccountId32 + callHash: H256 +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: AccountId32 + callHash: H256 +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: AccountId32 + proxyType: ProxyType + delay: number +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Society | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Society { + __kind: 'Society' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PreimageCall: sts.Type = sts.closedEnum(() => { + return { + note_preimage: sts.enumStruct({ + bytes: sts.bytes(), + }), + request_preimage: sts.enumStruct({ + hash: H256, + }), + unnote_preimage: sts.enumStruct({ + hash: H256, + }), + unrequest_preimage: sts.enumStruct({ + hash: H256, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PreimageCall = PreimageCall_note_preimage | PreimageCall_request_preimage | PreimageCall_unnote_preimage | PreimageCall_unrequest_preimage + +/** + * Register a preimage on-chain. + * + * If the preimage was previously requested, no fees or deposits are taken for providing + * the preimage. Otherwise, a deposit is taken proportional to the size of the preimage. + */ +export interface PreimageCall_note_preimage { + __kind: 'note_preimage' + bytes: Bytes +} + +/** + * Request a preimage be uploaded to the chain without paying any fees or deposits. + * + * If the preimage requests has already been provided on-chain, we unreserve any deposit + * a user may have paid, and take the control of the preimage out of their hands. + */ +export interface PreimageCall_request_preimage { + __kind: 'request_preimage' + hash: H256 +} + +/** + * Clear an unrequested preimage from the runtime storage. + */ +export interface PreimageCall_unnote_preimage { + __kind: 'unnote_preimage' + hash: H256 +} + +/** + * Clear a previously made request for a preimage. + * + * NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. + */ +export interface PreimageCall_unrequest_preimage { + __kind: 'unrequest_preimage' + hash: H256 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PhragmenElectionCall: sts.Type = sts.closedEnum(() => { + return { + clean_defunct_voters: sts.enumStruct({ + numVoters: sts.number(), + numDefunct: sts.number(), + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + hasReplacement: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId32), + value: sts.bigint(), + }), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PhragmenElectionCall = PhragmenElectionCall_clean_defunct_voters | PhragmenElectionCall_remove_member | PhragmenElectionCall_remove_voter | PhragmenElectionCall_renounce_candidacy | PhragmenElectionCall_submit_candidacy | PhragmenElectionCall_vote + +/** + * Clean all voters who are defunct (i.e. they do not serve any purpose at all). The + * deposit of the removed voters are returned. + * + * This is an root function to be used only for cleaning the state. + * + * The dispatch origin of this call must be root. + * + * # + * The total number of voters and those that are defunct must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_clean_defunct_voters { + __kind: 'clean_defunct_voters' + numVoters: number + numDefunct: number +} + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, a new phragmen election is started. + * + * The dispatch origin of this call must be root. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement, we use a small weight. Else, since this is a root call and + * will go into phragmen, we assume full block for now. + * # + */ +export interface PhragmenElectionCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + hasReplacement: boolean +} + +/** + * Remove `origin` as a voter. + * + * This removes the lock and returns the deposit. + * + * The dispatch origin of this call must be signed and be a voter. + */ +export interface PhragmenElectionCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * + * - `origin` is a candidate and not elected in any set. In this case, the deposit is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the deposit is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the deposit is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_member`](Self::remove_member), if replacement runners exists, they + * are immediately used. If the prime is renouncing, then no prime will exist until the + * next round. + * + * The dispatch origin of this call must be signed, and have one of the above roles. + * + * # + * The type of renouncing must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Submit oneself for candidacy. A fixed amount of deposit is recorded. + * + * All candidates are wiped at the end of the term. They either become a member/runner-up, + * or leave the system while their deposit is slashed. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`] + * to get their deposit back. Losing the spot in an election will always lead to a slash. + * + * # + * The number of current candidates must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is + * reserved. The deposit is based on the number of votes and can be updated over time. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * If `value` is more than `who`'s free balance, then the maximum of the two is used. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * It is the responsibility of the caller to **NOT** place all of their balance into the + * lock and keep some for further operations. + * + * # + * We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less. + * # + */ +export interface PhragmenElectionCall_vote { + __kind: 'vote' + votes: AccountId32[] + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasSharedCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasDisputesCall: sts.Type = sts.closedEnum(() => { + return { + force_unfreeze: sts.unit(), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasDisputesCall = ParasDisputesCall_force_unfreeze + +export interface ParasDisputesCall_force_unfreeze { + __kind: 'force_unfreeze' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + add_trusted_validation_code: sts.enumStruct({ + validationCode: ValidationCode, + }), + force_note_new_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: Id, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + relayParentNumber: sts.number(), + }), + force_set_current_code: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + include_pvf_check_statement: sts.enumStruct({ + stmt: V2PvfCheckStatement, + signature: sts.bytes(), + }), + poke_unused_validation_code: sts.enumStruct({ + validationCodeHash: ValidationCodeHash, + }), + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const V2PvfCheckStatement: sts.Type = sts.struct(() => { + return { + accept: sts.boolean(), + subject: ValidationCodeHash, + sessionIndex: sts.number(), + validatorIndex: V2ValidatorIndex, + } +}) + +export const V2ValidatorIndex = sts.number() + +export interface V2PvfCheckStatement { + accept: boolean + subject: ValidationCodeHash + sessionIndex: number + validatorIndex: V2ValidatorIndex +} + +export type V2ValidatorIndex = number + +export type ValidationCodeHash = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasCall = ParasCall_add_trusted_validation_code | ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head | ParasCall_include_pvf_check_statement | ParasCall_poke_unused_validation_code + +/** + * Adds the validation code to the storage. + * + * The code will not be added if it is already present. Additionally, if PVF pre-checking + * is running for that code, it will be instantly accepted. + * + * Otherwise, the code will be added into the storage. Note that the code will be added + * into storage with reference count 0. This is to account the fact that there are no users + * for this code yet. The caller will have to make sure that this code eventually gets + * used by some parachain or removed from the storage to avoid storage leaks. For the latter + * prefer to use the `poke_unused_validation_code` dispatchable to raw storage manipulation. + * + * This function is mainly meant to be used for upgrading parachains that do not follow + * the go-ahead signal while the PVF pre-checking feature is enabled. + */ +export interface ParasCall_add_trusted_validation_code { + __kind: 'add_trusted_validation_code' + validationCode: ValidationCode +} + +/** + * Note a new block head for para within the context of the current block. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: Id + newHead: HeadData +} + +/** + * Put a parachain directly into the next session's action queue. + * We can't queue it any sooner than this without going into the + * initializer... + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: Id +} + +/** + * Schedule an upgrade as if it was scheduled in the given relay parent block. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: Id + newCode: ValidationCode + relayParentNumber: number +} + +/** + * Set the storage for the parachain validation code immediately. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: Id + newCode: ValidationCode +} + +/** + * Set the storage for the current parachain head data immediately. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: Id + newHead: HeadData +} + +/** + * Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and + * enacts the results if that was the last vote before achieving the supermajority. + */ +export interface ParasCall_include_pvf_check_statement { + __kind: 'include_pvf_check_statement' + stmt: V2PvfCheckStatement + signature: Bytes +} + +/** + * Remove the validation code from the storage iff the reference count is 0. + * + * This is better than removing the storage directly, because it will not remove the code + * that was suddenly got used by some parachain while this dispatchable was pending + * dispatching. + */ +export interface ParasCall_poke_unused_validation_code { + __kind: 'poke_unused_validation_code' + validationCodeHash: ValidationCodeHash +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: V2InherentData, + }), + } +}) + +export const V2InherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => V2UncheckedSigned), + backedCandidates: sts.array(() => V2BackedCandidate), + disputes: sts.array(() => V2DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: H256, + number: sts.number(), + stateRoot: H256, + extrinsicsRoot: H256, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + Consensus: sts.tuple(() => [sts.bytes(), sts.bytes()]), + Other: sts.bytes(), + PreRuntime: sts.tuple(() => [sts.bytes(), sts.bytes()]), + RuntimeEnvironmentUpdated: sts.unit(), + Seal: sts.tuple(() => [sts.bytes(), sts.bytes()]), + } +}) + +export type DigestItem = DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: [Bytes, Bytes] +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: [Bytes, Bytes] +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: [Bytes, Bytes] +} + +export interface Digest { + logs: DigestItem[] +} + +export interface Header { + parentHash: H256 + number: number + stateRoot: H256 + extrinsicsRoot: H256 + digest: Digest +} + +export const V2DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: sts.number(), + statements: sts.array(() => sts.tuple(() => [V2DisputeStatement, V2ValidatorIndex, sts.bytes()])), + } +}) + +export const V2DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: V2InvalidDisputeStatementKind, + Valid: V2ValidDisputeStatementKind, + } +}) + +export const V2ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + BackingSeconded: H256, + BackingValid: H256, + Explicit: sts.unit(), + } +}) + +export type V2ValidDisputeStatementKind = V2ValidDisputeStatementKind_ApprovalChecking | V2ValidDisputeStatementKind_BackingSeconded | V2ValidDisputeStatementKind_BackingValid | V2ValidDisputeStatementKind_Explicit + +export interface V2ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface V2ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: H256 +} + +export interface V2ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: H256 +} + +export interface V2ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export const V2InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export type V2InvalidDisputeStatementKind = V2InvalidDisputeStatementKind_Explicit + +export interface V2InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type V2DisputeStatement = V2DisputeStatement_Invalid | V2DisputeStatement_Valid + +export interface V2DisputeStatement_Invalid { + __kind: 'Invalid' + value: V2InvalidDisputeStatementKind +} + +export interface V2DisputeStatement_Valid { + __kind: 'Valid' + value: V2ValidDisputeStatementKind +} + +export const CandidateHash = sts.bytes() + +export interface V2DisputeStatementSet { + candidateHash: CandidateHash + session: number + statements: [V2DisputeStatement, V2ValidatorIndex, Bytes][] +} + +export type CandidateHash = Bytes + +export const V2BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: V2CommittedCandidateReceipt, + validityVotes: sts.array(() => V2ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const V2ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.bytes(), + Implicit: sts.bytes(), + } +}) + +export type V2ValidityAttestation = V2ValidityAttestation_Explicit | V2ValidityAttestation_Implicit + +export interface V2ValidityAttestation_Explicit { + __kind: 'Explicit' + value: Bytes +} + +export interface V2ValidityAttestation_Implicit { + __kind: 'Implicit' + value: Bytes +} + +export const V2CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: V2CandidateDescriptor, + commitments: V2CandidateCommitments, + } +}) + +export const V2CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => sts.bytes()), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: sts.number(), + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: Id, + data: sts.bytes(), + } +}) + +export interface OutboundHrmpMessage { + recipient: Id + data: Bytes +} + +export interface V2CandidateCommitments { + upwardMessages: Bytes[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: number +} + +export const V2CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: Id, + relayParent: H256, + collator: V2Public, + persistedValidationDataHash: H256, + povHash: H256, + erasureRoot: H256, + signature: V2Signature, + paraHead: H256, + validationCodeHash: ValidationCodeHash, + } +}) + +export const V2Signature = sts.bytes() + +export const V2Public = sts.bytes() + +export interface V2CandidateDescriptor { + paraId: Id + relayParent: H256 + collator: V2Public + persistedValidationDataHash: H256 + povHash: H256 + erasureRoot: H256 + signature: V2Signature + paraHead: H256 + validationCodeHash: ValidationCodeHash +} + +export type V2Signature = Bytes + +export type V2Public = Bytes + +export interface V2CommittedCandidateReceipt { + descriptor: V2CandidateDescriptor + commitments: V2CandidateCommitments +} + +export interface V2BackedCandidate { + candidate: V2CommittedCandidateReceipt + validityVotes: V2ValidityAttestation[] + validatorIndices: BitSequence +} + +export const V2UncheckedSigned: sts.Type = sts.struct(() => { + return { + payload: V2AvailabilityBitfield, + validatorIndex: V2ValidatorIndex, + signature: sts.bytes(), + } +}) + +export const V2AvailabilityBitfield = sts.bitseq() + +export interface V2UncheckedSigned { + payload: V2AvailabilityBitfield + validatorIndex: V2ValidatorIndex + signature: Bytes +} + +export type V2AvailabilityBitfield = BitSequence + +export interface V2InherentData { + bitfields: V2UncheckedSigned[] + backedCandidates: V2BackedCandidate[] + disputes: V2DisputeStatementSet[] + parentHeader: Header +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInherentCall = ParaInherentCall_enter + +/** + * Enter the paras inherent. This will process bitfields and backed candidates. + */ +export interface ParaInherentCall_enter { + __kind: 'enter' + data: V2InherentData +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInclusionCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const NominationPoolsCall: sts.Type = sts.closedEnum(() => { + return { + bond_extra: sts.enumStruct({ + extra: BondExtra, + }), + chill: sts.enumStruct({ + poolId: sts.number(), + }), + claim_payout: sts.unit(), + create: sts.enumStruct({ + amount: sts.bigint(), + root: AccountId32, + nominator: AccountId32, + stateToggler: AccountId32, + }), + join: sts.enumStruct({ + amount: sts.bigint(), + poolId: sts.number(), + }), + nominate: sts.enumStruct({ + poolId: sts.number(), + validators: sts.array(() => AccountId32), + }), + pool_withdraw_unbonded: sts.enumStruct({ + poolId: sts.number(), + numSlashingSpans: sts.number(), + }), + set_configs: sts.enumStruct({ + minJoinBond: Type_485, + minCreateBond: Type_485, + maxPools: Type_486, + maxMembers: Type_486, + maxMembersPerPool: Type_486, + }), + set_metadata: sts.enumStruct({ + poolId: sts.number(), + metadata: sts.bytes(), + }), + set_state: sts.enumStruct({ + poolId: sts.number(), + state: PoolState, + }), + unbond: sts.enumStruct({ + memberAccount: AccountId32, + unbondingPoints: sts.bigint(), + }), + update_roles: sts.enumStruct({ + poolId: sts.number(), + newRoot: Type_487, + newNominator: Type_487, + newStateToggler: Type_487, + }), + withdraw_unbonded: sts.enumStruct({ + memberAccount: AccountId32, + numSlashingSpans: sts.number(), + }), + } +}) + +export const Type_487: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: AccountId32, + } +}) + +export type Type_487 = Type_487_Noop | Type_487_Remove | Type_487_Set + +export interface Type_487_Noop { + __kind: 'Noop' +} + +export interface Type_487_Remove { + __kind: 'Remove' +} + +export interface Type_487_Set { + __kind: 'Set' + value: AccountId32 +} + +export const PoolState: sts.Type = sts.closedEnum(() => { + return { + Blocked: sts.unit(), + Destroying: sts.unit(), + Open: sts.unit(), + } +}) + +export type PoolState = PoolState_Blocked | PoolState_Destroying | PoolState_Open + +export interface PoolState_Blocked { + __kind: 'Blocked' +} + +export interface PoolState_Destroying { + __kind: 'Destroying' +} + +export interface PoolState_Open { + __kind: 'Open' +} + +export const Type_486: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_486 = Type_486_Noop | Type_486_Remove | Type_486_Set + +export interface Type_486_Noop { + __kind: 'Noop' +} + +export interface Type_486_Remove { + __kind: 'Remove' +} + +export interface Type_486_Set { + __kind: 'Set' + value: number +} + +export const Type_485: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type Type_485 = Type_485_Noop | Type_485_Remove | Type_485_Set + +export interface Type_485_Noop { + __kind: 'Noop' +} + +export interface Type_485_Remove { + __kind: 'Remove' +} + +export interface Type_485_Set { + __kind: 'Set' + value: bigint +} + +export const BondExtra: sts.Type = sts.closedEnum(() => { + return { + FreeBalance: sts.bigint(), + Rewards: sts.unit(), + } +}) + +export type BondExtra = BondExtra_FreeBalance | BondExtra_Rewards + +export interface BondExtra_FreeBalance { + __kind: 'FreeBalance' + value: bigint +} + +export interface BondExtra_Rewards { + __kind: 'Rewards' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type NominationPoolsCall = NominationPoolsCall_bond_extra | NominationPoolsCall_chill | NominationPoolsCall_claim_payout | NominationPoolsCall_create | NominationPoolsCall_join | NominationPoolsCall_nominate | NominationPoolsCall_pool_withdraw_unbonded | NominationPoolsCall_set_configs | NominationPoolsCall_set_metadata | NominationPoolsCall_set_state | NominationPoolsCall_unbond | NominationPoolsCall_update_roles | NominationPoolsCall_withdraw_unbonded + +/** + * Bond `extra` more funds from `origin` into the pool to which they already belong. + * + * Additional funds can come from either the free balance of the account, of from the + * accumulated rewards, see [`BondExtra`]. + */ +export interface NominationPoolsCall_bond_extra { + __kind: 'bond_extra' + extra: BondExtra +} + +/** + * Chill on behalf of the pool. + * + * The dispatch origin of this call must be signed by the pool nominator or the pool + * root role, same as [`Pallet::nominate`]. + * + * This directly forward the call to the staking pallet, on behalf of the pool bonded + * account. + */ +export interface NominationPoolsCall_chill { + __kind: 'chill' + poolId: number +} + +/** + * A bonded member can use this to claim their payout based on the rewards that the pool + * has accumulated since their last claimed payout (OR since joining if this is there first + * time claiming rewards). The payout will be transferred to the member's account. + * + * The member will earn rewards pro rata based on the members stake vs the sum of the + * members in the pools stake. Rewards do not "expire". + */ +export interface NominationPoolsCall_claim_payout { + __kind: 'claim_payout' +} + +/** + * Create a new delegation pool. + * + * # Arguments + * + * * `amount` - The amount of funds to delegate to the pool. This also acts of a sort of + * deposit since the pools creator cannot fully unbond funds until the pool is being + * destroyed. + * * `index` - A disambiguation index for creating the account. Likely only useful when + * creating multiple pools in the same extrinsic. + * * `root` - The account to set as [`PoolRoles::root`]. + * * `nominator` - The account to set as the [`PoolRoles::nominator`]. + * * `state_toggler` - The account to set as the [`PoolRoles::state_toggler`]. + * + * # Note + * + * In addition to `amount`, the caller will transfer the existential deposit; so the caller + * needs at have at least `amount + existential_deposit` transferrable. + */ +export interface NominationPoolsCall_create { + __kind: 'create' + amount: bigint + root: AccountId32 + nominator: AccountId32 + stateToggler: AccountId32 +} + +/** + * Stake funds with a pool. The amount to bond is transferred from the member to the + * pools account and immediately increases the pools bond. + * + * # Note + * + * * An account can only be a member of a single pool. + * * An account cannot join the same pool multiple times. + * * This call will *not* dust the member account, so the member must have at least + * `existential deposit + amount` in their account. + * * Only a pool with [`PoolState::Open`] can be joined + */ +export interface NominationPoolsCall_join { + __kind: 'join' + amount: bigint + poolId: number +} + +/** + * Nominate on behalf of the pool. + * + * The dispatch origin of this call must be signed by the pool nominator or the pool + * root role. + * + * This directly forward the call to the staking pallet, on behalf of the pool bonded + * account. + */ +export interface NominationPoolsCall_nominate { + __kind: 'nominate' + poolId: number + validators: AccountId32[] +} + +/** + * Call `withdraw_unbonded` for the pools account. This call can be made by any account. + * + * This is useful if their are too many unlocking chunks to call `unbond`, and some + * can be cleared by withdrawing. In the case there are too many unlocking chunks, the user + * would probably see an error like `NoMoreChunks` emitted from the staking system when + * they attempt to unbond. + */ +export interface NominationPoolsCall_pool_withdraw_unbonded { + __kind: 'pool_withdraw_unbonded' + poolId: number + numSlashingSpans: number +} + +/** + * Update configurations for the nomination pools. The origin for this call must be + * Root. + * + * # Arguments + * + * * `min_join_bond` - Set [`MinJoinBond`]. + * * `min_create_bond` - Set [`MinCreateBond`]. + * * `max_pools` - Set [`MaxPools`]. + * * `max_members` - Set [`MaxPoolMembers`]. + * * `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]. + */ +export interface NominationPoolsCall_set_configs { + __kind: 'set_configs' + minJoinBond: Type_485 + minCreateBond: Type_485 + maxPools: Type_486 + maxMembers: Type_486 + maxMembersPerPool: Type_486 +} + +/** + * Set a new metadata for the pool. + * + * The dispatch origin of this call must be signed by the state toggler, or the root role + * of the pool. + */ +export interface NominationPoolsCall_set_metadata { + __kind: 'set_metadata' + poolId: number + metadata: Bytes +} + +/** + * Set a new state for the pool. + * + * The dispatch origin of this call must be signed by the state toggler, or the root role + * of the pool. + */ +export interface NominationPoolsCall_set_state { + __kind: 'set_state' + poolId: number + state: PoolState +} + +/** + * Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It + * implicitly collects the rewards one last time, since not doing so would mean some + * rewards would be forfeited. + * + * Under certain conditions, this call can be dispatched permissionlessly (i.e. by any + * account). + * + * # Conditions for a permissionless dispatch. + * + * * The pool is blocked and the caller is either the root or state-toggler. This is + * refereed to as a kick. + * * The pool is destroying and the member is not the depositor. + * * The pool is destroying, the member is the depositor and no other members are in the + * pool. + * + * ## Conditions for permissioned dispatch (i.e. the caller is also the + * `member_account`): + * + * * The caller is not the depositor. + * * The caller is the depositor, the pool is destroying and no other members are in the + * pool. + * + * # Note + * + * If there are too many unlocking chunks to unbond with the pool account, + * [`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks. If + * there are too many unlocking chunks, the result of this call will likely be the + * `NoMoreChunks` error from the staking system. + */ +export interface NominationPoolsCall_unbond { + __kind: 'unbond' + memberAccount: AccountId32 + unbondingPoints: bigint +} + +/** + * Update the roles of the pool. + * + * The root is the only entity that can change any of the roles, including itself, + * excluding the depositor, who can never change. + * + * It emits an event, notifying UIs of the role change. This event is quite relevant to + * most pool members and they should be informed of changes to pool roles. + */ +export interface NominationPoolsCall_update_roles { + __kind: 'update_roles' + poolId: number + newRoot: Type_487 + newNominator: Type_487 + newStateToggler: Type_487 +} + +/** + * Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an + * error is returned. + * + * Under certain conditions, this call can be dispatched permissionlessly (i.e. by any + * account). + * + * # Conditions for a permissionless dispatch + * + * * The pool is in destroy mode and the target is not the depositor. + * * The target is the depositor and they are the only member in the sub pools. + * * The pool is blocked and the caller is either the root or state-toggler. + * + * # Conditions for permissioned dispatch + * + * * The caller is the target and they are not the depositor. + * + * # Note + * + * If the target is the depositor, the pool will be destroyed. + */ +export interface NominationPoolsCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + memberAccount: AccountId32 + numSlashingSpans: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: sts.bigint(), + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + call: sts.bytes(), + storeCall: sts.boolean(), + maxWeight: sts.bigint(), + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId32), + call: Call, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: sts.number(), + index: sts.number(), + } +}) + +export interface Timepoint { + height: number + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: bigint +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + call: Bytes + storeCall: boolean + maxWeight: bigint +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId32[] + call: Call +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId32[] + timepoint: Timepoint + callHash: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const InitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type InitializerCall = InitializerCall_force_approve + +/** + * Issue a signal to the consensus engine to forcibly act as though all parachain + * blocks in all relay chain blocks up to and including the given number in the current + * chain are valid and should be finalized. + */ +export interface InitializerCall_force_approve { + __kind: 'force_approve' + upTo: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: sts.number(), + }), + force_transfer: sts.enumStruct({ + new: AccountId32, + index: sts.number(), + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: sts.number(), + }), + freeze: sts.enumStruct({ + index: sts.number(), + }), + transfer: sts.enumStruct({ + new: AccountId32, + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: number +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId32 + index: number + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: number +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the + * deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: number +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: sts.bytes(), + }), + } +}) + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: sts.number(), + networkState: OpaqueNetworkState, + sessionIndex: sts.number(), + authorityIndex: sts.number(), + validatorsLen: sts.number(), + } +}) + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export interface Heartbeat { + blockNumber: number + networkState: OpaqueNetworkState + sessionIndex: number + authorityIndex: number + validatorsLen: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is + * length of `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Bytes +} + +/** + * Identity pallet declaration. + */ +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId32, + }), + add_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: sts.number(), + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: MultiAddress, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: MultiAddress, + judgement: Judgement, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: MultiAddress, + }), + rename_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId32, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: BitFlags, + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId32, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => sts.tuple(() => [Data, Data])), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => sts.bytes()), + image: Data, + twitter: Data, + } +}) + +export interface IdentityInfo { + additional: [Data, Data][] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (Bytes | undefined) + image: Data + twitter: Data +} + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: Bytes +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: Bytes +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: Bytes +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: Bytes +} + +export const BitFlags = sts.bigint() + +export const Judgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: sts.bigint(), + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export type Judgement = Judgement_Erroneous | Judgement_FeePaid | Judgement_KnownGood | Judgement_LowQuality | Judgement_OutOfDate | Judgement_Reasonable | Judgement_Unknown + +export interface Judgement_Erroneous { + __kind: 'Erroneous' +} + +export interface Judgement_FeePaid { + __kind: 'FeePaid' + value: bigint +} + +export interface Judgement_KnownGood { + __kind: 'KnownGood' +} + +export interface Judgement_LowQuality { + __kind: 'LowQuality' +} + +export interface Judgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface Judgement_Reasonable { + __kind: 'Reasonable' +} + +export interface Judgement_Unknown { + __kind: 'Unknown' +} + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: sts.bytes(), + Keccak256: sts.bytes(), + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: sts.bytes(), + ShaThree256: sts.bytes(), + } +}) + +/** + * Identity pallet declaration. + */ +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId32 +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: MultiAddress + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: number +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: MultiAddress +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: MultiAddress + judgement: Judgement +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: MultiAddress +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: MultiAddress + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId32 +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: BitFlags +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId32, Data][] +} + +export type BitFlags = bigint + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const HrmpCall: sts.Type = sts.closedEnum(() => { + return { + force_clean_hrmp: sts.enumStruct({ + para: Id, + inbound: sts.number(), + outbound: sts.number(), + }), + force_process_hrmp_close: sts.enumStruct({ + channels: sts.number(), + }), + force_process_hrmp_open: sts.enumStruct({ + channels: sts.number(), + }), + hrmp_accept_open_channel: sts.enumStruct({ + sender: Id, + }), + hrmp_cancel_open_request: sts.enumStruct({ + channelId: HrmpChannelId, + openRequests: sts.number(), + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: Id, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: Id, + recipient: Id, + } +}) + +export interface HrmpChannelId { + sender: Id + recipient: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type HrmpCall = HrmpCall_force_clean_hrmp | HrmpCall_force_process_hrmp_close | HrmpCall_force_process_hrmp_open | HrmpCall_hrmp_accept_open_channel | HrmpCall_hrmp_cancel_open_request | HrmpCall_hrmp_close_channel | HrmpCall_hrmp_init_open_channel + +/** + * This extrinsic triggers the cleanup of all the HRMP storage items that + * a para may have. Normally this happens once per session, but this allows + * you to trigger the cleanup immediately for a specific parachain. + * + * Origin must be Root. + * + * Number of inbound and outbound channels for `para` must be provided as witness data of weighing. + */ +export interface HrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: Id + inbound: number + outbound: number +} + +/** + * Force process HRMP close channel requests. + * + * If there are pending HRMP close channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of closing channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' + channels: number +} + +/** + * Force process HRMP open channel requests. + * + * If there are pending HRMP open channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of opening channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' + channels: number +} + +/** + * Accept a pending open channel request from the given sender. + * + * The channel will be opened only on the next session boundary. + */ +export interface HrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: Id +} + +/** + * This cancels a pending open channel request. It can be canceled by either of the sender + * or the recipient for that request. The origin must be either of those. + * + * The cancellation happens immediately. It is not possible to cancel the request if it is + * already accepted. + * + * Total number of open requests (i.e. `HrmpOpenChannelRequestsList`) must be provided as + * witness data. + */ +export interface HrmpCall_hrmp_cancel_open_request { + __kind: 'hrmp_cancel_open_request' + channelId: HrmpChannelId + openRequests: number +} + +/** + * Initiate unilateral closing of a channel. The origin must be either the sender or the + * recipient in the channel being closed. + * + * The closure can only happen on a session change. + */ +export interface HrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * Initiate opening a channel from a parachain to a given recipient with given channel + * parameters. + * + * - `proposed_max_capacity` - specifies how many messages can be in the channel at once. + * - `proposed_max_message_size` - specifies the maximum size of the messages. + * + * These numbers are a subject to the relay-chain configuration limits. + * + * The channel can be opened only after the recipient confirms it and only on a session + * change. + */ +export interface HrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: Id + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: sts.number(), + bestFinalizedBlockNumber: sts.number(), + }), + report_equivocation: sts.enumStruct({ + equivocationProof: Type_271, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_271, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: sts.number(), + trieNodes: sts.array(() => sts.bytes()), + validatorCount: sts.number(), + } +}) + +export interface MembershipProof { + session: number + trieNodes: Bytes[] + validatorCount: number +} + +export const Type_271: sts.Type = sts.struct(() => { + return { + setId: sts.bigint(), + equivocation: Equivocation, + } +}) + +export const Equivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: Type_278, + Prevote: Type_273, + } +}) + +export const Type_273: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Prevote, sts.bytes()]), + second: sts.tuple(() => [Prevote, sts.bytes()]), + } +}) + +export const Prevote: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Prevote { + targetHash: H256 + targetNumber: number +} + +export interface Type_273 { + roundNumber: bigint + identity: Public + first: [Prevote, Bytes] + second: [Prevote, Bytes] +} + +export const Type_278: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Precommit, sts.bytes()]), + second: sts.tuple(() => [Precommit, sts.bytes()]), + } +}) + +export const Precommit: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Precommit { + targetHash: H256 + targetNumber: number +} + +export interface Type_278 { + roundNumber: bigint + identity: Public + first: [Precommit, Bytes] + second: [Precommit, Bytes] +} + +export type Equivocation = Equivocation_Precommit | Equivocation_Prevote + +export interface Equivocation_Precommit { + __kind: 'Precommit' + value: Type_278 +} + +export interface Equivocation_Prevote { + __kind: 'Prevote' + value: Type_273 +} + +export interface Type_271 { + setId: bigint + equivocation: Equivocation +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has stalled. + * + * This will trigger a forced authority set change at the beginning of the next session, to + * be enacted `delay` blocks after that. The `delay` should be high enough to safely assume + * that the block signalling the forced change will not be re-orged e.g. 1000 blocks. + * The block production rate (which may be slowed down because of finality lagging) should + * be taken into account when choosing the `delay`. The GRANDPA voters based on the new + * authority will start voting on top of `best_finalized_block_number` for new finalized + * blocks. `best_finalized_block_number` should be the highest of the latest finalized + * block of all validators of the new authority set. + * + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: number + bestFinalizedBlockNumber: number +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_271 + keyOwnerProof: MembershipProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_271 + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GiltCall: sts.Type = sts.closedEnum(() => { + return { + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + set_target: sts.enumStruct({ + target: sts.bigint(), + }), + thaw: sts.enumStruct({ + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GiltCall = GiltCall_place_bid | GiltCall_retract_bid | GiltCall_set_target | GiltCall_thaw + +/** + * Place a bid for a gilt to be issued. + * + * Origin must be Signed, and account must have at least `amount` in free balance. + * + * - `amount`: The amount of the bid; these funds will be reserved. If the bid is + * successfully elevated into an issued gilt, then these funds will continue to be + * reserved until the gilt expires. Must be at least `MinFreeze`. + * - `duration`: The number of periods for which the funds will be locked if the gilt is + * issued. It will expire only after this period has elapsed after the point of issuance. + * Must be greater than 1 and no more than `QueueCount`. + * + * Complexities: + * - `Queues[duration].len()` (just take max). + */ +export interface GiltCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * Retract a previously placed bid. + * + * Origin must be Signed, and the account should have previously issued a still-active bid + * of `amount` for `duration`. + * + * - `amount`: The amount of the previous bid. + * - `duration`: The duration of the previous bid. + */ +export interface GiltCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * Set target proportion of gilt-funds. + * + * Origin must be `AdminOrigin`. + * + * - `target`: The target proportion of effective issued funds that should be under gilts + * at any one time. + */ +export interface GiltCall_set_target { + __kind: 'set_target' + target: bigint +} + +/** + * Remove an active but expired gilt. Reserved funds under gilt are freed and balance is + * adjusted to ensure that the funds grow or shrink to maintain the equivalent proportion + * of effective total issued funds. + * + * Origin must be Signed and the account must be the owner of the gilt of the given index. + * + * - `index`: The index of the gilt to be thawed. + */ +export interface GiltCall_thaw { + __kind: 'thaw' + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + governance_fallback: sts.enumStruct({ + maybeMaxVoters: sts.option(() => sts.number()), + maybeMaxTargets: sts.option(() => sts.number()), + }), + set_emergency_election_result: sts.enumStruct({ + supports: sts.array(() => sts.tuple(() => [AccountId32, Support])), + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => ElectionScore), + }), + submit: sts.enumStruct({ + rawSolution: RawSolution, + }), + submit_unsigned: sts.enumStruct({ + rawSolution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export const RawSolution: sts.Type = sts.struct(() => { + return { + solution: NposCompactSolution24, + score: ElectionScore, + round: sts.number(), + } +}) + +export const NposCompactSolution24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), + votes2: sts.array(() => sts.tuple(() => [sts.number(), sts.tuple(() => [sts.number(), sts.number()]), sts.number()])), + votes3: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes4: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes5: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes6: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes7: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes8: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes9: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes10: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes11: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes12: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes13: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes14: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes15: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes16: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes17: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes18: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes19: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes20: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes21: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes22: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes23: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes24: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + } +}) + +export interface NposCompactSolution24 { + votes1: [number, number][] + votes2: [number, [number, number], number][] + votes3: [number, [number, number][], number][] + votes4: [number, [number, number][], number][] + votes5: [number, [number, number][], number][] + votes6: [number, [number, number][], number][] + votes7: [number, [number, number][], number][] + votes8: [number, [number, number][], number][] + votes9: [number, [number, number][], number][] + votes10: [number, [number, number][], number][] + votes11: [number, [number, number][], number][] + votes12: [number, [number, number][], number][] + votes13: [number, [number, number][], number][] + votes14: [number, [number, number][], number][] + votes15: [number, [number, number][], number][] + votes16: [number, [number, number][], number][] + votes17: [number, [number, number][], number][] + votes18: [number, [number, number][], number][] + votes19: [number, [number, number][], number][] + votes20: [number, [number, number][], number][] + votes21: [number, [number, number][], number][] + votes22: [number, [number, number][], number][] + votes23: [number, [number, number][], number][] + votes24: [number, [number, number][], number][] +} + +export interface RawSolution { + solution: NposCompactSolution24 + score: ElectionScore + round: number +} + +export interface ElectionScore { + minimalStake: bigint + sumStake: bigint + sumStakeSquared: bigint +} + +export const ElectionScore: sts.Type = sts.struct(() => { + return { + minimalStake: sts.bigint(), + sumStake: sts.bigint(), + sumStakeSquared: sts.bigint(), + } +}) + +export const Support: sts.Type = sts.struct(() => { + return { + total: sts.bigint(), + voters: sts.array(() => sts.tuple(() => [AccountId32, sts.bigint()])), + } +}) + +export interface Support { + total: bigint + voters: [AccountId32, bigint][] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_governance_fallback | ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * Trigger the governance fallback. + * + * This can only be called when [`Phase::Emergency`] is enabled, as an alternative to + * calling [`Call::set_emergency_election_result`]. + */ +export interface ElectionProviderMultiPhaseCall_governance_fallback { + __kind: 'governance_fallback' + maybeMaxVoters?: (number | undefined) + maybeMaxTargets?: (number | undefined) +} + +/** + * Set a solution in the queue, to be handed out to the client of this pallet in the next + * call to `ElectionProvider::elect`. + * + * This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`. + * + * The solution is not checked for any feasibility and is assumed to be trustworthy, as any + * feasibility check itself can in principle cause the election process to fail (due to + * memory/weight constrains). + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + supports: [AccountId32, Support][] +} + +/** + * Set a new value for `MinimumUntrustedScore`. + * + * Dispatch origin must be aligned with `T::ForceOrigin`. + * + * This check can be turned off by setting the value to `None`. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (ElectionScore | undefined) +} + +/** + * Submit a solution for the signed phase. + * + * The dispatch origin fo this call must be __signed__. + * + * The solution is potentially queued, based on the claimed score and processed at the end + * of the signed phase. + * + * A deposit is reserved and recorded for the solution. Based on the outcome, the solution + * might be rewarded, slashed, or get all or a part of the deposit back. + */ +export interface ElectionProviderMultiPhaseCall_submit { + __kind: 'submit' + rawSolution: RawSolution +} + +/** + * Submit a solution for the unsigned phase. + * + * The dispatch origin fo this call must be __none__. + * + * This submission is checked on the fly. Moreover, this unsigned solution is only + * validated when submitted to the pool from the **local** node. Effectively, this means + * that only active validators can submit this transaction when authoring a block (similar + * to an inherent). + * + * To prevent any incorrect solution (and thus wasted time/weight), this transaction will + * panic if the solution submitted by the validator is invalid in any way, effectively + * putting their authoring reward at risk. + * + * No deposit or reward is associated with this submission. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + rawSolution: RawSolution + witness: SolutionOrSnapshotSize +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DmpCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + blacklist: sts.enumStruct({ + proposalHash: H256, + maybeRefIndex: sts.option(() => sts.number()), + }), + cancel_proposal: sts.enumStruct({ + propIndex: sts.number(), + }), + cancel_queued: sts.enumStruct({ + which: sts.number(), + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId32, + conviction: Conviction, + balance: sts.bigint(), + }), + emergency_cancel: sts.enumStruct({ + refIndex: sts.number(), + }), + enact_proposal: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + }), + external_propose: sts.enumStruct({ + proposalHash: H256, + }), + external_propose_default: sts.enumStruct({ + proposalHash: H256, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: H256, + }), + fast_track: sts.enumStruct({ + proposalHash: H256, + votingPeriod: sts.number(), + delay: sts.number(), + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: H256, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: H256, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId32, + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + index: sts.number(), + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId32, + }), + veto_external: sts.enumStruct({ + proposalHash: H256, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface AccountVote_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DemocracyCall = DemocracyCall_blacklist | DemocracyCall_cancel_proposal | DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. + * + * If called on a queued public or external proposal, then this will result in it being + * removed. If the `ref_index` supplied is an active referendum with the proposal hash, + * then it will be cancelled. + * + * The dispatch origin of this call must be `BlacklistOrigin`. + * + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. + * + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). + */ +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: H256 + maybeRefIndex?: (number | undefined) +} + +/** + * Remove a proposal. + * + * The dispatch origin of this call must be `CancelProposalOrigin`. + * + * - `prop_index`: The index of the proposal to cancel. + * + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number +} + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: number +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must not + * be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId32 + conviction: Conviction + balance: bigint +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: number +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: H256 + index: number +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Weight: `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: H256 +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: H256 +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: H256 +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * `FastTrackVotingPeriod` if too low. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: H256 + votingPeriod: number + delay: number +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. When this call is successful, i.e. + * the preimage has not been uploaded before and matches some imminent proposal, + * no fee is paid. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * Weight: `O(p)` + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: H256 + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. Extrinsic is + * weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * Weight: `O(D)` where D is length of proposal. + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: H256 + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId32 + index: number +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: number +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * Weight: `O(S)` where S is the number of seconds a proposal already has. + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId32 +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * Weight: `O(V + log(V))` where V is number of `existing vetoers` + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: H256 +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of referendums the voter has voted on. + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: Id, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + contribute_all: sts.enumStruct({ + index: sts.number(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: Id, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId32, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: Signature, + } +}) + +export const Signature = sts.bytes() + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Signature +} + +export type Signature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_contribute_all | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * Add an optional memo to an existing crowdloan contribution. + * + * Origin must be Signed, and the user must have contributed to the crowdloan. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: Id + memo: Bytes +} + +/** + * Contribute to a crowd sale. This will transfer some balance over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * Contribute your entire balance to a crowd sale. This will transfer the entire balance of a user over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute_all { + __kind: 'contribute_all' + index: number + signature?: (MultiSignature | undefined) +} + +/** + * Create a new crowdloaning campaign for a parachain slot with the given lease period range. + * + * This applies a lock to your parachain configuration, ensuring that it cannot be changed + * by the parachain manager. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Remove a fund after the retirement period has ended and all funds have been returned. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * Edit the configuration for an in-progress crowdloan. + * + * Can only be called by Root origin. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Poke the fund into `NewRaise` + * + * Origin must be Signed, and the fund has non-zero raise. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: Id +} + +/** + * Automatically refund contributors of an ended crowdloan. + * Due to weight restrictions, this function may need to be called multiple + * times to fully refund all users. We will refund `RemoveKeysLimit` users at a time. + * + * Origin must be signed, but can come from anyone. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * Withdraw full balance of a specific contributor. + * + * Origin must be signed, but can come from anyone. + * + * The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement + * flag must be set. For a fund to be ready for retirement, then: + * - it must not already be in retirement; + * - the amount of raised funds must be bigger than the _free_ balance of the account; + * - and either: + * - the block number must be at least `end`; or + * - the current lease period must be greater than the fund's `last_period`. + * + * In this case, the fund's retirement flag is set and its `end` is reset to the current block + * number. + * + * - `who`: The account whose contribution should be withdrawn. + * - `index`: The parachain to whose crowdloan the contribution was made. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_bypass_consistency_check: sts.enumStruct({ + new: sts.boolean(), + }), + set_chain_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_code_retention_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_conclusion_by_time_out_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_max_spam_slots: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: sts.number(), + }), + set_group_rotation_frequency: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_minimum_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_cores: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_retries: sts.enumStruct({ + new: sts.number(), + }), + set_pvf_checking_enabled: sts.enumStruct({ + new: sts.boolean(), + }), + set_pvf_voting_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_thread_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_ump_max_individual_weight: sts.enumStruct({ + new: sts.bigint(), + }), + set_ump_service_total_weight: sts.enumStruct({ + new: sts.bigint(), + }), + set_validation_upgrade_cooldown: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ConfigurationCall = ConfigurationCall_set_bypass_consistency_check | ConfigurationCall_set_chain_availability_period | ConfigurationCall_set_code_retention_period | ConfigurationCall_set_dispute_conclusion_by_time_out_period | ConfigurationCall_set_dispute_max_spam_slots | ConfigurationCall_set_dispute_period | ConfigurationCall_set_dispute_post_conclusion_acceptance_period | ConfigurationCall_set_group_rotation_frequency | ConfigurationCall_set_hrmp_channel_max_capacity | ConfigurationCall_set_hrmp_channel_max_message_size | ConfigurationCall_set_hrmp_channel_max_total_size | ConfigurationCall_set_hrmp_max_message_num_per_candidate | ConfigurationCall_set_hrmp_max_parachain_inbound_channels | ConfigurationCall_set_hrmp_max_parachain_outbound_channels | ConfigurationCall_set_hrmp_max_parathread_inbound_channels | ConfigurationCall_set_hrmp_max_parathread_outbound_channels | ConfigurationCall_set_hrmp_open_request_ttl | ConfigurationCall_set_hrmp_recipient_deposit | ConfigurationCall_set_hrmp_sender_deposit | ConfigurationCall_set_max_code_size | ConfigurationCall_set_max_downward_message_size | ConfigurationCall_set_max_head_data_size | ConfigurationCall_set_max_pov_size | ConfigurationCall_set_max_upward_message_num_per_candidate | ConfigurationCall_set_max_upward_message_size | ConfigurationCall_set_max_upward_queue_count | ConfigurationCall_set_max_upward_queue_size | ConfigurationCall_set_max_validators | ConfigurationCall_set_max_validators_per_core | ConfigurationCall_set_minimum_validation_upgrade_delay | ConfigurationCall_set_n_delay_tranches | ConfigurationCall_set_needed_approvals | ConfigurationCall_set_no_show_slots | ConfigurationCall_set_parathread_cores | ConfigurationCall_set_parathread_retries | ConfigurationCall_set_pvf_checking_enabled | ConfigurationCall_set_pvf_voting_ttl | ConfigurationCall_set_relay_vrf_modulo_samples | ConfigurationCall_set_scheduling_lookahead | ConfigurationCall_set_thread_availability_period | ConfigurationCall_set_ump_max_individual_weight | ConfigurationCall_set_ump_service_total_weight | ConfigurationCall_set_validation_upgrade_cooldown | ConfigurationCall_set_validation_upgrade_delay | ConfigurationCall_set_zeroth_delay_tranche_width + +/** + * Setting this to true will disable consistency checks for the configuration setters. + * Use with caution. + */ +export interface ConfigurationCall_set_bypass_consistency_check { + __kind: 'set_bypass_consistency_check' + new: boolean +} + +/** + * Set the availability period for parachains. + */ +export interface ConfigurationCall_set_chain_availability_period { + __kind: 'set_chain_availability_period' + new: number +} + +/** + * Set the acceptance period for an included candidate. + */ +export interface ConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: number +} + +/** + * Set the dispute conclusion by time out period. + */ +export interface ConfigurationCall_set_dispute_conclusion_by_time_out_period { + __kind: 'set_dispute_conclusion_by_time_out_period' + new: number +} + +/** + * Set the maximum number of dispute spam slots. + */ +export interface ConfigurationCall_set_dispute_max_spam_slots { + __kind: 'set_dispute_max_spam_slots' + new: number +} + +/** + * Set the dispute period, in number of sessions to keep for disputes. + */ +export interface ConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: number +} + +/** + * Set the dispute post conclusion acceptance period. + */ +export interface ConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: number +} + +/** + * Set the parachain validator-group rotation frequency + */ +export interface ConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: number +} + +/** + * Sets the maximum number of messages allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * Sets the maximum size of a message that could ever be put into an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * Sets the maximum total size of messages in bytes allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * Sets the maximum number of outbound HRMP messages can be sent by a candidate. + */ +export interface ConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parachain is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parachain is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parathread is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_inbound_channels { + __kind: 'set_hrmp_max_parathread_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parathread is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_outbound_channels { + __kind: 'set_hrmp_max_parathread_outbound_channels' + new: number +} + +/** + * Sets the number of sessions after which an HRMP open channel request expires. + */ +export interface ConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * Sets the amount of funds that the recipient should provide for accepting opening an HRMP + * channel. + */ +export interface ConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: bigint +} + +/** + * Sets the amount of funds that the sender should provide for opening an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: bigint +} + +/** + * Set the max validation code size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * Set the critical downward message size. + */ +export interface ConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * Set the max head data size for paras. + */ +export interface ConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * Set the max POV block size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * Sets the maximum number of messages that a candidate can contain. + */ +export interface ConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum size of an upward message that can be sent by a candidate. + */ +export interface ConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * Sets the maximum items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * Sets the maximum total size of items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * Set the maximum number of validators to use in parachain consensus. + */ +export interface ConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * Set the maximum number of validators to assign to any core. + */ +export interface ConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * Sets the minimum delay between announcing the upgrade block for a parachain until the + * upgrade taking place. + * + * See the field documentation for information and constraints for the new value. + */ +export interface ConfigurationCall_set_minimum_validation_upgrade_delay { + __kind: 'set_minimum_validation_upgrade_delay' + new: number +} + +/** + * Set the total number of delay tranches. + */ +export interface ConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * Set the number of validators needed to approve a block. + */ +export interface ConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * Set the no show slots, in number of number of consensus slots. + * Must be at least 1. + */ +export interface ConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * Set the number of parathread execution cores. + */ +export interface ConfigurationCall_set_parathread_cores { + __kind: 'set_parathread_cores' + new: number +} + +/** + * Set the number of retries for a particular parathread. + */ +export interface ConfigurationCall_set_parathread_retries { + __kind: 'set_parathread_retries' + new: number +} + +/** + * Enable or disable PVF pre-checking. Consult the field documentation prior executing. + */ +export interface ConfigurationCall_set_pvf_checking_enabled { + __kind: 'set_pvf_checking_enabled' + new: boolean +} + +/** + * Set the number of session changes after which a PVF pre-checking voting is rejected. + */ +export interface ConfigurationCall_set_pvf_voting_ttl { + __kind: 'set_pvf_voting_ttl' + new: number +} + +/** + * Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion. + */ +export interface ConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * Set the scheduling lookahead, in expected number of blocks at peak throughput. + */ +export interface ConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * Set the availability period for parathreads. + */ +export interface ConfigurationCall_set_thread_availability_period { + __kind: 'set_thread_availability_period' + new: number +} + +/** + * Sets the maximum amount of weight any individual upward message may consume. + */ +export interface ConfigurationCall_set_ump_max_individual_weight { + __kind: 'set_ump_max_individual_weight' + new: bigint +} + +/** + * Sets the soft limit for the phase of dispatching dispatchable upward messages. + */ +export interface ConfigurationCall_set_ump_service_total_weight { + __kind: 'set_ump_service_total_weight' + new: bigint +} + +/** + * Set the validation upgrade cooldown. + */ +export interface ConfigurationCall_set_validation_upgrade_cooldown { + __kind: 'set_validation_upgrade_cooldown' + new: number +} + +/** + * Set the validation upgrade delay. + */ +export interface ConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: number +} + +/** + * Set the zeroth delay tranche width. + */ +export interface ConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: sts.bigint(), + vestingSchedule: sts.option(() => sts.tuple(() => [sts.bigint(), sts.bigint(), sts.number()])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId32), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId32 + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId32 + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: bigint + vestingSchedule?: ([bigint, bigint, number] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId32 | undefined) +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ChildBountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + add_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + value: sts.bigint(), + description: sts.bytes(), + }), + award_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + close_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + propose_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ChildBountiesCall = ChildBountiesCall_accept_curator | ChildBountiesCall_add_child_bounty | ChildBountiesCall_award_child_bounty | ChildBountiesCall_claim_child_bounty | ChildBountiesCall_close_child_bounty | ChildBountiesCall_propose_curator | ChildBountiesCall_unassign_curator + +/** + * Accept the curator role for the child-bounty. + * + * The dispatch origin for this call must be the curator of this + * child-bounty. + * + * A deposit will be reserved from the curator and refund upon + * successful payout or cancellation. + * + * Fee for curator is deducted from curator fee of parent bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in "CuratorProposed" state, for processing the + * call. And state of child-bounty is moved to "Active" on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_accept_curator { + __kind: 'accept_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Add a new child-bounty. + * + * The dispatch origin for this call must be the curator of parent + * bounty and the parent bounty must be in "active" state. + * + * Child-bounty gets added successfully & fund gets transferred from + * parent bounty to child-bounty account, if parent bounty has enough + * funds, else the call fails. + * + * Upper bound to maximum number of active child bounties that can be + * added are managed via runtime trait config + * [`Config::MaxActiveChildBountyCount`]. + * + * If the call is success, the status of child-bounty is updated to + * "Added". + * + * - `parent_bounty_id`: Index of parent bounty for which child-bounty is being added. + * - `value`: Value for executing the proposal. + * - `description`: Text description for the child-bounty. + */ +export interface ChildBountiesCall_add_child_bounty { + __kind: 'add_child_bounty' + parentBountyId: number + value: bigint + description: Bytes +} + +/** + * Award child-bounty to a beneficiary. + * + * The beneficiary will be able to claim the funds after a delay. + * + * The dispatch origin for this call must be the parent curator or + * curator of this child-bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in active state, for processing the call. And + * state of child-bounty is moved to "PendingPayout" on successful call + * completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + * - `beneficiary`: Beneficiary account. + */ +export interface ChildBountiesCall_award_child_bounty { + __kind: 'award_child_bounty' + parentBountyId: number + childBountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded child-bounty after payout delay. + * + * The dispatch origin for this call may be any signed origin. + * + * Call works independent of parent bounty state, No need for parent + * bounty to be in active state. + * + * The Beneficiary is paid out with agreed bounty value. Curator fee is + * paid & curator deposit is unreserved. + * + * Child-bounty must be in "PendingPayout" state, for processing the + * call. And instance of child-bounty is removed from the state on + * successful call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_claim_child_bounty { + __kind: 'claim_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * Cancel a proposed or active child-bounty. Child-bounty account funds + * are transferred to parent bounty account. The child-bounty curator + * deposit may be unreserved if possible. + * + * The dispatch origin for this call must be either parent curator or + * `T::RejectOrigin`. + * + * If the state of child-bounty is `Active`, curator deposit is + * unreserved. + * + * If the state of child-bounty is `PendingPayout`, call fails & + * returns `PendingPayout` error. + * + * For the origin other than T::RejectOrigin, parent bounty must be in + * active state, for this child-bounty call to work. For origin + * T::RejectOrigin execution is forced. + * + * Instance of child-bounty is removed from the state on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_close_child_bounty { + __kind: 'close_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * Propose curator for funded child-bounty. + * + * The dispatch origin for this call must be curator of parent bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in "Added" state, for processing the call. And + * state of child-bounty is moved to "CuratorProposed" on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + * - `curator`: Address of child-bounty curator. + * - `fee`: payment fee to child-bounty curator for execution. + */ +export interface ChildBountiesCall_propose_curator { + __kind: 'propose_curator' + parentBountyId: number + childBountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a child-bounty. + * + * The dispatch origin for this call can be either `RejectOrigin`, or + * the curator of the parent bounty, or any signed origin. + * + * For the origin other than T::RejectOrigin and the child-bounty + * curator, parent bounty must be in active state, for this call to + * work. We allow child-bounty curator and T::RejectOrigin to execute + * this call irrespective of the parent bounty state. + * + * If this function is called by the `RejectOrigin` or the + * parent bounty curator, we assume that the child-bounty curator is + * malicious or inactive. As a result, child-bounty curator deposit is + * slashed. + * + * If the origin is the child-bounty curator, we take this as a sign + * that they are unable to do their job, and are willingly giving up. + * We could slash the deposit, but for now we allow them to unreserve + * their deposit and exit without issue. (We may want to change this if + * it is abused.) + * + * Finally, the origin can be anyone iff the child-bounty curator is + * "inactive". Expiry update due of parent bounty is used to estimate + * inactive state of child-bounty curator. + * + * This allows anyone in the community to call out that a child-bounty + * curator is not doing their due diligence, and we should pick a new + * one. In this case the child-bounty curator deposit is slashed. + * + * State of child-bounty is moved to Added state on successful call + * completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_unassign_curator { + __kind: 'unassign_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds + * after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is + * malicious or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_force_unreserve | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_all | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is not + * assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * Unreserve some balance from a user by force. + * + * Can only be called by ROOT. + */ +export interface BalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also alter the total issuance of the system (`TotalIssuance`) appropriately. + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: MultiAddress + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for input config + * types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex + * computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional check + * that the transfer will not kill the origin account. + * --------------------------------- + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: MultiAddress + value: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). # + * - O(1). Just like transfer, but reading the user's transferable balance first. + * # + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const EquivocationProof: sts.Type = sts.struct(() => { + return { + offender: sts.bytes(), + slot: Slot, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Slot = sts.bigint() + +export interface EquivocationProof { + offender: Bytes + slot: Slot + firstHeader: Header + secondHeader: Header +} + +export type Slot = bigint + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V1: sts.enumStruct({ + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + }), + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type NextConfigDescriptor = NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Plan an epoch config change. The epoch config change is recorded and will be enacted on + * the next call to `enact_epoch_change`. The config will be activated one epoch after. + * Multiple calls to this method will replace any existing planned config change that had + * not been enacted yet. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Cancel an in-progress auction. + * + * Can only be called by Root origin. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +export type Call = Call_Auctions | Call_Authorship | Call_Babe | Call_Balances | Call_Bounties | Call_ChildBounties | Call_Claims | Call_Configuration | Call_Council | Call_Crowdloan | Call_Democracy | Call_Dmp | Call_ElectionProviderMultiPhase | Call_Gilt | Call_Grandpa | Call_Hrmp | Call_Identity | Call_ImOnline | Call_Indices | Call_Initializer | Call_Multisig | Call_NominationPools | Call_ParaInclusion | Call_ParaInherent | Call_Paras | Call_ParasDisputes | Call_ParasShared | Call_PhragmenElection | Call_Preimage | Call_Proxy | Call_Recovery | Call_Registrar | Call_Scheduler | Call_Session | Call_Slots | Call_Society | Call_Staking | Call_System | Call_TechnicalCommittee | Call_TechnicalMembership | Call_Timestamp | Call_Tips | Call_Treasury | Call_Ump | Call_Utility | Call_Vesting | Call_VoterList | Call_XcmPallet + +export interface Call_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Call_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Call_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Call_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Call_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Call_ChildBounties { + __kind: 'ChildBounties' + value: ChildBountiesCall +} + +export interface Call_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Call_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Call_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Call_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Call_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Call_Dmp { + __kind: 'Dmp' + value: DmpCall +} + +export interface Call_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Call_Gilt { + __kind: 'Gilt' + value: GiltCall +} + +export interface Call_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Call_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Call_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Call_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Call_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Call_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Call_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Call_NominationPools { + __kind: 'NominationPools' + value: NominationPoolsCall +} + +export interface Call_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Call_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Call_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Call_ParasDisputes { + __kind: 'ParasDisputes' + value: ParasDisputesCall +} + +export interface Call_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Call_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Call_Preimage { + __kind: 'Preimage' + value: PreimageCall +} + +export interface Call_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Call_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Call_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Call_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Call_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Call_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Call_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Call_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Call_System { + __kind: 'System' + value: SystemCall +} + +export interface Call_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Call_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Call_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Call_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Call_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Call_Ump { + __kind: 'Ump' + value: UmpCall +} + +export interface Call_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Call_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Call_VoterList { + __kind: 'VoterList' + value: VoterListCall +} + +export interface Call_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Society: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId32 = sts.bytes() diff --git a/squid/src/types/v9271.ts b/squid/src/types/v9271.ts new file mode 100644 index 00000000..56540f71 --- /dev/null +++ b/squid/src/types/v9271.ts @@ -0,0 +1,12182 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Call: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + ChildBounties: ChildBountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + Dmp: DmpCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + Gilt: GiltCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Initializer: InitializerCall, + Multisig: MultisigCall, + NominationPools: NominationPoolsCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Paras: ParasCall, + ParasDisputes: ParasDisputesCall, + ParasShared: ParasSharedCall, + PhragmenElection: PhragmenElectionCall, + Preimage: PreimageCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Ump: UmpCall, + Utility: UtilityCall, + Vesting: VestingCall, + VoterList: VoterListCall, + XcmPallet: XcmPalletCall, + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + execute: sts.enumStruct({ + message: Type_551, + maxWeight: sts.bigint(), + }), + force_default_xcm_version: sts.enumStruct({ + maybeXcmVersion: sts.option(() => sts.number()), + }), + force_subscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_unsubscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_xcm_version: sts.enumStruct({ + location: V1MultiLocation, + xcmVersion: sts.number(), + }), + limited_reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + limited_teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + send: sts.enumStruct({ + dest: VersionedMultiLocation, + message: VersionedXcm, + }), + teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + } +}) + +export const VersionedXcm: sts.Type = sts.closedEnum(() => { + return { + V0: V0Xcm, + V1: V1Xcm, + V2: sts.array(() => V2Instruction), + } +}) + +export const V2Instruction: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => V2Instruction), + SetErrorHandler: sts.array(() => V2Instruction), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const DoubleEncoded: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncoded { + encoded: Bytes +} + +export const V0OriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type V0OriginKind = V0OriginKind_Native | V0OriginKind_SovereignAccount | V0OriginKind_Superuser | V0OriginKind_Xcm + +export interface V0OriginKind_Native { + __kind: 'Native' +} + +export interface V0OriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface V0OriginKind_Superuser { + __kind: 'Superuser' +} + +export interface V0OriginKind_Xcm { + __kind: 'Xcm' +} + +export const V2Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V2Error])), + Null: sts.unit(), + Version: sts.number(), + } +}) + +export const V2Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + MaxWeightInvalid: sts.unit(), + MultiLocationFull: sts.unit(), + MultiLocationNotInvertible: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + WeightLimitReached: sts.bigint(), + WeightNotComputable: sts.unit(), + } +}) + +export type V2Error = V2Error_AssetNotFound | V2Error_BadOrigin | V2Error_Barrier | V2Error_DestinationUnsupported | V2Error_ExceedsMaxMessageSize | V2Error_FailedToDecode | V2Error_FailedToTransactAsset | V2Error_InvalidLocation | V2Error_LocationCannotHold | V2Error_MaxWeightInvalid | V2Error_MultiLocationFull | V2Error_MultiLocationNotInvertible | V2Error_NotHoldingFees | V2Error_NotWithdrawable | V2Error_Overflow | V2Error_TooExpensive | V2Error_Transport | V2Error_Trap | V2Error_UnhandledXcmVersion | V2Error_Unimplemented | V2Error_UnknownClaim | V2Error_Unroutable | V2Error_UntrustedReserveLocation | V2Error_UntrustedTeleportLocation | V2Error_WeightLimitReached | V2Error_WeightNotComputable + +export interface V2Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V2Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V2Error_Barrier { + __kind: 'Barrier' +} + +export interface V2Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V2Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V2Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V2Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V2Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V2Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V2Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V2Error_MultiLocationFull { + __kind: 'MultiLocationFull' +} + +export interface V2Error_MultiLocationNotInvertible { + __kind: 'MultiLocationNotInvertible' +} + +export interface V2Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V2Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V2Error_Overflow { + __kind: 'Overflow' +} + +export interface V2Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V2Error_Transport { + __kind: 'Transport' +} + +export interface V2Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V2Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V2Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V2Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V2Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V2Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V2Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: bigint +} + +export interface V2Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V2Response = V2Response_Assets | V2Response_ExecutionResult | V2Response_Null | V2Response_Version + +export interface V2Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V2Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V2Error] | undefined) +} + +export interface V2Response_Null { + __kind: 'Null' +} + +export interface V2Response_Version { + __kind: 'Version' + value: number +} + +export interface V1MultiAsset { + id: V1AssetId + fun: V1Fungibility +} + +export type V1Fungibility = V1Fungibility_Fungible | V1Fungibility_NonFungible + +export interface V1Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V1Fungibility_NonFungible { + __kind: 'NonFungible' + value: V1AssetInstance +} + +export type V1AssetInstance = V1AssetInstance_Array16 | V1AssetInstance_Array32 | V1AssetInstance_Array4 | V1AssetInstance_Array8 | V1AssetInstance_Blob | V1AssetInstance_Index | V1AssetInstance_Undefined + +export interface V1AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V1AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V1AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V1AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V1AssetInstance_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface V1AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V1AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V1AssetId = V1AssetId_Abstract | V1AssetId_Concrete + +export interface V1AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V1AssetId_Concrete { + __kind: 'Concrete' + value: V1MultiLocation +} + +export interface V1MultiLocation { + parents: number + interior: V1Junctions +} + +export type V1Junctions = V1Junctions_Here | V1Junctions_X1 | V1Junctions_X2 | V1Junctions_X3 | V1Junctions_X4 | V1Junctions_X5 | V1Junctions_X6 | V1Junctions_X7 | V1Junctions_X8 + +export interface V1Junctions_Here { + __kind: 'Here' +} + +export interface V1Junctions_X1 { + __kind: 'X1' + value: V1Junction +} + +export interface V1Junctions_X2 { + __kind: 'X2' + value: [V1Junction, V1Junction] +} + +export interface V1Junctions_X3 { + __kind: 'X3' + value: [V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X4 { + __kind: 'X4' + value: [V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X5 { + __kind: 'X5' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X6 { + __kind: 'X6' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X7 { + __kind: 'X7' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X8 { + __kind: 'X8' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export type V1Junction = V1Junction_AccountId32 | V1Junction_AccountIndex64 | V1Junction_AccountKey20 | V1Junction_GeneralIndex | V1Junction_GeneralKey | V1Junction_OnlyChild | V1Junction_PalletInstance | V1Junction_Parachain | V1Junction_Plurality + +export interface V1Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V1Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V1Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V1Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V1Junction_GeneralKey { + __kind: 'GeneralKey' + value: WeakBoundedVec +} + +export interface V1Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V1Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V1Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V1Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0BodyPart = V0BodyPart_AtLeastProportion | V0BodyPart_Fraction | V0BodyPart_Members | V0BodyPart_MoreThanProportion | V0BodyPart_Voice + +export interface V0BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V0BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V0BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Voice { + __kind: 'Voice' +} + +export type V0BodyId = V0BodyId_Executive | V0BodyId_Index | V0BodyId_Judicial | V0BodyId_Legislative | V0BodyId_Named | V0BodyId_Technical | V0BodyId_Unit + +export interface V0BodyId_Executive { + __kind: 'Executive' +} + +export interface V0BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V0BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V0BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V0BodyId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V0BodyId_Technical { + __kind: 'Technical' +} + +export interface V0BodyId_Unit { + __kind: 'Unit' +} + +export type WeakBoundedVec = Bytes + +export type V0NetworkId = V0NetworkId_Any | V0NetworkId_Kusama | V0NetworkId_Named | V0NetworkId_Polkadot + +export interface V0NetworkId_Any { + __kind: 'Any' +} + +export interface V0NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V0NetworkId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V0NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export const V1Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V1Junction, + X2: sts.tuple(() => [V1Junction, V1Junction]), + X3: sts.tuple(() => [V1Junction, V1Junction, V1Junction]), + X4: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction]), + X5: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X6: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X7: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X8: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + } +}) + +export const V1Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: WeakBoundedVec, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export const V0BodyId: sts.Type = sts.closedEnum(() => { + return { + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: WeakBoundedVec, + Technical: sts.unit(), + Unit: sts.unit(), + } +}) + +export const WeakBoundedVec = sts.bytes() + +export const V0NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: WeakBoundedVec, + Polkadot: sts.unit(), + } +}) + +export const V1MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V1MultiAsset), + Wild: V1WildMultiAsset, + } +}) + +export const V1WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllOf: sts.enumStruct({ + id: V1AssetId, + fun: V1WildFungibility, + }), + } +}) + +export const V1WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V1WildFungibility = V1WildFungibility_Fungible | V1WildFungibility_NonFungible + +export interface V1WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V1WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V1AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V1MultiLocation, + } +}) + +export type V1WildMultiAsset = V1WildMultiAsset_All | V1WildMultiAsset_AllOf + +export interface V1WildMultiAsset_All { + __kind: 'All' +} + +export interface V1WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V1AssetId + fun: V1WildFungibility +} + +export type V1MultiAssetFilter = V1MultiAssetFilter_Definite | V1MultiAssetFilter_Wild + +export interface V1MultiAssetFilter_Definite { + __kind: 'Definite' + value: V1MultiAsset[] +} + +export interface V1MultiAssetFilter_Wild { + __kind: 'Wild' + value: V1WildMultiAsset +} + +export const V1MultiAsset: sts.Type = sts.struct(() => { + return { + id: V1AssetId, + fun: V1Fungibility, + } +}) + +export const V1Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V1AssetInstance, + } +}) + +export const V1AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V2Instruction = V2Instruction_BuyExecution | V2Instruction_ClaimAsset | V2Instruction_ClearError | V2Instruction_ClearOrigin | V2Instruction_DepositAsset | V2Instruction_DepositReserveAsset | V2Instruction_DescendOrigin | V2Instruction_ExchangeAsset | V2Instruction_HrmpChannelAccepted | V2Instruction_HrmpChannelClosing | V2Instruction_HrmpNewChannelOpenRequest | V2Instruction_InitiateReserveWithdraw | V2Instruction_InitiateTeleport | V2Instruction_QueryHolding | V2Instruction_QueryResponse | V2Instruction_ReceiveTeleportedAsset | V2Instruction_RefundSurplus | V2Instruction_ReportError | V2Instruction_ReserveAssetDeposited | V2Instruction_SetAppendix | V2Instruction_SetErrorHandler | V2Instruction_SubscribeVersion | V2Instruction_Transact | V2Instruction_TransferAsset | V2Instruction_TransferReserveAsset | V2Instruction_Trap | V2Instruction_UnsubscribeVersion | V2Instruction_WithdrawAsset + +export interface V2Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface V2Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface V2Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V2Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V2Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V2Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface V2Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V2Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V2Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V2Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V2Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface V2Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface V2Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface V2Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V2Instruction_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface V2Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface V2Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V2Instruction[] +} + +export interface V2Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V2Instruction[] +} + +export interface V2Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V2Instruction_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V2Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V2Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V2Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export type V2WeightLimit = V2WeightLimit_Limited | V2WeightLimit_Unlimited + +export interface V2WeightLimit_Limited { + __kind: 'Limited' + value: bigint +} + +export interface V2WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V1Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: V1Xcm, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + } +}) + +export const V1Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => V1Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type V1Order = V1Order_BuyExecution | V1Order_DepositAsset | V1Order_DepositReserveAsset | V1Order_ExchangeAsset | V1Order_InitiateReserveWithdraw | V1Order_InitiateTeleport | V1Order_Noop | V1Order_QueryHolding + +export interface V1Order_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: V1Xcm[] +} + +export interface V1Order_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V1Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V1Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_Noop { + __kind: 'Noop' +} + +export interface V1Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export const V1Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + Version: sts.number(), + } +}) + +export type V1Response = V1Response_Assets | V1Response_Version + +export interface V1Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V1Response_Version { + __kind: 'Version' + value: number +} + +export type V1Xcm = V1Xcm_HrmpChannelAccepted | V1Xcm_HrmpChannelClosing | V1Xcm_HrmpNewChannelOpenRequest | V1Xcm_QueryResponse | V1Xcm_ReceiveTeleportedAsset | V1Xcm_RelayedFrom | V1Xcm_ReserveAssetDeposited | V1Xcm_SubscribeVersion | V1Xcm_Transact | V1Xcm_TransferAsset | V1Xcm_TransferReserveAsset | V1Xcm_UnsubscribeVersion | V1Xcm_WithdrawAsset + +export interface V1Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V1Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V1Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V1Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface V1Xcm_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: V1Xcm +} + +export interface V1Xcm_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V1Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V1Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V1Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Xcm_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V1Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export const V0Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: V0Xcm, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + } +}) + +export const V0Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => V0Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type V0Order = V0Order_BuyExecution | V0Order_DepositAsset | V0Order_DepositReserveAsset | V0Order_ExchangeAsset | V0Order_InitiateReserveWithdraw | V0Order_InitiateTeleport | V0Order_Null | V0Order_QueryHolding + +export interface V0Order_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: V0Xcm[] +} + +export interface V0Order_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface V0Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_Null { + __kind: 'Null' +} + +export interface V0Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type V0MultiLocation = V0MultiLocation_Null | V0MultiLocation_X1 | V0MultiLocation_X2 | V0MultiLocation_X3 | V0MultiLocation_X4 | V0MultiLocation_X5 | V0MultiLocation_X6 | V0MultiLocation_X7 | V0MultiLocation_X8 + +export interface V0MultiLocation_Null { + __kind: 'Null' +} + +export interface V0MultiLocation_X1 { + __kind: 'X1' + value: V0Junction +} + +export interface V0MultiLocation_X2 { + __kind: 'X2' + value: [V0Junction, V0Junction] +} + +export interface V0MultiLocation_X3 { + __kind: 'X3' + value: [V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X4 { + __kind: 'X4' + value: [V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X5 { + __kind: 'X5' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X6 { + __kind: 'X6' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X7 { + __kind: 'X7' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X8 { + __kind: 'X8' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export type V0Junction = V0Junction_AccountId32 | V0Junction_AccountIndex64 | V0Junction_AccountKey20 | V0Junction_GeneralIndex | V0Junction_GeneralKey | V0Junction_OnlyChild | V0Junction_PalletInstance | V0Junction_Parachain | V0Junction_Parent | V0Junction_Plurality + +export interface V0Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V0Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V0Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V0Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V0Junction_GeneralKey { + __kind: 'GeneralKey' + value: WeakBoundedVec +} + +export interface V0Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V0Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V0Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V0Junction_Parent { + __kind: 'Parent' +} + +export interface V0Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0MultiAsset = V0MultiAsset_AbstractFungible | V0MultiAsset_AbstractNonFungible | V0MultiAsset_All | V0MultiAsset_AllAbstractFungible | V0MultiAsset_AllAbstractNonFungible | V0MultiAsset_AllConcreteFungible | V0MultiAsset_AllConcreteNonFungible | V0MultiAsset_AllFungible | V0MultiAsset_AllNonFungible | V0MultiAsset_ConcreteFungible | V0MultiAsset_ConcreteNonFungible | V0MultiAsset_None + +export interface V0MultiAsset_AbstractFungible { + __kind: 'AbstractFungible' + id: Bytes + amount: bigint +} + +export interface V0MultiAsset_AbstractNonFungible { + __kind: 'AbstractNonFungible' + class: Bytes + instance: V1AssetInstance +} + +export interface V0MultiAsset_All { + __kind: 'All' +} + +export interface V0MultiAsset_AllAbstractFungible { + __kind: 'AllAbstractFungible' + id: Bytes +} + +export interface V0MultiAsset_AllAbstractNonFungible { + __kind: 'AllAbstractNonFungible' + class: Bytes +} + +export interface V0MultiAsset_AllConcreteFungible { + __kind: 'AllConcreteFungible' + id: V0MultiLocation +} + +export interface V0MultiAsset_AllConcreteNonFungible { + __kind: 'AllConcreteNonFungible' + class: V0MultiLocation +} + +export interface V0MultiAsset_AllFungible { + __kind: 'AllFungible' +} + +export interface V0MultiAsset_AllNonFungible { + __kind: 'AllNonFungible' +} + +export interface V0MultiAsset_ConcreteFungible { + __kind: 'ConcreteFungible' + id: V0MultiLocation + amount: bigint +} + +export interface V0MultiAsset_ConcreteNonFungible { + __kind: 'ConcreteNonFungible' + class: V0MultiLocation + instance: V1AssetInstance +} + +export interface V0MultiAsset_None { + __kind: 'None' +} + +export const V0MultiAsset: sts.Type = sts.closedEnum(() => { + return { + AbstractFungible: sts.enumStruct({ + id: sts.bytes(), + amount: sts.bigint(), + }), + AbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + instance: V1AssetInstance, + }), + All: sts.unit(), + AllAbstractFungible: sts.enumStruct({ + id: sts.bytes(), + }), + AllAbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + }), + AllConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + }), + AllConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + }), + AllFungible: sts.unit(), + AllNonFungible: sts.unit(), + ConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + amount: sts.bigint(), + }), + ConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + instance: V1AssetInstance, + }), + None: sts.unit(), + } +}) + +export const V0MultiLocation: sts.Type = sts.closedEnum(() => { + return { + Null: sts.unit(), + X1: V0Junction, + X2: sts.tuple(() => [V0Junction, V0Junction]), + X3: sts.tuple(() => [V0Junction, V0Junction, V0Junction]), + X4: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction]), + X5: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X6: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X7: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X8: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + } +}) + +export const V0Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: WeakBoundedVec, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Parent: sts.unit(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V0MultiAsset), + } +}) + +export type V0Response = V0Response_Assets + +export interface V0Response_Assets { + __kind: 'Assets' + value: V0MultiAsset[] +} + +export type V0Xcm = V0Xcm_HrmpChannelAccepted | V0Xcm_HrmpChannelClosing | V0Xcm_HrmpNewChannelOpenRequest | V0Xcm_QueryResponse | V0Xcm_RelayedFrom | V0Xcm_ReserveAssetDeposit | V0Xcm_TeleportAsset | V0Xcm_Transact | V0Xcm_TransferAsset | V0Xcm_TransferReserveAsset | V0Xcm_WithdrawAsset + +export interface V0Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V0Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V0Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V0Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface V0Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: V0Xcm +} + +export interface V0Xcm_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V0Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export type VersionedXcm = VersionedXcm_V0 | VersionedXcm_V1 | VersionedXcm_V2 + +export interface VersionedXcm_V0 { + __kind: 'V0' + value: V0Xcm +} + +export interface VersionedXcm_V1 { + __kind: 'V1' + value: V1Xcm +} + +export interface VersionedXcm_V2 { + __kind: 'V2' + value: V2Instruction[] +} + +export const V2WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: sts.bigint(), + Unlimited: sts.unit(), + } +}) + +export const VersionedMultiAssets: sts.Type = sts.closedEnum(() => { + return { + V0: sts.array(() => V0MultiAsset), + V1: sts.array(() => V1MultiAsset), + } +}) + +export type VersionedMultiAssets = VersionedMultiAssets_V0 | VersionedMultiAssets_V1 + +export interface VersionedMultiAssets_V0 { + __kind: 'V0' + value: V0MultiAsset[] +} + +export interface VersionedMultiAssets_V1 { + __kind: 'V1' + value: V1MultiAsset[] +} + +export const V1MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V1Junctions, + } +}) + +export const VersionedMultiLocation: sts.Type = sts.closedEnum(() => { + return { + V0: V0MultiLocation, + V1: V1MultiLocation, + } +}) + +export type VersionedMultiLocation = VersionedMultiLocation_V0 | VersionedMultiLocation_V1 + +export interface VersionedMultiLocation_V0 { + __kind: 'V0' + value: V0MultiLocation +} + +export interface VersionedMultiLocation_V1 { + __kind: 'V1' + value: V1MultiLocation +} + +export const Type_551: sts.Type = sts.closedEnum(() => { + return { + V0: Type_552, + V1: Type_557, + V2: sts.array(() => Type_563), + } +}) + +export const Type_563: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => Type_563), + SetErrorHandler: sts.array(() => Type_563), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_556, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const Type_556: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface Type_556 { + encoded: Bytes +} + +export type Type_563 = Type_563_BuyExecution | Type_563_ClaimAsset | Type_563_ClearError | Type_563_ClearOrigin | Type_563_DepositAsset | Type_563_DepositReserveAsset | Type_563_DescendOrigin | Type_563_ExchangeAsset | Type_563_HrmpChannelAccepted | Type_563_HrmpChannelClosing | Type_563_HrmpNewChannelOpenRequest | Type_563_InitiateReserveWithdraw | Type_563_InitiateTeleport | Type_563_QueryHolding | Type_563_QueryResponse | Type_563_ReceiveTeleportedAsset | Type_563_RefundSurplus | Type_563_ReportError | Type_563_ReserveAssetDeposited | Type_563_SetAppendix | Type_563_SetErrorHandler | Type_563_SubscribeVersion | Type_563_Transact | Type_563_TransferAsset | Type_563_TransferReserveAsset | Type_563_Trap | Type_563_UnsubscribeVersion | Type_563_WithdrawAsset + +export interface Type_563_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface Type_563_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface Type_563_ClearError { + __kind: 'ClearError' +} + +export interface Type_563_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_563_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_563_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_563_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface Type_563_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_563_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_563_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_563_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_563_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_563_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_563_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface Type_563_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface Type_563_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface Type_563_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_563_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface Type_563_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface Type_563_SetAppendix { + __kind: 'SetAppendix' + value: Type_563[] +} + +export interface Type_563_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_563[] +} + +export interface Type_563_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_563_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_556 +} + +export interface Type_563_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_563_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_563_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_563_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_563_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export const Type_557: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_559), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: Type_557, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_559), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_556, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_559), + }), + } +}) + +export const Type_559: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => Type_557), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type Type_559 = Type_559_BuyExecution | Type_559_DepositAsset | Type_559_DepositReserveAsset | Type_559_ExchangeAsset | Type_559_InitiateReserveWithdraw | Type_559_InitiateTeleport | Type_559_Noop | Type_559_QueryHolding + +export interface Type_559_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: Type_557[] +} + +export interface Type_559_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_559_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_559_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_559_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface Type_559_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_559_Noop { + __kind: 'Noop' +} + +export interface Type_559_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export type Type_557 = Type_557_HrmpChannelAccepted | Type_557_HrmpChannelClosing | Type_557_HrmpNewChannelOpenRequest | Type_557_QueryResponse | Type_557_ReceiveTeleportedAsset | Type_557_RelayedFrom | Type_557_ReserveAssetDeposited | Type_557_SubscribeVersion | Type_557_Transact | Type_557_TransferAsset | Type_557_TransferReserveAsset | Type_557_UnsubscribeVersion | Type_557_WithdrawAsset + +export interface Type_557_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_557_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_557_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_557_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface Type_557_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: Type_559[] +} + +export interface Type_557_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: Type_557 +} + +export interface Type_557_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: Type_559[] +} + +export interface Type_557_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_557_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_556 +} + +export interface Type_557_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_557_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_557_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_557_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: Type_559[] +} + +export const Type_552: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: Type_552, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_554), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_554), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_556, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_554), + }), + } +}) + +export const Type_554: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => Type_552), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type Type_554 = Type_554_BuyExecution | Type_554_DepositAsset | Type_554_DepositReserveAsset | Type_554_ExchangeAsset | Type_554_InitiateReserveWithdraw | Type_554_InitiateTeleport | Type_554_Null | Type_554_QueryHolding + +export interface Type_554_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: Type_552[] +} + +export interface Type_554_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_554_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_554_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface Type_554_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface Type_554_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_554_Null { + __kind: 'Null' +} + +export interface Type_554_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type Type_552 = Type_552_HrmpChannelAccepted | Type_552_HrmpChannelClosing | Type_552_HrmpNewChannelOpenRequest | Type_552_QueryResponse | Type_552_RelayedFrom | Type_552_ReserveAssetDeposit | Type_552_TeleportAsset | Type_552_Transact | Type_552_TransferAsset | Type_552_TransferReserveAsset | Type_552_WithdrawAsset + +export interface Type_552_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_552_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_552_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_552_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface Type_552_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: Type_552 +} + +export interface Type_552_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: Type_554[] +} + +export interface Type_552_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: Type_554[] +} + +export interface Type_552_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_556 +} + +export interface Type_552_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_552_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_552_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: Type_554[] +} + +export type Type_551 = Type_551_V0 | Type_551_V1 | Type_551_V2 + +export interface Type_551_V0 { + __kind: 'V0' + value: Type_552 +} + +export interface Type_551_V1 { + __kind: 'V1' + value: Type_557 +} + +export interface Type_551_V2 { + __kind: 'V2' + value: Type_563[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type XcmPalletCall = XcmPalletCall_execute | XcmPalletCall_force_default_xcm_version | XcmPalletCall_force_subscribe_version_notify | XcmPalletCall_force_unsubscribe_version_notify | XcmPalletCall_force_xcm_version | XcmPalletCall_limited_reserve_transfer_assets | XcmPalletCall_limited_teleport_assets | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets + +/** + * Execute an XCM message from a local, signed, origin. + * + * An event is deposited indicating whether `msg` could be executed completely or only + * partially. + * + * No more than `max_weight` will be used in its attempted execution. If this is less than the + * maximum amount of weight that the message could take to be executed, then no execution + * attempt will be made. + * + * NOTE: A successful return to this does *not* imply that the `msg` was executed successfully + * to completion; only that *some* of it was executed. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Type_551 + maxWeight: bigint +} + +/** + * Set a safe XCM version (the version that XCM should be encoded with if the most recent + * version a destination can accept is unknown). + * + * - `origin`: Must be Root. + * - `maybe_xcm_version`: The default XCM encoding version, or `None` to disable. + */ +export interface XcmPalletCall_force_default_xcm_version { + __kind: 'force_default_xcm_version' + maybeXcmVersion?: (number | undefined) +} + +/** + * Ask a location to notify us regarding their XCM version and any changes to it. + * + * - `origin`: Must be Root. + * - `location`: The location to which we should subscribe for XCM version notifications. + */ +export interface XcmPalletCall_force_subscribe_version_notify { + __kind: 'force_subscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Require that a particular destination should no longer notify us regarding any XCM + * version changes. + * + * - `origin`: Must be Root. + * - `location`: The location to which we are currently subscribed for XCM version + * notifications which we no longer desire. + */ +export interface XcmPalletCall_force_unsubscribe_version_notify { + __kind: 'force_unsubscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Extoll that a particular destination can be communicated with through a particular + * version of XCM. + * + * - `origin`: Must be Root. + * - `location`: The destination that is being described. + * - `xcm_version`: The latest version of XCM that `location` supports. + */ +export interface XcmPalletCall_force_xcm_version { + __kind: 'force_xcm_version' + location: V1MultiLocation + xcmVersion: number +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination + * chain and forward a notification XCM. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight + * is needed than `weight_limit`, then the operation will fail and the assets send may be + * at risk. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_reserve_transfer_assets { + __kind: 'limited_reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight + * is needed than `weight_limit`, then the operation will fail and the assets send may be + * at risk. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_teleport_assets { + __kind: 'limited_teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination + * chain and forward a notification XCM. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, + * with all fees taken as needed from the asset. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +export interface XcmPalletCall_send { + __kind: 'send' + dest: VersionedMultiLocation + message: VersionedXcm +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, + * with all fees taken as needed from the asset. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VoterListCall: sts.Type = sts.closedEnum(() => { + return { + put_in_front_of: sts.enumStruct({ + lighter: AccountId32, + }), + rebag: sts.enumStruct({ + dislocated: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VoterListCall = VoterListCall_put_in_front_of | VoterListCall_rebag + +/** + * Move the caller's Id directly in front of `lighter`. + * + * The dispatch origin for this call must be _Signed_ and can only be called by the Id of + * the account going in front of `lighter`. + * + * Only works if + * - both nodes are within the same bag, + * - and `origin` has a greater `Score` than `lighter`. + */ +export interface VoterListCall_put_in_front_of { + __kind: 'put_in_front_of' + lighter: AccountId32 +} + +/** + * Declare that some `dislocated` account has, through rewards or penalties, sufficiently + * changed its score that it should properly fall into a different bag than its current + * one. + * + * Anyone can call this function about any potentially dislocated account. + * + * Will always update the stored score of `dislocated` to the correct score, based on + * `ScoreProvider`. + * + * If `dislocated` does not exists, it returns an error. + */ +export interface VoterListCall_rebag { + __kind: 'rebag' + dislocated: AccountId32 +} + +export type AccountId32 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: MultiAddress, + target: MultiAddress, + schedule: VestingInfo, + }), + merge_schedules: sts.enumStruct({ + schedule1Index: sts.number(), + schedule2Index: sts.number(), + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: MultiAddress, + }), + vested_transfer: sts.enumStruct({ + target: MultiAddress, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: sts.bigint(), + perBlock: sts.bigint(), + startingBlock: sts.number(), + } +}) + +export interface VestingInfo { + locked: bigint + perBlock: bigint + startingBlock: number +} + +export const MultiAddress: sts.Type = sts.closedEnum(() => { + return { + Address20: sts.bytes(), + Address32: sts.bytes(), + Id: AccountId32, + Index: sts.unit(), + Raw: sts.bytes(), + } +}) + +export type MultiAddress = MultiAddress_Address20 | MultiAddress_Address32 | MultiAddress_Id | MultiAddress_Index | MultiAddress_Raw + +export interface MultiAddress_Address20 { + __kind: 'Address20' + value: Bytes +} + +export interface MultiAddress_Address32 { + __kind: 'Address32' + value: Bytes +} + +export interface MultiAddress_Id { + __kind: 'Id' + value: AccountId32 +} + +export interface MultiAddress_Index { + __kind: 'Index' +} + +export interface MultiAddress_Raw { + __kind: 'Raw' + value: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_merge_schedules | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: MultiAddress + target: MultiAddress + schedule: VestingInfo +} + +/** + * Merge two vesting schedules together, creating a new vesting schedule that unlocks over + * the highest possible start and end blocks. If both schedules have already started the + * current block will be used as the schedule start; with the caveat that if one schedule + * is finished by the current block, the other will be treated as the new merged schedule, + * unmodified. + * + * NOTE: If `schedule1_index == schedule2_index` this is a no-op. + * NOTE: This will unlock all schedules through the current block prior to merging. + * NOTE: If both schedules have ended by the current block, no new schedule will be created + * and both will be removed. + * + * Merged schedule attributes: + * - `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block, + * current_block)`. + * - `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`. + * - `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`. + * + * The dispatch origin for this call must be _Signed_. + * + * - `schedule1_index`: index of the first schedule to merge. + * - `schedule2_index`: index of the second schedule to merge. + */ +export interface VestingCall_merge_schedules { + __kind: 'merge_schedules' + schedule1Index: number + schedule2Index: number +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: MultiAddress +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account receiving the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: MultiAddress + schedule: VestingInfo +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Call, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Call), + }), + dispatch_as: sts.enumStruct({ + asOrigin: OriginCaller, + call: Call, + }), + force_batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + } +}) + +export const OriginCaller: sts.Type = sts.closedEnum(() => { + return { + Council: Type_337, + ParachainsOrigin: Origin, + TechnicalCommittee: Type_338, + Void: Void, + XcmPallet: Type_340, + system: RawOrigin, + } +}) + +export const RawOrigin: sts.Type = sts.closedEnum(() => { + return { + None: sts.unit(), + Root: sts.unit(), + Signed: AccountId32, + } +}) + +export type RawOrigin = RawOrigin_None | RawOrigin_Root | RawOrigin_Signed + +export interface RawOrigin_None { + __kind: 'None' +} + +export interface RawOrigin_Root { + __kind: 'Root' +} + +export interface RawOrigin_Signed { + __kind: 'Signed' + value: AccountId32 +} + +export const Type_340: sts.Type = sts.closedEnum(() => { + return { + Response: V1MultiLocation, + Xcm: V1MultiLocation, + } +}) + +export type Type_340 = Type_340_Response | Type_340_Xcm + +export interface Type_340_Response { + __kind: 'Response' + value: V1MultiLocation +} + +export interface Type_340_Xcm { + __kind: 'Xcm' + value: V1MultiLocation +} + +export const Void: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Void = never + +export const Type_338: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_338 = Type_338_Member | Type_338_Members | Type_338__Phantom + +export interface Type_338_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_338_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_338__Phantom { + __kind: '_Phantom' +} + +export const Origin: sts.Type = sts.closedEnum(() => { + return { + Parachain: Id, + } +}) + +export const Id = sts.number() + +export type Origin = Origin_Parachain + +export interface Origin_Parachain { + __kind: 'Parachain' + value: Id +} + +export type Id = number + +export const Type_337: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_337 = Type_337_Member | Type_337_Members | Type_337__Phantom + +export interface Type_337_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_337_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_337__Phantom { + __kind: '_Phantom' +} + +export type OriginCaller = OriginCaller_Council | OriginCaller_ParachainsOrigin | OriginCaller_TechnicalCommittee | OriginCaller_Void | OriginCaller_XcmPallet | OriginCaller_system + +export interface OriginCaller_Council { + __kind: 'Council' + value: Type_337 +} + +export interface OriginCaller_ParachainsOrigin { + __kind: 'ParachainsOrigin' + value: Origin +} + +export interface OriginCaller_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: Type_338 +} + +export interface OriginCaller_Void { + __kind: 'Void' + value: Void +} + +export interface OriginCaller_XcmPallet { + __kind: 'XcmPallet' + value: Type_340 +} + +export interface OriginCaller_system { + __kind: 'system' + value: RawOrigin +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all | UtilityCall_dispatch_as | UtilityCall_force_batch + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Call +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Call[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Call[] +} + +/** + * Dispatches a function call with a provided origin. + * + * The dispatch origin for this call must be _Root_. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB write (event). + * - Weight of derivative `call` execution + T::WeightInfo::dispatch_as(). + * # + */ +export interface UtilityCall_dispatch_as { + __kind: 'dispatch_as' + asOrigin: OriginCaller + call: Call +} + +/** + * Send a batch of dispatch calls. + * Unlike `batch`, it allows errors and won't interrupt. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_force_batch { + __kind: 'force_batch' + calls: Call[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UmpCall: sts.Type = sts.closedEnum(() => { + return { + service_overweight: sts.enumStruct({ + index: sts.bigint(), + weightLimit: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UmpCall = UmpCall_service_overweight + +/** + * Service a single overweight upward message. + * + * - `origin`: Must pass `ExecuteOverweightOrigin`. + * - `index`: The index of the overweight message to service. + * - `weight_limit`: The amount of weight that message execution may take. + * + * Errors: + * - `UnknownMessageIndex`: Message of `index` is unknown. + * - `WeightOverLimit`: Message execution may use greater than `weight_limit`. + * + * Events: + * - `OverweightServiced`: On success. + */ +export interface UmpCall_service_overweight { + __kind: 'service_overweight' + index: bigint + weightLimit: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: MultiAddress, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + remove_approval: sts.enumStruct({ + proposalId: sts.number(), + }), + spend: sts.enumStruct({ + amount: sts.bigint(), + beneficiary: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_remove_approval | TreasuryCall_spend + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: MultiAddress +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Force a previously approved proposal to be removed from the approval queue. + * The original deposit will no longer be returned. + * + * May only be called from `T::RejectOrigin`. + * - `proposal_id`: The index of a proposal + * + * # + * - Complexity: O(A) where `A` is the number of approvals + * - Db reads and writes: `Approvals` + * # + * + * Errors: + * - `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue, + * i.e., the proposal has not been approved. This could also mean the proposal does not + * exist altogether, thus there is no way it would have been approved in the first place. + */ +export interface TreasuryCall_remove_approval { + __kind: 'remove_approval' + proposalId: number +} + +/** + * Propose and approve a spend of treasury funds. + * + * - `origin`: Must be `SpendOrigin` with the `Success` value being at least `amount`. + * - `amount`: The amount to be transferred from the treasury to the `beneficiary`. + * - `beneficiary`: The destination account for the transfer. + * + * NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the + * beneficiary. + */ +export interface TreasuryCall_spend { + __kind: 'spend' + amount: bigint + beneficiary: MultiAddress +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TipsCall: sts.Type = sts.closedEnum(() => { + return { + close_tip: sts.enumStruct({ + hash: H256, + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId32, + }), + retract_tip: sts.enumStruct({ + hash: H256, + }), + slash_tip: sts.enumStruct({ + hash: H256, + }), + tip: sts.enumStruct({ + hash: H256, + tipValue: sts.bigint(), + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: AccountId32, + tipValue: sts.bigint(), + }), + } +}) + +export const H256 = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TipsCall = TipsCall_close_tip | TipsCall_report_awesome | TipsCall_retract_tip | TipsCall_slash_tip | TipsCall_tip | TipsCall_tip_new + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost + * depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TipsCall_close_tip { + __kind: 'close_tip' + hash: H256 +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: AccountId32 +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TipsCall_retract_tip { + __kind: 'retract_tip' + hash: H256 +} + +/** + * Remove and slash an already-open tip. + * + * May only be called from `T::RejectOrigin`. + * + * As a result, the finder is slashed and the deposits are lost. + * + * Emits `TipSlashed` if successful. + * + * # + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * # + */ +export interface TipsCall_slash_tip { + __kind: 'slash_tip' + hash: H256 +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`, insert tip and check closing, `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TipsCall_tip { + __kind: 'tip' + hash: H256 + tipValue: bigint +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of + * `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: AccountId32 + tipValue: bigint +} + +export type H256 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in + * `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: AccountId32, + }), + change_key: sts.enumStruct({ + new: AccountId32, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: AccountId32, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId32), + }), + set_prime: sts.enumStruct({ + who: AccountId32, + }), + swap_member: sts.enumStruct({ + remove: AccountId32, + add: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: AccountId32 +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: AccountId32 +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: AccountId32 +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId32[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: AccountId32 +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: AccountId32 + add: AccountId32 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: sts.bytes(), + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => sts.bytes()), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + }), + } +}) + +export const Perbill = sts.number() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Bytes + subkeys: number +} + +/** + * Kill some items from storage. + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Bytes[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Make some on-chain remark and emit event. + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is + * expensive). + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very + * expensive. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full + * block. # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: [Bytes, Bytes][] +} + +export type Perbill = number + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: MultiAddress, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: sts.number(), + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + controller: AccountId32, + }), + force_apply_min_commission: sts.enumStruct({ + validatorStash: AccountId32, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => MultiAddress), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => MultiAddress), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + }), + reap_stash: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: MultiAddress, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId32), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_staking_configs: sts.enumStruct({ + minNominatorBond: ConfigOp, + minValidatorBond: ConfigOp, + maxNominatorCount: Type_253, + maxValidatorCount: Type_253, + chillThreshold: Type_254, + minCommission: Type_255, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export const Type_255: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export type Type_255 = Type_255_Noop | Type_255_Remove | Type_255_Set + +export interface Type_255_Noop { + __kind: 'Noop' +} + +export interface Type_255_Remove { + __kind: 'Remove' +} + +export interface Type_255_Set { + __kind: 'Set' + value: Perbill +} + +export const Type_254: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Percent, + } +}) + +export type Type_254 = Type_254_Noop | Type_254_Remove | Type_254_Set + +export interface Type_254_Noop { + __kind: 'Noop' +} + +export interface Type_254_Remove { + __kind: 'Remove' +} + +export interface Type_254_Set { + __kind: 'Set' + value: Percent +} + +export type Percent = number + +export const Type_253: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_253 = Type_253_Noop | Type_253_Remove | Type_253_Set + +export interface Type_253_Noop { + __kind: 'Noop' +} + +export interface Type_253_Remove { + __kind: 'Remove' +} + +export interface Type_253_Set { + __kind: 'Set' + value: number +} + +export const ConfigOp: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type ConfigOp = ConfigOp_Noop | ConfigOp_Remove | ConfigOp_Set + +export interface ConfigOp_Noop { + __kind: 'Noop' +} + +export interface ConfigOp_Remove { + __kind: 'Remove' +} + +export interface ConfigOp_Set { + __kind: 'Set' + value: bigint +} + +export const Percent = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_force_apply_min_commission | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_staking_configs | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: MultiAddress + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose + * any limitation on the amount that can be added. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: number + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Declare a `controller` to stop participating as either a validator or nominator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_, but can be called by anyone. + * + * If the caller is the same as the controller being targeted, then no further checks are + * enforced, and this function behaves just like `chill`. + * + * If the caller is different than the controller being targeted, the following conditions + * must be met: + * + * * `controller` must belong to a nominator who has become non-decodable, + * + * Or: + * + * * A `ChillThreshold` must be set and checked which defines how close to the max + * nominators or validators we must reach before users can start chilling one-another. + * * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine + * how close we are to the threshold. + * * A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines + * if this is a person that should be chilled because they have not met the threshold + * bond required. + * + * This can be helpful if bond requirements are updated, and we need to remove old users + * who do not satisfy these requirements. + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + controller: AccountId32 +} + +/** + * Force a validator to have at least the minimum commission. This will not affect a + * validator who already has a commission greater than or equal to the minimum. Any account + * can call this. + */ +export interface StakingCall_force_apply_min_commission { + __kind: 'force_apply_min_commission' + validatorStash: AccountId32 +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * Thus the election process may be ongoing when this is called. In this case the + * election will continue until the next era is triggered. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: MultiAddress[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (T::MaxNominations). + * - Both the reads and writes follow a similar pattern. + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: MultiAddress[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId32 + era: number +} + +/** + * Remove all data structures concerning a staker/stash once it is at a state where it can + * be considered `dust` in the staking system. The requirements are: + * + * 1. the `total_balance` of the stash is below existential deposit. + * 2. or, the `ledger.total` of the stash is below existential deposit. + * + * The former can happen in cases like a slash; the latter when a fully unbonded account + * is still receiving staking rewards in `RewardDestination::Staked`. + * + * It can be called by anyone, as long as `stash` meets the above requirements. + * + * Refunds the transaction fees upon successful execution. + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MaxUnlockingChunks`. + * - Storage changes: Can't increase storage, only decrease it. + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt instantly (as soon as this function is completed successfully). + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: MultiAddress +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. This + * should report all the storage items that will be deleted by clearing old era history. + * Needed to report an accurate weight for the dispatch. Trusted by `Root` to report an + * accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Weight: O(E) + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, + * ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId32[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt instantly (as soon as this function is completed successfully). + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Update the various staking configurations . + * + * * `min_nominator_bond`: The minimum active bond needed to be a nominator. + * * `min_validator_bond`: The minimum active bond needed to be a validator. + * * `max_nominator_count`: The max number of users who can be a nominator at once. When + * set to `None`, no limit is enforced. + * * `max_validator_count`: The max number of users who can be a validator at once. When + * set to `None`, no limit is enforced. + * * `chill_threshold`: The ratio of `max_nominator_count` or `max_validator_count` which + * should be filled in order for the `chill_other` transaction to work. + * * `min_commission`: The minimum amount of commission that each validators must maintain. + * This is checked only upon calling `validate`. Existing validators are not affected. + * + * Origin must be Root to call this function. + * + * NOTE: Existing nominators and validators will not be affected by this update. + * to kick people under the new limits, `chill_other` should be called. + */ +export interface StakingCall_set_staking_configs { + __kind: 'set_staking_configs' + minNominatorBond: ConfigOp + minValidatorBond: ConfigOp + maxNominatorCount: Type_253 + maxValidatorCount: Type_253 + chillThreshold: Type_254 + minCommission: Type_255 +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * If a user encounters the `InsufficientBond` error when calling this extrinsic, + * they should call `chill` first in order to free up their bonded funds. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * Complexity O(S) where S is the number of slashing spans to remove + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: sts.bigint(), + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: AccountId32, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: AccountId32, + judgement: Type_383, + }), + judge_suspended_member: sts.enumStruct({ + who: AccountId32, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: MultiAddress, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: AccountId32, + value: sts.bigint(), + tip: sts.bigint(), + }), + } +}) + +export const Type_383: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export type Type_383 = Type_383_Approve | Type_383_Rebid | Type_383_Reject + +export interface Type_383_Approve { + __kind: 'Approve' +} + +export interface Type_383_Rebid { + __kind: 'Rebid' +} + +export interface Type_383_Reject { + __kind: 'Reject' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: bigint +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * pallet to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: AccountId32 + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: AccountId32 + judgement: Type_383 +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin forgives + * (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to + * society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: AccountId32 + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured + * payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be approved (`true`) or + * rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: MultiAddress + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: AccountId32 + value: bigint + tip: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: Id, + }), + force_lease: sts.enumStruct({ + para: Id, + leaser: AccountId32, + amount: sts.bigint(), + periodBegin: sts.number(), + periodCount: sts.number(), + }), + trigger_onboard: sts.enumStruct({ + para: Id, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * Clear all leases for a Para Id, refunding any deposits back to the original owners. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: Id +} + +/** + * Just a connect into the `lease_out` call, in case Root wants to force some lease to happen + * independently of any other on-chain mechanism to use it. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: Id + leaser: AccountId32 + amount: bigint + periodBegin: number + periodCount: number +} + +/** + * Try to onboard a parachain that has a lease for the current lease period. + * + * This function can be useful if there was some state issue with a para that should + * have onboarded, but was unable to. As long as they have a lease period, we can + * let them onboard from here. + * + * Origin must be signed, but can be called by anyone. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: SessionKeys, + proof: sts.bytes(), + }), + } +}) + +export const SessionKeys: sts.Type = sts.struct(() => { + return { + grandpa: Public, + babe: sts.bytes(), + imOnline: sts.bytes(), + paraValidator: sts.bytes(), + paraAssignment: sts.bytes(), + authorityDiscovery: sts.bytes(), + } +}) + +export const Public = sts.bytes() + +export interface SessionKeys { + grandpa: Public + babe: Bytes + imOnline: Bytes + paraValidator: Bytes + paraAssignment: Bytes + authorityDiscovery: Bytes +} + +export type Public = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be Signed and the account must be either be + * convertible to a validator ID using the chain's typical addressing system (this usually + * means being a controller account) or directly convertible into a validator ID (which + * usually means being a stash account). + * + * # + * - Complexity: `O(1)` in number of key types. Actual cost depends on the number of length + * of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)`. Actual cost depends on the number of length of + * `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: SessionKeys + proof: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: sts.number(), + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + schedule_after: sts.enumStruct({ + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + } +}) + +export const MaybeHashed: sts.Type = sts.closedEnum(() => { + return { + Hash: H256, + Value: Call, + } +}) + +export type MaybeHashed = MaybeHashed_Hash | MaybeHashed_Value + +export interface MaybeHashed_Hash { + __kind: 'Hash' + value: H256 +} + +export interface MaybeHashed_Value { + __kind: 'Value' + value: Call +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: number + index: number +} + +/** + * Cancel a named scheduled task. + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Schedule a named task. + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`](Self::schedule_named). + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + deregister: sts.enumStruct({ + id: Id, + }), + force_register: sts.enumStruct({ + who: AccountId32, + deposit: sts.bigint(), + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + force_remove_lock: sts.enumStruct({ + para: Id, + }), + register: sts.enumStruct({ + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + reserve: sts.unit(), + swap: sts.enumStruct({ + id: Id, + other: Id, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RegistrarCall = RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_force_remove_lock | RegistrarCall_register | RegistrarCall_reserve | RegistrarCall_swap + +/** + * Deregister a Para Id, freeing all data and returning any deposit. + * + * The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: Id +} + +/** + * Force the registration of a Para Id on the relay chain. + * + * This function must be called by a Root origin. + * + * The deposit taken can be specified for this registration. Any `ParaId` + * can be registered, including sub-1000 IDs which are System Parachains. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId32 + deposit: bigint + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Remove a manager lock from a para. This will allow the manager of a + * previously locked para to deregister or swap a para without using governance. + * + * Can only be called by the Root origin. + */ +export interface RegistrarCall_force_remove_lock { + __kind: 'force_remove_lock' + para: Id +} + +/** + * Register head data and validation code for a reserved Para Id. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. + * - `id`: The para ID. Must be owned/managed by the `origin` signing account. + * - `genesis_head`: The genesis head data of the parachain/thread. + * - `validation_code`: The initial validation code of the parachain/thread. + * + * ## Deposits/Fees + * The origin signed account must reserve a corresponding deposit for the registration. Anything already + * reserved previously for this para ID is accounted for. + * + * ## Events + * The `Registered` event is emitted in case of success. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Reserve a Para Id on the relay chain. + * + * This function will reserve a new Para Id to be owned/managed by the origin account. + * The origin account is able to register head data and validation code using `register` to create + * a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID. + * + * ## Deposits/Fees + * The origin must reserve a deposit of `ParaDeposit` for the registration. + * + * ## Events + * The `Reserved` event is emitted in case of success, which provides the ID reserved for use. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * Swap a parachain with another parachain or parathread. + * + * The origin must be Root, the `para` owner, or the `para` itself. + * + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: Id + other: Id +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: AccountId32, + call: Call, + }), + cancel_recovered: sts.enumStruct({ + account: AccountId32, + }), + claim_recovery: sts.enumStruct({ + account: AccountId32, + }), + close_recovery: sts.enumStruct({ + rescuer: AccountId32, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId32), + threshold: sts.number(), + delayPeriod: sts.number(), + }), + initiate_recovery: sts.enumStruct({ + account: AccountId32, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: AccountId32, + rescuer: AccountId32, + }), + vouch_recovery: sts.enumStruct({ + lost: AccountId32, + rescuer: AccountId32, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: AccountId32 + call: Call +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: AccountId32 +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully recovered by + * you. + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: AccountId32 +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: AccountId32 +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. Should be + * ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt before the + * account can be recovered. Should be less than or equal to the length of the list of + * friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized that + * needs to pass before the account can be recovered. + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId32[] + threshold: number + delayPeriod: number +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account needs to be + * recoverable (i.e. have a recovery configuration). + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: AccountId32 +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: AccountId32 + rescuer: AccountId32 +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: AccountId32 + rescuer: AccountId32 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: AccountId32, + proxyType: ProxyType, + delay: sts.number(), + }), + announce: sts.enumStruct({ + real: AccountId32, + callHash: H256, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + delay: sts.number(), + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: AccountId32, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: AccountId32, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + proxy_announced: sts.enumStruct({ + delegate: AccountId32, + real: AccountId32, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + reject_announcement: sts.enumStruct({ + delegate: AccountId32, + callHash: H256, + }), + remove_announcement: sts.enumStruct({ + real: AccountId32, + callHash: H256, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: AccountId32, + proxyType: ProxyType, + delay: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: AccountId32 + proxyType: ProxyType + delay: number +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: AccountId32 + callHash: H256 +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + * TODO: Might be over counting 1 read + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: number + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: AccountId32 + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: AccountId32 + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Dispatch the given `call` from an account that the sender is authorized for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: AccountId32 + real: AccountId32 + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: AccountId32 + callHash: H256 +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: AccountId32 + callHash: H256 +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: AccountId32 + proxyType: ProxyType + delay: number +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Society | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Society { + __kind: 'Society' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PreimageCall: sts.Type = sts.closedEnum(() => { + return { + note_preimage: sts.enumStruct({ + bytes: sts.bytes(), + }), + request_preimage: sts.enumStruct({ + hash: H256, + }), + unnote_preimage: sts.enumStruct({ + hash: H256, + }), + unrequest_preimage: sts.enumStruct({ + hash: H256, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PreimageCall = PreimageCall_note_preimage | PreimageCall_request_preimage | PreimageCall_unnote_preimage | PreimageCall_unrequest_preimage + +/** + * Register a preimage on-chain. + * + * If the preimage was previously requested, no fees or deposits are taken for providing + * the preimage. Otherwise, a deposit is taken proportional to the size of the preimage. + */ +export interface PreimageCall_note_preimage { + __kind: 'note_preimage' + bytes: Bytes +} + +/** + * Request a preimage be uploaded to the chain without paying any fees or deposits. + * + * If the preimage requests has already been provided on-chain, we unreserve any deposit + * a user may have paid, and take the control of the preimage out of their hands. + */ +export interface PreimageCall_request_preimage { + __kind: 'request_preimage' + hash: H256 +} + +/** + * Clear an unrequested preimage from the runtime storage. + */ +export interface PreimageCall_unnote_preimage { + __kind: 'unnote_preimage' + hash: H256 +} + +/** + * Clear a previously made request for a preimage. + * + * NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. + */ +export interface PreimageCall_unrequest_preimage { + __kind: 'unrequest_preimage' + hash: H256 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PhragmenElectionCall: sts.Type = sts.closedEnum(() => { + return { + clean_defunct_voters: sts.enumStruct({ + numVoters: sts.number(), + numDefunct: sts.number(), + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + slashBond: sts.boolean(), + rerunElection: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId32), + value: sts.bigint(), + }), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PhragmenElectionCall = PhragmenElectionCall_clean_defunct_voters | PhragmenElectionCall_remove_member | PhragmenElectionCall_remove_voter | PhragmenElectionCall_renounce_candidacy | PhragmenElectionCall_submit_candidacy | PhragmenElectionCall_vote + +/** + * Clean all voters who are defunct (i.e. they do not serve any purpose at all). The + * deposit of the removed voters are returned. + * + * This is an root function to be used only for cleaning the state. + * + * The dispatch origin of this call must be root. + * + * # + * The total number of voters and those that are defunct must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_clean_defunct_voters { + __kind: 'clean_defunct_voters' + numVoters: number + numDefunct: number +} + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, if `rerun_election` is `true`, a new phragmen election is + * started, else, nothing happens. + * + * If `slash_bond` is set to true, the bond of the member being removed is slashed. Else, + * it is returned. + * + * The dispatch origin of this call must be root. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement, we use a small weight. Else, since this is a root call and + * will go into phragmen, we assume full block for now. + * # + */ +export interface PhragmenElectionCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + slashBond: boolean + rerunElection: boolean +} + +/** + * Remove `origin` as a voter. + * + * This removes the lock and returns the deposit. + * + * The dispatch origin of this call must be signed and be a voter. + */ +export interface PhragmenElectionCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * + * - `origin` is a candidate and not elected in any set. In this case, the deposit is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the deposit is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the deposit is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_member`](Self::remove_member), if replacement runners exists, they + * are immediately used. If the prime is renouncing, then no prime will exist until the + * next round. + * + * The dispatch origin of this call must be signed, and have one of the above roles. + * + * # + * The type of renouncing must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Submit oneself for candidacy. A fixed amount of deposit is recorded. + * + * All candidates are wiped at the end of the term. They either become a member/runner-up, + * or leave the system while their deposit is slashed. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`] + * to get their deposit back. Losing the spot in an election will always lead to a slash. + * + * # + * The number of current candidates must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is + * reserved. The deposit is based on the number of votes and can be updated over time. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * If `value` is more than `who`'s free balance, then the maximum of the two is used. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * It is the responsibility of the caller to **NOT** place all of their balance into the + * lock and keep some for further operations. + * + * # + * We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less. + * # + */ +export interface PhragmenElectionCall_vote { + __kind: 'vote' + votes: AccountId32[] + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasSharedCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasDisputesCall: sts.Type = sts.closedEnum(() => { + return { + force_unfreeze: sts.unit(), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasDisputesCall = ParasDisputesCall_force_unfreeze + +export interface ParasDisputesCall_force_unfreeze { + __kind: 'force_unfreeze' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + add_trusted_validation_code: sts.enumStruct({ + validationCode: ValidationCode, + }), + force_note_new_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: Id, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + relayParentNumber: sts.number(), + }), + force_set_current_code: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + include_pvf_check_statement: sts.enumStruct({ + stmt: V2PvfCheckStatement, + signature: sts.bytes(), + }), + poke_unused_validation_code: sts.enumStruct({ + validationCodeHash: ValidationCodeHash, + }), + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const V2PvfCheckStatement: sts.Type = sts.struct(() => { + return { + accept: sts.boolean(), + subject: ValidationCodeHash, + sessionIndex: sts.number(), + validatorIndex: V2ValidatorIndex, + } +}) + +export const V2ValidatorIndex = sts.number() + +export interface V2PvfCheckStatement { + accept: boolean + subject: ValidationCodeHash + sessionIndex: number + validatorIndex: V2ValidatorIndex +} + +export type V2ValidatorIndex = number + +export type ValidationCodeHash = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasCall = ParasCall_add_trusted_validation_code | ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head | ParasCall_include_pvf_check_statement | ParasCall_poke_unused_validation_code + +/** + * Adds the validation code to the storage. + * + * The code will not be added if it is already present. Additionally, if PVF pre-checking + * is running for that code, it will be instantly accepted. + * + * Otherwise, the code will be added into the storage. Note that the code will be added + * into storage with reference count 0. This is to account the fact that there are no users + * for this code yet. The caller will have to make sure that this code eventually gets + * used by some parachain or removed from the storage to avoid storage leaks. For the latter + * prefer to use the `poke_unused_validation_code` dispatchable to raw storage manipulation. + * + * This function is mainly meant to be used for upgrading parachains that do not follow + * the go-ahead signal while the PVF pre-checking feature is enabled. + */ +export interface ParasCall_add_trusted_validation_code { + __kind: 'add_trusted_validation_code' + validationCode: ValidationCode +} + +/** + * Note a new block head for para within the context of the current block. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: Id + newHead: HeadData +} + +/** + * Put a parachain directly into the next session's action queue. + * We can't queue it any sooner than this without going into the + * initializer... + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: Id +} + +/** + * Schedule an upgrade as if it was scheduled in the given relay parent block. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: Id + newCode: ValidationCode + relayParentNumber: number +} + +/** + * Set the storage for the parachain validation code immediately. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: Id + newCode: ValidationCode +} + +/** + * Set the storage for the current parachain head data immediately. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: Id + newHead: HeadData +} + +/** + * Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and + * enacts the results if that was the last vote before achieving the supermajority. + */ +export interface ParasCall_include_pvf_check_statement { + __kind: 'include_pvf_check_statement' + stmt: V2PvfCheckStatement + signature: Bytes +} + +/** + * Remove the validation code from the storage iff the reference count is 0. + * + * This is better than removing the storage directly, because it will not remove the code + * that was suddenly got used by some parachain while this dispatchable was pending + * dispatching. + */ +export interface ParasCall_poke_unused_validation_code { + __kind: 'poke_unused_validation_code' + validationCodeHash: ValidationCodeHash +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: V2InherentData, + }), + } +}) + +export const V2InherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => V2UncheckedSigned), + backedCandidates: sts.array(() => V2BackedCandidate), + disputes: sts.array(() => V2DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: H256, + number: sts.number(), + stateRoot: H256, + extrinsicsRoot: H256, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + Consensus: sts.tuple(() => [sts.bytes(), sts.bytes()]), + Other: sts.bytes(), + PreRuntime: sts.tuple(() => [sts.bytes(), sts.bytes()]), + RuntimeEnvironmentUpdated: sts.unit(), + Seal: sts.tuple(() => [sts.bytes(), sts.bytes()]), + } +}) + +export type DigestItem = DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: [Bytes, Bytes] +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: [Bytes, Bytes] +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: [Bytes, Bytes] +} + +export interface Digest { + logs: DigestItem[] +} + +export interface Header { + parentHash: H256 + number: number + stateRoot: H256 + extrinsicsRoot: H256 + digest: Digest +} + +export const V2DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: sts.number(), + statements: sts.array(() => sts.tuple(() => [V2DisputeStatement, V2ValidatorIndex, sts.bytes()])), + } +}) + +export const V2DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: V2InvalidDisputeStatementKind, + Valid: V2ValidDisputeStatementKind, + } +}) + +export const V2ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + BackingSeconded: H256, + BackingValid: H256, + Explicit: sts.unit(), + } +}) + +export type V2ValidDisputeStatementKind = V2ValidDisputeStatementKind_ApprovalChecking | V2ValidDisputeStatementKind_BackingSeconded | V2ValidDisputeStatementKind_BackingValid | V2ValidDisputeStatementKind_Explicit + +export interface V2ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface V2ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: H256 +} + +export interface V2ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: H256 +} + +export interface V2ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export const V2InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export type V2InvalidDisputeStatementKind = V2InvalidDisputeStatementKind_Explicit + +export interface V2InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type V2DisputeStatement = V2DisputeStatement_Invalid | V2DisputeStatement_Valid + +export interface V2DisputeStatement_Invalid { + __kind: 'Invalid' + value: V2InvalidDisputeStatementKind +} + +export interface V2DisputeStatement_Valid { + __kind: 'Valid' + value: V2ValidDisputeStatementKind +} + +export const CandidateHash = sts.bytes() + +export interface V2DisputeStatementSet { + candidateHash: CandidateHash + session: number + statements: [V2DisputeStatement, V2ValidatorIndex, Bytes][] +} + +export type CandidateHash = Bytes + +export const V2BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: V2CommittedCandidateReceipt, + validityVotes: sts.array(() => V2ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const V2ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.bytes(), + Implicit: sts.bytes(), + } +}) + +export type V2ValidityAttestation = V2ValidityAttestation_Explicit | V2ValidityAttestation_Implicit + +export interface V2ValidityAttestation_Explicit { + __kind: 'Explicit' + value: Bytes +} + +export interface V2ValidityAttestation_Implicit { + __kind: 'Implicit' + value: Bytes +} + +export const V2CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: V2CandidateDescriptor, + commitments: V2CandidateCommitments, + } +}) + +export const V2CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => sts.bytes()), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: sts.number(), + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: Id, + data: sts.bytes(), + } +}) + +export interface OutboundHrmpMessage { + recipient: Id + data: Bytes +} + +export interface V2CandidateCommitments { + upwardMessages: Bytes[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: number +} + +export const V2CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: Id, + relayParent: H256, + collator: V2Public, + persistedValidationDataHash: H256, + povHash: H256, + erasureRoot: H256, + signature: V2Signature, + paraHead: H256, + validationCodeHash: ValidationCodeHash, + } +}) + +export const V2Signature = sts.bytes() + +export const V2Public = sts.bytes() + +export interface V2CandidateDescriptor { + paraId: Id + relayParent: H256 + collator: V2Public + persistedValidationDataHash: H256 + povHash: H256 + erasureRoot: H256 + signature: V2Signature + paraHead: H256 + validationCodeHash: ValidationCodeHash +} + +export type V2Signature = Bytes + +export type V2Public = Bytes + +export interface V2CommittedCandidateReceipt { + descriptor: V2CandidateDescriptor + commitments: V2CandidateCommitments +} + +export interface V2BackedCandidate { + candidate: V2CommittedCandidateReceipt + validityVotes: V2ValidityAttestation[] + validatorIndices: BitSequence +} + +export const V2UncheckedSigned: sts.Type = sts.struct(() => { + return { + payload: V2AvailabilityBitfield, + validatorIndex: V2ValidatorIndex, + signature: sts.bytes(), + } +}) + +export const V2AvailabilityBitfield = sts.bitseq() + +export interface V2UncheckedSigned { + payload: V2AvailabilityBitfield + validatorIndex: V2ValidatorIndex + signature: Bytes +} + +export type V2AvailabilityBitfield = BitSequence + +export interface V2InherentData { + bitfields: V2UncheckedSigned[] + backedCandidates: V2BackedCandidate[] + disputes: V2DisputeStatementSet[] + parentHeader: Header +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInherentCall = ParaInherentCall_enter + +/** + * Enter the paras inherent. This will process bitfields and backed candidates. + */ +export interface ParaInherentCall_enter { + __kind: 'enter' + data: V2InherentData +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInclusionCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const NominationPoolsCall: sts.Type = sts.closedEnum(() => { + return { + bond_extra: sts.enumStruct({ + extra: BondExtra, + }), + chill: sts.enumStruct({ + poolId: sts.number(), + }), + claim_payout: sts.unit(), + create: sts.enumStruct({ + amount: sts.bigint(), + root: AccountId32, + nominator: AccountId32, + stateToggler: AccountId32, + }), + join: sts.enumStruct({ + amount: sts.bigint(), + poolId: sts.number(), + }), + nominate: sts.enumStruct({ + poolId: sts.number(), + validators: sts.array(() => AccountId32), + }), + pool_withdraw_unbonded: sts.enumStruct({ + poolId: sts.number(), + numSlashingSpans: sts.number(), + }), + set_configs: sts.enumStruct({ + minJoinBond: Type_488, + minCreateBond: Type_488, + maxPools: Type_489, + maxMembers: Type_489, + maxMembersPerPool: Type_489, + }), + set_metadata: sts.enumStruct({ + poolId: sts.number(), + metadata: sts.bytes(), + }), + set_state: sts.enumStruct({ + poolId: sts.number(), + state: PoolState, + }), + unbond: sts.enumStruct({ + memberAccount: AccountId32, + unbondingPoints: sts.bigint(), + }), + update_roles: sts.enumStruct({ + poolId: sts.number(), + newRoot: Type_490, + newNominator: Type_490, + newStateToggler: Type_490, + }), + withdraw_unbonded: sts.enumStruct({ + memberAccount: AccountId32, + numSlashingSpans: sts.number(), + }), + } +}) + +export const Type_490: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: AccountId32, + } +}) + +export type Type_490 = Type_490_Noop | Type_490_Remove | Type_490_Set + +export interface Type_490_Noop { + __kind: 'Noop' +} + +export interface Type_490_Remove { + __kind: 'Remove' +} + +export interface Type_490_Set { + __kind: 'Set' + value: AccountId32 +} + +export const PoolState: sts.Type = sts.closedEnum(() => { + return { + Blocked: sts.unit(), + Destroying: sts.unit(), + Open: sts.unit(), + } +}) + +export type PoolState = PoolState_Blocked | PoolState_Destroying | PoolState_Open + +export interface PoolState_Blocked { + __kind: 'Blocked' +} + +export interface PoolState_Destroying { + __kind: 'Destroying' +} + +export interface PoolState_Open { + __kind: 'Open' +} + +export const Type_489: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_489 = Type_489_Noop | Type_489_Remove | Type_489_Set + +export interface Type_489_Noop { + __kind: 'Noop' +} + +export interface Type_489_Remove { + __kind: 'Remove' +} + +export interface Type_489_Set { + __kind: 'Set' + value: number +} + +export const Type_488: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type Type_488 = Type_488_Noop | Type_488_Remove | Type_488_Set + +export interface Type_488_Noop { + __kind: 'Noop' +} + +export interface Type_488_Remove { + __kind: 'Remove' +} + +export interface Type_488_Set { + __kind: 'Set' + value: bigint +} + +export const BondExtra: sts.Type = sts.closedEnum(() => { + return { + FreeBalance: sts.bigint(), + Rewards: sts.unit(), + } +}) + +export type BondExtra = BondExtra_FreeBalance | BondExtra_Rewards + +export interface BondExtra_FreeBalance { + __kind: 'FreeBalance' + value: bigint +} + +export interface BondExtra_Rewards { + __kind: 'Rewards' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type NominationPoolsCall = NominationPoolsCall_bond_extra | NominationPoolsCall_chill | NominationPoolsCall_claim_payout | NominationPoolsCall_create | NominationPoolsCall_join | NominationPoolsCall_nominate | NominationPoolsCall_pool_withdraw_unbonded | NominationPoolsCall_set_configs | NominationPoolsCall_set_metadata | NominationPoolsCall_set_state | NominationPoolsCall_unbond | NominationPoolsCall_update_roles | NominationPoolsCall_withdraw_unbonded + +/** + * Bond `extra` more funds from `origin` into the pool to which they already belong. + * + * Additional funds can come from either the free balance of the account, of from the + * accumulated rewards, see [`BondExtra`]. + * + * Bonding extra funds implies an automatic payout of all pending rewards as well. + */ +export interface NominationPoolsCall_bond_extra { + __kind: 'bond_extra' + extra: BondExtra +} + +/** + * Chill on behalf of the pool. + * + * The dispatch origin of this call must be signed by the pool nominator or the pool + * root role, same as [`Pallet::nominate`]. + * + * This directly forward the call to the staking pallet, on behalf of the pool bonded + * account. + */ +export interface NominationPoolsCall_chill { + __kind: 'chill' + poolId: number +} + +/** + * A bonded member can use this to claim their payout based on the rewards that the pool + * has accumulated since their last claimed payout (OR since joining if this is there first + * time claiming rewards). The payout will be transferred to the member's account. + * + * The member will earn rewards pro rata based on the members stake vs the sum of the + * members in the pools stake. Rewards do not "expire". + */ +export interface NominationPoolsCall_claim_payout { + __kind: 'claim_payout' +} + +/** + * Create a new delegation pool. + * + * # Arguments + * + * * `amount` - The amount of funds to delegate to the pool. This also acts of a sort of + * deposit since the pools creator cannot fully unbond funds until the pool is being + * destroyed. + * * `index` - A disambiguation index for creating the account. Likely only useful when + * creating multiple pools in the same extrinsic. + * * `root` - The account to set as [`PoolRoles::root`]. + * * `nominator` - The account to set as the [`PoolRoles::nominator`]. + * * `state_toggler` - The account to set as the [`PoolRoles::state_toggler`]. + * + * # Note + * + * In addition to `amount`, the caller will transfer the existential deposit; so the caller + * needs at have at least `amount + existential_deposit` transferrable. + */ +export interface NominationPoolsCall_create { + __kind: 'create' + amount: bigint + root: AccountId32 + nominator: AccountId32 + stateToggler: AccountId32 +} + +/** + * Stake funds with a pool. The amount to bond is transferred from the member to the + * pools account and immediately increases the pools bond. + * + * # Note + * + * * An account can only be a member of a single pool. + * * An account cannot join the same pool multiple times. + * * This call will *not* dust the member account, so the member must have at least + * `existential deposit + amount` in their account. + * * Only a pool with [`PoolState::Open`] can be joined + */ +export interface NominationPoolsCall_join { + __kind: 'join' + amount: bigint + poolId: number +} + +/** + * Nominate on behalf of the pool. + * + * The dispatch origin of this call must be signed by the pool nominator or the pool + * root role. + * + * This directly forward the call to the staking pallet, on behalf of the pool bonded + * account. + */ +export interface NominationPoolsCall_nominate { + __kind: 'nominate' + poolId: number + validators: AccountId32[] +} + +/** + * Call `withdraw_unbonded` for the pools account. This call can be made by any account. + * + * This is useful if their are too many unlocking chunks to call `unbond`, and some + * can be cleared by withdrawing. In the case there are too many unlocking chunks, the user + * would probably see an error like `NoMoreChunks` emitted from the staking system when + * they attempt to unbond. + */ +export interface NominationPoolsCall_pool_withdraw_unbonded { + __kind: 'pool_withdraw_unbonded' + poolId: number + numSlashingSpans: number +} + +/** + * Update configurations for the nomination pools. The origin for this call must be + * Root. + * + * # Arguments + * + * * `min_join_bond` - Set [`MinJoinBond`]. + * * `min_create_bond` - Set [`MinCreateBond`]. + * * `max_pools` - Set [`MaxPools`]. + * * `max_members` - Set [`MaxPoolMembers`]. + * * `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]. + */ +export interface NominationPoolsCall_set_configs { + __kind: 'set_configs' + minJoinBond: Type_488 + minCreateBond: Type_488 + maxPools: Type_489 + maxMembers: Type_489 + maxMembersPerPool: Type_489 +} + +/** + * Set a new metadata for the pool. + * + * The dispatch origin of this call must be signed by the state toggler, or the root role + * of the pool. + */ +export interface NominationPoolsCall_set_metadata { + __kind: 'set_metadata' + poolId: number + metadata: Bytes +} + +/** + * Set a new state for the pool. + * + * If a pool is already in the `Destroying` state, then under no condition can its state + * change again. + * + * The dispatch origin of this call must be either: + * + * 1. signed by the state toggler, or the root role of the pool, + * 2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and + * then the state of the pool can be permissionlessly changed to `Destroying`. + */ +export interface NominationPoolsCall_set_state { + __kind: 'set_state' + poolId: number + state: PoolState +} + +/** + * Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It + * implicitly collects the rewards one last time, since not doing so would mean some + * rewards would be forfeited. + * + * Under certain conditions, this call can be dispatched permissionlessly (i.e. by any + * account). + * + * # Conditions for a permissionless dispatch. + * + * * The pool is blocked and the caller is either the root or state-toggler. This is + * refereed to as a kick. + * * The pool is destroying and the member is not the depositor. + * * The pool is destroying, the member is the depositor and no other members are in the + * pool. + * + * ## Conditions for permissioned dispatch (i.e. the caller is also the + * `member_account`): + * + * * The caller is not the depositor. + * * The caller is the depositor, the pool is destroying and no other members are in the + * pool. + * + * # Note + * + * If there are too many unlocking chunks to unbond with the pool account, + * [`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks. If + * there are too many unlocking chunks, the result of this call will likely be the + * `NoMoreChunks` error from the staking system. + */ +export interface NominationPoolsCall_unbond { + __kind: 'unbond' + memberAccount: AccountId32 + unbondingPoints: bigint +} + +/** + * Update the roles of the pool. + * + * The root is the only entity that can change any of the roles, including itself, + * excluding the depositor, who can never change. + * + * It emits an event, notifying UIs of the role change. This event is quite relevant to + * most pool members and they should be informed of changes to pool roles. + */ +export interface NominationPoolsCall_update_roles { + __kind: 'update_roles' + poolId: number + newRoot: Type_490 + newNominator: Type_490 + newStateToggler: Type_490 +} + +/** + * Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an + * error is returned. + * + * Under certain conditions, this call can be dispatched permissionlessly (i.e. by any + * account). + * + * # Conditions for a permissionless dispatch + * + * * The pool is in destroy mode and the target is not the depositor. + * * The target is the depositor and they are the only member in the sub pools. + * * The pool is blocked and the caller is either the root or state-toggler. + * + * # Conditions for permissioned dispatch + * + * * The caller is the target and they are not the depositor. + * + * # Note + * + * If the target is the depositor, the pool will be destroyed. + */ +export interface NominationPoolsCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + memberAccount: AccountId32 + numSlashingSpans: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: sts.bigint(), + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + call: sts.bytes(), + storeCall: sts.boolean(), + maxWeight: sts.bigint(), + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId32), + call: Call, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: sts.number(), + index: sts.number(), + } +}) + +export interface Timepoint { + height: number + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: bigint +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + call: Bytes + storeCall: boolean + maxWeight: bigint +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId32[] + call: Call +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId32[] + timepoint: Timepoint + callHash: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const InitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type InitializerCall = InitializerCall_force_approve + +/** + * Issue a signal to the consensus engine to forcibly act as though all parachain + * blocks in all relay chain blocks up to and including the given number in the current + * chain are valid and should be finalized. + */ +export interface InitializerCall_force_approve { + __kind: 'force_approve' + upTo: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: sts.number(), + }), + force_transfer: sts.enumStruct({ + new: AccountId32, + index: sts.number(), + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: sts.number(), + }), + freeze: sts.enumStruct({ + index: sts.number(), + }), + transfer: sts.enumStruct({ + new: AccountId32, + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: number +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: AccountId32 + index: number + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: number +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the + * deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: number +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: sts.bytes(), + }), + } +}) + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: sts.number(), + networkState: OpaqueNetworkState, + sessionIndex: sts.number(), + authorityIndex: sts.number(), + validatorsLen: sts.number(), + } +}) + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export interface Heartbeat { + blockNumber: number + networkState: OpaqueNetworkState + sessionIndex: number + authorityIndex: number + validatorsLen: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is + * length of `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Bytes +} + +/** + * Identity pallet declaration. + */ +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: AccountId32, + }), + add_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: sts.number(), + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: MultiAddress, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: MultiAddress, + judgement: Judgement, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: MultiAddress, + }), + rename_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: AccountId32, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: BitFlags, + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId32, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => sts.tuple(() => [Data, Data])), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => sts.bytes()), + image: Data, + twitter: Data, + } +}) + +export interface IdentityInfo { + additional: [Data, Data][] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (Bytes | undefined) + image: Data + twitter: Data +} + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: Bytes +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: Bytes +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: Bytes +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: Bytes +} + +export const BitFlags = sts.bigint() + +export const Judgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: sts.bigint(), + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export type Judgement = Judgement_Erroneous | Judgement_FeePaid | Judgement_KnownGood | Judgement_LowQuality | Judgement_OutOfDate | Judgement_Reasonable | Judgement_Unknown + +export interface Judgement_Erroneous { + __kind: 'Erroneous' +} + +export interface Judgement_FeePaid { + __kind: 'FeePaid' + value: bigint +} + +export interface Judgement_KnownGood { + __kind: 'KnownGood' +} + +export interface Judgement_LowQuality { + __kind: 'LowQuality' +} + +export interface Judgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface Judgement_Reasonable { + __kind: 'Reasonable' +} + +export interface Judgement_Unknown { + __kind: 'Unknown' +} + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: sts.bytes(), + Keccak256: sts.bytes(), + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: sts.bytes(), + ShaThree256: sts.bytes(), + } +}) + +/** + * Identity pallet declaration. + */ +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: AccountId32 +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: MultiAddress + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: number +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: MultiAddress +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: MultiAddress + judgement: Judgement +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: MultiAddress +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: MultiAddress + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: AccountId32 +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: BitFlags +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId32, Data][] +} + +export type BitFlags = bigint + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const HrmpCall: sts.Type = sts.closedEnum(() => { + return { + force_clean_hrmp: sts.enumStruct({ + para: Id, + inbound: sts.number(), + outbound: sts.number(), + }), + force_process_hrmp_close: sts.enumStruct({ + channels: sts.number(), + }), + force_process_hrmp_open: sts.enumStruct({ + channels: sts.number(), + }), + hrmp_accept_open_channel: sts.enumStruct({ + sender: Id, + }), + hrmp_cancel_open_request: sts.enumStruct({ + channelId: HrmpChannelId, + openRequests: sts.number(), + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: Id, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: Id, + recipient: Id, + } +}) + +export interface HrmpChannelId { + sender: Id + recipient: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type HrmpCall = HrmpCall_force_clean_hrmp | HrmpCall_force_process_hrmp_close | HrmpCall_force_process_hrmp_open | HrmpCall_hrmp_accept_open_channel | HrmpCall_hrmp_cancel_open_request | HrmpCall_hrmp_close_channel | HrmpCall_hrmp_init_open_channel + +/** + * This extrinsic triggers the cleanup of all the HRMP storage items that + * a para may have. Normally this happens once per session, but this allows + * you to trigger the cleanup immediately for a specific parachain. + * + * Origin must be Root. + * + * Number of inbound and outbound channels for `para` must be provided as witness data of weighing. + */ +export interface HrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: Id + inbound: number + outbound: number +} + +/** + * Force process HRMP close channel requests. + * + * If there are pending HRMP close channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of closing channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' + channels: number +} + +/** + * Force process HRMP open channel requests. + * + * If there are pending HRMP open channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of opening channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' + channels: number +} + +/** + * Accept a pending open channel request from the given sender. + * + * The channel will be opened only on the next session boundary. + */ +export interface HrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: Id +} + +/** + * This cancels a pending open channel request. It can be canceled by either of the sender + * or the recipient for that request. The origin must be either of those. + * + * The cancellation happens immediately. It is not possible to cancel the request if it is + * already accepted. + * + * Total number of open requests (i.e. `HrmpOpenChannelRequestsList`) must be provided as + * witness data. + */ +export interface HrmpCall_hrmp_cancel_open_request { + __kind: 'hrmp_cancel_open_request' + channelId: HrmpChannelId + openRequests: number +} + +/** + * Initiate unilateral closing of a channel. The origin must be either the sender or the + * recipient in the channel being closed. + * + * The closure can only happen on a session change. + */ +export interface HrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * Initiate opening a channel from a parachain to a given recipient with given channel + * parameters. + * + * - `proposed_max_capacity` - specifies how many messages can be in the channel at once. + * - `proposed_max_message_size` - specifies the maximum size of the messages. + * + * These numbers are a subject to the relay-chain configuration limits. + * + * The channel can be opened only after the recipient confirms it and only on a session + * change. + */ +export interface HrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: Id + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: sts.number(), + bestFinalizedBlockNumber: sts.number(), + }), + report_equivocation: sts.enumStruct({ + equivocationProof: Type_274, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_274, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: sts.number(), + trieNodes: sts.array(() => sts.bytes()), + validatorCount: sts.number(), + } +}) + +export interface MembershipProof { + session: number + trieNodes: Bytes[] + validatorCount: number +} + +export const Type_274: sts.Type = sts.struct(() => { + return { + setId: sts.bigint(), + equivocation: Equivocation, + } +}) + +export const Equivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: Type_281, + Prevote: Type_276, + } +}) + +export const Type_276: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Prevote, sts.bytes()]), + second: sts.tuple(() => [Prevote, sts.bytes()]), + } +}) + +export const Prevote: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Prevote { + targetHash: H256 + targetNumber: number +} + +export interface Type_276 { + roundNumber: bigint + identity: Public + first: [Prevote, Bytes] + second: [Prevote, Bytes] +} + +export const Type_281: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Precommit, sts.bytes()]), + second: sts.tuple(() => [Precommit, sts.bytes()]), + } +}) + +export const Precommit: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Precommit { + targetHash: H256 + targetNumber: number +} + +export interface Type_281 { + roundNumber: bigint + identity: Public + first: [Precommit, Bytes] + second: [Precommit, Bytes] +} + +export type Equivocation = Equivocation_Precommit | Equivocation_Prevote + +export interface Equivocation_Precommit { + __kind: 'Precommit' + value: Type_281 +} + +export interface Equivocation_Prevote { + __kind: 'Prevote' + value: Type_276 +} + +export interface Type_274 { + setId: bigint + equivocation: Equivocation +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has stalled. + * + * This will trigger a forced authority set change at the beginning of the next session, to + * be enacted `delay` blocks after that. The `delay` should be high enough to safely assume + * that the block signalling the forced change will not be re-orged e.g. 1000 blocks. + * The block production rate (which may be slowed down because of finality lagging) should + * be taken into account when choosing the `delay`. The GRANDPA voters based on the new + * authority will start voting on top of `best_finalized_block_number` for new finalized + * blocks. `best_finalized_block_number` should be the highest of the latest finalized + * block of all validators of the new authority set. + * + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: number + bestFinalizedBlockNumber: number +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_274 + keyOwnerProof: MembershipProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_274 + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GiltCall: sts.Type = sts.closedEnum(() => { + return { + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + set_target: sts.enumStruct({ + target: sts.bigint(), + }), + thaw: sts.enumStruct({ + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GiltCall = GiltCall_place_bid | GiltCall_retract_bid | GiltCall_set_target | GiltCall_thaw + +/** + * Place a bid for a gilt to be issued. + * + * Origin must be Signed, and account must have at least `amount` in free balance. + * + * - `amount`: The amount of the bid; these funds will be reserved. If the bid is + * successfully elevated into an issued gilt, then these funds will continue to be + * reserved until the gilt expires. Must be at least `MinFreeze`. + * - `duration`: The number of periods for which the funds will be locked if the gilt is + * issued. It will expire only after this period has elapsed after the point of issuance. + * Must be greater than 1 and no more than `QueueCount`. + * + * Complexities: + * - `Queues[duration].len()` (just take max). + */ +export interface GiltCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * Retract a previously placed bid. + * + * Origin must be Signed, and the account should have previously issued a still-active bid + * of `amount` for `duration`. + * + * - `amount`: The amount of the previous bid. + * - `duration`: The duration of the previous bid. + */ +export interface GiltCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * Set target proportion of gilt-funds. + * + * Origin must be `AdminOrigin`. + * + * - `target`: The target proportion of effective issued funds that should be under gilts + * at any one time. + */ +export interface GiltCall_set_target { + __kind: 'set_target' + target: bigint +} + +/** + * Remove an active but expired gilt. Reserved funds under gilt are freed and balance is + * adjusted to ensure that the funds grow or shrink to maintain the equivalent proportion + * of effective total issued funds. + * + * Origin must be Signed and the account must be the owner of the gilt of the given index. + * + * - `index`: The index of the gilt to be thawed. + */ +export interface GiltCall_thaw { + __kind: 'thaw' + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + governance_fallback: sts.enumStruct({ + maybeMaxVoters: sts.option(() => sts.number()), + maybeMaxTargets: sts.option(() => sts.number()), + }), + set_emergency_election_result: sts.enumStruct({ + supports: sts.array(() => sts.tuple(() => [AccountId32, Support])), + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => ElectionScore), + }), + submit: sts.enumStruct({ + rawSolution: RawSolution, + }), + submit_unsigned: sts.enumStruct({ + rawSolution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export const RawSolution: sts.Type = sts.struct(() => { + return { + solution: NposCompactSolution24, + score: ElectionScore, + round: sts.number(), + } +}) + +export const NposCompactSolution24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), + votes2: sts.array(() => sts.tuple(() => [sts.number(), sts.tuple(() => [sts.number(), sts.number()]), sts.number()])), + votes3: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes4: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes5: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes6: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes7: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes8: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes9: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes10: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes11: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes12: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes13: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes14: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes15: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes16: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes17: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes18: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes19: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes20: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes21: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes22: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes23: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes24: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + } +}) + +export interface NposCompactSolution24 { + votes1: [number, number][] + votes2: [number, [number, number], number][] + votes3: [number, [number, number][], number][] + votes4: [number, [number, number][], number][] + votes5: [number, [number, number][], number][] + votes6: [number, [number, number][], number][] + votes7: [number, [number, number][], number][] + votes8: [number, [number, number][], number][] + votes9: [number, [number, number][], number][] + votes10: [number, [number, number][], number][] + votes11: [number, [number, number][], number][] + votes12: [number, [number, number][], number][] + votes13: [number, [number, number][], number][] + votes14: [number, [number, number][], number][] + votes15: [number, [number, number][], number][] + votes16: [number, [number, number][], number][] + votes17: [number, [number, number][], number][] + votes18: [number, [number, number][], number][] + votes19: [number, [number, number][], number][] + votes20: [number, [number, number][], number][] + votes21: [number, [number, number][], number][] + votes22: [number, [number, number][], number][] + votes23: [number, [number, number][], number][] + votes24: [number, [number, number][], number][] +} + +export interface RawSolution { + solution: NposCompactSolution24 + score: ElectionScore + round: number +} + +export interface ElectionScore { + minimalStake: bigint + sumStake: bigint + sumStakeSquared: bigint +} + +export const ElectionScore: sts.Type = sts.struct(() => { + return { + minimalStake: sts.bigint(), + sumStake: sts.bigint(), + sumStakeSquared: sts.bigint(), + } +}) + +export const Support: sts.Type = sts.struct(() => { + return { + total: sts.bigint(), + voters: sts.array(() => sts.tuple(() => [AccountId32, sts.bigint()])), + } +}) + +export interface Support { + total: bigint + voters: [AccountId32, bigint][] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_governance_fallback | ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * Trigger the governance fallback. + * + * This can only be called when [`Phase::Emergency`] is enabled, as an alternative to + * calling [`Call::set_emergency_election_result`]. + */ +export interface ElectionProviderMultiPhaseCall_governance_fallback { + __kind: 'governance_fallback' + maybeMaxVoters?: (number | undefined) + maybeMaxTargets?: (number | undefined) +} + +/** + * Set a solution in the queue, to be handed out to the client of this pallet in the next + * call to `ElectionProvider::elect`. + * + * This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`. + * + * The solution is not checked for any feasibility and is assumed to be trustworthy, as any + * feasibility check itself can in principle cause the election process to fail (due to + * memory/weight constrains). + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + supports: [AccountId32, Support][] +} + +/** + * Set a new value for `MinimumUntrustedScore`. + * + * Dispatch origin must be aligned with `T::ForceOrigin`. + * + * This check can be turned off by setting the value to `None`. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (ElectionScore | undefined) +} + +/** + * Submit a solution for the signed phase. + * + * The dispatch origin fo this call must be __signed__. + * + * The solution is potentially queued, based on the claimed score and processed at the end + * of the signed phase. + * + * A deposit is reserved and recorded for the solution. Based on the outcome, the solution + * might be rewarded, slashed, or get all or a part of the deposit back. + */ +export interface ElectionProviderMultiPhaseCall_submit { + __kind: 'submit' + rawSolution: RawSolution +} + +/** + * Submit a solution for the unsigned phase. + * + * The dispatch origin fo this call must be __none__. + * + * This submission is checked on the fly. Moreover, this unsigned solution is only + * validated when submitted to the pool from the **local** node. Effectively, this means + * that only active validators can submit this transaction when authoring a block (similar + * to an inherent). + * + * To prevent any incorrect solution (and thus wasted time/weight), this transaction will + * panic if the solution submitted by the validator is invalid in any way, effectively + * putting their authoring reward at risk. + * + * No deposit or reward is associated with this submission. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + rawSolution: RawSolution + witness: SolutionOrSnapshotSize +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DmpCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + blacklist: sts.enumStruct({ + proposalHash: H256, + maybeRefIndex: sts.option(() => sts.number()), + }), + cancel_proposal: sts.enumStruct({ + propIndex: sts.number(), + }), + cancel_queued: sts.enumStruct({ + which: sts.number(), + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: AccountId32, + conviction: Conviction, + balance: sts.bigint(), + }), + emergency_cancel: sts.enumStruct({ + refIndex: sts.number(), + }), + enact_proposal: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + }), + external_propose: sts.enumStruct({ + proposalHash: H256, + }), + external_propose_default: sts.enumStruct({ + proposalHash: H256, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: H256, + }), + fast_track: sts.enumStruct({ + proposalHash: H256, + votingPeriod: sts.number(), + delay: sts.number(), + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: H256, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: H256, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: AccountId32, + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + index: sts.number(), + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: AccountId32, + }), + veto_external: sts.enumStruct({ + proposalHash: H256, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface AccountVote_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DemocracyCall = DemocracyCall_blacklist | DemocracyCall_cancel_proposal | DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. + * + * If called on a queued public or external proposal, then this will result in it being + * removed. If the `ref_index` supplied is an active referendum with the proposal hash, + * then it will be cancelled. + * + * The dispatch origin of this call must be `BlacklistOrigin`. + * + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. + * + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). + */ +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: H256 + maybeRefIndex?: (number | undefined) +} + +/** + * Remove a proposal. + * + * The dispatch origin of this call must be `CancelProposalOrigin`. + * + * - `prop_index`: The index of the proposal to cancel. + * + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number +} + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: number +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must not + * be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: AccountId32 + conviction: Conviction + balance: bigint +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: number +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: H256 + index: number +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Weight: `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: H256 +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: H256 +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: H256 +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. + * Must be always greater than zero. + * For `FastTrackOrigin` must be equal or greater than `FastTrackVotingPeriod`. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: H256 + votingPeriod: number + delay: number +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. When this call is successful, i.e. + * the preimage has not been uploaded before and matches some imminent proposal, + * no fee is paid. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * Weight: `O(p)` + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: H256 + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. Extrinsic is + * weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * Weight: `O(D)` where D is length of proposal. + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: H256 + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: AccountId32 + index: number +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: number +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * Weight: `O(S)` where S is the number of seconds a proposal already has. + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: AccountId32 +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * Weight: `O(V + log(V))` where V is number of `existing vetoers` + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: H256 +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of referendums the voter has voted on. + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: Id, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + contribute_all: sts.enumStruct({ + index: sts.number(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: Id, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId32, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: Signature, + } +}) + +export const Signature = sts.bytes() + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Signature +} + +export type Signature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_contribute_all | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * Add an optional memo to an existing crowdloan contribution. + * + * Origin must be Signed, and the user must have contributed to the crowdloan. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: Id + memo: Bytes +} + +/** + * Contribute to a crowd sale. This will transfer some balance over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * Contribute your entire balance to a crowd sale. This will transfer the entire balance of a user over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute_all { + __kind: 'contribute_all' + index: number + signature?: (MultiSignature | undefined) +} + +/** + * Create a new crowdloaning campaign for a parachain slot with the given lease period range. + * + * This applies a lock to your parachain configuration, ensuring that it cannot be changed + * by the parachain manager. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Remove a fund after the retirement period has ended and all funds have been returned. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * Edit the configuration for an in-progress crowdloan. + * + * Can only be called by Root origin. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Poke the fund into `NewRaise` + * + * Origin must be Signed, and the fund has non-zero raise. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: Id +} + +/** + * Automatically refund contributors of an ended crowdloan. + * Due to weight restrictions, this function may need to be called multiple + * times to fully refund all users. We will refund `RemoveKeysLimit` users at a time. + * + * Origin must be signed, but can come from anyone. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * Withdraw full balance of a specific contributor. + * + * Origin must be signed, but can come from anyone. + * + * The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement + * flag must be set. For a fund to be ready for retirement, then: + * - it must not already be in retirement; + * - the amount of raised funds must be bigger than the _free_ balance of the account; + * - and either: + * - the block number must be at least `end`; or + * - the current lease period must be greater than the fund's `last_period`. + * + * In this case, the fund's retirement flag is set and its `end` is reset to the current block + * number. + * + * - `who`: The account whose contribution should be withdrawn. + * - `index`: The parachain to whose crowdloan the contribution was made. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_bypass_consistency_check: sts.enumStruct({ + new: sts.boolean(), + }), + set_chain_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_code_retention_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_conclusion_by_time_out_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_max_spam_slots: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: sts.number(), + }), + set_group_rotation_frequency: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_minimum_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_cores: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_retries: sts.enumStruct({ + new: sts.number(), + }), + set_pvf_checking_enabled: sts.enumStruct({ + new: sts.boolean(), + }), + set_pvf_voting_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_thread_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_ump_max_individual_weight: sts.enumStruct({ + new: sts.bigint(), + }), + set_ump_service_total_weight: sts.enumStruct({ + new: sts.bigint(), + }), + set_validation_upgrade_cooldown: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ConfigurationCall = ConfigurationCall_set_bypass_consistency_check | ConfigurationCall_set_chain_availability_period | ConfigurationCall_set_code_retention_period | ConfigurationCall_set_dispute_conclusion_by_time_out_period | ConfigurationCall_set_dispute_max_spam_slots | ConfigurationCall_set_dispute_period | ConfigurationCall_set_dispute_post_conclusion_acceptance_period | ConfigurationCall_set_group_rotation_frequency | ConfigurationCall_set_hrmp_channel_max_capacity | ConfigurationCall_set_hrmp_channel_max_message_size | ConfigurationCall_set_hrmp_channel_max_total_size | ConfigurationCall_set_hrmp_max_message_num_per_candidate | ConfigurationCall_set_hrmp_max_parachain_inbound_channels | ConfigurationCall_set_hrmp_max_parachain_outbound_channels | ConfigurationCall_set_hrmp_max_parathread_inbound_channels | ConfigurationCall_set_hrmp_max_parathread_outbound_channels | ConfigurationCall_set_hrmp_open_request_ttl | ConfigurationCall_set_hrmp_recipient_deposit | ConfigurationCall_set_hrmp_sender_deposit | ConfigurationCall_set_max_code_size | ConfigurationCall_set_max_downward_message_size | ConfigurationCall_set_max_head_data_size | ConfigurationCall_set_max_pov_size | ConfigurationCall_set_max_upward_message_num_per_candidate | ConfigurationCall_set_max_upward_message_size | ConfigurationCall_set_max_upward_queue_count | ConfigurationCall_set_max_upward_queue_size | ConfigurationCall_set_max_validators | ConfigurationCall_set_max_validators_per_core | ConfigurationCall_set_minimum_validation_upgrade_delay | ConfigurationCall_set_n_delay_tranches | ConfigurationCall_set_needed_approvals | ConfigurationCall_set_no_show_slots | ConfigurationCall_set_parathread_cores | ConfigurationCall_set_parathread_retries | ConfigurationCall_set_pvf_checking_enabled | ConfigurationCall_set_pvf_voting_ttl | ConfigurationCall_set_relay_vrf_modulo_samples | ConfigurationCall_set_scheduling_lookahead | ConfigurationCall_set_thread_availability_period | ConfigurationCall_set_ump_max_individual_weight | ConfigurationCall_set_ump_service_total_weight | ConfigurationCall_set_validation_upgrade_cooldown | ConfigurationCall_set_validation_upgrade_delay | ConfigurationCall_set_zeroth_delay_tranche_width + +/** + * Setting this to true will disable consistency checks for the configuration setters. + * Use with caution. + */ +export interface ConfigurationCall_set_bypass_consistency_check { + __kind: 'set_bypass_consistency_check' + new: boolean +} + +/** + * Set the availability period for parachains. + */ +export interface ConfigurationCall_set_chain_availability_period { + __kind: 'set_chain_availability_period' + new: number +} + +/** + * Set the acceptance period for an included candidate. + */ +export interface ConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: number +} + +/** + * Set the dispute conclusion by time out period. + */ +export interface ConfigurationCall_set_dispute_conclusion_by_time_out_period { + __kind: 'set_dispute_conclusion_by_time_out_period' + new: number +} + +/** + * Set the maximum number of dispute spam slots. + */ +export interface ConfigurationCall_set_dispute_max_spam_slots { + __kind: 'set_dispute_max_spam_slots' + new: number +} + +/** + * Set the dispute period, in number of sessions to keep for disputes. + */ +export interface ConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: number +} + +/** + * Set the dispute post conclusion acceptance period. + */ +export interface ConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: number +} + +/** + * Set the parachain validator-group rotation frequency + */ +export interface ConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: number +} + +/** + * Sets the maximum number of messages allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * Sets the maximum size of a message that could ever be put into an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * Sets the maximum total size of messages in bytes allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * Sets the maximum number of outbound HRMP messages can be sent by a candidate. + */ +export interface ConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parachain is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parachain is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parathread is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_inbound_channels { + __kind: 'set_hrmp_max_parathread_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parathread is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_outbound_channels { + __kind: 'set_hrmp_max_parathread_outbound_channels' + new: number +} + +/** + * Sets the number of sessions after which an HRMP open channel request expires. + */ +export interface ConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * Sets the amount of funds that the recipient should provide for accepting opening an HRMP + * channel. + */ +export interface ConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: bigint +} + +/** + * Sets the amount of funds that the sender should provide for opening an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: bigint +} + +/** + * Set the max validation code size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * Set the critical downward message size. + */ +export interface ConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * Set the max head data size for paras. + */ +export interface ConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * Set the max POV block size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * Sets the maximum number of messages that a candidate can contain. + */ +export interface ConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum size of an upward message that can be sent by a candidate. + */ +export interface ConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * Sets the maximum items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * Sets the maximum total size of items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * Set the maximum number of validators to use in parachain consensus. + */ +export interface ConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * Set the maximum number of validators to assign to any core. + */ +export interface ConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * Sets the minimum delay between announcing the upgrade block for a parachain until the + * upgrade taking place. + * + * See the field documentation for information and constraints for the new value. + */ +export interface ConfigurationCall_set_minimum_validation_upgrade_delay { + __kind: 'set_minimum_validation_upgrade_delay' + new: number +} + +/** + * Set the total number of delay tranches. + */ +export interface ConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * Set the number of validators needed to approve a block. + */ +export interface ConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * Set the no show slots, in number of number of consensus slots. + * Must be at least 1. + */ +export interface ConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * Set the number of parathread execution cores. + */ +export interface ConfigurationCall_set_parathread_cores { + __kind: 'set_parathread_cores' + new: number +} + +/** + * Set the number of retries for a particular parathread. + */ +export interface ConfigurationCall_set_parathread_retries { + __kind: 'set_parathread_retries' + new: number +} + +/** + * Enable or disable PVF pre-checking. Consult the field documentation prior executing. + */ +export interface ConfigurationCall_set_pvf_checking_enabled { + __kind: 'set_pvf_checking_enabled' + new: boolean +} + +/** + * Set the number of session changes after which a PVF pre-checking voting is rejected. + */ +export interface ConfigurationCall_set_pvf_voting_ttl { + __kind: 'set_pvf_voting_ttl' + new: number +} + +/** + * Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion. + */ +export interface ConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * Set the scheduling lookahead, in expected number of blocks at peak throughput. + */ +export interface ConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * Set the availability period for parathreads. + */ +export interface ConfigurationCall_set_thread_availability_period { + __kind: 'set_thread_availability_period' + new: number +} + +/** + * Sets the maximum amount of weight any individual upward message may consume. + */ +export interface ConfigurationCall_set_ump_max_individual_weight { + __kind: 'set_ump_max_individual_weight' + new: bigint +} + +/** + * Sets the soft limit for the phase of dispatching dispatchable upward messages. + */ +export interface ConfigurationCall_set_ump_service_total_weight { + __kind: 'set_ump_service_total_weight' + new: bigint +} + +/** + * Set the validation upgrade cooldown. + */ +export interface ConfigurationCall_set_validation_upgrade_cooldown { + __kind: 'set_validation_upgrade_cooldown' + new: number +} + +/** + * Set the validation upgrade delay. + */ +export interface ConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: number +} + +/** + * Set the zeroth delay tranche width. + */ +export interface ConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: sts.bigint(), + vestingSchedule: sts.option(() => sts.tuple(() => [sts.bigint(), sts.bigint(), sts.number()])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId32), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId32 + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId32 + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: bigint + vestingSchedule?: ([bigint, bigint, number] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId32 | undefined) +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ChildBountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + add_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + value: sts.bigint(), + description: sts.bytes(), + }), + award_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + close_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + propose_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ChildBountiesCall = ChildBountiesCall_accept_curator | ChildBountiesCall_add_child_bounty | ChildBountiesCall_award_child_bounty | ChildBountiesCall_claim_child_bounty | ChildBountiesCall_close_child_bounty | ChildBountiesCall_propose_curator | ChildBountiesCall_unassign_curator + +/** + * Accept the curator role for the child-bounty. + * + * The dispatch origin for this call must be the curator of this + * child-bounty. + * + * A deposit will be reserved from the curator and refund upon + * successful payout or cancellation. + * + * Fee for curator is deducted from curator fee of parent bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in "CuratorProposed" state, for processing the + * call. And state of child-bounty is moved to "Active" on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_accept_curator { + __kind: 'accept_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Add a new child-bounty. + * + * The dispatch origin for this call must be the curator of parent + * bounty and the parent bounty must be in "active" state. + * + * Child-bounty gets added successfully & fund gets transferred from + * parent bounty to child-bounty account, if parent bounty has enough + * funds, else the call fails. + * + * Upper bound to maximum number of active child bounties that can be + * added are managed via runtime trait config + * [`Config::MaxActiveChildBountyCount`]. + * + * If the call is success, the status of child-bounty is updated to + * "Added". + * + * - `parent_bounty_id`: Index of parent bounty for which child-bounty is being added. + * - `value`: Value for executing the proposal. + * - `description`: Text description for the child-bounty. + */ +export interface ChildBountiesCall_add_child_bounty { + __kind: 'add_child_bounty' + parentBountyId: number + value: bigint + description: Bytes +} + +/** + * Award child-bounty to a beneficiary. + * + * The beneficiary will be able to claim the funds after a delay. + * + * The dispatch origin for this call must be the parent curator or + * curator of this child-bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in active state, for processing the call. And + * state of child-bounty is moved to "PendingPayout" on successful call + * completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + * - `beneficiary`: Beneficiary account. + */ +export interface ChildBountiesCall_award_child_bounty { + __kind: 'award_child_bounty' + parentBountyId: number + childBountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded child-bounty after payout delay. + * + * The dispatch origin for this call may be any signed origin. + * + * Call works independent of parent bounty state, No need for parent + * bounty to be in active state. + * + * The Beneficiary is paid out with agreed bounty value. Curator fee is + * paid & curator deposit is unreserved. + * + * Child-bounty must be in "PendingPayout" state, for processing the + * call. And instance of child-bounty is removed from the state on + * successful call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_claim_child_bounty { + __kind: 'claim_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * Cancel a proposed or active child-bounty. Child-bounty account funds + * are transferred to parent bounty account. The child-bounty curator + * deposit may be unreserved if possible. + * + * The dispatch origin for this call must be either parent curator or + * `T::RejectOrigin`. + * + * If the state of child-bounty is `Active`, curator deposit is + * unreserved. + * + * If the state of child-bounty is `PendingPayout`, call fails & + * returns `PendingPayout` error. + * + * For the origin other than T::RejectOrigin, parent bounty must be in + * active state, for this child-bounty call to work. For origin + * T::RejectOrigin execution is forced. + * + * Instance of child-bounty is removed from the state on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_close_child_bounty { + __kind: 'close_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * Propose curator for funded child-bounty. + * + * The dispatch origin for this call must be curator of parent bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in "Added" state, for processing the call. And + * state of child-bounty is moved to "CuratorProposed" on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + * - `curator`: Address of child-bounty curator. + * - `fee`: payment fee to child-bounty curator for execution. + */ +export interface ChildBountiesCall_propose_curator { + __kind: 'propose_curator' + parentBountyId: number + childBountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a child-bounty. + * + * The dispatch origin for this call can be either `RejectOrigin`, or + * the curator of the parent bounty, or any signed origin. + * + * For the origin other than T::RejectOrigin and the child-bounty + * curator, parent bounty must be in active state, for this call to + * work. We allow child-bounty curator and T::RejectOrigin to execute + * this call irrespective of the parent bounty state. + * + * If this function is called by the `RejectOrigin` or the + * parent bounty curator, we assume that the child-bounty curator is + * malicious or inactive. As a result, child-bounty curator deposit is + * slashed. + * + * If the origin is the child-bounty curator, we take this as a sign + * that they are unable to do their job, and are willingly giving up. + * We could slash the deposit, but for now we allow them to unreserve + * their deposit and exit without issue. (We may want to change this if + * it is abused.) + * + * Finally, the origin can be anyone iff the child-bounty curator is + * "inactive". Expiry update due of parent bounty is used to estimate + * inactive state of child-bounty curator. + * + * This allows anyone in the community to call out that a child-bounty + * curator is not doing their due diligence, and we should pick a new + * one. In this case the child-bounty curator deposit is slashed. + * + * State of child-bounty is moved to Added state on successful call + * completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_unassign_curator { + __kind: 'unassign_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds + * after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is + * malicious or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_force_unreserve | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_all | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is not + * assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * Unreserve some balance from a user by force. + * + * Can only be called by ROOT. + */ +export interface BalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also alter the total issuance of the system (`TotalIssuance`) appropriately. + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: MultiAddress + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for input config + * types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex + * computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional check + * that the transfer will not kill the origin account. + * --------------------------------- + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: MultiAddress + value: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). # + * - O(1). Just like transfer, but reading the user's transferable balance first. + * # + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const EquivocationProof: sts.Type = sts.struct(() => { + return { + offender: sts.bytes(), + slot: Slot, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Slot = sts.bigint() + +export interface EquivocationProof { + offender: Bytes + slot: Slot + firstHeader: Header + secondHeader: Header +} + +export type Slot = bigint + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V1: sts.enumStruct({ + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + }), + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type NextConfigDescriptor = NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Plan an epoch config change. The epoch config change is recorded and will be enacted on + * the next call to `enact_epoch_change`. The config will be activated one epoch after. + * Multiple calls to this method will replace any existing planned config change that had + * not been enacted yet. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Cancel an in-progress auction. + * + * Can only be called by Root origin. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +export type Call = Call_Auctions | Call_Authorship | Call_Babe | Call_Balances | Call_Bounties | Call_ChildBounties | Call_Claims | Call_Configuration | Call_Council | Call_Crowdloan | Call_Democracy | Call_Dmp | Call_ElectionProviderMultiPhase | Call_Gilt | Call_Grandpa | Call_Hrmp | Call_Identity | Call_ImOnline | Call_Indices | Call_Initializer | Call_Multisig | Call_NominationPools | Call_ParaInclusion | Call_ParaInherent | Call_Paras | Call_ParasDisputes | Call_ParasShared | Call_PhragmenElection | Call_Preimage | Call_Proxy | Call_Recovery | Call_Registrar | Call_Scheduler | Call_Session | Call_Slots | Call_Society | Call_Staking | Call_System | Call_TechnicalCommittee | Call_TechnicalMembership | Call_Timestamp | Call_Tips | Call_Treasury | Call_Ump | Call_Utility | Call_Vesting | Call_VoterList | Call_XcmPallet + +export interface Call_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Call_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Call_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Call_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Call_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Call_ChildBounties { + __kind: 'ChildBounties' + value: ChildBountiesCall +} + +export interface Call_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Call_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Call_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Call_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Call_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Call_Dmp { + __kind: 'Dmp' + value: DmpCall +} + +export interface Call_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Call_Gilt { + __kind: 'Gilt' + value: GiltCall +} + +export interface Call_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Call_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Call_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Call_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Call_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Call_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Call_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Call_NominationPools { + __kind: 'NominationPools' + value: NominationPoolsCall +} + +export interface Call_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Call_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Call_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Call_ParasDisputes { + __kind: 'ParasDisputes' + value: ParasDisputesCall +} + +export interface Call_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Call_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Call_Preimage { + __kind: 'Preimage' + value: PreimageCall +} + +export interface Call_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Call_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Call_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Call_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Call_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Call_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Call_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Call_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Call_System { + __kind: 'System' + value: SystemCall +} + +export interface Call_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Call_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Call_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Call_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Call_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Call_Ump { + __kind: 'Ump' + value: UmpCall +} + +export interface Call_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Call_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Call_VoterList { + __kind: 'VoterList' + value: VoterListCall +} + +export interface Call_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Society: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId32 = sts.bytes() diff --git a/squid/src/types/v9291.ts b/squid/src/types/v9291.ts new file mode 100644 index 00000000..01feeb52 --- /dev/null +++ b/squid/src/types/v9291.ts @@ -0,0 +1,12192 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Weight: sts.Type = sts.struct(() => { + return { + refTime: sts.bigint(), + } +}) + +export interface Weight { + refTime: bigint +} + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: sts.number(), + index: sts.number(), + } +}) + +export interface Timepoint { + height: number + index: number +} + +export const AccountId32 = sts.bytes() + +export const Call: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + ChildBounties: ChildBountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + Dmp: DmpCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + Gilt: GiltCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Initializer: InitializerCall, + Multisig: MultisigCall, + NominationPools: NominationPoolsCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Paras: ParasCall, + ParasDisputes: ParasDisputesCall, + ParasShared: ParasSharedCall, + PhragmenElection: PhragmenElectionCall, + Preimage: PreimageCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Ump: UmpCall, + Utility: UtilityCall, + Vesting: VestingCall, + VoterList: VoterListCall, + XcmPallet: XcmPalletCall, + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + execute: sts.enumStruct({ + message: Type_553, + maxWeight: Weight, + }), + force_default_xcm_version: sts.enumStruct({ + maybeXcmVersion: sts.option(() => sts.number()), + }), + force_subscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_unsubscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_xcm_version: sts.enumStruct({ + location: V1MultiLocation, + xcmVersion: sts.number(), + }), + limited_reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + limited_teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + send: sts.enumStruct({ + dest: VersionedMultiLocation, + message: VersionedXcm, + }), + teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + } +}) + +export const VersionedXcm: sts.Type = sts.closedEnum(() => { + return { + V0: V0Xcm, + V1: V1Xcm, + V2: sts.array(() => V2Instruction), + } +}) + +export const V2Instruction: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => V2Instruction), + SetErrorHandler: sts.array(() => V2Instruction), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const DoubleEncoded: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncoded { + encoded: Bytes +} + +export const V0OriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type V0OriginKind = V0OriginKind_Native | V0OriginKind_SovereignAccount | V0OriginKind_Superuser | V0OriginKind_Xcm + +export interface V0OriginKind_Native { + __kind: 'Native' +} + +export interface V0OriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface V0OriginKind_Superuser { + __kind: 'Superuser' +} + +export interface V0OriginKind_Xcm { + __kind: 'Xcm' +} + +export const V2Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V2Error])), + Null: sts.unit(), + Version: sts.number(), + } +}) + +export const V2Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + MaxWeightInvalid: sts.unit(), + MultiLocationFull: sts.unit(), + MultiLocationNotInvertible: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + WeightLimitReached: sts.bigint(), + WeightNotComputable: sts.unit(), + } +}) + +export type V2Error = V2Error_AssetNotFound | V2Error_BadOrigin | V2Error_Barrier | V2Error_DestinationUnsupported | V2Error_ExceedsMaxMessageSize | V2Error_FailedToDecode | V2Error_FailedToTransactAsset | V2Error_InvalidLocation | V2Error_LocationCannotHold | V2Error_MaxWeightInvalid | V2Error_MultiLocationFull | V2Error_MultiLocationNotInvertible | V2Error_NotHoldingFees | V2Error_NotWithdrawable | V2Error_Overflow | V2Error_TooExpensive | V2Error_Transport | V2Error_Trap | V2Error_UnhandledXcmVersion | V2Error_Unimplemented | V2Error_UnknownClaim | V2Error_Unroutable | V2Error_UntrustedReserveLocation | V2Error_UntrustedTeleportLocation | V2Error_WeightLimitReached | V2Error_WeightNotComputable + +export interface V2Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V2Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V2Error_Barrier { + __kind: 'Barrier' +} + +export interface V2Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V2Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V2Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V2Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V2Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V2Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V2Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V2Error_MultiLocationFull { + __kind: 'MultiLocationFull' +} + +export interface V2Error_MultiLocationNotInvertible { + __kind: 'MultiLocationNotInvertible' +} + +export interface V2Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V2Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V2Error_Overflow { + __kind: 'Overflow' +} + +export interface V2Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V2Error_Transport { + __kind: 'Transport' +} + +export interface V2Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V2Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V2Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V2Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V2Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V2Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V2Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: bigint +} + +export interface V2Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V2Response = V2Response_Assets | V2Response_ExecutionResult | V2Response_Null | V2Response_Version + +export interface V2Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V2Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V2Error] | undefined) +} + +export interface V2Response_Null { + __kind: 'Null' +} + +export interface V2Response_Version { + __kind: 'Version' + value: number +} + +export interface V1MultiAsset { + id: V1AssetId + fun: V1Fungibility +} + +export type V1Fungibility = V1Fungibility_Fungible | V1Fungibility_NonFungible + +export interface V1Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V1Fungibility_NonFungible { + __kind: 'NonFungible' + value: V1AssetInstance +} + +export type V1AssetInstance = V1AssetInstance_Array16 | V1AssetInstance_Array32 | V1AssetInstance_Array4 | V1AssetInstance_Array8 | V1AssetInstance_Blob | V1AssetInstance_Index | V1AssetInstance_Undefined + +export interface V1AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V1AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V1AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V1AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V1AssetInstance_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface V1AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V1AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V1AssetId = V1AssetId_Abstract | V1AssetId_Concrete + +export interface V1AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V1AssetId_Concrete { + __kind: 'Concrete' + value: V1MultiLocation +} + +export interface V1MultiLocation { + parents: number + interior: V1Junctions +} + +export type V1Junctions = V1Junctions_Here | V1Junctions_X1 | V1Junctions_X2 | V1Junctions_X3 | V1Junctions_X4 | V1Junctions_X5 | V1Junctions_X6 | V1Junctions_X7 | V1Junctions_X8 + +export interface V1Junctions_Here { + __kind: 'Here' +} + +export interface V1Junctions_X1 { + __kind: 'X1' + value: V1Junction +} + +export interface V1Junctions_X2 { + __kind: 'X2' + value: [V1Junction, V1Junction] +} + +export interface V1Junctions_X3 { + __kind: 'X3' + value: [V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X4 { + __kind: 'X4' + value: [V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X5 { + __kind: 'X5' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X6 { + __kind: 'X6' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X7 { + __kind: 'X7' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X8 { + __kind: 'X8' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export type V1Junction = V1Junction_AccountId32 | V1Junction_AccountIndex64 | V1Junction_AccountKey20 | V1Junction_GeneralIndex | V1Junction_GeneralKey | V1Junction_OnlyChild | V1Junction_PalletInstance | V1Junction_Parachain | V1Junction_Plurality + +export interface V1Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V1Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V1Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V1Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V1Junction_GeneralKey { + __kind: 'GeneralKey' + value: WeakBoundedVec +} + +export interface V1Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V1Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V1Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V1Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0BodyPart = V0BodyPart_AtLeastProportion | V0BodyPart_Fraction | V0BodyPart_Members | V0BodyPart_MoreThanProportion | V0BodyPart_Voice + +export interface V0BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V0BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V0BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Voice { + __kind: 'Voice' +} + +export type V0BodyId = V0BodyId_Executive | V0BodyId_Index | V0BodyId_Judicial | V0BodyId_Legislative | V0BodyId_Named | V0BodyId_Technical | V0BodyId_Unit + +export interface V0BodyId_Executive { + __kind: 'Executive' +} + +export interface V0BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V0BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V0BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V0BodyId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V0BodyId_Technical { + __kind: 'Technical' +} + +export interface V0BodyId_Unit { + __kind: 'Unit' +} + +export type WeakBoundedVec = Bytes + +export type V0NetworkId = V0NetworkId_Any | V0NetworkId_Kusama | V0NetworkId_Named | V0NetworkId_Polkadot + +export interface V0NetworkId_Any { + __kind: 'Any' +} + +export interface V0NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V0NetworkId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V0NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export const V1Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V1Junction, + X2: sts.tuple(() => [V1Junction, V1Junction]), + X3: sts.tuple(() => [V1Junction, V1Junction, V1Junction]), + X4: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction]), + X5: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X6: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X7: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X8: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + } +}) + +export const V1Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: WeakBoundedVec, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export const V0BodyId: sts.Type = sts.closedEnum(() => { + return { + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: WeakBoundedVec, + Technical: sts.unit(), + Unit: sts.unit(), + } +}) + +export const WeakBoundedVec = sts.bytes() + +export const V0NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: WeakBoundedVec, + Polkadot: sts.unit(), + } +}) + +export const V1MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V1MultiAsset), + Wild: V1WildMultiAsset, + } +}) + +export const V1WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllOf: sts.enumStruct({ + id: V1AssetId, + fun: V1WildFungibility, + }), + } +}) + +export const V1WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V1WildFungibility = V1WildFungibility_Fungible | V1WildFungibility_NonFungible + +export interface V1WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V1WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V1AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V1MultiLocation, + } +}) + +export type V1WildMultiAsset = V1WildMultiAsset_All | V1WildMultiAsset_AllOf + +export interface V1WildMultiAsset_All { + __kind: 'All' +} + +export interface V1WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V1AssetId + fun: V1WildFungibility +} + +export type V1MultiAssetFilter = V1MultiAssetFilter_Definite | V1MultiAssetFilter_Wild + +export interface V1MultiAssetFilter_Definite { + __kind: 'Definite' + value: V1MultiAsset[] +} + +export interface V1MultiAssetFilter_Wild { + __kind: 'Wild' + value: V1WildMultiAsset +} + +export const V1MultiAsset: sts.Type = sts.struct(() => { + return { + id: V1AssetId, + fun: V1Fungibility, + } +}) + +export const V1Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V1AssetInstance, + } +}) + +export const V1AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V2Instruction = V2Instruction_BuyExecution | V2Instruction_ClaimAsset | V2Instruction_ClearError | V2Instruction_ClearOrigin | V2Instruction_DepositAsset | V2Instruction_DepositReserveAsset | V2Instruction_DescendOrigin | V2Instruction_ExchangeAsset | V2Instruction_HrmpChannelAccepted | V2Instruction_HrmpChannelClosing | V2Instruction_HrmpNewChannelOpenRequest | V2Instruction_InitiateReserveWithdraw | V2Instruction_InitiateTeleport | V2Instruction_QueryHolding | V2Instruction_QueryResponse | V2Instruction_ReceiveTeleportedAsset | V2Instruction_RefundSurplus | V2Instruction_ReportError | V2Instruction_ReserveAssetDeposited | V2Instruction_SetAppendix | V2Instruction_SetErrorHandler | V2Instruction_SubscribeVersion | V2Instruction_Transact | V2Instruction_TransferAsset | V2Instruction_TransferReserveAsset | V2Instruction_Trap | V2Instruction_UnsubscribeVersion | V2Instruction_WithdrawAsset + +export interface V2Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface V2Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface V2Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V2Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V2Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V2Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface V2Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V2Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V2Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V2Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V2Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface V2Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface V2Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface V2Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V2Instruction_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface V2Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface V2Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V2Instruction[] +} + +export interface V2Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V2Instruction[] +} + +export interface V2Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V2Instruction_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V2Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V2Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V2Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export type V2WeightLimit = V2WeightLimit_Limited | V2WeightLimit_Unlimited + +export interface V2WeightLimit_Limited { + __kind: 'Limited' + value: bigint +} + +export interface V2WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V1Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: V1Xcm, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + } +}) + +export const V1Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => V1Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type V1Order = V1Order_BuyExecution | V1Order_DepositAsset | V1Order_DepositReserveAsset | V1Order_ExchangeAsset | V1Order_InitiateReserveWithdraw | V1Order_InitiateTeleport | V1Order_Noop | V1Order_QueryHolding + +export interface V1Order_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: V1Xcm[] +} + +export interface V1Order_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V1Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V1Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_Noop { + __kind: 'Noop' +} + +export interface V1Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export const V1Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + Version: sts.number(), + } +}) + +export type V1Response = V1Response_Assets | V1Response_Version + +export interface V1Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V1Response_Version { + __kind: 'Version' + value: number +} + +export type V1Xcm = V1Xcm_HrmpChannelAccepted | V1Xcm_HrmpChannelClosing | V1Xcm_HrmpNewChannelOpenRequest | V1Xcm_QueryResponse | V1Xcm_ReceiveTeleportedAsset | V1Xcm_RelayedFrom | V1Xcm_ReserveAssetDeposited | V1Xcm_SubscribeVersion | V1Xcm_Transact | V1Xcm_TransferAsset | V1Xcm_TransferReserveAsset | V1Xcm_UnsubscribeVersion | V1Xcm_WithdrawAsset + +export interface V1Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V1Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V1Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V1Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface V1Xcm_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: V1Xcm +} + +export interface V1Xcm_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V1Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V1Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V1Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Xcm_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V1Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export const V0Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: V0Xcm, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + } +}) + +export const V0Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => V0Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type V0Order = V0Order_BuyExecution | V0Order_DepositAsset | V0Order_DepositReserveAsset | V0Order_ExchangeAsset | V0Order_InitiateReserveWithdraw | V0Order_InitiateTeleport | V0Order_Null | V0Order_QueryHolding + +export interface V0Order_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: V0Xcm[] +} + +export interface V0Order_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface V0Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_Null { + __kind: 'Null' +} + +export interface V0Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type V0MultiLocation = V0MultiLocation_Null | V0MultiLocation_X1 | V0MultiLocation_X2 | V0MultiLocation_X3 | V0MultiLocation_X4 | V0MultiLocation_X5 | V0MultiLocation_X6 | V0MultiLocation_X7 | V0MultiLocation_X8 + +export interface V0MultiLocation_Null { + __kind: 'Null' +} + +export interface V0MultiLocation_X1 { + __kind: 'X1' + value: V0Junction +} + +export interface V0MultiLocation_X2 { + __kind: 'X2' + value: [V0Junction, V0Junction] +} + +export interface V0MultiLocation_X3 { + __kind: 'X3' + value: [V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X4 { + __kind: 'X4' + value: [V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X5 { + __kind: 'X5' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X6 { + __kind: 'X6' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X7 { + __kind: 'X7' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X8 { + __kind: 'X8' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export type V0Junction = V0Junction_AccountId32 | V0Junction_AccountIndex64 | V0Junction_AccountKey20 | V0Junction_GeneralIndex | V0Junction_GeneralKey | V0Junction_OnlyChild | V0Junction_PalletInstance | V0Junction_Parachain | V0Junction_Parent | V0Junction_Plurality + +export interface V0Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V0Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V0Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V0Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V0Junction_GeneralKey { + __kind: 'GeneralKey' + value: WeakBoundedVec +} + +export interface V0Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V0Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V0Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V0Junction_Parent { + __kind: 'Parent' +} + +export interface V0Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0MultiAsset = V0MultiAsset_AbstractFungible | V0MultiAsset_AbstractNonFungible | V0MultiAsset_All | V0MultiAsset_AllAbstractFungible | V0MultiAsset_AllAbstractNonFungible | V0MultiAsset_AllConcreteFungible | V0MultiAsset_AllConcreteNonFungible | V0MultiAsset_AllFungible | V0MultiAsset_AllNonFungible | V0MultiAsset_ConcreteFungible | V0MultiAsset_ConcreteNonFungible | V0MultiAsset_None + +export interface V0MultiAsset_AbstractFungible { + __kind: 'AbstractFungible' + id: Bytes + amount: bigint +} + +export interface V0MultiAsset_AbstractNonFungible { + __kind: 'AbstractNonFungible' + class: Bytes + instance: V1AssetInstance +} + +export interface V0MultiAsset_All { + __kind: 'All' +} + +export interface V0MultiAsset_AllAbstractFungible { + __kind: 'AllAbstractFungible' + id: Bytes +} + +export interface V0MultiAsset_AllAbstractNonFungible { + __kind: 'AllAbstractNonFungible' + class: Bytes +} + +export interface V0MultiAsset_AllConcreteFungible { + __kind: 'AllConcreteFungible' + id: V0MultiLocation +} + +export interface V0MultiAsset_AllConcreteNonFungible { + __kind: 'AllConcreteNonFungible' + class: V0MultiLocation +} + +export interface V0MultiAsset_AllFungible { + __kind: 'AllFungible' +} + +export interface V0MultiAsset_AllNonFungible { + __kind: 'AllNonFungible' +} + +export interface V0MultiAsset_ConcreteFungible { + __kind: 'ConcreteFungible' + id: V0MultiLocation + amount: bigint +} + +export interface V0MultiAsset_ConcreteNonFungible { + __kind: 'ConcreteNonFungible' + class: V0MultiLocation + instance: V1AssetInstance +} + +export interface V0MultiAsset_None { + __kind: 'None' +} + +export const V0MultiAsset: sts.Type = sts.closedEnum(() => { + return { + AbstractFungible: sts.enumStruct({ + id: sts.bytes(), + amount: sts.bigint(), + }), + AbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + instance: V1AssetInstance, + }), + All: sts.unit(), + AllAbstractFungible: sts.enumStruct({ + id: sts.bytes(), + }), + AllAbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + }), + AllConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + }), + AllConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + }), + AllFungible: sts.unit(), + AllNonFungible: sts.unit(), + ConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + amount: sts.bigint(), + }), + ConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + instance: V1AssetInstance, + }), + None: sts.unit(), + } +}) + +export const V0MultiLocation: sts.Type = sts.closedEnum(() => { + return { + Null: sts.unit(), + X1: V0Junction, + X2: sts.tuple(() => [V0Junction, V0Junction]), + X3: sts.tuple(() => [V0Junction, V0Junction, V0Junction]), + X4: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction]), + X5: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X6: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X7: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X8: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + } +}) + +export const V0Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: WeakBoundedVec, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Parent: sts.unit(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V0MultiAsset), + } +}) + +export type V0Response = V0Response_Assets + +export interface V0Response_Assets { + __kind: 'Assets' + value: V0MultiAsset[] +} + +export type V0Xcm = V0Xcm_HrmpChannelAccepted | V0Xcm_HrmpChannelClosing | V0Xcm_HrmpNewChannelOpenRequest | V0Xcm_QueryResponse | V0Xcm_RelayedFrom | V0Xcm_ReserveAssetDeposit | V0Xcm_TeleportAsset | V0Xcm_Transact | V0Xcm_TransferAsset | V0Xcm_TransferReserveAsset | V0Xcm_WithdrawAsset + +export interface V0Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V0Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V0Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V0Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface V0Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: V0Xcm +} + +export interface V0Xcm_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V0Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export type VersionedXcm = VersionedXcm_V0 | VersionedXcm_V1 | VersionedXcm_V2 + +export interface VersionedXcm_V0 { + __kind: 'V0' + value: V0Xcm +} + +export interface VersionedXcm_V1 { + __kind: 'V1' + value: V1Xcm +} + +export interface VersionedXcm_V2 { + __kind: 'V2' + value: V2Instruction[] +} + +export const V2WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: sts.bigint(), + Unlimited: sts.unit(), + } +}) + +export const VersionedMultiAssets: sts.Type = sts.closedEnum(() => { + return { + V0: sts.array(() => V0MultiAsset), + V1: sts.array(() => V1MultiAsset), + } +}) + +export type VersionedMultiAssets = VersionedMultiAssets_V0 | VersionedMultiAssets_V1 + +export interface VersionedMultiAssets_V0 { + __kind: 'V0' + value: V0MultiAsset[] +} + +export interface VersionedMultiAssets_V1 { + __kind: 'V1' + value: V1MultiAsset[] +} + +export const V1MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V1Junctions, + } +}) + +export const VersionedMultiLocation: sts.Type = sts.closedEnum(() => { + return { + V0: V0MultiLocation, + V1: V1MultiLocation, + } +}) + +export type VersionedMultiLocation = VersionedMultiLocation_V0 | VersionedMultiLocation_V1 + +export interface VersionedMultiLocation_V0 { + __kind: 'V0' + value: V0MultiLocation +} + +export interface VersionedMultiLocation_V1 { + __kind: 'V1' + value: V1MultiLocation +} + +export const Type_553: sts.Type = sts.closedEnum(() => { + return { + V0: Type_554, + V1: Type_559, + V2: sts.array(() => Type_565), + } +}) + +export const Type_565: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => Type_565), + SetErrorHandler: sts.array(() => Type_565), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_558, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const Type_558: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface Type_558 { + encoded: Bytes +} + +export type Type_565 = Type_565_BuyExecution | Type_565_ClaimAsset | Type_565_ClearError | Type_565_ClearOrigin | Type_565_DepositAsset | Type_565_DepositReserveAsset | Type_565_DescendOrigin | Type_565_ExchangeAsset | Type_565_HrmpChannelAccepted | Type_565_HrmpChannelClosing | Type_565_HrmpNewChannelOpenRequest | Type_565_InitiateReserveWithdraw | Type_565_InitiateTeleport | Type_565_QueryHolding | Type_565_QueryResponse | Type_565_ReceiveTeleportedAsset | Type_565_RefundSurplus | Type_565_ReportError | Type_565_ReserveAssetDeposited | Type_565_SetAppendix | Type_565_SetErrorHandler | Type_565_SubscribeVersion | Type_565_Transact | Type_565_TransferAsset | Type_565_TransferReserveAsset | Type_565_Trap | Type_565_UnsubscribeVersion | Type_565_WithdrawAsset + +export interface Type_565_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface Type_565_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface Type_565_ClearError { + __kind: 'ClearError' +} + +export interface Type_565_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_565_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_565_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_565_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface Type_565_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_565_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_565_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_565_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_565_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_565_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_565_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface Type_565_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface Type_565_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface Type_565_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_565_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface Type_565_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface Type_565_SetAppendix { + __kind: 'SetAppendix' + value: Type_565[] +} + +export interface Type_565_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_565[] +} + +export interface Type_565_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_565_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_558 +} + +export interface Type_565_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_565_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_565_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_565_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_565_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export const Type_559: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_561), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: Type_559, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_561), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_558, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_561), + }), + } +}) + +export const Type_561: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => Type_559), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type Type_561 = Type_561_BuyExecution | Type_561_DepositAsset | Type_561_DepositReserveAsset | Type_561_ExchangeAsset | Type_561_InitiateReserveWithdraw | Type_561_InitiateTeleport | Type_561_Noop | Type_561_QueryHolding + +export interface Type_561_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: Type_559[] +} + +export interface Type_561_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_561_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_561_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_561_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface Type_561_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_561_Noop { + __kind: 'Noop' +} + +export interface Type_561_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export type Type_559 = Type_559_HrmpChannelAccepted | Type_559_HrmpChannelClosing | Type_559_HrmpNewChannelOpenRequest | Type_559_QueryResponse | Type_559_ReceiveTeleportedAsset | Type_559_RelayedFrom | Type_559_ReserveAssetDeposited | Type_559_SubscribeVersion | Type_559_Transact | Type_559_TransferAsset | Type_559_TransferReserveAsset | Type_559_UnsubscribeVersion | Type_559_WithdrawAsset + +export interface Type_559_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_559_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_559_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_559_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface Type_559_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: Type_561[] +} + +export interface Type_559_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: Type_559 +} + +export interface Type_559_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: Type_561[] +} + +export interface Type_559_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_559_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_558 +} + +export interface Type_559_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_559_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_559_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_559_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: Type_561[] +} + +export const Type_554: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: Type_554, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_556), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_556), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_558, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_556), + }), + } +}) + +export const Type_556: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => Type_554), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type Type_556 = Type_556_BuyExecution | Type_556_DepositAsset | Type_556_DepositReserveAsset | Type_556_ExchangeAsset | Type_556_InitiateReserveWithdraw | Type_556_InitiateTeleport | Type_556_Null | Type_556_QueryHolding + +export interface Type_556_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: Type_554[] +} + +export interface Type_556_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_556_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_556_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface Type_556_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface Type_556_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_556_Null { + __kind: 'Null' +} + +export interface Type_556_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type Type_554 = Type_554_HrmpChannelAccepted | Type_554_HrmpChannelClosing | Type_554_HrmpNewChannelOpenRequest | Type_554_QueryResponse | Type_554_RelayedFrom | Type_554_ReserveAssetDeposit | Type_554_TeleportAsset | Type_554_Transact | Type_554_TransferAsset | Type_554_TransferReserveAsset | Type_554_WithdrawAsset + +export interface Type_554_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_554_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_554_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_554_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface Type_554_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: Type_554 +} + +export interface Type_554_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: Type_556[] +} + +export interface Type_554_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: Type_556[] +} + +export interface Type_554_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_558 +} + +export interface Type_554_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_554_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_554_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: Type_556[] +} + +export type Type_553 = Type_553_V0 | Type_553_V1 | Type_553_V2 + +export interface Type_553_V0 { + __kind: 'V0' + value: Type_554 +} + +export interface Type_553_V1 { + __kind: 'V1' + value: Type_559 +} + +export interface Type_553_V2 { + __kind: 'V2' + value: Type_565[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type XcmPalletCall = XcmPalletCall_execute | XcmPalletCall_force_default_xcm_version | XcmPalletCall_force_subscribe_version_notify | XcmPalletCall_force_unsubscribe_version_notify | XcmPalletCall_force_xcm_version | XcmPalletCall_limited_reserve_transfer_assets | XcmPalletCall_limited_teleport_assets | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets + +/** + * Execute an XCM message from a local, signed, origin. + * + * An event is deposited indicating whether `msg` could be executed completely or only + * partially. + * + * No more than `max_weight` will be used in its attempted execution. If this is less than the + * maximum amount of weight that the message could take to be executed, then no execution + * attempt will be made. + * + * NOTE: A successful return to this does *not* imply that the `msg` was executed successfully + * to completion; only that *some* of it was executed. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Type_553 + maxWeight: Weight +} + +/** + * Set a safe XCM version (the version that XCM should be encoded with if the most recent + * version a destination can accept is unknown). + * + * - `origin`: Must be Root. + * - `maybe_xcm_version`: The default XCM encoding version, or `None` to disable. + */ +export interface XcmPalletCall_force_default_xcm_version { + __kind: 'force_default_xcm_version' + maybeXcmVersion?: (number | undefined) +} + +/** + * Ask a location to notify us regarding their XCM version and any changes to it. + * + * - `origin`: Must be Root. + * - `location`: The location to which we should subscribe for XCM version notifications. + */ +export interface XcmPalletCall_force_subscribe_version_notify { + __kind: 'force_subscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Require that a particular destination should no longer notify us regarding any XCM + * version changes. + * + * - `origin`: Must be Root. + * - `location`: The location to which we are currently subscribed for XCM version + * notifications which we no longer desire. + */ +export interface XcmPalletCall_force_unsubscribe_version_notify { + __kind: 'force_unsubscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Extoll that a particular destination can be communicated with through a particular + * version of XCM. + * + * - `origin`: Must be Root. + * - `location`: The destination that is being described. + * - `xcm_version`: The latest version of XCM that `location` supports. + */ +export interface XcmPalletCall_force_xcm_version { + __kind: 'force_xcm_version' + location: V1MultiLocation + xcmVersion: number +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination + * chain and forward a notification XCM. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight + * is needed than `weight_limit`, then the operation will fail and the assets send may be + * at risk. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_reserve_transfer_assets { + __kind: 'limited_reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight + * is needed than `weight_limit`, then the operation will fail and the assets send may be + * at risk. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_teleport_assets { + __kind: 'limited_teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination + * chain and forward a notification XCM. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, + * with all fees taken as needed from the asset. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +export interface XcmPalletCall_send { + __kind: 'send' + dest: VersionedMultiLocation + message: VersionedXcm +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, + * with all fees taken as needed from the asset. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VoterListCall: sts.Type = sts.closedEnum(() => { + return { + put_in_front_of: sts.enumStruct({ + lighter: MultiAddress, + }), + rebag: sts.enumStruct({ + dislocated: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VoterListCall = VoterListCall_put_in_front_of | VoterListCall_rebag + +/** + * Move the caller's Id directly in front of `lighter`. + * + * The dispatch origin for this call must be _Signed_ and can only be called by the Id of + * the account going in front of `lighter`. + * + * Only works if + * - both nodes are within the same bag, + * - and `origin` has a greater `Score` than `lighter`. + */ +export interface VoterListCall_put_in_front_of { + __kind: 'put_in_front_of' + lighter: MultiAddress +} + +/** + * Declare that some `dislocated` account has, through rewards or penalties, sufficiently + * changed its score that it should properly fall into a different bag than its current + * one. + * + * Anyone can call this function about any potentially dislocated account. + * + * Will always update the stored score of `dislocated` to the correct score, based on + * `ScoreProvider`. + * + * If `dislocated` does not exists, it returns an error. + */ +export interface VoterListCall_rebag { + __kind: 'rebag' + dislocated: MultiAddress +} + +export type MultiAddress = MultiAddress_Address20 | MultiAddress_Address32 | MultiAddress_Id | MultiAddress_Index | MultiAddress_Raw + +export interface MultiAddress_Address20 { + __kind: 'Address20' + value: Bytes +} + +export interface MultiAddress_Address32 { + __kind: 'Address32' + value: Bytes +} + +export interface MultiAddress_Id { + __kind: 'Id' + value: AccountId32 +} + +export interface MultiAddress_Index { + __kind: 'Index' +} + +export interface MultiAddress_Raw { + __kind: 'Raw' + value: Bytes +} + +export type AccountId32 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: MultiAddress, + target: MultiAddress, + schedule: VestingInfo, + }), + merge_schedules: sts.enumStruct({ + schedule1Index: sts.number(), + schedule2Index: sts.number(), + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: MultiAddress, + }), + vested_transfer: sts.enumStruct({ + target: MultiAddress, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: sts.bigint(), + perBlock: sts.bigint(), + startingBlock: sts.number(), + } +}) + +export interface VestingInfo { + locked: bigint + perBlock: bigint + startingBlock: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_merge_schedules | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: MultiAddress + target: MultiAddress + schedule: VestingInfo +} + +/** + * Merge two vesting schedules together, creating a new vesting schedule that unlocks over + * the highest possible start and end blocks. If both schedules have already started the + * current block will be used as the schedule start; with the caveat that if one schedule + * is finished by the current block, the other will be treated as the new merged schedule, + * unmodified. + * + * NOTE: If `schedule1_index == schedule2_index` this is a no-op. + * NOTE: This will unlock all schedules through the current block prior to merging. + * NOTE: If both schedules have ended by the current block, no new schedule will be created + * and both will be removed. + * + * Merged schedule attributes: + * - `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block, + * current_block)`. + * - `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`. + * - `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`. + * + * The dispatch origin for this call must be _Signed_. + * + * - `schedule1_index`: index of the first schedule to merge. + * - `schedule2_index`: index of the second schedule to merge. + */ +export interface VestingCall_merge_schedules { + __kind: 'merge_schedules' + schedule1Index: number + schedule2Index: number +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: MultiAddress +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account receiving the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: MultiAddress + schedule: VestingInfo +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Call, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Call), + }), + dispatch_as: sts.enumStruct({ + asOrigin: OriginCaller, + call: Call, + }), + force_batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + } +}) + +export const OriginCaller: sts.Type = sts.closedEnum(() => { + return { + Council: Type_340, + ParachainsOrigin: Origin, + TechnicalCommittee: Type_341, + Void: Void, + XcmPallet: Type_343, + system: RawOrigin, + } +}) + +export const RawOrigin: sts.Type = sts.closedEnum(() => { + return { + None: sts.unit(), + Root: sts.unit(), + Signed: AccountId32, + } +}) + +export type RawOrigin = RawOrigin_None | RawOrigin_Root | RawOrigin_Signed + +export interface RawOrigin_None { + __kind: 'None' +} + +export interface RawOrigin_Root { + __kind: 'Root' +} + +export interface RawOrigin_Signed { + __kind: 'Signed' + value: AccountId32 +} + +export const Type_343: sts.Type = sts.closedEnum(() => { + return { + Response: V1MultiLocation, + Xcm: V1MultiLocation, + } +}) + +export type Type_343 = Type_343_Response | Type_343_Xcm + +export interface Type_343_Response { + __kind: 'Response' + value: V1MultiLocation +} + +export interface Type_343_Xcm { + __kind: 'Xcm' + value: V1MultiLocation +} + +export const Void: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Void = never + +export const Type_341: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_341 = Type_341_Member | Type_341_Members | Type_341__Phantom + +export interface Type_341_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_341_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_341__Phantom { + __kind: '_Phantom' +} + +export const Origin: sts.Type = sts.closedEnum(() => { + return { + Parachain: Id, + } +}) + +export const Id = sts.number() + +export type Origin = Origin_Parachain + +export interface Origin_Parachain { + __kind: 'Parachain' + value: Id +} + +export type Id = number + +export const Type_340: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_340 = Type_340_Member | Type_340_Members | Type_340__Phantom + +export interface Type_340_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_340_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_340__Phantom { + __kind: '_Phantom' +} + +export type OriginCaller = OriginCaller_Council | OriginCaller_ParachainsOrigin | OriginCaller_TechnicalCommittee | OriginCaller_Void | OriginCaller_XcmPallet | OriginCaller_system + +export interface OriginCaller_Council { + __kind: 'Council' + value: Type_340 +} + +export interface OriginCaller_ParachainsOrigin { + __kind: 'ParachainsOrigin' + value: Origin +} + +export interface OriginCaller_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: Type_341 +} + +export interface OriginCaller_Void { + __kind: 'Void' + value: Void +} + +export interface OriginCaller_XcmPallet { + __kind: 'XcmPallet' + value: Type_343 +} + +export interface OriginCaller_system { + __kind: 'system' + value: RawOrigin +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all | UtilityCall_dispatch_as | UtilityCall_force_batch + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Call +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Call[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Call[] +} + +/** + * Dispatches a function call with a provided origin. + * + * The dispatch origin for this call must be _Root_. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB write (event). + * - Weight of derivative `call` execution + T::WeightInfo::dispatch_as(). + * # + */ +export interface UtilityCall_dispatch_as { + __kind: 'dispatch_as' + asOrigin: OriginCaller + call: Call +} + +/** + * Send a batch of dispatch calls. + * Unlike `batch`, it allows errors and won't interrupt. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_force_batch { + __kind: 'force_batch' + calls: Call[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UmpCall: sts.Type = sts.closedEnum(() => { + return { + service_overweight: sts.enumStruct({ + index: sts.bigint(), + weightLimit: Weight, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UmpCall = UmpCall_service_overweight + +/** + * Service a single overweight upward message. + * + * - `origin`: Must pass `ExecuteOverweightOrigin`. + * - `index`: The index of the overweight message to service. + * - `weight_limit`: The amount of weight that message execution may take. + * + * Errors: + * - `UnknownMessageIndex`: Message of `index` is unknown. + * - `WeightOverLimit`: Message execution may use greater than `weight_limit`. + * + * Events: + * - `OverweightServiced`: On success. + */ +export interface UmpCall_service_overweight { + __kind: 'service_overweight' + index: bigint + weightLimit: Weight +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: MultiAddress, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + remove_approval: sts.enumStruct({ + proposalId: sts.number(), + }), + spend: sts.enumStruct({ + amount: sts.bigint(), + beneficiary: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_remove_approval | TreasuryCall_spend + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: MultiAddress +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Force a previously approved proposal to be removed from the approval queue. + * The original deposit will no longer be returned. + * + * May only be called from `T::RejectOrigin`. + * - `proposal_id`: The index of a proposal + * + * # + * - Complexity: O(A) where `A` is the number of approvals + * - Db reads and writes: `Approvals` + * # + * + * Errors: + * - `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue, + * i.e., the proposal has not been approved. This could also mean the proposal does not + * exist altogether, thus there is no way it would have been approved in the first place. + */ +export interface TreasuryCall_remove_approval { + __kind: 'remove_approval' + proposalId: number +} + +/** + * Propose and approve a spend of treasury funds. + * + * - `origin`: Must be `SpendOrigin` with the `Success` value being at least `amount`. + * - `amount`: The amount to be transferred from the treasury to the `beneficiary`. + * - `beneficiary`: The destination account for the transfer. + * + * NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the + * beneficiary. + */ +export interface TreasuryCall_spend { + __kind: 'spend' + amount: bigint + beneficiary: MultiAddress +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TipsCall: sts.Type = sts.closedEnum(() => { + return { + close_tip: sts.enumStruct({ + hash: H256, + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: MultiAddress, + }), + retract_tip: sts.enumStruct({ + hash: H256, + }), + slash_tip: sts.enumStruct({ + hash: H256, + }), + tip: sts.enumStruct({ + hash: H256, + tipValue: sts.bigint(), + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: MultiAddress, + tipValue: sts.bigint(), + }), + } +}) + +export const H256 = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TipsCall = TipsCall_close_tip | TipsCall_report_awesome | TipsCall_retract_tip | TipsCall_slash_tip | TipsCall_tip | TipsCall_tip_new + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost + * depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TipsCall_close_tip { + __kind: 'close_tip' + hash: H256 +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: MultiAddress +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TipsCall_retract_tip { + __kind: 'retract_tip' + hash: H256 +} + +/** + * Remove and slash an already-open tip. + * + * May only be called from `T::RejectOrigin`. + * + * As a result, the finder is slashed and the deposits are lost. + * + * Emits `TipSlashed` if successful. + * + * # + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * # + */ +export interface TipsCall_slash_tip { + __kind: 'slash_tip' + hash: H256 +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`, insert tip and check closing, `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TipsCall_tip { + __kind: 'tip' + hash: H256 + tipValue: bigint +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of + * `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: MultiAddress + tipValue: bigint +} + +export type H256 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in + * `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: MultiAddress, + }), + change_key: sts.enumStruct({ + new: MultiAddress, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: MultiAddress, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId32), + }), + set_prime: sts.enumStruct({ + who: MultiAddress, + }), + swap_member: sts.enumStruct({ + remove: MultiAddress, + add: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: MultiAddress +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: MultiAddress +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: MultiAddress +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId32[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: MultiAddress +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: MultiAddress + add: MultiAddress +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: sts.bytes(), + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => sts.bytes()), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + }), + } +}) + +export const Perbill = sts.number() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Bytes + subkeys: number +} + +/** + * Kill some items from storage. + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Bytes[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Make some on-chain remark and emit event. + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is + * expensive). + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very + * expensive. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full + * block. # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: [Bytes, Bytes][] +} + +export type Perbill = number + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: MultiAddress, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: sts.number(), + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + controller: AccountId32, + }), + force_apply_min_commission: sts.enumStruct({ + validatorStash: AccountId32, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => MultiAddress), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => MultiAddress), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + }), + reap_stash: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: MultiAddress, + }), + set_history_depth: sts.enumStruct({ + newHistoryDepth: sts.number(), + eraItemsDeleted: sts.number(), + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId32), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_staking_configs: sts.enumStruct({ + minNominatorBond: ConfigOp, + minValidatorBond: ConfigOp, + maxNominatorCount: Type_255, + maxValidatorCount: Type_255, + chillThreshold: Type_256, + minCommission: Type_257, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export const Type_257: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export type Type_257 = Type_257_Noop | Type_257_Remove | Type_257_Set + +export interface Type_257_Noop { + __kind: 'Noop' +} + +export interface Type_257_Remove { + __kind: 'Remove' +} + +export interface Type_257_Set { + __kind: 'Set' + value: Perbill +} + +export const Type_256: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Percent, + } +}) + +export type Type_256 = Type_256_Noop | Type_256_Remove | Type_256_Set + +export interface Type_256_Noop { + __kind: 'Noop' +} + +export interface Type_256_Remove { + __kind: 'Remove' +} + +export interface Type_256_Set { + __kind: 'Set' + value: Percent +} + +export type Percent = number + +export const Type_255: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_255 = Type_255_Noop | Type_255_Remove | Type_255_Set + +export interface Type_255_Noop { + __kind: 'Noop' +} + +export interface Type_255_Remove { + __kind: 'Remove' +} + +export interface Type_255_Set { + __kind: 'Set' + value: number +} + +export const ConfigOp: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type ConfigOp = ConfigOp_Noop | ConfigOp_Remove | ConfigOp_Set + +export interface ConfigOp_Noop { + __kind: 'Noop' +} + +export interface ConfigOp_Remove { + __kind: 'Remove' +} + +export interface ConfigOp_Set { + __kind: 'Set' + value: bigint +} + +export const Percent = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_force_apply_min_commission | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_history_depth | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_staking_configs | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: MultiAddress + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose + * any limitation on the amount that can be added. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: number + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Declare a `controller` to stop participating as either a validator or nominator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_, but can be called by anyone. + * + * If the caller is the same as the controller being targeted, then no further checks are + * enforced, and this function behaves just like `chill`. + * + * If the caller is different than the controller being targeted, the following conditions + * must be met: + * + * * `controller` must belong to a nominator who has become non-decodable, + * + * Or: + * + * * A `ChillThreshold` must be set and checked which defines how close to the max + * nominators or validators we must reach before users can start chilling one-another. + * * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine + * how close we are to the threshold. + * * A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines + * if this is a person that should be chilled because they have not met the threshold + * bond required. + * + * This can be helpful if bond requirements are updated, and we need to remove old users + * who do not satisfy these requirements. + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + controller: AccountId32 +} + +/** + * Force a validator to have at least the minimum commission. This will not affect a + * validator who already has a commission greater than or equal to the minimum. Any account + * can call this. + */ +export interface StakingCall_force_apply_min_commission { + __kind: 'force_apply_min_commission' + validatorStash: AccountId32 +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * Thus the election process may be ongoing when this is called. In this case the + * election will continue until the next era is triggered. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: MultiAddress[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (T::MaxNominations). + * - Both the reads and writes follow a similar pattern. + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: MultiAddress[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId32 + era: number +} + +/** + * Remove all data structures concerning a staker/stash once it is at a state where it can + * be considered `dust` in the staking system. The requirements are: + * + * 1. the `total_balance` of the stash is below existential deposit. + * 2. or, the `ledger.total` of the stash is below existential deposit. + * + * The former can happen in cases like a slash; the latter when a fully unbonded account + * is still receiving staking rewards in `RewardDestination::Staked`. + * + * It can be called by anyone, as long as `stash` meets the above requirements. + * + * Refunds the transaction fees upon successful execution. + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MaxUnlockingChunks`. + * - Storage changes: Can't increase storage, only decrease it. + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt instantly (as soon as this function is completed successfully). + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: MultiAddress +} + +/** + * Set `HistoryDepth` value. This function will delete any history information + * when `HistoryDepth` is reduced. + * + * Parameters: + * - `new_history_depth`: The new history depth you would like to set. + * - `era_items_deleted`: The number of items that will be deleted by this dispatch. This + * should report all the storage items that will be deleted by clearing old era history. + * Needed to report an accurate weight for the dispatch. Trusted by `Root` to report an + * accurate number. + * + * Origin must be root. + * + * # + * - E: Number of history depths removed, i.e. 10 -> 7 = 3 + * - Weight: O(E) + * - DB Weight: + * - Reads: Current Era, History Depth + * - Writes: History Depth + * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs + * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, + * ErasStartSessionIndex + * # + */ +export interface StakingCall_set_history_depth { + __kind: 'set_history_depth' + newHistoryDepth: number + eraItemsDeleted: number +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId32[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt instantly (as soon as this function is completed successfully). + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Update the various staking configurations . + * + * * `min_nominator_bond`: The minimum active bond needed to be a nominator. + * * `min_validator_bond`: The minimum active bond needed to be a validator. + * * `max_nominator_count`: The max number of users who can be a nominator at once. When + * set to `None`, no limit is enforced. + * * `max_validator_count`: The max number of users who can be a validator at once. When + * set to `None`, no limit is enforced. + * * `chill_threshold`: The ratio of `max_nominator_count` or `max_validator_count` which + * should be filled in order for the `chill_other` transaction to work. + * * `min_commission`: The minimum amount of commission that each validators must maintain. + * This is checked only upon calling `validate`. Existing validators are not affected. + * + * Origin must be Root to call this function. + * + * NOTE: Existing nominators and validators will not be affected by this update. + * to kick people under the new limits, `chill_other` should be called. + */ +export interface StakingCall_set_staking_configs { + __kind: 'set_staking_configs' + minNominatorBond: ConfigOp + minValidatorBond: ConfigOp + maxNominatorCount: Type_255 + maxValidatorCount: Type_255 + chillThreshold: Type_256 + minCommission: Type_257 +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * If a user encounters the `InsufficientBond` error when calling this extrinsic, + * they should call `chill` first in order to free up their bonded funds. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * Complexity O(S) where S is the number of slashing spans to remove + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: sts.bigint(), + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: MultiAddress, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: MultiAddress, + judgement: Type_386, + }), + judge_suspended_member: sts.enumStruct({ + who: MultiAddress, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: MultiAddress, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: MultiAddress, + value: sts.bigint(), + tip: sts.bigint(), + }), + } +}) + +export const Type_386: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export type Type_386 = Type_386_Approve | Type_386_Rebid | Type_386_Reject + +export interface Type_386_Approve { + __kind: 'Approve' +} + +export interface Type_386_Rebid { + __kind: 'Rebid' +} + +export interface Type_386_Reject { + __kind: 'Reject' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: bigint +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * pallet to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: MultiAddress + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: MultiAddress + judgement: Type_386 +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin forgives + * (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to + * society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: MultiAddress + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured + * payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be approved (`true`) or + * rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: MultiAddress + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: MultiAddress + value: bigint + tip: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: Id, + }), + force_lease: sts.enumStruct({ + para: Id, + leaser: AccountId32, + amount: sts.bigint(), + periodBegin: sts.number(), + periodCount: sts.number(), + }), + trigger_onboard: sts.enumStruct({ + para: Id, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * Clear all leases for a Para Id, refunding any deposits back to the original owners. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: Id +} + +/** + * Just a connect into the `lease_out` call, in case Root wants to force some lease to happen + * independently of any other on-chain mechanism to use it. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: Id + leaser: AccountId32 + amount: bigint + periodBegin: number + periodCount: number +} + +/** + * Try to onboard a parachain that has a lease for the current lease period. + * + * This function can be useful if there was some state issue with a para that should + * have onboarded, but was unable to. As long as they have a lease period, we can + * let them onboard from here. + * + * Origin must be signed, but can be called by anyone. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: SessionKeys, + proof: sts.bytes(), + }), + } +}) + +export const SessionKeys: sts.Type = sts.struct(() => { + return { + grandpa: Public, + babe: sts.bytes(), + imOnline: sts.bytes(), + paraValidator: sts.bytes(), + paraAssignment: sts.bytes(), + authorityDiscovery: sts.bytes(), + } +}) + +export const Public = sts.bytes() + +export interface SessionKeys { + grandpa: Public + babe: Bytes + imOnline: Bytes + paraValidator: Bytes + paraAssignment: Bytes + authorityDiscovery: Bytes +} + +export type Public = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be Signed and the account must be either be + * convertible to a validator ID using the chain's typical addressing system (this usually + * means being a controller account) or directly convertible into a validator ID (which + * usually means being a stash account). + * + * # + * - Complexity: `O(1)` in number of key types. Actual cost depends on the number of length + * of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)`. Actual cost depends on the number of length of + * `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: SessionKeys + proof: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: sts.number(), + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + schedule_after: sts.enumStruct({ + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + } +}) + +export const MaybeHashed: sts.Type = sts.closedEnum(() => { + return { + Hash: H256, + Value: Call, + } +}) + +export type MaybeHashed = MaybeHashed_Hash | MaybeHashed_Value + +export interface MaybeHashed_Hash { + __kind: 'Hash' + value: H256 +} + +export interface MaybeHashed_Value { + __kind: 'Value' + value: Call +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: number + index: number +} + +/** + * Cancel a named scheduled task. + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Schedule a named task. + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`](Self::schedule_named). + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + deregister: sts.enumStruct({ + id: Id, + }), + force_register: sts.enumStruct({ + who: AccountId32, + deposit: sts.bigint(), + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + force_remove_lock: sts.enumStruct({ + para: Id, + }), + register: sts.enumStruct({ + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + reserve: sts.unit(), + swap: sts.enumStruct({ + id: Id, + other: Id, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RegistrarCall = RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_force_remove_lock | RegistrarCall_register | RegistrarCall_reserve | RegistrarCall_swap + +/** + * Deregister a Para Id, freeing all data and returning any deposit. + * + * The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: Id +} + +/** + * Force the registration of a Para Id on the relay chain. + * + * This function must be called by a Root origin. + * + * The deposit taken can be specified for this registration. Any `ParaId` + * can be registered, including sub-1000 IDs which are System Parachains. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId32 + deposit: bigint + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Remove a manager lock from a para. This will allow the manager of a + * previously locked para to deregister or swap a para without using governance. + * + * Can only be called by the Root origin. + */ +export interface RegistrarCall_force_remove_lock { + __kind: 'force_remove_lock' + para: Id +} + +/** + * Register head data and validation code for a reserved Para Id. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. + * - `id`: The para ID. Must be owned/managed by the `origin` signing account. + * - `genesis_head`: The genesis head data of the parachain/thread. + * - `validation_code`: The initial validation code of the parachain/thread. + * + * ## Deposits/Fees + * The origin signed account must reserve a corresponding deposit for the registration. Anything already + * reserved previously for this para ID is accounted for. + * + * ## Events + * The `Registered` event is emitted in case of success. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Reserve a Para Id on the relay chain. + * + * This function will reserve a new Para Id to be owned/managed by the origin account. + * The origin account is able to register head data and validation code using `register` to create + * a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID. + * + * ## Deposits/Fees + * The origin must reserve a deposit of `ParaDeposit` for the registration. + * + * ## Events + * The `Reserved` event is emitted in case of success, which provides the ID reserved for use. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * Swap a parachain with another parachain or parathread. + * + * The origin must be Root, the `para` owner, or the `para` itself. + * + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: Id + other: Id +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: MultiAddress, + call: Call, + }), + cancel_recovered: sts.enumStruct({ + account: MultiAddress, + }), + claim_recovery: sts.enumStruct({ + account: MultiAddress, + }), + close_recovery: sts.enumStruct({ + rescuer: MultiAddress, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId32), + threshold: sts.number(), + delayPeriod: sts.number(), + }), + initiate_recovery: sts.enumStruct({ + account: MultiAddress, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + vouch_recovery: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: MultiAddress + call: Call +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: MultiAddress +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully recovered by + * you. + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: MultiAddress +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: MultiAddress +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. Should be + * ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt before the + * account can be recovered. Should be less than or equal to the length of the list of + * friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized that + * needs to pass before the account can be recovered. + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId32[] + threshold: number + delayPeriod: number +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account needs to be + * recoverable (i.e. have a recovery configuration). + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: MultiAddress +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + announce: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + anonymous: sts.enumStruct({ + proxyType: ProxyType, + delay: sts.number(), + index: sts.number(), + }), + kill_anonymous: sts.enumStruct({ + spawner: MultiAddress, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + proxy_announced: sts.enumStruct({ + delegate: MultiAddress, + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + reject_announcement: sts.enumStruct({ + delegate: MultiAddress, + callHash: H256, + }), + remove_announcement: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: MultiAddress + callHash: H256 +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + * TODO: Might be over counting 1 read + */ +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: number + index: number +} + +/** + * Removes a previously spawned anonymous proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. + * + * - `spawner`: The account that originally called `anonymous` to create this account. + * - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `anonymous`. + * - `height`: The height of the chain when the call to `anonymous` was processed. + * - `ext_index`: The extrinsic index in which the call to `anonymous` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created anonymous + * account whose `anonymous` call has corresponding parameters. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: MultiAddress + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Dispatch the given `call` from an account that the sender is authorized for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: MultiAddress + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: MultiAddress + callHash: H256 +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: MultiAddress + callHash: H256 +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `anonymous`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + * + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Society | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Society { + __kind: 'Society' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PreimageCall: sts.Type = sts.closedEnum(() => { + return { + note_preimage: sts.enumStruct({ + bytes: sts.bytes(), + }), + request_preimage: sts.enumStruct({ + hash: H256, + }), + unnote_preimage: sts.enumStruct({ + hash: H256, + }), + unrequest_preimage: sts.enumStruct({ + hash: H256, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PreimageCall = PreimageCall_note_preimage | PreimageCall_request_preimage | PreimageCall_unnote_preimage | PreimageCall_unrequest_preimage + +/** + * Register a preimage on-chain. + * + * If the preimage was previously requested, no fees or deposits are taken for providing + * the preimage. Otherwise, a deposit is taken proportional to the size of the preimage. + */ +export interface PreimageCall_note_preimage { + __kind: 'note_preimage' + bytes: Bytes +} + +/** + * Request a preimage be uploaded to the chain without paying any fees or deposits. + * + * If the preimage requests has already been provided on-chain, we unreserve any deposit + * a user may have paid, and take the control of the preimage out of their hands. + */ +export interface PreimageCall_request_preimage { + __kind: 'request_preimage' + hash: H256 +} + +/** + * Clear an unrequested preimage from the runtime storage. + */ +export interface PreimageCall_unnote_preimage { + __kind: 'unnote_preimage' + hash: H256 +} + +/** + * Clear a previously made request for a preimage. + * + * NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. + */ +export interface PreimageCall_unrequest_preimage { + __kind: 'unrequest_preimage' + hash: H256 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PhragmenElectionCall: sts.Type = sts.closedEnum(() => { + return { + clean_defunct_voters: sts.enumStruct({ + numVoters: sts.number(), + numDefunct: sts.number(), + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + slashBond: sts.boolean(), + rerunElection: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId32), + value: sts.bigint(), + }), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PhragmenElectionCall = PhragmenElectionCall_clean_defunct_voters | PhragmenElectionCall_remove_member | PhragmenElectionCall_remove_voter | PhragmenElectionCall_renounce_candidacy | PhragmenElectionCall_submit_candidacy | PhragmenElectionCall_vote + +/** + * Clean all voters who are defunct (i.e. they do not serve any purpose at all). The + * deposit of the removed voters are returned. + * + * This is an root function to be used only for cleaning the state. + * + * The dispatch origin of this call must be root. + * + * # + * The total number of voters and those that are defunct must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_clean_defunct_voters { + __kind: 'clean_defunct_voters' + numVoters: number + numDefunct: number +} + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, if `rerun_election` is `true`, a new phragmen election is + * started, else, nothing happens. + * + * If `slash_bond` is set to true, the bond of the member being removed is slashed. Else, + * it is returned. + * + * The dispatch origin of this call must be root. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement, we use a small weight. Else, since this is a root call and + * will go into phragmen, we assume full block for now. + * # + */ +export interface PhragmenElectionCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + slashBond: boolean + rerunElection: boolean +} + +/** + * Remove `origin` as a voter. + * + * This removes the lock and returns the deposit. + * + * The dispatch origin of this call must be signed and be a voter. + */ +export interface PhragmenElectionCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * + * - `origin` is a candidate and not elected in any set. In this case, the deposit is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the deposit is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the deposit is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_member`](Self::remove_member), if replacement runners exists, they + * are immediately used. If the prime is renouncing, then no prime will exist until the + * next round. + * + * The dispatch origin of this call must be signed, and have one of the above roles. + * + * # + * The type of renouncing must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Submit oneself for candidacy. A fixed amount of deposit is recorded. + * + * All candidates are wiped at the end of the term. They either become a member/runner-up, + * or leave the system while their deposit is slashed. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`] + * to get their deposit back. Losing the spot in an election will always lead to a slash. + * + * # + * The number of current candidates must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is + * reserved. The deposit is based on the number of votes and can be updated over time. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * If `value` is more than `who`'s free balance, then the maximum of the two is used. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * It is the responsibility of the caller to **NOT** place all of their balance into the + * lock and keep some for further operations. + * + * # + * We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less. + * # + */ +export interface PhragmenElectionCall_vote { + __kind: 'vote' + votes: AccountId32[] + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasSharedCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasDisputesCall: sts.Type = sts.closedEnum(() => { + return { + force_unfreeze: sts.unit(), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasDisputesCall = ParasDisputesCall_force_unfreeze + +export interface ParasDisputesCall_force_unfreeze { + __kind: 'force_unfreeze' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + add_trusted_validation_code: sts.enumStruct({ + validationCode: ValidationCode, + }), + force_note_new_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: Id, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + relayParentNumber: sts.number(), + }), + force_set_current_code: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + include_pvf_check_statement: sts.enumStruct({ + stmt: V2PvfCheckStatement, + signature: sts.bytes(), + }), + poke_unused_validation_code: sts.enumStruct({ + validationCodeHash: ValidationCodeHash, + }), + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const V2PvfCheckStatement: sts.Type = sts.struct(() => { + return { + accept: sts.boolean(), + subject: ValidationCodeHash, + sessionIndex: sts.number(), + validatorIndex: V2ValidatorIndex, + } +}) + +export const V2ValidatorIndex = sts.number() + +export interface V2PvfCheckStatement { + accept: boolean + subject: ValidationCodeHash + sessionIndex: number + validatorIndex: V2ValidatorIndex +} + +export type V2ValidatorIndex = number + +export type ValidationCodeHash = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasCall = ParasCall_add_trusted_validation_code | ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head | ParasCall_include_pvf_check_statement | ParasCall_poke_unused_validation_code + +/** + * Adds the validation code to the storage. + * + * The code will not be added if it is already present. Additionally, if PVF pre-checking + * is running for that code, it will be instantly accepted. + * + * Otherwise, the code will be added into the storage. Note that the code will be added + * into storage with reference count 0. This is to account the fact that there are no users + * for this code yet. The caller will have to make sure that this code eventually gets + * used by some parachain or removed from the storage to avoid storage leaks. For the latter + * prefer to use the `poke_unused_validation_code` dispatchable to raw storage manipulation. + * + * This function is mainly meant to be used for upgrading parachains that do not follow + * the go-ahead signal while the PVF pre-checking feature is enabled. + */ +export interface ParasCall_add_trusted_validation_code { + __kind: 'add_trusted_validation_code' + validationCode: ValidationCode +} + +/** + * Note a new block head for para within the context of the current block. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: Id + newHead: HeadData +} + +/** + * Put a parachain directly into the next session's action queue. + * We can't queue it any sooner than this without going into the + * initializer... + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: Id +} + +/** + * Schedule an upgrade as if it was scheduled in the given relay parent block. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: Id + newCode: ValidationCode + relayParentNumber: number +} + +/** + * Set the storage for the parachain validation code immediately. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: Id + newCode: ValidationCode +} + +/** + * Set the storage for the current parachain head data immediately. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: Id + newHead: HeadData +} + +/** + * Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and + * enacts the results if that was the last vote before achieving the supermajority. + */ +export interface ParasCall_include_pvf_check_statement { + __kind: 'include_pvf_check_statement' + stmt: V2PvfCheckStatement + signature: Bytes +} + +/** + * Remove the validation code from the storage iff the reference count is 0. + * + * This is better than removing the storage directly, because it will not remove the code + * that was suddenly got used by some parachain while this dispatchable was pending + * dispatching. + */ +export interface ParasCall_poke_unused_validation_code { + __kind: 'poke_unused_validation_code' + validationCodeHash: ValidationCodeHash +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: V2InherentData, + }), + } +}) + +export const V2InherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => V2UncheckedSigned), + backedCandidates: sts.array(() => V2BackedCandidate), + disputes: sts.array(() => V2DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: H256, + number: sts.number(), + stateRoot: H256, + extrinsicsRoot: H256, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + Consensus: sts.tuple(() => [sts.bytes(), sts.bytes()]), + Other: sts.bytes(), + PreRuntime: sts.tuple(() => [sts.bytes(), sts.bytes()]), + RuntimeEnvironmentUpdated: sts.unit(), + Seal: sts.tuple(() => [sts.bytes(), sts.bytes()]), + } +}) + +export type DigestItem = DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: [Bytes, Bytes] +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: [Bytes, Bytes] +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: [Bytes, Bytes] +} + +export interface Digest { + logs: DigestItem[] +} + +export interface Header { + parentHash: H256 + number: number + stateRoot: H256 + extrinsicsRoot: H256 + digest: Digest +} + +export const V2DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: sts.number(), + statements: sts.array(() => sts.tuple(() => [V2DisputeStatement, V2ValidatorIndex, sts.bytes()])), + } +}) + +export const V2DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: V2InvalidDisputeStatementKind, + Valid: V2ValidDisputeStatementKind, + } +}) + +export const V2ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + BackingSeconded: H256, + BackingValid: H256, + Explicit: sts.unit(), + } +}) + +export type V2ValidDisputeStatementKind = V2ValidDisputeStatementKind_ApprovalChecking | V2ValidDisputeStatementKind_BackingSeconded | V2ValidDisputeStatementKind_BackingValid | V2ValidDisputeStatementKind_Explicit + +export interface V2ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface V2ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: H256 +} + +export interface V2ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: H256 +} + +export interface V2ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export const V2InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export type V2InvalidDisputeStatementKind = V2InvalidDisputeStatementKind_Explicit + +export interface V2InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type V2DisputeStatement = V2DisputeStatement_Invalid | V2DisputeStatement_Valid + +export interface V2DisputeStatement_Invalid { + __kind: 'Invalid' + value: V2InvalidDisputeStatementKind +} + +export interface V2DisputeStatement_Valid { + __kind: 'Valid' + value: V2ValidDisputeStatementKind +} + +export const CandidateHash = sts.bytes() + +export interface V2DisputeStatementSet { + candidateHash: CandidateHash + session: number + statements: [V2DisputeStatement, V2ValidatorIndex, Bytes][] +} + +export type CandidateHash = Bytes + +export const V2BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: V2CommittedCandidateReceipt, + validityVotes: sts.array(() => V2ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const V2ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.bytes(), + Implicit: sts.bytes(), + } +}) + +export type V2ValidityAttestation = V2ValidityAttestation_Explicit | V2ValidityAttestation_Implicit + +export interface V2ValidityAttestation_Explicit { + __kind: 'Explicit' + value: Bytes +} + +export interface V2ValidityAttestation_Implicit { + __kind: 'Implicit' + value: Bytes +} + +export const V2CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: V2CandidateDescriptor, + commitments: V2CandidateCommitments, + } +}) + +export const V2CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => sts.bytes()), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: sts.number(), + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: Id, + data: sts.bytes(), + } +}) + +export interface OutboundHrmpMessage { + recipient: Id + data: Bytes +} + +export interface V2CandidateCommitments { + upwardMessages: Bytes[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: number +} + +export const V2CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: Id, + relayParent: H256, + collator: V2Public, + persistedValidationDataHash: H256, + povHash: H256, + erasureRoot: H256, + signature: V2Signature, + paraHead: H256, + validationCodeHash: ValidationCodeHash, + } +}) + +export const V2Signature = sts.bytes() + +export const V2Public = sts.bytes() + +export interface V2CandidateDescriptor { + paraId: Id + relayParent: H256 + collator: V2Public + persistedValidationDataHash: H256 + povHash: H256 + erasureRoot: H256 + signature: V2Signature + paraHead: H256 + validationCodeHash: ValidationCodeHash +} + +export type V2Signature = Bytes + +export type V2Public = Bytes + +export interface V2CommittedCandidateReceipt { + descriptor: V2CandidateDescriptor + commitments: V2CandidateCommitments +} + +export interface V2BackedCandidate { + candidate: V2CommittedCandidateReceipt + validityVotes: V2ValidityAttestation[] + validatorIndices: BitSequence +} + +export const V2UncheckedSigned: sts.Type = sts.struct(() => { + return { + payload: V2AvailabilityBitfield, + validatorIndex: V2ValidatorIndex, + signature: sts.bytes(), + } +}) + +export const V2AvailabilityBitfield = sts.bitseq() + +export interface V2UncheckedSigned { + payload: V2AvailabilityBitfield + validatorIndex: V2ValidatorIndex + signature: Bytes +} + +export type V2AvailabilityBitfield = BitSequence + +export interface V2InherentData { + bitfields: V2UncheckedSigned[] + backedCandidates: V2BackedCandidate[] + disputes: V2DisputeStatementSet[] + parentHeader: Header +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInherentCall = ParaInherentCall_enter + +/** + * Enter the paras inherent. This will process bitfields and backed candidates. + */ +export interface ParaInherentCall_enter { + __kind: 'enter' + data: V2InherentData +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInclusionCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const NominationPoolsCall: sts.Type = sts.closedEnum(() => { + return { + bond_extra: sts.enumStruct({ + extra: BondExtra, + }), + chill: sts.enumStruct({ + poolId: sts.number(), + }), + claim_payout: sts.unit(), + create: sts.enumStruct({ + amount: sts.bigint(), + root: MultiAddress, + nominator: MultiAddress, + stateToggler: MultiAddress, + }), + join: sts.enumStruct({ + amount: sts.bigint(), + poolId: sts.number(), + }), + nominate: sts.enumStruct({ + poolId: sts.number(), + validators: sts.array(() => AccountId32), + }), + pool_withdraw_unbonded: sts.enumStruct({ + poolId: sts.number(), + numSlashingSpans: sts.number(), + }), + set_configs: sts.enumStruct({ + minJoinBond: Type_490, + minCreateBond: Type_490, + maxPools: Type_491, + maxMembers: Type_491, + maxMembersPerPool: Type_491, + }), + set_metadata: sts.enumStruct({ + poolId: sts.number(), + metadata: sts.bytes(), + }), + set_state: sts.enumStruct({ + poolId: sts.number(), + state: PoolState, + }), + unbond: sts.enumStruct({ + memberAccount: MultiAddress, + unbondingPoints: sts.bigint(), + }), + update_roles: sts.enumStruct({ + poolId: sts.number(), + newRoot: Type_492, + newNominator: Type_492, + newStateToggler: Type_492, + }), + withdraw_unbonded: sts.enumStruct({ + memberAccount: MultiAddress, + numSlashingSpans: sts.number(), + }), + } +}) + +export const Type_492: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: AccountId32, + } +}) + +export type Type_492 = Type_492_Noop | Type_492_Remove | Type_492_Set + +export interface Type_492_Noop { + __kind: 'Noop' +} + +export interface Type_492_Remove { + __kind: 'Remove' +} + +export interface Type_492_Set { + __kind: 'Set' + value: AccountId32 +} + +export const PoolState: sts.Type = sts.closedEnum(() => { + return { + Blocked: sts.unit(), + Destroying: sts.unit(), + Open: sts.unit(), + } +}) + +export type PoolState = PoolState_Blocked | PoolState_Destroying | PoolState_Open + +export interface PoolState_Blocked { + __kind: 'Blocked' +} + +export interface PoolState_Destroying { + __kind: 'Destroying' +} + +export interface PoolState_Open { + __kind: 'Open' +} + +export const Type_491: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_491 = Type_491_Noop | Type_491_Remove | Type_491_Set + +export interface Type_491_Noop { + __kind: 'Noop' +} + +export interface Type_491_Remove { + __kind: 'Remove' +} + +export interface Type_491_Set { + __kind: 'Set' + value: number +} + +export const Type_490: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type Type_490 = Type_490_Noop | Type_490_Remove | Type_490_Set + +export interface Type_490_Noop { + __kind: 'Noop' +} + +export interface Type_490_Remove { + __kind: 'Remove' +} + +export interface Type_490_Set { + __kind: 'Set' + value: bigint +} + +export const BondExtra: sts.Type = sts.closedEnum(() => { + return { + FreeBalance: sts.bigint(), + Rewards: sts.unit(), + } +}) + +export type BondExtra = BondExtra_FreeBalance | BondExtra_Rewards + +export interface BondExtra_FreeBalance { + __kind: 'FreeBalance' + value: bigint +} + +export interface BondExtra_Rewards { + __kind: 'Rewards' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type NominationPoolsCall = NominationPoolsCall_bond_extra | NominationPoolsCall_chill | NominationPoolsCall_claim_payout | NominationPoolsCall_create | NominationPoolsCall_join | NominationPoolsCall_nominate | NominationPoolsCall_pool_withdraw_unbonded | NominationPoolsCall_set_configs | NominationPoolsCall_set_metadata | NominationPoolsCall_set_state | NominationPoolsCall_unbond | NominationPoolsCall_update_roles | NominationPoolsCall_withdraw_unbonded + +/** + * Bond `extra` more funds from `origin` into the pool to which they already belong. + * + * Additional funds can come from either the free balance of the account, of from the + * accumulated rewards, see [`BondExtra`]. + * + * Bonding extra funds implies an automatic payout of all pending rewards as well. + */ +export interface NominationPoolsCall_bond_extra { + __kind: 'bond_extra' + extra: BondExtra +} + +/** + * Chill on behalf of the pool. + * + * The dispatch origin of this call must be signed by the pool nominator or the pool + * root role, same as [`Pallet::nominate`]. + * + * This directly forward the call to the staking pallet, on behalf of the pool bonded + * account. + */ +export interface NominationPoolsCall_chill { + __kind: 'chill' + poolId: number +} + +/** + * A bonded member can use this to claim their payout based on the rewards that the pool + * has accumulated since their last claimed payout (OR since joining if this is there first + * time claiming rewards). The payout will be transferred to the member's account. + * + * The member will earn rewards pro rata based on the members stake vs the sum of the + * members in the pools stake. Rewards do not "expire". + */ +export interface NominationPoolsCall_claim_payout { + __kind: 'claim_payout' +} + +/** + * Create a new delegation pool. + * + * # Arguments + * + * * `amount` - The amount of funds to delegate to the pool. This also acts of a sort of + * deposit since the pools creator cannot fully unbond funds until the pool is being + * destroyed. + * * `index` - A disambiguation index for creating the account. Likely only useful when + * creating multiple pools in the same extrinsic. + * * `root` - The account to set as [`PoolRoles::root`]. + * * `nominator` - The account to set as the [`PoolRoles::nominator`]. + * * `state_toggler` - The account to set as the [`PoolRoles::state_toggler`]. + * + * # Note + * + * In addition to `amount`, the caller will transfer the existential deposit; so the caller + * needs at have at least `amount + existential_deposit` transferrable. + */ +export interface NominationPoolsCall_create { + __kind: 'create' + amount: bigint + root: MultiAddress + nominator: MultiAddress + stateToggler: MultiAddress +} + +/** + * Stake funds with a pool. The amount to bond is transferred from the member to the + * pools account and immediately increases the pools bond. + * + * # Note + * + * * An account can only be a member of a single pool. + * * An account cannot join the same pool multiple times. + * * This call will *not* dust the member account, so the member must have at least + * `existential deposit + amount` in their account. + * * Only a pool with [`PoolState::Open`] can be joined + */ +export interface NominationPoolsCall_join { + __kind: 'join' + amount: bigint + poolId: number +} + +/** + * Nominate on behalf of the pool. + * + * The dispatch origin of this call must be signed by the pool nominator or the pool + * root role. + * + * This directly forward the call to the staking pallet, on behalf of the pool bonded + * account. + */ +export interface NominationPoolsCall_nominate { + __kind: 'nominate' + poolId: number + validators: AccountId32[] +} + +/** + * Call `withdraw_unbonded` for the pools account. This call can be made by any account. + * + * This is useful if their are too many unlocking chunks to call `unbond`, and some + * can be cleared by withdrawing. In the case there are too many unlocking chunks, the user + * would probably see an error like `NoMoreChunks` emitted from the staking system when + * they attempt to unbond. + */ +export interface NominationPoolsCall_pool_withdraw_unbonded { + __kind: 'pool_withdraw_unbonded' + poolId: number + numSlashingSpans: number +} + +/** + * Update configurations for the nomination pools. The origin for this call must be + * Root. + * + * # Arguments + * + * * `min_join_bond` - Set [`MinJoinBond`]. + * * `min_create_bond` - Set [`MinCreateBond`]. + * * `max_pools` - Set [`MaxPools`]. + * * `max_members` - Set [`MaxPoolMembers`]. + * * `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]. + */ +export interface NominationPoolsCall_set_configs { + __kind: 'set_configs' + minJoinBond: Type_490 + minCreateBond: Type_490 + maxPools: Type_491 + maxMembers: Type_491 + maxMembersPerPool: Type_491 +} + +/** + * Set a new metadata for the pool. + * + * The dispatch origin of this call must be signed by the state toggler, or the root role + * of the pool. + */ +export interface NominationPoolsCall_set_metadata { + __kind: 'set_metadata' + poolId: number + metadata: Bytes +} + +/** + * Set a new state for the pool. + * + * If a pool is already in the `Destroying` state, then under no condition can its state + * change again. + * + * The dispatch origin of this call must be either: + * + * 1. signed by the state toggler, or the root role of the pool, + * 2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and + * then the state of the pool can be permissionlessly changed to `Destroying`. + */ +export interface NominationPoolsCall_set_state { + __kind: 'set_state' + poolId: number + state: PoolState +} + +/** + * Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It + * implicitly collects the rewards one last time, since not doing so would mean some + * rewards would be forfeited. + * + * Under certain conditions, this call can be dispatched permissionlessly (i.e. by any + * account). + * + * # Conditions for a permissionless dispatch. + * + * * The pool is blocked and the caller is either the root or state-toggler. This is + * refereed to as a kick. + * * The pool is destroying and the member is not the depositor. + * * The pool is destroying, the member is the depositor and no other members are in the + * pool. + * + * ## Conditions for permissioned dispatch (i.e. the caller is also the + * `member_account`): + * + * * The caller is not the depositor. + * * The caller is the depositor, the pool is destroying and no other members are in the + * pool. + * + * # Note + * + * If there are too many unlocking chunks to unbond with the pool account, + * [`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks. If + * there are too many unlocking chunks, the result of this call will likely be the + * `NoMoreChunks` error from the staking system. + */ +export interface NominationPoolsCall_unbond { + __kind: 'unbond' + memberAccount: MultiAddress + unbondingPoints: bigint +} + +/** + * Update the roles of the pool. + * + * The root is the only entity that can change any of the roles, including itself, + * excluding the depositor, who can never change. + * + * It emits an event, notifying UIs of the role change. This event is quite relevant to + * most pool members and they should be informed of changes to pool roles. + */ +export interface NominationPoolsCall_update_roles { + __kind: 'update_roles' + poolId: number + newRoot: Type_492 + newNominator: Type_492 + newStateToggler: Type_492 +} + +/** + * Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an + * error is returned. + * + * Under certain conditions, this call can be dispatched permissionlessly (i.e. by any + * account). + * + * # Conditions for a permissionless dispatch + * + * * The pool is in destroy mode and the target is not the depositor. + * * The target is the depositor and they are the only member in the sub pools. + * * The pool is blocked and the caller is either the root or state-toggler. + * + * # Conditions for permissioned dispatch + * + * * The caller is the target and they are not the depositor. + * + * # Note + * + * If the target is the depositor, the pool will be destroyed. + */ +export interface NominationPoolsCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + memberAccount: MultiAddress + numSlashingSpans: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + call: sts.bytes(), + storeCall: sts.boolean(), + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId32), + call: Call, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + call: Bytes + storeCall: boolean + maxWeight: Weight +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId32[] + call: Call +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId32[] + timepoint: Timepoint + callHash: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const InitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type InitializerCall = InitializerCall_force_approve + +/** + * Issue a signal to the consensus engine to forcibly act as though all parachain + * blocks in all relay chain blocks up to and including the given number in the current + * chain are valid and should be finalized. + */ +export interface InitializerCall_force_approve { + __kind: 'force_approve' + upTo: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: sts.number(), + }), + force_transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: sts.number(), + }), + freeze: sts.enumStruct({ + index: sts.number(), + }), + transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: number +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: MultiAddress + index: number + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: number +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the + * deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: number +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: MultiAddress + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: sts.bytes(), + }), + } +}) + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: sts.number(), + networkState: OpaqueNetworkState, + sessionIndex: sts.number(), + authorityIndex: sts.number(), + validatorsLen: sts.number(), + } +}) + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export interface Heartbeat { + blockNumber: number + networkState: OpaqueNetworkState + sessionIndex: number + authorityIndex: number + validatorsLen: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is + * length of `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Bytes +} + +/** + * Identity pallet declaration. + */ +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: MultiAddress, + }), + add_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: sts.number(), + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: MultiAddress, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: MultiAddress, + judgement: Judgement, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: MultiAddress, + }), + rename_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: MultiAddress, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: BitFlags, + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId32, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => sts.tuple(() => [Data, Data])), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => sts.bytes()), + image: Data, + twitter: Data, + } +}) + +export interface IdentityInfo { + additional: [Data, Data][] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (Bytes | undefined) + image: Data + twitter: Data +} + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: Bytes +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: Bytes +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: Bytes +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: Bytes +} + +export const BitFlags = sts.bigint() + +export const Judgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: sts.bigint(), + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export type Judgement = Judgement_Erroneous | Judgement_FeePaid | Judgement_KnownGood | Judgement_LowQuality | Judgement_OutOfDate | Judgement_Reasonable | Judgement_Unknown + +export interface Judgement_Erroneous { + __kind: 'Erroneous' +} + +export interface Judgement_FeePaid { + __kind: 'FeePaid' + value: bigint +} + +export interface Judgement_KnownGood { + __kind: 'KnownGood' +} + +export interface Judgement_LowQuality { + __kind: 'LowQuality' +} + +export interface Judgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface Judgement_Reasonable { + __kind: 'Reasonable' +} + +export interface Judgement_Unknown { + __kind: 'Unknown' +} + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: sts.bytes(), + Keccak256: sts.bytes(), + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: sts.bytes(), + ShaThree256: sts.bytes(), + } +}) + +/** + * Identity pallet declaration. + */ +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: MultiAddress +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: MultiAddress + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: number +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: MultiAddress +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: MultiAddress + judgement: Judgement +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: MultiAddress +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: MultiAddress + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: MultiAddress +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: BitFlags +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId32, Data][] +} + +export type BitFlags = bigint + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const HrmpCall: sts.Type = sts.closedEnum(() => { + return { + force_clean_hrmp: sts.enumStruct({ + para: Id, + inbound: sts.number(), + outbound: sts.number(), + }), + force_process_hrmp_close: sts.enumStruct({ + channels: sts.number(), + }), + force_process_hrmp_open: sts.enumStruct({ + channels: sts.number(), + }), + hrmp_accept_open_channel: sts.enumStruct({ + sender: Id, + }), + hrmp_cancel_open_request: sts.enumStruct({ + channelId: HrmpChannelId, + openRequests: sts.number(), + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: Id, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: Id, + recipient: Id, + } +}) + +export interface HrmpChannelId { + sender: Id + recipient: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type HrmpCall = HrmpCall_force_clean_hrmp | HrmpCall_force_process_hrmp_close | HrmpCall_force_process_hrmp_open | HrmpCall_hrmp_accept_open_channel | HrmpCall_hrmp_cancel_open_request | HrmpCall_hrmp_close_channel | HrmpCall_hrmp_init_open_channel + +/** + * This extrinsic triggers the cleanup of all the HRMP storage items that + * a para may have. Normally this happens once per session, but this allows + * you to trigger the cleanup immediately for a specific parachain. + * + * Origin must be Root. + * + * Number of inbound and outbound channels for `para` must be provided as witness data of weighing. + */ +export interface HrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: Id + inbound: number + outbound: number +} + +/** + * Force process HRMP close channel requests. + * + * If there are pending HRMP close channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of closing channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' + channels: number +} + +/** + * Force process HRMP open channel requests. + * + * If there are pending HRMP open channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of opening channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' + channels: number +} + +/** + * Accept a pending open channel request from the given sender. + * + * The channel will be opened only on the next session boundary. + */ +export interface HrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: Id +} + +/** + * This cancels a pending open channel request. It can be canceled by either of the sender + * or the recipient for that request. The origin must be either of those. + * + * The cancellation happens immediately. It is not possible to cancel the request if it is + * already accepted. + * + * Total number of open requests (i.e. `HrmpOpenChannelRequestsList`) must be provided as + * witness data. + */ +export interface HrmpCall_hrmp_cancel_open_request { + __kind: 'hrmp_cancel_open_request' + channelId: HrmpChannelId + openRequests: number +} + +/** + * Initiate unilateral closing of a channel. The origin must be either the sender or the + * recipient in the channel being closed. + * + * The closure can only happen on a session change. + */ +export interface HrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * Initiate opening a channel from a parachain to a given recipient with given channel + * parameters. + * + * - `proposed_max_capacity` - specifies how many messages can be in the channel at once. + * - `proposed_max_message_size` - specifies the maximum size of the messages. + * + * These numbers are a subject to the relay-chain configuration limits. + * + * The channel can be opened only after the recipient confirms it and only on a session + * change. + */ +export interface HrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: Id + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: sts.number(), + bestFinalizedBlockNumber: sts.number(), + }), + report_equivocation: sts.enumStruct({ + equivocationProof: Type_276, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_276, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: sts.number(), + trieNodes: sts.array(() => sts.bytes()), + validatorCount: sts.number(), + } +}) + +export interface MembershipProof { + session: number + trieNodes: Bytes[] + validatorCount: number +} + +export const Type_276: sts.Type = sts.struct(() => { + return { + setId: sts.bigint(), + equivocation: Equivocation, + } +}) + +export const Equivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: Type_283, + Prevote: Type_278, + } +}) + +export const Type_278: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Prevote, sts.bytes()]), + second: sts.tuple(() => [Prevote, sts.bytes()]), + } +}) + +export const Prevote: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Prevote { + targetHash: H256 + targetNumber: number +} + +export interface Type_278 { + roundNumber: bigint + identity: Public + first: [Prevote, Bytes] + second: [Prevote, Bytes] +} + +export const Type_283: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Precommit, sts.bytes()]), + second: sts.tuple(() => [Precommit, sts.bytes()]), + } +}) + +export const Precommit: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Precommit { + targetHash: H256 + targetNumber: number +} + +export interface Type_283 { + roundNumber: bigint + identity: Public + first: [Precommit, Bytes] + second: [Precommit, Bytes] +} + +export type Equivocation = Equivocation_Precommit | Equivocation_Prevote + +export interface Equivocation_Precommit { + __kind: 'Precommit' + value: Type_283 +} + +export interface Equivocation_Prevote { + __kind: 'Prevote' + value: Type_278 +} + +export interface Type_276 { + setId: bigint + equivocation: Equivocation +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has stalled. + * + * This will trigger a forced authority set change at the beginning of the next session, to + * be enacted `delay` blocks after that. The `delay` should be high enough to safely assume + * that the block signalling the forced change will not be re-orged e.g. 1000 blocks. + * The block production rate (which may be slowed down because of finality lagging) should + * be taken into account when choosing the `delay`. The GRANDPA voters based on the new + * authority will start voting on top of `best_finalized_block_number` for new finalized + * blocks. `best_finalized_block_number` should be the highest of the latest finalized + * block of all validators of the new authority set. + * + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: number + bestFinalizedBlockNumber: number +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_276 + keyOwnerProof: MembershipProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_276 + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GiltCall: sts.Type = sts.closedEnum(() => { + return { + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + set_target: sts.enumStruct({ + target: sts.bigint(), + }), + thaw: sts.enumStruct({ + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GiltCall = GiltCall_place_bid | GiltCall_retract_bid | GiltCall_set_target | GiltCall_thaw + +/** + * Place a bid for a gilt to be issued. + * + * Origin must be Signed, and account must have at least `amount` in free balance. + * + * - `amount`: The amount of the bid; these funds will be reserved. If the bid is + * successfully elevated into an issued gilt, then these funds will continue to be + * reserved until the gilt expires. Must be at least `MinFreeze`. + * - `duration`: The number of periods for which the funds will be locked if the gilt is + * issued. It will expire only after this period has elapsed after the point of issuance. + * Must be greater than 1 and no more than `QueueCount`. + * + * Complexities: + * - `Queues[duration].len()` (just take max). + */ +export interface GiltCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * Retract a previously placed bid. + * + * Origin must be Signed, and the account should have previously issued a still-active bid + * of `amount` for `duration`. + * + * - `amount`: The amount of the previous bid. + * - `duration`: The duration of the previous bid. + */ +export interface GiltCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * Set target proportion of gilt-funds. + * + * Origin must be `AdminOrigin`. + * + * - `target`: The target proportion of effective issued funds that should be under gilts + * at any one time. + */ +export interface GiltCall_set_target { + __kind: 'set_target' + target: bigint +} + +/** + * Remove an active but expired gilt. Reserved funds under gilt are freed and balance is + * adjusted to ensure that the funds grow or shrink to maintain the equivalent proportion + * of effective total issued funds. + * + * Origin must be Signed and the account must be the owner of the gilt of the given index. + * + * - `index`: The index of the gilt to be thawed. + */ +export interface GiltCall_thaw { + __kind: 'thaw' + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + governance_fallback: sts.enumStruct({ + maybeMaxVoters: sts.option(() => sts.number()), + maybeMaxTargets: sts.option(() => sts.number()), + }), + set_emergency_election_result: sts.enumStruct({ + supports: sts.array(() => sts.tuple(() => [AccountId32, Support])), + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => ElectionScore), + }), + submit: sts.enumStruct({ + rawSolution: RawSolution, + }), + submit_unsigned: sts.enumStruct({ + rawSolution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export const RawSolution: sts.Type = sts.struct(() => { + return { + solution: NposCompactSolution24, + score: ElectionScore, + round: sts.number(), + } +}) + +export const NposCompactSolution24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), + votes2: sts.array(() => sts.tuple(() => [sts.number(), sts.tuple(() => [sts.number(), sts.number()]), sts.number()])), + votes3: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes4: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes5: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes6: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes7: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes8: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes9: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes10: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes11: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes12: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes13: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes14: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes15: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes16: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes17: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes18: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes19: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes20: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes21: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes22: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes23: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes24: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + } +}) + +export interface NposCompactSolution24 { + votes1: [number, number][] + votes2: [number, [number, number], number][] + votes3: [number, [number, number][], number][] + votes4: [number, [number, number][], number][] + votes5: [number, [number, number][], number][] + votes6: [number, [number, number][], number][] + votes7: [number, [number, number][], number][] + votes8: [number, [number, number][], number][] + votes9: [number, [number, number][], number][] + votes10: [number, [number, number][], number][] + votes11: [number, [number, number][], number][] + votes12: [number, [number, number][], number][] + votes13: [number, [number, number][], number][] + votes14: [number, [number, number][], number][] + votes15: [number, [number, number][], number][] + votes16: [number, [number, number][], number][] + votes17: [number, [number, number][], number][] + votes18: [number, [number, number][], number][] + votes19: [number, [number, number][], number][] + votes20: [number, [number, number][], number][] + votes21: [number, [number, number][], number][] + votes22: [number, [number, number][], number][] + votes23: [number, [number, number][], number][] + votes24: [number, [number, number][], number][] +} + +export interface RawSolution { + solution: NposCompactSolution24 + score: ElectionScore + round: number +} + +export interface ElectionScore { + minimalStake: bigint + sumStake: bigint + sumStakeSquared: bigint +} + +export const ElectionScore: sts.Type = sts.struct(() => { + return { + minimalStake: sts.bigint(), + sumStake: sts.bigint(), + sumStakeSquared: sts.bigint(), + } +}) + +export const Support: sts.Type = sts.struct(() => { + return { + total: sts.bigint(), + voters: sts.array(() => sts.tuple(() => [AccountId32, sts.bigint()])), + } +}) + +export interface Support { + total: bigint + voters: [AccountId32, bigint][] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_governance_fallback | ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * Trigger the governance fallback. + * + * This can only be called when [`Phase::Emergency`] is enabled, as an alternative to + * calling [`Call::set_emergency_election_result`]. + */ +export interface ElectionProviderMultiPhaseCall_governance_fallback { + __kind: 'governance_fallback' + maybeMaxVoters?: (number | undefined) + maybeMaxTargets?: (number | undefined) +} + +/** + * Set a solution in the queue, to be handed out to the client of this pallet in the next + * call to `ElectionProvider::elect`. + * + * This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`. + * + * The solution is not checked for any feasibility and is assumed to be trustworthy, as any + * feasibility check itself can in principle cause the election process to fail (due to + * memory/weight constrains). + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + supports: [AccountId32, Support][] +} + +/** + * Set a new value for `MinimumUntrustedScore`. + * + * Dispatch origin must be aligned with `T::ForceOrigin`. + * + * This check can be turned off by setting the value to `None`. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (ElectionScore | undefined) +} + +/** + * Submit a solution for the signed phase. + * + * The dispatch origin fo this call must be __signed__. + * + * The solution is potentially queued, based on the claimed score and processed at the end + * of the signed phase. + * + * A deposit is reserved and recorded for the solution. Based on the outcome, the solution + * might be rewarded, slashed, or get all or a part of the deposit back. + */ +export interface ElectionProviderMultiPhaseCall_submit { + __kind: 'submit' + rawSolution: RawSolution +} + +/** + * Submit a solution for the unsigned phase. + * + * The dispatch origin fo this call must be __none__. + * + * This submission is checked on the fly. Moreover, this unsigned solution is only + * validated when submitted to the pool from the **local** node. Effectively, this means + * that only active validators can submit this transaction when authoring a block (similar + * to an inherent). + * + * To prevent any incorrect solution (and thus wasted time/weight), this transaction will + * panic if the solution submitted by the validator is invalid in any way, effectively + * putting their authoring reward at risk. + * + * No deposit or reward is associated with this submission. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + rawSolution: RawSolution + witness: SolutionOrSnapshotSize +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DmpCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + blacklist: sts.enumStruct({ + proposalHash: H256, + maybeRefIndex: sts.option(() => sts.number()), + }), + cancel_proposal: sts.enumStruct({ + propIndex: sts.number(), + }), + cancel_queued: sts.enumStruct({ + which: sts.number(), + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: MultiAddress, + conviction: Conviction, + balance: sts.bigint(), + }), + emergency_cancel: sts.enumStruct({ + refIndex: sts.number(), + }), + enact_proposal: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + }), + external_propose: sts.enumStruct({ + proposalHash: H256, + }), + external_propose_default: sts.enumStruct({ + proposalHash: H256, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: H256, + }), + fast_track: sts.enumStruct({ + proposalHash: H256, + votingPeriod: sts.number(), + delay: sts.number(), + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: H256, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: H256, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: MultiAddress, + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + index: sts.number(), + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: MultiAddress, + }), + veto_external: sts.enumStruct({ + proposalHash: H256, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface AccountVote_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DemocracyCall = DemocracyCall_blacklist | DemocracyCall_cancel_proposal | DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. + * + * If called on a queued public or external proposal, then this will result in it being + * removed. If the `ref_index` supplied is an active referendum with the proposal hash, + * then it will be cancelled. + * + * The dispatch origin of this call must be `BlacklistOrigin`. + * + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. + * + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). + */ +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: H256 + maybeRefIndex?: (number | undefined) +} + +/** + * Remove a proposal. + * + * The dispatch origin of this call must be `CancelProposalOrigin`. + * + * - `prop_index`: The index of the proposal to cancel. + * + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number +} + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: number +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must not + * be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: MultiAddress + conviction: Conviction + balance: bigint +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: number +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: H256 + index: number +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Weight: `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: H256 +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: H256 +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: H256 +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. + * Must be always greater than zero. + * For `FastTrackOrigin` must be equal or greater than `FastTrackVotingPeriod`. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: H256 + votingPeriod: number + delay: number +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. When this call is successful, i.e. + * the preimage has not been uploaded before and matches some imminent proposal, + * no fee is paid. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * Weight: `O(p)` + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: H256 + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. Extrinsic is + * weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * Weight: `O(D)` where D is length of proposal. + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: H256 + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: MultiAddress + index: number +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: number +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * Weight: `O(S)` where S is the number of seconds a proposal already has. + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: MultiAddress +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * Weight: `O(V + log(V))` where V is number of `existing vetoers` + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: H256 +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of referendums the voter has voted on. + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: Id, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + contribute_all: sts.enumStruct({ + index: sts.number(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: Id, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId32, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: Signature, + } +}) + +export const Signature = sts.bytes() + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Signature +} + +export type Signature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_contribute_all | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * Add an optional memo to an existing crowdloan contribution. + * + * Origin must be Signed, and the user must have contributed to the crowdloan. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: Id + memo: Bytes +} + +/** + * Contribute to a crowd sale. This will transfer some balance over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * Contribute your entire balance to a crowd sale. This will transfer the entire balance of a user over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute_all { + __kind: 'contribute_all' + index: number + signature?: (MultiSignature | undefined) +} + +/** + * Create a new crowdloaning campaign for a parachain slot with the given lease period range. + * + * This applies a lock to your parachain configuration, ensuring that it cannot be changed + * by the parachain manager. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Remove a fund after the retirement period has ended and all funds have been returned. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * Edit the configuration for an in-progress crowdloan. + * + * Can only be called by Root origin. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Poke the fund into `NewRaise` + * + * Origin must be Signed, and the fund has non-zero raise. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: Id +} + +/** + * Automatically refund contributors of an ended crowdloan. + * Due to weight restrictions, this function may need to be called multiple + * times to fully refund all users. We will refund `RemoveKeysLimit` users at a time. + * + * Origin must be signed, but can come from anyone. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * Withdraw full balance of a specific contributor. + * + * Origin must be signed, but can come from anyone. + * + * The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement + * flag must be set. For a fund to be ready for retirement, then: + * - it must not already be in retirement; + * - the amount of raised funds must be bigger than the _free_ balance of the account; + * - and either: + * - the block number must be at least `end`; or + * - the current lease period must be greater than the fund's `last_period`. + * + * In this case, the fund's retirement flag is set and its `end` is reset to the current block + * number. + * + * - `who`: The account whose contribution should be withdrawn. + * - `index`: The parachain to whose crowdloan the contribution was made. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_bypass_consistency_check: sts.enumStruct({ + new: sts.boolean(), + }), + set_chain_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_code_retention_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_conclusion_by_time_out_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_max_spam_slots: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: sts.number(), + }), + set_group_rotation_frequency: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_minimum_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_cores: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_retries: sts.enumStruct({ + new: sts.number(), + }), + set_pvf_checking_enabled: sts.enumStruct({ + new: sts.boolean(), + }), + set_pvf_voting_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_thread_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_ump_max_individual_weight: sts.enumStruct({ + new: Weight, + }), + set_ump_service_total_weight: sts.enumStruct({ + new: Weight, + }), + set_validation_upgrade_cooldown: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ConfigurationCall = ConfigurationCall_set_bypass_consistency_check | ConfigurationCall_set_chain_availability_period | ConfigurationCall_set_code_retention_period | ConfigurationCall_set_dispute_conclusion_by_time_out_period | ConfigurationCall_set_dispute_max_spam_slots | ConfigurationCall_set_dispute_period | ConfigurationCall_set_dispute_post_conclusion_acceptance_period | ConfigurationCall_set_group_rotation_frequency | ConfigurationCall_set_hrmp_channel_max_capacity | ConfigurationCall_set_hrmp_channel_max_message_size | ConfigurationCall_set_hrmp_channel_max_total_size | ConfigurationCall_set_hrmp_max_message_num_per_candidate | ConfigurationCall_set_hrmp_max_parachain_inbound_channels | ConfigurationCall_set_hrmp_max_parachain_outbound_channels | ConfigurationCall_set_hrmp_max_parathread_inbound_channels | ConfigurationCall_set_hrmp_max_parathread_outbound_channels | ConfigurationCall_set_hrmp_open_request_ttl | ConfigurationCall_set_hrmp_recipient_deposit | ConfigurationCall_set_hrmp_sender_deposit | ConfigurationCall_set_max_code_size | ConfigurationCall_set_max_downward_message_size | ConfigurationCall_set_max_head_data_size | ConfigurationCall_set_max_pov_size | ConfigurationCall_set_max_upward_message_num_per_candidate | ConfigurationCall_set_max_upward_message_size | ConfigurationCall_set_max_upward_queue_count | ConfigurationCall_set_max_upward_queue_size | ConfigurationCall_set_max_validators | ConfigurationCall_set_max_validators_per_core | ConfigurationCall_set_minimum_validation_upgrade_delay | ConfigurationCall_set_n_delay_tranches | ConfigurationCall_set_needed_approvals | ConfigurationCall_set_no_show_slots | ConfigurationCall_set_parathread_cores | ConfigurationCall_set_parathread_retries | ConfigurationCall_set_pvf_checking_enabled | ConfigurationCall_set_pvf_voting_ttl | ConfigurationCall_set_relay_vrf_modulo_samples | ConfigurationCall_set_scheduling_lookahead | ConfigurationCall_set_thread_availability_period | ConfigurationCall_set_ump_max_individual_weight | ConfigurationCall_set_ump_service_total_weight | ConfigurationCall_set_validation_upgrade_cooldown | ConfigurationCall_set_validation_upgrade_delay | ConfigurationCall_set_zeroth_delay_tranche_width + +/** + * Setting this to true will disable consistency checks for the configuration setters. + * Use with caution. + */ +export interface ConfigurationCall_set_bypass_consistency_check { + __kind: 'set_bypass_consistency_check' + new: boolean +} + +/** + * Set the availability period for parachains. + */ +export interface ConfigurationCall_set_chain_availability_period { + __kind: 'set_chain_availability_period' + new: number +} + +/** + * Set the acceptance period for an included candidate. + */ +export interface ConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: number +} + +/** + * Set the dispute conclusion by time out period. + */ +export interface ConfigurationCall_set_dispute_conclusion_by_time_out_period { + __kind: 'set_dispute_conclusion_by_time_out_period' + new: number +} + +/** + * Set the maximum number of dispute spam slots. + */ +export interface ConfigurationCall_set_dispute_max_spam_slots { + __kind: 'set_dispute_max_spam_slots' + new: number +} + +/** + * Set the dispute period, in number of sessions to keep for disputes. + */ +export interface ConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: number +} + +/** + * Set the dispute post conclusion acceptance period. + */ +export interface ConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: number +} + +/** + * Set the parachain validator-group rotation frequency + */ +export interface ConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: number +} + +/** + * Sets the maximum number of messages allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * Sets the maximum size of a message that could ever be put into an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * Sets the maximum total size of messages in bytes allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * Sets the maximum number of outbound HRMP messages can be sent by a candidate. + */ +export interface ConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parachain is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parachain is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parathread is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_inbound_channels { + __kind: 'set_hrmp_max_parathread_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parathread is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_outbound_channels { + __kind: 'set_hrmp_max_parathread_outbound_channels' + new: number +} + +/** + * Sets the number of sessions after which an HRMP open channel request expires. + */ +export interface ConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * Sets the amount of funds that the recipient should provide for accepting opening an HRMP + * channel. + */ +export interface ConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: bigint +} + +/** + * Sets the amount of funds that the sender should provide for opening an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: bigint +} + +/** + * Set the max validation code size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * Set the critical downward message size. + */ +export interface ConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * Set the max head data size for paras. + */ +export interface ConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * Set the max POV block size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * Sets the maximum number of messages that a candidate can contain. + */ +export interface ConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum size of an upward message that can be sent by a candidate. + */ +export interface ConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * Sets the maximum items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * Sets the maximum total size of items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * Set the maximum number of validators to use in parachain consensus. + */ +export interface ConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * Set the maximum number of validators to assign to any core. + */ +export interface ConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * Sets the minimum delay between announcing the upgrade block for a parachain until the + * upgrade taking place. + * + * See the field documentation for information and constraints for the new value. + */ +export interface ConfigurationCall_set_minimum_validation_upgrade_delay { + __kind: 'set_minimum_validation_upgrade_delay' + new: number +} + +/** + * Set the total number of delay tranches. + */ +export interface ConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * Set the number of validators needed to approve a block. + */ +export interface ConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * Set the no show slots, in number of number of consensus slots. + * Must be at least 1. + */ +export interface ConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * Set the number of parathread execution cores. + */ +export interface ConfigurationCall_set_parathread_cores { + __kind: 'set_parathread_cores' + new: number +} + +/** + * Set the number of retries for a particular parathread. + */ +export interface ConfigurationCall_set_parathread_retries { + __kind: 'set_parathread_retries' + new: number +} + +/** + * Enable or disable PVF pre-checking. Consult the field documentation prior executing. + */ +export interface ConfigurationCall_set_pvf_checking_enabled { + __kind: 'set_pvf_checking_enabled' + new: boolean +} + +/** + * Set the number of session changes after which a PVF pre-checking voting is rejected. + */ +export interface ConfigurationCall_set_pvf_voting_ttl { + __kind: 'set_pvf_voting_ttl' + new: number +} + +/** + * Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion. + */ +export interface ConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * Set the scheduling lookahead, in expected number of blocks at peak throughput. + */ +export interface ConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * Set the availability period for parathreads. + */ +export interface ConfigurationCall_set_thread_availability_period { + __kind: 'set_thread_availability_period' + new: number +} + +/** + * Sets the maximum amount of weight any individual upward message may consume. + */ +export interface ConfigurationCall_set_ump_max_individual_weight { + __kind: 'set_ump_max_individual_weight' + new: Weight +} + +/** + * Sets the soft limit for the phase of dispatching dispatchable upward messages. + */ +export interface ConfigurationCall_set_ump_service_total_weight { + __kind: 'set_ump_service_total_weight' + new: Weight +} + +/** + * Set the validation upgrade cooldown. + */ +export interface ConfigurationCall_set_validation_upgrade_cooldown { + __kind: 'set_validation_upgrade_cooldown' + new: number +} + +/** + * Set the validation upgrade delay. + */ +export interface ConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: number +} + +/** + * Set the zeroth delay tranche width. + */ +export interface ConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: sts.bigint(), + vestingSchedule: sts.option(() => sts.tuple(() => [sts.bigint(), sts.bigint(), sts.number()])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId32), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId32 + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId32 + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: bigint + vestingSchedule?: ([bigint, bigint, number] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId32 | undefined) +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ChildBountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + add_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + value: sts.bigint(), + description: sts.bytes(), + }), + award_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + close_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + propose_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ChildBountiesCall = ChildBountiesCall_accept_curator | ChildBountiesCall_add_child_bounty | ChildBountiesCall_award_child_bounty | ChildBountiesCall_claim_child_bounty | ChildBountiesCall_close_child_bounty | ChildBountiesCall_propose_curator | ChildBountiesCall_unassign_curator + +/** + * Accept the curator role for the child-bounty. + * + * The dispatch origin for this call must be the curator of this + * child-bounty. + * + * A deposit will be reserved from the curator and refund upon + * successful payout or cancellation. + * + * Fee for curator is deducted from curator fee of parent bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in "CuratorProposed" state, for processing the + * call. And state of child-bounty is moved to "Active" on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_accept_curator { + __kind: 'accept_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Add a new child-bounty. + * + * The dispatch origin for this call must be the curator of parent + * bounty and the parent bounty must be in "active" state. + * + * Child-bounty gets added successfully & fund gets transferred from + * parent bounty to child-bounty account, if parent bounty has enough + * funds, else the call fails. + * + * Upper bound to maximum number of active child bounties that can be + * added are managed via runtime trait config + * [`Config::MaxActiveChildBountyCount`]. + * + * If the call is success, the status of child-bounty is updated to + * "Added". + * + * - `parent_bounty_id`: Index of parent bounty for which child-bounty is being added. + * - `value`: Value for executing the proposal. + * - `description`: Text description for the child-bounty. + */ +export interface ChildBountiesCall_add_child_bounty { + __kind: 'add_child_bounty' + parentBountyId: number + value: bigint + description: Bytes +} + +/** + * Award child-bounty to a beneficiary. + * + * The beneficiary will be able to claim the funds after a delay. + * + * The dispatch origin for this call must be the parent curator or + * curator of this child-bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in active state, for processing the call. And + * state of child-bounty is moved to "PendingPayout" on successful call + * completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + * - `beneficiary`: Beneficiary account. + */ +export interface ChildBountiesCall_award_child_bounty { + __kind: 'award_child_bounty' + parentBountyId: number + childBountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded child-bounty after payout delay. + * + * The dispatch origin for this call may be any signed origin. + * + * Call works independent of parent bounty state, No need for parent + * bounty to be in active state. + * + * The Beneficiary is paid out with agreed bounty value. Curator fee is + * paid & curator deposit is unreserved. + * + * Child-bounty must be in "PendingPayout" state, for processing the + * call. And instance of child-bounty is removed from the state on + * successful call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_claim_child_bounty { + __kind: 'claim_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * Cancel a proposed or active child-bounty. Child-bounty account funds + * are transferred to parent bounty account. The child-bounty curator + * deposit may be unreserved if possible. + * + * The dispatch origin for this call must be either parent curator or + * `T::RejectOrigin`. + * + * If the state of child-bounty is `Active`, curator deposit is + * unreserved. + * + * If the state of child-bounty is `PendingPayout`, call fails & + * returns `PendingPayout` error. + * + * For the origin other than T::RejectOrigin, parent bounty must be in + * active state, for this child-bounty call to work. For origin + * T::RejectOrigin execution is forced. + * + * Instance of child-bounty is removed from the state on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_close_child_bounty { + __kind: 'close_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * Propose curator for funded child-bounty. + * + * The dispatch origin for this call must be curator of parent bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in "Added" state, for processing the call. And + * state of child-bounty is moved to "CuratorProposed" on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + * - `curator`: Address of child-bounty curator. + * - `fee`: payment fee to child-bounty curator for execution. + */ +export interface ChildBountiesCall_propose_curator { + __kind: 'propose_curator' + parentBountyId: number + childBountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a child-bounty. + * + * The dispatch origin for this call can be either `RejectOrigin`, or + * the curator of the parent bounty, or any signed origin. + * + * For the origin other than T::RejectOrigin and the child-bounty + * curator, parent bounty must be in active state, for this call to + * work. We allow child-bounty curator and T::RejectOrigin to execute + * this call irrespective of the parent bounty state. + * + * If this function is called by the `RejectOrigin` or the + * parent bounty curator, we assume that the child-bounty curator is + * malicious or inactive. As a result, child-bounty curator deposit is + * slashed. + * + * If the origin is the child-bounty curator, we take this as a sign + * that they are unable to do their job, and are willingly giving up. + * We could slash the deposit, but for now we allow them to unreserve + * their deposit and exit without issue. (We may want to change this if + * it is abused.) + * + * Finally, the origin can be anyone iff the child-bounty curator is + * "inactive". Expiry update due of parent bounty is used to estimate + * inactive state of child-bounty curator. + * + * This allows anyone in the community to call out that a child-bounty + * curator is not doing their due diligence, and we should pick a new + * one. In this case the child-bounty curator deposit is slashed. + * + * State of child-bounty is moved to Added state on successful call + * completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_unassign_curator { + __kind: 'unassign_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds + * after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is + * malicious or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_force_unreserve | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_all | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is not + * assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * Unreserve some balance from a user by force. + * + * Can only be called by ROOT. + */ +export interface BalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also alter the total issuance of the system (`TotalIssuance`) appropriately. + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: MultiAddress + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for input config + * types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex + * computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional check + * that the transfer will not kill the origin account. + * --------------------------------- + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: MultiAddress + value: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). # + * - O(1). Just like transfer, but reading the user's transferable balance first. + * # + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const EquivocationProof: sts.Type = sts.struct(() => { + return { + offender: sts.bytes(), + slot: Slot, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Slot = sts.bigint() + +export interface EquivocationProof { + offender: Bytes + slot: Slot + firstHeader: Header + secondHeader: Header +} + +export type Slot = bigint + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V1: sts.enumStruct({ + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + }), + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type NextConfigDescriptor = NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Plan an epoch config change. The epoch config change is recorded and will be enacted on + * the next call to `enact_epoch_change`. The config will be activated one epoch after. + * Multiple calls to this method will replace any existing planned config change that had + * not been enacted yet. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Cancel an in-progress auction. + * + * Can only be called by Root origin. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +export type Call = Call_Auctions | Call_Authorship | Call_Babe | Call_Balances | Call_Bounties | Call_ChildBounties | Call_Claims | Call_Configuration | Call_Council | Call_Crowdloan | Call_Democracy | Call_Dmp | Call_ElectionProviderMultiPhase | Call_Gilt | Call_Grandpa | Call_Hrmp | Call_Identity | Call_ImOnline | Call_Indices | Call_Initializer | Call_Multisig | Call_NominationPools | Call_ParaInclusion | Call_ParaInherent | Call_Paras | Call_ParasDisputes | Call_ParasShared | Call_PhragmenElection | Call_Preimage | Call_Proxy | Call_Recovery | Call_Registrar | Call_Scheduler | Call_Session | Call_Slots | Call_Society | Call_Staking | Call_System | Call_TechnicalCommittee | Call_TechnicalMembership | Call_Timestamp | Call_Tips | Call_Treasury | Call_Ump | Call_Utility | Call_Vesting | Call_VoterList | Call_XcmPallet + +export interface Call_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Call_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Call_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Call_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Call_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Call_ChildBounties { + __kind: 'ChildBounties' + value: ChildBountiesCall +} + +export interface Call_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Call_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Call_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Call_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Call_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Call_Dmp { + __kind: 'Dmp' + value: DmpCall +} + +export interface Call_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Call_Gilt { + __kind: 'Gilt' + value: GiltCall +} + +export interface Call_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Call_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Call_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Call_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Call_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Call_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Call_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Call_NominationPools { + __kind: 'NominationPools' + value: NominationPoolsCall +} + +export interface Call_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Call_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Call_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Call_ParasDisputes { + __kind: 'ParasDisputes' + value: ParasDisputesCall +} + +export interface Call_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Call_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Call_Preimage { + __kind: 'Preimage' + value: PreimageCall +} + +export interface Call_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Call_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Call_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Call_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Call_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Call_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Call_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Call_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Call_System { + __kind: 'System' + value: SystemCall +} + +export interface Call_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Call_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Call_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Call_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Call_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Call_Ump { + __kind: 'Ump' + value: UmpCall +} + +export interface Call_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Call_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Call_VoterList { + __kind: 'VoterList' + value: VoterListCall +} + +export interface Call_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Society: sts.unit(), + Staking: sts.unit(), + } +}) + +export const MultiAddress: sts.Type = sts.closedEnum(() => { + return { + Address20: sts.bytes(), + Address32: sts.bytes(), + Id: AccountId32, + Index: sts.unit(), + Raw: sts.bytes(), + } +}) diff --git a/squid/src/types/v9300.ts b/squid/src/types/v9300.ts new file mode 100644 index 00000000..f12b8fcd --- /dev/null +++ b/squid/src/types/v9300.ts @@ -0,0 +1,12183 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Call: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + ChildBounties: ChildBountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + Dmp: DmpCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + FastUnstake: FastUnstakeCall, + Gilt: GiltCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Initializer: InitializerCall, + Multisig: MultisigCall, + NominationPools: NominationPoolsCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Paras: ParasCall, + ParasDisputes: ParasDisputesCall, + ParasShared: ParasSharedCall, + PhragmenElection: PhragmenElectionCall, + Preimage: PreimageCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Ump: UmpCall, + Utility: UtilityCall, + Vesting: VestingCall, + VoterList: VoterListCall, + XcmPallet: XcmPalletCall, + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + execute: sts.enumStruct({ + message: Type_556, + maxWeight: Weight, + }), + force_default_xcm_version: sts.enumStruct({ + maybeXcmVersion: sts.option(() => sts.number()), + }), + force_subscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_unsubscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_xcm_version: sts.enumStruct({ + location: V1MultiLocation, + xcmVersion: sts.number(), + }), + limited_reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + limited_teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + send: sts.enumStruct({ + dest: VersionedMultiLocation, + message: VersionedXcm, + }), + teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + } +}) + +export const VersionedXcm: sts.Type = sts.closedEnum(() => { + return { + V0: V0Xcm, + V1: V1Xcm, + V2: sts.array(() => V2Instruction), + } +}) + +export const V2Instruction: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => V2Instruction), + SetErrorHandler: sts.array(() => V2Instruction), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const DoubleEncoded: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncoded { + encoded: Bytes +} + +export const V0OriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type V0OriginKind = V0OriginKind_Native | V0OriginKind_SovereignAccount | V0OriginKind_Superuser | V0OriginKind_Xcm + +export interface V0OriginKind_Native { + __kind: 'Native' +} + +export interface V0OriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface V0OriginKind_Superuser { + __kind: 'Superuser' +} + +export interface V0OriginKind_Xcm { + __kind: 'Xcm' +} + +export const V2Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V2Error])), + Null: sts.unit(), + Version: sts.number(), + } +}) + +export const V2Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + MaxWeightInvalid: sts.unit(), + MultiLocationFull: sts.unit(), + MultiLocationNotInvertible: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + WeightLimitReached: sts.bigint(), + WeightNotComputable: sts.unit(), + } +}) + +export type V2Error = V2Error_AssetNotFound | V2Error_BadOrigin | V2Error_Barrier | V2Error_DestinationUnsupported | V2Error_ExceedsMaxMessageSize | V2Error_FailedToDecode | V2Error_FailedToTransactAsset | V2Error_InvalidLocation | V2Error_LocationCannotHold | V2Error_MaxWeightInvalid | V2Error_MultiLocationFull | V2Error_MultiLocationNotInvertible | V2Error_NotHoldingFees | V2Error_NotWithdrawable | V2Error_Overflow | V2Error_TooExpensive | V2Error_Transport | V2Error_Trap | V2Error_UnhandledXcmVersion | V2Error_Unimplemented | V2Error_UnknownClaim | V2Error_Unroutable | V2Error_UntrustedReserveLocation | V2Error_UntrustedTeleportLocation | V2Error_WeightLimitReached | V2Error_WeightNotComputable + +export interface V2Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V2Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V2Error_Barrier { + __kind: 'Barrier' +} + +export interface V2Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V2Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V2Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V2Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V2Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V2Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V2Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V2Error_MultiLocationFull { + __kind: 'MultiLocationFull' +} + +export interface V2Error_MultiLocationNotInvertible { + __kind: 'MultiLocationNotInvertible' +} + +export interface V2Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V2Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V2Error_Overflow { + __kind: 'Overflow' +} + +export interface V2Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V2Error_Transport { + __kind: 'Transport' +} + +export interface V2Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V2Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V2Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V2Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V2Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V2Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V2Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: bigint +} + +export interface V2Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V2Response = V2Response_Assets | V2Response_ExecutionResult | V2Response_Null | V2Response_Version + +export interface V2Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V2Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V2Error] | undefined) +} + +export interface V2Response_Null { + __kind: 'Null' +} + +export interface V2Response_Version { + __kind: 'Version' + value: number +} + +export interface V1MultiAsset { + id: V1AssetId + fun: V1Fungibility +} + +export type V1Fungibility = V1Fungibility_Fungible | V1Fungibility_NonFungible + +export interface V1Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V1Fungibility_NonFungible { + __kind: 'NonFungible' + value: V1AssetInstance +} + +export type V1AssetInstance = V1AssetInstance_Array16 | V1AssetInstance_Array32 | V1AssetInstance_Array4 | V1AssetInstance_Array8 | V1AssetInstance_Blob | V1AssetInstance_Index | V1AssetInstance_Undefined + +export interface V1AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V1AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V1AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V1AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V1AssetInstance_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface V1AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V1AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V1AssetId = V1AssetId_Abstract | V1AssetId_Concrete + +export interface V1AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V1AssetId_Concrete { + __kind: 'Concrete' + value: V1MultiLocation +} + +export interface V1MultiLocation { + parents: number + interior: V1Junctions +} + +export type V1Junctions = V1Junctions_Here | V1Junctions_X1 | V1Junctions_X2 | V1Junctions_X3 | V1Junctions_X4 | V1Junctions_X5 | V1Junctions_X6 | V1Junctions_X7 | V1Junctions_X8 + +export interface V1Junctions_Here { + __kind: 'Here' +} + +export interface V1Junctions_X1 { + __kind: 'X1' + value: V1Junction +} + +export interface V1Junctions_X2 { + __kind: 'X2' + value: [V1Junction, V1Junction] +} + +export interface V1Junctions_X3 { + __kind: 'X3' + value: [V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X4 { + __kind: 'X4' + value: [V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X5 { + __kind: 'X5' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X6 { + __kind: 'X6' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X7 { + __kind: 'X7' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X8 { + __kind: 'X8' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export type V1Junction = V1Junction_AccountId32 | V1Junction_AccountIndex64 | V1Junction_AccountKey20 | V1Junction_GeneralIndex | V1Junction_GeneralKey | V1Junction_OnlyChild | V1Junction_PalletInstance | V1Junction_Parachain | V1Junction_Plurality + +export interface V1Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V1Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V1Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V1Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V1Junction_GeneralKey { + __kind: 'GeneralKey' + value: WeakBoundedVec +} + +export interface V1Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V1Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V1Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V1Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0BodyPart = V0BodyPart_AtLeastProportion | V0BodyPart_Fraction | V0BodyPart_Members | V0BodyPart_MoreThanProportion | V0BodyPart_Voice + +export interface V0BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V0BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V0BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Voice { + __kind: 'Voice' +} + +export type V0BodyId = V0BodyId_Executive | V0BodyId_Index | V0BodyId_Judicial | V0BodyId_Legislative | V0BodyId_Named | V0BodyId_Technical | V0BodyId_Unit + +export interface V0BodyId_Executive { + __kind: 'Executive' +} + +export interface V0BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V0BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V0BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V0BodyId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V0BodyId_Technical { + __kind: 'Technical' +} + +export interface V0BodyId_Unit { + __kind: 'Unit' +} + +export type WeakBoundedVec = Bytes + +export type V0NetworkId = V0NetworkId_Any | V0NetworkId_Kusama | V0NetworkId_Named | V0NetworkId_Polkadot + +export interface V0NetworkId_Any { + __kind: 'Any' +} + +export interface V0NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V0NetworkId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V0NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export const V1Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V1Junction, + X2: sts.tuple(() => [V1Junction, V1Junction]), + X3: sts.tuple(() => [V1Junction, V1Junction, V1Junction]), + X4: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction]), + X5: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X6: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X7: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X8: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + } +}) + +export const V1Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: WeakBoundedVec, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export const V0BodyId: sts.Type = sts.closedEnum(() => { + return { + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: WeakBoundedVec, + Technical: sts.unit(), + Unit: sts.unit(), + } +}) + +export const WeakBoundedVec = sts.bytes() + +export const V0NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: WeakBoundedVec, + Polkadot: sts.unit(), + } +}) + +export const V1MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V1MultiAsset), + Wild: V1WildMultiAsset, + } +}) + +export const V1WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllOf: sts.enumStruct({ + id: V1AssetId, + fun: V1WildFungibility, + }), + } +}) + +export const V1WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V1WildFungibility = V1WildFungibility_Fungible | V1WildFungibility_NonFungible + +export interface V1WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V1WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V1AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V1MultiLocation, + } +}) + +export type V1WildMultiAsset = V1WildMultiAsset_All | V1WildMultiAsset_AllOf + +export interface V1WildMultiAsset_All { + __kind: 'All' +} + +export interface V1WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V1AssetId + fun: V1WildFungibility +} + +export type V1MultiAssetFilter = V1MultiAssetFilter_Definite | V1MultiAssetFilter_Wild + +export interface V1MultiAssetFilter_Definite { + __kind: 'Definite' + value: V1MultiAsset[] +} + +export interface V1MultiAssetFilter_Wild { + __kind: 'Wild' + value: V1WildMultiAsset +} + +export const V1MultiAsset: sts.Type = sts.struct(() => { + return { + id: V1AssetId, + fun: V1Fungibility, + } +}) + +export const V1Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V1AssetInstance, + } +}) + +export const V1AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V2Instruction = V2Instruction_BuyExecution | V2Instruction_ClaimAsset | V2Instruction_ClearError | V2Instruction_ClearOrigin | V2Instruction_DepositAsset | V2Instruction_DepositReserveAsset | V2Instruction_DescendOrigin | V2Instruction_ExchangeAsset | V2Instruction_HrmpChannelAccepted | V2Instruction_HrmpChannelClosing | V2Instruction_HrmpNewChannelOpenRequest | V2Instruction_InitiateReserveWithdraw | V2Instruction_InitiateTeleport | V2Instruction_QueryHolding | V2Instruction_QueryResponse | V2Instruction_ReceiveTeleportedAsset | V2Instruction_RefundSurplus | V2Instruction_ReportError | V2Instruction_ReserveAssetDeposited | V2Instruction_SetAppendix | V2Instruction_SetErrorHandler | V2Instruction_SubscribeVersion | V2Instruction_Transact | V2Instruction_TransferAsset | V2Instruction_TransferReserveAsset | V2Instruction_Trap | V2Instruction_UnsubscribeVersion | V2Instruction_WithdrawAsset + +export interface V2Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface V2Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface V2Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V2Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V2Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V2Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface V2Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V2Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V2Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V2Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V2Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface V2Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface V2Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface V2Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V2Instruction_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface V2Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface V2Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V2Instruction[] +} + +export interface V2Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V2Instruction[] +} + +export interface V2Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V2Instruction_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V2Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V2Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V2Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export type V2WeightLimit = V2WeightLimit_Limited | V2WeightLimit_Unlimited + +export interface V2WeightLimit_Limited { + __kind: 'Limited' + value: bigint +} + +export interface V2WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V1Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: V1Xcm, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + } +}) + +export const V1Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => V1Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type V1Order = V1Order_BuyExecution | V1Order_DepositAsset | V1Order_DepositReserveAsset | V1Order_ExchangeAsset | V1Order_InitiateReserveWithdraw | V1Order_InitiateTeleport | V1Order_Noop | V1Order_QueryHolding + +export interface V1Order_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: V1Xcm[] +} + +export interface V1Order_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V1Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V1Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_Noop { + __kind: 'Noop' +} + +export interface V1Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export const V1Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + Version: sts.number(), + } +}) + +export type V1Response = V1Response_Assets | V1Response_Version + +export interface V1Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V1Response_Version { + __kind: 'Version' + value: number +} + +export type V1Xcm = V1Xcm_HrmpChannelAccepted | V1Xcm_HrmpChannelClosing | V1Xcm_HrmpNewChannelOpenRequest | V1Xcm_QueryResponse | V1Xcm_ReceiveTeleportedAsset | V1Xcm_RelayedFrom | V1Xcm_ReserveAssetDeposited | V1Xcm_SubscribeVersion | V1Xcm_Transact | V1Xcm_TransferAsset | V1Xcm_TransferReserveAsset | V1Xcm_UnsubscribeVersion | V1Xcm_WithdrawAsset + +export interface V1Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V1Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V1Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V1Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface V1Xcm_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: V1Xcm +} + +export interface V1Xcm_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V1Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V1Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V1Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Xcm_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V1Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export const V0Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: V0Xcm, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + } +}) + +export const V0Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => V0Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type V0Order = V0Order_BuyExecution | V0Order_DepositAsset | V0Order_DepositReserveAsset | V0Order_ExchangeAsset | V0Order_InitiateReserveWithdraw | V0Order_InitiateTeleport | V0Order_Null | V0Order_QueryHolding + +export interface V0Order_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: V0Xcm[] +} + +export interface V0Order_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface V0Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_Null { + __kind: 'Null' +} + +export interface V0Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type V0MultiLocation = V0MultiLocation_Null | V0MultiLocation_X1 | V0MultiLocation_X2 | V0MultiLocation_X3 | V0MultiLocation_X4 | V0MultiLocation_X5 | V0MultiLocation_X6 | V0MultiLocation_X7 | V0MultiLocation_X8 + +export interface V0MultiLocation_Null { + __kind: 'Null' +} + +export interface V0MultiLocation_X1 { + __kind: 'X1' + value: V0Junction +} + +export interface V0MultiLocation_X2 { + __kind: 'X2' + value: [V0Junction, V0Junction] +} + +export interface V0MultiLocation_X3 { + __kind: 'X3' + value: [V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X4 { + __kind: 'X4' + value: [V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X5 { + __kind: 'X5' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X6 { + __kind: 'X6' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X7 { + __kind: 'X7' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X8 { + __kind: 'X8' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export type V0Junction = V0Junction_AccountId32 | V0Junction_AccountIndex64 | V0Junction_AccountKey20 | V0Junction_GeneralIndex | V0Junction_GeneralKey | V0Junction_OnlyChild | V0Junction_PalletInstance | V0Junction_Parachain | V0Junction_Parent | V0Junction_Plurality + +export interface V0Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V0Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V0Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V0Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V0Junction_GeneralKey { + __kind: 'GeneralKey' + value: WeakBoundedVec +} + +export interface V0Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V0Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V0Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V0Junction_Parent { + __kind: 'Parent' +} + +export interface V0Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0MultiAsset = V0MultiAsset_AbstractFungible | V0MultiAsset_AbstractNonFungible | V0MultiAsset_All | V0MultiAsset_AllAbstractFungible | V0MultiAsset_AllAbstractNonFungible | V0MultiAsset_AllConcreteFungible | V0MultiAsset_AllConcreteNonFungible | V0MultiAsset_AllFungible | V0MultiAsset_AllNonFungible | V0MultiAsset_ConcreteFungible | V0MultiAsset_ConcreteNonFungible | V0MultiAsset_None + +export interface V0MultiAsset_AbstractFungible { + __kind: 'AbstractFungible' + id: Bytes + amount: bigint +} + +export interface V0MultiAsset_AbstractNonFungible { + __kind: 'AbstractNonFungible' + class: Bytes + instance: V1AssetInstance +} + +export interface V0MultiAsset_All { + __kind: 'All' +} + +export interface V0MultiAsset_AllAbstractFungible { + __kind: 'AllAbstractFungible' + id: Bytes +} + +export interface V0MultiAsset_AllAbstractNonFungible { + __kind: 'AllAbstractNonFungible' + class: Bytes +} + +export interface V0MultiAsset_AllConcreteFungible { + __kind: 'AllConcreteFungible' + id: V0MultiLocation +} + +export interface V0MultiAsset_AllConcreteNonFungible { + __kind: 'AllConcreteNonFungible' + class: V0MultiLocation +} + +export interface V0MultiAsset_AllFungible { + __kind: 'AllFungible' +} + +export interface V0MultiAsset_AllNonFungible { + __kind: 'AllNonFungible' +} + +export interface V0MultiAsset_ConcreteFungible { + __kind: 'ConcreteFungible' + id: V0MultiLocation + amount: bigint +} + +export interface V0MultiAsset_ConcreteNonFungible { + __kind: 'ConcreteNonFungible' + class: V0MultiLocation + instance: V1AssetInstance +} + +export interface V0MultiAsset_None { + __kind: 'None' +} + +export const V0MultiAsset: sts.Type = sts.closedEnum(() => { + return { + AbstractFungible: sts.enumStruct({ + id: sts.bytes(), + amount: sts.bigint(), + }), + AbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + instance: V1AssetInstance, + }), + All: sts.unit(), + AllAbstractFungible: sts.enumStruct({ + id: sts.bytes(), + }), + AllAbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + }), + AllConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + }), + AllConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + }), + AllFungible: sts.unit(), + AllNonFungible: sts.unit(), + ConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + amount: sts.bigint(), + }), + ConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + instance: V1AssetInstance, + }), + None: sts.unit(), + } +}) + +export const V0MultiLocation: sts.Type = sts.closedEnum(() => { + return { + Null: sts.unit(), + X1: V0Junction, + X2: sts.tuple(() => [V0Junction, V0Junction]), + X3: sts.tuple(() => [V0Junction, V0Junction, V0Junction]), + X4: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction]), + X5: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X6: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X7: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X8: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + } +}) + +export const V0Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: WeakBoundedVec, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Parent: sts.unit(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V0MultiAsset), + } +}) + +export type V0Response = V0Response_Assets + +export interface V0Response_Assets { + __kind: 'Assets' + value: V0MultiAsset[] +} + +export type V0Xcm = V0Xcm_HrmpChannelAccepted | V0Xcm_HrmpChannelClosing | V0Xcm_HrmpNewChannelOpenRequest | V0Xcm_QueryResponse | V0Xcm_RelayedFrom | V0Xcm_ReserveAssetDeposit | V0Xcm_TeleportAsset | V0Xcm_Transact | V0Xcm_TransferAsset | V0Xcm_TransferReserveAsset | V0Xcm_WithdrawAsset + +export interface V0Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V0Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V0Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V0Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface V0Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: V0Xcm +} + +export interface V0Xcm_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V0Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export type VersionedXcm = VersionedXcm_V0 | VersionedXcm_V1 | VersionedXcm_V2 + +export interface VersionedXcm_V0 { + __kind: 'V0' + value: V0Xcm +} + +export interface VersionedXcm_V1 { + __kind: 'V1' + value: V1Xcm +} + +export interface VersionedXcm_V2 { + __kind: 'V2' + value: V2Instruction[] +} + +export const V2WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: sts.bigint(), + Unlimited: sts.unit(), + } +}) + +export const VersionedMultiAssets: sts.Type = sts.closedEnum(() => { + return { + V0: sts.array(() => V0MultiAsset), + V1: sts.array(() => V1MultiAsset), + } +}) + +export type VersionedMultiAssets = VersionedMultiAssets_V0 | VersionedMultiAssets_V1 + +export interface VersionedMultiAssets_V0 { + __kind: 'V0' + value: V0MultiAsset[] +} + +export interface VersionedMultiAssets_V1 { + __kind: 'V1' + value: V1MultiAsset[] +} + +export const V1MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V1Junctions, + } +}) + +export const VersionedMultiLocation: sts.Type = sts.closedEnum(() => { + return { + V0: V0MultiLocation, + V1: V1MultiLocation, + } +}) + +export type VersionedMultiLocation = VersionedMultiLocation_V0 | VersionedMultiLocation_V1 + +export interface VersionedMultiLocation_V0 { + __kind: 'V0' + value: V0MultiLocation +} + +export interface VersionedMultiLocation_V1 { + __kind: 'V1' + value: V1MultiLocation +} + +export const Weight: sts.Type = sts.struct(() => { + return { + refTime: sts.bigint(), + } +}) + +export interface Weight { + refTime: bigint +} + +export const Type_556: sts.Type = sts.closedEnum(() => { + return { + V0: Type_557, + V1: Type_562, + V2: sts.array(() => Type_568), + } +}) + +export const Type_568: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => Type_568), + SetErrorHandler: sts.array(() => Type_568), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_561, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const Type_561: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface Type_561 { + encoded: Bytes +} + +export type Type_568 = Type_568_BuyExecution | Type_568_ClaimAsset | Type_568_ClearError | Type_568_ClearOrigin | Type_568_DepositAsset | Type_568_DepositReserveAsset | Type_568_DescendOrigin | Type_568_ExchangeAsset | Type_568_HrmpChannelAccepted | Type_568_HrmpChannelClosing | Type_568_HrmpNewChannelOpenRequest | Type_568_InitiateReserveWithdraw | Type_568_InitiateTeleport | Type_568_QueryHolding | Type_568_QueryResponse | Type_568_ReceiveTeleportedAsset | Type_568_RefundSurplus | Type_568_ReportError | Type_568_ReserveAssetDeposited | Type_568_SetAppendix | Type_568_SetErrorHandler | Type_568_SubscribeVersion | Type_568_Transact | Type_568_TransferAsset | Type_568_TransferReserveAsset | Type_568_Trap | Type_568_UnsubscribeVersion | Type_568_WithdrawAsset + +export interface Type_568_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface Type_568_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface Type_568_ClearError { + __kind: 'ClearError' +} + +export interface Type_568_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_568_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_568_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_568_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface Type_568_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_568_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_568_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_568_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_568_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_568_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_568_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface Type_568_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface Type_568_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface Type_568_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_568_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface Type_568_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface Type_568_SetAppendix { + __kind: 'SetAppendix' + value: Type_568[] +} + +export interface Type_568_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_568[] +} + +export interface Type_568_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_568_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_561 +} + +export interface Type_568_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_568_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_568_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_568_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_568_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export const Type_562: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_564), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: Type_562, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_564), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_561, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_564), + }), + } +}) + +export const Type_564: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => Type_562), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type Type_564 = Type_564_BuyExecution | Type_564_DepositAsset | Type_564_DepositReserveAsset | Type_564_ExchangeAsset | Type_564_InitiateReserveWithdraw | Type_564_InitiateTeleport | Type_564_Noop | Type_564_QueryHolding + +export interface Type_564_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: Type_562[] +} + +export interface Type_564_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_564_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_564_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_564_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface Type_564_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_564_Noop { + __kind: 'Noop' +} + +export interface Type_564_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export type Type_562 = Type_562_HrmpChannelAccepted | Type_562_HrmpChannelClosing | Type_562_HrmpNewChannelOpenRequest | Type_562_QueryResponse | Type_562_ReceiveTeleportedAsset | Type_562_RelayedFrom | Type_562_ReserveAssetDeposited | Type_562_SubscribeVersion | Type_562_Transact | Type_562_TransferAsset | Type_562_TransferReserveAsset | Type_562_UnsubscribeVersion | Type_562_WithdrawAsset + +export interface Type_562_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_562_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_562_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_562_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface Type_562_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: Type_564[] +} + +export interface Type_562_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: Type_562 +} + +export interface Type_562_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: Type_564[] +} + +export interface Type_562_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_562_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_561 +} + +export interface Type_562_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_562_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_562_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_562_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: Type_564[] +} + +export const Type_557: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: Type_557, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_559), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_559), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_561, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_559), + }), + } +}) + +export const Type_559: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => Type_557), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type Type_559 = Type_559_BuyExecution | Type_559_DepositAsset | Type_559_DepositReserveAsset | Type_559_ExchangeAsset | Type_559_InitiateReserveWithdraw | Type_559_InitiateTeleport | Type_559_Null | Type_559_QueryHolding + +export interface Type_559_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: Type_557[] +} + +export interface Type_559_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_559_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_559_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface Type_559_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface Type_559_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_559_Null { + __kind: 'Null' +} + +export interface Type_559_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type Type_557 = Type_557_HrmpChannelAccepted | Type_557_HrmpChannelClosing | Type_557_HrmpNewChannelOpenRequest | Type_557_QueryResponse | Type_557_RelayedFrom | Type_557_ReserveAssetDeposit | Type_557_TeleportAsset | Type_557_Transact | Type_557_TransferAsset | Type_557_TransferReserveAsset | Type_557_WithdrawAsset + +export interface Type_557_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_557_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_557_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_557_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface Type_557_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: Type_557 +} + +export interface Type_557_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: Type_559[] +} + +export interface Type_557_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: Type_559[] +} + +export interface Type_557_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_561 +} + +export interface Type_557_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_557_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_557_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: Type_559[] +} + +export type Type_556 = Type_556_V0 | Type_556_V1 | Type_556_V2 + +export interface Type_556_V0 { + __kind: 'V0' + value: Type_557 +} + +export interface Type_556_V1 { + __kind: 'V1' + value: Type_562 +} + +export interface Type_556_V2 { + __kind: 'V2' + value: Type_568[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type XcmPalletCall = XcmPalletCall_execute | XcmPalletCall_force_default_xcm_version | XcmPalletCall_force_subscribe_version_notify | XcmPalletCall_force_unsubscribe_version_notify | XcmPalletCall_force_xcm_version | XcmPalletCall_limited_reserve_transfer_assets | XcmPalletCall_limited_teleport_assets | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets + +/** + * Execute an XCM message from a local, signed, origin. + * + * An event is deposited indicating whether `msg` could be executed completely or only + * partially. + * + * No more than `max_weight` will be used in its attempted execution. If this is less than the + * maximum amount of weight that the message could take to be executed, then no execution + * attempt will be made. + * + * NOTE: A successful return to this does *not* imply that the `msg` was executed successfully + * to completion; only that *some* of it was executed. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Type_556 + maxWeight: Weight +} + +/** + * Set a safe XCM version (the version that XCM should be encoded with if the most recent + * version a destination can accept is unknown). + * + * - `origin`: Must be Root. + * - `maybe_xcm_version`: The default XCM encoding version, or `None` to disable. + */ +export interface XcmPalletCall_force_default_xcm_version { + __kind: 'force_default_xcm_version' + maybeXcmVersion?: (number | undefined) +} + +/** + * Ask a location to notify us regarding their XCM version and any changes to it. + * + * - `origin`: Must be Root. + * - `location`: The location to which we should subscribe for XCM version notifications. + */ +export interface XcmPalletCall_force_subscribe_version_notify { + __kind: 'force_subscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Require that a particular destination should no longer notify us regarding any XCM + * version changes. + * + * - `origin`: Must be Root. + * - `location`: The location to which we are currently subscribed for XCM version + * notifications which we no longer desire. + */ +export interface XcmPalletCall_force_unsubscribe_version_notify { + __kind: 'force_unsubscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Extoll that a particular destination can be communicated with through a particular + * version of XCM. + * + * - `origin`: Must be Root. + * - `location`: The destination that is being described. + * - `xcm_version`: The latest version of XCM that `location` supports. + */ +export interface XcmPalletCall_force_xcm_version { + __kind: 'force_xcm_version' + location: V1MultiLocation + xcmVersion: number +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination + * chain and forward a notification XCM. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight + * is needed than `weight_limit`, then the operation will fail and the assets send may be + * at risk. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_reserve_transfer_assets { + __kind: 'limited_reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight + * is needed than `weight_limit`, then the operation will fail and the assets send may be + * at risk. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_teleport_assets { + __kind: 'limited_teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination + * chain and forward a notification XCM. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, + * with all fees taken as needed from the asset. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +export interface XcmPalletCall_send { + __kind: 'send' + dest: VersionedMultiLocation + message: VersionedXcm +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, + * with all fees taken as needed from the asset. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VoterListCall: sts.Type = sts.closedEnum(() => { + return { + put_in_front_of: sts.enumStruct({ + lighter: MultiAddress, + }), + rebag: sts.enumStruct({ + dislocated: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VoterListCall = VoterListCall_put_in_front_of | VoterListCall_rebag + +/** + * Move the caller's Id directly in front of `lighter`. + * + * The dispatch origin for this call must be _Signed_ and can only be called by the Id of + * the account going in front of `lighter`. + * + * Only works if + * - both nodes are within the same bag, + * - and `origin` has a greater `Score` than `lighter`. + */ +export interface VoterListCall_put_in_front_of { + __kind: 'put_in_front_of' + lighter: MultiAddress +} + +/** + * Declare that some `dislocated` account has, through rewards or penalties, sufficiently + * changed its score that it should properly fall into a different bag than its current + * one. + * + * Anyone can call this function about any potentially dislocated account. + * + * Will always update the stored score of `dislocated` to the correct score, based on + * `ScoreProvider`. + * + * If `dislocated` does not exists, it returns an error. + */ +export interface VoterListCall_rebag { + __kind: 'rebag' + dislocated: MultiAddress +} + +export type MultiAddress = MultiAddress_Address20 | MultiAddress_Address32 | MultiAddress_Id | MultiAddress_Index | MultiAddress_Raw + +export interface MultiAddress_Address20 { + __kind: 'Address20' + value: Bytes +} + +export interface MultiAddress_Address32 { + __kind: 'Address32' + value: Bytes +} + +export interface MultiAddress_Id { + __kind: 'Id' + value: AccountId32 +} + +export interface MultiAddress_Index { + __kind: 'Index' +} + +export interface MultiAddress_Raw { + __kind: 'Raw' + value: Bytes +} + +export type AccountId32 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: MultiAddress, + target: MultiAddress, + schedule: VestingInfo, + }), + merge_schedules: sts.enumStruct({ + schedule1Index: sts.number(), + schedule2Index: sts.number(), + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: MultiAddress, + }), + vested_transfer: sts.enumStruct({ + target: MultiAddress, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: sts.bigint(), + perBlock: sts.bigint(), + startingBlock: sts.number(), + } +}) + +export interface VestingInfo { + locked: bigint + perBlock: bigint + startingBlock: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_merge_schedules | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: MultiAddress + target: MultiAddress + schedule: VestingInfo +} + +/** + * Merge two vesting schedules together, creating a new vesting schedule that unlocks over + * the highest possible start and end blocks. If both schedules have already started the + * current block will be used as the schedule start; with the caveat that if one schedule + * is finished by the current block, the other will be treated as the new merged schedule, + * unmodified. + * + * NOTE: If `schedule1_index == schedule2_index` this is a no-op. + * NOTE: This will unlock all schedules through the current block prior to merging. + * NOTE: If both schedules have ended by the current block, no new schedule will be created + * and both will be removed. + * + * Merged schedule attributes: + * - `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block, + * current_block)`. + * - `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`. + * - `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`. + * + * The dispatch origin for this call must be _Signed_. + * + * - `schedule1_index`: index of the first schedule to merge. + * - `schedule2_index`: index of the second schedule to merge. + */ +export interface VestingCall_merge_schedules { + __kind: 'merge_schedules' + schedule1Index: number + schedule2Index: number +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: MultiAddress +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account receiving the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: MultiAddress + schedule: VestingInfo +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Call, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Call), + }), + dispatch_as: sts.enumStruct({ + asOrigin: OriginCaller, + call: Call, + }), + force_batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + } +}) + +export const OriginCaller: sts.Type = sts.closedEnum(() => { + return { + Council: Type_342, + ParachainsOrigin: Origin, + TechnicalCommittee: Type_343, + Void: Void, + XcmPallet: Type_345, + system: RawOrigin, + } +}) + +export const RawOrigin: sts.Type = sts.closedEnum(() => { + return { + None: sts.unit(), + Root: sts.unit(), + Signed: AccountId32, + } +}) + +export type RawOrigin = RawOrigin_None | RawOrigin_Root | RawOrigin_Signed + +export interface RawOrigin_None { + __kind: 'None' +} + +export interface RawOrigin_Root { + __kind: 'Root' +} + +export interface RawOrigin_Signed { + __kind: 'Signed' + value: AccountId32 +} + +export const Type_345: sts.Type = sts.closedEnum(() => { + return { + Response: V1MultiLocation, + Xcm: V1MultiLocation, + } +}) + +export type Type_345 = Type_345_Response | Type_345_Xcm + +export interface Type_345_Response { + __kind: 'Response' + value: V1MultiLocation +} + +export interface Type_345_Xcm { + __kind: 'Xcm' + value: V1MultiLocation +} + +export const Void: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Void = never + +export const Type_343: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_343 = Type_343_Member | Type_343_Members | Type_343__Phantom + +export interface Type_343_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_343_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_343__Phantom { + __kind: '_Phantom' +} + +export const Origin: sts.Type = sts.closedEnum(() => { + return { + Parachain: Id, + } +}) + +export const Id = sts.number() + +export type Origin = Origin_Parachain + +export interface Origin_Parachain { + __kind: 'Parachain' + value: Id +} + +export type Id = number + +export const Type_342: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_342 = Type_342_Member | Type_342_Members | Type_342__Phantom + +export interface Type_342_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_342_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_342__Phantom { + __kind: '_Phantom' +} + +export type OriginCaller = OriginCaller_Council | OriginCaller_ParachainsOrigin | OriginCaller_TechnicalCommittee | OriginCaller_Void | OriginCaller_XcmPallet | OriginCaller_system + +export interface OriginCaller_Council { + __kind: 'Council' + value: Type_342 +} + +export interface OriginCaller_ParachainsOrigin { + __kind: 'ParachainsOrigin' + value: Origin +} + +export interface OriginCaller_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: Type_343 +} + +export interface OriginCaller_Void { + __kind: 'Void' + value: Void +} + +export interface OriginCaller_XcmPallet { + __kind: 'XcmPallet' + value: Type_345 +} + +export interface OriginCaller_system { + __kind: 'system' + value: RawOrigin +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all | UtilityCall_dispatch_as | UtilityCall_force_batch + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Call +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Call[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Call[] +} + +/** + * Dispatches a function call with a provided origin. + * + * The dispatch origin for this call must be _Root_. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB write (event). + * - Weight of derivative `call` execution + T::WeightInfo::dispatch_as(). + * # + */ +export interface UtilityCall_dispatch_as { + __kind: 'dispatch_as' + asOrigin: OriginCaller + call: Call +} + +/** + * Send a batch of dispatch calls. + * Unlike `batch`, it allows errors and won't interrupt. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_force_batch { + __kind: 'force_batch' + calls: Call[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UmpCall: sts.Type = sts.closedEnum(() => { + return { + service_overweight: sts.enumStruct({ + index: sts.bigint(), + weightLimit: Weight, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UmpCall = UmpCall_service_overweight + +/** + * Service a single overweight upward message. + * + * - `origin`: Must pass `ExecuteOverweightOrigin`. + * - `index`: The index of the overweight message to service. + * - `weight_limit`: The amount of weight that message execution may take. + * + * Errors: + * - `UnknownMessageIndex`: Message of `index` is unknown. + * - `WeightOverLimit`: Message execution may use greater than `weight_limit`. + * + * Events: + * - `OverweightServiced`: On success. + */ +export interface UmpCall_service_overweight { + __kind: 'service_overweight' + index: bigint + weightLimit: Weight +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: MultiAddress, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + remove_approval: sts.enumStruct({ + proposalId: sts.number(), + }), + spend: sts.enumStruct({ + amount: sts.bigint(), + beneficiary: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_remove_approval | TreasuryCall_spend + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: MultiAddress +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Force a previously approved proposal to be removed from the approval queue. + * The original deposit will no longer be returned. + * + * May only be called from `T::RejectOrigin`. + * - `proposal_id`: The index of a proposal + * + * # + * - Complexity: O(A) where `A` is the number of approvals + * - Db reads and writes: `Approvals` + * # + * + * Errors: + * - `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue, + * i.e., the proposal has not been approved. This could also mean the proposal does not + * exist altogether, thus there is no way it would have been approved in the first place. + */ +export interface TreasuryCall_remove_approval { + __kind: 'remove_approval' + proposalId: number +} + +/** + * Propose and approve a spend of treasury funds. + * + * - `origin`: Must be `SpendOrigin` with the `Success` value being at least `amount`. + * - `amount`: The amount to be transferred from the treasury to the `beneficiary`. + * - `beneficiary`: The destination account for the transfer. + * + * NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the + * beneficiary. + */ +export interface TreasuryCall_spend { + __kind: 'spend' + amount: bigint + beneficiary: MultiAddress +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TipsCall: sts.Type = sts.closedEnum(() => { + return { + close_tip: sts.enumStruct({ + hash: H256, + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: MultiAddress, + }), + retract_tip: sts.enumStruct({ + hash: H256, + }), + slash_tip: sts.enumStruct({ + hash: H256, + }), + tip: sts.enumStruct({ + hash: H256, + tipValue: sts.bigint(), + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: MultiAddress, + tipValue: sts.bigint(), + }), + } +}) + +export const H256 = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TipsCall = TipsCall_close_tip | TipsCall_report_awesome | TipsCall_retract_tip | TipsCall_slash_tip | TipsCall_tip | TipsCall_tip_new + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost + * depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TipsCall_close_tip { + __kind: 'close_tip' + hash: H256 +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: MultiAddress +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TipsCall_retract_tip { + __kind: 'retract_tip' + hash: H256 +} + +/** + * Remove and slash an already-open tip. + * + * May only be called from `T::RejectOrigin`. + * + * As a result, the finder is slashed and the deposits are lost. + * + * Emits `TipSlashed` if successful. + * + * # + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * # + */ +export interface TipsCall_slash_tip { + __kind: 'slash_tip' + hash: H256 +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`, insert tip and check closing, `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TipsCall_tip { + __kind: 'tip' + hash: H256 + tipValue: bigint +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of + * `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: MultiAddress + tipValue: bigint +} + +export type H256 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in + * `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: MultiAddress, + }), + change_key: sts.enumStruct({ + new: MultiAddress, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: MultiAddress, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId32), + }), + set_prime: sts.enumStruct({ + who: MultiAddress, + }), + swap_member: sts.enumStruct({ + remove: MultiAddress, + add: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: MultiAddress +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: MultiAddress +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: MultiAddress +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId32[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: MultiAddress +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: MultiAddress + add: MultiAddress +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: sts.bytes(), + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => sts.bytes()), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + }), + } +}) + +export const Perbill = sts.number() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Bytes + subkeys: number +} + +/** + * Kill some items from storage. + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Bytes[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Make some on-chain remark and emit event. + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is + * expensive). + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very + * expensive. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full + * block. # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: [Bytes, Bytes][] +} + +export type Perbill = number + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: MultiAddress, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: sts.number(), + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + controller: AccountId32, + }), + force_apply_min_commission: sts.enumStruct({ + validatorStash: AccountId32, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => MultiAddress), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => MultiAddress), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + }), + reap_stash: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: MultiAddress, + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId32), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_staking_configs: sts.enumStruct({ + minNominatorBond: ConfigOp, + minValidatorBond: ConfigOp, + maxNominatorCount: Type_257, + maxValidatorCount: Type_257, + chillThreshold: Type_258, + minCommission: Type_259, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export const Type_259: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export type Type_259 = Type_259_Noop | Type_259_Remove | Type_259_Set + +export interface Type_259_Noop { + __kind: 'Noop' +} + +export interface Type_259_Remove { + __kind: 'Remove' +} + +export interface Type_259_Set { + __kind: 'Set' + value: Perbill +} + +export const Type_258: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Percent, + } +}) + +export type Type_258 = Type_258_Noop | Type_258_Remove | Type_258_Set + +export interface Type_258_Noop { + __kind: 'Noop' +} + +export interface Type_258_Remove { + __kind: 'Remove' +} + +export interface Type_258_Set { + __kind: 'Set' + value: Percent +} + +export type Percent = number + +export const Type_257: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_257 = Type_257_Noop | Type_257_Remove | Type_257_Set + +export interface Type_257_Noop { + __kind: 'Noop' +} + +export interface Type_257_Remove { + __kind: 'Remove' +} + +export interface Type_257_Set { + __kind: 'Set' + value: number +} + +export const ConfigOp: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type ConfigOp = ConfigOp_Noop | ConfigOp_Remove | ConfigOp_Set + +export interface ConfigOp_Noop { + __kind: 'Noop' +} + +export interface ConfigOp_Remove { + __kind: 'Remove' +} + +export interface ConfigOp_Set { + __kind: 'Set' + value: bigint +} + +export const Percent = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_force_apply_min_commission | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_staking_configs | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: MultiAddress + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose + * any limitation on the amount that can be added. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: number + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Declare a `controller` to stop participating as either a validator or nominator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_, but can be called by anyone. + * + * If the caller is the same as the controller being targeted, then no further checks are + * enforced, and this function behaves just like `chill`. + * + * If the caller is different than the controller being targeted, the following conditions + * must be met: + * + * * `controller` must belong to a nominator who has become non-decodable, + * + * Or: + * + * * A `ChillThreshold` must be set and checked which defines how close to the max + * nominators or validators we must reach before users can start chilling one-another. + * * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine + * how close we are to the threshold. + * * A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines + * if this is a person that should be chilled because they have not met the threshold + * bond required. + * + * This can be helpful if bond requirements are updated, and we need to remove old users + * who do not satisfy these requirements. + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + controller: AccountId32 +} + +/** + * Force a validator to have at least the minimum commission. This will not affect a + * validator who already has a commission greater than or equal to the minimum. Any account + * can call this. + */ +export interface StakingCall_force_apply_min_commission { + __kind: 'force_apply_min_commission' + validatorStash: AccountId32 +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * Thus the election process may be ongoing when this is called. In this case the + * election will continue until the next era is triggered. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: MultiAddress[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (T::MaxNominations). + * - Both the reads and writes follow a similar pattern. + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: MultiAddress[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId32 + era: number +} + +/** + * Remove all data structures concerning a staker/stash once it is at a state where it can + * be considered `dust` in the staking system. The requirements are: + * + * 1. the `total_balance` of the stash is below existential deposit. + * 2. or, the `ledger.total` of the stash is below existential deposit. + * + * The former can happen in cases like a slash; the latter when a fully unbonded account + * is still receiving staking rewards in `RewardDestination::Staked`. + * + * It can be called by anyone, as long as `stash` meets the above requirements. + * + * Refunds the transaction fees upon successful execution. + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MaxUnlockingChunks`. + * - Storage changes: Can't increase storage, only decrease it. + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt instantly (as soon as this function is completed successfully). + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: MultiAddress +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId32[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt instantly (as soon as this function is completed successfully). + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Update the various staking configurations . + * + * * `min_nominator_bond`: The minimum active bond needed to be a nominator. + * * `min_validator_bond`: The minimum active bond needed to be a validator. + * * `max_nominator_count`: The max number of users who can be a nominator at once. When + * set to `None`, no limit is enforced. + * * `max_validator_count`: The max number of users who can be a validator at once. When + * set to `None`, no limit is enforced. + * * `chill_threshold`: The ratio of `max_nominator_count` or `max_validator_count` which + * should be filled in order for the `chill_other` transaction to work. + * * `min_commission`: The minimum amount of commission that each validators must maintain. + * This is checked only upon calling `validate`. Existing validators are not affected. + * + * RuntimeOrigin must be Root to call this function. + * + * NOTE: Existing nominators and validators will not be affected by this update. + * to kick people under the new limits, `chill_other` should be called. + */ +export interface StakingCall_set_staking_configs { + __kind: 'set_staking_configs' + minNominatorBond: ConfigOp + minValidatorBond: ConfigOp + maxNominatorCount: Type_257 + maxValidatorCount: Type_257 + chillThreshold: Type_258 + minCommission: Type_259 +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * If a user encounters the `InsufficientBond` error when calling this extrinsic, + * they should call `chill` first in order to free up their bonded funds. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * Complexity O(S) where S is the number of slashing spans to remove + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: sts.bigint(), + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: MultiAddress, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: MultiAddress, + judgement: Type_388, + }), + judge_suspended_member: sts.enumStruct({ + who: MultiAddress, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: MultiAddress, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: MultiAddress, + value: sts.bigint(), + tip: sts.bigint(), + }), + } +}) + +export const Type_388: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export type Type_388 = Type_388_Approve | Type_388_Rebid | Type_388_Reject + +export interface Type_388_Approve { + __kind: 'Approve' +} + +export interface Type_388_Rebid { + __kind: 'Rebid' +} + +export interface Type_388_Reject { + __kind: 'Reject' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: bigint +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * pallet to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: MultiAddress + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: MultiAddress + judgement: Type_388 +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin forgives + * (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to + * society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: MultiAddress + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured + * payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be approved (`true`) or + * rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: MultiAddress + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: MultiAddress + value: bigint + tip: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: Id, + }), + force_lease: sts.enumStruct({ + para: Id, + leaser: AccountId32, + amount: sts.bigint(), + periodBegin: sts.number(), + periodCount: sts.number(), + }), + trigger_onboard: sts.enumStruct({ + para: Id, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * Clear all leases for a Para Id, refunding any deposits back to the original owners. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: Id +} + +/** + * Just a connect into the `lease_out` call, in case Root wants to force some lease to happen + * independently of any other on-chain mechanism to use it. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: Id + leaser: AccountId32 + amount: bigint + periodBegin: number + periodCount: number +} + +/** + * Try to onboard a parachain that has a lease for the current lease period. + * + * This function can be useful if there was some state issue with a para that should + * have onboarded, but was unable to. As long as they have a lease period, we can + * let them onboard from here. + * + * Origin must be signed, but can be called by anyone. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: SessionKeys, + proof: sts.bytes(), + }), + } +}) + +export const SessionKeys: sts.Type = sts.struct(() => { + return { + grandpa: Public, + babe: sts.bytes(), + imOnline: sts.bytes(), + paraValidator: sts.bytes(), + paraAssignment: sts.bytes(), + authorityDiscovery: sts.bytes(), + } +}) + +export const Public = sts.bytes() + +export interface SessionKeys { + grandpa: Public + babe: Bytes + imOnline: Bytes + paraValidator: Bytes + paraAssignment: Bytes + authorityDiscovery: Bytes +} + +export type Public = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be Signed and the account must be either be + * convertible to a validator ID using the chain's typical addressing system (this usually + * means being a controller account) or directly convertible into a validator ID (which + * usually means being a stash account). + * + * # + * - Complexity: `O(1)` in number of key types. Actual cost depends on the number of length + * of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)`. Actual cost depends on the number of length of + * `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: SessionKeys + proof: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: sts.number(), + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + schedule_after: sts.enumStruct({ + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: MaybeHashed, + }), + } +}) + +export const MaybeHashed: sts.Type = sts.closedEnum(() => { + return { + Hash: H256, + Value: Call, + } +}) + +export type MaybeHashed = MaybeHashed_Hash | MaybeHashed_Value + +export interface MaybeHashed_Hash { + __kind: 'Hash' + value: H256 +} + +export interface MaybeHashed_Value { + __kind: 'Value' + value: Call +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: number + index: number +} + +/** + * Cancel a named scheduled task. + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Schedule a named task. + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`](Self::schedule_named). + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: MaybeHashed +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + deregister: sts.enumStruct({ + id: Id, + }), + force_register: sts.enumStruct({ + who: AccountId32, + deposit: sts.bigint(), + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + force_remove_lock: sts.enumStruct({ + para: Id, + }), + register: sts.enumStruct({ + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + reserve: sts.unit(), + swap: sts.enumStruct({ + id: Id, + other: Id, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RegistrarCall = RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_force_remove_lock | RegistrarCall_register | RegistrarCall_reserve | RegistrarCall_swap + +/** + * Deregister a Para Id, freeing all data and returning any deposit. + * + * The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: Id +} + +/** + * Force the registration of a Para Id on the relay chain. + * + * This function must be called by a Root origin. + * + * The deposit taken can be specified for this registration. Any `ParaId` + * can be registered, including sub-1000 IDs which are System Parachains. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId32 + deposit: bigint + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Remove a manager lock from a para. This will allow the manager of a + * previously locked para to deregister or swap a para without using governance. + * + * Can only be called by the Root origin. + */ +export interface RegistrarCall_force_remove_lock { + __kind: 'force_remove_lock' + para: Id +} + +/** + * Register head data and validation code for a reserved Para Id. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. + * - `id`: The para ID. Must be owned/managed by the `origin` signing account. + * - `genesis_head`: The genesis head data of the parachain/thread. + * - `validation_code`: The initial validation code of the parachain/thread. + * + * ## Deposits/Fees + * The origin signed account must reserve a corresponding deposit for the registration. Anything already + * reserved previously for this para ID is accounted for. + * + * ## Events + * The `Registered` event is emitted in case of success. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Reserve a Para Id on the relay chain. + * + * This function will reserve a new Para Id to be owned/managed by the origin account. + * The origin account is able to register head data and validation code using `register` to create + * a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID. + * + * ## Deposits/Fees + * The origin must reserve a deposit of `ParaDeposit` for the registration. + * + * ## Events + * The `Reserved` event is emitted in case of success, which provides the ID reserved for use. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * Swap a parachain with another parachain or parathread. + * + * The origin must be Root, the `para` owner, or the `para` itself. + * + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: Id + other: Id +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: MultiAddress, + call: Call, + }), + cancel_recovered: sts.enumStruct({ + account: MultiAddress, + }), + claim_recovery: sts.enumStruct({ + account: MultiAddress, + }), + close_recovery: sts.enumStruct({ + rescuer: MultiAddress, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId32), + threshold: sts.number(), + delayPeriod: sts.number(), + }), + initiate_recovery: sts.enumStruct({ + account: MultiAddress, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + vouch_recovery: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: MultiAddress + call: Call +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: MultiAddress +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully recovered by + * you. + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: MultiAddress +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: MultiAddress +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. Should be + * ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt before the + * account can be recovered. Should be less than or equal to the length of the list of + * friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized that + * needs to pass before the account can be recovered. + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId32[] + threshold: number + delayPeriod: number +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account needs to be + * recoverable (i.e. have a recovery configuration). + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: MultiAddress +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + announce: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + create_pure: sts.enumStruct({ + proxyType: ProxyType, + delay: sts.number(), + index: sts.number(), + }), + kill_pure: sts.enumStruct({ + spawner: MultiAddress, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + proxy_announced: sts.enumStruct({ + delegate: MultiAddress, + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + reject_announcement: sts.enumStruct({ + delegate: MultiAddress, + callHash: H256, + }), + remove_announcement: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_create_pure | ProxyCall_kill_pure | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: MultiAddress + callHash: H256 +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + */ +export interface ProxyCall_create_pure { + __kind: 'create_pure' + proxyType: ProxyType + delay: number + index: number +} + +/** + * Removes a previously spawned pure proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `pure` with corresponding parameters. + * + * - `spawner`: The account that originally called `pure` to create this account. + * - `index`: The disambiguation index originally passed to `pure`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `pure`. + * - `height`: The height of the chain when the call to `pure` was processed. + * - `ext_index`: The extrinsic index in which the call to `pure` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created pure + * account whose `pure` call has corresponding parameters. + */ +export interface ProxyCall_kill_pure { + __kind: 'kill_pure' + spawner: MultiAddress + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Dispatch the given `call` from an account that the sender is authorized for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: MultiAddress + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: MultiAddress + callHash: H256 +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: MultiAddress + callHash: H256 +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `pure`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Society | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Society { + __kind: 'Society' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PreimageCall: sts.Type = sts.closedEnum(() => { + return { + note_preimage: sts.enumStruct({ + bytes: sts.bytes(), + }), + request_preimage: sts.enumStruct({ + hash: H256, + }), + unnote_preimage: sts.enumStruct({ + hash: H256, + }), + unrequest_preimage: sts.enumStruct({ + hash: H256, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PreimageCall = PreimageCall_note_preimage | PreimageCall_request_preimage | PreimageCall_unnote_preimage | PreimageCall_unrequest_preimage + +/** + * Register a preimage on-chain. + * + * If the preimage was previously requested, no fees or deposits are taken for providing + * the preimage. Otherwise, a deposit is taken proportional to the size of the preimage. + */ +export interface PreimageCall_note_preimage { + __kind: 'note_preimage' + bytes: Bytes +} + +/** + * Request a preimage be uploaded to the chain without paying any fees or deposits. + * + * If the preimage requests has already been provided on-chain, we unreserve any deposit + * a user may have paid, and take the control of the preimage out of their hands. + */ +export interface PreimageCall_request_preimage { + __kind: 'request_preimage' + hash: H256 +} + +/** + * Clear an unrequested preimage from the runtime storage. + */ +export interface PreimageCall_unnote_preimage { + __kind: 'unnote_preimage' + hash: H256 +} + +/** + * Clear a previously made request for a preimage. + * + * NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. + */ +export interface PreimageCall_unrequest_preimage { + __kind: 'unrequest_preimage' + hash: H256 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PhragmenElectionCall: sts.Type = sts.closedEnum(() => { + return { + clean_defunct_voters: sts.enumStruct({ + numVoters: sts.number(), + numDefunct: sts.number(), + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + slashBond: sts.boolean(), + rerunElection: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId32), + value: sts.bigint(), + }), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PhragmenElectionCall = PhragmenElectionCall_clean_defunct_voters | PhragmenElectionCall_remove_member | PhragmenElectionCall_remove_voter | PhragmenElectionCall_renounce_candidacy | PhragmenElectionCall_submit_candidacy | PhragmenElectionCall_vote + +/** + * Clean all voters who are defunct (i.e. they do not serve any purpose at all). The + * deposit of the removed voters are returned. + * + * This is an root function to be used only for cleaning the state. + * + * The dispatch origin of this call must be root. + * + * # + * The total number of voters and those that are defunct must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_clean_defunct_voters { + __kind: 'clean_defunct_voters' + numVoters: number + numDefunct: number +} + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, if `rerun_election` is `true`, a new phragmen election is + * started, else, nothing happens. + * + * If `slash_bond` is set to true, the bond of the member being removed is slashed. Else, + * it is returned. + * + * The dispatch origin of this call must be root. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement, we use a small weight. Else, since this is a root call and + * will go into phragmen, we assume full block for now. + * # + */ +export interface PhragmenElectionCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + slashBond: boolean + rerunElection: boolean +} + +/** + * Remove `origin` as a voter. + * + * This removes the lock and returns the deposit. + * + * The dispatch origin of this call must be signed and be a voter. + */ +export interface PhragmenElectionCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * + * - `origin` is a candidate and not elected in any set. In this case, the deposit is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the deposit is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the deposit is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_member`](Self::remove_member), if replacement runners exists, they + * are immediately used. If the prime is renouncing, then no prime will exist until the + * next round. + * + * The dispatch origin of this call must be signed, and have one of the above roles. + * + * # + * The type of renouncing must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Submit oneself for candidacy. A fixed amount of deposit is recorded. + * + * All candidates are wiped at the end of the term. They either become a member/runner-up, + * or leave the system while their deposit is slashed. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`] + * to get their deposit back. Losing the spot in an election will always lead to a slash. + * + * # + * The number of current candidates must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is + * reserved. The deposit is based on the number of votes and can be updated over time. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * If `value` is more than `who`'s free balance, then the maximum of the two is used. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * It is the responsibility of the caller to **NOT** place all of their balance into the + * lock and keep some for further operations. + * + * # + * We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less. + * # + */ +export interface PhragmenElectionCall_vote { + __kind: 'vote' + votes: AccountId32[] + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasSharedCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasDisputesCall: sts.Type = sts.closedEnum(() => { + return { + force_unfreeze: sts.unit(), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasDisputesCall = ParasDisputesCall_force_unfreeze + +export interface ParasDisputesCall_force_unfreeze { + __kind: 'force_unfreeze' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + add_trusted_validation_code: sts.enumStruct({ + validationCode: ValidationCode, + }), + force_note_new_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: Id, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + relayParentNumber: sts.number(), + }), + force_set_current_code: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + include_pvf_check_statement: sts.enumStruct({ + stmt: V2PvfCheckStatement, + signature: sts.bytes(), + }), + poke_unused_validation_code: sts.enumStruct({ + validationCodeHash: ValidationCodeHash, + }), + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const V2PvfCheckStatement: sts.Type = sts.struct(() => { + return { + accept: sts.boolean(), + subject: ValidationCodeHash, + sessionIndex: sts.number(), + validatorIndex: V2ValidatorIndex, + } +}) + +export const V2ValidatorIndex = sts.number() + +export interface V2PvfCheckStatement { + accept: boolean + subject: ValidationCodeHash + sessionIndex: number + validatorIndex: V2ValidatorIndex +} + +export type V2ValidatorIndex = number + +export type ValidationCodeHash = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasCall = ParasCall_add_trusted_validation_code | ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head | ParasCall_include_pvf_check_statement | ParasCall_poke_unused_validation_code + +/** + * Adds the validation code to the storage. + * + * The code will not be added if it is already present. Additionally, if PVF pre-checking + * is running for that code, it will be instantly accepted. + * + * Otherwise, the code will be added into the storage. Note that the code will be added + * into storage with reference count 0. This is to account the fact that there are no users + * for this code yet. The caller will have to make sure that this code eventually gets + * used by some parachain or removed from the storage to avoid storage leaks. For the latter + * prefer to use the `poke_unused_validation_code` dispatchable to raw storage manipulation. + * + * This function is mainly meant to be used for upgrading parachains that do not follow + * the go-ahead signal while the PVF pre-checking feature is enabled. + */ +export interface ParasCall_add_trusted_validation_code { + __kind: 'add_trusted_validation_code' + validationCode: ValidationCode +} + +/** + * Note a new block head for para within the context of the current block. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: Id + newHead: HeadData +} + +/** + * Put a parachain directly into the next session's action queue. + * We can't queue it any sooner than this without going into the + * initializer... + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: Id +} + +/** + * Schedule an upgrade as if it was scheduled in the given relay parent block. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: Id + newCode: ValidationCode + relayParentNumber: number +} + +/** + * Set the storage for the parachain validation code immediately. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: Id + newCode: ValidationCode +} + +/** + * Set the storage for the current parachain head data immediately. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: Id + newHead: HeadData +} + +/** + * Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and + * enacts the results if that was the last vote before achieving the supermajority. + */ +export interface ParasCall_include_pvf_check_statement { + __kind: 'include_pvf_check_statement' + stmt: V2PvfCheckStatement + signature: Bytes +} + +/** + * Remove the validation code from the storage iff the reference count is 0. + * + * This is better than removing the storage directly, because it will not remove the code + * that was suddenly got used by some parachain while this dispatchable was pending + * dispatching. + */ +export interface ParasCall_poke_unused_validation_code { + __kind: 'poke_unused_validation_code' + validationCodeHash: ValidationCodeHash +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: V2InherentData, + }), + } +}) + +export const V2InherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => V2UncheckedSigned), + backedCandidates: sts.array(() => V2BackedCandidate), + disputes: sts.array(() => V2DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: H256, + number: sts.number(), + stateRoot: H256, + extrinsicsRoot: H256, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + Consensus: sts.tuple(() => [sts.bytes(), sts.bytes()]), + Other: sts.bytes(), + PreRuntime: sts.tuple(() => [sts.bytes(), sts.bytes()]), + RuntimeEnvironmentUpdated: sts.unit(), + Seal: sts.tuple(() => [sts.bytes(), sts.bytes()]), + } +}) + +export type DigestItem = DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: [Bytes, Bytes] +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: [Bytes, Bytes] +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: [Bytes, Bytes] +} + +export interface Digest { + logs: DigestItem[] +} + +export interface Header { + parentHash: H256 + number: number + stateRoot: H256 + extrinsicsRoot: H256 + digest: Digest +} + +export const V2DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: sts.number(), + statements: sts.array(() => sts.tuple(() => [V2DisputeStatement, V2ValidatorIndex, sts.bytes()])), + } +}) + +export const V2DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: V2InvalidDisputeStatementKind, + Valid: V2ValidDisputeStatementKind, + } +}) + +export const V2ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + BackingSeconded: H256, + BackingValid: H256, + Explicit: sts.unit(), + } +}) + +export type V2ValidDisputeStatementKind = V2ValidDisputeStatementKind_ApprovalChecking | V2ValidDisputeStatementKind_BackingSeconded | V2ValidDisputeStatementKind_BackingValid | V2ValidDisputeStatementKind_Explicit + +export interface V2ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface V2ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: H256 +} + +export interface V2ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: H256 +} + +export interface V2ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export const V2InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export type V2InvalidDisputeStatementKind = V2InvalidDisputeStatementKind_Explicit + +export interface V2InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type V2DisputeStatement = V2DisputeStatement_Invalid | V2DisputeStatement_Valid + +export interface V2DisputeStatement_Invalid { + __kind: 'Invalid' + value: V2InvalidDisputeStatementKind +} + +export interface V2DisputeStatement_Valid { + __kind: 'Valid' + value: V2ValidDisputeStatementKind +} + +export const CandidateHash = sts.bytes() + +export interface V2DisputeStatementSet { + candidateHash: CandidateHash + session: number + statements: [V2DisputeStatement, V2ValidatorIndex, Bytes][] +} + +export type CandidateHash = Bytes + +export const V2BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: V2CommittedCandidateReceipt, + validityVotes: sts.array(() => V2ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const V2ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.bytes(), + Implicit: sts.bytes(), + } +}) + +export type V2ValidityAttestation = V2ValidityAttestation_Explicit | V2ValidityAttestation_Implicit + +export interface V2ValidityAttestation_Explicit { + __kind: 'Explicit' + value: Bytes +} + +export interface V2ValidityAttestation_Implicit { + __kind: 'Implicit' + value: Bytes +} + +export const V2CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: V2CandidateDescriptor, + commitments: V2CandidateCommitments, + } +}) + +export const V2CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => sts.bytes()), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: sts.number(), + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: Id, + data: sts.bytes(), + } +}) + +export interface OutboundHrmpMessage { + recipient: Id + data: Bytes +} + +export interface V2CandidateCommitments { + upwardMessages: Bytes[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: number +} + +export const V2CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: Id, + relayParent: H256, + collator: V2Public, + persistedValidationDataHash: H256, + povHash: H256, + erasureRoot: H256, + signature: V2Signature, + paraHead: H256, + validationCodeHash: ValidationCodeHash, + } +}) + +export const V2Signature = sts.bytes() + +export const V2Public = sts.bytes() + +export interface V2CandidateDescriptor { + paraId: Id + relayParent: H256 + collator: V2Public + persistedValidationDataHash: H256 + povHash: H256 + erasureRoot: H256 + signature: V2Signature + paraHead: H256 + validationCodeHash: ValidationCodeHash +} + +export type V2Signature = Bytes + +export type V2Public = Bytes + +export interface V2CommittedCandidateReceipt { + descriptor: V2CandidateDescriptor + commitments: V2CandidateCommitments +} + +export interface V2BackedCandidate { + candidate: V2CommittedCandidateReceipt + validityVotes: V2ValidityAttestation[] + validatorIndices: BitSequence +} + +export const V2UncheckedSigned: sts.Type = sts.struct(() => { + return { + payload: V2AvailabilityBitfield, + validatorIndex: V2ValidatorIndex, + signature: sts.bytes(), + } +}) + +export const V2AvailabilityBitfield = sts.bitseq() + +export interface V2UncheckedSigned { + payload: V2AvailabilityBitfield + validatorIndex: V2ValidatorIndex + signature: Bytes +} + +export type V2AvailabilityBitfield = BitSequence + +export interface V2InherentData { + bitfields: V2UncheckedSigned[] + backedCandidates: V2BackedCandidate[] + disputes: V2DisputeStatementSet[] + parentHeader: Header +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInherentCall = ParaInherentCall_enter + +/** + * Enter the paras inherent. This will process bitfields and backed candidates. + */ +export interface ParaInherentCall_enter { + __kind: 'enter' + data: V2InherentData +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInclusionCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const NominationPoolsCall: sts.Type = sts.closedEnum(() => { + return { + bond_extra: sts.enumStruct({ + extra: BondExtra, + }), + chill: sts.enumStruct({ + poolId: sts.number(), + }), + claim_payout: sts.unit(), + create: sts.enumStruct({ + amount: sts.bigint(), + root: MultiAddress, + nominator: MultiAddress, + stateToggler: MultiAddress, + }), + join: sts.enumStruct({ + amount: sts.bigint(), + poolId: sts.number(), + }), + nominate: sts.enumStruct({ + poolId: sts.number(), + validators: sts.array(() => AccountId32), + }), + pool_withdraw_unbonded: sts.enumStruct({ + poolId: sts.number(), + numSlashingSpans: sts.number(), + }), + set_configs: sts.enumStruct({ + minJoinBond: Type_492, + minCreateBond: Type_492, + maxPools: Type_493, + maxMembers: Type_493, + maxMembersPerPool: Type_493, + }), + set_metadata: sts.enumStruct({ + poolId: sts.number(), + metadata: sts.bytes(), + }), + set_state: sts.enumStruct({ + poolId: sts.number(), + state: PoolState, + }), + unbond: sts.enumStruct({ + memberAccount: MultiAddress, + unbondingPoints: sts.bigint(), + }), + update_roles: sts.enumStruct({ + poolId: sts.number(), + newRoot: Type_494, + newNominator: Type_494, + newStateToggler: Type_494, + }), + withdraw_unbonded: sts.enumStruct({ + memberAccount: MultiAddress, + numSlashingSpans: sts.number(), + }), + } +}) + +export const Type_494: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: AccountId32, + } +}) + +export type Type_494 = Type_494_Noop | Type_494_Remove | Type_494_Set + +export interface Type_494_Noop { + __kind: 'Noop' +} + +export interface Type_494_Remove { + __kind: 'Remove' +} + +export interface Type_494_Set { + __kind: 'Set' + value: AccountId32 +} + +export const PoolState: sts.Type = sts.closedEnum(() => { + return { + Blocked: sts.unit(), + Destroying: sts.unit(), + Open: sts.unit(), + } +}) + +export type PoolState = PoolState_Blocked | PoolState_Destroying | PoolState_Open + +export interface PoolState_Blocked { + __kind: 'Blocked' +} + +export interface PoolState_Destroying { + __kind: 'Destroying' +} + +export interface PoolState_Open { + __kind: 'Open' +} + +export const Type_493: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_493 = Type_493_Noop | Type_493_Remove | Type_493_Set + +export interface Type_493_Noop { + __kind: 'Noop' +} + +export interface Type_493_Remove { + __kind: 'Remove' +} + +export interface Type_493_Set { + __kind: 'Set' + value: number +} + +export const Type_492: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type Type_492 = Type_492_Noop | Type_492_Remove | Type_492_Set + +export interface Type_492_Noop { + __kind: 'Noop' +} + +export interface Type_492_Remove { + __kind: 'Remove' +} + +export interface Type_492_Set { + __kind: 'Set' + value: bigint +} + +export const BondExtra: sts.Type = sts.closedEnum(() => { + return { + FreeBalance: sts.bigint(), + Rewards: sts.unit(), + } +}) + +export type BondExtra = BondExtra_FreeBalance | BondExtra_Rewards + +export interface BondExtra_FreeBalance { + __kind: 'FreeBalance' + value: bigint +} + +export interface BondExtra_Rewards { + __kind: 'Rewards' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type NominationPoolsCall = NominationPoolsCall_bond_extra | NominationPoolsCall_chill | NominationPoolsCall_claim_payout | NominationPoolsCall_create | NominationPoolsCall_join | NominationPoolsCall_nominate | NominationPoolsCall_pool_withdraw_unbonded | NominationPoolsCall_set_configs | NominationPoolsCall_set_metadata | NominationPoolsCall_set_state | NominationPoolsCall_unbond | NominationPoolsCall_update_roles | NominationPoolsCall_withdraw_unbonded + +/** + * Bond `extra` more funds from `origin` into the pool to which they already belong. + * + * Additional funds can come from either the free balance of the account, of from the + * accumulated rewards, see [`BondExtra`]. + * + * Bonding extra funds implies an automatic payout of all pending rewards as well. + */ +export interface NominationPoolsCall_bond_extra { + __kind: 'bond_extra' + extra: BondExtra +} + +/** + * Chill on behalf of the pool. + * + * The dispatch origin of this call must be signed by the pool nominator or the pool + * root role, same as [`Pallet::nominate`]. + * + * This directly forward the call to the staking pallet, on behalf of the pool bonded + * account. + */ +export interface NominationPoolsCall_chill { + __kind: 'chill' + poolId: number +} + +/** + * A bonded member can use this to claim their payout based on the rewards that the pool + * has accumulated since their last claimed payout (OR since joining if this is there first + * time claiming rewards). The payout will be transferred to the member's account. + * + * The member will earn rewards pro rata based on the members stake vs the sum of the + * members in the pools stake. Rewards do not "expire". + */ +export interface NominationPoolsCall_claim_payout { + __kind: 'claim_payout' +} + +/** + * Create a new delegation pool. + * + * # Arguments + * + * * `amount` - The amount of funds to delegate to the pool. This also acts of a sort of + * deposit since the pools creator cannot fully unbond funds until the pool is being + * destroyed. + * * `index` - A disambiguation index for creating the account. Likely only useful when + * creating multiple pools in the same extrinsic. + * * `root` - The account to set as [`PoolRoles::root`]. + * * `nominator` - The account to set as the [`PoolRoles::nominator`]. + * * `state_toggler` - The account to set as the [`PoolRoles::state_toggler`]. + * + * # Note + * + * In addition to `amount`, the caller will transfer the existential deposit; so the caller + * needs at have at least `amount + existential_deposit` transferrable. + */ +export interface NominationPoolsCall_create { + __kind: 'create' + amount: bigint + root: MultiAddress + nominator: MultiAddress + stateToggler: MultiAddress +} + +/** + * Stake funds with a pool. The amount to bond is transferred from the member to the + * pools account and immediately increases the pools bond. + * + * # Note + * + * * An account can only be a member of a single pool. + * * An account cannot join the same pool multiple times. + * * This call will *not* dust the member account, so the member must have at least + * `existential deposit + amount` in their account. + * * Only a pool with [`PoolState::Open`] can be joined + */ +export interface NominationPoolsCall_join { + __kind: 'join' + amount: bigint + poolId: number +} + +/** + * Nominate on behalf of the pool. + * + * The dispatch origin of this call must be signed by the pool nominator or the pool + * root role. + * + * This directly forward the call to the staking pallet, on behalf of the pool bonded + * account. + */ +export interface NominationPoolsCall_nominate { + __kind: 'nominate' + poolId: number + validators: AccountId32[] +} + +/** + * Call `withdraw_unbonded` for the pools account. This call can be made by any account. + * + * This is useful if their are too many unlocking chunks to call `unbond`, and some + * can be cleared by withdrawing. In the case there are too many unlocking chunks, the user + * would probably see an error like `NoMoreChunks` emitted from the staking system when + * they attempt to unbond. + */ +export interface NominationPoolsCall_pool_withdraw_unbonded { + __kind: 'pool_withdraw_unbonded' + poolId: number + numSlashingSpans: number +} + +/** + * Update configurations for the nomination pools. The origin for this call must be + * Root. + * + * # Arguments + * + * * `min_join_bond` - Set [`MinJoinBond`]. + * * `min_create_bond` - Set [`MinCreateBond`]. + * * `max_pools` - Set [`MaxPools`]. + * * `max_members` - Set [`MaxPoolMembers`]. + * * `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]. + */ +export interface NominationPoolsCall_set_configs { + __kind: 'set_configs' + minJoinBond: Type_492 + minCreateBond: Type_492 + maxPools: Type_493 + maxMembers: Type_493 + maxMembersPerPool: Type_493 +} + +/** + * Set a new metadata for the pool. + * + * The dispatch origin of this call must be signed by the state toggler, or the root role + * of the pool. + */ +export interface NominationPoolsCall_set_metadata { + __kind: 'set_metadata' + poolId: number + metadata: Bytes +} + +/** + * Set a new state for the pool. + * + * If a pool is already in the `Destroying` state, then under no condition can its state + * change again. + * + * The dispatch origin of this call must be either: + * + * 1. signed by the state toggler, or the root role of the pool, + * 2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and + * then the state of the pool can be permissionlessly changed to `Destroying`. + */ +export interface NominationPoolsCall_set_state { + __kind: 'set_state' + poolId: number + state: PoolState +} + +/** + * Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It + * implicitly collects the rewards one last time, since not doing so would mean some + * rewards would be forfeited. + * + * Under certain conditions, this call can be dispatched permissionlessly (i.e. by any + * account). + * + * # Conditions for a permissionless dispatch. + * + * * The pool is blocked and the caller is either the root or state-toggler. This is + * refereed to as a kick. + * * The pool is destroying and the member is not the depositor. + * * The pool is destroying, the member is the depositor and no other members are in the + * pool. + * + * ## Conditions for permissioned dispatch (i.e. the caller is also the + * `member_account`): + * + * * The caller is not the depositor. + * * The caller is the depositor, the pool is destroying and no other members are in the + * pool. + * + * # Note + * + * If there are too many unlocking chunks to unbond with the pool account, + * [`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks. If + * there are too many unlocking chunks, the result of this call will likely be the + * `NoMoreChunks` error from the staking system. + */ +export interface NominationPoolsCall_unbond { + __kind: 'unbond' + memberAccount: MultiAddress + unbondingPoints: bigint +} + +/** + * Update the roles of the pool. + * + * The root is the only entity that can change any of the roles, including itself, + * excluding the depositor, who can never change. + * + * It emits an event, notifying UIs of the role change. This event is quite relevant to + * most pool members and they should be informed of changes to pool roles. + */ +export interface NominationPoolsCall_update_roles { + __kind: 'update_roles' + poolId: number + newRoot: Type_494 + newNominator: Type_494 + newStateToggler: Type_494 +} + +/** + * Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an + * error is returned. + * + * Under certain conditions, this call can be dispatched permissionlessly (i.e. by any + * account). + * + * # Conditions for a permissionless dispatch + * + * * The pool is in destroy mode and the target is not the depositor. + * * The target is the depositor and they are the only member in the sub pools. + * * The pool is blocked and the caller is either the root or state-toggler. + * + * # Conditions for permissioned dispatch + * + * * The caller is the target and they are not the depositor. + * + * # Note + * + * If the target is the depositor, the pool will be destroyed. + */ +export interface NominationPoolsCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + memberAccount: MultiAddress + numSlashingSpans: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + call: sts.bytes(), + storeCall: sts.boolean(), + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId32), + call: Call, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: sts.number(), + index: sts.number(), + } +}) + +export interface Timepoint { + height: number + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`) + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + call: Bytes + storeCall: boolean + maxWeight: Weight +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId32[] + call: Call +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account, Calls + * - Write: Multisig Storage, [Caller Account], Refund Account, Calls + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId32[] + timepoint: Timepoint + callHash: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const InitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type InitializerCall = InitializerCall_force_approve + +/** + * Issue a signal to the consensus engine to forcibly act as though all parachain + * blocks in all relay chain blocks up to and including the given number in the current + * chain are valid and should be finalized. + */ +export interface InitializerCall_force_approve { + __kind: 'force_approve' + upTo: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: sts.number(), + }), + force_transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: sts.number(), + }), + freeze: sts.enumStruct({ + index: sts.number(), + }), + transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: number +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: MultiAddress + index: number + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: number +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the + * deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: number +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: MultiAddress + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: sts.bytes(), + }), + } +}) + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: sts.number(), + networkState: OpaqueNetworkState, + sessionIndex: sts.number(), + authorityIndex: sts.number(), + validatorsLen: sts.number(), + } +}) + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export interface Heartbeat { + blockNumber: number + networkState: OpaqueNetworkState + sessionIndex: number + authorityIndex: number + validatorsLen: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is + * length of `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Bytes +} + +/** + * Identity pallet declaration. + */ +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: MultiAddress, + }), + add_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: sts.number(), + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: MultiAddress, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: MultiAddress, + judgement: Judgement, + identity: H256, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: MultiAddress, + }), + rename_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: MultiAddress, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: BitFlags, + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId32, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => sts.tuple(() => [Data, Data])), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => sts.bytes()), + image: Data, + twitter: Data, + } +}) + +export interface IdentityInfo { + additional: [Data, Data][] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (Bytes | undefined) + image: Data + twitter: Data +} + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: Bytes +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: Bytes +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: Bytes +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: Bytes +} + +export const BitFlags = sts.bigint() + +export const Judgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: sts.bigint(), + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export type Judgement = Judgement_Erroneous | Judgement_FeePaid | Judgement_KnownGood | Judgement_LowQuality | Judgement_OutOfDate | Judgement_Reasonable | Judgement_Unknown + +export interface Judgement_Erroneous { + __kind: 'Erroneous' +} + +export interface Judgement_FeePaid { + __kind: 'FeePaid' + value: bigint +} + +export interface Judgement_KnownGood { + __kind: 'KnownGood' +} + +export interface Judgement_LowQuality { + __kind: 'LowQuality' +} + +export interface Judgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface Judgement_Reasonable { + __kind: 'Reasonable' +} + +export interface Judgement_Unknown { + __kind: 'Unknown' +} + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: sts.bytes(), + Keccak256: sts.bytes(), + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: sts.bytes(), + ShaThree256: sts.bytes(), + } +}) + +/** + * Identity pallet declaration. + */ +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: MultiAddress +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: MultiAddress + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: number +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: MultiAddress +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * - `identity`: The hash of the [`IdentityInfo`] for that the judgement is provided. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: MultiAddress + judgement: Judgement + identity: H256 +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: MultiAddress +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: MultiAddress + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: MultiAddress +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: BitFlags +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId32, Data][] +} + +export type BitFlags = bigint + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const HrmpCall: sts.Type = sts.closedEnum(() => { + return { + force_clean_hrmp: sts.enumStruct({ + para: Id, + inbound: sts.number(), + outbound: sts.number(), + }), + force_process_hrmp_close: sts.enumStruct({ + channels: sts.number(), + }), + force_process_hrmp_open: sts.enumStruct({ + channels: sts.number(), + }), + hrmp_accept_open_channel: sts.enumStruct({ + sender: Id, + }), + hrmp_cancel_open_request: sts.enumStruct({ + channelId: HrmpChannelId, + openRequests: sts.number(), + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: Id, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: Id, + recipient: Id, + } +}) + +export interface HrmpChannelId { + sender: Id + recipient: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type HrmpCall = HrmpCall_force_clean_hrmp | HrmpCall_force_process_hrmp_close | HrmpCall_force_process_hrmp_open | HrmpCall_hrmp_accept_open_channel | HrmpCall_hrmp_cancel_open_request | HrmpCall_hrmp_close_channel | HrmpCall_hrmp_init_open_channel + +/** + * This extrinsic triggers the cleanup of all the HRMP storage items that + * a para may have. Normally this happens once per session, but this allows + * you to trigger the cleanup immediately for a specific parachain. + * + * Origin must be Root. + * + * Number of inbound and outbound channels for `para` must be provided as witness data of weighing. + */ +export interface HrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: Id + inbound: number + outbound: number +} + +/** + * Force process HRMP close channel requests. + * + * If there are pending HRMP close channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of closing channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' + channels: number +} + +/** + * Force process HRMP open channel requests. + * + * If there are pending HRMP open channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of opening channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' + channels: number +} + +/** + * Accept a pending open channel request from the given sender. + * + * The channel will be opened only on the next session boundary. + */ +export interface HrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: Id +} + +/** + * This cancels a pending open channel request. It can be canceled by either of the sender + * or the recipient for that request. The origin must be either of those. + * + * The cancellation happens immediately. It is not possible to cancel the request if it is + * already accepted. + * + * Total number of open requests (i.e. `HrmpOpenChannelRequestsList`) must be provided as + * witness data. + */ +export interface HrmpCall_hrmp_cancel_open_request { + __kind: 'hrmp_cancel_open_request' + channelId: HrmpChannelId + openRequests: number +} + +/** + * Initiate unilateral closing of a channel. The origin must be either the sender or the + * recipient in the channel being closed. + * + * The closure can only happen on a session change. + */ +export interface HrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * Initiate opening a channel from a parachain to a given recipient with given channel + * parameters. + * + * - `proposed_max_capacity` - specifies how many messages can be in the channel at once. + * - `proposed_max_message_size` - specifies the maximum size of the messages. + * + * These numbers are a subject to the relay-chain configuration limits. + * + * The channel can be opened only after the recipient confirms it and only on a session + * change. + */ +export interface HrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: Id + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: sts.number(), + bestFinalizedBlockNumber: sts.number(), + }), + report_equivocation: sts.enumStruct({ + equivocationProof: Type_278, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_278, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: sts.number(), + trieNodes: sts.array(() => sts.bytes()), + validatorCount: sts.number(), + } +}) + +export interface MembershipProof { + session: number + trieNodes: Bytes[] + validatorCount: number +} + +export const Type_278: sts.Type = sts.struct(() => { + return { + setId: sts.bigint(), + equivocation: Equivocation, + } +}) + +export const Equivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: Type_285, + Prevote: Type_280, + } +}) + +export const Type_280: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Prevote, sts.bytes()]), + second: sts.tuple(() => [Prevote, sts.bytes()]), + } +}) + +export const Prevote: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Prevote { + targetHash: H256 + targetNumber: number +} + +export interface Type_280 { + roundNumber: bigint + identity: Public + first: [Prevote, Bytes] + second: [Prevote, Bytes] +} + +export const Type_285: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Precommit, sts.bytes()]), + second: sts.tuple(() => [Precommit, sts.bytes()]), + } +}) + +export const Precommit: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Precommit { + targetHash: H256 + targetNumber: number +} + +export interface Type_285 { + roundNumber: bigint + identity: Public + first: [Precommit, Bytes] + second: [Precommit, Bytes] +} + +export type Equivocation = Equivocation_Precommit | Equivocation_Prevote + +export interface Equivocation_Precommit { + __kind: 'Precommit' + value: Type_285 +} + +export interface Equivocation_Prevote { + __kind: 'Prevote' + value: Type_280 +} + +export interface Type_278 { + setId: bigint + equivocation: Equivocation +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has stalled. + * + * This will trigger a forced authority set change at the beginning of the next session, to + * be enacted `delay` blocks after that. The `delay` should be high enough to safely assume + * that the block signalling the forced change will not be re-orged e.g. 1000 blocks. + * The block production rate (which may be slowed down because of finality lagging) should + * be taken into account when choosing the `delay`. The GRANDPA voters based on the new + * authority will start voting on top of `best_finalized_block_number` for new finalized + * blocks. `best_finalized_block_number` should be the highest of the latest finalized + * block of all validators of the new authority set. + * + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: number + bestFinalizedBlockNumber: number +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_278 + keyOwnerProof: MembershipProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_278 + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GiltCall: sts.Type = sts.closedEnum(() => { + return { + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + set_target: sts.enumStruct({ + target: sts.bigint(), + }), + thaw: sts.enumStruct({ + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GiltCall = GiltCall_place_bid | GiltCall_retract_bid | GiltCall_set_target | GiltCall_thaw + +/** + * Place a bid for a gilt to be issued. + * + * Origin must be Signed, and account must have at least `amount` in free balance. + * + * - `amount`: The amount of the bid; these funds will be reserved. If the bid is + * successfully elevated into an issued gilt, then these funds will continue to be + * reserved until the gilt expires. Must be at least `MinFreeze`. + * - `duration`: The number of periods for which the funds will be locked if the gilt is + * issued. It will expire only after this period has elapsed after the point of issuance. + * Must be greater than 1 and no more than `QueueCount`. + * + * Complexities: + * - `Queues[duration].len()` (just take max). + */ +export interface GiltCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * Retract a previously placed bid. + * + * Origin must be Signed, and the account should have previously issued a still-active bid + * of `amount` for `duration`. + * + * - `amount`: The amount of the previous bid. + * - `duration`: The duration of the previous bid. + */ +export interface GiltCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * Set target proportion of gilt-funds. + * + * Origin must be `AdminOrigin`. + * + * - `target`: The target proportion of effective issued funds that should be under gilts + * at any one time. + */ +export interface GiltCall_set_target { + __kind: 'set_target' + target: bigint +} + +/** + * Remove an active but expired gilt. Reserved funds under gilt are freed and balance is + * adjusted to ensure that the funds grow or shrink to maintain the equivalent proportion + * of effective total issued funds. + * + * Origin must be Signed and the account must be the owner of the gilt of the given index. + * + * - `index`: The index of the gilt to be thawed. + */ +export interface GiltCall_thaw { + __kind: 'thaw' + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const FastUnstakeCall: sts.Type = sts.closedEnum(() => { + return { + control: sts.enumStruct({ + uncheckedErasToCheck: sts.number(), + }), + deregister: sts.unit(), + register_fast_unstake: sts.unit(), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type FastUnstakeCall = FastUnstakeCall_control | FastUnstakeCall_deregister | FastUnstakeCall_register_fast_unstake + +/** + * Control the operation of this pallet. + * + * Dispatch origin must be signed by the [`Config::ControlOrigin`]. + */ +export interface FastUnstakeCall_control { + __kind: 'control' + uncheckedErasToCheck: number +} + +/** + * Deregister oneself from the fast-unstake. + * + * This is useful if one is registered, they are still waiting, and they change their mind. + * + * Note that the associated stash is still fully unbonded and chilled as a consequence of + * calling `register_fast_unstake`. This should probably be followed by a call to + * `Staking::rebond`. + */ +export interface FastUnstakeCall_deregister { + __kind: 'deregister' +} + +/** + * Register oneself for fast-unstake. + * + * The dispatch origin of this call must be signed by the controller account, similar to + * `staking::unbond`. + * + * The stash associated with the origin must have no ongoing unlocking chunks. If + * successful, this will fully unbond and chill the stash. Then, it will enqueue the stash + * to be checked in further blocks. + * + * If by the time this is called, the stash is actually eligible for fast-unstake, then + * they are guaranteed to remain eligible, because the call will chill them as well. + * + * If the check works, the entire staking data is removed, i.e. the stash is fully + * unstaked. + * + * If the check fails, the stash remains chilled and waiting for being unbonded as in with + * the normal staking system, but they lose part of their unbonding chunks due to consuming + * the chain's resources. + */ +export interface FastUnstakeCall_register_fast_unstake { + __kind: 'register_fast_unstake' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + governance_fallback: sts.enumStruct({ + maybeMaxVoters: sts.option(() => sts.number()), + maybeMaxTargets: sts.option(() => sts.number()), + }), + set_emergency_election_result: sts.enumStruct({ + supports: sts.array(() => sts.tuple(() => [AccountId32, Support])), + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => ElectionScore), + }), + submit: sts.enumStruct({ + rawSolution: RawSolution, + }), + submit_unsigned: sts.enumStruct({ + rawSolution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export const RawSolution: sts.Type = sts.struct(() => { + return { + solution: NposCompactSolution24, + score: ElectionScore, + round: sts.number(), + } +}) + +export const NposCompactSolution24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), + votes2: sts.array(() => sts.tuple(() => [sts.number(), sts.tuple(() => [sts.number(), sts.number()]), sts.number()])), + votes3: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes4: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes5: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes6: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes7: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes8: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes9: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes10: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes11: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes12: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes13: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes14: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes15: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes16: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes17: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes18: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes19: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes20: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes21: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes22: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes23: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes24: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + } +}) + +export interface NposCompactSolution24 { + votes1: [number, number][] + votes2: [number, [number, number], number][] + votes3: [number, [number, number][], number][] + votes4: [number, [number, number][], number][] + votes5: [number, [number, number][], number][] + votes6: [number, [number, number][], number][] + votes7: [number, [number, number][], number][] + votes8: [number, [number, number][], number][] + votes9: [number, [number, number][], number][] + votes10: [number, [number, number][], number][] + votes11: [number, [number, number][], number][] + votes12: [number, [number, number][], number][] + votes13: [number, [number, number][], number][] + votes14: [number, [number, number][], number][] + votes15: [number, [number, number][], number][] + votes16: [number, [number, number][], number][] + votes17: [number, [number, number][], number][] + votes18: [number, [number, number][], number][] + votes19: [number, [number, number][], number][] + votes20: [number, [number, number][], number][] + votes21: [number, [number, number][], number][] + votes22: [number, [number, number][], number][] + votes23: [number, [number, number][], number][] + votes24: [number, [number, number][], number][] +} + +export interface RawSolution { + solution: NposCompactSolution24 + score: ElectionScore + round: number +} + +export interface ElectionScore { + minimalStake: bigint + sumStake: bigint + sumStakeSquared: bigint +} + +export const ElectionScore: sts.Type = sts.struct(() => { + return { + minimalStake: sts.bigint(), + sumStake: sts.bigint(), + sumStakeSquared: sts.bigint(), + } +}) + +export const Support: sts.Type = sts.struct(() => { + return { + total: sts.bigint(), + voters: sts.array(() => sts.tuple(() => [AccountId32, sts.bigint()])), + } +}) + +export interface Support { + total: bigint + voters: [AccountId32, bigint][] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_governance_fallback | ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * Trigger the governance fallback. + * + * This can only be called when [`Phase::Emergency`] is enabled, as an alternative to + * calling [`Call::set_emergency_election_result`]. + */ +export interface ElectionProviderMultiPhaseCall_governance_fallback { + __kind: 'governance_fallback' + maybeMaxVoters?: (number | undefined) + maybeMaxTargets?: (number | undefined) +} + +/** + * Set a solution in the queue, to be handed out to the client of this pallet in the next + * call to `ElectionProvider::elect`. + * + * This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`. + * + * The solution is not checked for any feasibility and is assumed to be trustworthy, as any + * feasibility check itself can in principle cause the election process to fail (due to + * memory/weight constrains). + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + supports: [AccountId32, Support][] +} + +/** + * Set a new value for `MinimumUntrustedScore`. + * + * Dispatch origin must be aligned with `T::ForceOrigin`. + * + * This check can be turned off by setting the value to `None`. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (ElectionScore | undefined) +} + +/** + * Submit a solution for the signed phase. + * + * The dispatch origin fo this call must be __signed__. + * + * The solution is potentially queued, based on the claimed score and processed at the end + * of the signed phase. + * + * A deposit is reserved and recorded for the solution. Based on the outcome, the solution + * might be rewarded, slashed, or get all or a part of the deposit back. + */ +export interface ElectionProviderMultiPhaseCall_submit { + __kind: 'submit' + rawSolution: RawSolution +} + +/** + * Submit a solution for the unsigned phase. + * + * The dispatch origin fo this call must be __none__. + * + * This submission is checked on the fly. Moreover, this unsigned solution is only + * validated when submitted to the pool from the **local** node. Effectively, this means + * that only active validators can submit this transaction when authoring a block (similar + * to an inherent). + * + * To prevent any incorrect solution (and thus wasted time/weight), this transaction will + * panic if the solution submitted by the validator is invalid in any way, effectively + * putting their authoring reward at risk. + * + * No deposit or reward is associated with this submission. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + rawSolution: RawSolution + witness: SolutionOrSnapshotSize +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DmpCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + blacklist: sts.enumStruct({ + proposalHash: H256, + maybeRefIndex: sts.option(() => sts.number()), + }), + cancel_proposal: sts.enumStruct({ + propIndex: sts.number(), + }), + cancel_queued: sts.enumStruct({ + which: sts.number(), + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: MultiAddress, + conviction: Conviction, + balance: sts.bigint(), + }), + emergency_cancel: sts.enumStruct({ + refIndex: sts.number(), + }), + enact_proposal: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + }), + external_propose: sts.enumStruct({ + proposalHash: H256, + }), + external_propose_default: sts.enumStruct({ + proposalHash: H256, + }), + external_propose_majority: sts.enumStruct({ + proposalHash: H256, + }), + fast_track: sts.enumStruct({ + proposalHash: H256, + votingPeriod: sts.number(), + delay: sts.number(), + }), + note_imminent_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_imminent_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + note_preimage_operational: sts.enumStruct({ + encodedProposal: sts.bytes(), + }), + propose: sts.enumStruct({ + proposalHash: H256, + value: sts.bigint(), + }), + reap_preimage: sts.enumStruct({ + proposalHash: H256, + proposalLenUpperBound: sts.number(), + }), + remove_other_vote: sts.enumStruct({ + target: MultiAddress, + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + index: sts.number(), + }), + second: sts.enumStruct({ + proposal: sts.number(), + secondsUpperBound: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: MultiAddress, + }), + veto_external: sts.enumStruct({ + proposalHash: H256, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface AccountVote_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DemocracyCall = DemocracyCall_blacklist | DemocracyCall_cancel_proposal | DemocracyCall_cancel_queued | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_enact_proposal | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_propose | DemocracyCall_reap_preimage | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. + * + * If called on a queued public or external proposal, then this will result in it being + * removed. If the `ref_index` supplied is an active referendum with the proposal hash, + * then it will be cancelled. + * + * The dispatch origin of this call must be `BlacklistOrigin`. + * + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. + * + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). + */ +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: H256 + maybeRefIndex?: (number | undefined) +} + +/** + * Remove a proposal. + * + * The dispatch origin of this call must be `CancelProposalOrigin`. + * + * - `prop_index`: The index of the proposal to cancel. + * + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number +} + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. + * + * - `which`: The index of the referendum to cancel. + * + * Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. + */ +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: number +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must not + * be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: MultiAddress + conviction: Conviction + balance: bigint +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: number +} + +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. + */ +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: H256 + index: number +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Weight: `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: H256 +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: H256 +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: H256 +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. + * Must be always greater than zero. + * For `FastTrackOrigin` must be equal or greater than `FastTrackVotingPeriod`. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: H256 + votingPeriod: number + delay: number +} + +/** + * Register the preimage for an upcoming proposal. This requires the proposal to be + * in the dispatch queue. No deposit is needed. When this call is successful, i.e. + * the preimage has not been uploaded before and matches some imminent proposal, + * no fee is paid. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Bytes +} + +/** + * Register the preimage for an upcoming proposal. This doesn't require the proposal to be + * in the dispatch queue but does require a deposit, returned once enacted. + * + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. + * + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + */ +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Bytes +} + +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Bytes +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + * + * Weight: `O(p)` + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: H256 + value: bigint +} + +/** + * Remove an expired proposal preimage and collect the deposit. + * + * The dispatch origin of this call must be _Signed_. + * + * - `proposal_hash`: The preimage hash of a proposal. + * - `proposal_length_upper_bound`: an upper bound on length of the proposal. Extrinsic is + * weighted according to this value with no refund. + * + * This will only work after `VotingPeriod` blocks from the time that the preimage was + * noted, if it's the same account doing it. If it's a different account, then it'll only + * work an additional `EnactmentPeriod` later. + * + * Emits `PreimageReaped`. + * + * Weight: `O(D)` where D is length of proposal. + */ +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: H256 + proposalLenUpperBound: number +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: MultiAddress + index: number +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: number +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + * - `seconds_upper_bound`: an upper bound on the current number of seconds on this + * proposal. Extrinsic is weighted according to this value with no refund. + * + * Weight: `O(S)` where S is the number of seconds a proposal already has. + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: MultiAddress +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * Weight: `O(V + log(V))` where V is number of `existing vetoers` + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: H256 +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of referendums the voter has voted on. + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: Id, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + contribute_all: sts.enumStruct({ + index: sts.number(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: Id, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId32, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: Signature, + } +}) + +export const Signature = sts.bytes() + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Signature +} + +export type Signature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_contribute_all | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * Add an optional memo to an existing crowdloan contribution. + * + * Origin must be Signed, and the user must have contributed to the crowdloan. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: Id + memo: Bytes +} + +/** + * Contribute to a crowd sale. This will transfer some balance over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * Contribute your entire balance to a crowd sale. This will transfer the entire balance of a user over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute_all { + __kind: 'contribute_all' + index: number + signature?: (MultiSignature | undefined) +} + +/** + * Create a new crowdloaning campaign for a parachain slot with the given lease period range. + * + * This applies a lock to your parachain configuration, ensuring that it cannot be changed + * by the parachain manager. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Remove a fund after the retirement period has ended and all funds have been returned. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * Edit the configuration for an in-progress crowdloan. + * + * Can only be called by Root origin. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Poke the fund into `NewRaise` + * + * Origin must be Signed, and the fund has non-zero raise. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: Id +} + +/** + * Automatically refund contributors of an ended crowdloan. + * Due to weight restrictions, this function may need to be called multiple + * times to fully refund all users. We will refund `RemoveKeysLimit` users at a time. + * + * Origin must be signed, but can come from anyone. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * Withdraw full balance of a specific contributor. + * + * Origin must be signed, but can come from anyone. + * + * The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement + * flag must be set. For a fund to be ready for retirement, then: + * - it must not already be in retirement; + * - the amount of raised funds must be bigger than the _free_ balance of the account; + * - and either: + * - the block number must be at least `end`; or + * - the current lease period must be greater than the fund's `last_period`. + * + * In this case, the fund's retirement flag is set and its `end` is reset to the current block + * number. + * + * - `who`: The account whose contribution should be withdrawn. + * - `index`: The parachain to whose crowdloan the contribution was made. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CouncilCall = CouncilCall_close | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_bypass_consistency_check: sts.enumStruct({ + new: sts.boolean(), + }), + set_chain_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_code_retention_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_conclusion_by_time_out_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_max_spam_slots: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: sts.number(), + }), + set_group_rotation_frequency: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_minimum_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_cores: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_retries: sts.enumStruct({ + new: sts.number(), + }), + set_pvf_checking_enabled: sts.enumStruct({ + new: sts.boolean(), + }), + set_pvf_voting_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_thread_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_ump_max_individual_weight: sts.enumStruct({ + new: Weight, + }), + set_ump_service_total_weight: sts.enumStruct({ + new: Weight, + }), + set_validation_upgrade_cooldown: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ConfigurationCall = ConfigurationCall_set_bypass_consistency_check | ConfigurationCall_set_chain_availability_period | ConfigurationCall_set_code_retention_period | ConfigurationCall_set_dispute_conclusion_by_time_out_period | ConfigurationCall_set_dispute_max_spam_slots | ConfigurationCall_set_dispute_period | ConfigurationCall_set_dispute_post_conclusion_acceptance_period | ConfigurationCall_set_group_rotation_frequency | ConfigurationCall_set_hrmp_channel_max_capacity | ConfigurationCall_set_hrmp_channel_max_message_size | ConfigurationCall_set_hrmp_channel_max_total_size | ConfigurationCall_set_hrmp_max_message_num_per_candidate | ConfigurationCall_set_hrmp_max_parachain_inbound_channels | ConfigurationCall_set_hrmp_max_parachain_outbound_channels | ConfigurationCall_set_hrmp_max_parathread_inbound_channels | ConfigurationCall_set_hrmp_max_parathread_outbound_channels | ConfigurationCall_set_hrmp_open_request_ttl | ConfigurationCall_set_hrmp_recipient_deposit | ConfigurationCall_set_hrmp_sender_deposit | ConfigurationCall_set_max_code_size | ConfigurationCall_set_max_downward_message_size | ConfigurationCall_set_max_head_data_size | ConfigurationCall_set_max_pov_size | ConfigurationCall_set_max_upward_message_num_per_candidate | ConfigurationCall_set_max_upward_message_size | ConfigurationCall_set_max_upward_queue_count | ConfigurationCall_set_max_upward_queue_size | ConfigurationCall_set_max_validators | ConfigurationCall_set_max_validators_per_core | ConfigurationCall_set_minimum_validation_upgrade_delay | ConfigurationCall_set_n_delay_tranches | ConfigurationCall_set_needed_approvals | ConfigurationCall_set_no_show_slots | ConfigurationCall_set_parathread_cores | ConfigurationCall_set_parathread_retries | ConfigurationCall_set_pvf_checking_enabled | ConfigurationCall_set_pvf_voting_ttl | ConfigurationCall_set_relay_vrf_modulo_samples | ConfigurationCall_set_scheduling_lookahead | ConfigurationCall_set_thread_availability_period | ConfigurationCall_set_ump_max_individual_weight | ConfigurationCall_set_ump_service_total_weight | ConfigurationCall_set_validation_upgrade_cooldown | ConfigurationCall_set_validation_upgrade_delay | ConfigurationCall_set_zeroth_delay_tranche_width + +/** + * Setting this to true will disable consistency checks for the configuration setters. + * Use with caution. + */ +export interface ConfigurationCall_set_bypass_consistency_check { + __kind: 'set_bypass_consistency_check' + new: boolean +} + +/** + * Set the availability period for parachains. + */ +export interface ConfigurationCall_set_chain_availability_period { + __kind: 'set_chain_availability_period' + new: number +} + +/** + * Set the acceptance period for an included candidate. + */ +export interface ConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: number +} + +/** + * Set the dispute conclusion by time out period. + */ +export interface ConfigurationCall_set_dispute_conclusion_by_time_out_period { + __kind: 'set_dispute_conclusion_by_time_out_period' + new: number +} + +/** + * Set the maximum number of dispute spam slots. + */ +export interface ConfigurationCall_set_dispute_max_spam_slots { + __kind: 'set_dispute_max_spam_slots' + new: number +} + +/** + * Set the dispute period, in number of sessions to keep for disputes. + */ +export interface ConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: number +} + +/** + * Set the dispute post conclusion acceptance period. + */ +export interface ConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: number +} + +/** + * Set the parachain validator-group rotation frequency + */ +export interface ConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: number +} + +/** + * Sets the maximum number of messages allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * Sets the maximum size of a message that could ever be put into an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * Sets the maximum total size of messages in bytes allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * Sets the maximum number of outbound HRMP messages can be sent by a candidate. + */ +export interface ConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parachain is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parachain is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parathread is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_inbound_channels { + __kind: 'set_hrmp_max_parathread_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parathread is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_outbound_channels { + __kind: 'set_hrmp_max_parathread_outbound_channels' + new: number +} + +/** + * Sets the number of sessions after which an HRMP open channel request expires. + */ +export interface ConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * Sets the amount of funds that the recipient should provide for accepting opening an HRMP + * channel. + */ +export interface ConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: bigint +} + +/** + * Sets the amount of funds that the sender should provide for opening an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: bigint +} + +/** + * Set the max validation code size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * Set the critical downward message size. + */ +export interface ConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * Set the max head data size for paras. + */ +export interface ConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * Set the max POV block size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * Sets the maximum number of messages that a candidate can contain. + */ +export interface ConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum size of an upward message that can be sent by a candidate. + */ +export interface ConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * Sets the maximum items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * Sets the maximum total size of items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * Set the maximum number of validators to use in parachain consensus. + */ +export interface ConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * Set the maximum number of validators to assign to any core. + */ +export interface ConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * Sets the minimum delay between announcing the upgrade block for a parachain until the + * upgrade taking place. + * + * See the field documentation for information and constraints for the new value. + */ +export interface ConfigurationCall_set_minimum_validation_upgrade_delay { + __kind: 'set_minimum_validation_upgrade_delay' + new: number +} + +/** + * Set the total number of delay tranches. + */ +export interface ConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * Set the number of validators needed to approve a block. + */ +export interface ConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * Set the no show slots, in number of number of consensus slots. + * Must be at least 1. + */ +export interface ConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * Set the number of parathread execution cores. + */ +export interface ConfigurationCall_set_parathread_cores { + __kind: 'set_parathread_cores' + new: number +} + +/** + * Set the number of retries for a particular parathread. + */ +export interface ConfigurationCall_set_parathread_retries { + __kind: 'set_parathread_retries' + new: number +} + +/** + * Enable or disable PVF pre-checking. Consult the field documentation prior executing. + */ +export interface ConfigurationCall_set_pvf_checking_enabled { + __kind: 'set_pvf_checking_enabled' + new: boolean +} + +/** + * Set the number of session changes after which a PVF pre-checking voting is rejected. + */ +export interface ConfigurationCall_set_pvf_voting_ttl { + __kind: 'set_pvf_voting_ttl' + new: number +} + +/** + * Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion. + */ +export interface ConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * Set the scheduling lookahead, in expected number of blocks at peak throughput. + */ +export interface ConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * Set the availability period for parathreads. + */ +export interface ConfigurationCall_set_thread_availability_period { + __kind: 'set_thread_availability_period' + new: number +} + +/** + * Sets the maximum amount of weight any individual upward message may consume. + */ +export interface ConfigurationCall_set_ump_max_individual_weight { + __kind: 'set_ump_max_individual_weight' + new: Weight +} + +/** + * Sets the soft limit for the phase of dispatching dispatchable upward messages. + */ +export interface ConfigurationCall_set_ump_service_total_weight { + __kind: 'set_ump_service_total_weight' + new: Weight +} + +/** + * Set the validation upgrade cooldown. + */ +export interface ConfigurationCall_set_validation_upgrade_cooldown { + __kind: 'set_validation_upgrade_cooldown' + new: number +} + +/** + * Set the validation upgrade delay. + */ +export interface ConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: number +} + +/** + * Set the zeroth delay tranche width. + */ +export interface ConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: sts.bigint(), + vestingSchedule: sts.option(() => sts.tuple(() => [sts.bigint(), sts.bigint(), sts.number()])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId32), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId32 + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId32 + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: bigint + vestingSchedule?: ([bigint, bigint, number] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId32 | undefined) +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ChildBountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + add_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + value: sts.bigint(), + description: sts.bytes(), + }), + award_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + close_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + propose_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ChildBountiesCall = ChildBountiesCall_accept_curator | ChildBountiesCall_add_child_bounty | ChildBountiesCall_award_child_bounty | ChildBountiesCall_claim_child_bounty | ChildBountiesCall_close_child_bounty | ChildBountiesCall_propose_curator | ChildBountiesCall_unassign_curator + +/** + * Accept the curator role for the child-bounty. + * + * The dispatch origin for this call must be the curator of this + * child-bounty. + * + * A deposit will be reserved from the curator and refund upon + * successful payout or cancellation. + * + * Fee for curator is deducted from curator fee of parent bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in "CuratorProposed" state, for processing the + * call. And state of child-bounty is moved to "Active" on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_accept_curator { + __kind: 'accept_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Add a new child-bounty. + * + * The dispatch origin for this call must be the curator of parent + * bounty and the parent bounty must be in "active" state. + * + * Child-bounty gets added successfully & fund gets transferred from + * parent bounty to child-bounty account, if parent bounty has enough + * funds, else the call fails. + * + * Upper bound to maximum number of active child bounties that can be + * added are managed via runtime trait config + * [`Config::MaxActiveChildBountyCount`]. + * + * If the call is success, the status of child-bounty is updated to + * "Added". + * + * - `parent_bounty_id`: Index of parent bounty for which child-bounty is being added. + * - `value`: Value for executing the proposal. + * - `description`: Text description for the child-bounty. + */ +export interface ChildBountiesCall_add_child_bounty { + __kind: 'add_child_bounty' + parentBountyId: number + value: bigint + description: Bytes +} + +/** + * Award child-bounty to a beneficiary. + * + * The beneficiary will be able to claim the funds after a delay. + * + * The dispatch origin for this call must be the parent curator or + * curator of this child-bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in active state, for processing the call. And + * state of child-bounty is moved to "PendingPayout" on successful call + * completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + * - `beneficiary`: Beneficiary account. + */ +export interface ChildBountiesCall_award_child_bounty { + __kind: 'award_child_bounty' + parentBountyId: number + childBountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded child-bounty after payout delay. + * + * The dispatch origin for this call may be any signed origin. + * + * Call works independent of parent bounty state, No need for parent + * bounty to be in active state. + * + * The Beneficiary is paid out with agreed bounty value. Curator fee is + * paid & curator deposit is unreserved. + * + * Child-bounty must be in "PendingPayout" state, for processing the + * call. And instance of child-bounty is removed from the state on + * successful call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_claim_child_bounty { + __kind: 'claim_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * Cancel a proposed or active child-bounty. Child-bounty account funds + * are transferred to parent bounty account. The child-bounty curator + * deposit may be unreserved if possible. + * + * The dispatch origin for this call must be either parent curator or + * `T::RejectOrigin`. + * + * If the state of child-bounty is `Active`, curator deposit is + * unreserved. + * + * If the state of child-bounty is `PendingPayout`, call fails & + * returns `PendingPayout` error. + * + * For the origin other than T::RejectOrigin, parent bounty must be in + * active state, for this child-bounty call to work. For origin + * T::RejectOrigin execution is forced. + * + * Instance of child-bounty is removed from the state on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_close_child_bounty { + __kind: 'close_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * Propose curator for funded child-bounty. + * + * The dispatch origin for this call must be curator of parent bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in "Added" state, for processing the call. And + * state of child-bounty is moved to "CuratorProposed" on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + * - `curator`: Address of child-bounty curator. + * - `fee`: payment fee to child-bounty curator for execution. + */ +export interface ChildBountiesCall_propose_curator { + __kind: 'propose_curator' + parentBountyId: number + childBountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a child-bounty. + * + * The dispatch origin for this call can be either `RejectOrigin`, or + * the curator of the parent bounty, or any signed origin. + * + * For the origin other than T::RejectOrigin and the child-bounty + * curator, parent bounty must be in active state, for this call to + * work. We allow child-bounty curator and T::RejectOrigin to execute + * this call irrespective of the parent bounty state. + * + * If this function is called by the `RejectOrigin` or the + * parent bounty curator, we assume that the child-bounty curator is + * malicious or inactive. As a result, child-bounty curator deposit is + * slashed. + * + * If the origin is the child-bounty curator, we take this as a sign + * that they are unable to do their job, and are willingly giving up. + * We could slash the deposit, but for now we allow them to unreserve + * their deposit and exit without issue. (We may want to change this if + * it is abused.) + * + * Finally, the origin can be anyone iff the child-bounty curator is + * "inactive". Expiry update due of parent bounty is used to estimate + * inactive state of child-bounty curator. + * + * This allows anyone in the community to call out that a child-bounty + * curator is not doing their due diligence, and we should pick a new + * one. In this case the child-bounty curator deposit is slashed. + * + * State of child-bounty is moved to Added state on successful call + * completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_unassign_curator { + __kind: 'unassign_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds + * after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is + * malicious or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_force_unreserve | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_all | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is not + * assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * Unreserve some balance from a user by force. + * + * Can only be called by ROOT. + */ +export interface BalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also alter the total issuance of the system (`TotalIssuance`) appropriately. + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: MultiAddress + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for input config + * types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex + * computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional check + * that the transfer will not kill the origin account. + * --------------------------------- + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: MultiAddress + value: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). # + * - O(1). Just like transfer, but reading the user's transferable balance first. + * # + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const EquivocationProof: sts.Type = sts.struct(() => { + return { + offender: sts.bytes(), + slot: Slot, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Slot = sts.bigint() + +export interface EquivocationProof { + offender: Bytes + slot: Slot + firstHeader: Header + secondHeader: Header +} + +export type Slot = bigint + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V1: sts.enumStruct({ + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + }), + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type NextConfigDescriptor = NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Plan an epoch config change. The epoch config change is recorded and will be enacted on + * the next call to `enact_epoch_change`. The config will be activated one epoch after. + * Multiple calls to this method will replace any existing planned config change that had + * not been enacted yet. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Cancel an in-progress auction. + * + * Can only be called by Root origin. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +export type Call = Call_Auctions | Call_Authorship | Call_Babe | Call_Balances | Call_Bounties | Call_ChildBounties | Call_Claims | Call_Configuration | Call_Council | Call_Crowdloan | Call_Democracy | Call_Dmp | Call_ElectionProviderMultiPhase | Call_FastUnstake | Call_Gilt | Call_Grandpa | Call_Hrmp | Call_Identity | Call_ImOnline | Call_Indices | Call_Initializer | Call_Multisig | Call_NominationPools | Call_ParaInclusion | Call_ParaInherent | Call_Paras | Call_ParasDisputes | Call_ParasShared | Call_PhragmenElection | Call_Preimage | Call_Proxy | Call_Recovery | Call_Registrar | Call_Scheduler | Call_Session | Call_Slots | Call_Society | Call_Staking | Call_System | Call_TechnicalCommittee | Call_TechnicalMembership | Call_Timestamp | Call_Tips | Call_Treasury | Call_Ump | Call_Utility | Call_Vesting | Call_VoterList | Call_XcmPallet + +export interface Call_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Call_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Call_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Call_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Call_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Call_ChildBounties { + __kind: 'ChildBounties' + value: ChildBountiesCall +} + +export interface Call_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Call_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Call_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Call_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Call_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Call_Dmp { + __kind: 'Dmp' + value: DmpCall +} + +export interface Call_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Call_FastUnstake { + __kind: 'FastUnstake' + value: FastUnstakeCall +} + +export interface Call_Gilt { + __kind: 'Gilt' + value: GiltCall +} + +export interface Call_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Call_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Call_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Call_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Call_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Call_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Call_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Call_NominationPools { + __kind: 'NominationPools' + value: NominationPoolsCall +} + +export interface Call_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Call_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Call_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Call_ParasDisputes { + __kind: 'ParasDisputes' + value: ParasDisputesCall +} + +export interface Call_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Call_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Call_Preimage { + __kind: 'Preimage' + value: PreimageCall +} + +export interface Call_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Call_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Call_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Call_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Call_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Call_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Call_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Call_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Call_System { + __kind: 'System' + value: SystemCall +} + +export interface Call_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Call_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Call_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Call_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Call_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Call_Ump { + __kind: 'Ump' + value: UmpCall +} + +export interface Call_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Call_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Call_VoterList { + __kind: 'VoterList' + value: VoterListCall +} + +export interface Call_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const MultiAddress: sts.Type = sts.closedEnum(() => { + return { + Address20: sts.bytes(), + Address32: sts.bytes(), + Id: AccountId32, + Index: sts.unit(), + Raw: sts.bytes(), + } +}) + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Society: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId32 = sts.bytes() diff --git a/squid/src/types/v9320.ts b/squid/src/types/v9320.ts new file mode 100644 index 00000000..0dd1f161 --- /dev/null +++ b/squid/src/types/v9320.ts @@ -0,0 +1,13133 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Weight: sts.Type = sts.struct(() => { + return { + refTime: sts.bigint(), + proofSize: sts.bigint(), + } +}) + +export interface Weight { + refTime: bigint + proofSize: bigint +} + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: sts.number(), + index: sts.number(), + } +}) + +export interface Timepoint { + height: number + index: number +} + +export const AccountId32 = sts.bytes() + +export const Call: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + ChildBounties: ChildBountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + ConvictionVoting: ConvictionVotingCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + Dmp: DmpCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + FastUnstake: FastUnstakeCall, + FellowshipCollective: FellowshipCollectiveCall, + FellowshipReferenda: FellowshipReferendaCall, + Gilt: GiltCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Initializer: InitializerCall, + Multisig: MultisigCall, + NominationPools: NominationPoolsCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Paras: ParasCall, + ParasDisputes: ParasDisputesCall, + ParasShared: ParasSharedCall, + PhragmenElection: PhragmenElectionCall, + Preimage: PreimageCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Referenda: ReferendaCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Ump: UmpCall, + Utility: UtilityCall, + Vesting: VestingCall, + VoterList: VoterListCall, + Whitelist: WhitelistCall, + XcmPallet: XcmPalletCall, + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + execute: sts.enumStruct({ + message: Type_424, + maxWeight: sts.bigint(), + }), + force_default_xcm_version: sts.enumStruct({ + maybeXcmVersion: sts.option(() => sts.number()), + }), + force_subscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_unsubscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_xcm_version: sts.enumStruct({ + location: V1MultiLocation, + xcmVersion: sts.number(), + }), + limited_reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + limited_teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + send: sts.enumStruct({ + dest: VersionedMultiLocation, + message: VersionedXcm, + }), + teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + } +}) + +export const VersionedXcm: sts.Type = sts.closedEnum(() => { + return { + V0: V0Xcm, + V1: V1Xcm, + V2: sts.array(() => V2Instruction), + } +}) + +export const V2Instruction: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => V2Instruction), + SetErrorHandler: sts.array(() => V2Instruction), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const DoubleEncoded: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncoded { + encoded: Bytes +} + +export const V0OriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type V0OriginKind = V0OriginKind_Native | V0OriginKind_SovereignAccount | V0OriginKind_Superuser | V0OriginKind_Xcm + +export interface V0OriginKind_Native { + __kind: 'Native' +} + +export interface V0OriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface V0OriginKind_Superuser { + __kind: 'Superuser' +} + +export interface V0OriginKind_Xcm { + __kind: 'Xcm' +} + +export const V2Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V2Error])), + Null: sts.unit(), + Version: sts.number(), + } +}) + +export const V2Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + MaxWeightInvalid: sts.unit(), + MultiLocationFull: sts.unit(), + MultiLocationNotInvertible: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + WeightLimitReached: sts.bigint(), + WeightNotComputable: sts.unit(), + } +}) + +export type V2Error = V2Error_AssetNotFound | V2Error_BadOrigin | V2Error_Barrier | V2Error_DestinationUnsupported | V2Error_ExceedsMaxMessageSize | V2Error_FailedToDecode | V2Error_FailedToTransactAsset | V2Error_InvalidLocation | V2Error_LocationCannotHold | V2Error_MaxWeightInvalid | V2Error_MultiLocationFull | V2Error_MultiLocationNotInvertible | V2Error_NotHoldingFees | V2Error_NotWithdrawable | V2Error_Overflow | V2Error_TooExpensive | V2Error_Transport | V2Error_Trap | V2Error_UnhandledXcmVersion | V2Error_Unimplemented | V2Error_UnknownClaim | V2Error_Unroutable | V2Error_UntrustedReserveLocation | V2Error_UntrustedTeleportLocation | V2Error_WeightLimitReached | V2Error_WeightNotComputable + +export interface V2Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V2Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V2Error_Barrier { + __kind: 'Barrier' +} + +export interface V2Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V2Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V2Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V2Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V2Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V2Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V2Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V2Error_MultiLocationFull { + __kind: 'MultiLocationFull' +} + +export interface V2Error_MultiLocationNotInvertible { + __kind: 'MultiLocationNotInvertible' +} + +export interface V2Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V2Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V2Error_Overflow { + __kind: 'Overflow' +} + +export interface V2Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V2Error_Transport { + __kind: 'Transport' +} + +export interface V2Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V2Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V2Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V2Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V2Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V2Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V2Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: bigint +} + +export interface V2Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V2Response = V2Response_Assets | V2Response_ExecutionResult | V2Response_Null | V2Response_Version + +export interface V2Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V2Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V2Error] | undefined) +} + +export interface V2Response_Null { + __kind: 'Null' +} + +export interface V2Response_Version { + __kind: 'Version' + value: number +} + +export interface V1MultiAsset { + id: V1AssetId + fun: V1Fungibility +} + +export type V1Fungibility = V1Fungibility_Fungible | V1Fungibility_NonFungible + +export interface V1Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V1Fungibility_NonFungible { + __kind: 'NonFungible' + value: V1AssetInstance +} + +export type V1AssetInstance = V1AssetInstance_Array16 | V1AssetInstance_Array32 | V1AssetInstance_Array4 | V1AssetInstance_Array8 | V1AssetInstance_Blob | V1AssetInstance_Index | V1AssetInstance_Undefined + +export interface V1AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V1AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V1AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V1AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V1AssetInstance_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface V1AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V1AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V1AssetId = V1AssetId_Abstract | V1AssetId_Concrete + +export interface V1AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V1AssetId_Concrete { + __kind: 'Concrete' + value: V1MultiLocation +} + +export interface V1MultiLocation { + parents: number + interior: V1Junctions +} + +export type V1Junctions = V1Junctions_Here | V1Junctions_X1 | V1Junctions_X2 | V1Junctions_X3 | V1Junctions_X4 | V1Junctions_X5 | V1Junctions_X6 | V1Junctions_X7 | V1Junctions_X8 + +export interface V1Junctions_Here { + __kind: 'Here' +} + +export interface V1Junctions_X1 { + __kind: 'X1' + value: V1Junction +} + +export interface V1Junctions_X2 { + __kind: 'X2' + value: [V1Junction, V1Junction] +} + +export interface V1Junctions_X3 { + __kind: 'X3' + value: [V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X4 { + __kind: 'X4' + value: [V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X5 { + __kind: 'X5' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X6 { + __kind: 'X6' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X7 { + __kind: 'X7' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X8 { + __kind: 'X8' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export type V1Junction = V1Junction_AccountId32 | V1Junction_AccountIndex64 | V1Junction_AccountKey20 | V1Junction_GeneralIndex | V1Junction_GeneralKey | V1Junction_OnlyChild | V1Junction_PalletInstance | V1Junction_Parachain | V1Junction_Plurality + +export interface V1Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V1Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V1Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V1Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V1Junction_GeneralKey { + __kind: 'GeneralKey' + value: WeakBoundedVec +} + +export interface V1Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V1Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V1Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V1Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0BodyPart = V0BodyPart_AtLeastProportion | V0BodyPart_Fraction | V0BodyPart_Members | V0BodyPart_MoreThanProportion | V0BodyPart_Voice + +export interface V0BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V0BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V0BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Voice { + __kind: 'Voice' +} + +export type V0BodyId = V0BodyId_Executive | V0BodyId_Index | V0BodyId_Judicial | V0BodyId_Legislative | V0BodyId_Named | V0BodyId_Technical | V0BodyId_Unit + +export interface V0BodyId_Executive { + __kind: 'Executive' +} + +export interface V0BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V0BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V0BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V0BodyId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V0BodyId_Technical { + __kind: 'Technical' +} + +export interface V0BodyId_Unit { + __kind: 'Unit' +} + +export type WeakBoundedVec = Bytes + +export type V0NetworkId = V0NetworkId_Any | V0NetworkId_Kusama | V0NetworkId_Named | V0NetworkId_Polkadot + +export interface V0NetworkId_Any { + __kind: 'Any' +} + +export interface V0NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V0NetworkId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V0NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export const V1Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V1Junction, + X2: sts.tuple(() => [V1Junction, V1Junction]), + X3: sts.tuple(() => [V1Junction, V1Junction, V1Junction]), + X4: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction]), + X5: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X6: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X7: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X8: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + } +}) + +export const V1Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: WeakBoundedVec, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export const V0BodyId: sts.Type = sts.closedEnum(() => { + return { + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: WeakBoundedVec, + Technical: sts.unit(), + Unit: sts.unit(), + } +}) + +export const WeakBoundedVec = sts.bytes() + +export const V0NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: WeakBoundedVec, + Polkadot: sts.unit(), + } +}) + +export const V1MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V1MultiAsset), + Wild: V1WildMultiAsset, + } +}) + +export const V1WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllOf: sts.enumStruct({ + id: V1AssetId, + fun: V1WildFungibility, + }), + } +}) + +export const V1WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V1WildFungibility = V1WildFungibility_Fungible | V1WildFungibility_NonFungible + +export interface V1WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V1WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V1AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V1MultiLocation, + } +}) + +export type V1WildMultiAsset = V1WildMultiAsset_All | V1WildMultiAsset_AllOf + +export interface V1WildMultiAsset_All { + __kind: 'All' +} + +export interface V1WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V1AssetId + fun: V1WildFungibility +} + +export type V1MultiAssetFilter = V1MultiAssetFilter_Definite | V1MultiAssetFilter_Wild + +export interface V1MultiAssetFilter_Definite { + __kind: 'Definite' + value: V1MultiAsset[] +} + +export interface V1MultiAssetFilter_Wild { + __kind: 'Wild' + value: V1WildMultiAsset +} + +export const V1MultiAsset: sts.Type = sts.struct(() => { + return { + id: V1AssetId, + fun: V1Fungibility, + } +}) + +export const V1Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V1AssetInstance, + } +}) + +export const V1AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V2Instruction = V2Instruction_BuyExecution | V2Instruction_ClaimAsset | V2Instruction_ClearError | V2Instruction_ClearOrigin | V2Instruction_DepositAsset | V2Instruction_DepositReserveAsset | V2Instruction_DescendOrigin | V2Instruction_ExchangeAsset | V2Instruction_HrmpChannelAccepted | V2Instruction_HrmpChannelClosing | V2Instruction_HrmpNewChannelOpenRequest | V2Instruction_InitiateReserveWithdraw | V2Instruction_InitiateTeleport | V2Instruction_QueryHolding | V2Instruction_QueryResponse | V2Instruction_ReceiveTeleportedAsset | V2Instruction_RefundSurplus | V2Instruction_ReportError | V2Instruction_ReserveAssetDeposited | V2Instruction_SetAppendix | V2Instruction_SetErrorHandler | V2Instruction_SubscribeVersion | V2Instruction_Transact | V2Instruction_TransferAsset | V2Instruction_TransferReserveAsset | V2Instruction_Trap | V2Instruction_UnsubscribeVersion | V2Instruction_WithdrawAsset + +export interface V2Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface V2Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface V2Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V2Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V2Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V2Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface V2Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V2Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V2Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V2Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V2Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface V2Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface V2Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface V2Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V2Instruction_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface V2Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface V2Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V2Instruction[] +} + +export interface V2Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V2Instruction[] +} + +export interface V2Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V2Instruction_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V2Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V2Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V2Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export type V2WeightLimit = V2WeightLimit_Limited | V2WeightLimit_Unlimited + +export interface V2WeightLimit_Limited { + __kind: 'Limited' + value: bigint +} + +export interface V2WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V1Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: V1Xcm, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + } +}) + +export const V1Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => V1Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type V1Order = V1Order_BuyExecution | V1Order_DepositAsset | V1Order_DepositReserveAsset | V1Order_ExchangeAsset | V1Order_InitiateReserveWithdraw | V1Order_InitiateTeleport | V1Order_Noop | V1Order_QueryHolding + +export interface V1Order_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: V1Xcm[] +} + +export interface V1Order_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V1Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V1Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_Noop { + __kind: 'Noop' +} + +export interface V1Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export const V1Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + Version: sts.number(), + } +}) + +export type V1Response = V1Response_Assets | V1Response_Version + +export interface V1Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V1Response_Version { + __kind: 'Version' + value: number +} + +export type V1Xcm = V1Xcm_HrmpChannelAccepted | V1Xcm_HrmpChannelClosing | V1Xcm_HrmpNewChannelOpenRequest | V1Xcm_QueryResponse | V1Xcm_ReceiveTeleportedAsset | V1Xcm_RelayedFrom | V1Xcm_ReserveAssetDeposited | V1Xcm_SubscribeVersion | V1Xcm_Transact | V1Xcm_TransferAsset | V1Xcm_TransferReserveAsset | V1Xcm_UnsubscribeVersion | V1Xcm_WithdrawAsset + +export interface V1Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V1Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V1Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V1Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface V1Xcm_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: V1Xcm +} + +export interface V1Xcm_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V1Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V1Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V1Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Xcm_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V1Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export const V0Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: V0Xcm, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + } +}) + +export const V0Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => V0Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type V0Order = V0Order_BuyExecution | V0Order_DepositAsset | V0Order_DepositReserveAsset | V0Order_ExchangeAsset | V0Order_InitiateReserveWithdraw | V0Order_InitiateTeleport | V0Order_Null | V0Order_QueryHolding + +export interface V0Order_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: V0Xcm[] +} + +export interface V0Order_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface V0Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_Null { + __kind: 'Null' +} + +export interface V0Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type V0MultiLocation = V0MultiLocation_Null | V0MultiLocation_X1 | V0MultiLocation_X2 | V0MultiLocation_X3 | V0MultiLocation_X4 | V0MultiLocation_X5 | V0MultiLocation_X6 | V0MultiLocation_X7 | V0MultiLocation_X8 + +export interface V0MultiLocation_Null { + __kind: 'Null' +} + +export interface V0MultiLocation_X1 { + __kind: 'X1' + value: V0Junction +} + +export interface V0MultiLocation_X2 { + __kind: 'X2' + value: [V0Junction, V0Junction] +} + +export interface V0MultiLocation_X3 { + __kind: 'X3' + value: [V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X4 { + __kind: 'X4' + value: [V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X5 { + __kind: 'X5' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X6 { + __kind: 'X6' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X7 { + __kind: 'X7' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X8 { + __kind: 'X8' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export type V0Junction = V0Junction_AccountId32 | V0Junction_AccountIndex64 | V0Junction_AccountKey20 | V0Junction_GeneralIndex | V0Junction_GeneralKey | V0Junction_OnlyChild | V0Junction_PalletInstance | V0Junction_Parachain | V0Junction_Parent | V0Junction_Plurality + +export interface V0Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V0Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V0Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V0Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V0Junction_GeneralKey { + __kind: 'GeneralKey' + value: WeakBoundedVec +} + +export interface V0Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V0Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V0Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V0Junction_Parent { + __kind: 'Parent' +} + +export interface V0Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0MultiAsset = V0MultiAsset_AbstractFungible | V0MultiAsset_AbstractNonFungible | V0MultiAsset_All | V0MultiAsset_AllAbstractFungible | V0MultiAsset_AllAbstractNonFungible | V0MultiAsset_AllConcreteFungible | V0MultiAsset_AllConcreteNonFungible | V0MultiAsset_AllFungible | V0MultiAsset_AllNonFungible | V0MultiAsset_ConcreteFungible | V0MultiAsset_ConcreteNonFungible | V0MultiAsset_None + +export interface V0MultiAsset_AbstractFungible { + __kind: 'AbstractFungible' + id: Bytes + amount: bigint +} + +export interface V0MultiAsset_AbstractNonFungible { + __kind: 'AbstractNonFungible' + class: Bytes + instance: V1AssetInstance +} + +export interface V0MultiAsset_All { + __kind: 'All' +} + +export interface V0MultiAsset_AllAbstractFungible { + __kind: 'AllAbstractFungible' + id: Bytes +} + +export interface V0MultiAsset_AllAbstractNonFungible { + __kind: 'AllAbstractNonFungible' + class: Bytes +} + +export interface V0MultiAsset_AllConcreteFungible { + __kind: 'AllConcreteFungible' + id: V0MultiLocation +} + +export interface V0MultiAsset_AllConcreteNonFungible { + __kind: 'AllConcreteNonFungible' + class: V0MultiLocation +} + +export interface V0MultiAsset_AllFungible { + __kind: 'AllFungible' +} + +export interface V0MultiAsset_AllNonFungible { + __kind: 'AllNonFungible' +} + +export interface V0MultiAsset_ConcreteFungible { + __kind: 'ConcreteFungible' + id: V0MultiLocation + amount: bigint +} + +export interface V0MultiAsset_ConcreteNonFungible { + __kind: 'ConcreteNonFungible' + class: V0MultiLocation + instance: V1AssetInstance +} + +export interface V0MultiAsset_None { + __kind: 'None' +} + +export const V0MultiAsset: sts.Type = sts.closedEnum(() => { + return { + AbstractFungible: sts.enumStruct({ + id: sts.bytes(), + amount: sts.bigint(), + }), + AbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + instance: V1AssetInstance, + }), + All: sts.unit(), + AllAbstractFungible: sts.enumStruct({ + id: sts.bytes(), + }), + AllAbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + }), + AllConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + }), + AllConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + }), + AllFungible: sts.unit(), + AllNonFungible: sts.unit(), + ConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + amount: sts.bigint(), + }), + ConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + instance: V1AssetInstance, + }), + None: sts.unit(), + } +}) + +export const V0MultiLocation: sts.Type = sts.closedEnum(() => { + return { + Null: sts.unit(), + X1: V0Junction, + X2: sts.tuple(() => [V0Junction, V0Junction]), + X3: sts.tuple(() => [V0Junction, V0Junction, V0Junction]), + X4: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction]), + X5: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X6: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X7: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X8: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + } +}) + +export const V0Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: WeakBoundedVec, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Parent: sts.unit(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V0MultiAsset), + } +}) + +export type V0Response = V0Response_Assets + +export interface V0Response_Assets { + __kind: 'Assets' + value: V0MultiAsset[] +} + +export type V0Xcm = V0Xcm_HrmpChannelAccepted | V0Xcm_HrmpChannelClosing | V0Xcm_HrmpNewChannelOpenRequest | V0Xcm_QueryResponse | V0Xcm_RelayedFrom | V0Xcm_ReserveAssetDeposit | V0Xcm_TeleportAsset | V0Xcm_Transact | V0Xcm_TransferAsset | V0Xcm_TransferReserveAsset | V0Xcm_WithdrawAsset + +export interface V0Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V0Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V0Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V0Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface V0Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: V0Xcm +} + +export interface V0Xcm_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V0Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export type VersionedXcm = VersionedXcm_V0 | VersionedXcm_V1 | VersionedXcm_V2 + +export interface VersionedXcm_V0 { + __kind: 'V0' + value: V0Xcm +} + +export interface VersionedXcm_V1 { + __kind: 'V1' + value: V1Xcm +} + +export interface VersionedXcm_V2 { + __kind: 'V2' + value: V2Instruction[] +} + +export const V2WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: sts.bigint(), + Unlimited: sts.unit(), + } +}) + +export const VersionedMultiAssets: sts.Type = sts.closedEnum(() => { + return { + V0: sts.array(() => V0MultiAsset), + V1: sts.array(() => V1MultiAsset), + } +}) + +export type VersionedMultiAssets = VersionedMultiAssets_V0 | VersionedMultiAssets_V1 + +export interface VersionedMultiAssets_V0 { + __kind: 'V0' + value: V0MultiAsset[] +} + +export interface VersionedMultiAssets_V1 { + __kind: 'V1' + value: V1MultiAsset[] +} + +export const V1MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V1Junctions, + } +}) + +export const VersionedMultiLocation: sts.Type = sts.closedEnum(() => { + return { + V0: V0MultiLocation, + V1: V1MultiLocation, + } +}) + +export type VersionedMultiLocation = VersionedMultiLocation_V0 | VersionedMultiLocation_V1 + +export interface VersionedMultiLocation_V0 { + __kind: 'V0' + value: V0MultiLocation +} + +export interface VersionedMultiLocation_V1 { + __kind: 'V1' + value: V1MultiLocation +} + +export const Type_424: sts.Type = sts.closedEnum(() => { + return { + V0: Type_425, + V1: Type_430, + V2: sts.array(() => Type_436), + } +}) + +export const Type_436: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => Type_436), + SetErrorHandler: sts.array(() => Type_436), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_429, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const Type_429: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface Type_429 { + encoded: Bytes +} + +export type Type_436 = Type_436_BuyExecution | Type_436_ClaimAsset | Type_436_ClearError | Type_436_ClearOrigin | Type_436_DepositAsset | Type_436_DepositReserveAsset | Type_436_DescendOrigin | Type_436_ExchangeAsset | Type_436_HrmpChannelAccepted | Type_436_HrmpChannelClosing | Type_436_HrmpNewChannelOpenRequest | Type_436_InitiateReserveWithdraw | Type_436_InitiateTeleport | Type_436_QueryHolding | Type_436_QueryResponse | Type_436_ReceiveTeleportedAsset | Type_436_RefundSurplus | Type_436_ReportError | Type_436_ReserveAssetDeposited | Type_436_SetAppendix | Type_436_SetErrorHandler | Type_436_SubscribeVersion | Type_436_Transact | Type_436_TransferAsset | Type_436_TransferReserveAsset | Type_436_Trap | Type_436_UnsubscribeVersion | Type_436_WithdrawAsset + +export interface Type_436_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface Type_436_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface Type_436_ClearError { + __kind: 'ClearError' +} + +export interface Type_436_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_436_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_436_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_436_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface Type_436_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_436_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_436_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_436_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_436_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_436_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_436_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface Type_436_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface Type_436_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface Type_436_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_436_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface Type_436_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface Type_436_SetAppendix { + __kind: 'SetAppendix' + value: Type_436[] +} + +export interface Type_436_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_436[] +} + +export interface Type_436_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_436_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_429 +} + +export interface Type_436_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_436_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_436_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_436_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_436_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export const Type_430: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_432), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: Type_430, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_432), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_429, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_432), + }), + } +}) + +export const Type_432: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => Type_430), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type Type_432 = Type_432_BuyExecution | Type_432_DepositAsset | Type_432_DepositReserveAsset | Type_432_ExchangeAsset | Type_432_InitiateReserveWithdraw | Type_432_InitiateTeleport | Type_432_Noop | Type_432_QueryHolding + +export interface Type_432_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: Type_430[] +} + +export interface Type_432_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_432_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_432_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_432_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface Type_432_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_432_Noop { + __kind: 'Noop' +} + +export interface Type_432_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export type Type_430 = Type_430_HrmpChannelAccepted | Type_430_HrmpChannelClosing | Type_430_HrmpNewChannelOpenRequest | Type_430_QueryResponse | Type_430_ReceiveTeleportedAsset | Type_430_RelayedFrom | Type_430_ReserveAssetDeposited | Type_430_SubscribeVersion | Type_430_Transact | Type_430_TransferAsset | Type_430_TransferReserveAsset | Type_430_UnsubscribeVersion | Type_430_WithdrawAsset + +export interface Type_430_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_430_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_430_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_430_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface Type_430_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: Type_432[] +} + +export interface Type_430_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: Type_430 +} + +export interface Type_430_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: Type_432[] +} + +export interface Type_430_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_430_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_429 +} + +export interface Type_430_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_430_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_430_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_430_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: Type_432[] +} + +export const Type_425: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: Type_425, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_427), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_427), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_429, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_427), + }), + } +}) + +export const Type_427: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => Type_425), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type Type_427 = Type_427_BuyExecution | Type_427_DepositAsset | Type_427_DepositReserveAsset | Type_427_ExchangeAsset | Type_427_InitiateReserveWithdraw | Type_427_InitiateTeleport | Type_427_Null | Type_427_QueryHolding + +export interface Type_427_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: Type_425[] +} + +export interface Type_427_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_427_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_427_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface Type_427_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface Type_427_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_427_Null { + __kind: 'Null' +} + +export interface Type_427_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type Type_425 = Type_425_HrmpChannelAccepted | Type_425_HrmpChannelClosing | Type_425_HrmpNewChannelOpenRequest | Type_425_QueryResponse | Type_425_RelayedFrom | Type_425_ReserveAssetDeposit | Type_425_TeleportAsset | Type_425_Transact | Type_425_TransferAsset | Type_425_TransferReserveAsset | Type_425_WithdrawAsset + +export interface Type_425_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_425_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_425_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_425_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface Type_425_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: Type_425 +} + +export interface Type_425_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: Type_427[] +} + +export interface Type_425_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: Type_427[] +} + +export interface Type_425_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_429 +} + +export interface Type_425_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_425_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_425_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: Type_427[] +} + +export type Type_424 = Type_424_V0 | Type_424_V1 | Type_424_V2 + +export interface Type_424_V0 { + __kind: 'V0' + value: Type_425 +} + +export interface Type_424_V1 { + __kind: 'V1' + value: Type_430 +} + +export interface Type_424_V2 { + __kind: 'V2' + value: Type_436[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type XcmPalletCall = XcmPalletCall_execute | XcmPalletCall_force_default_xcm_version | XcmPalletCall_force_subscribe_version_notify | XcmPalletCall_force_unsubscribe_version_notify | XcmPalletCall_force_xcm_version | XcmPalletCall_limited_reserve_transfer_assets | XcmPalletCall_limited_teleport_assets | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets + +/** + * Execute an XCM message from a local, signed, origin. + * + * An event is deposited indicating whether `msg` could be executed completely or only + * partially. + * + * No more than `max_weight` will be used in its attempted execution. If this is less than the + * maximum amount of weight that the message could take to be executed, then no execution + * attempt will be made. + * + * NOTE: A successful return to this does *not* imply that the `msg` was executed successfully + * to completion; only that *some* of it was executed. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Type_424 + maxWeight: bigint +} + +/** + * Set a safe XCM version (the version that XCM should be encoded with if the most recent + * version a destination can accept is unknown). + * + * - `origin`: Must be Root. + * - `maybe_xcm_version`: The default XCM encoding version, or `None` to disable. + */ +export interface XcmPalletCall_force_default_xcm_version { + __kind: 'force_default_xcm_version' + maybeXcmVersion?: (number | undefined) +} + +/** + * Ask a location to notify us regarding their XCM version and any changes to it. + * + * - `origin`: Must be Root. + * - `location`: The location to which we should subscribe for XCM version notifications. + */ +export interface XcmPalletCall_force_subscribe_version_notify { + __kind: 'force_subscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Require that a particular destination should no longer notify us regarding any XCM + * version changes. + * + * - `origin`: Must be Root. + * - `location`: The location to which we are currently subscribed for XCM version + * notifications which we no longer desire. + */ +export interface XcmPalletCall_force_unsubscribe_version_notify { + __kind: 'force_unsubscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Extoll that a particular destination can be communicated with through a particular + * version of XCM. + * + * - `origin`: Must be Root. + * - `location`: The destination that is being described. + * - `xcm_version`: The latest version of XCM that `location` supports. + */ +export interface XcmPalletCall_force_xcm_version { + __kind: 'force_xcm_version' + location: V1MultiLocation + xcmVersion: number +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination + * chain and forward a notification XCM. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight + * is needed than `weight_limit`, then the operation will fail and the assets send may be + * at risk. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_reserve_transfer_assets { + __kind: 'limited_reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight + * is needed than `weight_limit`, then the operation will fail and the assets send may be + * at risk. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_teleport_assets { + __kind: 'limited_teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination + * chain and forward a notification XCM. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, + * with all fees taken as needed from the asset. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +export interface XcmPalletCall_send { + __kind: 'send' + dest: VersionedMultiLocation + message: VersionedXcm +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, + * with all fees taken as needed from the asset. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const WhitelistCall: sts.Type = sts.closedEnum(() => { + return { + dispatch_whitelisted_call: sts.enumStruct({ + callHash: H256, + callWeightWitness: Weight, + }), + dispatch_whitelisted_call_with_preimage: sts.enumStruct({ + call: Call, + }), + remove_whitelisted_call: sts.enumStruct({ + callHash: H256, + }), + whitelist_call: sts.enumStruct({ + callHash: H256, + }), + } +}) + +export const H256 = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type WhitelistCall = WhitelistCall_dispatch_whitelisted_call | WhitelistCall_dispatch_whitelisted_call_with_preimage | WhitelistCall_remove_whitelisted_call | WhitelistCall_whitelist_call + +export interface WhitelistCall_dispatch_whitelisted_call { + __kind: 'dispatch_whitelisted_call' + callHash: H256 + callWeightWitness: Weight +} + +export interface WhitelistCall_dispatch_whitelisted_call_with_preimage { + __kind: 'dispatch_whitelisted_call_with_preimage' + call: Call +} + +export interface WhitelistCall_remove_whitelisted_call { + __kind: 'remove_whitelisted_call' + callHash: H256 +} + +export interface WhitelistCall_whitelist_call { + __kind: 'whitelist_call' + callHash: H256 +} + +export type H256 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VoterListCall: sts.Type = sts.closedEnum(() => { + return { + put_in_front_of: sts.enumStruct({ + lighter: MultiAddress, + }), + rebag: sts.enumStruct({ + dislocated: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VoterListCall = VoterListCall_put_in_front_of | VoterListCall_rebag + +/** + * Move the caller's Id directly in front of `lighter`. + * + * The dispatch origin for this call must be _Signed_ and can only be called by the Id of + * the account going in front of `lighter`. + * + * Only works if + * - both nodes are within the same bag, + * - and `origin` has a greater `Score` than `lighter`. + */ +export interface VoterListCall_put_in_front_of { + __kind: 'put_in_front_of' + lighter: MultiAddress +} + +/** + * Declare that some `dislocated` account has, through rewards or penalties, sufficiently + * changed its score that it should properly fall into a different bag than its current + * one. + * + * Anyone can call this function about any potentially dislocated account. + * + * Will always update the stored score of `dislocated` to the correct score, based on + * `ScoreProvider`. + * + * If `dislocated` does not exists, it returns an error. + */ +export interface VoterListCall_rebag { + __kind: 'rebag' + dislocated: MultiAddress +} + +export type MultiAddress = MultiAddress_Address20 | MultiAddress_Address32 | MultiAddress_Id | MultiAddress_Index | MultiAddress_Raw + +export interface MultiAddress_Address20 { + __kind: 'Address20' + value: Bytes +} + +export interface MultiAddress_Address32 { + __kind: 'Address32' + value: Bytes +} + +export interface MultiAddress_Id { + __kind: 'Id' + value: AccountId32 +} + +export interface MultiAddress_Index { + __kind: 'Index' +} + +export interface MultiAddress_Raw { + __kind: 'Raw' + value: Bytes +} + +export type AccountId32 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: MultiAddress, + target: MultiAddress, + schedule: VestingInfo, + }), + merge_schedules: sts.enumStruct({ + schedule1Index: sts.number(), + schedule2Index: sts.number(), + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: MultiAddress, + }), + vested_transfer: sts.enumStruct({ + target: MultiAddress, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: sts.bigint(), + perBlock: sts.bigint(), + startingBlock: sts.number(), + } +}) + +export interface VestingInfo { + locked: bigint + perBlock: bigint + startingBlock: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_merge_schedules | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: MultiAddress + target: MultiAddress + schedule: VestingInfo +} + +/** + * Merge two vesting schedules together, creating a new vesting schedule that unlocks over + * the highest possible start and end blocks. If both schedules have already started the + * current block will be used as the schedule start; with the caveat that if one schedule + * is finished by the current block, the other will be treated as the new merged schedule, + * unmodified. + * + * NOTE: If `schedule1_index == schedule2_index` this is a no-op. + * NOTE: This will unlock all schedules through the current block prior to merging. + * NOTE: If both schedules have ended by the current block, no new schedule will be created + * and both will be removed. + * + * Merged schedule attributes: + * - `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block, + * current_block)`. + * - `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`. + * - `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`. + * + * The dispatch origin for this call must be _Signed_. + * + * - `schedule1_index`: index of the first schedule to merge. + * - `schedule2_index`: index of the second schedule to merge. + */ +export interface VestingCall_merge_schedules { + __kind: 'merge_schedules' + schedule1Index: number + schedule2Index: number +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: MultiAddress +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account receiving the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: MultiAddress + schedule: VestingInfo +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Call, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Call), + }), + dispatch_as: sts.enumStruct({ + asOrigin: OriginCaller, + call: Call, + }), + force_batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + } +}) + +export const OriginCaller: sts.Type = sts.closedEnum(() => { + return { + Council: Type_151, + Origins: Origin, + ParachainsOrigin: Type_154, + TechnicalCommittee: Type_152, + Void: Void, + XcmPallet: Type_156, + system: RawOrigin, + } +}) + +export const RawOrigin: sts.Type = sts.closedEnum(() => { + return { + None: sts.unit(), + Root: sts.unit(), + Signed: AccountId32, + } +}) + +export type RawOrigin = RawOrigin_None | RawOrigin_Root | RawOrigin_Signed + +export interface RawOrigin_None { + __kind: 'None' +} + +export interface RawOrigin_Root { + __kind: 'Root' +} + +export interface RawOrigin_Signed { + __kind: 'Signed' + value: AccountId32 +} + +export const Type_156: sts.Type = sts.closedEnum(() => { + return { + Response: V1MultiLocation, + Xcm: V1MultiLocation, + } +}) + +export type Type_156 = Type_156_Response | Type_156_Xcm + +export interface Type_156_Response { + __kind: 'Response' + value: V1MultiLocation +} + +export interface Type_156_Xcm { + __kind: 'Xcm' + value: V1MultiLocation +} + +export const Void: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Void = never + +export const Type_152: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_152 = Type_152_Member | Type_152_Members | Type_152__Phantom + +export interface Type_152_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_152_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_152__Phantom { + __kind: '_Phantom' +} + +export const Type_154: sts.Type = sts.closedEnum(() => { + return { + Parachain: Id, + } +}) + +export const Id = sts.number() + +export type Type_154 = Type_154_Parachain + +export interface Type_154_Parachain { + __kind: 'Parachain' + value: Id +} + +export type Id = number + +export const Origin: sts.Type = sts.closedEnum(() => { + return { + AuctionAdmin: sts.unit(), + BigSpender: sts.unit(), + BigTipper: sts.unit(), + Fellows: sts.unit(), + Fellowship1Dan: sts.unit(), + Fellowship2Dan: sts.unit(), + Fellowship3Dan: sts.unit(), + Fellowship4Dan: sts.unit(), + Fellowship5Dan: sts.unit(), + Fellowship6Dan: sts.unit(), + Fellowship7Dan: sts.unit(), + Fellowship8Dan: sts.unit(), + Fellowship9Dan: sts.unit(), + FellowshipAdmin: sts.unit(), + FellowshipExperts: sts.unit(), + FellowshipInitiates: sts.unit(), + FellowshipMasters: sts.unit(), + GeneralAdmin: sts.unit(), + LeaseAdmin: sts.unit(), + MediumSpender: sts.unit(), + ReferendumCanceller: sts.unit(), + ReferendumKiller: sts.unit(), + SmallSpender: sts.unit(), + SmallTipper: sts.unit(), + StakingAdmin: sts.unit(), + Treasurer: sts.unit(), + WhitelistedCaller: sts.unit(), + } +}) + +export type Origin = Origin_AuctionAdmin | Origin_BigSpender | Origin_BigTipper | Origin_Fellows | Origin_Fellowship1Dan | Origin_Fellowship2Dan | Origin_Fellowship3Dan | Origin_Fellowship4Dan | Origin_Fellowship5Dan | Origin_Fellowship6Dan | Origin_Fellowship7Dan | Origin_Fellowship8Dan | Origin_Fellowship9Dan | Origin_FellowshipAdmin | Origin_FellowshipExperts | Origin_FellowshipInitiates | Origin_FellowshipMasters | Origin_GeneralAdmin | Origin_LeaseAdmin | Origin_MediumSpender | Origin_ReferendumCanceller | Origin_ReferendumKiller | Origin_SmallSpender | Origin_SmallTipper | Origin_StakingAdmin | Origin_Treasurer | Origin_WhitelistedCaller + +export interface Origin_AuctionAdmin { + __kind: 'AuctionAdmin' +} + +export interface Origin_BigSpender { + __kind: 'BigSpender' +} + +export interface Origin_BigTipper { + __kind: 'BigTipper' +} + +export interface Origin_Fellows { + __kind: 'Fellows' +} + +export interface Origin_Fellowship1Dan { + __kind: 'Fellowship1Dan' +} + +export interface Origin_Fellowship2Dan { + __kind: 'Fellowship2Dan' +} + +export interface Origin_Fellowship3Dan { + __kind: 'Fellowship3Dan' +} + +export interface Origin_Fellowship4Dan { + __kind: 'Fellowship4Dan' +} + +export interface Origin_Fellowship5Dan { + __kind: 'Fellowship5Dan' +} + +export interface Origin_Fellowship6Dan { + __kind: 'Fellowship6Dan' +} + +export interface Origin_Fellowship7Dan { + __kind: 'Fellowship7Dan' +} + +export interface Origin_Fellowship8Dan { + __kind: 'Fellowship8Dan' +} + +export interface Origin_Fellowship9Dan { + __kind: 'Fellowship9Dan' +} + +export interface Origin_FellowshipAdmin { + __kind: 'FellowshipAdmin' +} + +export interface Origin_FellowshipExperts { + __kind: 'FellowshipExperts' +} + +export interface Origin_FellowshipInitiates { + __kind: 'FellowshipInitiates' +} + +export interface Origin_FellowshipMasters { + __kind: 'FellowshipMasters' +} + +export interface Origin_GeneralAdmin { + __kind: 'GeneralAdmin' +} + +export interface Origin_LeaseAdmin { + __kind: 'LeaseAdmin' +} + +export interface Origin_MediumSpender { + __kind: 'MediumSpender' +} + +export interface Origin_ReferendumCanceller { + __kind: 'ReferendumCanceller' +} + +export interface Origin_ReferendumKiller { + __kind: 'ReferendumKiller' +} + +export interface Origin_SmallSpender { + __kind: 'SmallSpender' +} + +export interface Origin_SmallTipper { + __kind: 'SmallTipper' +} + +export interface Origin_StakingAdmin { + __kind: 'StakingAdmin' +} + +export interface Origin_Treasurer { + __kind: 'Treasurer' +} + +export interface Origin_WhitelistedCaller { + __kind: 'WhitelistedCaller' +} + +export const Type_151: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_151 = Type_151_Member | Type_151_Members | Type_151__Phantom + +export interface Type_151_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_151_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_151__Phantom { + __kind: '_Phantom' +} + +export type OriginCaller = OriginCaller_Council | OriginCaller_Origins | OriginCaller_ParachainsOrigin | OriginCaller_TechnicalCommittee | OriginCaller_Void | OriginCaller_XcmPallet | OriginCaller_system + +export interface OriginCaller_Council { + __kind: 'Council' + value: Type_151 +} + +export interface OriginCaller_Origins { + __kind: 'Origins' + value: Origin +} + +export interface OriginCaller_ParachainsOrigin { + __kind: 'ParachainsOrigin' + value: Type_154 +} + +export interface OriginCaller_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: Type_152 +} + +export interface OriginCaller_Void { + __kind: 'Void' + value: Void +} + +export interface OriginCaller_XcmPallet { + __kind: 'XcmPallet' + value: Type_156 +} + +export interface OriginCaller_system { + __kind: 'system' + value: RawOrigin +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all | UtilityCall_dispatch_as | UtilityCall_force_batch + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Call +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Call[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Call[] +} + +/** + * Dispatches a function call with a provided origin. + * + * The dispatch origin for this call must be _Root_. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB write (event). + * - Weight of derivative `call` execution + T::WeightInfo::dispatch_as(). + * # + */ +export interface UtilityCall_dispatch_as { + __kind: 'dispatch_as' + asOrigin: OriginCaller + call: Call +} + +/** + * Send a batch of dispatch calls. + * Unlike `batch`, it allows errors and won't interrupt. + * + * May be called from any origin. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_force_batch { + __kind: 'force_batch' + calls: Call[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UmpCall: sts.Type = sts.closedEnum(() => { + return { + service_overweight: sts.enumStruct({ + index: sts.bigint(), + weightLimit: Weight, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UmpCall = UmpCall_service_overweight + +/** + * Service a single overweight upward message. + * + * - `origin`: Must pass `ExecuteOverweightOrigin`. + * - `index`: The index of the overweight message to service. + * - `weight_limit`: The amount of weight that message execution may take. + * + * Errors: + * - `UnknownMessageIndex`: Message of `index` is unknown. + * - `WeightOverLimit`: Message execution may use greater than `weight_limit`. + * + * Events: + * - `OverweightServiced`: On success. + */ +export interface UmpCall_service_overweight { + __kind: 'service_overweight' + index: bigint + weightLimit: Weight +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: MultiAddress, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + remove_approval: sts.enumStruct({ + proposalId: sts.number(), + }), + spend: sts.enumStruct({ + amount: sts.bigint(), + beneficiary: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_remove_approval | TreasuryCall_spend + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: MultiAddress +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Force a previously approved proposal to be removed from the approval queue. + * The original deposit will no longer be returned. + * + * May only be called from `T::RejectOrigin`. + * - `proposal_id`: The index of a proposal + * + * # + * - Complexity: O(A) where `A` is the number of approvals + * - Db reads and writes: `Approvals` + * # + * + * Errors: + * - `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue, + * i.e., the proposal has not been approved. This could also mean the proposal does not + * exist altogether, thus there is no way it would have been approved in the first place. + */ +export interface TreasuryCall_remove_approval { + __kind: 'remove_approval' + proposalId: number +} + +/** + * Propose and approve a spend of treasury funds. + * + * - `origin`: Must be `SpendOrigin` with the `Success` value being at least `amount`. + * - `amount`: The amount to be transferred from the treasury to the `beneficiary`. + * - `beneficiary`: The destination account for the transfer. + * + * NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the + * beneficiary. + */ +export interface TreasuryCall_spend { + __kind: 'spend' + amount: bigint + beneficiary: MultiAddress +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TipsCall: sts.Type = sts.closedEnum(() => { + return { + close_tip: sts.enumStruct({ + hash: H256, + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: MultiAddress, + }), + retract_tip: sts.enumStruct({ + hash: H256, + }), + slash_tip: sts.enumStruct({ + hash: H256, + }), + tip: sts.enumStruct({ + hash: H256, + tipValue: sts.bigint(), + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: MultiAddress, + tipValue: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TipsCall = TipsCall_close_tip | TipsCall_report_awesome | TipsCall_retract_tip | TipsCall_slash_tip | TipsCall_tip | TipsCall_tip_new + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost + * depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TipsCall_close_tip { + __kind: 'close_tip' + hash: H256 +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: MultiAddress +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TipsCall_retract_tip { + __kind: 'retract_tip' + hash: H256 +} + +/** + * Remove and slash an already-open tip. + * + * May only be called from `T::RejectOrigin`. + * + * As a result, the finder is slashed and the deposits are lost. + * + * Emits `TipSlashed` if successful. + * + * # + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * # + */ +export interface TipsCall_slash_tip { + __kind: 'slash_tip' + hash: H256 +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`, insert tip and check closing, `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TipsCall_tip { + __kind: 'tip' + hash: H256 + tipValue: bigint +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of + * `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: MultiAddress + tipValue: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in + * `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: MultiAddress, + }), + change_key: sts.enumStruct({ + new: MultiAddress, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: MultiAddress, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId32), + }), + set_prime: sts.enumStruct({ + who: MultiAddress, + }), + swap_member: sts.enumStruct({ + remove: MultiAddress, + add: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: MultiAddress +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: MultiAddress +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: MultiAddress +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId32[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: MultiAddress +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: MultiAddress + add: MultiAddress +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: Weight, + lengthBound: sts.number(), + }), + close_old_weight: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_close_old_weight | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: Weight + lengthBound: number +} + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close_old_weight { + __kind: 'close_old_weight' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + fill_block: sts.enumStruct({ + ratio: Perbill, + }), + kill_prefix: sts.enumStruct({ + prefix: sts.bytes(), + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => sts.bytes()), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + }), + } +}) + +export const Perbill = sts.number() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SystemCall = SystemCall_fill_block | SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: Perbill +} + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Bytes + subkeys: number +} + +/** + * Kill some items from storage. + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Bytes[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Make some on-chain remark and emit event. + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is + * expensive). + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very + * expensive. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full + * block. # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: [Bytes, Bytes][] +} + +export type Perbill = number + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: MultiAddress, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: sts.number(), + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + controller: AccountId32, + }), + force_apply_min_commission: sts.enumStruct({ + validatorStash: AccountId32, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => MultiAddress), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => MultiAddress), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + }), + reap_stash: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: MultiAddress, + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId32), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_staking_configs: sts.enumStruct({ + minNominatorBond: ConfigOp, + minValidatorBond: ConfigOp, + maxNominatorCount: Type_103, + maxValidatorCount: Type_103, + chillThreshold: Type_104, + minCommission: Type_105, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export const Type_105: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export type Type_105 = Type_105_Noop | Type_105_Remove | Type_105_Set + +export interface Type_105_Noop { + __kind: 'Noop' +} + +export interface Type_105_Remove { + __kind: 'Remove' +} + +export interface Type_105_Set { + __kind: 'Set' + value: Perbill +} + +export const Type_104: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Percent, + } +}) + +export type Type_104 = Type_104_Noop | Type_104_Remove | Type_104_Set + +export interface Type_104_Noop { + __kind: 'Noop' +} + +export interface Type_104_Remove { + __kind: 'Remove' +} + +export interface Type_104_Set { + __kind: 'Set' + value: Percent +} + +export type Percent = number + +export const Type_103: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_103 = Type_103_Noop | Type_103_Remove | Type_103_Set + +export interface Type_103_Noop { + __kind: 'Noop' +} + +export interface Type_103_Remove { + __kind: 'Remove' +} + +export interface Type_103_Set { + __kind: 'Set' + value: number +} + +export const ConfigOp: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type ConfigOp = ConfigOp_Noop | ConfigOp_Remove | ConfigOp_Set + +export interface ConfigOp_Noop { + __kind: 'Noop' +} + +export interface ConfigOp_Remove { + __kind: 'Remove' +} + +export interface ConfigOp_Set { + __kind: 'Set' + value: bigint +} + +export const Percent = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_force_apply_min_commission | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_staking_configs | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: MultiAddress + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose + * any limitation on the amount that can be added. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: number + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Declare a `controller` to stop participating as either a validator or nominator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_, but can be called by anyone. + * + * If the caller is the same as the controller being targeted, then no further checks are + * enforced, and this function behaves just like `chill`. + * + * If the caller is different than the controller being targeted, the following conditions + * must be met: + * + * * `controller` must belong to a nominator who has become non-decodable, + * + * Or: + * + * * A `ChillThreshold` must be set and checked which defines how close to the max + * nominators or validators we must reach before users can start chilling one-another. + * * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine + * how close we are to the threshold. + * * A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines + * if this is a person that should be chilled because they have not met the threshold + * bond required. + * + * This can be helpful if bond requirements are updated, and we need to remove old users + * who do not satisfy these requirements. + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + controller: AccountId32 +} + +/** + * Force a validator to have at least the minimum commission. This will not affect a + * validator who already has a commission greater than or equal to the minimum. Any account + * can call this. + */ +export interface StakingCall_force_apply_min_commission { + __kind: 'force_apply_min_commission' + validatorStash: AccountId32 +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * Thus the election process may be ongoing when this is called. In this case the + * election will continue until the next era is triggered. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: MultiAddress[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (T::MaxNominations). + * - Both the reads and writes follow a similar pattern. + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: MultiAddress[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId32 + era: number +} + +/** + * Remove all data structures concerning a staker/stash once it is at a state where it can + * be considered `dust` in the staking system. The requirements are: + * + * 1. the `total_balance` of the stash is below existential deposit. + * 2. or, the `ledger.total` of the stash is below existential deposit. + * + * The former can happen in cases like a slash; the latter when a fully unbonded account + * is still receiving staking rewards in `RewardDestination::Staked`. + * + * It can be called by anyone, as long as `stash` meets the above requirements. + * + * Refunds the transaction fees upon successful execution. + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MaxUnlockingChunks`. + * - Storage changes: Can't increase storage, only decrease it. + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt instantly (as soon as this function is completed successfully). + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: MultiAddress +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId32[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt instantly (as soon as this function is completed successfully). + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Update the various staking configurations . + * + * * `min_nominator_bond`: The minimum active bond needed to be a nominator. + * * `min_validator_bond`: The minimum active bond needed to be a validator. + * * `max_nominator_count`: The max number of users who can be a nominator at once. When + * set to `None`, no limit is enforced. + * * `max_validator_count`: The max number of users who can be a validator at once. When + * set to `None`, no limit is enforced. + * * `chill_threshold`: The ratio of `max_nominator_count` or `max_validator_count` which + * should be filled in order for the `chill_other` transaction to work. + * * `min_commission`: The minimum amount of commission that each validators must maintain. + * This is checked only upon calling `validate`. Existing validators are not affected. + * + * RuntimeOrigin must be Root to call this function. + * + * NOTE: Existing nominators and validators will not be affected by this update. + * to kick people under the new limits, `chill_other` should be called. + */ +export interface StakingCall_set_staking_configs { + __kind: 'set_staking_configs' + minNominatorBond: ConfigOp + minValidatorBond: ConfigOp + maxNominatorCount: Type_103 + maxValidatorCount: Type_103 + chillThreshold: Type_104 + minCommission: Type_105 +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * If a user encounters the `InsufficientBond` error when calling this extrinsic, + * they should call `chill` first in order to free up their bonded funds. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * Complexity O(S) where S is the number of slashing spans to remove + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: sts.bigint(), + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: MultiAddress, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: MultiAddress, + judgement: Type_221, + }), + judge_suspended_member: sts.enumStruct({ + who: MultiAddress, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: MultiAddress, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: MultiAddress, + value: sts.bigint(), + tip: sts.bigint(), + }), + } +}) + +export const Type_221: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export type Type_221 = Type_221_Approve | Type_221_Rebid | Type_221_Reject + +export interface Type_221_Approve { + __kind: 'Approve' +} + +export interface Type_221_Rebid { + __kind: 'Rebid' +} + +export interface Type_221_Reject { + __kind: 'Reject' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: bigint +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * pallet to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: MultiAddress + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: MultiAddress + judgement: Type_221 +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin forgives + * (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to + * society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: MultiAddress + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured + * payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be approved (`true`) or + * rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: MultiAddress + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: MultiAddress + value: bigint + tip: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: Id, + }), + force_lease: sts.enumStruct({ + para: Id, + leaser: AccountId32, + amount: sts.bigint(), + periodBegin: sts.number(), + periodCount: sts.number(), + }), + trigger_onboard: sts.enumStruct({ + para: Id, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * Clear all leases for a Para Id, refunding any deposits back to the original owners. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: Id +} + +/** + * Just a connect into the `lease_out` call, in case Root wants to force some lease to happen + * independently of any other on-chain mechanism to use it. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: Id + leaser: AccountId32 + amount: bigint + periodBegin: number + periodCount: number +} + +/** + * Try to onboard a parachain that has a lease for the current lease period. + * + * This function can be useful if there was some state issue with a para that should + * have onboarded, but was unable to. As long as they have a lease period, we can + * let them onboard from here. + * + * Origin must be signed, but can be called by anyone. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: SessionKeys, + proof: sts.bytes(), + }), + } +}) + +export const SessionKeys: sts.Type = sts.struct(() => { + return { + grandpa: Public, + babe: sts.bytes(), + imOnline: sts.bytes(), + paraValidator: V2Public, + paraAssignment: sts.bytes(), + authorityDiscovery: sts.bytes(), + } +}) + +export const V2Public = sts.bytes() + +export const Public = sts.bytes() + +export interface SessionKeys { + grandpa: Public + babe: Bytes + imOnline: Bytes + paraValidator: V2Public + paraAssignment: Bytes + authorityDiscovery: Bytes +} + +export type V2Public = Bytes + +export type Public = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be Signed and the account must be either be + * convertible to a validator ID using the chain's typical addressing system (this usually + * means being a controller account) or directly convertible into a validator ID (which + * usually means being a stash account). + * + * # + * - Complexity: `O(1)` in number of key types. Actual cost depends on the number of length + * of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)`. Actual cost depends on the number of length of + * `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: SessionKeys + proof: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: sts.number(), + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_after: sts.enumStruct({ + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: number + index: number +} + +/** + * Cancel a named scheduled task. + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Schedule a named task. + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`](Self::schedule_named). + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + add_lock: sts.enumStruct({ + para: Id, + }), + deregister: sts.enumStruct({ + id: Id, + }), + force_register: sts.enumStruct({ + who: AccountId32, + deposit: sts.bigint(), + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + register: sts.enumStruct({ + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + remove_lock: sts.enumStruct({ + para: Id, + }), + reserve: sts.unit(), + schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + swap: sts.enumStruct({ + id: Id, + other: Id, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RegistrarCall = RegistrarCall_add_lock | RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_register | RegistrarCall_remove_lock | RegistrarCall_reserve | RegistrarCall_schedule_code_upgrade | RegistrarCall_set_current_head | RegistrarCall_swap + +/** + * Add a manager lock from a para. This will prevent the manager of a + * para to deregister or swap a para. + * + * Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked. + */ +export interface RegistrarCall_add_lock { + __kind: 'add_lock' + para: Id +} + +/** + * Deregister a Para Id, freeing all data and returning any deposit. + * + * The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: Id +} + +/** + * Force the registration of a Para Id on the relay chain. + * + * This function must be called by a Root origin. + * + * The deposit taken can be specified for this registration. Any `ParaId` + * can be registered, including sub-1000 IDs which are System Parachains. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId32 + deposit: bigint + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Register head data and validation code for a reserved Para Id. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. + * - `id`: The para ID. Must be owned/managed by the `origin` signing account. + * - `genesis_head`: The genesis head data of the parachain/thread. + * - `validation_code`: The initial validation code of the parachain/thread. + * + * ## Deposits/Fees + * The origin signed account must reserve a corresponding deposit for the registration. Anything already + * reserved previously for this para ID is accounted for. + * + * ## Events + * The `Registered` event is emitted in case of success. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Remove a manager lock from a para. This will allow the manager of a + * previously locked para to deregister or swap a para without using governance. + * + * Can only be called by the Root origin or the parachain. + */ +export interface RegistrarCall_remove_lock { + __kind: 'remove_lock' + para: Id +} + +/** + * Reserve a Para Id on the relay chain. + * + * This function will reserve a new Para Id to be owned/managed by the origin account. + * The origin account is able to register head data and validation code using `register` to create + * a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID. + * + * ## Deposits/Fees + * The origin must reserve a deposit of `ParaDeposit` for the registration. + * + * ## Events + * The `Reserved` event is emitted in case of success, which provides the ID reserved for use. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * Schedule a parachain upgrade. + * + * Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked. + */ +export interface RegistrarCall_schedule_code_upgrade { + __kind: 'schedule_code_upgrade' + para: Id + newCode: ValidationCode +} + +/** + * Set the parachain's current head. + * + * Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked. + */ +export interface RegistrarCall_set_current_head { + __kind: 'set_current_head' + para: Id + newHead: HeadData +} + +/** + * Swap a parachain with another parachain or parathread. + * + * The origin must be Root, the `para` owner, or the `para` itself. + * + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: Id + other: Id +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ReferendaCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + index: sts.number(), + }), + kill: sts.enumStruct({ + index: sts.number(), + }), + nudge_referendum: sts.enumStruct({ + index: sts.number(), + }), + one_fewer_deciding: sts.enumStruct({ + track: sts.number(), + }), + place_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + submit: sts.enumStruct({ + proposalOrigin: OriginCaller, + proposal: Bounded, + enactmentMoment: DispatchTime, + }), + } +}) + +export const DispatchTime: sts.Type = sts.closedEnum(() => { + return { + After: sts.number(), + At: sts.number(), + } +}) + +export type DispatchTime = DispatchTime_After | DispatchTime_At + +export interface DispatchTime_After { + __kind: 'After' + value: number +} + +export interface DispatchTime_At { + __kind: 'At' + value: number +} + +export const Bounded: sts.Type = sts.closedEnum(() => { + return { + Inline: BoundedVec, + Legacy: sts.enumStruct({ + hash: H256, + }), + Lookup: sts.enumStruct({ + hash: H256, + len: sts.number(), + }), + } +}) + +export const BoundedVec = sts.bytes() + +export type Bounded = Bounded_Inline | Bounded_Legacy | Bounded_Lookup + +export interface Bounded_Inline { + __kind: 'Inline' + value: BoundedVec +} + +export interface Bounded_Legacy { + __kind: 'Legacy' + hash: H256 +} + +export interface Bounded_Lookup { + __kind: 'Lookup' + hash: H256 + len: number +} + +export type BoundedVec = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ReferendaCall = ReferendaCall_cancel | ReferendaCall_kill | ReferendaCall_nudge_referendum | ReferendaCall_one_fewer_deciding | ReferendaCall_place_decision_deposit | ReferendaCall_refund_decision_deposit | ReferendaCall_submit + +/** + * Cancel an ongoing referendum. + * + * - `origin`: must be the `CancelOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Cancelled`. + */ +export interface ReferendaCall_cancel { + __kind: 'cancel' + index: number +} + +/** + * Cancel an ongoing referendum and slash the deposits. + * + * - `origin`: must be the `KillOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Killed` and `DepositSlashed`. + */ +export interface ReferendaCall_kill { + __kind: 'kill' + index: number +} + +/** + * Advance a referendum onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `index`: the referendum to be advanced. + */ +export interface ReferendaCall_nudge_referendum { + __kind: 'nudge_referendum' + index: number +} + +/** + * Advance a track onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `track`: the track to be advanced. + * + * Action item for when there is now one fewer referendum in the deciding phase and the + * `DecidingCount` is not yet updated. This means that we should either: + * - begin deciding another referendum (and leave `DecidingCount` alone); or + * - decrement `DecidingCount`. + */ +export interface ReferendaCall_one_fewer_deciding { + __kind: 'one_fewer_deciding' + track: number +} + +/** + * Post the Decision Deposit for a referendum. + * + * - `origin`: must be `Signed` and the account must have funds available for the + * referendum's track's Decision Deposit. + * - `index`: The index of the submitted referendum whose Decision Deposit is yet to be + * posted. + * + * Emits `DecisionDepositPlaced`. + */ +export interface ReferendaCall_place_decision_deposit { + __kind: 'place_decision_deposit' + index: number +} + +/** + * Refund the Decision Deposit for a closed referendum back to the depositor. + * + * - `origin`: must be `Signed` or `Root`. + * - `index`: The index of a closed referendum whose Decision Deposit has not yet been + * refunded. + * + * Emits `DecisionDepositRefunded`. + */ +export interface ReferendaCall_refund_decision_deposit { + __kind: 'refund_decision_deposit' + index: number +} + +/** + * Propose a referendum on a privileged action. + * + * - `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds + * available. + * - `proposal_origin`: The origin from which the proposal should be executed. + * - `proposal`: The proposal. + * - `enactment_moment`: The moment that the proposal should be enacted. + * + * Emits `Submitted`. + */ +export interface ReferendaCall_submit { + __kind: 'submit' + proposalOrigin: OriginCaller + proposal: Bounded + enactmentMoment: DispatchTime +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: MultiAddress, + call: Call, + }), + cancel_recovered: sts.enumStruct({ + account: MultiAddress, + }), + claim_recovery: sts.enumStruct({ + account: MultiAddress, + }), + close_recovery: sts.enumStruct({ + rescuer: MultiAddress, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId32), + threshold: sts.number(), + delayPeriod: sts.number(), + }), + initiate_recovery: sts.enumStruct({ + account: MultiAddress, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + vouch_recovery: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: MultiAddress + call: Call +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: MultiAddress +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully recovered by + * you. + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: MultiAddress +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: MultiAddress +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. Should be + * ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt before the + * account can be recovered. Should be less than or equal to the length of the list of + * friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized that + * needs to pass before the account can be recovered. + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId32[] + threshold: number + delayPeriod: number +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account needs to be + * recoverable (i.e. have a recovery configuration). + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: MultiAddress +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + announce: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + create_pure: sts.enumStruct({ + proxyType: ProxyType, + delay: sts.number(), + index: sts.number(), + }), + kill_pure: sts.enumStruct({ + spawner: MultiAddress, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + proxy_announced: sts.enumStruct({ + delegate: MultiAddress, + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + reject_announcement: sts.enumStruct({ + delegate: MultiAddress, + callHash: H256, + }), + remove_announcement: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_create_pure | ProxyCall_kill_pure | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: MultiAddress + callHash: H256 +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + */ +export interface ProxyCall_create_pure { + __kind: 'create_pure' + proxyType: ProxyType + delay: number + index: number +} + +/** + * Removes a previously spawned pure proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `pure` with corresponding parameters. + * + * - `spawner`: The account that originally called `pure` to create this account. + * - `index`: The disambiguation index originally passed to `pure`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `pure`. + * - `height`: The height of the chain when the call to `pure` was processed. + * - `ext_index`: The extrinsic index in which the call to `pure` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created pure + * account whose `pure` call has corresponding parameters. + */ +export interface ProxyCall_kill_pure { + __kind: 'kill_pure' + spawner: MultiAddress + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Dispatch the given `call` from an account that the sender is authorized for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: MultiAddress + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: MultiAddress + callHash: H256 +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: MultiAddress + callHash: H256 +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `pure`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Society | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Society { + __kind: 'Society' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PreimageCall: sts.Type = sts.closedEnum(() => { + return { + note_preimage: sts.enumStruct({ + bytes: sts.bytes(), + }), + request_preimage: sts.enumStruct({ + hash: H256, + }), + unnote_preimage: sts.enumStruct({ + hash: H256, + }), + unrequest_preimage: sts.enumStruct({ + hash: H256, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PreimageCall = PreimageCall_note_preimage | PreimageCall_request_preimage | PreimageCall_unnote_preimage | PreimageCall_unrequest_preimage + +/** + * Register a preimage on-chain. + * + * If the preimage was previously requested, no fees or deposits are taken for providing + * the preimage. Otherwise, a deposit is taken proportional to the size of the preimage. + */ +export interface PreimageCall_note_preimage { + __kind: 'note_preimage' + bytes: Bytes +} + +/** + * Request a preimage be uploaded to the chain without paying any fees or deposits. + * + * If the preimage requests has already been provided on-chain, we unreserve any deposit + * a user may have paid, and take the control of the preimage out of their hands. + */ +export interface PreimageCall_request_preimage { + __kind: 'request_preimage' + hash: H256 +} + +/** + * Clear an unrequested preimage from the runtime storage. + * + * If `len` is provided, then it will be a much cheaper operation. + * + * - `hash`: The hash of the preimage to be removed from the store. + * - `len`: The length of the preimage of `hash`. + */ +export interface PreimageCall_unnote_preimage { + __kind: 'unnote_preimage' + hash: H256 +} + +/** + * Clear a previously made request for a preimage. + * + * NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. + */ +export interface PreimageCall_unrequest_preimage { + __kind: 'unrequest_preimage' + hash: H256 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PhragmenElectionCall: sts.Type = sts.closedEnum(() => { + return { + clean_defunct_voters: sts.enumStruct({ + numVoters: sts.number(), + numDefunct: sts.number(), + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + slashBond: sts.boolean(), + rerunElection: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId32), + value: sts.bigint(), + }), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PhragmenElectionCall = PhragmenElectionCall_clean_defunct_voters | PhragmenElectionCall_remove_member | PhragmenElectionCall_remove_voter | PhragmenElectionCall_renounce_candidacy | PhragmenElectionCall_submit_candidacy | PhragmenElectionCall_vote + +/** + * Clean all voters who are defunct (i.e. they do not serve any purpose at all). The + * deposit of the removed voters are returned. + * + * This is an root function to be used only for cleaning the state. + * + * The dispatch origin of this call must be root. + * + * # + * The total number of voters and those that are defunct must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_clean_defunct_voters { + __kind: 'clean_defunct_voters' + numVoters: number + numDefunct: number +} + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, if `rerun_election` is `true`, a new phragmen election is + * started, else, nothing happens. + * + * If `slash_bond` is set to true, the bond of the member being removed is slashed. Else, + * it is returned. + * + * The dispatch origin of this call must be root. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement, we use a small weight. Else, since this is a root call and + * will go into phragmen, we assume full block for now. + * # + */ +export interface PhragmenElectionCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + slashBond: boolean + rerunElection: boolean +} + +/** + * Remove `origin` as a voter. + * + * This removes the lock and returns the deposit. + * + * The dispatch origin of this call must be signed and be a voter. + */ +export interface PhragmenElectionCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * + * - `origin` is a candidate and not elected in any set. In this case, the deposit is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the deposit is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the deposit is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_member`](Self::remove_member), if replacement runners exists, they + * are immediately used. If the prime is renouncing, then no prime will exist until the + * next round. + * + * The dispatch origin of this call must be signed, and have one of the above roles. + * + * # + * The type of renouncing must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Submit oneself for candidacy. A fixed amount of deposit is recorded. + * + * All candidates are wiped at the end of the term. They either become a member/runner-up, + * or leave the system while their deposit is slashed. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`] + * to get their deposit back. Losing the spot in an election will always lead to a slash. + * + * # + * The number of current candidates must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is + * reserved. The deposit is based on the number of votes and can be updated over time. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * If `value` is more than `who`'s free balance, then the maximum of the two is used. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * It is the responsibility of the caller to **NOT** place all of their balance into the + * lock and keep some for further operations. + * + * # + * We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less. + * # + */ +export interface PhragmenElectionCall_vote { + __kind: 'vote' + votes: AccountId32[] + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasSharedCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasDisputesCall: sts.Type = sts.closedEnum(() => { + return { + force_unfreeze: sts.unit(), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasDisputesCall = ParasDisputesCall_force_unfreeze + +export interface ParasDisputesCall_force_unfreeze { + __kind: 'force_unfreeze' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + add_trusted_validation_code: sts.enumStruct({ + validationCode: ValidationCode, + }), + force_note_new_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: Id, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + relayParentNumber: sts.number(), + }), + force_set_current_code: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + include_pvf_check_statement: sts.enumStruct({ + stmt: V2PvfCheckStatement, + signature: V2Signature, + }), + poke_unused_validation_code: sts.enumStruct({ + validationCodeHash: ValidationCodeHash, + }), + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const V2Signature = sts.bytes() + +export const V2PvfCheckStatement: sts.Type = sts.struct(() => { + return { + accept: sts.boolean(), + subject: ValidationCodeHash, + sessionIndex: sts.number(), + validatorIndex: V2ValidatorIndex, + } +}) + +export const V2ValidatorIndex = sts.number() + +export interface V2PvfCheckStatement { + accept: boolean + subject: ValidationCodeHash + sessionIndex: number + validatorIndex: V2ValidatorIndex +} + +export type V2ValidatorIndex = number + +export type ValidationCodeHash = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasCall = ParasCall_add_trusted_validation_code | ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head | ParasCall_include_pvf_check_statement | ParasCall_poke_unused_validation_code + +/** + * Adds the validation code to the storage. + * + * The code will not be added if it is already present. Additionally, if PVF pre-checking + * is running for that code, it will be instantly accepted. + * + * Otherwise, the code will be added into the storage. Note that the code will be added + * into storage with reference count 0. This is to account the fact that there are no users + * for this code yet. The caller will have to make sure that this code eventually gets + * used by some parachain or removed from the storage to avoid storage leaks. For the latter + * prefer to use the `poke_unused_validation_code` dispatchable to raw storage manipulation. + * + * This function is mainly meant to be used for upgrading parachains that do not follow + * the go-ahead signal while the PVF pre-checking feature is enabled. + */ +export interface ParasCall_add_trusted_validation_code { + __kind: 'add_trusted_validation_code' + validationCode: ValidationCode +} + +/** + * Note a new block head for para within the context of the current block. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: Id + newHead: HeadData +} + +/** + * Put a parachain directly into the next session's action queue. + * We can't queue it any sooner than this without going into the + * initializer... + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: Id +} + +/** + * Schedule an upgrade as if it was scheduled in the given relay parent block. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: Id + newCode: ValidationCode + relayParentNumber: number +} + +/** + * Set the storage for the parachain validation code immediately. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: Id + newCode: ValidationCode +} + +/** + * Set the storage for the current parachain head data immediately. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: Id + newHead: HeadData +} + +/** + * Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and + * enacts the results if that was the last vote before achieving the supermajority. + */ +export interface ParasCall_include_pvf_check_statement { + __kind: 'include_pvf_check_statement' + stmt: V2PvfCheckStatement + signature: V2Signature +} + +/** + * Remove the validation code from the storage iff the reference count is 0. + * + * This is better than removing the storage directly, because it will not remove the code + * that was suddenly got used by some parachain while this dispatchable was pending + * dispatching. + */ +export interface ParasCall_poke_unused_validation_code { + __kind: 'poke_unused_validation_code' + validationCodeHash: ValidationCodeHash +} + +export type V2Signature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: V2InherentData, + }), + } +}) + +export const V2InherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => V2UncheckedSigned), + backedCandidates: sts.array(() => V2BackedCandidate), + disputes: sts.array(() => V2DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: H256, + number: sts.number(), + stateRoot: H256, + extrinsicsRoot: H256, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + Consensus: sts.tuple(() => [sts.bytes(), sts.bytes()]), + Other: sts.bytes(), + PreRuntime: sts.tuple(() => [sts.bytes(), sts.bytes()]), + RuntimeEnvironmentUpdated: sts.unit(), + Seal: sts.tuple(() => [sts.bytes(), sts.bytes()]), + } +}) + +export type DigestItem = DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: [Bytes, Bytes] +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: [Bytes, Bytes] +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: [Bytes, Bytes] +} + +export interface Digest { + logs: DigestItem[] +} + +export interface Header { + parentHash: H256 + number: number + stateRoot: H256 + extrinsicsRoot: H256 + digest: Digest +} + +export const V2DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: sts.number(), + statements: sts.array(() => sts.tuple(() => [V2DisputeStatement, V2ValidatorIndex, V2Signature])), + } +}) + +export const V2DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: V2InvalidDisputeStatementKind, + Valid: V2ValidDisputeStatementKind, + } +}) + +export const V2ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + BackingSeconded: H256, + BackingValid: H256, + Explicit: sts.unit(), + } +}) + +export type V2ValidDisputeStatementKind = V2ValidDisputeStatementKind_ApprovalChecking | V2ValidDisputeStatementKind_BackingSeconded | V2ValidDisputeStatementKind_BackingValid | V2ValidDisputeStatementKind_Explicit + +export interface V2ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface V2ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: H256 +} + +export interface V2ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: H256 +} + +export interface V2ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export const V2InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export type V2InvalidDisputeStatementKind = V2InvalidDisputeStatementKind_Explicit + +export interface V2InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type V2DisputeStatement = V2DisputeStatement_Invalid | V2DisputeStatement_Valid + +export interface V2DisputeStatement_Invalid { + __kind: 'Invalid' + value: V2InvalidDisputeStatementKind +} + +export interface V2DisputeStatement_Valid { + __kind: 'Valid' + value: V2ValidDisputeStatementKind +} + +export const CandidateHash = sts.bytes() + +export interface V2DisputeStatementSet { + candidateHash: CandidateHash + session: number + statements: [V2DisputeStatement, V2ValidatorIndex, V2Signature][] +} + +export type CandidateHash = Bytes + +export const V2BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: V2CommittedCandidateReceipt, + validityVotes: sts.array(() => V2ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const V2ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: V2Signature, + Implicit: V2Signature, + } +}) + +export type V2ValidityAttestation = V2ValidityAttestation_Explicit | V2ValidityAttestation_Implicit + +export interface V2ValidityAttestation_Explicit { + __kind: 'Explicit' + value: V2Signature +} + +export interface V2ValidityAttestation_Implicit { + __kind: 'Implicit' + value: V2Signature +} + +export const V2CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: V2CandidateDescriptor, + commitments: V2CandidateCommitments, + } +}) + +export const V2CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => sts.bytes()), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: sts.number(), + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: Id, + data: sts.bytes(), + } +}) + +export interface OutboundHrmpMessage { + recipient: Id + data: Bytes +} + +export interface V2CandidateCommitments { + upwardMessages: Bytes[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: number +} + +export const V2CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: Id, + relayParent: H256, + collator: sts.bytes(), + persistedValidationDataHash: H256, + povHash: H256, + erasureRoot: H256, + signature: sts.bytes(), + paraHead: H256, + validationCodeHash: ValidationCodeHash, + } +}) + +export interface V2CandidateDescriptor { + paraId: Id + relayParent: H256 + collator: Bytes + persistedValidationDataHash: H256 + povHash: H256 + erasureRoot: H256 + signature: Bytes + paraHead: H256 + validationCodeHash: ValidationCodeHash +} + +export interface V2CommittedCandidateReceipt { + descriptor: V2CandidateDescriptor + commitments: V2CandidateCommitments +} + +export interface V2BackedCandidate { + candidate: V2CommittedCandidateReceipt + validityVotes: V2ValidityAttestation[] + validatorIndices: BitSequence +} + +export const V2UncheckedSigned: sts.Type = sts.struct(() => { + return { + payload: V2AvailabilityBitfield, + validatorIndex: V2ValidatorIndex, + signature: V2Signature, + } +}) + +export const V2AvailabilityBitfield = sts.bitseq() + +export interface V2UncheckedSigned { + payload: V2AvailabilityBitfield + validatorIndex: V2ValidatorIndex + signature: V2Signature +} + +export type V2AvailabilityBitfield = BitSequence + +export interface V2InherentData { + bitfields: V2UncheckedSigned[] + backedCandidates: V2BackedCandidate[] + disputes: V2DisputeStatementSet[] + parentHeader: Header +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInherentCall = ParaInherentCall_enter + +/** + * Enter the paras inherent. This will process bitfields and backed candidates. + */ +export interface ParaInherentCall_enter { + __kind: 'enter' + data: V2InherentData +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInclusionCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const NominationPoolsCall: sts.Type = sts.closedEnum(() => { + return { + bond_extra: sts.enumStruct({ + extra: BondExtra, + }), + chill: sts.enumStruct({ + poolId: sts.number(), + }), + claim_payout: sts.unit(), + create: sts.enumStruct({ + amount: sts.bigint(), + root: MultiAddress, + nominator: MultiAddress, + stateToggler: MultiAddress, + }), + join: sts.enumStruct({ + amount: sts.bigint(), + poolId: sts.number(), + }), + nominate: sts.enumStruct({ + poolId: sts.number(), + validators: sts.array(() => AccountId32), + }), + pool_withdraw_unbonded: sts.enumStruct({ + poolId: sts.number(), + numSlashingSpans: sts.number(), + }), + set_configs: sts.enumStruct({ + minJoinBond: Type_328, + minCreateBond: Type_328, + maxPools: Type_329, + maxMembers: Type_329, + maxMembersPerPool: Type_329, + }), + set_metadata: sts.enumStruct({ + poolId: sts.number(), + metadata: sts.bytes(), + }), + set_state: sts.enumStruct({ + poolId: sts.number(), + state: PoolState, + }), + unbond: sts.enumStruct({ + memberAccount: MultiAddress, + unbondingPoints: sts.bigint(), + }), + update_roles: sts.enumStruct({ + poolId: sts.number(), + newRoot: Type_330, + newNominator: Type_330, + newStateToggler: Type_330, + }), + withdraw_unbonded: sts.enumStruct({ + memberAccount: MultiAddress, + numSlashingSpans: sts.number(), + }), + } +}) + +export const Type_330: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: AccountId32, + } +}) + +export type Type_330 = Type_330_Noop | Type_330_Remove | Type_330_Set + +export interface Type_330_Noop { + __kind: 'Noop' +} + +export interface Type_330_Remove { + __kind: 'Remove' +} + +export interface Type_330_Set { + __kind: 'Set' + value: AccountId32 +} + +export const PoolState: sts.Type = sts.closedEnum(() => { + return { + Blocked: sts.unit(), + Destroying: sts.unit(), + Open: sts.unit(), + } +}) + +export type PoolState = PoolState_Blocked | PoolState_Destroying | PoolState_Open + +export interface PoolState_Blocked { + __kind: 'Blocked' +} + +export interface PoolState_Destroying { + __kind: 'Destroying' +} + +export interface PoolState_Open { + __kind: 'Open' +} + +export const Type_329: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_329 = Type_329_Noop | Type_329_Remove | Type_329_Set + +export interface Type_329_Noop { + __kind: 'Noop' +} + +export interface Type_329_Remove { + __kind: 'Remove' +} + +export interface Type_329_Set { + __kind: 'Set' + value: number +} + +export const Type_328: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type Type_328 = Type_328_Noop | Type_328_Remove | Type_328_Set + +export interface Type_328_Noop { + __kind: 'Noop' +} + +export interface Type_328_Remove { + __kind: 'Remove' +} + +export interface Type_328_Set { + __kind: 'Set' + value: bigint +} + +export const BondExtra: sts.Type = sts.closedEnum(() => { + return { + FreeBalance: sts.bigint(), + Rewards: sts.unit(), + } +}) + +export type BondExtra = BondExtra_FreeBalance | BondExtra_Rewards + +export interface BondExtra_FreeBalance { + __kind: 'FreeBalance' + value: bigint +} + +export interface BondExtra_Rewards { + __kind: 'Rewards' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type NominationPoolsCall = NominationPoolsCall_bond_extra | NominationPoolsCall_chill | NominationPoolsCall_claim_payout | NominationPoolsCall_create | NominationPoolsCall_join | NominationPoolsCall_nominate | NominationPoolsCall_pool_withdraw_unbonded | NominationPoolsCall_set_configs | NominationPoolsCall_set_metadata | NominationPoolsCall_set_state | NominationPoolsCall_unbond | NominationPoolsCall_update_roles | NominationPoolsCall_withdraw_unbonded + +/** + * Bond `extra` more funds from `origin` into the pool to which they already belong. + * + * Additional funds can come from either the free balance of the account, of from the + * accumulated rewards, see [`BondExtra`]. + * + * Bonding extra funds implies an automatic payout of all pending rewards as well. + */ +export interface NominationPoolsCall_bond_extra { + __kind: 'bond_extra' + extra: BondExtra +} + +/** + * Chill on behalf of the pool. + * + * The dispatch origin of this call must be signed by the pool nominator or the pool + * root role, same as [`Pallet::nominate`]. + * + * This directly forward the call to the staking pallet, on behalf of the pool bonded + * account. + */ +export interface NominationPoolsCall_chill { + __kind: 'chill' + poolId: number +} + +/** + * A bonded member can use this to claim their payout based on the rewards that the pool + * has accumulated since their last claimed payout (OR since joining if this is there first + * time claiming rewards). The payout will be transferred to the member's account. + * + * The member will earn rewards pro rata based on the members stake vs the sum of the + * members in the pools stake. Rewards do not "expire". + */ +export interface NominationPoolsCall_claim_payout { + __kind: 'claim_payout' +} + +/** + * Create a new delegation pool. + * + * # Arguments + * + * * `amount` - The amount of funds to delegate to the pool. This also acts of a sort of + * deposit since the pools creator cannot fully unbond funds until the pool is being + * destroyed. + * * `index` - A disambiguation index for creating the account. Likely only useful when + * creating multiple pools in the same extrinsic. + * * `root` - The account to set as [`PoolRoles::root`]. + * * `nominator` - The account to set as the [`PoolRoles::nominator`]. + * * `state_toggler` - The account to set as the [`PoolRoles::state_toggler`]. + * + * # Note + * + * In addition to `amount`, the caller will transfer the existential deposit; so the caller + * needs at have at least `amount + existential_deposit` transferrable. + */ +export interface NominationPoolsCall_create { + __kind: 'create' + amount: bigint + root: MultiAddress + nominator: MultiAddress + stateToggler: MultiAddress +} + +/** + * Stake funds with a pool. The amount to bond is transferred from the member to the + * pools account and immediately increases the pools bond. + * + * # Note + * + * * An account can only be a member of a single pool. + * * An account cannot join the same pool multiple times. + * * This call will *not* dust the member account, so the member must have at least + * `existential deposit + amount` in their account. + * * Only a pool with [`PoolState::Open`] can be joined + */ +export interface NominationPoolsCall_join { + __kind: 'join' + amount: bigint + poolId: number +} + +/** + * Nominate on behalf of the pool. + * + * The dispatch origin of this call must be signed by the pool nominator or the pool + * root role. + * + * This directly forward the call to the staking pallet, on behalf of the pool bonded + * account. + */ +export interface NominationPoolsCall_nominate { + __kind: 'nominate' + poolId: number + validators: AccountId32[] +} + +/** + * Call `withdraw_unbonded` for the pools account. This call can be made by any account. + * + * This is useful if their are too many unlocking chunks to call `unbond`, and some + * can be cleared by withdrawing. In the case there are too many unlocking chunks, the user + * would probably see an error like `NoMoreChunks` emitted from the staking system when + * they attempt to unbond. + */ +export interface NominationPoolsCall_pool_withdraw_unbonded { + __kind: 'pool_withdraw_unbonded' + poolId: number + numSlashingSpans: number +} + +/** + * Update configurations for the nomination pools. The origin for this call must be + * Root. + * + * # Arguments + * + * * `min_join_bond` - Set [`MinJoinBond`]. + * * `min_create_bond` - Set [`MinCreateBond`]. + * * `max_pools` - Set [`MaxPools`]. + * * `max_members` - Set [`MaxPoolMembers`]. + * * `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]. + */ +export interface NominationPoolsCall_set_configs { + __kind: 'set_configs' + minJoinBond: Type_328 + minCreateBond: Type_328 + maxPools: Type_329 + maxMembers: Type_329 + maxMembersPerPool: Type_329 +} + +/** + * Set a new metadata for the pool. + * + * The dispatch origin of this call must be signed by the state toggler, or the root role + * of the pool. + */ +export interface NominationPoolsCall_set_metadata { + __kind: 'set_metadata' + poolId: number + metadata: Bytes +} + +/** + * Set a new state for the pool. + * + * If a pool is already in the `Destroying` state, then under no condition can its state + * change again. + * + * The dispatch origin of this call must be either: + * + * 1. signed by the state toggler, or the root role of the pool, + * 2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and + * then the state of the pool can be permissionlessly changed to `Destroying`. + */ +export interface NominationPoolsCall_set_state { + __kind: 'set_state' + poolId: number + state: PoolState +} + +/** + * Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It + * implicitly collects the rewards one last time, since not doing so would mean some + * rewards would be forfeited. + * + * Under certain conditions, this call can be dispatched permissionlessly (i.e. by any + * account). + * + * # Conditions for a permissionless dispatch. + * + * * The pool is blocked and the caller is either the root or state-toggler. This is + * refereed to as a kick. + * * The pool is destroying and the member is not the depositor. + * * The pool is destroying, the member is the depositor and no other members are in the + * pool. + * + * ## Conditions for permissioned dispatch (i.e. the caller is also the + * `member_account`): + * + * * The caller is not the depositor. + * * The caller is the depositor, the pool is destroying and no other members are in the + * pool. + * + * # Note + * + * If there are too many unlocking chunks to unbond with the pool account, + * [`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks. If + * there are too many unlocking chunks, the result of this call will likely be the + * `NoMoreChunks` error from the staking system. + */ +export interface NominationPoolsCall_unbond { + __kind: 'unbond' + memberAccount: MultiAddress + unbondingPoints: bigint +} + +/** + * Update the roles of the pool. + * + * The root is the only entity that can change any of the roles, including itself, + * excluding the depositor, who can never change. + * + * It emits an event, notifying UIs of the role change. This event is quite relevant to + * most pool members and they should be informed of changes to pool roles. + */ +export interface NominationPoolsCall_update_roles { + __kind: 'update_roles' + poolId: number + newRoot: Type_330 + newNominator: Type_330 + newStateToggler: Type_330 +} + +/** + * Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an + * error is returned. + * + * Under certain conditions, this call can be dispatched permissionlessly (i.e. by any + * account). + * + * # Conditions for a permissionless dispatch + * + * * The pool is in destroy mode and the target is not the depositor. + * * The target is the depositor and they are the only member in the sub pools. + * * The pool is blocked and the caller is either the root or state-toggler. + * + * # Conditions for permissioned dispatch + * + * * The caller is the target and they are not the depositor. + * + * # Note + * + * If the target is the depositor, the pool will be destroyed. + */ +export interface NominationPoolsCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + memberAccount: MultiAddress + numSlashingSpans: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + call: Call, + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId32), + call: Call, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account] + * - Writes: Multisig Storage, [Caller Account] + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + call: Call + maxWeight: Weight +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId32[] + call: Call +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account + * - Write: Multisig Storage, [Caller Account], Refund Account + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId32[] + timepoint: Timepoint + callHash: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const InitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type InitializerCall = InitializerCall_force_approve + +/** + * Issue a signal to the consensus engine to forcibly act as though all parachain + * blocks in all relay chain blocks up to and including the given number in the current + * chain are valid and should be finalized. + */ +export interface InitializerCall_force_approve { + __kind: 'force_approve' + upTo: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: sts.number(), + }), + force_transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: sts.number(), + }), + freeze: sts.enumStruct({ + index: sts.number(), + }), + transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: number +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: MultiAddress + index: number + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: number +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the + * deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: number +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: MultiAddress + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: sts.bytes(), + }), + } +}) + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: sts.number(), + networkState: OpaqueNetworkState, + sessionIndex: sts.number(), + authorityIndex: sts.number(), + validatorsLen: sts.number(), + } +}) + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export interface Heartbeat { + blockNumber: number + networkState: OpaqueNetworkState + sessionIndex: number + authorityIndex: number + validatorsLen: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is + * length of `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Bytes +} + +/** + * Identity pallet declaration. + */ +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: MultiAddress, + }), + add_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: sts.number(), + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: MultiAddress, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: MultiAddress, + judgement: Judgement, + identity: H256, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: MultiAddress, + }), + rename_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: MultiAddress, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: BitFlags, + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId32, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => sts.tuple(() => [Data, Data])), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => sts.bytes()), + image: Data, + twitter: Data, + } +}) + +export interface IdentityInfo { + additional: [Data, Data][] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (Bytes | undefined) + image: Data + twitter: Data +} + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: Bytes +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: Bytes +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: Bytes +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: Bytes +} + +export const BitFlags = sts.bigint() + +export const Judgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: sts.bigint(), + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export type Judgement = Judgement_Erroneous | Judgement_FeePaid | Judgement_KnownGood | Judgement_LowQuality | Judgement_OutOfDate | Judgement_Reasonable | Judgement_Unknown + +export interface Judgement_Erroneous { + __kind: 'Erroneous' +} + +export interface Judgement_FeePaid { + __kind: 'FeePaid' + value: bigint +} + +export interface Judgement_KnownGood { + __kind: 'KnownGood' +} + +export interface Judgement_LowQuality { + __kind: 'LowQuality' +} + +export interface Judgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface Judgement_Reasonable { + __kind: 'Reasonable' +} + +export interface Judgement_Unknown { + __kind: 'Unknown' +} + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: sts.bytes(), + Keccak256: sts.bytes(), + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: sts.bytes(), + ShaThree256: sts.bytes(), + } +}) + +/** + * Identity pallet declaration. + */ +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: MultiAddress +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: MultiAddress + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: number +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: MultiAddress +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * - `identity`: The hash of the [`IdentityInfo`] for that the judgement is provided. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: MultiAddress + judgement: Judgement + identity: H256 +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: MultiAddress +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: MultiAddress + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: MultiAddress +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: BitFlags +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId32, Data][] +} + +export type BitFlags = bigint + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const HrmpCall: sts.Type = sts.closedEnum(() => { + return { + force_clean_hrmp: sts.enumStruct({ + para: Id, + inbound: sts.number(), + outbound: sts.number(), + }), + force_open_hrmp_channel: sts.enumStruct({ + sender: Id, + recipient: Id, + maxCapacity: sts.number(), + maxMessageSize: sts.number(), + }), + force_process_hrmp_close: sts.enumStruct({ + channels: sts.number(), + }), + force_process_hrmp_open: sts.enumStruct({ + channels: sts.number(), + }), + hrmp_accept_open_channel: sts.enumStruct({ + sender: Id, + }), + hrmp_cancel_open_request: sts.enumStruct({ + channelId: HrmpChannelId, + openRequests: sts.number(), + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: Id, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: Id, + recipient: Id, + } +}) + +export interface HrmpChannelId { + sender: Id + recipient: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type HrmpCall = HrmpCall_force_clean_hrmp | HrmpCall_force_open_hrmp_channel | HrmpCall_force_process_hrmp_close | HrmpCall_force_process_hrmp_open | HrmpCall_hrmp_accept_open_channel | HrmpCall_hrmp_cancel_open_request | HrmpCall_hrmp_close_channel | HrmpCall_hrmp_init_open_channel + +/** + * This extrinsic triggers the cleanup of all the HRMP storage items that + * a para may have. Normally this happens once per session, but this allows + * you to trigger the cleanup immediately for a specific parachain. + * + * Origin must be Root. + * + * Number of inbound and outbound channels for `para` must be provided as witness data of weighing. + */ +export interface HrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: Id + inbound: number + outbound: number +} + +/** + * Open a channel from a `sender` to a `recipient` `ParaId` using the Root origin. Although + * opened by Root, the `max_capacity` and `max_message_size` are still subject to the Relay + * Chain's configured limits. + * + * Expected use is when one of the `ParaId`s involved in the channel is governed by the + * Relay Chain, e.g. a common good parachain. + */ +export interface HrmpCall_force_open_hrmp_channel { + __kind: 'force_open_hrmp_channel' + sender: Id + recipient: Id + maxCapacity: number + maxMessageSize: number +} + +/** + * Force process HRMP close channel requests. + * + * If there are pending HRMP close channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of closing channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' + channels: number +} + +/** + * Force process HRMP open channel requests. + * + * If there are pending HRMP open channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of opening channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' + channels: number +} + +/** + * Accept a pending open channel request from the given sender. + * + * The channel will be opened only on the next session boundary. + */ +export interface HrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: Id +} + +/** + * This cancels a pending open channel request. It can be canceled by either of the sender + * or the recipient for that request. The origin must be either of those. + * + * The cancellation happens immediately. It is not possible to cancel the request if it is + * already accepted. + * + * Total number of open requests (i.e. `HrmpOpenChannelRequestsList`) must be provided as + * witness data. + */ +export interface HrmpCall_hrmp_cancel_open_request { + __kind: 'hrmp_cancel_open_request' + channelId: HrmpChannelId + openRequests: number +} + +/** + * Initiate unilateral closing of a channel. The origin must be either the sender or the + * recipient in the channel being closed. + * + * The closure can only happen on a session change. + */ +export interface HrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * Initiate opening a channel from a parachain to a given recipient with given channel + * parameters. + * + * - `proposed_max_capacity` - specifies how many messages can be in the channel at once. + * - `proposed_max_message_size` - specifies the maximum size of the messages. + * + * These numbers are a subject to the relay-chain configuration limits. + * + * The channel can be opened only after the recipient confirms it and only on a session + * change. + */ +export interface HrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: Id + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: sts.number(), + bestFinalizedBlockNumber: sts.number(), + }), + report_equivocation: sts.enumStruct({ + equivocationProof: Type_112, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_112, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: sts.number(), + trieNodes: sts.array(() => sts.bytes()), + validatorCount: sts.number(), + } +}) + +export interface MembershipProof { + session: number + trieNodes: Bytes[] + validatorCount: number +} + +export const Type_112: sts.Type = sts.struct(() => { + return { + setId: sts.bigint(), + equivocation: Equivocation, + } +}) + +export const Equivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: Type_120, + Prevote: Type_114, + } +}) + +export const Type_114: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Prevote, Signature]), + second: sts.tuple(() => [Prevote, Signature]), + } +}) + +export const Signature = sts.bytes() + +export const Prevote: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Prevote { + targetHash: H256 + targetNumber: number +} + +export interface Type_114 { + roundNumber: bigint + identity: Public + first: [Prevote, Signature] + second: [Prevote, Signature] +} + +export type Signature = Bytes + +export const Type_120: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Precommit, Signature]), + second: sts.tuple(() => [Precommit, Signature]), + } +}) + +export const Precommit: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Precommit { + targetHash: H256 + targetNumber: number +} + +export interface Type_120 { + roundNumber: bigint + identity: Public + first: [Precommit, Signature] + second: [Precommit, Signature] +} + +export type Equivocation = Equivocation_Precommit | Equivocation_Prevote + +export interface Equivocation_Precommit { + __kind: 'Precommit' + value: Type_120 +} + +export interface Equivocation_Prevote { + __kind: 'Prevote' + value: Type_114 +} + +export interface Type_112 { + setId: bigint + equivocation: Equivocation +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has stalled. + * + * This will trigger a forced authority set change at the beginning of the next session, to + * be enacted `delay` blocks after that. The `delay` should be high enough to safely assume + * that the block signalling the forced change will not be re-orged e.g. 1000 blocks. + * The block production rate (which may be slowed down because of finality lagging) should + * be taken into account when choosing the `delay`. The GRANDPA voters based on the new + * authority will start voting on top of `best_finalized_block_number` for new finalized + * blocks. `best_finalized_block_number` should be the highest of the latest finalized + * block of all validators of the new authority set. + * + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: number + bestFinalizedBlockNumber: number +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_112 + keyOwnerProof: MembershipProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_112 + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GiltCall: sts.Type = sts.closedEnum(() => { + return { + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + set_target: sts.enumStruct({ + target: sts.bigint(), + }), + thaw: sts.enumStruct({ + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GiltCall = GiltCall_place_bid | GiltCall_retract_bid | GiltCall_set_target | GiltCall_thaw + +/** + * Place a bid for a gilt to be issued. + * + * Origin must be Signed, and account must have at least `amount` in free balance. + * + * - `amount`: The amount of the bid; these funds will be reserved. If the bid is + * successfully elevated into an issued gilt, then these funds will continue to be + * reserved until the gilt expires. Must be at least `MinFreeze`. + * - `duration`: The number of periods for which the funds will be locked if the gilt is + * issued. It will expire only after this period has elapsed after the point of issuance. + * Must be greater than 1 and no more than `QueueCount`. + * + * Complexities: + * - `Queues[duration].len()` (just take max). + */ +export interface GiltCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * Retract a previously placed bid. + * + * Origin must be Signed, and the account should have previously issued a still-active bid + * of `amount` for `duration`. + * + * - `amount`: The amount of the previous bid. + * - `duration`: The duration of the previous bid. + */ +export interface GiltCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * Set target proportion of gilt-funds. + * + * Origin must be `AdminOrigin`. + * + * - `target`: The target proportion of effective issued funds that should be under gilts + * at any one time. + */ +export interface GiltCall_set_target { + __kind: 'set_target' + target: bigint +} + +/** + * Remove an active but expired gilt. Reserved funds under gilt are freed and balance is + * adjusted to ensure that the funds grow or shrink to maintain the equivalent proportion + * of effective total issued funds. + * + * Origin must be Signed and the account must be the owner of the gilt of the given index. + * + * - `index`: The index of the gilt to be thawed. + */ +export interface GiltCall_thaw { + __kind: 'thaw' + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const FellowshipReferendaCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + index: sts.number(), + }), + kill: sts.enumStruct({ + index: sts.number(), + }), + nudge_referendum: sts.enumStruct({ + index: sts.number(), + }), + one_fewer_deciding: sts.enumStruct({ + track: sts.number(), + }), + place_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + submit: sts.enumStruct({ + proposalOrigin: OriginCaller, + proposal: Bounded, + enactmentMoment: DispatchTime, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type FellowshipReferendaCall = FellowshipReferendaCall_cancel | FellowshipReferendaCall_kill | FellowshipReferendaCall_nudge_referendum | FellowshipReferendaCall_one_fewer_deciding | FellowshipReferendaCall_place_decision_deposit | FellowshipReferendaCall_refund_decision_deposit | FellowshipReferendaCall_submit + +/** + * Cancel an ongoing referendum. + * + * - `origin`: must be the `CancelOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Cancelled`. + */ +export interface FellowshipReferendaCall_cancel { + __kind: 'cancel' + index: number +} + +/** + * Cancel an ongoing referendum and slash the deposits. + * + * - `origin`: must be the `KillOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Killed` and `DepositSlashed`. + */ +export interface FellowshipReferendaCall_kill { + __kind: 'kill' + index: number +} + +/** + * Advance a referendum onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `index`: the referendum to be advanced. + */ +export interface FellowshipReferendaCall_nudge_referendum { + __kind: 'nudge_referendum' + index: number +} + +/** + * Advance a track onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `track`: the track to be advanced. + * + * Action item for when there is now one fewer referendum in the deciding phase and the + * `DecidingCount` is not yet updated. This means that we should either: + * - begin deciding another referendum (and leave `DecidingCount` alone); or + * - decrement `DecidingCount`. + */ +export interface FellowshipReferendaCall_one_fewer_deciding { + __kind: 'one_fewer_deciding' + track: number +} + +/** + * Post the Decision Deposit for a referendum. + * + * - `origin`: must be `Signed` and the account must have funds available for the + * referendum's track's Decision Deposit. + * - `index`: The index of the submitted referendum whose Decision Deposit is yet to be + * posted. + * + * Emits `DecisionDepositPlaced`. + */ +export interface FellowshipReferendaCall_place_decision_deposit { + __kind: 'place_decision_deposit' + index: number +} + +/** + * Refund the Decision Deposit for a closed referendum back to the depositor. + * + * - `origin`: must be `Signed` or `Root`. + * - `index`: The index of a closed referendum whose Decision Deposit has not yet been + * refunded. + * + * Emits `DecisionDepositRefunded`. + */ +export interface FellowshipReferendaCall_refund_decision_deposit { + __kind: 'refund_decision_deposit' + index: number +} + +/** + * Propose a referendum on a privileged action. + * + * - `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds + * available. + * - `proposal_origin`: The origin from which the proposal should be executed. + * - `proposal`: The proposal. + * - `enactment_moment`: The moment that the proposal should be enacted. + * + * Emits `Submitted`. + */ +export interface FellowshipReferendaCall_submit { + __kind: 'submit' + proposalOrigin: OriginCaller + proposal: Bounded + enactmentMoment: DispatchTime +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const FellowshipCollectiveCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: MultiAddress, + }), + cleanup_poll: sts.enumStruct({ + pollIndex: sts.number(), + max: sts.number(), + }), + demote_member: sts.enumStruct({ + who: MultiAddress, + }), + promote_member: sts.enumStruct({ + who: MultiAddress, + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + minRank: sts.number(), + }), + vote: sts.enumStruct({ + poll: sts.number(), + aye: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type FellowshipCollectiveCall = FellowshipCollectiveCall_add_member | FellowshipCollectiveCall_cleanup_poll | FellowshipCollectiveCall_demote_member | FellowshipCollectiveCall_promote_member | FellowshipCollectiveCall_remove_member | FellowshipCollectiveCall_vote + +/** + * Introduce a new member. + * + * - `origin`: Must be the `AdminOrigin`. + * - `who`: Account of non-member which will become a member. + * - `rank`: The rank to give the new member. + * + * Weight: `O(1)` + */ +export interface FellowshipCollectiveCall_add_member { + __kind: 'add_member' + who: MultiAddress +} + +/** + * Remove votes from the given poll. It must have ended. + * + * - `origin`: Must be `Signed` by any account. + * - `poll_index`: Index of a poll which is completed and for which votes continue to + * exist. + * - `max`: Maximum number of vote items from remove in this call. + * + * Transaction fees are waived if the operation is successful. + * + * Weight `O(max)` (less if there are fewer items to remove than `max`). + */ +export interface FellowshipCollectiveCall_cleanup_poll { + __kind: 'cleanup_poll' + pollIndex: number + max: number +} + +/** + * Decrement the rank of an existing member by one. If the member is already at rank zero, + * then they are removed entirely. + * + * - `origin`: Must be the `AdminOrigin`. + * - `who`: Account of existing member of rank greater than zero. + * + * Weight: `O(1)`, less if the member's index is highest in its rank. + */ +export interface FellowshipCollectiveCall_demote_member { + __kind: 'demote_member' + who: MultiAddress +} + +/** + * Increment the rank of an existing member by one. + * + * - `origin`: Must be the `AdminOrigin`. + * - `who`: Account of existing member. + * + * Weight: `O(1)` + */ +export interface FellowshipCollectiveCall_promote_member { + __kind: 'promote_member' + who: MultiAddress +} + +/** + * Remove the member entirely. + * + * - `origin`: Must be the `AdminOrigin`. + * - `who`: Account of existing member of rank greater than zero. + * - `min_rank`: The rank of the member or greater. + * + * Weight: `O(min_rank)`. + */ +export interface FellowshipCollectiveCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + minRank: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * - `origin`: Must be `Signed` by a member account. + * - `poll`: Index of a poll which is ongoing. + * - `aye`: `true` if the vote is to approve the proposal, `false` otherwise. + * + * Transaction fees are be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * + * Weight: `O(1)`, less if there was no previous vote on the poll by the member. + */ +export interface FellowshipCollectiveCall_vote { + __kind: 'vote' + poll: number + aye: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const FastUnstakeCall: sts.Type = sts.closedEnum(() => { + return { + control: sts.enumStruct({ + uncheckedErasToCheck: sts.number(), + }), + deregister: sts.unit(), + register_fast_unstake: sts.unit(), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type FastUnstakeCall = FastUnstakeCall_control | FastUnstakeCall_deregister | FastUnstakeCall_register_fast_unstake + +/** + * Control the operation of this pallet. + * + * Dispatch origin must be signed by the [`Config::ControlOrigin`]. + */ +export interface FastUnstakeCall_control { + __kind: 'control' + uncheckedErasToCheck: number +} + +/** + * Deregister oneself from the fast-unstake. + * + * This is useful if one is registered, they are still waiting, and they change their mind. + * + * Note that the associated stash is still fully unbonded and chilled as a consequence of + * calling `register_fast_unstake`. This should probably be followed by a call to + * `Staking::rebond`. + */ +export interface FastUnstakeCall_deregister { + __kind: 'deregister' +} + +/** + * Register oneself for fast-unstake. + * + * The dispatch origin of this call must be signed by the controller account, similar to + * `staking::unbond`. + * + * The stash associated with the origin must have no ongoing unlocking chunks. If + * successful, this will fully unbond and chill the stash. Then, it will enqueue the stash + * to be checked in further blocks. + * + * If by the time this is called, the stash is actually eligible for fast-unstake, then + * they are guaranteed to remain eligible, because the call will chill them as well. + * + * If the check works, the entire staking data is removed, i.e. the stash is fully + * unstaked. + * + * If the check fails, the stash remains chilled and waiting for being unbonded as in with + * the normal staking system, but they lose part of their unbonding chunks due to consuming + * the chain's resources. + */ +export interface FastUnstakeCall_register_fast_unstake { + __kind: 'register_fast_unstake' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + governance_fallback: sts.enumStruct({ + maybeMaxVoters: sts.option(() => sts.number()), + maybeMaxTargets: sts.option(() => sts.number()), + }), + set_emergency_election_result: sts.enumStruct({ + supports: sts.array(() => sts.tuple(() => [AccountId32, Support])), + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => ElectionScore), + }), + submit: sts.enumStruct({ + rawSolution: RawSolution, + }), + submit_unsigned: sts.enumStruct({ + rawSolution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export const RawSolution: sts.Type = sts.struct(() => { + return { + solution: NposCompactSolution24, + score: ElectionScore, + round: sts.number(), + } +}) + +export const NposCompactSolution24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), + votes2: sts.array(() => sts.tuple(() => [sts.number(), sts.tuple(() => [sts.number(), sts.number()]), sts.number()])), + votes3: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes4: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes5: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes6: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes7: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes8: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes9: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes10: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes11: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes12: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes13: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes14: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes15: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes16: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes17: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes18: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes19: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes20: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes21: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes22: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes23: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes24: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + } +}) + +export interface NposCompactSolution24 { + votes1: [number, number][] + votes2: [number, [number, number], number][] + votes3: [number, [number, number][], number][] + votes4: [number, [number, number][], number][] + votes5: [number, [number, number][], number][] + votes6: [number, [number, number][], number][] + votes7: [number, [number, number][], number][] + votes8: [number, [number, number][], number][] + votes9: [number, [number, number][], number][] + votes10: [number, [number, number][], number][] + votes11: [number, [number, number][], number][] + votes12: [number, [number, number][], number][] + votes13: [number, [number, number][], number][] + votes14: [number, [number, number][], number][] + votes15: [number, [number, number][], number][] + votes16: [number, [number, number][], number][] + votes17: [number, [number, number][], number][] + votes18: [number, [number, number][], number][] + votes19: [number, [number, number][], number][] + votes20: [number, [number, number][], number][] + votes21: [number, [number, number][], number][] + votes22: [number, [number, number][], number][] + votes23: [number, [number, number][], number][] + votes24: [number, [number, number][], number][] +} + +export interface RawSolution { + solution: NposCompactSolution24 + score: ElectionScore + round: number +} + +export interface ElectionScore { + minimalStake: bigint + sumStake: bigint + sumStakeSquared: bigint +} + +export const ElectionScore: sts.Type = sts.struct(() => { + return { + minimalStake: sts.bigint(), + sumStake: sts.bigint(), + sumStakeSquared: sts.bigint(), + } +}) + +export const Support: sts.Type = sts.struct(() => { + return { + total: sts.bigint(), + voters: sts.array(() => sts.tuple(() => [AccountId32, sts.bigint()])), + } +}) + +export interface Support { + total: bigint + voters: [AccountId32, bigint][] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_governance_fallback | ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * Trigger the governance fallback. + * + * This can only be called when [`Phase::Emergency`] is enabled, as an alternative to + * calling [`Call::set_emergency_election_result`]. + */ +export interface ElectionProviderMultiPhaseCall_governance_fallback { + __kind: 'governance_fallback' + maybeMaxVoters?: (number | undefined) + maybeMaxTargets?: (number | undefined) +} + +/** + * Set a solution in the queue, to be handed out to the client of this pallet in the next + * call to `ElectionProvider::elect`. + * + * This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`. + * + * The solution is not checked for any feasibility and is assumed to be trustworthy, as any + * feasibility check itself can in principle cause the election process to fail (due to + * memory/weight constrains). + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + supports: [AccountId32, Support][] +} + +/** + * Set a new value for `MinimumUntrustedScore`. + * + * Dispatch origin must be aligned with `T::ForceOrigin`. + * + * This check can be turned off by setting the value to `None`. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (ElectionScore | undefined) +} + +/** + * Submit a solution for the signed phase. + * + * The dispatch origin fo this call must be __signed__. + * + * The solution is potentially queued, based on the claimed score and processed at the end + * of the signed phase. + * + * A deposit is reserved and recorded for the solution. Based on the outcome, the solution + * might be rewarded, slashed, or get all or a part of the deposit back. + */ +export interface ElectionProviderMultiPhaseCall_submit { + __kind: 'submit' + rawSolution: RawSolution +} + +/** + * Submit a solution for the unsigned phase. + * + * The dispatch origin fo this call must be __none__. + * + * This submission is checked on the fly. Moreover, this unsigned solution is only + * validated when submitted to the pool from the **local** node. Effectively, this means + * that only active validators can submit this transaction when authoring a block (similar + * to an inherent). + * + * To prevent any incorrect solution (and thus wasted time/weight), this transaction will + * panic if the solution submitted by the validator is invalid in any way, effectively + * putting their authoring reward at risk. + * + * No deposit or reward is associated with this submission. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + rawSolution: RawSolution + witness: SolutionOrSnapshotSize +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DmpCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + blacklist: sts.enumStruct({ + proposalHash: H256, + maybeRefIndex: sts.option(() => sts.number()), + }), + cancel_proposal: sts.enumStruct({ + propIndex: sts.number(), + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: MultiAddress, + conviction: Conviction, + balance: sts.bigint(), + }), + emergency_cancel: sts.enumStruct({ + refIndex: sts.number(), + }), + external_propose: sts.enumStruct({ + proposal: Bounded, + }), + external_propose_default: sts.enumStruct({ + proposal: Bounded, + }), + external_propose_majority: sts.enumStruct({ + proposal: Bounded, + }), + fast_track: sts.enumStruct({ + proposalHash: H256, + votingPeriod: sts.number(), + delay: sts.number(), + }), + propose: sts.enumStruct({ + proposal: Bounded, + value: sts.bigint(), + }), + remove_other_vote: sts.enumStruct({ + target: MultiAddress, + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + index: sts.number(), + }), + second: sts.enumStruct({ + proposal: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: MultiAddress, + }), + veto_external: sts.enumStruct({ + proposalHash: H256, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface AccountVote_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DemocracyCall = DemocracyCall_blacklist | DemocracyCall_cancel_proposal | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_propose | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. + * + * If called on a queued public or external proposal, then this will result in it being + * removed. If the `ref_index` supplied is an active referendum with the proposal hash, + * then it will be cancelled. + * + * The dispatch origin of this call must be `BlacklistOrigin`. + * + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. + * + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). + */ +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: H256 + maybeRefIndex?: (number | undefined) +} + +/** + * Remove a proposal. + * + * The dispatch origin of this call must be `CancelProposalOrigin`. + * + * - `prop_index`: The index of the proposal to cancel. + * + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must not + * be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: MultiAddress + conviction: Conviction + balance: bigint +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: number +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposal: Bounded +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposal: Bounded +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposal: Bounded +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * Must be always greater than zero. + * For `FastTrackOrigin` must be equal or greater than `FastTrackVotingPeriod`. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: H256 + votingPeriod: number + delay: number +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposal: Bounded + value: bigint +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: MultiAddress + index: number +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: number +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: MultiAddress +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * Weight: `O(V + log(V))` where V is number of `existing vetoers` + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: H256 +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: Id, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + contribute_all: sts.enumStruct({ + index: sts.number(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: Id, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId32, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_contribute_all | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * Add an optional memo to an existing crowdloan contribution. + * + * Origin must be Signed, and the user must have contributed to the crowdloan. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: Id + memo: Bytes +} + +/** + * Contribute to a crowd sale. This will transfer some balance over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * Contribute your entire balance to a crowd sale. This will transfer the entire balance of a user over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute_all { + __kind: 'contribute_all' + index: number + signature?: (MultiSignature | undefined) +} + +/** + * Create a new crowdloaning campaign for a parachain slot with the given lease period range. + * + * This applies a lock to your parachain configuration, ensuring that it cannot be changed + * by the parachain manager. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Remove a fund after the retirement period has ended and all funds have been returned. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * Edit the configuration for an in-progress crowdloan. + * + * Can only be called by Root origin. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Poke the fund into `NewRaise` + * + * Origin must be Signed, and the fund has non-zero raise. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: Id +} + +/** + * Automatically refund contributors of an ended crowdloan. + * Due to weight restrictions, this function may need to be called multiple + * times to fully refund all users. We will refund `RemoveKeysLimit` users at a time. + * + * Origin must be signed, but can come from anyone. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * Withdraw full balance of a specific contributor. + * + * Origin must be signed, but can come from anyone. + * + * The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement + * flag must be set. For a fund to be ready for retirement, then: + * - it must not already be in retirement; + * - the amount of raised funds must be bigger than the _free_ balance of the account; + * - and either: + * - the block number must be at least `end`; or + * - the current lease period must be greater than the fund's `last_period`. + * + * In this case, the fund's retirement flag is set and its `end` is reset to the current block + * number. + * + * - `who`: The account whose contribution should be withdrawn. + * - `index`: The parachain to whose crowdloan the contribution was made. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: Weight, + lengthBound: sts.number(), + }), + close_old_weight: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CouncilCall = CouncilCall_close | CouncilCall_close_old_weight | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: Weight + lengthBound: number +} + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close_old_weight { + __kind: 'close_old_weight' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ConvictionVotingCall: sts.Type = sts.closedEnum(() => { + return { + delegate: sts.enumStruct({ + class: sts.number(), + to: MultiAddress, + conviction: Type_146, + balance: sts.bigint(), + }), + remove_other_vote: sts.enumStruct({ + target: MultiAddress, + class: sts.number(), + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + class: sts.option(() => sts.number()), + index: sts.number(), + }), + undelegate: sts.enumStruct({ + class: sts.number(), + }), + unlock: sts.enumStruct({ + class: sts.number(), + target: MultiAddress, + }), + vote: sts.enumStruct({ + pollIndex: sts.number(), + vote: Type_144, + }), + } +}) + +export const Type_144: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type Type_144 = Type_144_Split | Type_144_Standard + +export interface Type_144_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface Type_144_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Type_146: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Type_146 = Type_146_Locked1x | Type_146_Locked2x | Type_146_Locked3x | Type_146_Locked4x | Type_146_Locked5x | Type_146_Locked6x | Type_146_None + +export interface Type_146_Locked1x { + __kind: 'Locked1x' +} + +export interface Type_146_Locked2x { + __kind: 'Locked2x' +} + +export interface Type_146_Locked3x { + __kind: 'Locked3x' +} + +export interface Type_146_Locked4x { + __kind: 'Locked4x' +} + +export interface Type_146_Locked5x { + __kind: 'Locked5x' +} + +export interface Type_146_Locked6x { + __kind: 'Locked6x' +} + +export interface Type_146_None { + __kind: 'None' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ConvictionVotingCall = ConvictionVotingCall_delegate | ConvictionVotingCall_remove_other_vote | ConvictionVotingCall_remove_vote | ConvictionVotingCall_undelegate | ConvictionVotingCall_unlock | ConvictionVotingCall_vote + +/** + * Delegate the voting power (with some given conviction) of the sending account for a + * particular class of polls. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `class`: The class of polls to delegate. To delegate multiple classes, multiple calls + * to this function are required. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must not + * be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of polls the voter delegating to has + * voted on. Weight is initially charged as if maximum votes, but is refunded later. + */ +export interface ConvictionVotingCall_delegate { + __kind: 'delegate' + class: number + to: MultiAddress + conviction: Type_146 + balance: bigint +} + +/** + * Remove a vote for a poll. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the poll was cancelled, because the voter lost the poll or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for poll + * `index`. + * - `index`: The index of poll of the vote to be removed. + * - `class`: The class of the poll. + * + * Weight: `O(R + log R)` where R is the number of polls that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface ConvictionVotingCall_remove_other_vote { + __kind: 'remove_other_vote' + target: MultiAddress + class: number + index: number +} + +/** + * Remove a vote for a poll. + * + * If: + * - the poll was cancelled, or + * - the poll is ongoing, or + * - the poll has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the poll has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for poll `index`. + * + * - `index`: The index of poll of the vote to be removed. + * - `class`: Optional parameter, if given it indicates the class of the poll. For polls + * which have finished or are cancelled, this must be `Some`. + * + * Weight: `O(R + log R)` where R is the number of polls that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface ConvictionVotingCall_remove_vote { + __kind: 'remove_vote' + class?: (number | undefined) + index: number +} + +/** + * Undelegate the voting power of the sending account for a particular class of polls. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * - `class`: The class of polls to remove the delegation from. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of polls the voter delegating to has + * voted on. Weight is initially charged as if maximum votes, but is refunded later. + */ +export interface ConvictionVotingCall_undelegate { + __kind: 'undelegate' + class: number +} + +/** + * Remove the lock caused prior voting/delegating which has expired within a particluar + * class. + * + * The dispatch origin of this call must be _Signed_. + * + * - `class`: The class of polls to unlock. + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface ConvictionVotingCall_unlock { + __kind: 'unlock' + class: number + target: MultiAddress +} + +/** + * Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `poll_index`: The index of the poll to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of polls the voter has voted on. + */ +export interface ConvictionVotingCall_vote { + __kind: 'vote' + pollIndex: number + vote: Type_144 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_bypass_consistency_check: sts.enumStruct({ + new: sts.boolean(), + }), + set_chain_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_code_retention_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_conclusion_by_time_out_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_max_spam_slots: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: sts.number(), + }), + set_group_rotation_frequency: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_minimum_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_cores: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_retries: sts.enumStruct({ + new: sts.number(), + }), + set_pvf_checking_enabled: sts.enumStruct({ + new: sts.boolean(), + }), + set_pvf_voting_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_thread_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_ump_max_individual_weight: sts.enumStruct({ + new: Weight, + }), + set_ump_service_total_weight: sts.enumStruct({ + new: Weight, + }), + set_validation_upgrade_cooldown: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ConfigurationCall = ConfigurationCall_set_bypass_consistency_check | ConfigurationCall_set_chain_availability_period | ConfigurationCall_set_code_retention_period | ConfigurationCall_set_dispute_conclusion_by_time_out_period | ConfigurationCall_set_dispute_max_spam_slots | ConfigurationCall_set_dispute_period | ConfigurationCall_set_dispute_post_conclusion_acceptance_period | ConfigurationCall_set_group_rotation_frequency | ConfigurationCall_set_hrmp_channel_max_capacity | ConfigurationCall_set_hrmp_channel_max_message_size | ConfigurationCall_set_hrmp_channel_max_total_size | ConfigurationCall_set_hrmp_max_message_num_per_candidate | ConfigurationCall_set_hrmp_max_parachain_inbound_channels | ConfigurationCall_set_hrmp_max_parachain_outbound_channels | ConfigurationCall_set_hrmp_max_parathread_inbound_channels | ConfigurationCall_set_hrmp_max_parathread_outbound_channels | ConfigurationCall_set_hrmp_open_request_ttl | ConfigurationCall_set_hrmp_recipient_deposit | ConfigurationCall_set_hrmp_sender_deposit | ConfigurationCall_set_max_code_size | ConfigurationCall_set_max_downward_message_size | ConfigurationCall_set_max_head_data_size | ConfigurationCall_set_max_pov_size | ConfigurationCall_set_max_upward_message_num_per_candidate | ConfigurationCall_set_max_upward_message_size | ConfigurationCall_set_max_upward_queue_count | ConfigurationCall_set_max_upward_queue_size | ConfigurationCall_set_max_validators | ConfigurationCall_set_max_validators_per_core | ConfigurationCall_set_minimum_validation_upgrade_delay | ConfigurationCall_set_n_delay_tranches | ConfigurationCall_set_needed_approvals | ConfigurationCall_set_no_show_slots | ConfigurationCall_set_parathread_cores | ConfigurationCall_set_parathread_retries | ConfigurationCall_set_pvf_checking_enabled | ConfigurationCall_set_pvf_voting_ttl | ConfigurationCall_set_relay_vrf_modulo_samples | ConfigurationCall_set_scheduling_lookahead | ConfigurationCall_set_thread_availability_period | ConfigurationCall_set_ump_max_individual_weight | ConfigurationCall_set_ump_service_total_weight | ConfigurationCall_set_validation_upgrade_cooldown | ConfigurationCall_set_validation_upgrade_delay | ConfigurationCall_set_zeroth_delay_tranche_width + +/** + * Setting this to true will disable consistency checks for the configuration setters. + * Use with caution. + */ +export interface ConfigurationCall_set_bypass_consistency_check { + __kind: 'set_bypass_consistency_check' + new: boolean +} + +/** + * Set the availability period for parachains. + */ +export interface ConfigurationCall_set_chain_availability_period { + __kind: 'set_chain_availability_period' + new: number +} + +/** + * Set the acceptance period for an included candidate. + */ +export interface ConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: number +} + +/** + * Set the dispute conclusion by time out period. + */ +export interface ConfigurationCall_set_dispute_conclusion_by_time_out_period { + __kind: 'set_dispute_conclusion_by_time_out_period' + new: number +} + +/** + * Set the maximum number of dispute spam slots. + */ +export interface ConfigurationCall_set_dispute_max_spam_slots { + __kind: 'set_dispute_max_spam_slots' + new: number +} + +/** + * Set the dispute period, in number of sessions to keep for disputes. + */ +export interface ConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: number +} + +/** + * Set the dispute post conclusion acceptance period. + */ +export interface ConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: number +} + +/** + * Set the parachain validator-group rotation frequency + */ +export interface ConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: number +} + +/** + * Sets the maximum number of messages allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * Sets the maximum size of a message that could ever be put into an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * Sets the maximum total size of messages in bytes allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * Sets the maximum number of outbound HRMP messages can be sent by a candidate. + */ +export interface ConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parachain is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parachain is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parathread is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_inbound_channels { + __kind: 'set_hrmp_max_parathread_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parathread is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_outbound_channels { + __kind: 'set_hrmp_max_parathread_outbound_channels' + new: number +} + +/** + * Sets the number of sessions after which an HRMP open channel request expires. + */ +export interface ConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * Sets the amount of funds that the recipient should provide for accepting opening an HRMP + * channel. + */ +export interface ConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: bigint +} + +/** + * Sets the amount of funds that the sender should provide for opening an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: bigint +} + +/** + * Set the max validation code size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * Set the critical downward message size. + */ +export interface ConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * Set the max head data size for paras. + */ +export interface ConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * Set the max POV block size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * Sets the maximum number of messages that a candidate can contain. + */ +export interface ConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum size of an upward message that can be sent by a candidate. + */ +export interface ConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * Sets the maximum items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * Sets the maximum total size of items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * Set the maximum number of validators to use in parachain consensus. + */ +export interface ConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * Set the maximum number of validators to assign to any core. + */ +export interface ConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * Sets the minimum delay between announcing the upgrade block for a parachain until the + * upgrade taking place. + * + * See the field documentation for information and constraints for the new value. + */ +export interface ConfigurationCall_set_minimum_validation_upgrade_delay { + __kind: 'set_minimum_validation_upgrade_delay' + new: number +} + +/** + * Set the total number of delay tranches. + */ +export interface ConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * Set the number of validators needed to approve a block. + */ +export interface ConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * Set the no show slots, in number of number of consensus slots. + * Must be at least 1. + */ +export interface ConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * Set the number of parathread execution cores. + */ +export interface ConfigurationCall_set_parathread_cores { + __kind: 'set_parathread_cores' + new: number +} + +/** + * Set the number of retries for a particular parathread. + */ +export interface ConfigurationCall_set_parathread_retries { + __kind: 'set_parathread_retries' + new: number +} + +/** + * Enable or disable PVF pre-checking. Consult the field documentation prior executing. + */ +export interface ConfigurationCall_set_pvf_checking_enabled { + __kind: 'set_pvf_checking_enabled' + new: boolean +} + +/** + * Set the number of session changes after which a PVF pre-checking voting is rejected. + */ +export interface ConfigurationCall_set_pvf_voting_ttl { + __kind: 'set_pvf_voting_ttl' + new: number +} + +/** + * Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion. + */ +export interface ConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * Set the scheduling lookahead, in expected number of blocks at peak throughput. + */ +export interface ConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * Set the availability period for parathreads. + */ +export interface ConfigurationCall_set_thread_availability_period { + __kind: 'set_thread_availability_period' + new: number +} + +/** + * Sets the maximum amount of weight any individual upward message may consume. + */ +export interface ConfigurationCall_set_ump_max_individual_weight { + __kind: 'set_ump_max_individual_weight' + new: Weight +} + +/** + * Sets the soft limit for the phase of dispatching dispatchable upward messages. + */ +export interface ConfigurationCall_set_ump_service_total_weight { + __kind: 'set_ump_service_total_weight' + new: Weight +} + +/** + * Set the validation upgrade cooldown. + */ +export interface ConfigurationCall_set_validation_upgrade_cooldown { + __kind: 'set_validation_upgrade_cooldown' + new: number +} + +/** + * Set the validation upgrade delay. + */ +export interface ConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: number +} + +/** + * Set the zeroth delay tranche width. + */ +export interface ConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: sts.bigint(), + vestingSchedule: sts.option(() => sts.tuple(() => [sts.bigint(), sts.bigint(), sts.number()])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId32), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId32 + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId32 + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: bigint + vestingSchedule?: ([bigint, bigint, number] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId32 | undefined) +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ChildBountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + add_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + value: sts.bigint(), + description: sts.bytes(), + }), + award_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + close_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + propose_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ChildBountiesCall = ChildBountiesCall_accept_curator | ChildBountiesCall_add_child_bounty | ChildBountiesCall_award_child_bounty | ChildBountiesCall_claim_child_bounty | ChildBountiesCall_close_child_bounty | ChildBountiesCall_propose_curator | ChildBountiesCall_unassign_curator + +/** + * Accept the curator role for the child-bounty. + * + * The dispatch origin for this call must be the curator of this + * child-bounty. + * + * A deposit will be reserved from the curator and refund upon + * successful payout or cancellation. + * + * Fee for curator is deducted from curator fee of parent bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in "CuratorProposed" state, for processing the + * call. And state of child-bounty is moved to "Active" on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_accept_curator { + __kind: 'accept_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Add a new child-bounty. + * + * The dispatch origin for this call must be the curator of parent + * bounty and the parent bounty must be in "active" state. + * + * Child-bounty gets added successfully & fund gets transferred from + * parent bounty to child-bounty account, if parent bounty has enough + * funds, else the call fails. + * + * Upper bound to maximum number of active child bounties that can be + * added are managed via runtime trait config + * [`Config::MaxActiveChildBountyCount`]. + * + * If the call is success, the status of child-bounty is updated to + * "Added". + * + * - `parent_bounty_id`: Index of parent bounty for which child-bounty is being added. + * - `value`: Value for executing the proposal. + * - `description`: Text description for the child-bounty. + */ +export interface ChildBountiesCall_add_child_bounty { + __kind: 'add_child_bounty' + parentBountyId: number + value: bigint + description: Bytes +} + +/** + * Award child-bounty to a beneficiary. + * + * The beneficiary will be able to claim the funds after a delay. + * + * The dispatch origin for this call must be the parent curator or + * curator of this child-bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in active state, for processing the call. And + * state of child-bounty is moved to "PendingPayout" on successful call + * completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + * - `beneficiary`: Beneficiary account. + */ +export interface ChildBountiesCall_award_child_bounty { + __kind: 'award_child_bounty' + parentBountyId: number + childBountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded child-bounty after payout delay. + * + * The dispatch origin for this call may be any signed origin. + * + * Call works independent of parent bounty state, No need for parent + * bounty to be in active state. + * + * The Beneficiary is paid out with agreed bounty value. Curator fee is + * paid & curator deposit is unreserved. + * + * Child-bounty must be in "PendingPayout" state, for processing the + * call. And instance of child-bounty is removed from the state on + * successful call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_claim_child_bounty { + __kind: 'claim_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * Cancel a proposed or active child-bounty. Child-bounty account funds + * are transferred to parent bounty account. The child-bounty curator + * deposit may be unreserved if possible. + * + * The dispatch origin for this call must be either parent curator or + * `T::RejectOrigin`. + * + * If the state of child-bounty is `Active`, curator deposit is + * unreserved. + * + * If the state of child-bounty is `PendingPayout`, call fails & + * returns `PendingPayout` error. + * + * For the origin other than T::RejectOrigin, parent bounty must be in + * active state, for this child-bounty call to work. For origin + * T::RejectOrigin execution is forced. + * + * Instance of child-bounty is removed from the state on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_close_child_bounty { + __kind: 'close_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * Propose curator for funded child-bounty. + * + * The dispatch origin for this call must be curator of parent bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in "Added" state, for processing the call. And + * state of child-bounty is moved to "CuratorProposed" on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + * - `curator`: Address of child-bounty curator. + * - `fee`: payment fee to child-bounty curator for execution. + */ +export interface ChildBountiesCall_propose_curator { + __kind: 'propose_curator' + parentBountyId: number + childBountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a child-bounty. + * + * The dispatch origin for this call can be either `RejectOrigin`, or + * the curator of the parent bounty, or any signed origin. + * + * For the origin other than T::RejectOrigin and the child-bounty + * curator, parent bounty must be in active state, for this call to + * work. We allow child-bounty curator and T::RejectOrigin to execute + * this call irrespective of the parent bounty state. + * + * If this function is called by the `RejectOrigin` or the + * parent bounty curator, we assume that the child-bounty curator is + * malicious or inactive. As a result, child-bounty curator deposit is + * slashed. + * + * If the origin is the child-bounty curator, we take this as a sign + * that they are unable to do their job, and are willingly giving up. + * We could slash the deposit, but for now we allow them to unreserve + * their deposit and exit without issue. (We may want to change this if + * it is abused.) + * + * Finally, the origin can be anyone iff the child-bounty curator is + * "inactive". Expiry update due of parent bounty is used to estimate + * inactive state of child-bounty curator. + * + * This allows anyone in the community to call out that a child-bounty + * curator is not doing their due diligence, and we should pick a new + * one. In this case the child-bounty curator deposit is slashed. + * + * State of child-bounty is moved to Added state on successful call + * completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_unassign_curator { + __kind: 'unassign_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds + * after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is + * malicious or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_force_unreserve | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_all | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is not + * assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * Unreserve some balance from a user by force. + * + * Can only be called by ROOT. + */ +export interface BalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also alter the total issuance of the system (`TotalIssuance`) appropriately. + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: MultiAddress + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for input config + * types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex + * computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional check + * that the transfer will not kill the origin account. + * --------------------------------- + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: MultiAddress + value: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). # + * - O(1). Just like transfer, but reading the user's transferable balance first. + * # + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const EquivocationProof: sts.Type = sts.struct(() => { + return { + offender: sts.bytes(), + slot: Slot, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Slot = sts.bigint() + +export interface EquivocationProof { + offender: Bytes + slot: Slot + firstHeader: Header + secondHeader: Header +} + +export type Slot = bigint + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V1: sts.enumStruct({ + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + }), + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type NextConfigDescriptor = NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Plan an epoch config change. The epoch config change is recorded and will be enacted on + * the next call to `enact_epoch_change`. The config will be activated one epoch after. + * Multiple calls to this method will replace any existing planned config change that had + * not been enacted yet. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Cancel an in-progress auction. + * + * Can only be called by Root origin. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +export type Call = Call_Auctions | Call_Authorship | Call_Babe | Call_Balances | Call_Bounties | Call_ChildBounties | Call_Claims | Call_Configuration | Call_ConvictionVoting | Call_Council | Call_Crowdloan | Call_Democracy | Call_Dmp | Call_ElectionProviderMultiPhase | Call_FastUnstake | Call_FellowshipCollective | Call_FellowshipReferenda | Call_Gilt | Call_Grandpa | Call_Hrmp | Call_Identity | Call_ImOnline | Call_Indices | Call_Initializer | Call_Multisig | Call_NominationPools | Call_ParaInclusion | Call_ParaInherent | Call_Paras | Call_ParasDisputes | Call_ParasShared | Call_PhragmenElection | Call_Preimage | Call_Proxy | Call_Recovery | Call_Referenda | Call_Registrar | Call_Scheduler | Call_Session | Call_Slots | Call_Society | Call_Staking | Call_System | Call_TechnicalCommittee | Call_TechnicalMembership | Call_Timestamp | Call_Tips | Call_Treasury | Call_Ump | Call_Utility | Call_Vesting | Call_VoterList | Call_Whitelist | Call_XcmPallet + +export interface Call_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Call_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Call_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Call_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Call_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Call_ChildBounties { + __kind: 'ChildBounties' + value: ChildBountiesCall +} + +export interface Call_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Call_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Call_ConvictionVoting { + __kind: 'ConvictionVoting' + value: ConvictionVotingCall +} + +export interface Call_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Call_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Call_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Call_Dmp { + __kind: 'Dmp' + value: DmpCall +} + +export interface Call_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Call_FastUnstake { + __kind: 'FastUnstake' + value: FastUnstakeCall +} + +export interface Call_FellowshipCollective { + __kind: 'FellowshipCollective' + value: FellowshipCollectiveCall +} + +export interface Call_FellowshipReferenda { + __kind: 'FellowshipReferenda' + value: FellowshipReferendaCall +} + +export interface Call_Gilt { + __kind: 'Gilt' + value: GiltCall +} + +export interface Call_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Call_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Call_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Call_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Call_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Call_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Call_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Call_NominationPools { + __kind: 'NominationPools' + value: NominationPoolsCall +} + +export interface Call_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Call_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Call_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Call_ParasDisputes { + __kind: 'ParasDisputes' + value: ParasDisputesCall +} + +export interface Call_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Call_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Call_Preimage { + __kind: 'Preimage' + value: PreimageCall +} + +export interface Call_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Call_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Call_Referenda { + __kind: 'Referenda' + value: ReferendaCall +} + +export interface Call_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Call_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Call_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Call_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Call_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Call_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Call_System { + __kind: 'System' + value: SystemCall +} + +export interface Call_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Call_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Call_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Call_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Call_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Call_Ump { + __kind: 'Ump' + value: UmpCall +} + +export interface Call_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Call_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Call_VoterList { + __kind: 'VoterList' + value: VoterListCall +} + +export interface Call_Whitelist { + __kind: 'Whitelist' + value: WhitelistCall +} + +export interface Call_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Society: sts.unit(), + Staking: sts.unit(), + } +}) + +export const MultiAddress: sts.Type = sts.closedEnum(() => { + return { + Address20: sts.bytes(), + Address32: sts.bytes(), + Id: AccountId32, + Index: sts.unit(), + Raw: sts.bytes(), + } +}) diff --git a/squid/src/types/v9340.ts b/squid/src/types/v9340.ts new file mode 100644 index 00000000..52c8babc --- /dev/null +++ b/squid/src/types/v9340.ts @@ -0,0 +1,13333 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Weight: sts.Type = sts.struct(() => { + return { + refTime: sts.bigint(), + proofSize: sts.bigint(), + } +}) + +export interface Weight { + refTime: bigint + proofSize: bigint +} + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: sts.number(), + index: sts.number(), + } +}) + +export interface Timepoint { + height: number + index: number +} + +export const AccountId32 = sts.bytes() + +export const Call: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + ChildBounties: ChildBountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + ConvictionVoting: ConvictionVotingCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + Dmp: DmpCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + FastUnstake: FastUnstakeCall, + FellowshipCollective: FellowshipCollectiveCall, + FellowshipReferenda: FellowshipReferendaCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Initializer: InitializerCall, + Multisig: MultisigCall, + Nis: NisCall, + NisCounterpartBalances: NisCounterpartBalancesCall, + NominationPools: NominationPoolsCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Paras: ParasCall, + ParasDisputes: ParasDisputesCall, + ParasShared: ParasSharedCall, + PhragmenElection: PhragmenElectionCall, + Preimage: PreimageCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Referenda: ReferendaCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Ump: UmpCall, + Utility: UtilityCall, + Vesting: VestingCall, + VoterList: VoterListCall, + Whitelist: WhitelistCall, + XcmPallet: XcmPalletCall, + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + execute: sts.enumStruct({ + message: Type_424, + maxWeight: sts.bigint(), + }), + force_default_xcm_version: sts.enumStruct({ + maybeXcmVersion: sts.option(() => sts.number()), + }), + force_subscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_unsubscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_xcm_version: sts.enumStruct({ + location: V1MultiLocation, + xcmVersion: sts.number(), + }), + limited_reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + limited_teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + send: sts.enumStruct({ + dest: VersionedMultiLocation, + message: VersionedXcm, + }), + teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + } +}) + +export const VersionedXcm: sts.Type = sts.closedEnum(() => { + return { + V0: V0Xcm, + V1: V1Xcm, + V2: sts.array(() => V2Instruction), + } +}) + +export const V2Instruction: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => V2Instruction), + SetErrorHandler: sts.array(() => V2Instruction), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const DoubleEncoded: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncoded { + encoded: Bytes +} + +export const V0OriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type V0OriginKind = V0OriginKind_Native | V0OriginKind_SovereignAccount | V0OriginKind_Superuser | V0OriginKind_Xcm + +export interface V0OriginKind_Native { + __kind: 'Native' +} + +export interface V0OriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface V0OriginKind_Superuser { + __kind: 'Superuser' +} + +export interface V0OriginKind_Xcm { + __kind: 'Xcm' +} + +export const V2Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V2Error])), + Null: sts.unit(), + Version: sts.number(), + } +}) + +export const V2Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + MaxWeightInvalid: sts.unit(), + MultiLocationFull: sts.unit(), + MultiLocationNotInvertible: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + WeightLimitReached: sts.bigint(), + WeightNotComputable: sts.unit(), + } +}) + +export type V2Error = V2Error_AssetNotFound | V2Error_BadOrigin | V2Error_Barrier | V2Error_DestinationUnsupported | V2Error_ExceedsMaxMessageSize | V2Error_FailedToDecode | V2Error_FailedToTransactAsset | V2Error_InvalidLocation | V2Error_LocationCannotHold | V2Error_MaxWeightInvalid | V2Error_MultiLocationFull | V2Error_MultiLocationNotInvertible | V2Error_NotHoldingFees | V2Error_NotWithdrawable | V2Error_Overflow | V2Error_TooExpensive | V2Error_Transport | V2Error_Trap | V2Error_UnhandledXcmVersion | V2Error_Unimplemented | V2Error_UnknownClaim | V2Error_Unroutable | V2Error_UntrustedReserveLocation | V2Error_UntrustedTeleportLocation | V2Error_WeightLimitReached | V2Error_WeightNotComputable + +export interface V2Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V2Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V2Error_Barrier { + __kind: 'Barrier' +} + +export interface V2Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V2Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V2Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V2Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V2Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V2Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V2Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V2Error_MultiLocationFull { + __kind: 'MultiLocationFull' +} + +export interface V2Error_MultiLocationNotInvertible { + __kind: 'MultiLocationNotInvertible' +} + +export interface V2Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V2Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V2Error_Overflow { + __kind: 'Overflow' +} + +export interface V2Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V2Error_Transport { + __kind: 'Transport' +} + +export interface V2Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V2Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V2Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V2Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V2Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V2Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V2Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: bigint +} + +export interface V2Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V2Response = V2Response_Assets | V2Response_ExecutionResult | V2Response_Null | V2Response_Version + +export interface V2Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V2Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V2Error] | undefined) +} + +export interface V2Response_Null { + __kind: 'Null' +} + +export interface V2Response_Version { + __kind: 'Version' + value: number +} + +export interface V1MultiAsset { + id: V1AssetId + fun: V1Fungibility +} + +export type V1Fungibility = V1Fungibility_Fungible | V1Fungibility_NonFungible + +export interface V1Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V1Fungibility_NonFungible { + __kind: 'NonFungible' + value: V1AssetInstance +} + +export type V1AssetInstance = V1AssetInstance_Array16 | V1AssetInstance_Array32 | V1AssetInstance_Array4 | V1AssetInstance_Array8 | V1AssetInstance_Blob | V1AssetInstance_Index | V1AssetInstance_Undefined + +export interface V1AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V1AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V1AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V1AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V1AssetInstance_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface V1AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V1AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V1AssetId = V1AssetId_Abstract | V1AssetId_Concrete + +export interface V1AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V1AssetId_Concrete { + __kind: 'Concrete' + value: V1MultiLocation +} + +export interface V1MultiLocation { + parents: number + interior: V1Junctions +} + +export type V1Junctions = V1Junctions_Here | V1Junctions_X1 | V1Junctions_X2 | V1Junctions_X3 | V1Junctions_X4 | V1Junctions_X5 | V1Junctions_X6 | V1Junctions_X7 | V1Junctions_X8 + +export interface V1Junctions_Here { + __kind: 'Here' +} + +export interface V1Junctions_X1 { + __kind: 'X1' + value: V1Junction +} + +export interface V1Junctions_X2 { + __kind: 'X2' + value: [V1Junction, V1Junction] +} + +export interface V1Junctions_X3 { + __kind: 'X3' + value: [V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X4 { + __kind: 'X4' + value: [V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X5 { + __kind: 'X5' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X6 { + __kind: 'X6' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X7 { + __kind: 'X7' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X8 { + __kind: 'X8' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export type V1Junction = V1Junction_AccountId32 | V1Junction_AccountIndex64 | V1Junction_AccountKey20 | V1Junction_GeneralIndex | V1Junction_GeneralKey | V1Junction_OnlyChild | V1Junction_PalletInstance | V1Junction_Parachain | V1Junction_Plurality + +export interface V1Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V1Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V1Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V1Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V1Junction_GeneralKey { + __kind: 'GeneralKey' + value: WeakBoundedVec +} + +export interface V1Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V1Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V1Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V1Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0BodyPart = V0BodyPart_AtLeastProportion | V0BodyPart_Fraction | V0BodyPart_Members | V0BodyPart_MoreThanProportion | V0BodyPart_Voice + +export interface V0BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V0BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V0BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Voice { + __kind: 'Voice' +} + +export type V0BodyId = V0BodyId_Executive | V0BodyId_Index | V0BodyId_Judicial | V0BodyId_Legislative | V0BodyId_Named | V0BodyId_Technical | V0BodyId_Unit + +export interface V0BodyId_Executive { + __kind: 'Executive' +} + +export interface V0BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V0BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V0BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V0BodyId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V0BodyId_Technical { + __kind: 'Technical' +} + +export interface V0BodyId_Unit { + __kind: 'Unit' +} + +export type WeakBoundedVec = Bytes + +export type V0NetworkId = V0NetworkId_Any | V0NetworkId_Kusama | V0NetworkId_Named | V0NetworkId_Polkadot + +export interface V0NetworkId_Any { + __kind: 'Any' +} + +export interface V0NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V0NetworkId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V0NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export const V1Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V1Junction, + X2: sts.tuple(() => [V1Junction, V1Junction]), + X3: sts.tuple(() => [V1Junction, V1Junction, V1Junction]), + X4: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction]), + X5: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X6: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X7: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X8: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + } +}) + +export const V1Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: WeakBoundedVec, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export const V0BodyId: sts.Type = sts.closedEnum(() => { + return { + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: WeakBoundedVec, + Technical: sts.unit(), + Unit: sts.unit(), + } +}) + +export const WeakBoundedVec = sts.bytes() + +export const V0NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: WeakBoundedVec, + Polkadot: sts.unit(), + } +}) + +export const V1MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V1MultiAsset), + Wild: V1WildMultiAsset, + } +}) + +export const V1WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllOf: sts.enumStruct({ + id: V1AssetId, + fun: V1WildFungibility, + }), + } +}) + +export const V1WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V1WildFungibility = V1WildFungibility_Fungible | V1WildFungibility_NonFungible + +export interface V1WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V1WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V1AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V1MultiLocation, + } +}) + +export type V1WildMultiAsset = V1WildMultiAsset_All | V1WildMultiAsset_AllOf + +export interface V1WildMultiAsset_All { + __kind: 'All' +} + +export interface V1WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V1AssetId + fun: V1WildFungibility +} + +export type V1MultiAssetFilter = V1MultiAssetFilter_Definite | V1MultiAssetFilter_Wild + +export interface V1MultiAssetFilter_Definite { + __kind: 'Definite' + value: V1MultiAsset[] +} + +export interface V1MultiAssetFilter_Wild { + __kind: 'Wild' + value: V1WildMultiAsset +} + +export const V1MultiAsset: sts.Type = sts.struct(() => { + return { + id: V1AssetId, + fun: V1Fungibility, + } +}) + +export const V1Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V1AssetInstance, + } +}) + +export const V1AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V2Instruction = V2Instruction_BuyExecution | V2Instruction_ClaimAsset | V2Instruction_ClearError | V2Instruction_ClearOrigin | V2Instruction_DepositAsset | V2Instruction_DepositReserveAsset | V2Instruction_DescendOrigin | V2Instruction_ExchangeAsset | V2Instruction_HrmpChannelAccepted | V2Instruction_HrmpChannelClosing | V2Instruction_HrmpNewChannelOpenRequest | V2Instruction_InitiateReserveWithdraw | V2Instruction_InitiateTeleport | V2Instruction_QueryHolding | V2Instruction_QueryResponse | V2Instruction_ReceiveTeleportedAsset | V2Instruction_RefundSurplus | V2Instruction_ReportError | V2Instruction_ReserveAssetDeposited | V2Instruction_SetAppendix | V2Instruction_SetErrorHandler | V2Instruction_SubscribeVersion | V2Instruction_Transact | V2Instruction_TransferAsset | V2Instruction_TransferReserveAsset | V2Instruction_Trap | V2Instruction_UnsubscribeVersion | V2Instruction_WithdrawAsset + +export interface V2Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface V2Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface V2Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V2Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V2Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V2Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface V2Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V2Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V2Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V2Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V2Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface V2Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface V2Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface V2Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V2Instruction_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface V2Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface V2Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V2Instruction[] +} + +export interface V2Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V2Instruction[] +} + +export interface V2Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V2Instruction_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V2Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V2Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V2Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export type V2WeightLimit = V2WeightLimit_Limited | V2WeightLimit_Unlimited + +export interface V2WeightLimit_Limited { + __kind: 'Limited' + value: bigint +} + +export interface V2WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V1Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: V1Xcm, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + } +}) + +export const V1Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => V1Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type V1Order = V1Order_BuyExecution | V1Order_DepositAsset | V1Order_DepositReserveAsset | V1Order_ExchangeAsset | V1Order_InitiateReserveWithdraw | V1Order_InitiateTeleport | V1Order_Noop | V1Order_QueryHolding + +export interface V1Order_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: V1Xcm[] +} + +export interface V1Order_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V1Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V1Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_Noop { + __kind: 'Noop' +} + +export interface V1Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export const V1Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + Version: sts.number(), + } +}) + +export type V1Response = V1Response_Assets | V1Response_Version + +export interface V1Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V1Response_Version { + __kind: 'Version' + value: number +} + +export type V1Xcm = V1Xcm_HrmpChannelAccepted | V1Xcm_HrmpChannelClosing | V1Xcm_HrmpNewChannelOpenRequest | V1Xcm_QueryResponse | V1Xcm_ReceiveTeleportedAsset | V1Xcm_RelayedFrom | V1Xcm_ReserveAssetDeposited | V1Xcm_SubscribeVersion | V1Xcm_Transact | V1Xcm_TransferAsset | V1Xcm_TransferReserveAsset | V1Xcm_UnsubscribeVersion | V1Xcm_WithdrawAsset + +export interface V1Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V1Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V1Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V1Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface V1Xcm_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: V1Xcm +} + +export interface V1Xcm_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V1Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V1Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V1Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Xcm_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V1Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export const V0Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: V0Xcm, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + } +}) + +export const V0Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => V0Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type V0Order = V0Order_BuyExecution | V0Order_DepositAsset | V0Order_DepositReserveAsset | V0Order_ExchangeAsset | V0Order_InitiateReserveWithdraw | V0Order_InitiateTeleport | V0Order_Null | V0Order_QueryHolding + +export interface V0Order_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: V0Xcm[] +} + +export interface V0Order_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface V0Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_Null { + __kind: 'Null' +} + +export interface V0Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type V0MultiLocation = V0MultiLocation_Null | V0MultiLocation_X1 | V0MultiLocation_X2 | V0MultiLocation_X3 | V0MultiLocation_X4 | V0MultiLocation_X5 | V0MultiLocation_X6 | V0MultiLocation_X7 | V0MultiLocation_X8 + +export interface V0MultiLocation_Null { + __kind: 'Null' +} + +export interface V0MultiLocation_X1 { + __kind: 'X1' + value: V0Junction +} + +export interface V0MultiLocation_X2 { + __kind: 'X2' + value: [V0Junction, V0Junction] +} + +export interface V0MultiLocation_X3 { + __kind: 'X3' + value: [V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X4 { + __kind: 'X4' + value: [V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X5 { + __kind: 'X5' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X6 { + __kind: 'X6' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X7 { + __kind: 'X7' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X8 { + __kind: 'X8' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export type V0Junction = V0Junction_AccountId32 | V0Junction_AccountIndex64 | V0Junction_AccountKey20 | V0Junction_GeneralIndex | V0Junction_GeneralKey | V0Junction_OnlyChild | V0Junction_PalletInstance | V0Junction_Parachain | V0Junction_Parent | V0Junction_Plurality + +export interface V0Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V0Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V0Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V0Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V0Junction_GeneralKey { + __kind: 'GeneralKey' + value: WeakBoundedVec +} + +export interface V0Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V0Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V0Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V0Junction_Parent { + __kind: 'Parent' +} + +export interface V0Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0MultiAsset = V0MultiAsset_AbstractFungible | V0MultiAsset_AbstractNonFungible | V0MultiAsset_All | V0MultiAsset_AllAbstractFungible | V0MultiAsset_AllAbstractNonFungible | V0MultiAsset_AllConcreteFungible | V0MultiAsset_AllConcreteNonFungible | V0MultiAsset_AllFungible | V0MultiAsset_AllNonFungible | V0MultiAsset_ConcreteFungible | V0MultiAsset_ConcreteNonFungible | V0MultiAsset_None + +export interface V0MultiAsset_AbstractFungible { + __kind: 'AbstractFungible' + id: Bytes + amount: bigint +} + +export interface V0MultiAsset_AbstractNonFungible { + __kind: 'AbstractNonFungible' + class: Bytes + instance: V1AssetInstance +} + +export interface V0MultiAsset_All { + __kind: 'All' +} + +export interface V0MultiAsset_AllAbstractFungible { + __kind: 'AllAbstractFungible' + id: Bytes +} + +export interface V0MultiAsset_AllAbstractNonFungible { + __kind: 'AllAbstractNonFungible' + class: Bytes +} + +export interface V0MultiAsset_AllConcreteFungible { + __kind: 'AllConcreteFungible' + id: V0MultiLocation +} + +export interface V0MultiAsset_AllConcreteNonFungible { + __kind: 'AllConcreteNonFungible' + class: V0MultiLocation +} + +export interface V0MultiAsset_AllFungible { + __kind: 'AllFungible' +} + +export interface V0MultiAsset_AllNonFungible { + __kind: 'AllNonFungible' +} + +export interface V0MultiAsset_ConcreteFungible { + __kind: 'ConcreteFungible' + id: V0MultiLocation + amount: bigint +} + +export interface V0MultiAsset_ConcreteNonFungible { + __kind: 'ConcreteNonFungible' + class: V0MultiLocation + instance: V1AssetInstance +} + +export interface V0MultiAsset_None { + __kind: 'None' +} + +export const V0MultiAsset: sts.Type = sts.closedEnum(() => { + return { + AbstractFungible: sts.enumStruct({ + id: sts.bytes(), + amount: sts.bigint(), + }), + AbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + instance: V1AssetInstance, + }), + All: sts.unit(), + AllAbstractFungible: sts.enumStruct({ + id: sts.bytes(), + }), + AllAbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + }), + AllConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + }), + AllConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + }), + AllFungible: sts.unit(), + AllNonFungible: sts.unit(), + ConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + amount: sts.bigint(), + }), + ConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + instance: V1AssetInstance, + }), + None: sts.unit(), + } +}) + +export const V0MultiLocation: sts.Type = sts.closedEnum(() => { + return { + Null: sts.unit(), + X1: V0Junction, + X2: sts.tuple(() => [V0Junction, V0Junction]), + X3: sts.tuple(() => [V0Junction, V0Junction, V0Junction]), + X4: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction]), + X5: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X6: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X7: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X8: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + } +}) + +export const V0Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: WeakBoundedVec, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Parent: sts.unit(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V0MultiAsset), + } +}) + +export type V0Response = V0Response_Assets + +export interface V0Response_Assets { + __kind: 'Assets' + value: V0MultiAsset[] +} + +export type V0Xcm = V0Xcm_HrmpChannelAccepted | V0Xcm_HrmpChannelClosing | V0Xcm_HrmpNewChannelOpenRequest | V0Xcm_QueryResponse | V0Xcm_RelayedFrom | V0Xcm_ReserveAssetDeposit | V0Xcm_TeleportAsset | V0Xcm_Transact | V0Xcm_TransferAsset | V0Xcm_TransferReserveAsset | V0Xcm_WithdrawAsset + +export interface V0Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V0Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V0Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V0Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface V0Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: V0Xcm +} + +export interface V0Xcm_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V0Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export type VersionedXcm = VersionedXcm_V0 | VersionedXcm_V1 | VersionedXcm_V2 + +export interface VersionedXcm_V0 { + __kind: 'V0' + value: V0Xcm +} + +export interface VersionedXcm_V1 { + __kind: 'V1' + value: V1Xcm +} + +export interface VersionedXcm_V2 { + __kind: 'V2' + value: V2Instruction[] +} + +export const V2WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: sts.bigint(), + Unlimited: sts.unit(), + } +}) + +export const VersionedMultiAssets: sts.Type = sts.closedEnum(() => { + return { + V0: sts.array(() => V0MultiAsset), + V1: sts.array(() => V1MultiAsset), + } +}) + +export type VersionedMultiAssets = VersionedMultiAssets_V0 | VersionedMultiAssets_V1 + +export interface VersionedMultiAssets_V0 { + __kind: 'V0' + value: V0MultiAsset[] +} + +export interface VersionedMultiAssets_V1 { + __kind: 'V1' + value: V1MultiAsset[] +} + +export const V1MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V1Junctions, + } +}) + +export const VersionedMultiLocation: sts.Type = sts.closedEnum(() => { + return { + V0: V0MultiLocation, + V1: V1MultiLocation, + } +}) + +export type VersionedMultiLocation = VersionedMultiLocation_V0 | VersionedMultiLocation_V1 + +export interface VersionedMultiLocation_V0 { + __kind: 'V0' + value: V0MultiLocation +} + +export interface VersionedMultiLocation_V1 { + __kind: 'V1' + value: V1MultiLocation +} + +export const Type_424: sts.Type = sts.closedEnum(() => { + return { + V0: Type_425, + V1: Type_430, + V2: sts.array(() => Type_436), + } +}) + +export const Type_436: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => Type_436), + SetErrorHandler: sts.array(() => Type_436), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_429, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const Type_429: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface Type_429 { + encoded: Bytes +} + +export type Type_436 = Type_436_BuyExecution | Type_436_ClaimAsset | Type_436_ClearError | Type_436_ClearOrigin | Type_436_DepositAsset | Type_436_DepositReserveAsset | Type_436_DescendOrigin | Type_436_ExchangeAsset | Type_436_HrmpChannelAccepted | Type_436_HrmpChannelClosing | Type_436_HrmpNewChannelOpenRequest | Type_436_InitiateReserveWithdraw | Type_436_InitiateTeleport | Type_436_QueryHolding | Type_436_QueryResponse | Type_436_ReceiveTeleportedAsset | Type_436_RefundSurplus | Type_436_ReportError | Type_436_ReserveAssetDeposited | Type_436_SetAppendix | Type_436_SetErrorHandler | Type_436_SubscribeVersion | Type_436_Transact | Type_436_TransferAsset | Type_436_TransferReserveAsset | Type_436_Trap | Type_436_UnsubscribeVersion | Type_436_WithdrawAsset + +export interface Type_436_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface Type_436_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface Type_436_ClearError { + __kind: 'ClearError' +} + +export interface Type_436_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_436_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_436_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_436_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface Type_436_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_436_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_436_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_436_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_436_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_436_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_436_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface Type_436_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface Type_436_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface Type_436_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_436_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface Type_436_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface Type_436_SetAppendix { + __kind: 'SetAppendix' + value: Type_436[] +} + +export interface Type_436_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_436[] +} + +export interface Type_436_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_436_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_429 +} + +export interface Type_436_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_436_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_436_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_436_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_436_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export const Type_430: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_432), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: Type_430, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_432), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_429, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_432), + }), + } +}) + +export const Type_432: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => Type_430), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type Type_432 = Type_432_BuyExecution | Type_432_DepositAsset | Type_432_DepositReserveAsset | Type_432_ExchangeAsset | Type_432_InitiateReserveWithdraw | Type_432_InitiateTeleport | Type_432_Noop | Type_432_QueryHolding + +export interface Type_432_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: Type_430[] +} + +export interface Type_432_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_432_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_432_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_432_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface Type_432_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_432_Noop { + __kind: 'Noop' +} + +export interface Type_432_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export type Type_430 = Type_430_HrmpChannelAccepted | Type_430_HrmpChannelClosing | Type_430_HrmpNewChannelOpenRequest | Type_430_QueryResponse | Type_430_ReceiveTeleportedAsset | Type_430_RelayedFrom | Type_430_ReserveAssetDeposited | Type_430_SubscribeVersion | Type_430_Transact | Type_430_TransferAsset | Type_430_TransferReserveAsset | Type_430_UnsubscribeVersion | Type_430_WithdrawAsset + +export interface Type_430_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_430_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_430_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_430_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface Type_430_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: Type_432[] +} + +export interface Type_430_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: Type_430 +} + +export interface Type_430_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: Type_432[] +} + +export interface Type_430_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_430_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_429 +} + +export interface Type_430_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_430_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_430_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_430_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: Type_432[] +} + +export const Type_425: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: Type_425, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_427), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_427), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_429, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_427), + }), + } +}) + +export const Type_427: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => Type_425), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type Type_427 = Type_427_BuyExecution | Type_427_DepositAsset | Type_427_DepositReserveAsset | Type_427_ExchangeAsset | Type_427_InitiateReserveWithdraw | Type_427_InitiateTeleport | Type_427_Null | Type_427_QueryHolding + +export interface Type_427_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: Type_425[] +} + +export interface Type_427_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_427_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_427_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface Type_427_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface Type_427_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_427_Null { + __kind: 'Null' +} + +export interface Type_427_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type Type_425 = Type_425_HrmpChannelAccepted | Type_425_HrmpChannelClosing | Type_425_HrmpNewChannelOpenRequest | Type_425_QueryResponse | Type_425_RelayedFrom | Type_425_ReserveAssetDeposit | Type_425_TeleportAsset | Type_425_Transact | Type_425_TransferAsset | Type_425_TransferReserveAsset | Type_425_WithdrawAsset + +export interface Type_425_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_425_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_425_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_425_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface Type_425_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: Type_425 +} + +export interface Type_425_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: Type_427[] +} + +export interface Type_425_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: Type_427[] +} + +export interface Type_425_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_429 +} + +export interface Type_425_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_425_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_425_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: Type_427[] +} + +export type Type_424 = Type_424_V0 | Type_424_V1 | Type_424_V2 + +export interface Type_424_V0 { + __kind: 'V0' + value: Type_425 +} + +export interface Type_424_V1 { + __kind: 'V1' + value: Type_430 +} + +export interface Type_424_V2 { + __kind: 'V2' + value: Type_436[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type XcmPalletCall = XcmPalletCall_execute | XcmPalletCall_force_default_xcm_version | XcmPalletCall_force_subscribe_version_notify | XcmPalletCall_force_unsubscribe_version_notify | XcmPalletCall_force_xcm_version | XcmPalletCall_limited_reserve_transfer_assets | XcmPalletCall_limited_teleport_assets | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets + +/** + * Execute an XCM message from a local, signed, origin. + * + * An event is deposited indicating whether `msg` could be executed completely or only + * partially. + * + * No more than `max_weight` will be used in its attempted execution. If this is less than the + * maximum amount of weight that the message could take to be executed, then no execution + * attempt will be made. + * + * NOTE: A successful return to this does *not* imply that the `msg` was executed successfully + * to completion; only that *some* of it was executed. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Type_424 + maxWeight: bigint +} + +/** + * Set a safe XCM version (the version that XCM should be encoded with if the most recent + * version a destination can accept is unknown). + * + * - `origin`: Must be Root. + * - `maybe_xcm_version`: The default XCM encoding version, or `None` to disable. + */ +export interface XcmPalletCall_force_default_xcm_version { + __kind: 'force_default_xcm_version' + maybeXcmVersion?: (number | undefined) +} + +/** + * Ask a location to notify us regarding their XCM version and any changes to it. + * + * - `origin`: Must be Root. + * - `location`: The location to which we should subscribe for XCM version notifications. + */ +export interface XcmPalletCall_force_subscribe_version_notify { + __kind: 'force_subscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Require that a particular destination should no longer notify us regarding any XCM + * version changes. + * + * - `origin`: Must be Root. + * - `location`: The location to which we are currently subscribed for XCM version + * notifications which we no longer desire. + */ +export interface XcmPalletCall_force_unsubscribe_version_notify { + __kind: 'force_unsubscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Extoll that a particular destination can be communicated with through a particular + * version of XCM. + * + * - `origin`: Must be Root. + * - `location`: The destination that is being described. + * - `xcm_version`: The latest version of XCM that `location` supports. + */ +export interface XcmPalletCall_force_xcm_version { + __kind: 'force_xcm_version' + location: V1MultiLocation + xcmVersion: number +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination + * chain and forward a notification XCM. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight + * is needed than `weight_limit`, then the operation will fail and the assets send may be + * at risk. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_reserve_transfer_assets { + __kind: 'limited_reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight + * is needed than `weight_limit`, then the operation will fail and the assets send may be + * at risk. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_teleport_assets { + __kind: 'limited_teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination + * chain and forward a notification XCM. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, + * with all fees taken as needed from the asset. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +export interface XcmPalletCall_send { + __kind: 'send' + dest: VersionedMultiLocation + message: VersionedXcm +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, + * with all fees taken as needed from the asset. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const WhitelistCall: sts.Type = sts.closedEnum(() => { + return { + dispatch_whitelisted_call: sts.enumStruct({ + callHash: H256, + callWeightWitness: Weight, + }), + dispatch_whitelisted_call_with_preimage: sts.enumStruct({ + call: Call, + }), + remove_whitelisted_call: sts.enumStruct({ + callHash: H256, + }), + whitelist_call: sts.enumStruct({ + callHash: H256, + }), + } +}) + +export const H256 = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type WhitelistCall = WhitelistCall_dispatch_whitelisted_call | WhitelistCall_dispatch_whitelisted_call_with_preimage | WhitelistCall_remove_whitelisted_call | WhitelistCall_whitelist_call + +export interface WhitelistCall_dispatch_whitelisted_call { + __kind: 'dispatch_whitelisted_call' + callHash: H256 + callWeightWitness: Weight +} + +export interface WhitelistCall_dispatch_whitelisted_call_with_preimage { + __kind: 'dispatch_whitelisted_call_with_preimage' + call: Call +} + +export interface WhitelistCall_remove_whitelisted_call { + __kind: 'remove_whitelisted_call' + callHash: H256 +} + +export interface WhitelistCall_whitelist_call { + __kind: 'whitelist_call' + callHash: H256 +} + +export type H256 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VoterListCall: sts.Type = sts.closedEnum(() => { + return { + put_in_front_of: sts.enumStruct({ + lighter: MultiAddress, + }), + rebag: sts.enumStruct({ + dislocated: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VoterListCall = VoterListCall_put_in_front_of | VoterListCall_rebag + +/** + * Move the caller's Id directly in front of `lighter`. + * + * The dispatch origin for this call must be _Signed_ and can only be called by the Id of + * the account going in front of `lighter`. + * + * Only works if + * - both nodes are within the same bag, + * - and `origin` has a greater `Score` than `lighter`. + */ +export interface VoterListCall_put_in_front_of { + __kind: 'put_in_front_of' + lighter: MultiAddress +} + +/** + * Declare that some `dislocated` account has, through rewards or penalties, sufficiently + * changed its score that it should properly fall into a different bag than its current + * one. + * + * Anyone can call this function about any potentially dislocated account. + * + * Will always update the stored score of `dislocated` to the correct score, based on + * `ScoreProvider`. + * + * If `dislocated` does not exists, it returns an error. + */ +export interface VoterListCall_rebag { + __kind: 'rebag' + dislocated: MultiAddress +} + +export type MultiAddress = MultiAddress_Address20 | MultiAddress_Address32 | MultiAddress_Id | MultiAddress_Index | MultiAddress_Raw + +export interface MultiAddress_Address20 { + __kind: 'Address20' + value: Bytes +} + +export interface MultiAddress_Address32 { + __kind: 'Address32' + value: Bytes +} + +export interface MultiAddress_Id { + __kind: 'Id' + value: AccountId32 +} + +export interface MultiAddress_Index { + __kind: 'Index' +} + +export interface MultiAddress_Raw { + __kind: 'Raw' + value: Bytes +} + +export type AccountId32 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: MultiAddress, + target: MultiAddress, + schedule: VestingInfo, + }), + merge_schedules: sts.enumStruct({ + schedule1Index: sts.number(), + schedule2Index: sts.number(), + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: MultiAddress, + }), + vested_transfer: sts.enumStruct({ + target: MultiAddress, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: sts.bigint(), + perBlock: sts.bigint(), + startingBlock: sts.number(), + } +}) + +export interface VestingInfo { + locked: bigint + perBlock: bigint + startingBlock: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_merge_schedules | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: MultiAddress + target: MultiAddress + schedule: VestingInfo +} + +/** + * Merge two vesting schedules together, creating a new vesting schedule that unlocks over + * the highest possible start and end blocks. If both schedules have already started the + * current block will be used as the schedule start; with the caveat that if one schedule + * is finished by the current block, the other will be treated as the new merged schedule, + * unmodified. + * + * NOTE: If `schedule1_index == schedule2_index` this is a no-op. + * NOTE: This will unlock all schedules through the current block prior to merging. + * NOTE: If both schedules have ended by the current block, no new schedule will be created + * and both will be removed. + * + * Merged schedule attributes: + * - `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block, + * current_block)`. + * - `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`. + * - `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`. + * + * The dispatch origin for this call must be _Signed_. + * + * - `schedule1_index`: index of the first schedule to merge. + * - `schedule2_index`: index of the second schedule to merge. + */ +export interface VestingCall_merge_schedules { + __kind: 'merge_schedules' + schedule1Index: number + schedule2Index: number +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: MultiAddress +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account receiving the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: MultiAddress + schedule: VestingInfo +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Call, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Call), + }), + dispatch_as: sts.enumStruct({ + asOrigin: OriginCaller, + call: Call, + }), + force_batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + with_weight: sts.enumStruct({ + call: Call, + weight: Weight, + }), + } +}) + +export const OriginCaller: sts.Type = sts.closedEnum(() => { + return { + Council: Type_151, + Origins: Origin, + ParachainsOrigin: Type_154, + TechnicalCommittee: Type_152, + Void: Void, + XcmPallet: Type_156, + system: RawOrigin, + } +}) + +export const RawOrigin: sts.Type = sts.closedEnum(() => { + return { + None: sts.unit(), + Root: sts.unit(), + Signed: AccountId32, + } +}) + +export type RawOrigin = RawOrigin_None | RawOrigin_Root | RawOrigin_Signed + +export interface RawOrigin_None { + __kind: 'None' +} + +export interface RawOrigin_Root { + __kind: 'Root' +} + +export interface RawOrigin_Signed { + __kind: 'Signed' + value: AccountId32 +} + +export const Type_156: sts.Type = sts.closedEnum(() => { + return { + Response: V1MultiLocation, + Xcm: V1MultiLocation, + } +}) + +export type Type_156 = Type_156_Response | Type_156_Xcm + +export interface Type_156_Response { + __kind: 'Response' + value: V1MultiLocation +} + +export interface Type_156_Xcm { + __kind: 'Xcm' + value: V1MultiLocation +} + +export const Void: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Void = never + +export const Type_152: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_152 = Type_152_Member | Type_152_Members | Type_152__Phantom + +export interface Type_152_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_152_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_152__Phantom { + __kind: '_Phantom' +} + +export const Type_154: sts.Type = sts.closedEnum(() => { + return { + Parachain: Id, + } +}) + +export const Id = sts.number() + +export type Type_154 = Type_154_Parachain + +export interface Type_154_Parachain { + __kind: 'Parachain' + value: Id +} + +export type Id = number + +export const Origin: sts.Type = sts.closedEnum(() => { + return { + AuctionAdmin: sts.unit(), + BigSpender: sts.unit(), + BigTipper: sts.unit(), + Fellows: sts.unit(), + Fellowship1Dan: sts.unit(), + Fellowship2Dan: sts.unit(), + Fellowship3Dan: sts.unit(), + Fellowship4Dan: sts.unit(), + Fellowship5Dan: sts.unit(), + Fellowship6Dan: sts.unit(), + Fellowship7Dan: sts.unit(), + Fellowship8Dan: sts.unit(), + Fellowship9Dan: sts.unit(), + FellowshipAdmin: sts.unit(), + FellowshipExperts: sts.unit(), + FellowshipInitiates: sts.unit(), + FellowshipMasters: sts.unit(), + GeneralAdmin: sts.unit(), + LeaseAdmin: sts.unit(), + MediumSpender: sts.unit(), + ReferendumCanceller: sts.unit(), + ReferendumKiller: sts.unit(), + SmallSpender: sts.unit(), + SmallTipper: sts.unit(), + StakingAdmin: sts.unit(), + Treasurer: sts.unit(), + WhitelistedCaller: sts.unit(), + } +}) + +export type Origin = Origin_AuctionAdmin | Origin_BigSpender | Origin_BigTipper | Origin_Fellows | Origin_Fellowship1Dan | Origin_Fellowship2Dan | Origin_Fellowship3Dan | Origin_Fellowship4Dan | Origin_Fellowship5Dan | Origin_Fellowship6Dan | Origin_Fellowship7Dan | Origin_Fellowship8Dan | Origin_Fellowship9Dan | Origin_FellowshipAdmin | Origin_FellowshipExperts | Origin_FellowshipInitiates | Origin_FellowshipMasters | Origin_GeneralAdmin | Origin_LeaseAdmin | Origin_MediumSpender | Origin_ReferendumCanceller | Origin_ReferendumKiller | Origin_SmallSpender | Origin_SmallTipper | Origin_StakingAdmin | Origin_Treasurer | Origin_WhitelistedCaller + +export interface Origin_AuctionAdmin { + __kind: 'AuctionAdmin' +} + +export interface Origin_BigSpender { + __kind: 'BigSpender' +} + +export interface Origin_BigTipper { + __kind: 'BigTipper' +} + +export interface Origin_Fellows { + __kind: 'Fellows' +} + +export interface Origin_Fellowship1Dan { + __kind: 'Fellowship1Dan' +} + +export interface Origin_Fellowship2Dan { + __kind: 'Fellowship2Dan' +} + +export interface Origin_Fellowship3Dan { + __kind: 'Fellowship3Dan' +} + +export interface Origin_Fellowship4Dan { + __kind: 'Fellowship4Dan' +} + +export interface Origin_Fellowship5Dan { + __kind: 'Fellowship5Dan' +} + +export interface Origin_Fellowship6Dan { + __kind: 'Fellowship6Dan' +} + +export interface Origin_Fellowship7Dan { + __kind: 'Fellowship7Dan' +} + +export interface Origin_Fellowship8Dan { + __kind: 'Fellowship8Dan' +} + +export interface Origin_Fellowship9Dan { + __kind: 'Fellowship9Dan' +} + +export interface Origin_FellowshipAdmin { + __kind: 'FellowshipAdmin' +} + +export interface Origin_FellowshipExperts { + __kind: 'FellowshipExperts' +} + +export interface Origin_FellowshipInitiates { + __kind: 'FellowshipInitiates' +} + +export interface Origin_FellowshipMasters { + __kind: 'FellowshipMasters' +} + +export interface Origin_GeneralAdmin { + __kind: 'GeneralAdmin' +} + +export interface Origin_LeaseAdmin { + __kind: 'LeaseAdmin' +} + +export interface Origin_MediumSpender { + __kind: 'MediumSpender' +} + +export interface Origin_ReferendumCanceller { + __kind: 'ReferendumCanceller' +} + +export interface Origin_ReferendumKiller { + __kind: 'ReferendumKiller' +} + +export interface Origin_SmallSpender { + __kind: 'SmallSpender' +} + +export interface Origin_SmallTipper { + __kind: 'SmallTipper' +} + +export interface Origin_StakingAdmin { + __kind: 'StakingAdmin' +} + +export interface Origin_Treasurer { + __kind: 'Treasurer' +} + +export interface Origin_WhitelistedCaller { + __kind: 'WhitelistedCaller' +} + +export const Type_151: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_151 = Type_151_Member | Type_151_Members | Type_151__Phantom + +export interface Type_151_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_151_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_151__Phantom { + __kind: '_Phantom' +} + +export type OriginCaller = OriginCaller_Council | OriginCaller_Origins | OriginCaller_ParachainsOrigin | OriginCaller_TechnicalCommittee | OriginCaller_Void | OriginCaller_XcmPallet | OriginCaller_system + +export interface OriginCaller_Council { + __kind: 'Council' + value: Type_151 +} + +export interface OriginCaller_Origins { + __kind: 'Origins' + value: Origin +} + +export interface OriginCaller_ParachainsOrigin { + __kind: 'ParachainsOrigin' + value: Type_154 +} + +export interface OriginCaller_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: Type_152 +} + +export interface OriginCaller_Void { + __kind: 'Void' + value: Void +} + +export interface OriginCaller_XcmPallet { + __kind: 'XcmPallet' + value: Type_156 +} + +export interface OriginCaller_system { + __kind: 'system' + value: RawOrigin +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all | UtilityCall_dispatch_as | UtilityCall_force_batch | UtilityCall_with_weight + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Call +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin except `None`. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then the calls are dispatched without checking origin filter. (This + * includes bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Call[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin except `None`. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then the calls are dispatched without checking origin filter. (This + * includes bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Call[] +} + +/** + * Dispatches a function call with a provided origin. + * + * The dispatch origin for this call must be _Root_. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB write (event). + * - Weight of derivative `call` execution + T::WeightInfo::dispatch_as(). + * # + */ +export interface UtilityCall_dispatch_as { + __kind: 'dispatch_as' + asOrigin: OriginCaller + call: Call +} + +/** + * Send a batch of dispatch calls. + * Unlike `batch`, it allows errors and won't interrupt. + * + * May be called from any origin except `None`. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then the calls are dispatch without checking origin filter. (This + * includes bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_force_batch { + __kind: 'force_batch' + calls: Call[] +} + +/** + * Dispatch a function call with a specified weight. + * + * This function does not check the weight of the call, and instead allows the + * Root origin to specify the weight of the call. + * + * The dispatch origin for this call must be _Root_. + */ +export interface UtilityCall_with_weight { + __kind: 'with_weight' + call: Call + weight: Weight +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UmpCall: sts.Type = sts.closedEnum(() => { + return { + service_overweight: sts.enumStruct({ + index: sts.bigint(), + weightLimit: Weight, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UmpCall = UmpCall_service_overweight + +/** + * Service a single overweight upward message. + * + * - `origin`: Must pass `ExecuteOverweightOrigin`. + * - `index`: The index of the overweight message to service. + * - `weight_limit`: The amount of weight that message execution may take. + * + * Errors: + * - `UnknownMessageIndex`: Message of `index` is unknown. + * - `WeightOverLimit`: Message execution may use greater than `weight_limit`. + * + * Events: + * - `OverweightServiced`: On success. + */ +export interface UmpCall_service_overweight { + __kind: 'service_overweight' + index: bigint + weightLimit: Weight +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: MultiAddress, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + remove_approval: sts.enumStruct({ + proposalId: sts.number(), + }), + spend: sts.enumStruct({ + amount: sts.bigint(), + beneficiary: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_remove_approval | TreasuryCall_spend + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: MultiAddress +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Force a previously approved proposal to be removed from the approval queue. + * The original deposit will no longer be returned. + * + * May only be called from `T::RejectOrigin`. + * - `proposal_id`: The index of a proposal + * + * # + * - Complexity: O(A) where `A` is the number of approvals + * - Db reads and writes: `Approvals` + * # + * + * Errors: + * - `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue, + * i.e., the proposal has not been approved. This could also mean the proposal does not + * exist altogether, thus there is no way it would have been approved in the first place. + */ +export interface TreasuryCall_remove_approval { + __kind: 'remove_approval' + proposalId: number +} + +/** + * Propose and approve a spend of treasury funds. + * + * - `origin`: Must be `SpendOrigin` with the `Success` value being at least `amount`. + * - `amount`: The amount to be transferred from the treasury to the `beneficiary`. + * - `beneficiary`: The destination account for the transfer. + * + * NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the + * beneficiary. + */ +export interface TreasuryCall_spend { + __kind: 'spend' + amount: bigint + beneficiary: MultiAddress +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TipsCall: sts.Type = sts.closedEnum(() => { + return { + close_tip: sts.enumStruct({ + hash: H256, + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: MultiAddress, + }), + retract_tip: sts.enumStruct({ + hash: H256, + }), + slash_tip: sts.enumStruct({ + hash: H256, + }), + tip: sts.enumStruct({ + hash: H256, + tipValue: sts.bigint(), + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: MultiAddress, + tipValue: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TipsCall = TipsCall_close_tip | TipsCall_report_awesome | TipsCall_retract_tip | TipsCall_slash_tip | TipsCall_tip | TipsCall_tip_new + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost + * depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TipsCall_close_tip { + __kind: 'close_tip' + hash: H256 +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: MultiAddress +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TipsCall_retract_tip { + __kind: 'retract_tip' + hash: H256 +} + +/** + * Remove and slash an already-open tip. + * + * May only be called from `T::RejectOrigin`. + * + * As a result, the finder is slashed and the deposits are lost. + * + * Emits `TipSlashed` if successful. + * + * # + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * # + */ +export interface TipsCall_slash_tip { + __kind: 'slash_tip' + hash: H256 +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`, insert tip and check closing, `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TipsCall_tip { + __kind: 'tip' + hash: H256 + tipValue: bigint +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of + * `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: MultiAddress + tipValue: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in + * `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: MultiAddress, + }), + change_key: sts.enumStruct({ + new: MultiAddress, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: MultiAddress, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId32), + }), + set_prime: sts.enumStruct({ + who: MultiAddress, + }), + swap_member: sts.enumStruct({ + remove: MultiAddress, + add: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: MultiAddress +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: MultiAddress +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: MultiAddress +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId32[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: MultiAddress +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: MultiAddress + add: MultiAddress +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: Weight, + lengthBound: sts.number(), + }), + close_old_weight: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_close_old_weight | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: Weight + lengthBound: number +} + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close_old_weight { + __kind: 'close_old_weight' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + kill_prefix: sts.enumStruct({ + prefix: sts.bytes(), + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => sts.bytes()), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SystemCall = SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Bytes + subkeys: number +} + +/** + * Kill some items from storage. + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Bytes[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Make some on-chain remark and emit event. + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is + * expensive). + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very + * expensive. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full + * block. # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: [Bytes, Bytes][] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: MultiAddress, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: sts.number(), + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + controller: AccountId32, + }), + force_apply_min_commission: sts.enumStruct({ + validatorStash: AccountId32, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => MultiAddress), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => MultiAddress), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + }), + reap_stash: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: MultiAddress, + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId32), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_staking_configs: sts.enumStruct({ + minNominatorBond: ConfigOp, + minValidatorBond: ConfigOp, + maxNominatorCount: Type_103, + maxValidatorCount: Type_103, + chillThreshold: Type_104, + minCommission: Type_105, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export const Type_105: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export const Perbill = sts.number() + +export type Type_105 = Type_105_Noop | Type_105_Remove | Type_105_Set + +export interface Type_105_Noop { + __kind: 'Noop' +} + +export interface Type_105_Remove { + __kind: 'Remove' +} + +export interface Type_105_Set { + __kind: 'Set' + value: Perbill +} + +export type Perbill = number + +export const Type_104: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Percent, + } +}) + +export type Type_104 = Type_104_Noop | Type_104_Remove | Type_104_Set + +export interface Type_104_Noop { + __kind: 'Noop' +} + +export interface Type_104_Remove { + __kind: 'Remove' +} + +export interface Type_104_Set { + __kind: 'Set' + value: Percent +} + +export type Percent = number + +export const Type_103: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_103 = Type_103_Noop | Type_103_Remove | Type_103_Set + +export interface Type_103_Noop { + __kind: 'Noop' +} + +export interface Type_103_Remove { + __kind: 'Remove' +} + +export interface Type_103_Set { + __kind: 'Set' + value: number +} + +export const ConfigOp: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type ConfigOp = ConfigOp_Noop | ConfigOp_Remove | ConfigOp_Set + +export interface ConfigOp_Noop { + __kind: 'Noop' +} + +export interface ConfigOp_Remove { + __kind: 'Remove' +} + +export interface ConfigOp_Set { + __kind: 'Set' + value: bigint +} + +export const Percent = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_force_apply_min_commission | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_staking_configs | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: MultiAddress + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose + * any limitation on the amount that can be added. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: number + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Declare a `controller` to stop participating as either a validator or nominator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_, but can be called by anyone. + * + * If the caller is the same as the controller being targeted, then no further checks are + * enforced, and this function behaves just like `chill`. + * + * If the caller is different than the controller being targeted, the following conditions + * must be met: + * + * * `controller` must belong to a nominator who has become non-decodable, + * + * Or: + * + * * A `ChillThreshold` must be set and checked which defines how close to the max + * nominators or validators we must reach before users can start chilling one-another. + * * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine + * how close we are to the threshold. + * * A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines + * if this is a person that should be chilled because they have not met the threshold + * bond required. + * + * This can be helpful if bond requirements are updated, and we need to remove old users + * who do not satisfy these requirements. + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + controller: AccountId32 +} + +/** + * Force a validator to have at least the minimum commission. This will not affect a + * validator who already has a commission greater than or equal to the minimum. Any account + * can call this. + */ +export interface StakingCall_force_apply_min_commission { + __kind: 'force_apply_min_commission' + validatorStash: AccountId32 +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * Thus the election process may be ongoing when this is called. In this case the + * election will continue until the next era is triggered. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators upto maximum of + * `ElectionProviderBase::MaxWinners`. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: MultiAddress[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (T::MaxNominations). + * - Both the reads and writes follow a similar pattern. + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: MultiAddress[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId32 + era: number +} + +/** + * Remove all data structures concerning a staker/stash once it is at a state where it can + * be considered `dust` in the staking system. The requirements are: + * + * 1. the `total_balance` of the stash is below existential deposit. + * 2. or, the `ledger.total` of the stash is below existential deposit. + * + * The former can happen in cases like a slash; the latter when a fully unbonded account + * is still receiving staking rewards in `RewardDestination::Staked`. + * + * It can be called by anyone, as long as `stash` meets the above requirements. + * + * Refunds the transaction fees upon successful execution. + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MaxUnlockingChunks`. + * - Storage changes: Can't increase storage, only decrease it. + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor upto maximum of + * `ElectionProviderBase::MaxWinners`. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt instantly (as soon as this function is completed successfully). + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: MultiAddress +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId32[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt instantly (as soon as this function is completed successfully). + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Update the various staking configurations . + * + * * `min_nominator_bond`: The minimum active bond needed to be a nominator. + * * `min_validator_bond`: The minimum active bond needed to be a validator. + * * `max_nominator_count`: The max number of users who can be a nominator at once. When + * set to `None`, no limit is enforced. + * * `max_validator_count`: The max number of users who can be a validator at once. When + * set to `None`, no limit is enforced. + * * `chill_threshold`: The ratio of `max_nominator_count` or `max_validator_count` which + * should be filled in order for the `chill_other` transaction to work. + * * `min_commission`: The minimum amount of commission that each validators must maintain. + * This is checked only upon calling `validate`. Existing validators are not affected. + * + * RuntimeOrigin must be Root to call this function. + * + * NOTE: Existing nominators and validators will not be affected by this update. + * to kick people under the new limits, `chill_other` should be called. + */ +export interface StakingCall_set_staking_configs { + __kind: 'set_staking_configs' + minNominatorBond: ConfigOp + minValidatorBond: ConfigOp + maxNominatorCount: Type_103 + maxValidatorCount: Type_103 + chillThreshold: Type_104 + minCommission: Type_105 +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * If a user encounters the `InsufficientBond` error when calling this extrinsic, + * they should call `chill` first in order to free up their bonded funds. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * Complexity O(S) where S is the number of slashing spans to remove + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: sts.bigint(), + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: MultiAddress, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: MultiAddress, + judgement: Type_221, + }), + judge_suspended_member: sts.enumStruct({ + who: MultiAddress, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: MultiAddress, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: MultiAddress, + value: sts.bigint(), + tip: sts.bigint(), + }), + } +}) + +export const Type_221: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export type Type_221 = Type_221_Approve | Type_221_Rebid | Type_221_Reject + +export interface Type_221_Approve { + __kind: 'Approve' +} + +export interface Type_221_Rebid { + __kind: 'Rebid' +} + +export interface Type_221_Reject { + __kind: 'Reject' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: bigint +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * pallet to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: MultiAddress + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: MultiAddress + judgement: Type_221 +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin forgives + * (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to + * society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: MultiAddress + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured + * payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be approved (`true`) or + * rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: MultiAddress + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: MultiAddress + value: bigint + tip: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: Id, + }), + force_lease: sts.enumStruct({ + para: Id, + leaser: AccountId32, + amount: sts.bigint(), + periodBegin: sts.number(), + periodCount: sts.number(), + }), + trigger_onboard: sts.enumStruct({ + para: Id, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * Clear all leases for a Para Id, refunding any deposits back to the original owners. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: Id +} + +/** + * Just a connect into the `lease_out` call, in case Root wants to force some lease to happen + * independently of any other on-chain mechanism to use it. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: Id + leaser: AccountId32 + amount: bigint + periodBegin: number + periodCount: number +} + +/** + * Try to onboard a parachain that has a lease for the current lease period. + * + * This function can be useful if there was some state issue with a para that should + * have onboarded, but was unable to. As long as they have a lease period, we can + * let them onboard from here. + * + * Origin must be signed, but can be called by anyone. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: SessionKeys, + proof: sts.bytes(), + }), + } +}) + +export const SessionKeys: sts.Type = sts.struct(() => { + return { + grandpa: Public, + babe: sts.bytes(), + imOnline: sts.bytes(), + paraValidator: V2Public, + paraAssignment: sts.bytes(), + authorityDiscovery: sts.bytes(), + } +}) + +export const V2Public = sts.bytes() + +export const Public = sts.bytes() + +export interface SessionKeys { + grandpa: Public + babe: Bytes + imOnline: Bytes + paraValidator: V2Public + paraAssignment: Bytes + authorityDiscovery: Bytes +} + +export type V2Public = Bytes + +export type Public = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be Signed and the account must be either be + * convertible to a validator ID using the chain's typical addressing system (this usually + * means being a controller account) or directly convertible into a validator ID (which + * usually means being a stash account). + * + * # + * - Complexity: `O(1)` in number of key types. Actual cost depends on the number of length + * of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)`. Actual cost depends on the number of length of + * `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: SessionKeys + proof: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: sts.number(), + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_after: sts.enumStruct({ + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: number + index: number +} + +/** + * Cancel a named scheduled task. + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Schedule a named task. + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`](Self::schedule_named). + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + add_lock: sts.enumStruct({ + para: Id, + }), + deregister: sts.enumStruct({ + id: Id, + }), + force_register: sts.enumStruct({ + who: AccountId32, + deposit: sts.bigint(), + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + register: sts.enumStruct({ + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + remove_lock: sts.enumStruct({ + para: Id, + }), + reserve: sts.unit(), + schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + swap: sts.enumStruct({ + id: Id, + other: Id, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RegistrarCall = RegistrarCall_add_lock | RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_register | RegistrarCall_remove_lock | RegistrarCall_reserve | RegistrarCall_schedule_code_upgrade | RegistrarCall_set_current_head | RegistrarCall_swap + +/** + * Add a manager lock from a para. This will prevent the manager of a + * para to deregister or swap a para. + * + * Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked. + */ +export interface RegistrarCall_add_lock { + __kind: 'add_lock' + para: Id +} + +/** + * Deregister a Para Id, freeing all data and returning any deposit. + * + * The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: Id +} + +/** + * Force the registration of a Para Id on the relay chain. + * + * This function must be called by a Root origin. + * + * The deposit taken can be specified for this registration. Any `ParaId` + * can be registered, including sub-1000 IDs which are System Parachains. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId32 + deposit: bigint + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Register head data and validation code for a reserved Para Id. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. + * - `id`: The para ID. Must be owned/managed by the `origin` signing account. + * - `genesis_head`: The genesis head data of the parachain/thread. + * - `validation_code`: The initial validation code of the parachain/thread. + * + * ## Deposits/Fees + * The origin signed account must reserve a corresponding deposit for the registration. Anything already + * reserved previously for this para ID is accounted for. + * + * ## Events + * The `Registered` event is emitted in case of success. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Remove a manager lock from a para. This will allow the manager of a + * previously locked para to deregister or swap a para without using governance. + * + * Can only be called by the Root origin or the parachain. + */ +export interface RegistrarCall_remove_lock { + __kind: 'remove_lock' + para: Id +} + +/** + * Reserve a Para Id on the relay chain. + * + * This function will reserve a new Para Id to be owned/managed by the origin account. + * The origin account is able to register head data and validation code using `register` to create + * a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID. + * + * ## Deposits/Fees + * The origin must reserve a deposit of `ParaDeposit` for the registration. + * + * ## Events + * The `Reserved` event is emitted in case of success, which provides the ID reserved for use. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * Schedule a parachain upgrade. + * + * Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked. + */ +export interface RegistrarCall_schedule_code_upgrade { + __kind: 'schedule_code_upgrade' + para: Id + newCode: ValidationCode +} + +/** + * Set the parachain's current head. + * + * Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked. + */ +export interface RegistrarCall_set_current_head { + __kind: 'set_current_head' + para: Id + newHead: HeadData +} + +/** + * Swap a parachain with another parachain or parathread. + * + * The origin must be Root, the `para` owner, or the `para` itself. + * + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: Id + other: Id +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ReferendaCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + index: sts.number(), + }), + kill: sts.enumStruct({ + index: sts.number(), + }), + nudge_referendum: sts.enumStruct({ + index: sts.number(), + }), + one_fewer_deciding: sts.enumStruct({ + track: sts.number(), + }), + place_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + submit: sts.enumStruct({ + proposalOrigin: OriginCaller, + proposal: Bounded, + enactmentMoment: DispatchTime, + }), + } +}) + +export const DispatchTime: sts.Type = sts.closedEnum(() => { + return { + After: sts.number(), + At: sts.number(), + } +}) + +export type DispatchTime = DispatchTime_After | DispatchTime_At + +export interface DispatchTime_After { + __kind: 'After' + value: number +} + +export interface DispatchTime_At { + __kind: 'At' + value: number +} + +export const Bounded: sts.Type = sts.closedEnum(() => { + return { + Inline: BoundedVec, + Legacy: sts.enumStruct({ + hash: H256, + }), + Lookup: sts.enumStruct({ + hash: H256, + len: sts.number(), + }), + } +}) + +export const BoundedVec = sts.bytes() + +export type Bounded = Bounded_Inline | Bounded_Legacy | Bounded_Lookup + +export interface Bounded_Inline { + __kind: 'Inline' + value: BoundedVec +} + +export interface Bounded_Legacy { + __kind: 'Legacy' + hash: H256 +} + +export interface Bounded_Lookup { + __kind: 'Lookup' + hash: H256 + len: number +} + +export type BoundedVec = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ReferendaCall = ReferendaCall_cancel | ReferendaCall_kill | ReferendaCall_nudge_referendum | ReferendaCall_one_fewer_deciding | ReferendaCall_place_decision_deposit | ReferendaCall_refund_decision_deposit | ReferendaCall_submit + +/** + * Cancel an ongoing referendum. + * + * - `origin`: must be the `CancelOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Cancelled`. + */ +export interface ReferendaCall_cancel { + __kind: 'cancel' + index: number +} + +/** + * Cancel an ongoing referendum and slash the deposits. + * + * - `origin`: must be the `KillOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Killed` and `DepositSlashed`. + */ +export interface ReferendaCall_kill { + __kind: 'kill' + index: number +} + +/** + * Advance a referendum onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `index`: the referendum to be advanced. + */ +export interface ReferendaCall_nudge_referendum { + __kind: 'nudge_referendum' + index: number +} + +/** + * Advance a track onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `track`: the track to be advanced. + * + * Action item for when there is now one fewer referendum in the deciding phase and the + * `DecidingCount` is not yet updated. This means that we should either: + * - begin deciding another referendum (and leave `DecidingCount` alone); or + * - decrement `DecidingCount`. + */ +export interface ReferendaCall_one_fewer_deciding { + __kind: 'one_fewer_deciding' + track: number +} + +/** + * Post the Decision Deposit for a referendum. + * + * - `origin`: must be `Signed` and the account must have funds available for the + * referendum's track's Decision Deposit. + * - `index`: The index of the submitted referendum whose Decision Deposit is yet to be + * posted. + * + * Emits `DecisionDepositPlaced`. + */ +export interface ReferendaCall_place_decision_deposit { + __kind: 'place_decision_deposit' + index: number +} + +/** + * Refund the Decision Deposit for a closed referendum back to the depositor. + * + * - `origin`: must be `Signed` or `Root`. + * - `index`: The index of a closed referendum whose Decision Deposit has not yet been + * refunded. + * + * Emits `DecisionDepositRefunded`. + */ +export interface ReferendaCall_refund_decision_deposit { + __kind: 'refund_decision_deposit' + index: number +} + +/** + * Propose a referendum on a privileged action. + * + * - `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds + * available. + * - `proposal_origin`: The origin from which the proposal should be executed. + * - `proposal`: The proposal. + * - `enactment_moment`: The moment that the proposal should be enacted. + * + * Emits `Submitted`. + */ +export interface ReferendaCall_submit { + __kind: 'submit' + proposalOrigin: OriginCaller + proposal: Bounded + enactmentMoment: DispatchTime +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: MultiAddress, + call: Call, + }), + cancel_recovered: sts.enumStruct({ + account: MultiAddress, + }), + claim_recovery: sts.enumStruct({ + account: MultiAddress, + }), + close_recovery: sts.enumStruct({ + rescuer: MultiAddress, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId32), + threshold: sts.number(), + delayPeriod: sts.number(), + }), + initiate_recovery: sts.enumStruct({ + account: MultiAddress, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + vouch_recovery: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: MultiAddress + call: Call +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: MultiAddress +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully recovered by + * you. + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: MultiAddress +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: MultiAddress +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. Should be + * ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt before the + * account can be recovered. Should be less than or equal to the length of the list of + * friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized that + * needs to pass before the account can be recovered. + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId32[] + threshold: number + delayPeriod: number +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account needs to be + * recoverable (i.e. have a recovery configuration). + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: MultiAddress +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + announce: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + create_pure: sts.enumStruct({ + proxyType: ProxyType, + delay: sts.number(), + index: sts.number(), + }), + kill_pure: sts.enumStruct({ + spawner: MultiAddress, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + proxy_announced: sts.enumStruct({ + delegate: MultiAddress, + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + reject_announcement: sts.enumStruct({ + delegate: MultiAddress, + callHash: H256, + }), + remove_announcement: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_create_pure | ProxyCall_kill_pure | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: MultiAddress + callHash: H256 +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + */ +export interface ProxyCall_create_pure { + __kind: 'create_pure' + proxyType: ProxyType + delay: number + index: number +} + +/** + * Removes a previously spawned pure proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `pure` with corresponding parameters. + * + * - `spawner`: The account that originally called `pure` to create this account. + * - `index`: The disambiguation index originally passed to `pure`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `pure`. + * - `height`: The height of the chain when the call to `pure` was processed. + * - `ext_index`: The extrinsic index in which the call to `pure` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created pure + * account whose `pure` call has corresponding parameters. + */ +export interface ProxyCall_kill_pure { + __kind: 'kill_pure' + spawner: MultiAddress + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Dispatch the given `call` from an account that the sender is authorized for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: MultiAddress + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: MultiAddress + callHash: H256 +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: MultiAddress + callHash: H256 +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `pure`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Society | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Society { + __kind: 'Society' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PreimageCall: sts.Type = sts.closedEnum(() => { + return { + note_preimage: sts.enumStruct({ + bytes: sts.bytes(), + }), + request_preimage: sts.enumStruct({ + hash: H256, + }), + unnote_preimage: sts.enumStruct({ + hash: H256, + }), + unrequest_preimage: sts.enumStruct({ + hash: H256, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PreimageCall = PreimageCall_note_preimage | PreimageCall_request_preimage | PreimageCall_unnote_preimage | PreimageCall_unrequest_preimage + +/** + * Register a preimage on-chain. + * + * If the preimage was previously requested, no fees or deposits are taken for providing + * the preimage. Otherwise, a deposit is taken proportional to the size of the preimage. + */ +export interface PreimageCall_note_preimage { + __kind: 'note_preimage' + bytes: Bytes +} + +/** + * Request a preimage be uploaded to the chain without paying any fees or deposits. + * + * If the preimage requests has already been provided on-chain, we unreserve any deposit + * a user may have paid, and take the control of the preimage out of their hands. + */ +export interface PreimageCall_request_preimage { + __kind: 'request_preimage' + hash: H256 +} + +/** + * Clear an unrequested preimage from the runtime storage. + * + * If `len` is provided, then it will be a much cheaper operation. + * + * - `hash`: The hash of the preimage to be removed from the store. + * - `len`: The length of the preimage of `hash`. + */ +export interface PreimageCall_unnote_preimage { + __kind: 'unnote_preimage' + hash: H256 +} + +/** + * Clear a previously made request for a preimage. + * + * NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. + */ +export interface PreimageCall_unrequest_preimage { + __kind: 'unrequest_preimage' + hash: H256 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PhragmenElectionCall: sts.Type = sts.closedEnum(() => { + return { + clean_defunct_voters: sts.enumStruct({ + numVoters: sts.number(), + numDefunct: sts.number(), + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + slashBond: sts.boolean(), + rerunElection: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId32), + value: sts.bigint(), + }), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PhragmenElectionCall = PhragmenElectionCall_clean_defunct_voters | PhragmenElectionCall_remove_member | PhragmenElectionCall_remove_voter | PhragmenElectionCall_renounce_candidacy | PhragmenElectionCall_submit_candidacy | PhragmenElectionCall_vote + +/** + * Clean all voters who are defunct (i.e. they do not serve any purpose at all). The + * deposit of the removed voters are returned. + * + * This is an root function to be used only for cleaning the state. + * + * The dispatch origin of this call must be root. + * + * # + * The total number of voters and those that are defunct must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_clean_defunct_voters { + __kind: 'clean_defunct_voters' + numVoters: number + numDefunct: number +} + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, if `rerun_election` is `true`, a new phragmen election is + * started, else, nothing happens. + * + * If `slash_bond` is set to true, the bond of the member being removed is slashed. Else, + * it is returned. + * + * The dispatch origin of this call must be root. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement, we use a small weight. Else, since this is a root call and + * will go into phragmen, we assume full block for now. + * # + */ +export interface PhragmenElectionCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + slashBond: boolean + rerunElection: boolean +} + +/** + * Remove `origin` as a voter. + * + * This removes the lock and returns the deposit. + * + * The dispatch origin of this call must be signed and be a voter. + */ +export interface PhragmenElectionCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * + * - `origin` is a candidate and not elected in any set. In this case, the deposit is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the deposit is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the deposit is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_member`](Self::remove_member), if replacement runners exists, they + * are immediately used. If the prime is renouncing, then no prime will exist until the + * next round. + * + * The dispatch origin of this call must be signed, and have one of the above roles. + * + * # + * The type of renouncing must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Submit oneself for candidacy. A fixed amount of deposit is recorded. + * + * All candidates are wiped at the end of the term. They either become a member/runner-up, + * or leave the system while their deposit is slashed. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`] + * to get their deposit back. Losing the spot in an election will always lead to a slash. + * + * # + * The number of current candidates must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is + * reserved. The deposit is based on the number of votes and can be updated over time. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * If `value` is more than `who`'s free balance, then the maximum of the two is used. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * It is the responsibility of the caller to **NOT** place all of their balance into the + * lock and keep some for further operations. + * + * # + * We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less. + * # + */ +export interface PhragmenElectionCall_vote { + __kind: 'vote' + votes: AccountId32[] + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasSharedCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasDisputesCall: sts.Type = sts.closedEnum(() => { + return { + force_unfreeze: sts.unit(), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasDisputesCall = ParasDisputesCall_force_unfreeze + +export interface ParasDisputesCall_force_unfreeze { + __kind: 'force_unfreeze' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + add_trusted_validation_code: sts.enumStruct({ + validationCode: ValidationCode, + }), + force_note_new_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: Id, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + relayParentNumber: sts.number(), + }), + force_set_current_code: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + include_pvf_check_statement: sts.enumStruct({ + stmt: V2PvfCheckStatement, + signature: V2Signature, + }), + poke_unused_validation_code: sts.enumStruct({ + validationCodeHash: ValidationCodeHash, + }), + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const V2Signature = sts.bytes() + +export const V2PvfCheckStatement: sts.Type = sts.struct(() => { + return { + accept: sts.boolean(), + subject: ValidationCodeHash, + sessionIndex: sts.number(), + validatorIndex: V2ValidatorIndex, + } +}) + +export const V2ValidatorIndex = sts.number() + +export interface V2PvfCheckStatement { + accept: boolean + subject: ValidationCodeHash + sessionIndex: number + validatorIndex: V2ValidatorIndex +} + +export type V2ValidatorIndex = number + +export type ValidationCodeHash = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasCall = ParasCall_add_trusted_validation_code | ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head | ParasCall_include_pvf_check_statement | ParasCall_poke_unused_validation_code + +/** + * Adds the validation code to the storage. + * + * The code will not be added if it is already present. Additionally, if PVF pre-checking + * is running for that code, it will be instantly accepted. + * + * Otherwise, the code will be added into the storage. Note that the code will be added + * into storage with reference count 0. This is to account the fact that there are no users + * for this code yet. The caller will have to make sure that this code eventually gets + * used by some parachain or removed from the storage to avoid storage leaks. For the latter + * prefer to use the `poke_unused_validation_code` dispatchable to raw storage manipulation. + * + * This function is mainly meant to be used for upgrading parachains that do not follow + * the go-ahead signal while the PVF pre-checking feature is enabled. + */ +export interface ParasCall_add_trusted_validation_code { + __kind: 'add_trusted_validation_code' + validationCode: ValidationCode +} + +/** + * Note a new block head for para within the context of the current block. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: Id + newHead: HeadData +} + +/** + * Put a parachain directly into the next session's action queue. + * We can't queue it any sooner than this without going into the + * initializer... + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: Id +} + +/** + * Schedule an upgrade as if it was scheduled in the given relay parent block. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: Id + newCode: ValidationCode + relayParentNumber: number +} + +/** + * Set the storage for the parachain validation code immediately. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: Id + newCode: ValidationCode +} + +/** + * Set the storage for the current parachain head data immediately. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: Id + newHead: HeadData +} + +/** + * Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and + * enacts the results if that was the last vote before achieving the supermajority. + */ +export interface ParasCall_include_pvf_check_statement { + __kind: 'include_pvf_check_statement' + stmt: V2PvfCheckStatement + signature: V2Signature +} + +/** + * Remove the validation code from the storage iff the reference count is 0. + * + * This is better than removing the storage directly, because it will not remove the code + * that was suddenly got used by some parachain while this dispatchable was pending + * dispatching. + */ +export interface ParasCall_poke_unused_validation_code { + __kind: 'poke_unused_validation_code' + validationCodeHash: ValidationCodeHash +} + +export type V2Signature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: V2InherentData, + }), + } +}) + +export const V2InherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => V2UncheckedSigned), + backedCandidates: sts.array(() => V2BackedCandidate), + disputes: sts.array(() => V2DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: H256, + number: sts.number(), + stateRoot: H256, + extrinsicsRoot: H256, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + Consensus: sts.tuple(() => [sts.bytes(), sts.bytes()]), + Other: sts.bytes(), + PreRuntime: sts.tuple(() => [sts.bytes(), sts.bytes()]), + RuntimeEnvironmentUpdated: sts.unit(), + Seal: sts.tuple(() => [sts.bytes(), sts.bytes()]), + } +}) + +export type DigestItem = DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: [Bytes, Bytes] +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: [Bytes, Bytes] +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: [Bytes, Bytes] +} + +export interface Digest { + logs: DigestItem[] +} + +export interface Header { + parentHash: H256 + number: number + stateRoot: H256 + extrinsicsRoot: H256 + digest: Digest +} + +export const V2DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: sts.number(), + statements: sts.array(() => sts.tuple(() => [V2DisputeStatement, V2ValidatorIndex, V2Signature])), + } +}) + +export const V2DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: V2InvalidDisputeStatementKind, + Valid: V2ValidDisputeStatementKind, + } +}) + +export const V2ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + BackingSeconded: H256, + BackingValid: H256, + Explicit: sts.unit(), + } +}) + +export type V2ValidDisputeStatementKind = V2ValidDisputeStatementKind_ApprovalChecking | V2ValidDisputeStatementKind_BackingSeconded | V2ValidDisputeStatementKind_BackingValid | V2ValidDisputeStatementKind_Explicit + +export interface V2ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface V2ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: H256 +} + +export interface V2ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: H256 +} + +export interface V2ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export const V2InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export type V2InvalidDisputeStatementKind = V2InvalidDisputeStatementKind_Explicit + +export interface V2InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type V2DisputeStatement = V2DisputeStatement_Invalid | V2DisputeStatement_Valid + +export interface V2DisputeStatement_Invalid { + __kind: 'Invalid' + value: V2InvalidDisputeStatementKind +} + +export interface V2DisputeStatement_Valid { + __kind: 'Valid' + value: V2ValidDisputeStatementKind +} + +export const CandidateHash = sts.bytes() + +export interface V2DisputeStatementSet { + candidateHash: CandidateHash + session: number + statements: [V2DisputeStatement, V2ValidatorIndex, V2Signature][] +} + +export type CandidateHash = Bytes + +export const V2BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: V2CommittedCandidateReceipt, + validityVotes: sts.array(() => V2ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const V2ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: V2Signature, + Implicit: V2Signature, + } +}) + +export type V2ValidityAttestation = V2ValidityAttestation_Explicit | V2ValidityAttestation_Implicit + +export interface V2ValidityAttestation_Explicit { + __kind: 'Explicit' + value: V2Signature +} + +export interface V2ValidityAttestation_Implicit { + __kind: 'Implicit' + value: V2Signature +} + +export const V2CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: V2CandidateDescriptor, + commitments: V2CandidateCommitments, + } +}) + +export const V2CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => sts.bytes()), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: sts.number(), + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: Id, + data: sts.bytes(), + } +}) + +export interface OutboundHrmpMessage { + recipient: Id + data: Bytes +} + +export interface V2CandidateCommitments { + upwardMessages: Bytes[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: number +} + +export const V2CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: Id, + relayParent: H256, + collator: sts.bytes(), + persistedValidationDataHash: H256, + povHash: H256, + erasureRoot: H256, + signature: sts.bytes(), + paraHead: H256, + validationCodeHash: ValidationCodeHash, + } +}) + +export interface V2CandidateDescriptor { + paraId: Id + relayParent: H256 + collator: Bytes + persistedValidationDataHash: H256 + povHash: H256 + erasureRoot: H256 + signature: Bytes + paraHead: H256 + validationCodeHash: ValidationCodeHash +} + +export interface V2CommittedCandidateReceipt { + descriptor: V2CandidateDescriptor + commitments: V2CandidateCommitments +} + +export interface V2BackedCandidate { + candidate: V2CommittedCandidateReceipt + validityVotes: V2ValidityAttestation[] + validatorIndices: BitSequence +} + +export const V2UncheckedSigned: sts.Type = sts.struct(() => { + return { + payload: V2AvailabilityBitfield, + validatorIndex: V2ValidatorIndex, + signature: V2Signature, + } +}) + +export const V2AvailabilityBitfield = sts.bitseq() + +export interface V2UncheckedSigned { + payload: V2AvailabilityBitfield + validatorIndex: V2ValidatorIndex + signature: V2Signature +} + +export type V2AvailabilityBitfield = BitSequence + +export interface V2InherentData { + bitfields: V2UncheckedSigned[] + backedCandidates: V2BackedCandidate[] + disputes: V2DisputeStatementSet[] + parentHeader: Header +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInherentCall = ParaInherentCall_enter + +/** + * Enter the paras inherent. This will process bitfields and backed candidates. + */ +export interface ParaInherentCall_enter { + __kind: 'enter' + data: V2InherentData +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInclusionCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const NominationPoolsCall: sts.Type = sts.closedEnum(() => { + return { + bond_extra: sts.enumStruct({ + extra: BondExtra, + }), + chill: sts.enumStruct({ + poolId: sts.number(), + }), + claim_payout: sts.unit(), + create: sts.enumStruct({ + amount: sts.bigint(), + root: MultiAddress, + nominator: MultiAddress, + stateToggler: MultiAddress, + }), + create_with_pool_id: sts.enumStruct({ + amount: sts.bigint(), + root: MultiAddress, + nominator: MultiAddress, + stateToggler: MultiAddress, + poolId: sts.number(), + }), + join: sts.enumStruct({ + amount: sts.bigint(), + poolId: sts.number(), + }), + nominate: sts.enumStruct({ + poolId: sts.number(), + validators: sts.array(() => AccountId32), + }), + pool_withdraw_unbonded: sts.enumStruct({ + poolId: sts.number(), + numSlashingSpans: sts.number(), + }), + set_configs: sts.enumStruct({ + minJoinBond: Type_328, + minCreateBond: Type_328, + maxPools: Type_329, + maxMembers: Type_329, + maxMembersPerPool: Type_329, + }), + set_metadata: sts.enumStruct({ + poolId: sts.number(), + metadata: sts.bytes(), + }), + set_state: sts.enumStruct({ + poolId: sts.number(), + state: PoolState, + }), + unbond: sts.enumStruct({ + memberAccount: MultiAddress, + unbondingPoints: sts.bigint(), + }), + update_roles: sts.enumStruct({ + poolId: sts.number(), + newRoot: Type_330, + newNominator: Type_330, + newStateToggler: Type_330, + }), + withdraw_unbonded: sts.enumStruct({ + memberAccount: MultiAddress, + numSlashingSpans: sts.number(), + }), + } +}) + +export const Type_330: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: AccountId32, + } +}) + +export type Type_330 = Type_330_Noop | Type_330_Remove | Type_330_Set + +export interface Type_330_Noop { + __kind: 'Noop' +} + +export interface Type_330_Remove { + __kind: 'Remove' +} + +export interface Type_330_Set { + __kind: 'Set' + value: AccountId32 +} + +export const PoolState: sts.Type = sts.closedEnum(() => { + return { + Blocked: sts.unit(), + Destroying: sts.unit(), + Open: sts.unit(), + } +}) + +export type PoolState = PoolState_Blocked | PoolState_Destroying | PoolState_Open + +export interface PoolState_Blocked { + __kind: 'Blocked' +} + +export interface PoolState_Destroying { + __kind: 'Destroying' +} + +export interface PoolState_Open { + __kind: 'Open' +} + +export const Type_329: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_329 = Type_329_Noop | Type_329_Remove | Type_329_Set + +export interface Type_329_Noop { + __kind: 'Noop' +} + +export interface Type_329_Remove { + __kind: 'Remove' +} + +export interface Type_329_Set { + __kind: 'Set' + value: number +} + +export const Type_328: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type Type_328 = Type_328_Noop | Type_328_Remove | Type_328_Set + +export interface Type_328_Noop { + __kind: 'Noop' +} + +export interface Type_328_Remove { + __kind: 'Remove' +} + +export interface Type_328_Set { + __kind: 'Set' + value: bigint +} + +export const BondExtra: sts.Type = sts.closedEnum(() => { + return { + FreeBalance: sts.bigint(), + Rewards: sts.unit(), + } +}) + +export type BondExtra = BondExtra_FreeBalance | BondExtra_Rewards + +export interface BondExtra_FreeBalance { + __kind: 'FreeBalance' + value: bigint +} + +export interface BondExtra_Rewards { + __kind: 'Rewards' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type NominationPoolsCall = NominationPoolsCall_bond_extra | NominationPoolsCall_chill | NominationPoolsCall_claim_payout | NominationPoolsCall_create | NominationPoolsCall_create_with_pool_id | NominationPoolsCall_join | NominationPoolsCall_nominate | NominationPoolsCall_pool_withdraw_unbonded | NominationPoolsCall_set_configs | NominationPoolsCall_set_metadata | NominationPoolsCall_set_state | NominationPoolsCall_unbond | NominationPoolsCall_update_roles | NominationPoolsCall_withdraw_unbonded + +/** + * Bond `extra` more funds from `origin` into the pool to which they already belong. + * + * Additional funds can come from either the free balance of the account, of from the + * accumulated rewards, see [`BondExtra`]. + * + * Bonding extra funds implies an automatic payout of all pending rewards as well. + */ +export interface NominationPoolsCall_bond_extra { + __kind: 'bond_extra' + extra: BondExtra +} + +/** + * Chill on behalf of the pool. + * + * The dispatch origin of this call must be signed by the pool nominator or the pool + * root role, same as [`Pallet::nominate`]. + * + * This directly forward the call to the staking pallet, on behalf of the pool bonded + * account. + */ +export interface NominationPoolsCall_chill { + __kind: 'chill' + poolId: number +} + +/** + * A bonded member can use this to claim their payout based on the rewards that the pool + * has accumulated since their last claimed payout (OR since joining if this is there first + * time claiming rewards). The payout will be transferred to the member's account. + * + * The member will earn rewards pro rata based on the members stake vs the sum of the + * members in the pools stake. Rewards do not "expire". + */ +export interface NominationPoolsCall_claim_payout { + __kind: 'claim_payout' +} + +/** + * Create a new delegation pool. + * + * # Arguments + * + * * `amount` - The amount of funds to delegate to the pool. This also acts of a sort of + * deposit since the pools creator cannot fully unbond funds until the pool is being + * destroyed. + * * `index` - A disambiguation index for creating the account. Likely only useful when + * creating multiple pools in the same extrinsic. + * * `root` - The account to set as [`PoolRoles::root`]. + * * `nominator` - The account to set as the [`PoolRoles::nominator`]. + * * `state_toggler` - The account to set as the [`PoolRoles::state_toggler`]. + * + * # Note + * + * In addition to `amount`, the caller will transfer the existential deposit; so the caller + * needs at have at least `amount + existential_deposit` transferrable. + */ +export interface NominationPoolsCall_create { + __kind: 'create' + amount: bigint + root: MultiAddress + nominator: MultiAddress + stateToggler: MultiAddress +} + +/** + * Create a new delegation pool with a previously used pool id + * + * # Arguments + * + * same as `create` with the inclusion of + * * `pool_id` - `A valid PoolId. + */ +export interface NominationPoolsCall_create_with_pool_id { + __kind: 'create_with_pool_id' + amount: bigint + root: MultiAddress + nominator: MultiAddress + stateToggler: MultiAddress + poolId: number +} + +/** + * Stake funds with a pool. The amount to bond is transferred from the member to the + * pools account and immediately increases the pools bond. + * + * # Note + * + * * An account can only be a member of a single pool. + * * An account cannot join the same pool multiple times. + * * This call will *not* dust the member account, so the member must have at least + * `existential deposit + amount` in their account. + * * Only a pool with [`PoolState::Open`] can be joined + */ +export interface NominationPoolsCall_join { + __kind: 'join' + amount: bigint + poolId: number +} + +/** + * Nominate on behalf of the pool. + * + * The dispatch origin of this call must be signed by the pool nominator or the pool + * root role. + * + * This directly forward the call to the staking pallet, on behalf of the pool bonded + * account. + */ +export interface NominationPoolsCall_nominate { + __kind: 'nominate' + poolId: number + validators: AccountId32[] +} + +/** + * Call `withdraw_unbonded` for the pools account. This call can be made by any account. + * + * This is useful if their are too many unlocking chunks to call `unbond`, and some + * can be cleared by withdrawing. In the case there are too many unlocking chunks, the user + * would probably see an error like `NoMoreChunks` emitted from the staking system when + * they attempt to unbond. + */ +export interface NominationPoolsCall_pool_withdraw_unbonded { + __kind: 'pool_withdraw_unbonded' + poolId: number + numSlashingSpans: number +} + +/** + * Update configurations for the nomination pools. The origin for this call must be + * Root. + * + * # Arguments + * + * * `min_join_bond` - Set [`MinJoinBond`]. + * * `min_create_bond` - Set [`MinCreateBond`]. + * * `max_pools` - Set [`MaxPools`]. + * * `max_members` - Set [`MaxPoolMembers`]. + * * `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]. + */ +export interface NominationPoolsCall_set_configs { + __kind: 'set_configs' + minJoinBond: Type_328 + minCreateBond: Type_328 + maxPools: Type_329 + maxMembers: Type_329 + maxMembersPerPool: Type_329 +} + +/** + * Set a new metadata for the pool. + * + * The dispatch origin of this call must be signed by the state toggler, or the root role + * of the pool. + */ +export interface NominationPoolsCall_set_metadata { + __kind: 'set_metadata' + poolId: number + metadata: Bytes +} + +/** + * Set a new state for the pool. + * + * If a pool is already in the `Destroying` state, then under no condition can its state + * change again. + * + * The dispatch origin of this call must be either: + * + * 1. signed by the state toggler, or the root role of the pool, + * 2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and + * then the state of the pool can be permissionlessly changed to `Destroying`. + */ +export interface NominationPoolsCall_set_state { + __kind: 'set_state' + poolId: number + state: PoolState +} + +/** + * Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It + * implicitly collects the rewards one last time, since not doing so would mean some + * rewards would be forfeited. + * + * Under certain conditions, this call can be dispatched permissionlessly (i.e. by any + * account). + * + * # Conditions for a permissionless dispatch. + * + * * The pool is blocked and the caller is either the root or state-toggler. This is + * refereed to as a kick. + * * The pool is destroying and the member is not the depositor. + * * The pool is destroying, the member is the depositor and no other members are in the + * pool. + * + * ## Conditions for permissioned dispatch (i.e. the caller is also the + * `member_account`): + * + * * The caller is not the depositor. + * * The caller is the depositor, the pool is destroying and no other members are in the + * pool. + * + * # Note + * + * If there are too many unlocking chunks to unbond with the pool account, + * [`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks. If + * there are too many unlocking chunks, the result of this call will likely be the + * `NoMoreChunks` error from the staking system. + */ +export interface NominationPoolsCall_unbond { + __kind: 'unbond' + memberAccount: MultiAddress + unbondingPoints: bigint +} + +/** + * Update the roles of the pool. + * + * The root is the only entity that can change any of the roles, including itself, + * excluding the depositor, who can never change. + * + * It emits an event, notifying UIs of the role change. This event is quite relevant to + * most pool members and they should be informed of changes to pool roles. + */ +export interface NominationPoolsCall_update_roles { + __kind: 'update_roles' + poolId: number + newRoot: Type_330 + newNominator: Type_330 + newStateToggler: Type_330 +} + +/** + * Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an + * error is returned. + * + * Under certain conditions, this call can be dispatched permissionlessly (i.e. by any + * account). + * + * # Conditions for a permissionless dispatch + * + * * The pool is in destroy mode and the target is not the depositor. + * * The target is the depositor and they are the only member in the sub pools. + * * The pool is blocked and the caller is either the root or state-toggler. + * + * # Conditions for permissioned dispatch + * + * * The caller is the target and they are not the depositor. + * + * # Note + * + * If the target is the depositor, the pool will be destroyed. + */ +export interface NominationPoolsCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + memberAccount: MultiAddress + numSlashingSpans: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const NisCounterpartBalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type NisCounterpartBalancesCall = NisCounterpartBalancesCall_force_transfer | NisCounterpartBalancesCall_force_unreserve | NisCounterpartBalancesCall_set_balance | NisCounterpartBalancesCall_transfer | NisCounterpartBalancesCall_transfer_all | NisCounterpartBalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is not + * assumed to be in the overlay. + * # + */ +export interface NisCounterpartBalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * Unreserve some balance from a user by force. + * + * Can only be called by ROOT. + */ +export interface NisCounterpartBalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also alter the total issuance of the system (`TotalIssuance`) appropriately. + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + */ +export interface NisCounterpartBalancesCall_set_balance { + __kind: 'set_balance' + who: MultiAddress + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for input config + * types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex + * computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional check + * that the transfer will not kill the origin account. + * --------------------------------- + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface NisCounterpartBalancesCall_transfer { + __kind: 'transfer' + dest: MultiAddress + value: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). # + * - O(1). Just like transfer, but reading the user's transferable balance first. + * # + */ +export interface NisCounterpartBalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + */ +export interface NisCounterpartBalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const NisCall: sts.Type = sts.closedEnum(() => { + return { + fund_deficit: sts.unit(), + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + thaw: sts.enumStruct({ + index: sts.number(), + portion: sts.option(() => sts.bigint()), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type NisCall = NisCall_fund_deficit | NisCall_place_bid | NisCall_retract_bid | NisCall_thaw + +/** + * Ensure we have sufficient funding for all potential payouts. + * + * - `origin`: Must be accepted by `FundOrigin`. + */ +export interface NisCall_fund_deficit { + __kind: 'fund_deficit' +} + +/** + * Place a bid. + * + * Origin must be Signed, and account must have at least `amount` in free balance. + * + * - `amount`: The amount of the bid; these funds will be reserved, and if/when + * consolidated, removed. Must be at least `MinBid`. + * - `duration`: The number of periods before which the newly consolidated bid may be + * thawed. Must be greater than 1 and no more than `QueueCount`. + * + * Complexities: + * - `Queues[duration].len()` (just take max). + */ +export interface NisCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * Retract a previously placed bid. + * + * Origin must be Signed, and the account should have previously issued a still-active bid + * of `amount` for `duration`. + * + * - `amount`: The amount of the previous bid. + * - `duration`: The duration of the previous bid. + */ +export interface NisCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * Reduce or remove an outstanding receipt, placing the according proportion of funds into + * the account of the owner. + * + * - `origin`: Must be Signed and the account must be the owner of the receipt `index` as + * well as any fungible counterpart. + * - `index`: The index of the receipt. + * - `portion`: If `Some`, then only the given portion of the receipt should be thawed. If + * `None`, then all of it should be. + */ +export interface NisCall_thaw { + __kind: 'thaw' + index: number + portion?: (bigint | undefined) +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + call: Call, + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId32), + call: Call, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account] + * - Writes: Multisig Storage, [Caller Account] + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + call: Call + maxWeight: Weight +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId32[] + call: Call +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account + * - Write: Multisig Storage, [Caller Account], Refund Account + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId32[] + timepoint: Timepoint + callHash: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const InitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type InitializerCall = InitializerCall_force_approve + +/** + * Issue a signal to the consensus engine to forcibly act as though all parachain + * blocks in all relay chain blocks up to and including the given number in the current + * chain are valid and should be finalized. + */ +export interface InitializerCall_force_approve { + __kind: 'force_approve' + upTo: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: sts.number(), + }), + force_transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: sts.number(), + }), + freeze: sts.enumStruct({ + index: sts.number(), + }), + transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: number +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: MultiAddress + index: number + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: number +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the + * deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: number +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: MultiAddress + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: sts.bytes(), + }), + } +}) + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: sts.number(), + networkState: OpaqueNetworkState, + sessionIndex: sts.number(), + authorityIndex: sts.number(), + validatorsLen: sts.number(), + } +}) + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export interface Heartbeat { + blockNumber: number + networkState: OpaqueNetworkState + sessionIndex: number + authorityIndex: number + validatorsLen: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is + * length of `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Bytes +} + +/** + * Identity pallet declaration. + */ +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: MultiAddress, + }), + add_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: sts.number(), + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: MultiAddress, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: MultiAddress, + judgement: Judgement, + identity: H256, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: MultiAddress, + }), + rename_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: MultiAddress, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: BitFlags, + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId32, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => sts.tuple(() => [Data, Data])), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => sts.bytes()), + image: Data, + twitter: Data, + } +}) + +export interface IdentityInfo { + additional: [Data, Data][] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (Bytes | undefined) + image: Data + twitter: Data +} + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: Bytes +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: Bytes +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: Bytes +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: Bytes +} + +export const BitFlags = sts.bigint() + +export const Judgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: sts.bigint(), + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export type Judgement = Judgement_Erroneous | Judgement_FeePaid | Judgement_KnownGood | Judgement_LowQuality | Judgement_OutOfDate | Judgement_Reasonable | Judgement_Unknown + +export interface Judgement_Erroneous { + __kind: 'Erroneous' +} + +export interface Judgement_FeePaid { + __kind: 'FeePaid' + value: bigint +} + +export interface Judgement_KnownGood { + __kind: 'KnownGood' +} + +export interface Judgement_LowQuality { + __kind: 'LowQuality' +} + +export interface Judgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface Judgement_Reasonable { + __kind: 'Reasonable' +} + +export interface Judgement_Unknown { + __kind: 'Unknown' +} + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: sts.bytes(), + Keccak256: sts.bytes(), + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: sts.bytes(), + ShaThree256: sts.bytes(), + } +}) + +/** + * Identity pallet declaration. + */ +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: MultiAddress +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: MultiAddress + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: number +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: MultiAddress +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * - `identity`: The hash of the [`IdentityInfo`] for that the judgement is provided. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: MultiAddress + judgement: Judgement + identity: H256 +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: MultiAddress +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: MultiAddress + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: MultiAddress +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: BitFlags +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId32, Data][] +} + +export type BitFlags = bigint + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const HrmpCall: sts.Type = sts.closedEnum(() => { + return { + force_clean_hrmp: sts.enumStruct({ + para: Id, + inbound: sts.number(), + outbound: sts.number(), + }), + force_open_hrmp_channel: sts.enumStruct({ + sender: Id, + recipient: Id, + maxCapacity: sts.number(), + maxMessageSize: sts.number(), + }), + force_process_hrmp_close: sts.enumStruct({ + channels: sts.number(), + }), + force_process_hrmp_open: sts.enumStruct({ + channels: sts.number(), + }), + hrmp_accept_open_channel: sts.enumStruct({ + sender: Id, + }), + hrmp_cancel_open_request: sts.enumStruct({ + channelId: HrmpChannelId, + openRequests: sts.number(), + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: Id, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: Id, + recipient: Id, + } +}) + +export interface HrmpChannelId { + sender: Id + recipient: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type HrmpCall = HrmpCall_force_clean_hrmp | HrmpCall_force_open_hrmp_channel | HrmpCall_force_process_hrmp_close | HrmpCall_force_process_hrmp_open | HrmpCall_hrmp_accept_open_channel | HrmpCall_hrmp_cancel_open_request | HrmpCall_hrmp_close_channel | HrmpCall_hrmp_init_open_channel + +/** + * This extrinsic triggers the cleanup of all the HRMP storage items that + * a para may have. Normally this happens once per session, but this allows + * you to trigger the cleanup immediately for a specific parachain. + * + * Origin must be Root. + * + * Number of inbound and outbound channels for `para` must be provided as witness data of weighing. + */ +export interface HrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: Id + inbound: number + outbound: number +} + +/** + * Open a channel from a `sender` to a `recipient` `ParaId` using the Root origin. Although + * opened by Root, the `max_capacity` and `max_message_size` are still subject to the Relay + * Chain's configured limits. + * + * Expected use is when one of the `ParaId`s involved in the channel is governed by the + * Relay Chain, e.g. a common good parachain. + */ +export interface HrmpCall_force_open_hrmp_channel { + __kind: 'force_open_hrmp_channel' + sender: Id + recipient: Id + maxCapacity: number + maxMessageSize: number +} + +/** + * Force process HRMP close channel requests. + * + * If there are pending HRMP close channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of closing channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' + channels: number +} + +/** + * Force process HRMP open channel requests. + * + * If there are pending HRMP open channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of opening channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' + channels: number +} + +/** + * Accept a pending open channel request from the given sender. + * + * The channel will be opened only on the next session boundary. + */ +export interface HrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: Id +} + +/** + * This cancels a pending open channel request. It can be canceled by either of the sender + * or the recipient for that request. The origin must be either of those. + * + * The cancellation happens immediately. It is not possible to cancel the request if it is + * already accepted. + * + * Total number of open requests (i.e. `HrmpOpenChannelRequestsList`) must be provided as + * witness data. + */ +export interface HrmpCall_hrmp_cancel_open_request { + __kind: 'hrmp_cancel_open_request' + channelId: HrmpChannelId + openRequests: number +} + +/** + * Initiate unilateral closing of a channel. The origin must be either the sender or the + * recipient in the channel being closed. + * + * The closure can only happen on a session change. + */ +export interface HrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * Initiate opening a channel from a parachain to a given recipient with given channel + * parameters. + * + * - `proposed_max_capacity` - specifies how many messages can be in the channel at once. + * - `proposed_max_message_size` - specifies the maximum size of the messages. + * + * These numbers are a subject to the relay-chain configuration limits. + * + * The channel can be opened only after the recipient confirms it and only on a session + * change. + */ +export interface HrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: Id + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: sts.number(), + bestFinalizedBlockNumber: sts.number(), + }), + report_equivocation: sts.enumStruct({ + equivocationProof: Type_112, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_112, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: sts.number(), + trieNodes: sts.array(() => sts.bytes()), + validatorCount: sts.number(), + } +}) + +export interface MembershipProof { + session: number + trieNodes: Bytes[] + validatorCount: number +} + +export const Type_112: sts.Type = sts.struct(() => { + return { + setId: sts.bigint(), + equivocation: Equivocation, + } +}) + +export const Equivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: Type_120, + Prevote: Type_114, + } +}) + +export const Type_114: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Prevote, Signature]), + second: sts.tuple(() => [Prevote, Signature]), + } +}) + +export const Signature = sts.bytes() + +export const Prevote: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Prevote { + targetHash: H256 + targetNumber: number +} + +export interface Type_114 { + roundNumber: bigint + identity: Public + first: [Prevote, Signature] + second: [Prevote, Signature] +} + +export type Signature = Bytes + +export const Type_120: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Precommit, Signature]), + second: sts.tuple(() => [Precommit, Signature]), + } +}) + +export const Precommit: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Precommit { + targetHash: H256 + targetNumber: number +} + +export interface Type_120 { + roundNumber: bigint + identity: Public + first: [Precommit, Signature] + second: [Precommit, Signature] +} + +export type Equivocation = Equivocation_Precommit | Equivocation_Prevote + +export interface Equivocation_Precommit { + __kind: 'Precommit' + value: Type_120 +} + +export interface Equivocation_Prevote { + __kind: 'Prevote' + value: Type_114 +} + +export interface Type_112 { + setId: bigint + equivocation: Equivocation +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has stalled. + * + * This will trigger a forced authority set change at the beginning of the next session, to + * be enacted `delay` blocks after that. The `delay` should be high enough to safely assume + * that the block signalling the forced change will not be re-orged e.g. 1000 blocks. + * The block production rate (which may be slowed down because of finality lagging) should + * be taken into account when choosing the `delay`. The GRANDPA voters based on the new + * authority will start voting on top of `best_finalized_block_number` for new finalized + * blocks. `best_finalized_block_number` should be the highest of the latest finalized + * block of all validators of the new authority set. + * + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: number + bestFinalizedBlockNumber: number +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_112 + keyOwnerProof: MembershipProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_112 + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const FellowshipReferendaCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + index: sts.number(), + }), + kill: sts.enumStruct({ + index: sts.number(), + }), + nudge_referendum: sts.enumStruct({ + index: sts.number(), + }), + one_fewer_deciding: sts.enumStruct({ + track: sts.number(), + }), + place_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + submit: sts.enumStruct({ + proposalOrigin: OriginCaller, + proposal: Bounded, + enactmentMoment: DispatchTime, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type FellowshipReferendaCall = FellowshipReferendaCall_cancel | FellowshipReferendaCall_kill | FellowshipReferendaCall_nudge_referendum | FellowshipReferendaCall_one_fewer_deciding | FellowshipReferendaCall_place_decision_deposit | FellowshipReferendaCall_refund_decision_deposit | FellowshipReferendaCall_submit + +/** + * Cancel an ongoing referendum. + * + * - `origin`: must be the `CancelOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Cancelled`. + */ +export interface FellowshipReferendaCall_cancel { + __kind: 'cancel' + index: number +} + +/** + * Cancel an ongoing referendum and slash the deposits. + * + * - `origin`: must be the `KillOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Killed` and `DepositSlashed`. + */ +export interface FellowshipReferendaCall_kill { + __kind: 'kill' + index: number +} + +/** + * Advance a referendum onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `index`: the referendum to be advanced. + */ +export interface FellowshipReferendaCall_nudge_referendum { + __kind: 'nudge_referendum' + index: number +} + +/** + * Advance a track onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `track`: the track to be advanced. + * + * Action item for when there is now one fewer referendum in the deciding phase and the + * `DecidingCount` is not yet updated. This means that we should either: + * - begin deciding another referendum (and leave `DecidingCount` alone); or + * - decrement `DecidingCount`. + */ +export interface FellowshipReferendaCall_one_fewer_deciding { + __kind: 'one_fewer_deciding' + track: number +} + +/** + * Post the Decision Deposit for a referendum. + * + * - `origin`: must be `Signed` and the account must have funds available for the + * referendum's track's Decision Deposit. + * - `index`: The index of the submitted referendum whose Decision Deposit is yet to be + * posted. + * + * Emits `DecisionDepositPlaced`. + */ +export interface FellowshipReferendaCall_place_decision_deposit { + __kind: 'place_decision_deposit' + index: number +} + +/** + * Refund the Decision Deposit for a closed referendum back to the depositor. + * + * - `origin`: must be `Signed` or `Root`. + * - `index`: The index of a closed referendum whose Decision Deposit has not yet been + * refunded. + * + * Emits `DecisionDepositRefunded`. + */ +export interface FellowshipReferendaCall_refund_decision_deposit { + __kind: 'refund_decision_deposit' + index: number +} + +/** + * Propose a referendum on a privileged action. + * + * - `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds + * available. + * - `proposal_origin`: The origin from which the proposal should be executed. + * - `proposal`: The proposal. + * - `enactment_moment`: The moment that the proposal should be enacted. + * + * Emits `Submitted`. + */ +export interface FellowshipReferendaCall_submit { + __kind: 'submit' + proposalOrigin: OriginCaller + proposal: Bounded + enactmentMoment: DispatchTime +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const FellowshipCollectiveCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: MultiAddress, + }), + cleanup_poll: sts.enumStruct({ + pollIndex: sts.number(), + max: sts.number(), + }), + demote_member: sts.enumStruct({ + who: MultiAddress, + }), + promote_member: sts.enumStruct({ + who: MultiAddress, + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + minRank: sts.number(), + }), + vote: sts.enumStruct({ + poll: sts.number(), + aye: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type FellowshipCollectiveCall = FellowshipCollectiveCall_add_member | FellowshipCollectiveCall_cleanup_poll | FellowshipCollectiveCall_demote_member | FellowshipCollectiveCall_promote_member | FellowshipCollectiveCall_remove_member | FellowshipCollectiveCall_vote + +/** + * Introduce a new member. + * + * - `origin`: Must be the `AdminOrigin`. + * - `who`: Account of non-member which will become a member. + * - `rank`: The rank to give the new member. + * + * Weight: `O(1)` + */ +export interface FellowshipCollectiveCall_add_member { + __kind: 'add_member' + who: MultiAddress +} + +/** + * Remove votes from the given poll. It must have ended. + * + * - `origin`: Must be `Signed` by any account. + * - `poll_index`: Index of a poll which is completed and for which votes continue to + * exist. + * - `max`: Maximum number of vote items from remove in this call. + * + * Transaction fees are waived if the operation is successful. + * + * Weight `O(max)` (less if there are fewer items to remove than `max`). + */ +export interface FellowshipCollectiveCall_cleanup_poll { + __kind: 'cleanup_poll' + pollIndex: number + max: number +} + +/** + * Decrement the rank of an existing member by one. If the member is already at rank zero, + * then they are removed entirely. + * + * - `origin`: Must be the `AdminOrigin`. + * - `who`: Account of existing member of rank greater than zero. + * + * Weight: `O(1)`, less if the member's index is highest in its rank. + */ +export interface FellowshipCollectiveCall_demote_member { + __kind: 'demote_member' + who: MultiAddress +} + +/** + * Increment the rank of an existing member by one. + * + * - `origin`: Must be the `AdminOrigin`. + * - `who`: Account of existing member. + * + * Weight: `O(1)` + */ +export interface FellowshipCollectiveCall_promote_member { + __kind: 'promote_member' + who: MultiAddress +} + +/** + * Remove the member entirely. + * + * - `origin`: Must be the `AdminOrigin`. + * - `who`: Account of existing member of rank greater than zero. + * - `min_rank`: The rank of the member or greater. + * + * Weight: `O(min_rank)`. + */ +export interface FellowshipCollectiveCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + minRank: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * - `origin`: Must be `Signed` by a member account. + * - `poll`: Index of a poll which is ongoing. + * - `aye`: `true` if the vote is to approve the proposal, `false` otherwise. + * + * Transaction fees are be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * + * Weight: `O(1)`, less if there was no previous vote on the poll by the member. + */ +export interface FellowshipCollectiveCall_vote { + __kind: 'vote' + poll: number + aye: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const FastUnstakeCall: sts.Type = sts.closedEnum(() => { + return { + control: sts.enumStruct({ + uncheckedErasToCheck: sts.number(), + }), + deregister: sts.unit(), + register_fast_unstake: sts.unit(), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type FastUnstakeCall = FastUnstakeCall_control | FastUnstakeCall_deregister | FastUnstakeCall_register_fast_unstake + +/** + * Control the operation of this pallet. + * + * Dispatch origin must be signed by the [`Config::ControlOrigin`]. + */ +export interface FastUnstakeCall_control { + __kind: 'control' + uncheckedErasToCheck: number +} + +/** + * Deregister oneself from the fast-unstake. + * + * This is useful if one is registered, they are still waiting, and they change their mind. + * + * Note that the associated stash is still fully unbonded and chilled as a consequence of + * calling `register_fast_unstake`. This should probably be followed by a call to + * `Staking::rebond`. + */ +export interface FastUnstakeCall_deregister { + __kind: 'deregister' +} + +/** + * Register oneself for fast-unstake. + * + * The dispatch origin of this call must be signed by the controller account, similar to + * `staking::unbond`. + * + * The stash associated with the origin must have no ongoing unlocking chunks. If + * successful, this will fully unbond and chill the stash. Then, it will enqueue the stash + * to be checked in further blocks. + * + * If by the time this is called, the stash is actually eligible for fast-unstake, then + * they are guaranteed to remain eligible, because the call will chill them as well. + * + * If the check works, the entire staking data is removed, i.e. the stash is fully + * unstaked. + * + * If the check fails, the stash remains chilled and waiting for being unbonded as in with + * the normal staking system, but they lose part of their unbonding chunks due to consuming + * the chain's resources. + */ +export interface FastUnstakeCall_register_fast_unstake { + __kind: 'register_fast_unstake' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + governance_fallback: sts.enumStruct({ + maybeMaxVoters: sts.option(() => sts.number()), + maybeMaxTargets: sts.option(() => sts.number()), + }), + set_emergency_election_result: sts.enumStruct({ + supports: sts.array(() => sts.tuple(() => [AccountId32, Support])), + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => ElectionScore), + }), + submit: sts.enumStruct({ + rawSolution: RawSolution, + }), + submit_unsigned: sts.enumStruct({ + rawSolution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export const RawSolution: sts.Type = sts.struct(() => { + return { + solution: NposCompactSolution24, + score: ElectionScore, + round: sts.number(), + } +}) + +export const NposCompactSolution24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), + votes2: sts.array(() => sts.tuple(() => [sts.number(), sts.tuple(() => [sts.number(), sts.number()]), sts.number()])), + votes3: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes4: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes5: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes6: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes7: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes8: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes9: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes10: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes11: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes12: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes13: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes14: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes15: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes16: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes17: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes18: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes19: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes20: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes21: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes22: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes23: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes24: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + } +}) + +export interface NposCompactSolution24 { + votes1: [number, number][] + votes2: [number, [number, number], number][] + votes3: [number, [number, number][], number][] + votes4: [number, [number, number][], number][] + votes5: [number, [number, number][], number][] + votes6: [number, [number, number][], number][] + votes7: [number, [number, number][], number][] + votes8: [number, [number, number][], number][] + votes9: [number, [number, number][], number][] + votes10: [number, [number, number][], number][] + votes11: [number, [number, number][], number][] + votes12: [number, [number, number][], number][] + votes13: [number, [number, number][], number][] + votes14: [number, [number, number][], number][] + votes15: [number, [number, number][], number][] + votes16: [number, [number, number][], number][] + votes17: [number, [number, number][], number][] + votes18: [number, [number, number][], number][] + votes19: [number, [number, number][], number][] + votes20: [number, [number, number][], number][] + votes21: [number, [number, number][], number][] + votes22: [number, [number, number][], number][] + votes23: [number, [number, number][], number][] + votes24: [number, [number, number][], number][] +} + +export interface RawSolution { + solution: NposCompactSolution24 + score: ElectionScore + round: number +} + +export interface ElectionScore { + minimalStake: bigint + sumStake: bigint + sumStakeSquared: bigint +} + +export const ElectionScore: sts.Type = sts.struct(() => { + return { + minimalStake: sts.bigint(), + sumStake: sts.bigint(), + sumStakeSquared: sts.bigint(), + } +}) + +export const Support: sts.Type = sts.struct(() => { + return { + total: sts.bigint(), + voters: sts.array(() => sts.tuple(() => [AccountId32, sts.bigint()])), + } +}) + +export interface Support { + total: bigint + voters: [AccountId32, bigint][] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_governance_fallback | ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * Trigger the governance fallback. + * + * This can only be called when [`Phase::Emergency`] is enabled, as an alternative to + * calling [`Call::set_emergency_election_result`]. + */ +export interface ElectionProviderMultiPhaseCall_governance_fallback { + __kind: 'governance_fallback' + maybeMaxVoters?: (number | undefined) + maybeMaxTargets?: (number | undefined) +} + +/** + * Set a solution in the queue, to be handed out to the client of this pallet in the next + * call to `ElectionProvider::elect`. + * + * This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`. + * + * The solution is not checked for any feasibility and is assumed to be trustworthy, as any + * feasibility check itself can in principle cause the election process to fail (due to + * memory/weight constrains). + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + supports: [AccountId32, Support][] +} + +/** + * Set a new value for `MinimumUntrustedScore`. + * + * Dispatch origin must be aligned with `T::ForceOrigin`. + * + * This check can be turned off by setting the value to `None`. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (ElectionScore | undefined) +} + +/** + * Submit a solution for the signed phase. + * + * The dispatch origin fo this call must be __signed__. + * + * The solution is potentially queued, based on the claimed score and processed at the end + * of the signed phase. + * + * A deposit is reserved and recorded for the solution. Based on the outcome, the solution + * might be rewarded, slashed, or get all or a part of the deposit back. + */ +export interface ElectionProviderMultiPhaseCall_submit { + __kind: 'submit' + rawSolution: RawSolution +} + +/** + * Submit a solution for the unsigned phase. + * + * The dispatch origin fo this call must be __none__. + * + * This submission is checked on the fly. Moreover, this unsigned solution is only + * validated when submitted to the pool from the **local** node. Effectively, this means + * that only active validators can submit this transaction when authoring a block (similar + * to an inherent). + * + * To prevent any incorrect solution (and thus wasted time/weight), this transaction will + * panic if the solution submitted by the validator is invalid in any way, effectively + * putting their authoring reward at risk. + * + * No deposit or reward is associated with this submission. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + rawSolution: RawSolution + witness: SolutionOrSnapshotSize +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DmpCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + blacklist: sts.enumStruct({ + proposalHash: H256, + maybeRefIndex: sts.option(() => sts.number()), + }), + cancel_proposal: sts.enumStruct({ + propIndex: sts.number(), + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: MultiAddress, + conviction: Conviction, + balance: sts.bigint(), + }), + emergency_cancel: sts.enumStruct({ + refIndex: sts.number(), + }), + external_propose: sts.enumStruct({ + proposal: Bounded, + }), + external_propose_default: sts.enumStruct({ + proposal: Bounded, + }), + external_propose_majority: sts.enumStruct({ + proposal: Bounded, + }), + fast_track: sts.enumStruct({ + proposalHash: H256, + votingPeriod: sts.number(), + delay: sts.number(), + }), + propose: sts.enumStruct({ + proposal: Bounded, + value: sts.bigint(), + }), + remove_other_vote: sts.enumStruct({ + target: MultiAddress, + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + index: sts.number(), + }), + second: sts.enumStruct({ + proposal: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: MultiAddress, + }), + veto_external: sts.enumStruct({ + proposalHash: H256, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface AccountVote_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DemocracyCall = DemocracyCall_blacklist | DemocracyCall_cancel_proposal | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_propose | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. + * + * If called on a queued public or external proposal, then this will result in it being + * removed. If the `ref_index` supplied is an active referendum with the proposal hash, + * then it will be cancelled. + * + * The dispatch origin of this call must be `BlacklistOrigin`. + * + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. + * + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). + */ +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: H256 + maybeRefIndex?: (number | undefined) +} + +/** + * Remove a proposal. + * + * The dispatch origin of this call must be `CancelProposalOrigin`. + * + * - `prop_index`: The index of the proposal to cancel. + * + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must not + * be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: MultiAddress + conviction: Conviction + balance: bigint +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: number +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposal: Bounded +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposal: Bounded +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposal: Bounded +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * Must be always greater than zero. + * For `FastTrackOrigin` must be equal or greater than `FastTrackVotingPeriod`. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: H256 + votingPeriod: number + delay: number +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposal: Bounded + value: bigint +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: MultiAddress + index: number +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: number +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: MultiAddress +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * Weight: `O(V + log(V))` where V is number of `existing vetoers` + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: H256 +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: Id, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + contribute_all: sts.enumStruct({ + index: sts.number(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: Id, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId32, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_contribute_all | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * Add an optional memo to an existing crowdloan contribution. + * + * Origin must be Signed, and the user must have contributed to the crowdloan. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: Id + memo: Bytes +} + +/** + * Contribute to a crowd sale. This will transfer some balance over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * Contribute your entire balance to a crowd sale. This will transfer the entire balance of a user over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute_all { + __kind: 'contribute_all' + index: number + signature?: (MultiSignature | undefined) +} + +/** + * Create a new crowdloaning campaign for a parachain slot with the given lease period range. + * + * This applies a lock to your parachain configuration, ensuring that it cannot be changed + * by the parachain manager. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Remove a fund after the retirement period has ended and all funds have been returned. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * Edit the configuration for an in-progress crowdloan. + * + * Can only be called by Root origin. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Poke the fund into `NewRaise` + * + * Origin must be Signed, and the fund has non-zero raise. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: Id +} + +/** + * Automatically refund contributors of an ended crowdloan. + * Due to weight restrictions, this function may need to be called multiple + * times to fully refund all users. We will refund `RemoveKeysLimit` users at a time. + * + * Origin must be signed, but can come from anyone. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * Withdraw full balance of a specific contributor. + * + * Origin must be signed, but can come from anyone. + * + * The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement + * flag must be set. For a fund to be ready for retirement, then: + * - it must not already be in retirement; + * - the amount of raised funds must be bigger than the _free_ balance of the account; + * - and either: + * - the block number must be at least `end`; or + * - the current lease period must be greater than the fund's `last_period`. + * + * In this case, the fund's retirement flag is set and its `end` is reset to the current block + * number. + * + * - `who`: The account whose contribution should be withdrawn. + * - `index`: The parachain to whose crowdloan the contribution was made. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: Weight, + lengthBound: sts.number(), + }), + close_old_weight: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CouncilCall = CouncilCall_close | CouncilCall_close_old_weight | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: Weight + lengthBound: number +} + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close_old_weight { + __kind: 'close_old_weight' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ConvictionVotingCall: sts.Type = sts.closedEnum(() => { + return { + delegate: sts.enumStruct({ + class: sts.number(), + to: MultiAddress, + conviction: Type_146, + balance: sts.bigint(), + }), + remove_other_vote: sts.enumStruct({ + target: MultiAddress, + class: sts.number(), + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + class: sts.option(() => sts.number()), + index: sts.number(), + }), + undelegate: sts.enumStruct({ + class: sts.number(), + }), + unlock: sts.enumStruct({ + class: sts.number(), + target: MultiAddress, + }), + vote: sts.enumStruct({ + pollIndex: sts.number(), + vote: Type_144, + }), + } +}) + +export const Type_144: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + SplitAbstain: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + abstain: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type Type_144 = Type_144_Split | Type_144_SplitAbstain | Type_144_Standard + +export interface Type_144_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface Type_144_SplitAbstain { + __kind: 'SplitAbstain' + aye: bigint + nay: bigint + abstain: bigint +} + +export interface Type_144_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Type_146: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Type_146 = Type_146_Locked1x | Type_146_Locked2x | Type_146_Locked3x | Type_146_Locked4x | Type_146_Locked5x | Type_146_Locked6x | Type_146_None + +export interface Type_146_Locked1x { + __kind: 'Locked1x' +} + +export interface Type_146_Locked2x { + __kind: 'Locked2x' +} + +export interface Type_146_Locked3x { + __kind: 'Locked3x' +} + +export interface Type_146_Locked4x { + __kind: 'Locked4x' +} + +export interface Type_146_Locked5x { + __kind: 'Locked5x' +} + +export interface Type_146_Locked6x { + __kind: 'Locked6x' +} + +export interface Type_146_None { + __kind: 'None' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ConvictionVotingCall = ConvictionVotingCall_delegate | ConvictionVotingCall_remove_other_vote | ConvictionVotingCall_remove_vote | ConvictionVotingCall_undelegate | ConvictionVotingCall_unlock | ConvictionVotingCall_vote + +/** + * Delegate the voting power (with some given conviction) of the sending account for a + * particular class of polls. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `class`: The class of polls to delegate. To delegate multiple classes, multiple calls + * to this function are required. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must not + * be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of polls the voter delegating to has + * voted on. Weight is initially charged as if maximum votes, but is refunded later. + */ +export interface ConvictionVotingCall_delegate { + __kind: 'delegate' + class: number + to: MultiAddress + conviction: Type_146 + balance: bigint +} + +/** + * Remove a vote for a poll. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the poll was cancelled, because the voter lost the poll or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for poll + * `index`. + * - `index`: The index of poll of the vote to be removed. + * - `class`: The class of the poll. + * + * Weight: `O(R + log R)` where R is the number of polls that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface ConvictionVotingCall_remove_other_vote { + __kind: 'remove_other_vote' + target: MultiAddress + class: number + index: number +} + +/** + * Remove a vote for a poll. + * + * If: + * - the poll was cancelled, or + * - the poll is ongoing, or + * - the poll has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the poll has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for poll `index`. + * + * - `index`: The index of poll of the vote to be removed. + * - `class`: Optional parameter, if given it indicates the class of the poll. For polls + * which have finished or are cancelled, this must be `Some`. + * + * Weight: `O(R + log R)` where R is the number of polls that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface ConvictionVotingCall_remove_vote { + __kind: 'remove_vote' + class?: (number | undefined) + index: number +} + +/** + * Undelegate the voting power of the sending account for a particular class of polls. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued has passed. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * - `class`: The class of polls to remove the delegation from. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of polls the voter delegating to has + * voted on. Weight is initially charged as if maximum votes, but is refunded later. + */ +export interface ConvictionVotingCall_undelegate { + __kind: 'undelegate' + class: number +} + +/** + * Remove the lock caused by prior voting/delegating which has expired within a particular + * class. + * + * The dispatch origin of this call must be _Signed_. + * + * - `class`: The class of polls to unlock. + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface ConvictionVotingCall_unlock { + __kind: 'unlock' + class: number + target: MultiAddress +} + +/** + * Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `poll_index`: The index of the poll to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of polls the voter has voted on. + */ +export interface ConvictionVotingCall_vote { + __kind: 'vote' + pollIndex: number + vote: Type_144 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_bypass_consistency_check: sts.enumStruct({ + new: sts.boolean(), + }), + set_chain_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_code_retention_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_conclusion_by_time_out_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_max_spam_slots: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: sts.number(), + }), + set_group_rotation_frequency: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_minimum_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_cores: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_retries: sts.enumStruct({ + new: sts.number(), + }), + set_pvf_checking_enabled: sts.enumStruct({ + new: sts.boolean(), + }), + set_pvf_voting_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_thread_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_ump_max_individual_weight: sts.enumStruct({ + new: Weight, + }), + set_ump_service_total_weight: sts.enumStruct({ + new: Weight, + }), + set_validation_upgrade_cooldown: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ConfigurationCall = ConfigurationCall_set_bypass_consistency_check | ConfigurationCall_set_chain_availability_period | ConfigurationCall_set_code_retention_period | ConfigurationCall_set_dispute_conclusion_by_time_out_period | ConfigurationCall_set_dispute_max_spam_slots | ConfigurationCall_set_dispute_period | ConfigurationCall_set_dispute_post_conclusion_acceptance_period | ConfigurationCall_set_group_rotation_frequency | ConfigurationCall_set_hrmp_channel_max_capacity | ConfigurationCall_set_hrmp_channel_max_message_size | ConfigurationCall_set_hrmp_channel_max_total_size | ConfigurationCall_set_hrmp_max_message_num_per_candidate | ConfigurationCall_set_hrmp_max_parachain_inbound_channels | ConfigurationCall_set_hrmp_max_parachain_outbound_channels | ConfigurationCall_set_hrmp_max_parathread_inbound_channels | ConfigurationCall_set_hrmp_max_parathread_outbound_channels | ConfigurationCall_set_hrmp_open_request_ttl | ConfigurationCall_set_hrmp_recipient_deposit | ConfigurationCall_set_hrmp_sender_deposit | ConfigurationCall_set_max_code_size | ConfigurationCall_set_max_downward_message_size | ConfigurationCall_set_max_head_data_size | ConfigurationCall_set_max_pov_size | ConfigurationCall_set_max_upward_message_num_per_candidate | ConfigurationCall_set_max_upward_message_size | ConfigurationCall_set_max_upward_queue_count | ConfigurationCall_set_max_upward_queue_size | ConfigurationCall_set_max_validators | ConfigurationCall_set_max_validators_per_core | ConfigurationCall_set_minimum_validation_upgrade_delay | ConfigurationCall_set_n_delay_tranches | ConfigurationCall_set_needed_approvals | ConfigurationCall_set_no_show_slots | ConfigurationCall_set_parathread_cores | ConfigurationCall_set_parathread_retries | ConfigurationCall_set_pvf_checking_enabled | ConfigurationCall_set_pvf_voting_ttl | ConfigurationCall_set_relay_vrf_modulo_samples | ConfigurationCall_set_scheduling_lookahead | ConfigurationCall_set_thread_availability_period | ConfigurationCall_set_ump_max_individual_weight | ConfigurationCall_set_ump_service_total_weight | ConfigurationCall_set_validation_upgrade_cooldown | ConfigurationCall_set_validation_upgrade_delay | ConfigurationCall_set_zeroth_delay_tranche_width + +/** + * Setting this to true will disable consistency checks for the configuration setters. + * Use with caution. + */ +export interface ConfigurationCall_set_bypass_consistency_check { + __kind: 'set_bypass_consistency_check' + new: boolean +} + +/** + * Set the availability period for parachains. + */ +export interface ConfigurationCall_set_chain_availability_period { + __kind: 'set_chain_availability_period' + new: number +} + +/** + * Set the acceptance period for an included candidate. + */ +export interface ConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: number +} + +/** + * Set the dispute conclusion by time out period. + */ +export interface ConfigurationCall_set_dispute_conclusion_by_time_out_period { + __kind: 'set_dispute_conclusion_by_time_out_period' + new: number +} + +/** + * Set the maximum number of dispute spam slots. + */ +export interface ConfigurationCall_set_dispute_max_spam_slots { + __kind: 'set_dispute_max_spam_slots' + new: number +} + +/** + * Set the dispute period, in number of sessions to keep for disputes. + */ +export interface ConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: number +} + +/** + * Set the dispute post conclusion acceptance period. + */ +export interface ConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: number +} + +/** + * Set the parachain validator-group rotation frequency + */ +export interface ConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: number +} + +/** + * Sets the maximum number of messages allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * Sets the maximum size of a message that could ever be put into an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * Sets the maximum total size of messages in bytes allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * Sets the maximum number of outbound HRMP messages can be sent by a candidate. + */ +export interface ConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parachain is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parachain is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parathread is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_inbound_channels { + __kind: 'set_hrmp_max_parathread_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parathread is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_outbound_channels { + __kind: 'set_hrmp_max_parathread_outbound_channels' + new: number +} + +/** + * Sets the number of sessions after which an HRMP open channel request expires. + */ +export interface ConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * Sets the amount of funds that the recipient should provide for accepting opening an HRMP + * channel. + */ +export interface ConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: bigint +} + +/** + * Sets the amount of funds that the sender should provide for opening an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: bigint +} + +/** + * Set the max validation code size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * Set the critical downward message size. + */ +export interface ConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * Set the max head data size for paras. + */ +export interface ConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * Set the max POV block size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * Sets the maximum number of messages that a candidate can contain. + */ +export interface ConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum size of an upward message that can be sent by a candidate. + */ +export interface ConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * Sets the maximum items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * Sets the maximum total size of items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * Set the maximum number of validators to use in parachain consensus. + */ +export interface ConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * Set the maximum number of validators to assign to any core. + */ +export interface ConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * Sets the minimum delay between announcing the upgrade block for a parachain until the + * upgrade taking place. + * + * See the field documentation for information and constraints for the new value. + */ +export interface ConfigurationCall_set_minimum_validation_upgrade_delay { + __kind: 'set_minimum_validation_upgrade_delay' + new: number +} + +/** + * Set the total number of delay tranches. + */ +export interface ConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * Set the number of validators needed to approve a block. + */ +export interface ConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * Set the no show slots, in number of number of consensus slots. + * Must be at least 1. + */ +export interface ConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * Set the number of parathread execution cores. + */ +export interface ConfigurationCall_set_parathread_cores { + __kind: 'set_parathread_cores' + new: number +} + +/** + * Set the number of retries for a particular parathread. + */ +export interface ConfigurationCall_set_parathread_retries { + __kind: 'set_parathread_retries' + new: number +} + +/** + * Enable or disable PVF pre-checking. Consult the field documentation prior executing. + */ +export interface ConfigurationCall_set_pvf_checking_enabled { + __kind: 'set_pvf_checking_enabled' + new: boolean +} + +/** + * Set the number of session changes after which a PVF pre-checking voting is rejected. + */ +export interface ConfigurationCall_set_pvf_voting_ttl { + __kind: 'set_pvf_voting_ttl' + new: number +} + +/** + * Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion. + */ +export interface ConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * Set the scheduling lookahead, in expected number of blocks at peak throughput. + */ +export interface ConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * Set the availability period for parathreads. + */ +export interface ConfigurationCall_set_thread_availability_period { + __kind: 'set_thread_availability_period' + new: number +} + +/** + * Sets the maximum amount of weight any individual upward message may consume. + */ +export interface ConfigurationCall_set_ump_max_individual_weight { + __kind: 'set_ump_max_individual_weight' + new: Weight +} + +/** + * Sets the soft limit for the phase of dispatching dispatchable upward messages. + */ +export interface ConfigurationCall_set_ump_service_total_weight { + __kind: 'set_ump_service_total_weight' + new: Weight +} + +/** + * Set the validation upgrade cooldown. + */ +export interface ConfigurationCall_set_validation_upgrade_cooldown { + __kind: 'set_validation_upgrade_cooldown' + new: number +} + +/** + * Set the validation upgrade delay. + */ +export interface ConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: number +} + +/** + * Set the zeroth delay tranche width. + */ +export interface ConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: sts.bigint(), + vestingSchedule: sts.option(() => sts.tuple(() => [sts.bigint(), sts.bigint(), sts.number()])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId32), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId32 + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId32 + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: bigint + vestingSchedule?: ([bigint, bigint, number] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId32 | undefined) +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ChildBountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + add_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + value: sts.bigint(), + description: sts.bytes(), + }), + award_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + close_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + propose_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ChildBountiesCall = ChildBountiesCall_accept_curator | ChildBountiesCall_add_child_bounty | ChildBountiesCall_award_child_bounty | ChildBountiesCall_claim_child_bounty | ChildBountiesCall_close_child_bounty | ChildBountiesCall_propose_curator | ChildBountiesCall_unassign_curator + +/** + * Accept the curator role for the child-bounty. + * + * The dispatch origin for this call must be the curator of this + * child-bounty. + * + * A deposit will be reserved from the curator and refund upon + * successful payout or cancellation. + * + * Fee for curator is deducted from curator fee of parent bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in "CuratorProposed" state, for processing the + * call. And state of child-bounty is moved to "Active" on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_accept_curator { + __kind: 'accept_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Add a new child-bounty. + * + * The dispatch origin for this call must be the curator of parent + * bounty and the parent bounty must be in "active" state. + * + * Child-bounty gets added successfully & fund gets transferred from + * parent bounty to child-bounty account, if parent bounty has enough + * funds, else the call fails. + * + * Upper bound to maximum number of active child bounties that can be + * added are managed via runtime trait config + * [`Config::MaxActiveChildBountyCount`]. + * + * If the call is success, the status of child-bounty is updated to + * "Added". + * + * - `parent_bounty_id`: Index of parent bounty for which child-bounty is being added. + * - `value`: Value for executing the proposal. + * - `description`: Text description for the child-bounty. + */ +export interface ChildBountiesCall_add_child_bounty { + __kind: 'add_child_bounty' + parentBountyId: number + value: bigint + description: Bytes +} + +/** + * Award child-bounty to a beneficiary. + * + * The beneficiary will be able to claim the funds after a delay. + * + * The dispatch origin for this call must be the parent curator or + * curator of this child-bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in active state, for processing the call. And + * state of child-bounty is moved to "PendingPayout" on successful call + * completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + * - `beneficiary`: Beneficiary account. + */ +export interface ChildBountiesCall_award_child_bounty { + __kind: 'award_child_bounty' + parentBountyId: number + childBountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded child-bounty after payout delay. + * + * The dispatch origin for this call may be any signed origin. + * + * Call works independent of parent bounty state, No need for parent + * bounty to be in active state. + * + * The Beneficiary is paid out with agreed bounty value. Curator fee is + * paid & curator deposit is unreserved. + * + * Child-bounty must be in "PendingPayout" state, for processing the + * call. And instance of child-bounty is removed from the state on + * successful call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_claim_child_bounty { + __kind: 'claim_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * Cancel a proposed or active child-bounty. Child-bounty account funds + * are transferred to parent bounty account. The child-bounty curator + * deposit may be unreserved if possible. + * + * The dispatch origin for this call must be either parent curator or + * `T::RejectOrigin`. + * + * If the state of child-bounty is `Active`, curator deposit is + * unreserved. + * + * If the state of child-bounty is `PendingPayout`, call fails & + * returns `PendingPayout` error. + * + * For the origin other than T::RejectOrigin, parent bounty must be in + * active state, for this child-bounty call to work. For origin + * T::RejectOrigin execution is forced. + * + * Instance of child-bounty is removed from the state on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_close_child_bounty { + __kind: 'close_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * Propose curator for funded child-bounty. + * + * The dispatch origin for this call must be curator of parent bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in "Added" state, for processing the call. And + * state of child-bounty is moved to "CuratorProposed" on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + * - `curator`: Address of child-bounty curator. + * - `fee`: payment fee to child-bounty curator for execution. + */ +export interface ChildBountiesCall_propose_curator { + __kind: 'propose_curator' + parentBountyId: number + childBountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a child-bounty. + * + * The dispatch origin for this call can be either `RejectOrigin`, or + * the curator of the parent bounty, or any signed origin. + * + * For the origin other than T::RejectOrigin and the child-bounty + * curator, parent bounty must be in active state, for this call to + * work. We allow child-bounty curator and T::RejectOrigin to execute + * this call irrespective of the parent bounty state. + * + * If this function is called by the `RejectOrigin` or the + * parent bounty curator, we assume that the child-bounty curator is + * malicious or inactive. As a result, child-bounty curator deposit is + * slashed. + * + * If the origin is the child-bounty curator, we take this as a sign + * that they are unable to do their job, and are willingly giving up. + * We could slash the deposit, but for now we allow them to unreserve + * their deposit and exit without issue. (We may want to change this if + * it is abused.) + * + * Finally, the origin can be anyone iff the child-bounty curator is + * "inactive". Expiry update due of parent bounty is used to estimate + * inactive state of child-bounty curator. + * + * This allows anyone in the community to call out that a child-bounty + * curator is not doing their due diligence, and we should pick a new + * one. In this case the child-bounty curator deposit is slashed. + * + * State of child-bounty is moved to Added state on successful call + * completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_unassign_curator { + __kind: 'unassign_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds + * after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is + * malicious or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_force_unreserve | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_all | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is not + * assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * Unreserve some balance from a user by force. + * + * Can only be called by ROOT. + */ +export interface BalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also alter the total issuance of the system (`TotalIssuance`) appropriately. + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: MultiAddress + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for input config + * types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex + * computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional check + * that the transfer will not kill the origin account. + * --------------------------------- + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: MultiAddress + value: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). # + * - O(1). Just like transfer, but reading the user's transferable balance first. + * # + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const EquivocationProof: sts.Type = sts.struct(() => { + return { + offender: sts.bytes(), + slot: Slot, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Slot = sts.bigint() + +export interface EquivocationProof { + offender: Bytes + slot: Slot + firstHeader: Header + secondHeader: Header +} + +export type Slot = bigint + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V1: sts.enumStruct({ + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + }), + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type NextConfigDescriptor = NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Plan an epoch config change. The epoch config change is recorded and will be enacted on + * the next call to `enact_epoch_change`. The config will be activated one epoch after. + * Multiple calls to this method will replace any existing planned config change that had + * not been enacted yet. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Cancel an in-progress auction. + * + * Can only be called by Root origin. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +export type Call = Call_Auctions | Call_Authorship | Call_Babe | Call_Balances | Call_Bounties | Call_ChildBounties | Call_Claims | Call_Configuration | Call_ConvictionVoting | Call_Council | Call_Crowdloan | Call_Democracy | Call_Dmp | Call_ElectionProviderMultiPhase | Call_FastUnstake | Call_FellowshipCollective | Call_FellowshipReferenda | Call_Grandpa | Call_Hrmp | Call_Identity | Call_ImOnline | Call_Indices | Call_Initializer | Call_Multisig | Call_Nis | Call_NisCounterpartBalances | Call_NominationPools | Call_ParaInclusion | Call_ParaInherent | Call_Paras | Call_ParasDisputes | Call_ParasShared | Call_PhragmenElection | Call_Preimage | Call_Proxy | Call_Recovery | Call_Referenda | Call_Registrar | Call_Scheduler | Call_Session | Call_Slots | Call_Society | Call_Staking | Call_System | Call_TechnicalCommittee | Call_TechnicalMembership | Call_Timestamp | Call_Tips | Call_Treasury | Call_Ump | Call_Utility | Call_Vesting | Call_VoterList | Call_Whitelist | Call_XcmPallet + +export interface Call_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Call_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Call_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Call_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Call_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Call_ChildBounties { + __kind: 'ChildBounties' + value: ChildBountiesCall +} + +export interface Call_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Call_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Call_ConvictionVoting { + __kind: 'ConvictionVoting' + value: ConvictionVotingCall +} + +export interface Call_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Call_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Call_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Call_Dmp { + __kind: 'Dmp' + value: DmpCall +} + +export interface Call_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Call_FastUnstake { + __kind: 'FastUnstake' + value: FastUnstakeCall +} + +export interface Call_FellowshipCollective { + __kind: 'FellowshipCollective' + value: FellowshipCollectiveCall +} + +export interface Call_FellowshipReferenda { + __kind: 'FellowshipReferenda' + value: FellowshipReferendaCall +} + +export interface Call_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Call_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Call_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Call_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Call_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Call_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Call_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Call_Nis { + __kind: 'Nis' + value: NisCall +} + +export interface Call_NisCounterpartBalances { + __kind: 'NisCounterpartBalances' + value: NisCounterpartBalancesCall +} + +export interface Call_NominationPools { + __kind: 'NominationPools' + value: NominationPoolsCall +} + +export interface Call_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Call_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Call_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Call_ParasDisputes { + __kind: 'ParasDisputes' + value: ParasDisputesCall +} + +export interface Call_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Call_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Call_Preimage { + __kind: 'Preimage' + value: PreimageCall +} + +export interface Call_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Call_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Call_Referenda { + __kind: 'Referenda' + value: ReferendaCall +} + +export interface Call_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Call_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Call_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Call_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Call_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Call_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Call_System { + __kind: 'System' + value: SystemCall +} + +export interface Call_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Call_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Call_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Call_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Call_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Call_Ump { + __kind: 'Ump' + value: UmpCall +} + +export interface Call_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Call_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Call_VoterList { + __kind: 'VoterList' + value: VoterListCall +} + +export interface Call_Whitelist { + __kind: 'Whitelist' + value: WhitelistCall +} + +export interface Call_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Society: sts.unit(), + Staking: sts.unit(), + } +}) + +export const MultiAddress: sts.Type = sts.closedEnum(() => { + return { + Address20: sts.bytes(), + Address32: sts.bytes(), + Id: AccountId32, + Index: sts.unit(), + Raw: sts.bytes(), + } +}) diff --git a/squid/src/types/v9350.ts b/squid/src/types/v9350.ts new file mode 100644 index 00000000..8ddec69e --- /dev/null +++ b/squid/src/types/v9350.ts @@ -0,0 +1,13369 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Weight: sts.Type = sts.struct(() => { + return { + refTime: sts.bigint(), + proofSize: sts.bigint(), + } +}) + +export interface Weight { + refTime: bigint + proofSize: bigint +} + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: sts.number(), + index: sts.number(), + } +}) + +export interface Timepoint { + height: number + index: number +} + +export const AccountId32 = sts.bytes() + +export const Call: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + ChildBounties: ChildBountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + ConvictionVoting: ConvictionVotingCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + Dmp: DmpCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + FastUnstake: FastUnstakeCall, + FellowshipCollective: FellowshipCollectiveCall, + FellowshipReferenda: FellowshipReferendaCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Initializer: InitializerCall, + Multisig: MultisigCall, + Nis: NisCall, + NisCounterpartBalances: NisCounterpartBalancesCall, + NominationPools: NominationPoolsCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Paras: ParasCall, + ParasDisputes: ParasDisputesCall, + ParasShared: ParasSharedCall, + PhragmenElection: PhragmenElectionCall, + Preimage: PreimageCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Referenda: ReferendaCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Ump: UmpCall, + Utility: UtilityCall, + Vesting: VestingCall, + VoterList: VoterListCall, + Whitelist: WhitelistCall, + XcmPallet: XcmPalletCall, + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + execute: sts.enumStruct({ + message: Type_424, + maxWeight: sts.bigint(), + }), + force_default_xcm_version: sts.enumStruct({ + maybeXcmVersion: sts.option(() => sts.number()), + }), + force_subscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_unsubscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_xcm_version: sts.enumStruct({ + location: V1MultiLocation, + xcmVersion: sts.number(), + }), + limited_reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + limited_teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + send: sts.enumStruct({ + dest: VersionedMultiLocation, + message: VersionedXcm, + }), + teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + } +}) + +export const VersionedXcm: sts.Type = sts.closedEnum(() => { + return { + V0: V0Xcm, + V1: V1Xcm, + V2: sts.array(() => V2Instruction), + } +}) + +export const V2Instruction: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => V2Instruction), + SetErrorHandler: sts.array(() => V2Instruction), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const DoubleEncoded: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncoded { + encoded: Bytes +} + +export const V0OriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type V0OriginKind = V0OriginKind_Native | V0OriginKind_SovereignAccount | V0OriginKind_Superuser | V0OriginKind_Xcm + +export interface V0OriginKind_Native { + __kind: 'Native' +} + +export interface V0OriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface V0OriginKind_Superuser { + __kind: 'Superuser' +} + +export interface V0OriginKind_Xcm { + __kind: 'Xcm' +} + +export const V2Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V2Error])), + Null: sts.unit(), + Version: sts.number(), + } +}) + +export const V2Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + MaxWeightInvalid: sts.unit(), + MultiLocationFull: sts.unit(), + MultiLocationNotInvertible: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + WeightLimitReached: sts.bigint(), + WeightNotComputable: sts.unit(), + } +}) + +export type V2Error = V2Error_AssetNotFound | V2Error_BadOrigin | V2Error_Barrier | V2Error_DestinationUnsupported | V2Error_ExceedsMaxMessageSize | V2Error_FailedToDecode | V2Error_FailedToTransactAsset | V2Error_InvalidLocation | V2Error_LocationCannotHold | V2Error_MaxWeightInvalid | V2Error_MultiLocationFull | V2Error_MultiLocationNotInvertible | V2Error_NotHoldingFees | V2Error_NotWithdrawable | V2Error_Overflow | V2Error_TooExpensive | V2Error_Transport | V2Error_Trap | V2Error_UnhandledXcmVersion | V2Error_Unimplemented | V2Error_UnknownClaim | V2Error_Unroutable | V2Error_UntrustedReserveLocation | V2Error_UntrustedTeleportLocation | V2Error_WeightLimitReached | V2Error_WeightNotComputable + +export interface V2Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V2Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V2Error_Barrier { + __kind: 'Barrier' +} + +export interface V2Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V2Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V2Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V2Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V2Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V2Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V2Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V2Error_MultiLocationFull { + __kind: 'MultiLocationFull' +} + +export interface V2Error_MultiLocationNotInvertible { + __kind: 'MultiLocationNotInvertible' +} + +export interface V2Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V2Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V2Error_Overflow { + __kind: 'Overflow' +} + +export interface V2Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V2Error_Transport { + __kind: 'Transport' +} + +export interface V2Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V2Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V2Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V2Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V2Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V2Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V2Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: bigint +} + +export interface V2Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V2Response = V2Response_Assets | V2Response_ExecutionResult | V2Response_Null | V2Response_Version + +export interface V2Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V2Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V2Error] | undefined) +} + +export interface V2Response_Null { + __kind: 'Null' +} + +export interface V2Response_Version { + __kind: 'Version' + value: number +} + +export interface V1MultiAsset { + id: V1AssetId + fun: V1Fungibility +} + +export type V1Fungibility = V1Fungibility_Fungible | V1Fungibility_NonFungible + +export interface V1Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V1Fungibility_NonFungible { + __kind: 'NonFungible' + value: V1AssetInstance +} + +export type V1AssetInstance = V1AssetInstance_Array16 | V1AssetInstance_Array32 | V1AssetInstance_Array4 | V1AssetInstance_Array8 | V1AssetInstance_Blob | V1AssetInstance_Index | V1AssetInstance_Undefined + +export interface V1AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V1AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V1AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V1AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V1AssetInstance_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface V1AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V1AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V1AssetId = V1AssetId_Abstract | V1AssetId_Concrete + +export interface V1AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V1AssetId_Concrete { + __kind: 'Concrete' + value: V1MultiLocation +} + +export interface V1MultiLocation { + parents: number + interior: V1Junctions +} + +export type V1Junctions = V1Junctions_Here | V1Junctions_X1 | V1Junctions_X2 | V1Junctions_X3 | V1Junctions_X4 | V1Junctions_X5 | V1Junctions_X6 | V1Junctions_X7 | V1Junctions_X8 + +export interface V1Junctions_Here { + __kind: 'Here' +} + +export interface V1Junctions_X1 { + __kind: 'X1' + value: V1Junction +} + +export interface V1Junctions_X2 { + __kind: 'X2' + value: [V1Junction, V1Junction] +} + +export interface V1Junctions_X3 { + __kind: 'X3' + value: [V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X4 { + __kind: 'X4' + value: [V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X5 { + __kind: 'X5' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X6 { + __kind: 'X6' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X7 { + __kind: 'X7' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X8 { + __kind: 'X8' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export type V1Junction = V1Junction_AccountId32 | V1Junction_AccountIndex64 | V1Junction_AccountKey20 | V1Junction_GeneralIndex | V1Junction_GeneralKey | V1Junction_OnlyChild | V1Junction_PalletInstance | V1Junction_Parachain | V1Junction_Plurality + +export interface V1Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V1Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V1Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V1Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V1Junction_GeneralKey { + __kind: 'GeneralKey' + value: WeakBoundedVec +} + +export interface V1Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V1Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V1Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V1Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0BodyPart = V0BodyPart_AtLeastProportion | V0BodyPart_Fraction | V0BodyPart_Members | V0BodyPart_MoreThanProportion | V0BodyPart_Voice + +export interface V0BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V0BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V0BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Voice { + __kind: 'Voice' +} + +export type V0BodyId = V0BodyId_Executive | V0BodyId_Index | V0BodyId_Judicial | V0BodyId_Legislative | V0BodyId_Named | V0BodyId_Technical | V0BodyId_Unit + +export interface V0BodyId_Executive { + __kind: 'Executive' +} + +export interface V0BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V0BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V0BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V0BodyId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V0BodyId_Technical { + __kind: 'Technical' +} + +export interface V0BodyId_Unit { + __kind: 'Unit' +} + +export type WeakBoundedVec = Bytes + +export type V0NetworkId = V0NetworkId_Any | V0NetworkId_Kusama | V0NetworkId_Named | V0NetworkId_Polkadot + +export interface V0NetworkId_Any { + __kind: 'Any' +} + +export interface V0NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V0NetworkId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V0NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export const V1Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V1Junction, + X2: sts.tuple(() => [V1Junction, V1Junction]), + X3: sts.tuple(() => [V1Junction, V1Junction, V1Junction]), + X4: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction]), + X5: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X6: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X7: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X8: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + } +}) + +export const V1Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: WeakBoundedVec, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export const V0BodyId: sts.Type = sts.closedEnum(() => { + return { + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: WeakBoundedVec, + Technical: sts.unit(), + Unit: sts.unit(), + } +}) + +export const WeakBoundedVec = sts.bytes() + +export const V0NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: WeakBoundedVec, + Polkadot: sts.unit(), + } +}) + +export const V1MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V1MultiAsset), + Wild: V1WildMultiAsset, + } +}) + +export const V1WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllOf: sts.enumStruct({ + id: V1AssetId, + fun: V1WildFungibility, + }), + } +}) + +export const V1WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V1WildFungibility = V1WildFungibility_Fungible | V1WildFungibility_NonFungible + +export interface V1WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V1WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V1AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V1MultiLocation, + } +}) + +export type V1WildMultiAsset = V1WildMultiAsset_All | V1WildMultiAsset_AllOf + +export interface V1WildMultiAsset_All { + __kind: 'All' +} + +export interface V1WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V1AssetId + fun: V1WildFungibility +} + +export type V1MultiAssetFilter = V1MultiAssetFilter_Definite | V1MultiAssetFilter_Wild + +export interface V1MultiAssetFilter_Definite { + __kind: 'Definite' + value: V1MultiAsset[] +} + +export interface V1MultiAssetFilter_Wild { + __kind: 'Wild' + value: V1WildMultiAsset +} + +export const V1MultiAsset: sts.Type = sts.struct(() => { + return { + id: V1AssetId, + fun: V1Fungibility, + } +}) + +export const V1Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V1AssetInstance, + } +}) + +export const V1AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V2Instruction = V2Instruction_BuyExecution | V2Instruction_ClaimAsset | V2Instruction_ClearError | V2Instruction_ClearOrigin | V2Instruction_DepositAsset | V2Instruction_DepositReserveAsset | V2Instruction_DescendOrigin | V2Instruction_ExchangeAsset | V2Instruction_HrmpChannelAccepted | V2Instruction_HrmpChannelClosing | V2Instruction_HrmpNewChannelOpenRequest | V2Instruction_InitiateReserveWithdraw | V2Instruction_InitiateTeleport | V2Instruction_QueryHolding | V2Instruction_QueryResponse | V2Instruction_ReceiveTeleportedAsset | V2Instruction_RefundSurplus | V2Instruction_ReportError | V2Instruction_ReserveAssetDeposited | V2Instruction_SetAppendix | V2Instruction_SetErrorHandler | V2Instruction_SubscribeVersion | V2Instruction_Transact | V2Instruction_TransferAsset | V2Instruction_TransferReserveAsset | V2Instruction_Trap | V2Instruction_UnsubscribeVersion | V2Instruction_WithdrawAsset + +export interface V2Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface V2Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface V2Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V2Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V2Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V2Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface V2Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V2Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V2Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V2Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V2Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface V2Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface V2Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface V2Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V2Instruction_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface V2Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface V2Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V2Instruction[] +} + +export interface V2Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V2Instruction[] +} + +export interface V2Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V2Instruction_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V2Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V2Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V2Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export type V2WeightLimit = V2WeightLimit_Limited | V2WeightLimit_Unlimited + +export interface V2WeightLimit_Limited { + __kind: 'Limited' + value: bigint +} + +export interface V2WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V1Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: V1Xcm, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + } +}) + +export const V1Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => V1Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type V1Order = V1Order_BuyExecution | V1Order_DepositAsset | V1Order_DepositReserveAsset | V1Order_ExchangeAsset | V1Order_InitiateReserveWithdraw | V1Order_InitiateTeleport | V1Order_Noop | V1Order_QueryHolding + +export interface V1Order_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: V1Xcm[] +} + +export interface V1Order_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V1Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V1Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_Noop { + __kind: 'Noop' +} + +export interface V1Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export const V1Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + Version: sts.number(), + } +}) + +export type V1Response = V1Response_Assets | V1Response_Version + +export interface V1Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V1Response_Version { + __kind: 'Version' + value: number +} + +export type V1Xcm = V1Xcm_HrmpChannelAccepted | V1Xcm_HrmpChannelClosing | V1Xcm_HrmpNewChannelOpenRequest | V1Xcm_QueryResponse | V1Xcm_ReceiveTeleportedAsset | V1Xcm_RelayedFrom | V1Xcm_ReserveAssetDeposited | V1Xcm_SubscribeVersion | V1Xcm_Transact | V1Xcm_TransferAsset | V1Xcm_TransferReserveAsset | V1Xcm_UnsubscribeVersion | V1Xcm_WithdrawAsset + +export interface V1Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V1Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V1Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V1Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface V1Xcm_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: V1Xcm +} + +export interface V1Xcm_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V1Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V1Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V1Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Xcm_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V1Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export const V0Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: V0Xcm, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + } +}) + +export const V0Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => V0Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type V0Order = V0Order_BuyExecution | V0Order_DepositAsset | V0Order_DepositReserveAsset | V0Order_ExchangeAsset | V0Order_InitiateReserveWithdraw | V0Order_InitiateTeleport | V0Order_Null | V0Order_QueryHolding + +export interface V0Order_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: V0Xcm[] +} + +export interface V0Order_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface V0Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_Null { + __kind: 'Null' +} + +export interface V0Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type V0MultiLocation = V0MultiLocation_Null | V0MultiLocation_X1 | V0MultiLocation_X2 | V0MultiLocation_X3 | V0MultiLocation_X4 | V0MultiLocation_X5 | V0MultiLocation_X6 | V0MultiLocation_X7 | V0MultiLocation_X8 + +export interface V0MultiLocation_Null { + __kind: 'Null' +} + +export interface V0MultiLocation_X1 { + __kind: 'X1' + value: V0Junction +} + +export interface V0MultiLocation_X2 { + __kind: 'X2' + value: [V0Junction, V0Junction] +} + +export interface V0MultiLocation_X3 { + __kind: 'X3' + value: [V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X4 { + __kind: 'X4' + value: [V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X5 { + __kind: 'X5' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X6 { + __kind: 'X6' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X7 { + __kind: 'X7' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X8 { + __kind: 'X8' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export type V0Junction = V0Junction_AccountId32 | V0Junction_AccountIndex64 | V0Junction_AccountKey20 | V0Junction_GeneralIndex | V0Junction_GeneralKey | V0Junction_OnlyChild | V0Junction_PalletInstance | V0Junction_Parachain | V0Junction_Parent | V0Junction_Plurality + +export interface V0Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V0Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V0Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V0Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V0Junction_GeneralKey { + __kind: 'GeneralKey' + value: WeakBoundedVec +} + +export interface V0Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V0Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V0Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V0Junction_Parent { + __kind: 'Parent' +} + +export interface V0Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0MultiAsset = V0MultiAsset_AbstractFungible | V0MultiAsset_AbstractNonFungible | V0MultiAsset_All | V0MultiAsset_AllAbstractFungible | V0MultiAsset_AllAbstractNonFungible | V0MultiAsset_AllConcreteFungible | V0MultiAsset_AllConcreteNonFungible | V0MultiAsset_AllFungible | V0MultiAsset_AllNonFungible | V0MultiAsset_ConcreteFungible | V0MultiAsset_ConcreteNonFungible | V0MultiAsset_None + +export interface V0MultiAsset_AbstractFungible { + __kind: 'AbstractFungible' + id: Bytes + amount: bigint +} + +export interface V0MultiAsset_AbstractNonFungible { + __kind: 'AbstractNonFungible' + class: Bytes + instance: V1AssetInstance +} + +export interface V0MultiAsset_All { + __kind: 'All' +} + +export interface V0MultiAsset_AllAbstractFungible { + __kind: 'AllAbstractFungible' + id: Bytes +} + +export interface V0MultiAsset_AllAbstractNonFungible { + __kind: 'AllAbstractNonFungible' + class: Bytes +} + +export interface V0MultiAsset_AllConcreteFungible { + __kind: 'AllConcreteFungible' + id: V0MultiLocation +} + +export interface V0MultiAsset_AllConcreteNonFungible { + __kind: 'AllConcreteNonFungible' + class: V0MultiLocation +} + +export interface V0MultiAsset_AllFungible { + __kind: 'AllFungible' +} + +export interface V0MultiAsset_AllNonFungible { + __kind: 'AllNonFungible' +} + +export interface V0MultiAsset_ConcreteFungible { + __kind: 'ConcreteFungible' + id: V0MultiLocation + amount: bigint +} + +export interface V0MultiAsset_ConcreteNonFungible { + __kind: 'ConcreteNonFungible' + class: V0MultiLocation + instance: V1AssetInstance +} + +export interface V0MultiAsset_None { + __kind: 'None' +} + +export const V0MultiAsset: sts.Type = sts.closedEnum(() => { + return { + AbstractFungible: sts.enumStruct({ + id: sts.bytes(), + amount: sts.bigint(), + }), + AbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + instance: V1AssetInstance, + }), + All: sts.unit(), + AllAbstractFungible: sts.enumStruct({ + id: sts.bytes(), + }), + AllAbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + }), + AllConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + }), + AllConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + }), + AllFungible: sts.unit(), + AllNonFungible: sts.unit(), + ConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + amount: sts.bigint(), + }), + ConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + instance: V1AssetInstance, + }), + None: sts.unit(), + } +}) + +export const V0MultiLocation: sts.Type = sts.closedEnum(() => { + return { + Null: sts.unit(), + X1: V0Junction, + X2: sts.tuple(() => [V0Junction, V0Junction]), + X3: sts.tuple(() => [V0Junction, V0Junction, V0Junction]), + X4: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction]), + X5: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X6: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X7: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X8: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + } +}) + +export const V0Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: WeakBoundedVec, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Parent: sts.unit(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V0MultiAsset), + } +}) + +export type V0Response = V0Response_Assets + +export interface V0Response_Assets { + __kind: 'Assets' + value: V0MultiAsset[] +} + +export type V0Xcm = V0Xcm_HrmpChannelAccepted | V0Xcm_HrmpChannelClosing | V0Xcm_HrmpNewChannelOpenRequest | V0Xcm_QueryResponse | V0Xcm_RelayedFrom | V0Xcm_ReserveAssetDeposit | V0Xcm_TeleportAsset | V0Xcm_Transact | V0Xcm_TransferAsset | V0Xcm_TransferReserveAsset | V0Xcm_WithdrawAsset + +export interface V0Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V0Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V0Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V0Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface V0Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: V0Xcm +} + +export interface V0Xcm_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V0Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export type VersionedXcm = VersionedXcm_V0 | VersionedXcm_V1 | VersionedXcm_V2 + +export interface VersionedXcm_V0 { + __kind: 'V0' + value: V0Xcm +} + +export interface VersionedXcm_V1 { + __kind: 'V1' + value: V1Xcm +} + +export interface VersionedXcm_V2 { + __kind: 'V2' + value: V2Instruction[] +} + +export const V2WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: sts.bigint(), + Unlimited: sts.unit(), + } +}) + +export const VersionedMultiAssets: sts.Type = sts.closedEnum(() => { + return { + V0: sts.array(() => V0MultiAsset), + V1: sts.array(() => V1MultiAsset), + } +}) + +export type VersionedMultiAssets = VersionedMultiAssets_V0 | VersionedMultiAssets_V1 + +export interface VersionedMultiAssets_V0 { + __kind: 'V0' + value: V0MultiAsset[] +} + +export interface VersionedMultiAssets_V1 { + __kind: 'V1' + value: V1MultiAsset[] +} + +export const V1MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V1Junctions, + } +}) + +export const VersionedMultiLocation: sts.Type = sts.closedEnum(() => { + return { + V0: V0MultiLocation, + V1: V1MultiLocation, + } +}) + +export type VersionedMultiLocation = VersionedMultiLocation_V0 | VersionedMultiLocation_V1 + +export interface VersionedMultiLocation_V0 { + __kind: 'V0' + value: V0MultiLocation +} + +export interface VersionedMultiLocation_V1 { + __kind: 'V1' + value: V1MultiLocation +} + +export const Type_424: sts.Type = sts.closedEnum(() => { + return { + V0: Type_425, + V1: Type_430, + V2: sts.array(() => Type_436), + } +}) + +export const Type_436: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => Type_436), + SetErrorHandler: sts.array(() => Type_436), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_429, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const Type_429: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface Type_429 { + encoded: Bytes +} + +export type Type_436 = Type_436_BuyExecution | Type_436_ClaimAsset | Type_436_ClearError | Type_436_ClearOrigin | Type_436_DepositAsset | Type_436_DepositReserveAsset | Type_436_DescendOrigin | Type_436_ExchangeAsset | Type_436_HrmpChannelAccepted | Type_436_HrmpChannelClosing | Type_436_HrmpNewChannelOpenRequest | Type_436_InitiateReserveWithdraw | Type_436_InitiateTeleport | Type_436_QueryHolding | Type_436_QueryResponse | Type_436_ReceiveTeleportedAsset | Type_436_RefundSurplus | Type_436_ReportError | Type_436_ReserveAssetDeposited | Type_436_SetAppendix | Type_436_SetErrorHandler | Type_436_SubscribeVersion | Type_436_Transact | Type_436_TransferAsset | Type_436_TransferReserveAsset | Type_436_Trap | Type_436_UnsubscribeVersion | Type_436_WithdrawAsset + +export interface Type_436_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface Type_436_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface Type_436_ClearError { + __kind: 'ClearError' +} + +export interface Type_436_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_436_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_436_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_436_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface Type_436_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_436_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_436_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_436_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_436_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_436_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_436_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface Type_436_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface Type_436_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface Type_436_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_436_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface Type_436_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface Type_436_SetAppendix { + __kind: 'SetAppendix' + value: Type_436[] +} + +export interface Type_436_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_436[] +} + +export interface Type_436_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_436_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_429 +} + +export interface Type_436_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_436_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_436_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_436_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_436_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export const Type_430: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_432), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: Type_430, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_432), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_429, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_432), + }), + } +}) + +export const Type_432: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => Type_430), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type Type_432 = Type_432_BuyExecution | Type_432_DepositAsset | Type_432_DepositReserveAsset | Type_432_ExchangeAsset | Type_432_InitiateReserveWithdraw | Type_432_InitiateTeleport | Type_432_Noop | Type_432_QueryHolding + +export interface Type_432_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: Type_430[] +} + +export interface Type_432_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_432_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_432_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_432_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface Type_432_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_432_Noop { + __kind: 'Noop' +} + +export interface Type_432_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export type Type_430 = Type_430_HrmpChannelAccepted | Type_430_HrmpChannelClosing | Type_430_HrmpNewChannelOpenRequest | Type_430_QueryResponse | Type_430_ReceiveTeleportedAsset | Type_430_RelayedFrom | Type_430_ReserveAssetDeposited | Type_430_SubscribeVersion | Type_430_Transact | Type_430_TransferAsset | Type_430_TransferReserveAsset | Type_430_UnsubscribeVersion | Type_430_WithdrawAsset + +export interface Type_430_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_430_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_430_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_430_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface Type_430_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: Type_432[] +} + +export interface Type_430_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: Type_430 +} + +export interface Type_430_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: Type_432[] +} + +export interface Type_430_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_430_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_429 +} + +export interface Type_430_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_430_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_430_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_430_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: Type_432[] +} + +export const Type_425: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: Type_425, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_427), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_427), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_429, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_427), + }), + } +}) + +export const Type_427: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => Type_425), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type Type_427 = Type_427_BuyExecution | Type_427_DepositAsset | Type_427_DepositReserveAsset | Type_427_ExchangeAsset | Type_427_InitiateReserveWithdraw | Type_427_InitiateTeleport | Type_427_Null | Type_427_QueryHolding + +export interface Type_427_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: Type_425[] +} + +export interface Type_427_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_427_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_427_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface Type_427_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface Type_427_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_427_Null { + __kind: 'Null' +} + +export interface Type_427_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type Type_425 = Type_425_HrmpChannelAccepted | Type_425_HrmpChannelClosing | Type_425_HrmpNewChannelOpenRequest | Type_425_QueryResponse | Type_425_RelayedFrom | Type_425_ReserveAssetDeposit | Type_425_TeleportAsset | Type_425_Transact | Type_425_TransferAsset | Type_425_TransferReserveAsset | Type_425_WithdrawAsset + +export interface Type_425_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_425_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_425_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_425_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface Type_425_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: Type_425 +} + +export interface Type_425_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: Type_427[] +} + +export interface Type_425_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: Type_427[] +} + +export interface Type_425_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_429 +} + +export interface Type_425_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_425_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_425_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: Type_427[] +} + +export type Type_424 = Type_424_V0 | Type_424_V1 | Type_424_V2 + +export interface Type_424_V0 { + __kind: 'V0' + value: Type_425 +} + +export interface Type_424_V1 { + __kind: 'V1' + value: Type_430 +} + +export interface Type_424_V2 { + __kind: 'V2' + value: Type_436[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type XcmPalletCall = XcmPalletCall_execute | XcmPalletCall_force_default_xcm_version | XcmPalletCall_force_subscribe_version_notify | XcmPalletCall_force_unsubscribe_version_notify | XcmPalletCall_force_xcm_version | XcmPalletCall_limited_reserve_transfer_assets | XcmPalletCall_limited_teleport_assets | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets + +/** + * Execute an XCM message from a local, signed, origin. + * + * An event is deposited indicating whether `msg` could be executed completely or only + * partially. + * + * No more than `max_weight` will be used in its attempted execution. If this is less than the + * maximum amount of weight that the message could take to be executed, then no execution + * attempt will be made. + * + * NOTE: A successful return to this does *not* imply that the `msg` was executed successfully + * to completion; only that *some* of it was executed. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Type_424 + maxWeight: bigint +} + +/** + * Set a safe XCM version (the version that XCM should be encoded with if the most recent + * version a destination can accept is unknown). + * + * - `origin`: Must be Root. + * - `maybe_xcm_version`: The default XCM encoding version, or `None` to disable. + */ +export interface XcmPalletCall_force_default_xcm_version { + __kind: 'force_default_xcm_version' + maybeXcmVersion?: (number | undefined) +} + +/** + * Ask a location to notify us regarding their XCM version and any changes to it. + * + * - `origin`: Must be Root. + * - `location`: The location to which we should subscribe for XCM version notifications. + */ +export interface XcmPalletCall_force_subscribe_version_notify { + __kind: 'force_subscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Require that a particular destination should no longer notify us regarding any XCM + * version changes. + * + * - `origin`: Must be Root. + * - `location`: The location to which we are currently subscribed for XCM version + * notifications which we no longer desire. + */ +export interface XcmPalletCall_force_unsubscribe_version_notify { + __kind: 'force_unsubscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Extoll that a particular destination can be communicated with through a particular + * version of XCM. + * + * - `origin`: Must be Root. + * - `location`: The destination that is being described. + * - `xcm_version`: The latest version of XCM that `location` supports. + */ +export interface XcmPalletCall_force_xcm_version { + __kind: 'force_xcm_version' + location: V1MultiLocation + xcmVersion: number +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination + * chain and forward a notification XCM. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight + * is needed than `weight_limit`, then the operation will fail and the assets send may be + * at risk. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_reserve_transfer_assets { + __kind: 'limited_reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight + * is needed than `weight_limit`, then the operation will fail and the assets send may be + * at risk. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_teleport_assets { + __kind: 'limited_teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination + * chain and forward a notification XCM. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, + * with all fees taken as needed from the asset. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +export interface XcmPalletCall_send { + __kind: 'send' + dest: VersionedMultiLocation + message: VersionedXcm +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, + * with all fees taken as needed from the asset. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const WhitelistCall: sts.Type = sts.closedEnum(() => { + return { + dispatch_whitelisted_call: sts.enumStruct({ + callHash: H256, + callEncodedLen: sts.number(), + callWeightWitness: Weight, + }), + dispatch_whitelisted_call_with_preimage: sts.enumStruct({ + call: Call, + }), + remove_whitelisted_call: sts.enumStruct({ + callHash: H256, + }), + whitelist_call: sts.enumStruct({ + callHash: H256, + }), + } +}) + +export const H256 = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type WhitelistCall = WhitelistCall_dispatch_whitelisted_call | WhitelistCall_dispatch_whitelisted_call_with_preimage | WhitelistCall_remove_whitelisted_call | WhitelistCall_whitelist_call + +export interface WhitelistCall_dispatch_whitelisted_call { + __kind: 'dispatch_whitelisted_call' + callHash: H256 + callEncodedLen: number + callWeightWitness: Weight +} + +export interface WhitelistCall_dispatch_whitelisted_call_with_preimage { + __kind: 'dispatch_whitelisted_call_with_preimage' + call: Call +} + +export interface WhitelistCall_remove_whitelisted_call { + __kind: 'remove_whitelisted_call' + callHash: H256 +} + +export interface WhitelistCall_whitelist_call { + __kind: 'whitelist_call' + callHash: H256 +} + +export type H256 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VoterListCall: sts.Type = sts.closedEnum(() => { + return { + put_in_front_of: sts.enumStruct({ + lighter: MultiAddress, + }), + rebag: sts.enumStruct({ + dislocated: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VoterListCall = VoterListCall_put_in_front_of | VoterListCall_rebag + +/** + * Move the caller's Id directly in front of `lighter`. + * + * The dispatch origin for this call must be _Signed_ and can only be called by the Id of + * the account going in front of `lighter`. + * + * Only works if + * - both nodes are within the same bag, + * - and `origin` has a greater `Score` than `lighter`. + */ +export interface VoterListCall_put_in_front_of { + __kind: 'put_in_front_of' + lighter: MultiAddress +} + +/** + * Declare that some `dislocated` account has, through rewards or penalties, sufficiently + * changed its score that it should properly fall into a different bag than its current + * one. + * + * Anyone can call this function about any potentially dislocated account. + * + * Will always update the stored score of `dislocated` to the correct score, based on + * `ScoreProvider`. + * + * If `dislocated` does not exists, it returns an error. + */ +export interface VoterListCall_rebag { + __kind: 'rebag' + dislocated: MultiAddress +} + +export type MultiAddress = MultiAddress_Address20 | MultiAddress_Address32 | MultiAddress_Id | MultiAddress_Index | MultiAddress_Raw + +export interface MultiAddress_Address20 { + __kind: 'Address20' + value: Bytes +} + +export interface MultiAddress_Address32 { + __kind: 'Address32' + value: Bytes +} + +export interface MultiAddress_Id { + __kind: 'Id' + value: AccountId32 +} + +export interface MultiAddress_Index { + __kind: 'Index' +} + +export interface MultiAddress_Raw { + __kind: 'Raw' + value: Bytes +} + +export type AccountId32 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: MultiAddress, + target: MultiAddress, + schedule: VestingInfo, + }), + merge_schedules: sts.enumStruct({ + schedule1Index: sts.number(), + schedule2Index: sts.number(), + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: MultiAddress, + }), + vested_transfer: sts.enumStruct({ + target: MultiAddress, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: sts.bigint(), + perBlock: sts.bigint(), + startingBlock: sts.number(), + } +}) + +export interface VestingInfo { + locked: bigint + perBlock: bigint + startingBlock: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_merge_schedules | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: MultiAddress + target: MultiAddress + schedule: VestingInfo +} + +/** + * Merge two vesting schedules together, creating a new vesting schedule that unlocks over + * the highest possible start and end blocks. If both schedules have already started the + * current block will be used as the schedule start; with the caveat that if one schedule + * is finished by the current block, the other will be treated as the new merged schedule, + * unmodified. + * + * NOTE: If `schedule1_index == schedule2_index` this is a no-op. + * NOTE: This will unlock all schedules through the current block prior to merging. + * NOTE: If both schedules have ended by the current block, no new schedule will be created + * and both will be removed. + * + * Merged schedule attributes: + * - `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block, + * current_block)`. + * - `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`. + * - `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`. + * + * The dispatch origin for this call must be _Signed_. + * + * - `schedule1_index`: index of the first schedule to merge. + * - `schedule2_index`: index of the second schedule to merge. + */ +export interface VestingCall_merge_schedules { + __kind: 'merge_schedules' + schedule1Index: number + schedule2Index: number +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: MultiAddress +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account receiving the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: MultiAddress + schedule: VestingInfo +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Call, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Call), + }), + dispatch_as: sts.enumStruct({ + asOrigin: OriginCaller, + call: Call, + }), + force_batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + with_weight: sts.enumStruct({ + call: Call, + weight: Weight, + }), + } +}) + +export const OriginCaller: sts.Type = sts.closedEnum(() => { + return { + Council: Type_151, + Origins: Origin, + ParachainsOrigin: Type_154, + TechnicalCommittee: Type_152, + Void: Void, + XcmPallet: Type_156, + system: RawOrigin, + } +}) + +export const RawOrigin: sts.Type = sts.closedEnum(() => { + return { + None: sts.unit(), + Root: sts.unit(), + Signed: AccountId32, + } +}) + +export type RawOrigin = RawOrigin_None | RawOrigin_Root | RawOrigin_Signed + +export interface RawOrigin_None { + __kind: 'None' +} + +export interface RawOrigin_Root { + __kind: 'Root' +} + +export interface RawOrigin_Signed { + __kind: 'Signed' + value: AccountId32 +} + +export const Type_156: sts.Type = sts.closedEnum(() => { + return { + Response: V1MultiLocation, + Xcm: V1MultiLocation, + } +}) + +export type Type_156 = Type_156_Response | Type_156_Xcm + +export interface Type_156_Response { + __kind: 'Response' + value: V1MultiLocation +} + +export interface Type_156_Xcm { + __kind: 'Xcm' + value: V1MultiLocation +} + +export const Void: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Void = never + +export const Type_152: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_152 = Type_152_Member | Type_152_Members | Type_152__Phantom + +export interface Type_152_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_152_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_152__Phantom { + __kind: '_Phantom' +} + +export const Type_154: sts.Type = sts.closedEnum(() => { + return { + Parachain: Id, + } +}) + +export const Id = sts.number() + +export type Type_154 = Type_154_Parachain + +export interface Type_154_Parachain { + __kind: 'Parachain' + value: Id +} + +export type Id = number + +export const Origin: sts.Type = sts.closedEnum(() => { + return { + AuctionAdmin: sts.unit(), + BigSpender: sts.unit(), + BigTipper: sts.unit(), + Fellows: sts.unit(), + Fellowship1Dan: sts.unit(), + Fellowship2Dan: sts.unit(), + Fellowship3Dan: sts.unit(), + Fellowship4Dan: sts.unit(), + Fellowship5Dan: sts.unit(), + Fellowship6Dan: sts.unit(), + Fellowship7Dan: sts.unit(), + Fellowship8Dan: sts.unit(), + Fellowship9Dan: sts.unit(), + FellowshipAdmin: sts.unit(), + FellowshipExperts: sts.unit(), + FellowshipInitiates: sts.unit(), + FellowshipMasters: sts.unit(), + GeneralAdmin: sts.unit(), + LeaseAdmin: sts.unit(), + MediumSpender: sts.unit(), + ReferendumCanceller: sts.unit(), + ReferendumKiller: sts.unit(), + SmallSpender: sts.unit(), + SmallTipper: sts.unit(), + StakingAdmin: sts.unit(), + Treasurer: sts.unit(), + WhitelistedCaller: sts.unit(), + } +}) + +export type Origin = Origin_AuctionAdmin | Origin_BigSpender | Origin_BigTipper | Origin_Fellows | Origin_Fellowship1Dan | Origin_Fellowship2Dan | Origin_Fellowship3Dan | Origin_Fellowship4Dan | Origin_Fellowship5Dan | Origin_Fellowship6Dan | Origin_Fellowship7Dan | Origin_Fellowship8Dan | Origin_Fellowship9Dan | Origin_FellowshipAdmin | Origin_FellowshipExperts | Origin_FellowshipInitiates | Origin_FellowshipMasters | Origin_GeneralAdmin | Origin_LeaseAdmin | Origin_MediumSpender | Origin_ReferendumCanceller | Origin_ReferendumKiller | Origin_SmallSpender | Origin_SmallTipper | Origin_StakingAdmin | Origin_Treasurer | Origin_WhitelistedCaller + +export interface Origin_AuctionAdmin { + __kind: 'AuctionAdmin' +} + +export interface Origin_BigSpender { + __kind: 'BigSpender' +} + +export interface Origin_BigTipper { + __kind: 'BigTipper' +} + +export interface Origin_Fellows { + __kind: 'Fellows' +} + +export interface Origin_Fellowship1Dan { + __kind: 'Fellowship1Dan' +} + +export interface Origin_Fellowship2Dan { + __kind: 'Fellowship2Dan' +} + +export interface Origin_Fellowship3Dan { + __kind: 'Fellowship3Dan' +} + +export interface Origin_Fellowship4Dan { + __kind: 'Fellowship4Dan' +} + +export interface Origin_Fellowship5Dan { + __kind: 'Fellowship5Dan' +} + +export interface Origin_Fellowship6Dan { + __kind: 'Fellowship6Dan' +} + +export interface Origin_Fellowship7Dan { + __kind: 'Fellowship7Dan' +} + +export interface Origin_Fellowship8Dan { + __kind: 'Fellowship8Dan' +} + +export interface Origin_Fellowship9Dan { + __kind: 'Fellowship9Dan' +} + +export interface Origin_FellowshipAdmin { + __kind: 'FellowshipAdmin' +} + +export interface Origin_FellowshipExperts { + __kind: 'FellowshipExperts' +} + +export interface Origin_FellowshipInitiates { + __kind: 'FellowshipInitiates' +} + +export interface Origin_FellowshipMasters { + __kind: 'FellowshipMasters' +} + +export interface Origin_GeneralAdmin { + __kind: 'GeneralAdmin' +} + +export interface Origin_LeaseAdmin { + __kind: 'LeaseAdmin' +} + +export interface Origin_MediumSpender { + __kind: 'MediumSpender' +} + +export interface Origin_ReferendumCanceller { + __kind: 'ReferendumCanceller' +} + +export interface Origin_ReferendumKiller { + __kind: 'ReferendumKiller' +} + +export interface Origin_SmallSpender { + __kind: 'SmallSpender' +} + +export interface Origin_SmallTipper { + __kind: 'SmallTipper' +} + +export interface Origin_StakingAdmin { + __kind: 'StakingAdmin' +} + +export interface Origin_Treasurer { + __kind: 'Treasurer' +} + +export interface Origin_WhitelistedCaller { + __kind: 'WhitelistedCaller' +} + +export const Type_151: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_151 = Type_151_Member | Type_151_Members | Type_151__Phantom + +export interface Type_151_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_151_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_151__Phantom { + __kind: '_Phantom' +} + +export type OriginCaller = OriginCaller_Council | OriginCaller_Origins | OriginCaller_ParachainsOrigin | OriginCaller_TechnicalCommittee | OriginCaller_Void | OriginCaller_XcmPallet | OriginCaller_system + +export interface OriginCaller_Council { + __kind: 'Council' + value: Type_151 +} + +export interface OriginCaller_Origins { + __kind: 'Origins' + value: Origin +} + +export interface OriginCaller_ParachainsOrigin { + __kind: 'ParachainsOrigin' + value: Type_154 +} + +export interface OriginCaller_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: Type_152 +} + +export interface OriginCaller_Void { + __kind: 'Void' + value: Void +} + +export interface OriginCaller_XcmPallet { + __kind: 'XcmPallet' + value: Type_156 +} + +export interface OriginCaller_system { + __kind: 'system' + value: RawOrigin +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all | UtilityCall_dispatch_as | UtilityCall_force_batch | UtilityCall_with_weight + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Call +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin except `None`. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then the calls are dispatched without checking origin filter. (This + * includes bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Call[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin except `None`. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then the calls are dispatched without checking origin filter. (This + * includes bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Call[] +} + +/** + * Dispatches a function call with a provided origin. + * + * The dispatch origin for this call must be _Root_. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB write (event). + * - Weight of derivative `call` execution + T::WeightInfo::dispatch_as(). + * # + */ +export interface UtilityCall_dispatch_as { + __kind: 'dispatch_as' + asOrigin: OriginCaller + call: Call +} + +/** + * Send a batch of dispatch calls. + * Unlike `batch`, it allows errors and won't interrupt. + * + * May be called from any origin except `None`. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then the calls are dispatch without checking origin filter. (This + * includes bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_force_batch { + __kind: 'force_batch' + calls: Call[] +} + +/** + * Dispatch a function call with a specified weight. + * + * This function does not check the weight of the call, and instead allows the + * Root origin to specify the weight of the call. + * + * The dispatch origin for this call must be _Root_. + */ +export interface UtilityCall_with_weight { + __kind: 'with_weight' + call: Call + weight: Weight +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UmpCall: sts.Type = sts.closedEnum(() => { + return { + service_overweight: sts.enumStruct({ + index: sts.bigint(), + weightLimit: Weight, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UmpCall = UmpCall_service_overweight + +/** + * Service a single overweight upward message. + * + * - `origin`: Must pass `ExecuteOverweightOrigin`. + * - `index`: The index of the overweight message to service. + * - `weight_limit`: The amount of weight that message execution may take. + * + * Errors: + * - `UnknownMessageIndex`: Message of `index` is unknown. + * - `WeightOverLimit`: Message execution may use greater than `weight_limit`. + * + * Events: + * - `OverweightServiced`: On success. + */ +export interface UmpCall_service_overweight { + __kind: 'service_overweight' + index: bigint + weightLimit: Weight +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: MultiAddress, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + remove_approval: sts.enumStruct({ + proposalId: sts.number(), + }), + spend: sts.enumStruct({ + amount: sts.bigint(), + beneficiary: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_remove_approval | TreasuryCall_spend + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: MultiAddress +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Force a previously approved proposal to be removed from the approval queue. + * The original deposit will no longer be returned. + * + * May only be called from `T::RejectOrigin`. + * - `proposal_id`: The index of a proposal + * + * # + * - Complexity: O(A) where `A` is the number of approvals + * - Db reads and writes: `Approvals` + * # + * + * Errors: + * - `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue, + * i.e., the proposal has not been approved. This could also mean the proposal does not + * exist altogether, thus there is no way it would have been approved in the first place. + */ +export interface TreasuryCall_remove_approval { + __kind: 'remove_approval' + proposalId: number +} + +/** + * Propose and approve a spend of treasury funds. + * + * - `origin`: Must be `SpendOrigin` with the `Success` value being at least `amount`. + * - `amount`: The amount to be transferred from the treasury to the `beneficiary`. + * - `beneficiary`: The destination account for the transfer. + * + * NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the + * beneficiary. + */ +export interface TreasuryCall_spend { + __kind: 'spend' + amount: bigint + beneficiary: MultiAddress +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TipsCall: sts.Type = sts.closedEnum(() => { + return { + close_tip: sts.enumStruct({ + hash: H256, + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: MultiAddress, + }), + retract_tip: sts.enumStruct({ + hash: H256, + }), + slash_tip: sts.enumStruct({ + hash: H256, + }), + tip: sts.enumStruct({ + hash: H256, + tipValue: sts.bigint(), + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: MultiAddress, + tipValue: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TipsCall = TipsCall_close_tip | TipsCall_report_awesome | TipsCall_retract_tip | TipsCall_slash_tip | TipsCall_tip | TipsCall_tip_new + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost + * depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TipsCall_close_tip { + __kind: 'close_tip' + hash: H256 +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: MultiAddress +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TipsCall_retract_tip { + __kind: 'retract_tip' + hash: H256 +} + +/** + * Remove and slash an already-open tip. + * + * May only be called from `T::RejectOrigin`. + * + * As a result, the finder is slashed and the deposits are lost. + * + * Emits `TipSlashed` if successful. + * + * # + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * # + */ +export interface TipsCall_slash_tip { + __kind: 'slash_tip' + hash: H256 +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`, insert tip and check closing, `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TipsCall_tip { + __kind: 'tip' + hash: H256 + tipValue: bigint +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of + * `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: MultiAddress + tipValue: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in + * `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: MultiAddress, + }), + change_key: sts.enumStruct({ + new: MultiAddress, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: MultiAddress, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId32), + }), + set_prime: sts.enumStruct({ + who: MultiAddress, + }), + swap_member: sts.enumStruct({ + remove: MultiAddress, + add: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: MultiAddress +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: MultiAddress +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: MultiAddress +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId32[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: MultiAddress +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: MultiAddress + add: MultiAddress +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: Weight, + lengthBound: sts.number(), + }), + close_old_weight: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_close_old_weight | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: Weight + lengthBound: number +} + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close_old_weight { + __kind: 'close_old_weight' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + kill_prefix: sts.enumStruct({ + prefix: sts.bytes(), + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => sts.bytes()), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SystemCall = SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Bytes + subkeys: number +} + +/** + * Kill some items from storage. + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Bytes[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Make some on-chain remark and emit event. + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is + * expensive). + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very + * expensive. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full + * block. # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: [Bytes, Bytes][] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: MultiAddress, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: sts.number(), + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + controller: AccountId32, + }), + force_apply_min_commission: sts.enumStruct({ + validatorStash: AccountId32, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => MultiAddress), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => MultiAddress), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + }), + reap_stash: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: MultiAddress, + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId32), + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_staking_configs: sts.enumStruct({ + minNominatorBond: ConfigOp, + minValidatorBond: ConfigOp, + maxNominatorCount: Type_103, + maxValidatorCount: Type_103, + chillThreshold: Type_104, + minCommission: Type_105, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export const Type_105: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export const Perbill = sts.number() + +export type Type_105 = Type_105_Noop | Type_105_Remove | Type_105_Set + +export interface Type_105_Noop { + __kind: 'Noop' +} + +export interface Type_105_Remove { + __kind: 'Remove' +} + +export interface Type_105_Set { + __kind: 'Set' + value: Perbill +} + +export type Perbill = number + +export const Type_104: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Percent, + } +}) + +export type Type_104 = Type_104_Noop | Type_104_Remove | Type_104_Set + +export interface Type_104_Noop { + __kind: 'Noop' +} + +export interface Type_104_Remove { + __kind: 'Remove' +} + +export interface Type_104_Set { + __kind: 'Set' + value: Percent +} + +export type Percent = number + +export const Type_103: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_103 = Type_103_Noop | Type_103_Remove | Type_103_Set + +export interface Type_103_Noop { + __kind: 'Noop' +} + +export interface Type_103_Remove { + __kind: 'Remove' +} + +export interface Type_103_Set { + __kind: 'Set' + value: number +} + +export const ConfigOp: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type ConfigOp = ConfigOp_Noop | ConfigOp_Remove | ConfigOp_Set + +export interface ConfigOp_Noop { + __kind: 'Noop' +} + +export interface ConfigOp_Remove { + __kind: 'Remove' +} + +export interface ConfigOp_Set { + __kind: 'Set' + value: bigint +} + +export const Percent = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_force_apply_min_commission | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_invulnerables | StakingCall_set_payee | StakingCall_set_staking_configs | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: MultiAddress + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose + * any limitation on the amount that can be added. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::SlashCancelOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: number + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Declare a `controller` to stop participating as either a validator or nominator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_, but can be called by anyone. + * + * If the caller is the same as the controller being targeted, then no further checks are + * enforced, and this function behaves just like `chill`. + * + * If the caller is different than the controller being targeted, the following conditions + * must be met: + * + * * `controller` must belong to a nominator who has become non-decodable, + * + * Or: + * + * * A `ChillThreshold` must be set and checked which defines how close to the max + * nominators or validators we must reach before users can start chilling one-another. + * * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine + * how close we are to the threshold. + * * A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines + * if this is a person that should be chilled because they have not met the threshold + * bond required. + * + * This can be helpful if bond requirements are updated, and we need to remove old users + * who do not satisfy these requirements. + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + controller: AccountId32 +} + +/** + * Force a validator to have at least the minimum commission. This will not affect a + * validator who already has a commission greater than or equal to the minimum. Any account + * can call this. + */ +export interface StakingCall_force_apply_min_commission { + __kind: 'force_apply_min_commission' + validatorStash: AccountId32 +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * Thus the election process may be ongoing when this is called. In this case the + * election will continue until the next era is triggered. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators upto maximum of + * `ElectionProviderBase::MaxWinners`. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: MultiAddress[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (T::MaxNominations). + * - Both the reads and writes follow a similar pattern. + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: MultiAddress[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId32 + era: number +} + +/** + * Remove all data structures concerning a staker/stash once it is at a state where it can + * be considered `dust` in the staking system. The requirements are: + * + * 1. the `total_balance` of the stash is below existential deposit. + * 2. or, the `ledger.total` of the stash is below existential deposit. + * + * The former can happen in cases like a slash; the latter when a fully unbonded account + * is still receiving staking rewards in `RewardDestination::Staked`. + * + * It can be called by anyone, as long as `stash` meets the above requirements. + * + * Refunds the transaction fees upon successful execution. + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MaxUnlockingChunks`. + * - Storage changes: Can't increase storage, only decrease it. + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor upto maximum of + * `ElectionProviderBase::MaxWinners`. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt instantly (as soon as this function is completed successfully). + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: MultiAddress +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId32[] +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt instantly (as soon as this function is completed successfully). + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Update the various staking configurations . + * + * * `min_nominator_bond`: The minimum active bond needed to be a nominator. + * * `min_validator_bond`: The minimum active bond needed to be a validator. + * * `max_nominator_count`: The max number of users who can be a nominator at once. When + * set to `None`, no limit is enforced. + * * `max_validator_count`: The max number of users who can be a validator at once. When + * set to `None`, no limit is enforced. + * * `chill_threshold`: The ratio of `max_nominator_count` or `max_validator_count` which + * should be filled in order for the `chill_other` transaction to work. + * * `min_commission`: The minimum amount of commission that each validators must maintain. + * This is checked only upon calling `validate`. Existing validators are not affected. + * + * RuntimeOrigin must be Root to call this function. + * + * NOTE: Existing nominators and validators will not be affected by this update. + * to kick people under the new limits, `chill_other` should be called. + */ +export interface StakingCall_set_staking_configs { + __kind: 'set_staking_configs' + minNominatorBond: ConfigOp + minValidatorBond: ConfigOp + maxNominatorCount: Type_103 + maxValidatorCount: Type_103 + chillThreshold: Type_104 + minCommission: Type_105 +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`) + * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need + * to be called first to remove some of the chunks (if possible). + * + * If a user encounters the `InsufficientBond` error when calling this extrinsic, + * they should call `chill` first in order to free up their bonded funds. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * Complexity O(S) where S is the number of slashing spans to remove + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: sts.bigint(), + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: MultiAddress, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: MultiAddress, + judgement: Type_221, + }), + judge_suspended_member: sts.enumStruct({ + who: MultiAddress, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: MultiAddress, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: MultiAddress, + value: sts.bigint(), + tip: sts.bigint(), + }), + } +}) + +export const Type_221: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export type Type_221 = Type_221_Approve | Type_221_Rebid | Type_221_Reject + +export interface Type_221_Approve { + __kind: 'Approve' +} + +export interface Type_221_Rebid { + __kind: 'Rebid' +} + +export interface Type_221_Reject { + __kind: 'Reject' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: bigint +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * pallet to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: MultiAddress + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: MultiAddress + judgement: Type_221 +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin forgives + * (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to + * society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: MultiAddress + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured + * payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be approved (`true`) or + * rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: MultiAddress + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: MultiAddress + value: bigint + tip: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: Id, + }), + force_lease: sts.enumStruct({ + para: Id, + leaser: AccountId32, + amount: sts.bigint(), + periodBegin: sts.number(), + periodCount: sts.number(), + }), + trigger_onboard: sts.enumStruct({ + para: Id, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * Clear all leases for a Para Id, refunding any deposits back to the original owners. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: Id +} + +/** + * Just a connect into the `lease_out` call, in case Root wants to force some lease to happen + * independently of any other on-chain mechanism to use it. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: Id + leaser: AccountId32 + amount: bigint + periodBegin: number + periodCount: number +} + +/** + * Try to onboard a parachain that has a lease for the current lease period. + * + * This function can be useful if there was some state issue with a para that should + * have onboarded, but was unable to. As long as they have a lease period, we can + * let them onboard from here. + * + * Origin must be signed, but can be called by anyone. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: SessionKeys, + proof: sts.bytes(), + }), + } +}) + +export const SessionKeys: sts.Type = sts.struct(() => { + return { + grandpa: Public, + babe: sts.bytes(), + imOnline: sts.bytes(), + paraValidator: V2Public, + paraAssignment: sts.bytes(), + authorityDiscovery: sts.bytes(), + } +}) + +export const V2Public = sts.bytes() + +export const Public = sts.bytes() + +export interface SessionKeys { + grandpa: Public + babe: Bytes + imOnline: Bytes + paraValidator: V2Public + paraAssignment: Bytes + authorityDiscovery: Bytes +} + +export type V2Public = Bytes + +export type Public = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be Signed and the account must be either be + * convertible to a validator ID using the chain's typical addressing system (this usually + * means being a controller account) or directly convertible into a validator ID (which + * usually means being a stash account). + * + * # + * - Complexity: `O(1)` in number of key types. Actual cost depends on the number of length + * of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)`. Actual cost depends on the number of length of + * `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: SessionKeys + proof: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: sts.number(), + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_after: sts.enumStruct({ + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: number + index: number +} + +/** + * Cancel a named scheduled task. + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Schedule a named task. + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`](Self::schedule_named). + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + add_lock: sts.enumStruct({ + para: Id, + }), + deregister: sts.enumStruct({ + id: Id, + }), + force_register: sts.enumStruct({ + who: AccountId32, + deposit: sts.bigint(), + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + register: sts.enumStruct({ + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + remove_lock: sts.enumStruct({ + para: Id, + }), + reserve: sts.unit(), + schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + swap: sts.enumStruct({ + id: Id, + other: Id, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RegistrarCall = RegistrarCall_add_lock | RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_register | RegistrarCall_remove_lock | RegistrarCall_reserve | RegistrarCall_schedule_code_upgrade | RegistrarCall_set_current_head | RegistrarCall_swap + +/** + * Add a manager lock from a para. This will prevent the manager of a + * para to deregister or swap a para. + * + * Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked. + */ +export interface RegistrarCall_add_lock { + __kind: 'add_lock' + para: Id +} + +/** + * Deregister a Para Id, freeing all data and returning any deposit. + * + * The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: Id +} + +/** + * Force the registration of a Para Id on the relay chain. + * + * This function must be called by a Root origin. + * + * The deposit taken can be specified for this registration. Any `ParaId` + * can be registered, including sub-1000 IDs which are System Parachains. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId32 + deposit: bigint + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Register head data and validation code for a reserved Para Id. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. + * - `id`: The para ID. Must be owned/managed by the `origin` signing account. + * - `genesis_head`: The genesis head data of the parachain/thread. + * - `validation_code`: The initial validation code of the parachain/thread. + * + * ## Deposits/Fees + * The origin signed account must reserve a corresponding deposit for the registration. Anything already + * reserved previously for this para ID is accounted for. + * + * ## Events + * The `Registered` event is emitted in case of success. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Remove a manager lock from a para. This will allow the manager of a + * previously locked para to deregister or swap a para without using governance. + * + * Can only be called by the Root origin or the parachain. + */ +export interface RegistrarCall_remove_lock { + __kind: 'remove_lock' + para: Id +} + +/** + * Reserve a Para Id on the relay chain. + * + * This function will reserve a new Para Id to be owned/managed by the origin account. + * The origin account is able to register head data and validation code using `register` to create + * a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID. + * + * ## Deposits/Fees + * The origin must reserve a deposit of `ParaDeposit` for the registration. + * + * ## Events + * The `Reserved` event is emitted in case of success, which provides the ID reserved for use. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * Schedule a parachain upgrade. + * + * Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked. + */ +export interface RegistrarCall_schedule_code_upgrade { + __kind: 'schedule_code_upgrade' + para: Id + newCode: ValidationCode +} + +/** + * Set the parachain's current head. + * + * Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked. + */ +export interface RegistrarCall_set_current_head { + __kind: 'set_current_head' + para: Id + newHead: HeadData +} + +/** + * Swap a parachain with another parachain or parathread. + * + * The origin must be Root, the `para` owner, or the `para` itself. + * + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: Id + other: Id +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ReferendaCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + index: sts.number(), + }), + kill: sts.enumStruct({ + index: sts.number(), + }), + nudge_referendum: sts.enumStruct({ + index: sts.number(), + }), + one_fewer_deciding: sts.enumStruct({ + track: sts.number(), + }), + place_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_submission_deposit: sts.enumStruct({ + index: sts.number(), + }), + submit: sts.enumStruct({ + proposalOrigin: OriginCaller, + proposal: Bounded, + enactmentMoment: DispatchTime, + }), + } +}) + +export const DispatchTime: sts.Type = sts.closedEnum(() => { + return { + After: sts.number(), + At: sts.number(), + } +}) + +export type DispatchTime = DispatchTime_After | DispatchTime_At + +export interface DispatchTime_After { + __kind: 'After' + value: number +} + +export interface DispatchTime_At { + __kind: 'At' + value: number +} + +export const Bounded: sts.Type = sts.closedEnum(() => { + return { + Inline: BoundedVec, + Legacy: sts.enumStruct({ + hash: H256, + }), + Lookup: sts.enumStruct({ + hash: H256, + len: sts.number(), + }), + } +}) + +export const BoundedVec = sts.bytes() + +export type Bounded = Bounded_Inline | Bounded_Legacy | Bounded_Lookup + +export interface Bounded_Inline { + __kind: 'Inline' + value: BoundedVec +} + +export interface Bounded_Legacy { + __kind: 'Legacy' + hash: H256 +} + +export interface Bounded_Lookup { + __kind: 'Lookup' + hash: H256 + len: number +} + +export type BoundedVec = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ReferendaCall = ReferendaCall_cancel | ReferendaCall_kill | ReferendaCall_nudge_referendum | ReferendaCall_one_fewer_deciding | ReferendaCall_place_decision_deposit | ReferendaCall_refund_decision_deposit | ReferendaCall_refund_submission_deposit | ReferendaCall_submit + +/** + * Cancel an ongoing referendum. + * + * - `origin`: must be the `CancelOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Cancelled`. + */ +export interface ReferendaCall_cancel { + __kind: 'cancel' + index: number +} + +/** + * Cancel an ongoing referendum and slash the deposits. + * + * - `origin`: must be the `KillOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Killed` and `DepositSlashed`. + */ +export interface ReferendaCall_kill { + __kind: 'kill' + index: number +} + +/** + * Advance a referendum onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `index`: the referendum to be advanced. + */ +export interface ReferendaCall_nudge_referendum { + __kind: 'nudge_referendum' + index: number +} + +/** + * Advance a track onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `track`: the track to be advanced. + * + * Action item for when there is now one fewer referendum in the deciding phase and the + * `DecidingCount` is not yet updated. This means that we should either: + * - begin deciding another referendum (and leave `DecidingCount` alone); or + * - decrement `DecidingCount`. + */ +export interface ReferendaCall_one_fewer_deciding { + __kind: 'one_fewer_deciding' + track: number +} + +/** + * Post the Decision Deposit for a referendum. + * + * - `origin`: must be `Signed` and the account must have funds available for the + * referendum's track's Decision Deposit. + * - `index`: The index of the submitted referendum whose Decision Deposit is yet to be + * posted. + * + * Emits `DecisionDepositPlaced`. + */ +export interface ReferendaCall_place_decision_deposit { + __kind: 'place_decision_deposit' + index: number +} + +/** + * Refund the Decision Deposit for a closed referendum back to the depositor. + * + * - `origin`: must be `Signed` or `Root`. + * - `index`: The index of a closed referendum whose Decision Deposit has not yet been + * refunded. + * + * Emits `DecisionDepositRefunded`. + */ +export interface ReferendaCall_refund_decision_deposit { + __kind: 'refund_decision_deposit' + index: number +} + +/** + * Refund the Submission Deposit for a closed referendum back to the depositor. + * + * - `origin`: must be `Signed` or `Root`. + * - `index`: The index of a closed referendum whose Submission Deposit has not yet been + * refunded. + * + * Emits `SubmissionDepositRefunded`. + */ +export interface ReferendaCall_refund_submission_deposit { + __kind: 'refund_submission_deposit' + index: number +} + +/** + * Propose a referendum on a privileged action. + * + * - `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds + * available. + * - `proposal_origin`: The origin from which the proposal should be executed. + * - `proposal`: The proposal. + * - `enactment_moment`: The moment that the proposal should be enacted. + * + * Emits `Submitted`. + */ +export interface ReferendaCall_submit { + __kind: 'submit' + proposalOrigin: OriginCaller + proposal: Bounded + enactmentMoment: DispatchTime +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: MultiAddress, + call: Call, + }), + cancel_recovered: sts.enumStruct({ + account: MultiAddress, + }), + claim_recovery: sts.enumStruct({ + account: MultiAddress, + }), + close_recovery: sts.enumStruct({ + rescuer: MultiAddress, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId32), + threshold: sts.number(), + delayPeriod: sts.number(), + }), + initiate_recovery: sts.enumStruct({ + account: MultiAddress, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + vouch_recovery: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: MultiAddress + call: Call +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: MultiAddress +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully recovered by + * you. + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: MultiAddress +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: MultiAddress +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. Should be + * ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt before the + * account can be recovered. Should be less than or equal to the length of the list of + * friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized that + * needs to pass before the account can be recovered. + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId32[] + threshold: number + delayPeriod: number +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account needs to be + * recoverable (i.e. have a recovery configuration). + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: MultiAddress +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + announce: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + create_pure: sts.enumStruct({ + proxyType: ProxyType, + delay: sts.number(), + index: sts.number(), + }), + kill_pure: sts.enumStruct({ + spawner: MultiAddress, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + proxy_announced: sts.enumStruct({ + delegate: MultiAddress, + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + reject_announcement: sts.enumStruct({ + delegate: MultiAddress, + callHash: H256, + }), + remove_announcement: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_create_pure | ProxyCall_kill_pure | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: MultiAddress + callHash: H256 +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + */ +export interface ProxyCall_create_pure { + __kind: 'create_pure' + proxyType: ProxyType + delay: number + index: number +} + +/** + * Removes a previously spawned pure proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `pure` with corresponding parameters. + * + * - `spawner`: The account that originally called `pure` to create this account. + * - `index`: The disambiguation index originally passed to `pure`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `pure`. + * - `height`: The height of the chain when the call to `pure` was processed. + * - `ext_index`: The extrinsic index in which the call to `pure` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created pure + * account whose `pure` call has corresponding parameters. + */ +export interface ProxyCall_kill_pure { + __kind: 'kill_pure' + spawner: MultiAddress + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Dispatch the given `call` from an account that the sender is authorized for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: MultiAddress + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: MultiAddress + callHash: H256 +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: MultiAddress + callHash: H256 +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `pure`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Society | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Society { + __kind: 'Society' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PreimageCall: sts.Type = sts.closedEnum(() => { + return { + note_preimage: sts.enumStruct({ + bytes: sts.bytes(), + }), + request_preimage: sts.enumStruct({ + hash: H256, + }), + unnote_preimage: sts.enumStruct({ + hash: H256, + }), + unrequest_preimage: sts.enumStruct({ + hash: H256, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PreimageCall = PreimageCall_note_preimage | PreimageCall_request_preimage | PreimageCall_unnote_preimage | PreimageCall_unrequest_preimage + +/** + * Register a preimage on-chain. + * + * If the preimage was previously requested, no fees or deposits are taken for providing + * the preimage. Otherwise, a deposit is taken proportional to the size of the preimage. + */ +export interface PreimageCall_note_preimage { + __kind: 'note_preimage' + bytes: Bytes +} + +/** + * Request a preimage be uploaded to the chain without paying any fees or deposits. + * + * If the preimage requests has already been provided on-chain, we unreserve any deposit + * a user may have paid, and take the control of the preimage out of their hands. + */ +export interface PreimageCall_request_preimage { + __kind: 'request_preimage' + hash: H256 +} + +/** + * Clear an unrequested preimage from the runtime storage. + * + * If `len` is provided, then it will be a much cheaper operation. + * + * - `hash`: The hash of the preimage to be removed from the store. + * - `len`: The length of the preimage of `hash`. + */ +export interface PreimageCall_unnote_preimage { + __kind: 'unnote_preimage' + hash: H256 +} + +/** + * Clear a previously made request for a preimage. + * + * NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. + */ +export interface PreimageCall_unrequest_preimage { + __kind: 'unrequest_preimage' + hash: H256 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PhragmenElectionCall: sts.Type = sts.closedEnum(() => { + return { + clean_defunct_voters: sts.enumStruct({ + numVoters: sts.number(), + numDefunct: sts.number(), + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + slashBond: sts.boolean(), + rerunElection: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId32), + value: sts.bigint(), + }), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PhragmenElectionCall = PhragmenElectionCall_clean_defunct_voters | PhragmenElectionCall_remove_member | PhragmenElectionCall_remove_voter | PhragmenElectionCall_renounce_candidacy | PhragmenElectionCall_submit_candidacy | PhragmenElectionCall_vote + +/** + * Clean all voters who are defunct (i.e. they do not serve any purpose at all). The + * deposit of the removed voters are returned. + * + * This is an root function to be used only for cleaning the state. + * + * The dispatch origin of this call must be root. + * + * # + * The total number of voters and those that are defunct must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_clean_defunct_voters { + __kind: 'clean_defunct_voters' + numVoters: number + numDefunct: number +} + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, if `rerun_election` is `true`, a new phragmen election is + * started, else, nothing happens. + * + * If `slash_bond` is set to true, the bond of the member being removed is slashed. Else, + * it is returned. + * + * The dispatch origin of this call must be root. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement, we use a small weight. Else, since this is a root call and + * will go into phragmen, we assume full block for now. + * # + */ +export interface PhragmenElectionCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + slashBond: boolean + rerunElection: boolean +} + +/** + * Remove `origin` as a voter. + * + * This removes the lock and returns the deposit. + * + * The dispatch origin of this call must be signed and be a voter. + */ +export interface PhragmenElectionCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * + * - `origin` is a candidate and not elected in any set. In this case, the deposit is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the deposit is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the deposit is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_member`](Self::remove_member), if replacement runners exists, they + * are immediately used. If the prime is renouncing, then no prime will exist until the + * next round. + * + * The dispatch origin of this call must be signed, and have one of the above roles. + * + * # + * The type of renouncing must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Submit oneself for candidacy. A fixed amount of deposit is recorded. + * + * All candidates are wiped at the end of the term. They either become a member/runner-up, + * or leave the system while their deposit is slashed. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`] + * to get their deposit back. Losing the spot in an election will always lead to a slash. + * + * # + * The number of current candidates must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is + * reserved. The deposit is based on the number of votes and can be updated over time. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * If `value` is more than `who`'s free balance, then the maximum of the two is used. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * It is the responsibility of the caller to **NOT** place all of their balance into the + * lock and keep some for further operations. + * + * # + * We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less. + * # + */ +export interface PhragmenElectionCall_vote { + __kind: 'vote' + votes: AccountId32[] + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasSharedCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasDisputesCall: sts.Type = sts.closedEnum(() => { + return { + force_unfreeze: sts.unit(), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasDisputesCall = ParasDisputesCall_force_unfreeze + +export interface ParasDisputesCall_force_unfreeze { + __kind: 'force_unfreeze' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + add_trusted_validation_code: sts.enumStruct({ + validationCode: ValidationCode, + }), + force_note_new_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: Id, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + relayParentNumber: sts.number(), + }), + force_set_current_code: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + include_pvf_check_statement: sts.enumStruct({ + stmt: V2PvfCheckStatement, + signature: V2Signature, + }), + poke_unused_validation_code: sts.enumStruct({ + validationCodeHash: ValidationCodeHash, + }), + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const V2Signature = sts.bytes() + +export const V2PvfCheckStatement: sts.Type = sts.struct(() => { + return { + accept: sts.boolean(), + subject: ValidationCodeHash, + sessionIndex: sts.number(), + validatorIndex: V2ValidatorIndex, + } +}) + +export const V2ValidatorIndex = sts.number() + +export interface V2PvfCheckStatement { + accept: boolean + subject: ValidationCodeHash + sessionIndex: number + validatorIndex: V2ValidatorIndex +} + +export type V2ValidatorIndex = number + +export type ValidationCodeHash = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasCall = ParasCall_add_trusted_validation_code | ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head | ParasCall_include_pvf_check_statement | ParasCall_poke_unused_validation_code + +/** + * Adds the validation code to the storage. + * + * The code will not be added if it is already present. Additionally, if PVF pre-checking + * is running for that code, it will be instantly accepted. + * + * Otherwise, the code will be added into the storage. Note that the code will be added + * into storage with reference count 0. This is to account the fact that there are no users + * for this code yet. The caller will have to make sure that this code eventually gets + * used by some parachain or removed from the storage to avoid storage leaks. For the latter + * prefer to use the `poke_unused_validation_code` dispatchable to raw storage manipulation. + * + * This function is mainly meant to be used for upgrading parachains that do not follow + * the go-ahead signal while the PVF pre-checking feature is enabled. + */ +export interface ParasCall_add_trusted_validation_code { + __kind: 'add_trusted_validation_code' + validationCode: ValidationCode +} + +/** + * Note a new block head for para within the context of the current block. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: Id + newHead: HeadData +} + +/** + * Put a parachain directly into the next session's action queue. + * We can't queue it any sooner than this without going into the + * initializer... + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: Id +} + +/** + * Schedule an upgrade as if it was scheduled in the given relay parent block. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: Id + newCode: ValidationCode + relayParentNumber: number +} + +/** + * Set the storage for the parachain validation code immediately. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: Id + newCode: ValidationCode +} + +/** + * Set the storage for the current parachain head data immediately. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: Id + newHead: HeadData +} + +/** + * Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and + * enacts the results if that was the last vote before achieving the supermajority. + */ +export interface ParasCall_include_pvf_check_statement { + __kind: 'include_pvf_check_statement' + stmt: V2PvfCheckStatement + signature: V2Signature +} + +/** + * Remove the validation code from the storage iff the reference count is 0. + * + * This is better than removing the storage directly, because it will not remove the code + * that was suddenly got used by some parachain while this dispatchable was pending + * dispatching. + */ +export interface ParasCall_poke_unused_validation_code { + __kind: 'poke_unused_validation_code' + validationCodeHash: ValidationCodeHash +} + +export type V2Signature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: V2InherentData, + }), + } +}) + +export const V2InherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => V2UncheckedSigned), + backedCandidates: sts.array(() => V2BackedCandidate), + disputes: sts.array(() => V2DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: H256, + number: sts.number(), + stateRoot: H256, + extrinsicsRoot: H256, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + Consensus: sts.tuple(() => [sts.bytes(), sts.bytes()]), + Other: sts.bytes(), + PreRuntime: sts.tuple(() => [sts.bytes(), sts.bytes()]), + RuntimeEnvironmentUpdated: sts.unit(), + Seal: sts.tuple(() => [sts.bytes(), sts.bytes()]), + } +}) + +export type DigestItem = DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: [Bytes, Bytes] +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: [Bytes, Bytes] +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: [Bytes, Bytes] +} + +export interface Digest { + logs: DigestItem[] +} + +export interface Header { + parentHash: H256 + number: number + stateRoot: H256 + extrinsicsRoot: H256 + digest: Digest +} + +export const V2DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: sts.number(), + statements: sts.array(() => sts.tuple(() => [V2DisputeStatement, V2ValidatorIndex, V2Signature])), + } +}) + +export const V2DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: V2InvalidDisputeStatementKind, + Valid: V2ValidDisputeStatementKind, + } +}) + +export const V2ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + BackingSeconded: H256, + BackingValid: H256, + Explicit: sts.unit(), + } +}) + +export type V2ValidDisputeStatementKind = V2ValidDisputeStatementKind_ApprovalChecking | V2ValidDisputeStatementKind_BackingSeconded | V2ValidDisputeStatementKind_BackingValid | V2ValidDisputeStatementKind_Explicit + +export interface V2ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface V2ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: H256 +} + +export interface V2ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: H256 +} + +export interface V2ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export const V2InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export type V2InvalidDisputeStatementKind = V2InvalidDisputeStatementKind_Explicit + +export interface V2InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type V2DisputeStatement = V2DisputeStatement_Invalid | V2DisputeStatement_Valid + +export interface V2DisputeStatement_Invalid { + __kind: 'Invalid' + value: V2InvalidDisputeStatementKind +} + +export interface V2DisputeStatement_Valid { + __kind: 'Valid' + value: V2ValidDisputeStatementKind +} + +export const CandidateHash = sts.bytes() + +export interface V2DisputeStatementSet { + candidateHash: CandidateHash + session: number + statements: [V2DisputeStatement, V2ValidatorIndex, V2Signature][] +} + +export type CandidateHash = Bytes + +export const V2BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: V2CommittedCandidateReceipt, + validityVotes: sts.array(() => V2ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const V2ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: V2Signature, + Implicit: V2Signature, + } +}) + +export type V2ValidityAttestation = V2ValidityAttestation_Explicit | V2ValidityAttestation_Implicit + +export interface V2ValidityAttestation_Explicit { + __kind: 'Explicit' + value: V2Signature +} + +export interface V2ValidityAttestation_Implicit { + __kind: 'Implicit' + value: V2Signature +} + +export const V2CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: V2CandidateDescriptor, + commitments: V2CandidateCommitments, + } +}) + +export const V2CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => sts.bytes()), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: sts.number(), + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: Id, + data: sts.bytes(), + } +}) + +export interface OutboundHrmpMessage { + recipient: Id + data: Bytes +} + +export interface V2CandidateCommitments { + upwardMessages: Bytes[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: number +} + +export const V2CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: Id, + relayParent: H256, + collator: sts.bytes(), + persistedValidationDataHash: H256, + povHash: H256, + erasureRoot: H256, + signature: sts.bytes(), + paraHead: H256, + validationCodeHash: ValidationCodeHash, + } +}) + +export interface V2CandidateDescriptor { + paraId: Id + relayParent: H256 + collator: Bytes + persistedValidationDataHash: H256 + povHash: H256 + erasureRoot: H256 + signature: Bytes + paraHead: H256 + validationCodeHash: ValidationCodeHash +} + +export interface V2CommittedCandidateReceipt { + descriptor: V2CandidateDescriptor + commitments: V2CandidateCommitments +} + +export interface V2BackedCandidate { + candidate: V2CommittedCandidateReceipt + validityVotes: V2ValidityAttestation[] + validatorIndices: BitSequence +} + +export const V2UncheckedSigned: sts.Type = sts.struct(() => { + return { + payload: V2AvailabilityBitfield, + validatorIndex: V2ValidatorIndex, + signature: V2Signature, + } +}) + +export const V2AvailabilityBitfield = sts.bitseq() + +export interface V2UncheckedSigned { + payload: V2AvailabilityBitfield + validatorIndex: V2ValidatorIndex + signature: V2Signature +} + +export type V2AvailabilityBitfield = BitSequence + +export interface V2InherentData { + bitfields: V2UncheckedSigned[] + backedCandidates: V2BackedCandidate[] + disputes: V2DisputeStatementSet[] + parentHeader: Header +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInherentCall = ParaInherentCall_enter + +/** + * Enter the paras inherent. This will process bitfields and backed candidates. + */ +export interface ParaInherentCall_enter { + __kind: 'enter' + data: V2InherentData +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInclusionCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const NominationPoolsCall: sts.Type = sts.closedEnum(() => { + return { + bond_extra: sts.enumStruct({ + extra: BondExtra, + }), + chill: sts.enumStruct({ + poolId: sts.number(), + }), + claim_payout: sts.unit(), + create: sts.enumStruct({ + amount: sts.bigint(), + root: MultiAddress, + nominator: MultiAddress, + stateToggler: MultiAddress, + }), + create_with_pool_id: sts.enumStruct({ + amount: sts.bigint(), + root: MultiAddress, + nominator: MultiAddress, + stateToggler: MultiAddress, + poolId: sts.number(), + }), + join: sts.enumStruct({ + amount: sts.bigint(), + poolId: sts.number(), + }), + nominate: sts.enumStruct({ + poolId: sts.number(), + validators: sts.array(() => AccountId32), + }), + pool_withdraw_unbonded: sts.enumStruct({ + poolId: sts.number(), + numSlashingSpans: sts.number(), + }), + set_configs: sts.enumStruct({ + minJoinBond: Type_328, + minCreateBond: Type_328, + maxPools: Type_329, + maxMembers: Type_329, + maxMembersPerPool: Type_329, + }), + set_metadata: sts.enumStruct({ + poolId: sts.number(), + metadata: sts.bytes(), + }), + set_state: sts.enumStruct({ + poolId: sts.number(), + state: PoolState, + }), + unbond: sts.enumStruct({ + memberAccount: MultiAddress, + unbondingPoints: sts.bigint(), + }), + update_roles: sts.enumStruct({ + poolId: sts.number(), + newRoot: Type_330, + newNominator: Type_330, + newStateToggler: Type_330, + }), + withdraw_unbonded: sts.enumStruct({ + memberAccount: MultiAddress, + numSlashingSpans: sts.number(), + }), + } +}) + +export const Type_330: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: AccountId32, + } +}) + +export type Type_330 = Type_330_Noop | Type_330_Remove | Type_330_Set + +export interface Type_330_Noop { + __kind: 'Noop' +} + +export interface Type_330_Remove { + __kind: 'Remove' +} + +export interface Type_330_Set { + __kind: 'Set' + value: AccountId32 +} + +export const PoolState: sts.Type = sts.closedEnum(() => { + return { + Blocked: sts.unit(), + Destroying: sts.unit(), + Open: sts.unit(), + } +}) + +export type PoolState = PoolState_Blocked | PoolState_Destroying | PoolState_Open + +export interface PoolState_Blocked { + __kind: 'Blocked' +} + +export interface PoolState_Destroying { + __kind: 'Destroying' +} + +export interface PoolState_Open { + __kind: 'Open' +} + +export const Type_329: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_329 = Type_329_Noop | Type_329_Remove | Type_329_Set + +export interface Type_329_Noop { + __kind: 'Noop' +} + +export interface Type_329_Remove { + __kind: 'Remove' +} + +export interface Type_329_Set { + __kind: 'Set' + value: number +} + +export const Type_328: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type Type_328 = Type_328_Noop | Type_328_Remove | Type_328_Set + +export interface Type_328_Noop { + __kind: 'Noop' +} + +export interface Type_328_Remove { + __kind: 'Remove' +} + +export interface Type_328_Set { + __kind: 'Set' + value: bigint +} + +export const BondExtra: sts.Type = sts.closedEnum(() => { + return { + FreeBalance: sts.bigint(), + Rewards: sts.unit(), + } +}) + +export type BondExtra = BondExtra_FreeBalance | BondExtra_Rewards + +export interface BondExtra_FreeBalance { + __kind: 'FreeBalance' + value: bigint +} + +export interface BondExtra_Rewards { + __kind: 'Rewards' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type NominationPoolsCall = NominationPoolsCall_bond_extra | NominationPoolsCall_chill | NominationPoolsCall_claim_payout | NominationPoolsCall_create | NominationPoolsCall_create_with_pool_id | NominationPoolsCall_join | NominationPoolsCall_nominate | NominationPoolsCall_pool_withdraw_unbonded | NominationPoolsCall_set_configs | NominationPoolsCall_set_metadata | NominationPoolsCall_set_state | NominationPoolsCall_unbond | NominationPoolsCall_update_roles | NominationPoolsCall_withdraw_unbonded + +/** + * Bond `extra` more funds from `origin` into the pool to which they already belong. + * + * Additional funds can come from either the free balance of the account, of from the + * accumulated rewards, see [`BondExtra`]. + * + * Bonding extra funds implies an automatic payout of all pending rewards as well. + */ +export interface NominationPoolsCall_bond_extra { + __kind: 'bond_extra' + extra: BondExtra +} + +/** + * Chill on behalf of the pool. + * + * The dispatch origin of this call must be signed by the pool nominator or the pool + * root role, same as [`Pallet::nominate`]. + * + * This directly forward the call to the staking pallet, on behalf of the pool bonded + * account. + */ +export interface NominationPoolsCall_chill { + __kind: 'chill' + poolId: number +} + +/** + * A bonded member can use this to claim their payout based on the rewards that the pool + * has accumulated since their last claimed payout (OR since joining if this is there first + * time claiming rewards). The payout will be transferred to the member's account. + * + * The member will earn rewards pro rata based on the members stake vs the sum of the + * members in the pools stake. Rewards do not "expire". + */ +export interface NominationPoolsCall_claim_payout { + __kind: 'claim_payout' +} + +/** + * Create a new delegation pool. + * + * # Arguments + * + * * `amount` - The amount of funds to delegate to the pool. This also acts of a sort of + * deposit since the pools creator cannot fully unbond funds until the pool is being + * destroyed. + * * `index` - A disambiguation index for creating the account. Likely only useful when + * creating multiple pools in the same extrinsic. + * * `root` - The account to set as [`PoolRoles::root`]. + * * `nominator` - The account to set as the [`PoolRoles::nominator`]. + * * `state_toggler` - The account to set as the [`PoolRoles::state_toggler`]. + * + * # Note + * + * In addition to `amount`, the caller will transfer the existential deposit; so the caller + * needs at have at least `amount + existential_deposit` transferrable. + */ +export interface NominationPoolsCall_create { + __kind: 'create' + amount: bigint + root: MultiAddress + nominator: MultiAddress + stateToggler: MultiAddress +} + +/** + * Create a new delegation pool with a previously used pool id + * + * # Arguments + * + * same as `create` with the inclusion of + * * `pool_id` - `A valid PoolId. + */ +export interface NominationPoolsCall_create_with_pool_id { + __kind: 'create_with_pool_id' + amount: bigint + root: MultiAddress + nominator: MultiAddress + stateToggler: MultiAddress + poolId: number +} + +/** + * Stake funds with a pool. The amount to bond is transferred from the member to the + * pools account and immediately increases the pools bond. + * + * # Note + * + * * An account can only be a member of a single pool. + * * An account cannot join the same pool multiple times. + * * This call will *not* dust the member account, so the member must have at least + * `existential deposit + amount` in their account. + * * Only a pool with [`PoolState::Open`] can be joined + */ +export interface NominationPoolsCall_join { + __kind: 'join' + amount: bigint + poolId: number +} + +/** + * Nominate on behalf of the pool. + * + * The dispatch origin of this call must be signed by the pool nominator or the pool + * root role. + * + * This directly forward the call to the staking pallet, on behalf of the pool bonded + * account. + */ +export interface NominationPoolsCall_nominate { + __kind: 'nominate' + poolId: number + validators: AccountId32[] +} + +/** + * Call `withdraw_unbonded` for the pools account. This call can be made by any account. + * + * This is useful if their are too many unlocking chunks to call `unbond`, and some + * can be cleared by withdrawing. In the case there are too many unlocking chunks, the user + * would probably see an error like `NoMoreChunks` emitted from the staking system when + * they attempt to unbond. + */ +export interface NominationPoolsCall_pool_withdraw_unbonded { + __kind: 'pool_withdraw_unbonded' + poolId: number + numSlashingSpans: number +} + +/** + * Update configurations for the nomination pools. The origin for this call must be + * Root. + * + * # Arguments + * + * * `min_join_bond` - Set [`MinJoinBond`]. + * * `min_create_bond` - Set [`MinCreateBond`]. + * * `max_pools` - Set [`MaxPools`]. + * * `max_members` - Set [`MaxPoolMembers`]. + * * `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]. + */ +export interface NominationPoolsCall_set_configs { + __kind: 'set_configs' + minJoinBond: Type_328 + minCreateBond: Type_328 + maxPools: Type_329 + maxMembers: Type_329 + maxMembersPerPool: Type_329 +} + +/** + * Set a new metadata for the pool. + * + * The dispatch origin of this call must be signed by the state toggler, or the root role + * of the pool. + */ +export interface NominationPoolsCall_set_metadata { + __kind: 'set_metadata' + poolId: number + metadata: Bytes +} + +/** + * Set a new state for the pool. + * + * If a pool is already in the `Destroying` state, then under no condition can its state + * change again. + * + * The dispatch origin of this call must be either: + * + * 1. signed by the state toggler, or the root role of the pool, + * 2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and + * then the state of the pool can be permissionlessly changed to `Destroying`. + */ +export interface NominationPoolsCall_set_state { + __kind: 'set_state' + poolId: number + state: PoolState +} + +/** + * Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It + * implicitly collects the rewards one last time, since not doing so would mean some + * rewards would be forfeited. + * + * Under certain conditions, this call can be dispatched permissionlessly (i.e. by any + * account). + * + * # Conditions for a permissionless dispatch. + * + * * The pool is blocked and the caller is either the root or state-toggler. This is + * refereed to as a kick. + * * The pool is destroying and the member is not the depositor. + * * The pool is destroying, the member is the depositor and no other members are in the + * pool. + * + * ## Conditions for permissioned dispatch (i.e. the caller is also the + * `member_account`): + * + * * The caller is not the depositor. + * * The caller is the depositor, the pool is destroying and no other members are in the + * pool. + * + * # Note + * + * If there are too many unlocking chunks to unbond with the pool account, + * [`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks. If + * there are too many unlocking chunks, the result of this call will likely be the + * `NoMoreChunks` error from the staking system. + */ +export interface NominationPoolsCall_unbond { + __kind: 'unbond' + memberAccount: MultiAddress + unbondingPoints: bigint +} + +/** + * Update the roles of the pool. + * + * The root is the only entity that can change any of the roles, including itself, + * excluding the depositor, who can never change. + * + * It emits an event, notifying UIs of the role change. This event is quite relevant to + * most pool members and they should be informed of changes to pool roles. + */ +export interface NominationPoolsCall_update_roles { + __kind: 'update_roles' + poolId: number + newRoot: Type_330 + newNominator: Type_330 + newStateToggler: Type_330 +} + +/** + * Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an + * error is returned. + * + * Under certain conditions, this call can be dispatched permissionlessly (i.e. by any + * account). + * + * # Conditions for a permissionless dispatch + * + * * The pool is in destroy mode and the target is not the depositor. + * * The target is the depositor and they are the only member in the sub pools. + * * The pool is blocked and the caller is either the root or state-toggler. + * + * # Conditions for permissioned dispatch + * + * * The caller is the target and they are not the depositor. + * + * # Note + * + * If the target is the depositor, the pool will be destroyed. + */ +export interface NominationPoolsCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + memberAccount: MultiAddress + numSlashingSpans: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const NisCounterpartBalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type NisCounterpartBalancesCall = NisCounterpartBalancesCall_force_transfer | NisCounterpartBalancesCall_force_unreserve | NisCounterpartBalancesCall_set_balance | NisCounterpartBalancesCall_transfer | NisCounterpartBalancesCall_transfer_all | NisCounterpartBalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is not + * assumed to be in the overlay. + * # + */ +export interface NisCounterpartBalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * Unreserve some balance from a user by force. + * + * Can only be called by ROOT. + */ +export interface NisCounterpartBalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also alter the total issuance of the system (`TotalIssuance`) appropriately. + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + */ +export interface NisCounterpartBalancesCall_set_balance { + __kind: 'set_balance' + who: MultiAddress + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for input config + * types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex + * computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional check + * that the transfer will not kill the origin account. + * --------------------------------- + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface NisCounterpartBalancesCall_transfer { + __kind: 'transfer' + dest: MultiAddress + value: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). # + * - O(1). Just like transfer, but reading the user's transferable balance first. + * # + */ +export interface NisCounterpartBalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + */ +export interface NisCounterpartBalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const NisCall: sts.Type = sts.closedEnum(() => { + return { + fund_deficit: sts.unit(), + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + thaw: sts.enumStruct({ + index: sts.number(), + portion: sts.option(() => sts.bigint()), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type NisCall = NisCall_fund_deficit | NisCall_place_bid | NisCall_retract_bid | NisCall_thaw + +/** + * Ensure we have sufficient funding for all potential payouts. + * + * - `origin`: Must be accepted by `FundOrigin`. + */ +export interface NisCall_fund_deficit { + __kind: 'fund_deficit' +} + +/** + * Place a bid. + * + * Origin must be Signed, and account must have at least `amount` in free balance. + * + * - `amount`: The amount of the bid; these funds will be reserved, and if/when + * consolidated, removed. Must be at least `MinBid`. + * - `duration`: The number of periods before which the newly consolidated bid may be + * thawed. Must be greater than 1 and no more than `QueueCount`. + * + * Complexities: + * - `Queues[duration].len()` (just take max). + */ +export interface NisCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * Retract a previously placed bid. + * + * Origin must be Signed, and the account should have previously issued a still-active bid + * of `amount` for `duration`. + * + * - `amount`: The amount of the previous bid. + * - `duration`: The duration of the previous bid. + */ +export interface NisCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * Reduce or remove an outstanding receipt, placing the according proportion of funds into + * the account of the owner. + * + * - `origin`: Must be Signed and the account must be the owner of the receipt `index` as + * well as any fungible counterpart. + * - `index`: The index of the receipt. + * - `portion`: If `Some`, then only the given portion of the receipt should be thawed. If + * `None`, then all of it should be. + */ +export interface NisCall_thaw { + __kind: 'thaw' + index: number + portion?: (bigint | undefined) +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + call: Call, + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId32), + call: Call, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account] + * - Writes: Multisig Storage, [Caller Account] + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + call: Call + maxWeight: Weight +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId32[] + call: Call +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account + * - Write: Multisig Storage, [Caller Account], Refund Account + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId32[] + timepoint: Timepoint + callHash: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const InitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type InitializerCall = InitializerCall_force_approve + +/** + * Issue a signal to the consensus engine to forcibly act as though all parachain + * blocks in all relay chain blocks up to and including the given number in the current + * chain are valid and should be finalized. + */ +export interface InitializerCall_force_approve { + __kind: 'force_approve' + upTo: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: sts.number(), + }), + force_transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: sts.number(), + }), + freeze: sts.enumStruct({ + index: sts.number(), + }), + transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: number +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: MultiAddress + index: number + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: number +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the + * deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: number +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: MultiAddress + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: sts.bytes(), + }), + } +}) + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: sts.number(), + networkState: OpaqueNetworkState, + sessionIndex: sts.number(), + authorityIndex: sts.number(), + validatorsLen: sts.number(), + } +}) + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export interface Heartbeat { + blockNumber: number + networkState: OpaqueNetworkState + sessionIndex: number + authorityIndex: number + validatorsLen: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is + * length of `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Bytes +} + +/** + * Identity pallet declaration. + */ +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: MultiAddress, + }), + add_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: sts.number(), + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: MultiAddress, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: MultiAddress, + judgement: Judgement, + identity: H256, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: MultiAddress, + }), + rename_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: MultiAddress, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: BitFlags, + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId32, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => sts.tuple(() => [Data, Data])), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => sts.bytes()), + image: Data, + twitter: Data, + } +}) + +export interface IdentityInfo { + additional: [Data, Data][] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (Bytes | undefined) + image: Data + twitter: Data +} + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: Bytes +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: Bytes +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: Bytes +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: Bytes +} + +export const BitFlags = sts.bigint() + +export const Judgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: sts.bigint(), + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export type Judgement = Judgement_Erroneous | Judgement_FeePaid | Judgement_KnownGood | Judgement_LowQuality | Judgement_OutOfDate | Judgement_Reasonable | Judgement_Unknown + +export interface Judgement_Erroneous { + __kind: 'Erroneous' +} + +export interface Judgement_FeePaid { + __kind: 'FeePaid' + value: bigint +} + +export interface Judgement_KnownGood { + __kind: 'KnownGood' +} + +export interface Judgement_LowQuality { + __kind: 'LowQuality' +} + +export interface Judgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface Judgement_Reasonable { + __kind: 'Reasonable' +} + +export interface Judgement_Unknown { + __kind: 'Unknown' +} + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: sts.bytes(), + Keccak256: sts.bytes(), + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: sts.bytes(), + ShaThree256: sts.bytes(), + } +}) + +/** + * Identity pallet declaration. + */ +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: MultiAddress +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: MultiAddress + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: number +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: MultiAddress +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * - `identity`: The hash of the [`IdentityInfo`] for that the judgement is provided. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: MultiAddress + judgement: Judgement + identity: H256 +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: MultiAddress +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: MultiAddress + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: MultiAddress +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: BitFlags +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId32, Data][] +} + +export type BitFlags = bigint + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const HrmpCall: sts.Type = sts.closedEnum(() => { + return { + force_clean_hrmp: sts.enumStruct({ + para: Id, + inbound: sts.number(), + outbound: sts.number(), + }), + force_open_hrmp_channel: sts.enumStruct({ + sender: Id, + recipient: Id, + maxCapacity: sts.number(), + maxMessageSize: sts.number(), + }), + force_process_hrmp_close: sts.enumStruct({ + channels: sts.number(), + }), + force_process_hrmp_open: sts.enumStruct({ + channels: sts.number(), + }), + hrmp_accept_open_channel: sts.enumStruct({ + sender: Id, + }), + hrmp_cancel_open_request: sts.enumStruct({ + channelId: HrmpChannelId, + openRequests: sts.number(), + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: Id, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: Id, + recipient: Id, + } +}) + +export interface HrmpChannelId { + sender: Id + recipient: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type HrmpCall = HrmpCall_force_clean_hrmp | HrmpCall_force_open_hrmp_channel | HrmpCall_force_process_hrmp_close | HrmpCall_force_process_hrmp_open | HrmpCall_hrmp_accept_open_channel | HrmpCall_hrmp_cancel_open_request | HrmpCall_hrmp_close_channel | HrmpCall_hrmp_init_open_channel + +/** + * This extrinsic triggers the cleanup of all the HRMP storage items that + * a para may have. Normally this happens once per session, but this allows + * you to trigger the cleanup immediately for a specific parachain. + * + * Origin must be Root. + * + * Number of inbound and outbound channels for `para` must be provided as witness data of weighing. + */ +export interface HrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: Id + inbound: number + outbound: number +} + +/** + * Open a channel from a `sender` to a `recipient` `ParaId` using the Root origin. Although + * opened by Root, the `max_capacity` and `max_message_size` are still subject to the Relay + * Chain's configured limits. + * + * Expected use is when one of the `ParaId`s involved in the channel is governed by the + * Relay Chain, e.g. a common good parachain. + */ +export interface HrmpCall_force_open_hrmp_channel { + __kind: 'force_open_hrmp_channel' + sender: Id + recipient: Id + maxCapacity: number + maxMessageSize: number +} + +/** + * Force process HRMP close channel requests. + * + * If there are pending HRMP close channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of closing channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' + channels: number +} + +/** + * Force process HRMP open channel requests. + * + * If there are pending HRMP open channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of opening channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' + channels: number +} + +/** + * Accept a pending open channel request from the given sender. + * + * The channel will be opened only on the next session boundary. + */ +export interface HrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: Id +} + +/** + * This cancels a pending open channel request. It can be canceled by either of the sender + * or the recipient for that request. The origin must be either of those. + * + * The cancellation happens immediately. It is not possible to cancel the request if it is + * already accepted. + * + * Total number of open requests (i.e. `HrmpOpenChannelRequestsList`) must be provided as + * witness data. + */ +export interface HrmpCall_hrmp_cancel_open_request { + __kind: 'hrmp_cancel_open_request' + channelId: HrmpChannelId + openRequests: number +} + +/** + * Initiate unilateral closing of a channel. The origin must be either the sender or the + * recipient in the channel being closed. + * + * The closure can only happen on a session change. + */ +export interface HrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * Initiate opening a channel from a parachain to a given recipient with given channel + * parameters. + * + * - `proposed_max_capacity` - specifies how many messages can be in the channel at once. + * - `proposed_max_message_size` - specifies the maximum size of the messages. + * + * These numbers are a subject to the relay-chain configuration limits. + * + * The channel can be opened only after the recipient confirms it and only on a session + * change. + */ +export interface HrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: Id + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: sts.number(), + bestFinalizedBlockNumber: sts.number(), + }), + report_equivocation: sts.enumStruct({ + equivocationProof: Type_112, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_112, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: sts.number(), + trieNodes: sts.array(() => sts.bytes()), + validatorCount: sts.number(), + } +}) + +export interface MembershipProof { + session: number + trieNodes: Bytes[] + validatorCount: number +} + +export const Type_112: sts.Type = sts.struct(() => { + return { + setId: sts.bigint(), + equivocation: Equivocation, + } +}) + +export const Equivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: Type_120, + Prevote: Type_114, + } +}) + +export const Type_114: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Prevote, Signature]), + second: sts.tuple(() => [Prevote, Signature]), + } +}) + +export const Signature = sts.bytes() + +export const Prevote: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Prevote { + targetHash: H256 + targetNumber: number +} + +export interface Type_114 { + roundNumber: bigint + identity: Public + first: [Prevote, Signature] + second: [Prevote, Signature] +} + +export type Signature = Bytes + +export const Type_120: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Precommit, Signature]), + second: sts.tuple(() => [Precommit, Signature]), + } +}) + +export const Precommit: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Precommit { + targetHash: H256 + targetNumber: number +} + +export interface Type_120 { + roundNumber: bigint + identity: Public + first: [Precommit, Signature] + second: [Precommit, Signature] +} + +export type Equivocation = Equivocation_Precommit | Equivocation_Prevote + +export interface Equivocation_Precommit { + __kind: 'Precommit' + value: Type_120 +} + +export interface Equivocation_Prevote { + __kind: 'Prevote' + value: Type_114 +} + +export interface Type_112 { + setId: bigint + equivocation: Equivocation +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has stalled. + * + * This will trigger a forced authority set change at the beginning of the next session, to + * be enacted `delay` blocks after that. The `delay` should be high enough to safely assume + * that the block signalling the forced change will not be re-orged e.g. 1000 blocks. + * The block production rate (which may be slowed down because of finality lagging) should + * be taken into account when choosing the `delay`. The GRANDPA voters based on the new + * authority will start voting on top of `best_finalized_block_number` for new finalized + * blocks. `best_finalized_block_number` should be the highest of the latest finalized + * block of all validators of the new authority set. + * + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: number + bestFinalizedBlockNumber: number +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_112 + keyOwnerProof: MembershipProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_112 + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const FellowshipReferendaCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + index: sts.number(), + }), + kill: sts.enumStruct({ + index: sts.number(), + }), + nudge_referendum: sts.enumStruct({ + index: sts.number(), + }), + one_fewer_deciding: sts.enumStruct({ + track: sts.number(), + }), + place_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_submission_deposit: sts.enumStruct({ + index: sts.number(), + }), + submit: sts.enumStruct({ + proposalOrigin: OriginCaller, + proposal: Bounded, + enactmentMoment: DispatchTime, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type FellowshipReferendaCall = FellowshipReferendaCall_cancel | FellowshipReferendaCall_kill | FellowshipReferendaCall_nudge_referendum | FellowshipReferendaCall_one_fewer_deciding | FellowshipReferendaCall_place_decision_deposit | FellowshipReferendaCall_refund_decision_deposit | FellowshipReferendaCall_refund_submission_deposit | FellowshipReferendaCall_submit + +/** + * Cancel an ongoing referendum. + * + * - `origin`: must be the `CancelOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Cancelled`. + */ +export interface FellowshipReferendaCall_cancel { + __kind: 'cancel' + index: number +} + +/** + * Cancel an ongoing referendum and slash the deposits. + * + * - `origin`: must be the `KillOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Killed` and `DepositSlashed`. + */ +export interface FellowshipReferendaCall_kill { + __kind: 'kill' + index: number +} + +/** + * Advance a referendum onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `index`: the referendum to be advanced. + */ +export interface FellowshipReferendaCall_nudge_referendum { + __kind: 'nudge_referendum' + index: number +} + +/** + * Advance a track onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `track`: the track to be advanced. + * + * Action item for when there is now one fewer referendum in the deciding phase and the + * `DecidingCount` is not yet updated. This means that we should either: + * - begin deciding another referendum (and leave `DecidingCount` alone); or + * - decrement `DecidingCount`. + */ +export interface FellowshipReferendaCall_one_fewer_deciding { + __kind: 'one_fewer_deciding' + track: number +} + +/** + * Post the Decision Deposit for a referendum. + * + * - `origin`: must be `Signed` and the account must have funds available for the + * referendum's track's Decision Deposit. + * - `index`: The index of the submitted referendum whose Decision Deposit is yet to be + * posted. + * + * Emits `DecisionDepositPlaced`. + */ +export interface FellowshipReferendaCall_place_decision_deposit { + __kind: 'place_decision_deposit' + index: number +} + +/** + * Refund the Decision Deposit for a closed referendum back to the depositor. + * + * - `origin`: must be `Signed` or `Root`. + * - `index`: The index of a closed referendum whose Decision Deposit has not yet been + * refunded. + * + * Emits `DecisionDepositRefunded`. + */ +export interface FellowshipReferendaCall_refund_decision_deposit { + __kind: 'refund_decision_deposit' + index: number +} + +/** + * Refund the Submission Deposit for a closed referendum back to the depositor. + * + * - `origin`: must be `Signed` or `Root`. + * - `index`: The index of a closed referendum whose Submission Deposit has not yet been + * refunded. + * + * Emits `SubmissionDepositRefunded`. + */ +export interface FellowshipReferendaCall_refund_submission_deposit { + __kind: 'refund_submission_deposit' + index: number +} + +/** + * Propose a referendum on a privileged action. + * + * - `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds + * available. + * - `proposal_origin`: The origin from which the proposal should be executed. + * - `proposal`: The proposal. + * - `enactment_moment`: The moment that the proposal should be enacted. + * + * Emits `Submitted`. + */ +export interface FellowshipReferendaCall_submit { + __kind: 'submit' + proposalOrigin: OriginCaller + proposal: Bounded + enactmentMoment: DispatchTime +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const FellowshipCollectiveCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: MultiAddress, + }), + cleanup_poll: sts.enumStruct({ + pollIndex: sts.number(), + max: sts.number(), + }), + demote_member: sts.enumStruct({ + who: MultiAddress, + }), + promote_member: sts.enumStruct({ + who: MultiAddress, + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + minRank: sts.number(), + }), + vote: sts.enumStruct({ + poll: sts.number(), + aye: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type FellowshipCollectiveCall = FellowshipCollectiveCall_add_member | FellowshipCollectiveCall_cleanup_poll | FellowshipCollectiveCall_demote_member | FellowshipCollectiveCall_promote_member | FellowshipCollectiveCall_remove_member | FellowshipCollectiveCall_vote + +/** + * Introduce a new member. + * + * - `origin`: Must be the `AdminOrigin`. + * - `who`: Account of non-member which will become a member. + * - `rank`: The rank to give the new member. + * + * Weight: `O(1)` + */ +export interface FellowshipCollectiveCall_add_member { + __kind: 'add_member' + who: MultiAddress +} + +/** + * Remove votes from the given poll. It must have ended. + * + * - `origin`: Must be `Signed` by any account. + * - `poll_index`: Index of a poll which is completed and for which votes continue to + * exist. + * - `max`: Maximum number of vote items from remove in this call. + * + * Transaction fees are waived if the operation is successful. + * + * Weight `O(max)` (less if there are fewer items to remove than `max`). + */ +export interface FellowshipCollectiveCall_cleanup_poll { + __kind: 'cleanup_poll' + pollIndex: number + max: number +} + +/** + * Decrement the rank of an existing member by one. If the member is already at rank zero, + * then they are removed entirely. + * + * - `origin`: Must be the `AdminOrigin`. + * - `who`: Account of existing member of rank greater than zero. + * + * Weight: `O(1)`, less if the member's index is highest in its rank. + */ +export interface FellowshipCollectiveCall_demote_member { + __kind: 'demote_member' + who: MultiAddress +} + +/** + * Increment the rank of an existing member by one. + * + * - `origin`: Must be the `AdminOrigin`. + * - `who`: Account of existing member. + * + * Weight: `O(1)` + */ +export interface FellowshipCollectiveCall_promote_member { + __kind: 'promote_member' + who: MultiAddress +} + +/** + * Remove the member entirely. + * + * - `origin`: Must be the `AdminOrigin`. + * - `who`: Account of existing member of rank greater than zero. + * - `min_rank`: The rank of the member or greater. + * + * Weight: `O(min_rank)`. + */ +export interface FellowshipCollectiveCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + minRank: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * - `origin`: Must be `Signed` by a member account. + * - `poll`: Index of a poll which is ongoing. + * - `aye`: `true` if the vote is to approve the proposal, `false` otherwise. + * + * Transaction fees are be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * + * Weight: `O(1)`, less if there was no previous vote on the poll by the member. + */ +export interface FellowshipCollectiveCall_vote { + __kind: 'vote' + poll: number + aye: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const FastUnstakeCall: sts.Type = sts.closedEnum(() => { + return { + control: sts.enumStruct({ + uncheckedErasToCheck: sts.number(), + }), + deregister: sts.unit(), + register_fast_unstake: sts.unit(), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type FastUnstakeCall = FastUnstakeCall_control | FastUnstakeCall_deregister | FastUnstakeCall_register_fast_unstake + +/** + * Control the operation of this pallet. + * + * Dispatch origin must be signed by the [`Config::ControlOrigin`]. + */ +export interface FastUnstakeCall_control { + __kind: 'control' + uncheckedErasToCheck: number +} + +/** + * Deregister oneself from the fast-unstake. + * + * This is useful if one is registered, they are still waiting, and they change their mind. + * + * Note that the associated stash is still fully unbonded and chilled as a consequence of + * calling `register_fast_unstake`. This should probably be followed by a call to + * `Staking::rebond`. + */ +export interface FastUnstakeCall_deregister { + __kind: 'deregister' +} + +/** + * Register oneself for fast-unstake. + * + * The dispatch origin of this call must be signed by the controller account, similar to + * `staking::unbond`. + * + * The stash associated with the origin must have no ongoing unlocking chunks. If + * successful, this will fully unbond and chill the stash. Then, it will enqueue the stash + * to be checked in further blocks. + * + * If by the time this is called, the stash is actually eligible for fast-unstake, then + * they are guaranteed to remain eligible, because the call will chill them as well. + * + * If the check works, the entire staking data is removed, i.e. the stash is fully + * unstaked. + * + * If the check fails, the stash remains chilled and waiting for being unbonded as in with + * the normal staking system, but they lose part of their unbonding chunks due to consuming + * the chain's resources. + */ +export interface FastUnstakeCall_register_fast_unstake { + __kind: 'register_fast_unstake' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + governance_fallback: sts.enumStruct({ + maybeMaxVoters: sts.option(() => sts.number()), + maybeMaxTargets: sts.option(() => sts.number()), + }), + set_emergency_election_result: sts.enumStruct({ + supports: sts.array(() => sts.tuple(() => [AccountId32, Support])), + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => ElectionScore), + }), + submit: sts.enumStruct({ + rawSolution: RawSolution, + }), + submit_unsigned: sts.enumStruct({ + rawSolution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export const RawSolution: sts.Type = sts.struct(() => { + return { + solution: NposCompactSolution24, + score: ElectionScore, + round: sts.number(), + } +}) + +export const NposCompactSolution24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), + votes2: sts.array(() => sts.tuple(() => [sts.number(), sts.tuple(() => [sts.number(), sts.number()]), sts.number()])), + votes3: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes4: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes5: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes6: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes7: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes8: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes9: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes10: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes11: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes12: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes13: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes14: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes15: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes16: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes17: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes18: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes19: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes20: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes21: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes22: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes23: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes24: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + } +}) + +export interface NposCompactSolution24 { + votes1: [number, number][] + votes2: [number, [number, number], number][] + votes3: [number, [number, number][], number][] + votes4: [number, [number, number][], number][] + votes5: [number, [number, number][], number][] + votes6: [number, [number, number][], number][] + votes7: [number, [number, number][], number][] + votes8: [number, [number, number][], number][] + votes9: [number, [number, number][], number][] + votes10: [number, [number, number][], number][] + votes11: [number, [number, number][], number][] + votes12: [number, [number, number][], number][] + votes13: [number, [number, number][], number][] + votes14: [number, [number, number][], number][] + votes15: [number, [number, number][], number][] + votes16: [number, [number, number][], number][] + votes17: [number, [number, number][], number][] + votes18: [number, [number, number][], number][] + votes19: [number, [number, number][], number][] + votes20: [number, [number, number][], number][] + votes21: [number, [number, number][], number][] + votes22: [number, [number, number][], number][] + votes23: [number, [number, number][], number][] + votes24: [number, [number, number][], number][] +} + +export interface RawSolution { + solution: NposCompactSolution24 + score: ElectionScore + round: number +} + +export interface ElectionScore { + minimalStake: bigint + sumStake: bigint + sumStakeSquared: bigint +} + +export const ElectionScore: sts.Type = sts.struct(() => { + return { + minimalStake: sts.bigint(), + sumStake: sts.bigint(), + sumStakeSquared: sts.bigint(), + } +}) + +export const Support: sts.Type = sts.struct(() => { + return { + total: sts.bigint(), + voters: sts.array(() => sts.tuple(() => [AccountId32, sts.bigint()])), + } +}) + +export interface Support { + total: bigint + voters: [AccountId32, bigint][] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_governance_fallback | ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * Trigger the governance fallback. + * + * This can only be called when [`Phase::Emergency`] is enabled, as an alternative to + * calling [`Call::set_emergency_election_result`]. + */ +export interface ElectionProviderMultiPhaseCall_governance_fallback { + __kind: 'governance_fallback' + maybeMaxVoters?: (number | undefined) + maybeMaxTargets?: (number | undefined) +} + +/** + * Set a solution in the queue, to be handed out to the client of this pallet in the next + * call to `ElectionProvider::elect`. + * + * This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`. + * + * The solution is not checked for any feasibility and is assumed to be trustworthy, as any + * feasibility check itself can in principle cause the election process to fail (due to + * memory/weight constrains). + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + supports: [AccountId32, Support][] +} + +/** + * Set a new value for `MinimumUntrustedScore`. + * + * Dispatch origin must be aligned with `T::ForceOrigin`. + * + * This check can be turned off by setting the value to `None`. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (ElectionScore | undefined) +} + +/** + * Submit a solution for the signed phase. + * + * The dispatch origin fo this call must be __signed__. + * + * The solution is potentially queued, based on the claimed score and processed at the end + * of the signed phase. + * + * A deposit is reserved and recorded for the solution. Based on the outcome, the solution + * might be rewarded, slashed, or get all or a part of the deposit back. + */ +export interface ElectionProviderMultiPhaseCall_submit { + __kind: 'submit' + rawSolution: RawSolution +} + +/** + * Submit a solution for the unsigned phase. + * + * The dispatch origin fo this call must be __none__. + * + * This submission is checked on the fly. Moreover, this unsigned solution is only + * validated when submitted to the pool from the **local** node. Effectively, this means + * that only active validators can submit this transaction when authoring a block (similar + * to an inherent). + * + * To prevent any incorrect solution (and thus wasted time/weight), this transaction will + * panic if the solution submitted by the validator is invalid in any way, effectively + * putting their authoring reward at risk. + * + * No deposit or reward is associated with this submission. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + rawSolution: RawSolution + witness: SolutionOrSnapshotSize +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DmpCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + blacklist: sts.enumStruct({ + proposalHash: H256, + maybeRefIndex: sts.option(() => sts.number()), + }), + cancel_proposal: sts.enumStruct({ + propIndex: sts.number(), + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: MultiAddress, + conviction: Conviction, + balance: sts.bigint(), + }), + emergency_cancel: sts.enumStruct({ + refIndex: sts.number(), + }), + external_propose: sts.enumStruct({ + proposal: Bounded, + }), + external_propose_default: sts.enumStruct({ + proposal: Bounded, + }), + external_propose_majority: sts.enumStruct({ + proposal: Bounded, + }), + fast_track: sts.enumStruct({ + proposalHash: H256, + votingPeriod: sts.number(), + delay: sts.number(), + }), + propose: sts.enumStruct({ + proposal: Bounded, + value: sts.bigint(), + }), + remove_other_vote: sts.enumStruct({ + target: MultiAddress, + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + index: sts.number(), + }), + second: sts.enumStruct({ + proposal: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: MultiAddress, + }), + veto_external: sts.enumStruct({ + proposalHash: H256, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface AccountVote_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DemocracyCall = DemocracyCall_blacklist | DemocracyCall_cancel_proposal | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_propose | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. + * + * If called on a queued public or external proposal, then this will result in it being + * removed. If the `ref_index` supplied is an active referendum with the proposal hash, + * then it will be cancelled. + * + * The dispatch origin of this call must be `BlacklistOrigin`. + * + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. + * + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). + */ +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: H256 + maybeRefIndex?: (number | undefined) +} + +/** + * Remove a proposal. + * + * The dispatch origin of this call must be `CancelProposalOrigin`. + * + * - `prop_index`: The index of the proposal to cancel. + * + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must not + * be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: MultiAddress + conviction: Conviction + balance: bigint +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: number +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposal: Bounded +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposal: Bounded +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposal: Bounded +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * Must be always greater than zero. + * For `FastTrackOrigin` must be equal or greater than `FastTrackVotingPeriod`. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: H256 + votingPeriod: number + delay: number +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposal: Bounded + value: bigint +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: MultiAddress + index: number +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: number +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: MultiAddress +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * Weight: `O(V + log(V))` where V is number of `existing vetoers` + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: H256 +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: Id, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + contribute_all: sts.enumStruct({ + index: sts.number(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: Id, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId32, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_contribute_all | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * Add an optional memo to an existing crowdloan contribution. + * + * Origin must be Signed, and the user must have contributed to the crowdloan. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: Id + memo: Bytes +} + +/** + * Contribute to a crowd sale. This will transfer some balance over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * Contribute your entire balance to a crowd sale. This will transfer the entire balance of a user over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute_all { + __kind: 'contribute_all' + index: number + signature?: (MultiSignature | undefined) +} + +/** + * Create a new crowdloaning campaign for a parachain slot with the given lease period range. + * + * This applies a lock to your parachain configuration, ensuring that it cannot be changed + * by the parachain manager. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Remove a fund after the retirement period has ended and all funds have been returned. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * Edit the configuration for an in-progress crowdloan. + * + * Can only be called by Root origin. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Poke the fund into `NewRaise` + * + * Origin must be Signed, and the fund has non-zero raise. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: Id +} + +/** + * Automatically refund contributors of an ended crowdloan. + * Due to weight restrictions, this function may need to be called multiple + * times to fully refund all users. We will refund `RemoveKeysLimit` users at a time. + * + * Origin must be signed, but can come from anyone. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * Withdraw full balance of a specific contributor. + * + * Origin must be signed, but can come from anyone. + * + * The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement + * flag must be set. For a fund to be ready for retirement, then: + * - it must not already be in retirement; + * - the amount of raised funds must be bigger than the _free_ balance of the account; + * - and either: + * - the block number must be at least `end`; or + * - the current lease period must be greater than the fund's `last_period`. + * + * In this case, the fund's retirement flag is set and its `end` is reset to the current block + * number. + * + * - `who`: The account whose contribution should be withdrawn. + * - `index`: The parachain to whose crowdloan the contribution was made. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: Weight, + lengthBound: sts.number(), + }), + close_old_weight: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CouncilCall = CouncilCall_close | CouncilCall_close_old_weight | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: Weight + lengthBound: number +} + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close_old_weight { + __kind: 'close_old_weight' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ConvictionVotingCall: sts.Type = sts.closedEnum(() => { + return { + delegate: sts.enumStruct({ + class: sts.number(), + to: MultiAddress, + conviction: Type_146, + balance: sts.bigint(), + }), + remove_other_vote: sts.enumStruct({ + target: MultiAddress, + class: sts.number(), + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + class: sts.option(() => sts.number()), + index: sts.number(), + }), + undelegate: sts.enumStruct({ + class: sts.number(), + }), + unlock: sts.enumStruct({ + class: sts.number(), + target: MultiAddress, + }), + vote: sts.enumStruct({ + pollIndex: sts.number(), + vote: Type_144, + }), + } +}) + +export const Type_144: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + SplitAbstain: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + abstain: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type Type_144 = Type_144_Split | Type_144_SplitAbstain | Type_144_Standard + +export interface Type_144_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface Type_144_SplitAbstain { + __kind: 'SplitAbstain' + aye: bigint + nay: bigint + abstain: bigint +} + +export interface Type_144_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Type_146: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Type_146 = Type_146_Locked1x | Type_146_Locked2x | Type_146_Locked3x | Type_146_Locked4x | Type_146_Locked5x | Type_146_Locked6x | Type_146_None + +export interface Type_146_Locked1x { + __kind: 'Locked1x' +} + +export interface Type_146_Locked2x { + __kind: 'Locked2x' +} + +export interface Type_146_Locked3x { + __kind: 'Locked3x' +} + +export interface Type_146_Locked4x { + __kind: 'Locked4x' +} + +export interface Type_146_Locked5x { + __kind: 'Locked5x' +} + +export interface Type_146_Locked6x { + __kind: 'Locked6x' +} + +export interface Type_146_None { + __kind: 'None' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ConvictionVotingCall = ConvictionVotingCall_delegate | ConvictionVotingCall_remove_other_vote | ConvictionVotingCall_remove_vote | ConvictionVotingCall_undelegate | ConvictionVotingCall_unlock | ConvictionVotingCall_vote + +/** + * Delegate the voting power (with some given conviction) of the sending account for a + * particular class of polls. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `class`: The class of polls to delegate. To delegate multiple classes, multiple calls + * to this function are required. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must not + * be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of polls the voter delegating to has + * voted on. Weight is initially charged as if maximum votes, but is refunded later. + */ +export interface ConvictionVotingCall_delegate { + __kind: 'delegate' + class: number + to: MultiAddress + conviction: Type_146 + balance: bigint +} + +/** + * Remove a vote for a poll. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the poll was cancelled, because the voter lost the poll or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for poll + * `index`. + * - `index`: The index of poll of the vote to be removed. + * - `class`: The class of the poll. + * + * Weight: `O(R + log R)` where R is the number of polls that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface ConvictionVotingCall_remove_other_vote { + __kind: 'remove_other_vote' + target: MultiAddress + class: number + index: number +} + +/** + * Remove a vote for a poll. + * + * If: + * - the poll was cancelled, or + * - the poll is ongoing, or + * - the poll has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the poll has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for poll `index`. + * + * - `index`: The index of poll of the vote to be removed. + * - `class`: Optional parameter, if given it indicates the class of the poll. For polls + * which have finished or are cancelled, this must be `Some`. + * + * Weight: `O(R + log R)` where R is the number of polls that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface ConvictionVotingCall_remove_vote { + __kind: 'remove_vote' + class?: (number | undefined) + index: number +} + +/** + * Undelegate the voting power of the sending account for a particular class of polls. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued has passed. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * - `class`: The class of polls to remove the delegation from. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of polls the voter delegating to has + * voted on. Weight is initially charged as if maximum votes, but is refunded later. + */ +export interface ConvictionVotingCall_undelegate { + __kind: 'undelegate' + class: number +} + +/** + * Remove the lock caused by prior voting/delegating which has expired within a particular + * class. + * + * The dispatch origin of this call must be _Signed_. + * + * - `class`: The class of polls to unlock. + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface ConvictionVotingCall_unlock { + __kind: 'unlock' + class: number + target: MultiAddress +} + +/** + * Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `poll_index`: The index of the poll to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of polls the voter has voted on. + */ +export interface ConvictionVotingCall_vote { + __kind: 'vote' + pollIndex: number + vote: Type_144 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_bypass_consistency_check: sts.enumStruct({ + new: sts.boolean(), + }), + set_chain_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_code_retention_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_conclusion_by_time_out_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_max_spam_slots: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: sts.number(), + }), + set_group_rotation_frequency: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_minimum_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_cores: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_retries: sts.enumStruct({ + new: sts.number(), + }), + set_pvf_checking_enabled: sts.enumStruct({ + new: sts.boolean(), + }), + set_pvf_voting_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_thread_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_ump_max_individual_weight: sts.enumStruct({ + new: Weight, + }), + set_ump_service_total_weight: sts.enumStruct({ + new: Weight, + }), + set_validation_upgrade_cooldown: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ConfigurationCall = ConfigurationCall_set_bypass_consistency_check | ConfigurationCall_set_chain_availability_period | ConfigurationCall_set_code_retention_period | ConfigurationCall_set_dispute_conclusion_by_time_out_period | ConfigurationCall_set_dispute_max_spam_slots | ConfigurationCall_set_dispute_period | ConfigurationCall_set_dispute_post_conclusion_acceptance_period | ConfigurationCall_set_group_rotation_frequency | ConfigurationCall_set_hrmp_channel_max_capacity | ConfigurationCall_set_hrmp_channel_max_message_size | ConfigurationCall_set_hrmp_channel_max_total_size | ConfigurationCall_set_hrmp_max_message_num_per_candidate | ConfigurationCall_set_hrmp_max_parachain_inbound_channels | ConfigurationCall_set_hrmp_max_parachain_outbound_channels | ConfigurationCall_set_hrmp_max_parathread_inbound_channels | ConfigurationCall_set_hrmp_max_parathread_outbound_channels | ConfigurationCall_set_hrmp_open_request_ttl | ConfigurationCall_set_hrmp_recipient_deposit | ConfigurationCall_set_hrmp_sender_deposit | ConfigurationCall_set_max_code_size | ConfigurationCall_set_max_downward_message_size | ConfigurationCall_set_max_head_data_size | ConfigurationCall_set_max_pov_size | ConfigurationCall_set_max_upward_message_num_per_candidate | ConfigurationCall_set_max_upward_message_size | ConfigurationCall_set_max_upward_queue_count | ConfigurationCall_set_max_upward_queue_size | ConfigurationCall_set_max_validators | ConfigurationCall_set_max_validators_per_core | ConfigurationCall_set_minimum_validation_upgrade_delay | ConfigurationCall_set_n_delay_tranches | ConfigurationCall_set_needed_approvals | ConfigurationCall_set_no_show_slots | ConfigurationCall_set_parathread_cores | ConfigurationCall_set_parathread_retries | ConfigurationCall_set_pvf_checking_enabled | ConfigurationCall_set_pvf_voting_ttl | ConfigurationCall_set_relay_vrf_modulo_samples | ConfigurationCall_set_scheduling_lookahead | ConfigurationCall_set_thread_availability_period | ConfigurationCall_set_ump_max_individual_weight | ConfigurationCall_set_ump_service_total_weight | ConfigurationCall_set_validation_upgrade_cooldown | ConfigurationCall_set_validation_upgrade_delay | ConfigurationCall_set_zeroth_delay_tranche_width + +/** + * Setting this to true will disable consistency checks for the configuration setters. + * Use with caution. + */ +export interface ConfigurationCall_set_bypass_consistency_check { + __kind: 'set_bypass_consistency_check' + new: boolean +} + +/** + * Set the availability period for parachains. + */ +export interface ConfigurationCall_set_chain_availability_period { + __kind: 'set_chain_availability_period' + new: number +} + +/** + * Set the acceptance period for an included candidate. + */ +export interface ConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: number +} + +/** + * Set the dispute conclusion by time out period. + */ +export interface ConfigurationCall_set_dispute_conclusion_by_time_out_period { + __kind: 'set_dispute_conclusion_by_time_out_period' + new: number +} + +/** + * Set the maximum number of dispute spam slots. + */ +export interface ConfigurationCall_set_dispute_max_spam_slots { + __kind: 'set_dispute_max_spam_slots' + new: number +} + +/** + * Set the dispute period, in number of sessions to keep for disputes. + */ +export interface ConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: number +} + +/** + * Set the dispute post conclusion acceptance period. + */ +export interface ConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: number +} + +/** + * Set the parachain validator-group rotation frequency + */ +export interface ConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: number +} + +/** + * Sets the maximum number of messages allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * Sets the maximum size of a message that could ever be put into an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * Sets the maximum total size of messages in bytes allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * Sets the maximum number of outbound HRMP messages can be sent by a candidate. + */ +export interface ConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parachain is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parachain is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parathread is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_inbound_channels { + __kind: 'set_hrmp_max_parathread_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parathread is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_outbound_channels { + __kind: 'set_hrmp_max_parathread_outbound_channels' + new: number +} + +/** + * Sets the number of sessions after which an HRMP open channel request expires. + */ +export interface ConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * Sets the amount of funds that the recipient should provide for accepting opening an HRMP + * channel. + */ +export interface ConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: bigint +} + +/** + * Sets the amount of funds that the sender should provide for opening an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: bigint +} + +/** + * Set the max validation code size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * Set the critical downward message size. + */ +export interface ConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * Set the max head data size for paras. + */ +export interface ConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * Set the max POV block size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * Sets the maximum number of messages that a candidate can contain. + */ +export interface ConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum size of an upward message that can be sent by a candidate. + */ +export interface ConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * Sets the maximum items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * Sets the maximum total size of items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * Set the maximum number of validators to use in parachain consensus. + */ +export interface ConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * Set the maximum number of validators to assign to any core. + */ +export interface ConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * Sets the minimum delay between announcing the upgrade block for a parachain until the + * upgrade taking place. + * + * See the field documentation for information and constraints for the new value. + */ +export interface ConfigurationCall_set_minimum_validation_upgrade_delay { + __kind: 'set_minimum_validation_upgrade_delay' + new: number +} + +/** + * Set the total number of delay tranches. + */ +export interface ConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * Set the number of validators needed to approve a block. + */ +export interface ConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * Set the no show slots, in number of number of consensus slots. + * Must be at least 1. + */ +export interface ConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * Set the number of parathread execution cores. + */ +export interface ConfigurationCall_set_parathread_cores { + __kind: 'set_parathread_cores' + new: number +} + +/** + * Set the number of retries for a particular parathread. + */ +export interface ConfigurationCall_set_parathread_retries { + __kind: 'set_parathread_retries' + new: number +} + +/** + * Enable or disable PVF pre-checking. Consult the field documentation prior executing. + */ +export interface ConfigurationCall_set_pvf_checking_enabled { + __kind: 'set_pvf_checking_enabled' + new: boolean +} + +/** + * Set the number of session changes after which a PVF pre-checking voting is rejected. + */ +export interface ConfigurationCall_set_pvf_voting_ttl { + __kind: 'set_pvf_voting_ttl' + new: number +} + +/** + * Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion. + */ +export interface ConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * Set the scheduling lookahead, in expected number of blocks at peak throughput. + */ +export interface ConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * Set the availability period for parathreads. + */ +export interface ConfigurationCall_set_thread_availability_period { + __kind: 'set_thread_availability_period' + new: number +} + +/** + * Sets the maximum amount of weight any individual upward message may consume. + */ +export interface ConfigurationCall_set_ump_max_individual_weight { + __kind: 'set_ump_max_individual_weight' + new: Weight +} + +/** + * Sets the soft limit for the phase of dispatching dispatchable upward messages. + */ +export interface ConfigurationCall_set_ump_service_total_weight { + __kind: 'set_ump_service_total_weight' + new: Weight +} + +/** + * Set the validation upgrade cooldown. + */ +export interface ConfigurationCall_set_validation_upgrade_cooldown { + __kind: 'set_validation_upgrade_cooldown' + new: number +} + +/** + * Set the validation upgrade delay. + */ +export interface ConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: number +} + +/** + * Set the zeroth delay tranche width. + */ +export interface ConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: sts.bigint(), + vestingSchedule: sts.option(() => sts.tuple(() => [sts.bigint(), sts.bigint(), sts.number()])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId32), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId32 + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId32 + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: bigint + vestingSchedule?: ([bigint, bigint, number] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId32 | undefined) +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ChildBountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + add_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + value: sts.bigint(), + description: sts.bytes(), + }), + award_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + close_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + propose_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ChildBountiesCall = ChildBountiesCall_accept_curator | ChildBountiesCall_add_child_bounty | ChildBountiesCall_award_child_bounty | ChildBountiesCall_claim_child_bounty | ChildBountiesCall_close_child_bounty | ChildBountiesCall_propose_curator | ChildBountiesCall_unassign_curator + +/** + * Accept the curator role for the child-bounty. + * + * The dispatch origin for this call must be the curator of this + * child-bounty. + * + * A deposit will be reserved from the curator and refund upon + * successful payout or cancellation. + * + * Fee for curator is deducted from curator fee of parent bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in "CuratorProposed" state, for processing the + * call. And state of child-bounty is moved to "Active" on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_accept_curator { + __kind: 'accept_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Add a new child-bounty. + * + * The dispatch origin for this call must be the curator of parent + * bounty and the parent bounty must be in "active" state. + * + * Child-bounty gets added successfully & fund gets transferred from + * parent bounty to child-bounty account, if parent bounty has enough + * funds, else the call fails. + * + * Upper bound to maximum number of active child bounties that can be + * added are managed via runtime trait config + * [`Config::MaxActiveChildBountyCount`]. + * + * If the call is success, the status of child-bounty is updated to + * "Added". + * + * - `parent_bounty_id`: Index of parent bounty for which child-bounty is being added. + * - `value`: Value for executing the proposal. + * - `description`: Text description for the child-bounty. + */ +export interface ChildBountiesCall_add_child_bounty { + __kind: 'add_child_bounty' + parentBountyId: number + value: bigint + description: Bytes +} + +/** + * Award child-bounty to a beneficiary. + * + * The beneficiary will be able to claim the funds after a delay. + * + * The dispatch origin for this call must be the parent curator or + * curator of this child-bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in active state, for processing the call. And + * state of child-bounty is moved to "PendingPayout" on successful call + * completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + * - `beneficiary`: Beneficiary account. + */ +export interface ChildBountiesCall_award_child_bounty { + __kind: 'award_child_bounty' + parentBountyId: number + childBountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded child-bounty after payout delay. + * + * The dispatch origin for this call may be any signed origin. + * + * Call works independent of parent bounty state, No need for parent + * bounty to be in active state. + * + * The Beneficiary is paid out with agreed bounty value. Curator fee is + * paid & curator deposit is unreserved. + * + * Child-bounty must be in "PendingPayout" state, for processing the + * call. And instance of child-bounty is removed from the state on + * successful call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_claim_child_bounty { + __kind: 'claim_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * Cancel a proposed or active child-bounty. Child-bounty account funds + * are transferred to parent bounty account. The child-bounty curator + * deposit may be unreserved if possible. + * + * The dispatch origin for this call must be either parent curator or + * `T::RejectOrigin`. + * + * If the state of child-bounty is `Active`, curator deposit is + * unreserved. + * + * If the state of child-bounty is `PendingPayout`, call fails & + * returns `PendingPayout` error. + * + * For the origin other than T::RejectOrigin, parent bounty must be in + * active state, for this child-bounty call to work. For origin + * T::RejectOrigin execution is forced. + * + * Instance of child-bounty is removed from the state on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_close_child_bounty { + __kind: 'close_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * Propose curator for funded child-bounty. + * + * The dispatch origin for this call must be curator of parent bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in "Added" state, for processing the call. And + * state of child-bounty is moved to "CuratorProposed" on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + * - `curator`: Address of child-bounty curator. + * - `fee`: payment fee to child-bounty curator for execution. + */ +export interface ChildBountiesCall_propose_curator { + __kind: 'propose_curator' + parentBountyId: number + childBountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a child-bounty. + * + * The dispatch origin for this call can be either `RejectOrigin`, or + * the curator of the parent bounty, or any signed origin. + * + * For the origin other than T::RejectOrigin and the child-bounty + * curator, parent bounty must be in active state, for this call to + * work. We allow child-bounty curator and T::RejectOrigin to execute + * this call irrespective of the parent bounty state. + * + * If this function is called by the `RejectOrigin` or the + * parent bounty curator, we assume that the child-bounty curator is + * malicious or inactive. As a result, child-bounty curator deposit is + * slashed. + * + * If the origin is the child-bounty curator, we take this as a sign + * that they are unable to do their job, and are willingly giving up. + * We could slash the deposit, but for now we allow them to unreserve + * their deposit and exit without issue. (We may want to change this if + * it is abused.) + * + * Finally, the origin can be anyone iff the child-bounty curator is + * "inactive". Expiry update due of parent bounty is used to estimate + * inactive state of child-bounty curator. + * + * This allows anyone in the community to call out that a child-bounty + * curator is not doing their due diligence, and we should pick a new + * one. In this case the child-bounty curator deposit is slashed. + * + * State of child-bounty is moved to Added state on successful call + * completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_unassign_curator { + __kind: 'unassign_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::SpendOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds + * after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::SpendOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is + * malicious or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_force_unreserve | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_all | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is not + * assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * Unreserve some balance from a user by force. + * + * Can only be called by ROOT. + */ +export interface BalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also alter the total issuance of the system (`TotalIssuance`) appropriately. + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: MultiAddress + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for input config + * types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex + * computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional check + * that the transfer will not kill the origin account. + * --------------------------------- + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: MultiAddress + value: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). # + * - O(1). Just like transfer, but reading the user's transferable balance first. + * # + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const EquivocationProof: sts.Type = sts.struct(() => { + return { + offender: sts.bytes(), + slot: Slot, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Slot = sts.bigint() + +export interface EquivocationProof { + offender: Bytes + slot: Slot + firstHeader: Header + secondHeader: Header +} + +export type Slot = bigint + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V1: sts.enumStruct({ + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + }), + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type NextConfigDescriptor = NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Plan an epoch config change. The epoch config change is recorded and will be enacted on + * the next call to `enact_epoch_change`. The config will be activated one epoch after. + * Multiple calls to this method will replace any existing planned config change that had + * not been enacted yet. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Cancel an in-progress auction. + * + * Can only be called by Root origin. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +export type Call = Call_Auctions | Call_Authorship | Call_Babe | Call_Balances | Call_Bounties | Call_ChildBounties | Call_Claims | Call_Configuration | Call_ConvictionVoting | Call_Council | Call_Crowdloan | Call_Democracy | Call_Dmp | Call_ElectionProviderMultiPhase | Call_FastUnstake | Call_FellowshipCollective | Call_FellowshipReferenda | Call_Grandpa | Call_Hrmp | Call_Identity | Call_ImOnline | Call_Indices | Call_Initializer | Call_Multisig | Call_Nis | Call_NisCounterpartBalances | Call_NominationPools | Call_ParaInclusion | Call_ParaInherent | Call_Paras | Call_ParasDisputes | Call_ParasShared | Call_PhragmenElection | Call_Preimage | Call_Proxy | Call_Recovery | Call_Referenda | Call_Registrar | Call_Scheduler | Call_Session | Call_Slots | Call_Society | Call_Staking | Call_System | Call_TechnicalCommittee | Call_TechnicalMembership | Call_Timestamp | Call_Tips | Call_Treasury | Call_Ump | Call_Utility | Call_Vesting | Call_VoterList | Call_Whitelist | Call_XcmPallet + +export interface Call_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Call_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Call_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Call_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Call_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Call_ChildBounties { + __kind: 'ChildBounties' + value: ChildBountiesCall +} + +export interface Call_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Call_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Call_ConvictionVoting { + __kind: 'ConvictionVoting' + value: ConvictionVotingCall +} + +export interface Call_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Call_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Call_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Call_Dmp { + __kind: 'Dmp' + value: DmpCall +} + +export interface Call_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Call_FastUnstake { + __kind: 'FastUnstake' + value: FastUnstakeCall +} + +export interface Call_FellowshipCollective { + __kind: 'FellowshipCollective' + value: FellowshipCollectiveCall +} + +export interface Call_FellowshipReferenda { + __kind: 'FellowshipReferenda' + value: FellowshipReferendaCall +} + +export interface Call_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Call_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Call_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Call_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Call_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Call_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Call_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Call_Nis { + __kind: 'Nis' + value: NisCall +} + +export interface Call_NisCounterpartBalances { + __kind: 'NisCounterpartBalances' + value: NisCounterpartBalancesCall +} + +export interface Call_NominationPools { + __kind: 'NominationPools' + value: NominationPoolsCall +} + +export interface Call_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Call_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Call_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Call_ParasDisputes { + __kind: 'ParasDisputes' + value: ParasDisputesCall +} + +export interface Call_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Call_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Call_Preimage { + __kind: 'Preimage' + value: PreimageCall +} + +export interface Call_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Call_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Call_Referenda { + __kind: 'Referenda' + value: ReferendaCall +} + +export interface Call_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Call_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Call_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Call_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Call_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Call_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Call_System { + __kind: 'System' + value: SystemCall +} + +export interface Call_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Call_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Call_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Call_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Call_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Call_Ump { + __kind: 'Ump' + value: UmpCall +} + +export interface Call_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Call_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Call_VoterList { + __kind: 'VoterList' + value: VoterListCall +} + +export interface Call_Whitelist { + __kind: 'Whitelist' + value: WhitelistCall +} + +export interface Call_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Society: sts.unit(), + Staking: sts.unit(), + } +}) + +export const MultiAddress: sts.Type = sts.closedEnum(() => { + return { + Address20: sts.bytes(), + Address32: sts.bytes(), + Id: AccountId32, + Index: sts.unit(), + Raw: sts.bytes(), + } +}) diff --git a/squid/src/types/v9370.ts b/squid/src/types/v9370.ts new file mode 100644 index 00000000..10f32d5e --- /dev/null +++ b/squid/src/types/v9370.ts @@ -0,0 +1,13390 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Weight: sts.Type = sts.struct(() => { + return { + refTime: sts.bigint(), + proofSize: sts.bigint(), + } +}) + +export interface Weight { + refTime: bigint + proofSize: bigint +} + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: sts.number(), + index: sts.number(), + } +}) + +export interface Timepoint { + height: number + index: number +} + +export const AccountId32 = sts.bytes() + +export const Call: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + Authorship: AuthorshipCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + ChildBounties: ChildBountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + ConvictionVoting: ConvictionVotingCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + Dmp: DmpCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + FastUnstake: FastUnstakeCall, + FellowshipCollective: FellowshipCollectiveCall, + FellowshipReferenda: FellowshipReferendaCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Initializer: InitializerCall, + Multisig: MultisigCall, + Nis: NisCall, + NisCounterpartBalances: NisCounterpartBalancesCall, + NominationPools: NominationPoolsCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Paras: ParasCall, + ParasDisputes: ParasDisputesCall, + ParasShared: ParasSharedCall, + PhragmenElection: PhragmenElectionCall, + Preimage: PreimageCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Referenda: ReferendaCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Ump: UmpCall, + Utility: UtilityCall, + Vesting: VestingCall, + VoterList: VoterListCall, + Whitelist: WhitelistCall, + XcmPallet: XcmPalletCall, + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + execute: sts.enumStruct({ + message: Type_425, + maxWeight: sts.bigint(), + }), + force_default_xcm_version: sts.enumStruct({ + maybeXcmVersion: sts.option(() => sts.number()), + }), + force_subscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_unsubscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_xcm_version: sts.enumStruct({ + location: V1MultiLocation, + xcmVersion: sts.number(), + }), + limited_reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + limited_teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V2WeightLimit, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + send: sts.enumStruct({ + dest: VersionedMultiLocation, + message: VersionedXcm, + }), + teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + } +}) + +export const VersionedXcm: sts.Type = sts.closedEnum(() => { + return { + V0: V0Xcm, + V1: V1Xcm, + V2: sts.array(() => V2Instruction), + } +}) + +export const V2Instruction: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => V2Instruction), + SetErrorHandler: sts.array(() => V2Instruction), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const DoubleEncoded: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncoded { + encoded: Bytes +} + +export const V0OriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type V0OriginKind = V0OriginKind_Native | V0OriginKind_SovereignAccount | V0OriginKind_Superuser | V0OriginKind_Xcm + +export interface V0OriginKind_Native { + __kind: 'Native' +} + +export interface V0OriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface V0OriginKind_Superuser { + __kind: 'Superuser' +} + +export interface V0OriginKind_Xcm { + __kind: 'Xcm' +} + +export const V2Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V2Error])), + Null: sts.unit(), + Version: sts.number(), + } +}) + +export const V2Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + MaxWeightInvalid: sts.unit(), + MultiLocationFull: sts.unit(), + MultiLocationNotInvertible: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + WeightLimitReached: sts.bigint(), + WeightNotComputable: sts.unit(), + } +}) + +export type V2Error = V2Error_AssetNotFound | V2Error_BadOrigin | V2Error_Barrier | V2Error_DestinationUnsupported | V2Error_ExceedsMaxMessageSize | V2Error_FailedToDecode | V2Error_FailedToTransactAsset | V2Error_InvalidLocation | V2Error_LocationCannotHold | V2Error_MaxWeightInvalid | V2Error_MultiLocationFull | V2Error_MultiLocationNotInvertible | V2Error_NotHoldingFees | V2Error_NotWithdrawable | V2Error_Overflow | V2Error_TooExpensive | V2Error_Transport | V2Error_Trap | V2Error_UnhandledXcmVersion | V2Error_Unimplemented | V2Error_UnknownClaim | V2Error_Unroutable | V2Error_UntrustedReserveLocation | V2Error_UntrustedTeleportLocation | V2Error_WeightLimitReached | V2Error_WeightNotComputable + +export interface V2Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V2Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V2Error_Barrier { + __kind: 'Barrier' +} + +export interface V2Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V2Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V2Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V2Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V2Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V2Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V2Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V2Error_MultiLocationFull { + __kind: 'MultiLocationFull' +} + +export interface V2Error_MultiLocationNotInvertible { + __kind: 'MultiLocationNotInvertible' +} + +export interface V2Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V2Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V2Error_Overflow { + __kind: 'Overflow' +} + +export interface V2Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V2Error_Transport { + __kind: 'Transport' +} + +export interface V2Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V2Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V2Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V2Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V2Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V2Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V2Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: bigint +} + +export interface V2Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V2Response = V2Response_Assets | V2Response_ExecutionResult | V2Response_Null | V2Response_Version + +export interface V2Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V2Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V2Error] | undefined) +} + +export interface V2Response_Null { + __kind: 'Null' +} + +export interface V2Response_Version { + __kind: 'Version' + value: number +} + +export interface V1MultiAsset { + id: V1AssetId + fun: V1Fungibility +} + +export type V1Fungibility = V1Fungibility_Fungible | V1Fungibility_NonFungible + +export interface V1Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V1Fungibility_NonFungible { + __kind: 'NonFungible' + value: V1AssetInstance +} + +export type V1AssetInstance = V1AssetInstance_Array16 | V1AssetInstance_Array32 | V1AssetInstance_Array4 | V1AssetInstance_Array8 | V1AssetInstance_Blob | V1AssetInstance_Index | V1AssetInstance_Undefined + +export interface V1AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V1AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V1AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V1AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V1AssetInstance_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface V1AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V1AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V1AssetId = V1AssetId_Abstract | V1AssetId_Concrete + +export interface V1AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V1AssetId_Concrete { + __kind: 'Concrete' + value: V1MultiLocation +} + +export interface V1MultiLocation { + parents: number + interior: V1Junctions +} + +export type V1Junctions = V1Junctions_Here | V1Junctions_X1 | V1Junctions_X2 | V1Junctions_X3 | V1Junctions_X4 | V1Junctions_X5 | V1Junctions_X6 | V1Junctions_X7 | V1Junctions_X8 + +export interface V1Junctions_Here { + __kind: 'Here' +} + +export interface V1Junctions_X1 { + __kind: 'X1' + value: V1Junction +} + +export interface V1Junctions_X2 { + __kind: 'X2' + value: [V1Junction, V1Junction] +} + +export interface V1Junctions_X3 { + __kind: 'X3' + value: [V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X4 { + __kind: 'X4' + value: [V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X5 { + __kind: 'X5' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X6 { + __kind: 'X6' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X7 { + __kind: 'X7' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export interface V1Junctions_X8 { + __kind: 'X8' + value: [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction] +} + +export type V1Junction = V1Junction_AccountId32 | V1Junction_AccountIndex64 | V1Junction_AccountKey20 | V1Junction_GeneralIndex | V1Junction_GeneralKey | V1Junction_OnlyChild | V1Junction_PalletInstance | V1Junction_Parachain | V1Junction_Plurality + +export interface V1Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V1Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V1Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V1Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V1Junction_GeneralKey { + __kind: 'GeneralKey' + value: WeakBoundedVec +} + +export interface V1Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V1Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V1Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V1Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0BodyPart = V0BodyPart_AtLeastProportion | V0BodyPart_Fraction | V0BodyPart_Members | V0BodyPart_MoreThanProportion | V0BodyPart_Voice + +export interface V0BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V0BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V0BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V0BodyPart_Voice { + __kind: 'Voice' +} + +export type V0BodyId = V0BodyId_Administration | V0BodyId_Defense | V0BodyId_Executive | V0BodyId_Index | V0BodyId_Judicial | V0BodyId_Legislative | V0BodyId_Named | V0BodyId_Technical | V0BodyId_Treasury | V0BodyId_Unit + +export interface V0BodyId_Administration { + __kind: 'Administration' +} + +export interface V0BodyId_Defense { + __kind: 'Defense' +} + +export interface V0BodyId_Executive { + __kind: 'Executive' +} + +export interface V0BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V0BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V0BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V0BodyId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V0BodyId_Technical { + __kind: 'Technical' +} + +export interface V0BodyId_Treasury { + __kind: 'Treasury' +} + +export interface V0BodyId_Unit { + __kind: 'Unit' +} + +export type WeakBoundedVec = Bytes + +export type V0NetworkId = V0NetworkId_Any | V0NetworkId_Kusama | V0NetworkId_Named | V0NetworkId_Polkadot + +export interface V0NetworkId_Any { + __kind: 'Any' +} + +export interface V0NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V0NetworkId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V0NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export const V1Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V1Junction, + X2: sts.tuple(() => [V1Junction, V1Junction]), + X3: sts.tuple(() => [V1Junction, V1Junction, V1Junction]), + X4: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction]), + X5: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X6: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X7: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + X8: sts.tuple(() => [V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction, V1Junction]), + } +}) + +export const V1Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: WeakBoundedVec, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export const V0BodyId: sts.Type = sts.closedEnum(() => { + return { + Administration: sts.unit(), + Defense: sts.unit(), + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: WeakBoundedVec, + Technical: sts.unit(), + Treasury: sts.unit(), + Unit: sts.unit(), + } +}) + +export const WeakBoundedVec = sts.bytes() + +export const V0NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: WeakBoundedVec, + Polkadot: sts.unit(), + } +}) + +export const V1MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V1MultiAsset), + Wild: V1WildMultiAsset, + } +}) + +export const V1WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllOf: sts.enumStruct({ + id: V1AssetId, + fun: V1WildFungibility, + }), + } +}) + +export const V1WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V1WildFungibility = V1WildFungibility_Fungible | V1WildFungibility_NonFungible + +export interface V1WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V1WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V1AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V1MultiLocation, + } +}) + +export type V1WildMultiAsset = V1WildMultiAsset_All | V1WildMultiAsset_AllOf + +export interface V1WildMultiAsset_All { + __kind: 'All' +} + +export interface V1WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V1AssetId + fun: V1WildFungibility +} + +export type V1MultiAssetFilter = V1MultiAssetFilter_Definite | V1MultiAssetFilter_Wild + +export interface V1MultiAssetFilter_Definite { + __kind: 'Definite' + value: V1MultiAsset[] +} + +export interface V1MultiAssetFilter_Wild { + __kind: 'Wild' + value: V1WildMultiAsset +} + +export const V1MultiAsset: sts.Type = sts.struct(() => { + return { + id: V1AssetId, + fun: V1Fungibility, + } +}) + +export const V1Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V1AssetInstance, + } +}) + +export const V1AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V2Instruction = V2Instruction_BuyExecution | V2Instruction_ClaimAsset | V2Instruction_ClearError | V2Instruction_ClearOrigin | V2Instruction_DepositAsset | V2Instruction_DepositReserveAsset | V2Instruction_DescendOrigin | V2Instruction_ExchangeAsset | V2Instruction_HrmpChannelAccepted | V2Instruction_HrmpChannelClosing | V2Instruction_HrmpNewChannelOpenRequest | V2Instruction_InitiateReserveWithdraw | V2Instruction_InitiateTeleport | V2Instruction_QueryHolding | V2Instruction_QueryResponse | V2Instruction_ReceiveTeleportedAsset | V2Instruction_RefundSurplus | V2Instruction_ReportError | V2Instruction_ReserveAssetDeposited | V2Instruction_SetAppendix | V2Instruction_SetErrorHandler | V2Instruction_SubscribeVersion | V2Instruction_Transact | V2Instruction_TransferAsset | V2Instruction_TransferReserveAsset | V2Instruction_Trap | V2Instruction_UnsubscribeVersion | V2Instruction_WithdrawAsset + +export interface V2Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface V2Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface V2Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V2Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V2Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V2Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface V2Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V2Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V2Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V2Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V2Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface V2Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface V2Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface V2Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V2Instruction_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface V2Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface V2Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V2Instruction[] +} + +export interface V2Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V2Instruction[] +} + +export interface V2Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V2Instruction_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V2Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V2Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V2Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export type V2WeightLimit = V2WeightLimit_Limited | V2WeightLimit_Unlimited + +export interface V2WeightLimit_Limited { + __kind: 'Limited' + value: bigint +} + +export interface V2WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V1Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: V1Xcm, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => V1Order), + }), + } +}) + +export const V1Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => V1Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type V1Order = V1Order_BuyExecution | V1Order_DepositAsset | V1Order_DepositReserveAsset | V1Order_ExchangeAsset | V1Order_InitiateReserveWithdraw | V1Order_InitiateTeleport | V1Order_Noop | V1Order_QueryHolding + +export interface V1Order_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: V1Xcm[] +} + +export interface V1Order_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface V1Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface V1Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Order_Noop { + __kind: 'Noop' +} + +export interface V1Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export const V1Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V1MultiAsset), + Version: sts.number(), + } +}) + +export type V1Response = V1Response_Assets | V1Response_Version + +export interface V1Response_Assets { + __kind: 'Assets' + value: V1MultiAsset[] +} + +export interface V1Response_Version { + __kind: 'Version' + value: number +} + +export type V1Xcm = V1Xcm_HrmpChannelAccepted | V1Xcm_HrmpChannelClosing | V1Xcm_HrmpNewChannelOpenRequest | V1Xcm_QueryResponse | V1Xcm_ReceiveTeleportedAsset | V1Xcm_RelayedFrom | V1Xcm_ReserveAssetDeposited | V1Xcm_SubscribeVersion | V1Xcm_Transact | V1Xcm_TransferAsset | V1Xcm_TransferReserveAsset | V1Xcm_UnsubscribeVersion | V1Xcm_WithdrawAsset + +export interface V1Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V1Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V1Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V1Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface V1Xcm_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: V1Xcm +} + +export interface V1Xcm_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export interface V1Xcm_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V1Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V1Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface V1Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface V1Xcm_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V1Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: V1Order[] +} + +export const V0Xcm: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: V0Xcm, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => V0Order), + }), + } +}) + +export const V0Order: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => V0Xcm), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type V0Order = V0Order_BuyExecution | V0Order_DepositAsset | V0Order_DepositReserveAsset | V0Order_ExchangeAsset | V0Order_InitiateReserveWithdraw | V0Order_InitiateTeleport | V0Order_Null | V0Order_QueryHolding + +export interface V0Order_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: V0Xcm[] +} + +export interface V0Order_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Order_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface V0Order_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Order_Null { + __kind: 'Null' +} + +export interface V0Order_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type V0MultiLocation = V0MultiLocation_Null | V0MultiLocation_X1 | V0MultiLocation_X2 | V0MultiLocation_X3 | V0MultiLocation_X4 | V0MultiLocation_X5 | V0MultiLocation_X6 | V0MultiLocation_X7 | V0MultiLocation_X8 + +export interface V0MultiLocation_Null { + __kind: 'Null' +} + +export interface V0MultiLocation_X1 { + __kind: 'X1' + value: V0Junction +} + +export interface V0MultiLocation_X2 { + __kind: 'X2' + value: [V0Junction, V0Junction] +} + +export interface V0MultiLocation_X3 { + __kind: 'X3' + value: [V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X4 { + __kind: 'X4' + value: [V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X5 { + __kind: 'X5' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X6 { + __kind: 'X6' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X7 { + __kind: 'X7' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export interface V0MultiLocation_X8 { + __kind: 'X8' + value: [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction] +} + +export type V0Junction = V0Junction_AccountId32 | V0Junction_AccountIndex64 | V0Junction_AccountKey20 | V0Junction_GeneralIndex | V0Junction_GeneralKey | V0Junction_OnlyChild | V0Junction_PalletInstance | V0Junction_Parachain | V0Junction_Parent | V0Junction_Plurality + +export interface V0Junction_AccountId32 { + __kind: 'AccountId32' + network: V0NetworkId + id: Bytes +} + +export interface V0Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V0NetworkId + index: bigint +} + +export interface V0Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V0NetworkId + key: Bytes +} + +export interface V0Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V0Junction_GeneralKey { + __kind: 'GeneralKey' + value: WeakBoundedVec +} + +export interface V0Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V0Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V0Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V0Junction_Parent { + __kind: 'Parent' +} + +export interface V0Junction_Plurality { + __kind: 'Plurality' + id: V0BodyId + part: V0BodyPart +} + +export type V0MultiAsset = V0MultiAsset_AbstractFungible | V0MultiAsset_AbstractNonFungible | V0MultiAsset_All | V0MultiAsset_AllAbstractFungible | V0MultiAsset_AllAbstractNonFungible | V0MultiAsset_AllConcreteFungible | V0MultiAsset_AllConcreteNonFungible | V0MultiAsset_AllFungible | V0MultiAsset_AllNonFungible | V0MultiAsset_ConcreteFungible | V0MultiAsset_ConcreteNonFungible | V0MultiAsset_None + +export interface V0MultiAsset_AbstractFungible { + __kind: 'AbstractFungible' + id: Bytes + amount: bigint +} + +export interface V0MultiAsset_AbstractNonFungible { + __kind: 'AbstractNonFungible' + class: Bytes + instance: V1AssetInstance +} + +export interface V0MultiAsset_All { + __kind: 'All' +} + +export interface V0MultiAsset_AllAbstractFungible { + __kind: 'AllAbstractFungible' + id: Bytes +} + +export interface V0MultiAsset_AllAbstractNonFungible { + __kind: 'AllAbstractNonFungible' + class: Bytes +} + +export interface V0MultiAsset_AllConcreteFungible { + __kind: 'AllConcreteFungible' + id: V0MultiLocation +} + +export interface V0MultiAsset_AllConcreteNonFungible { + __kind: 'AllConcreteNonFungible' + class: V0MultiLocation +} + +export interface V0MultiAsset_AllFungible { + __kind: 'AllFungible' +} + +export interface V0MultiAsset_AllNonFungible { + __kind: 'AllNonFungible' +} + +export interface V0MultiAsset_ConcreteFungible { + __kind: 'ConcreteFungible' + id: V0MultiLocation + amount: bigint +} + +export interface V0MultiAsset_ConcreteNonFungible { + __kind: 'ConcreteNonFungible' + class: V0MultiLocation + instance: V1AssetInstance +} + +export interface V0MultiAsset_None { + __kind: 'None' +} + +export const V0MultiAsset: sts.Type = sts.closedEnum(() => { + return { + AbstractFungible: sts.enumStruct({ + id: sts.bytes(), + amount: sts.bigint(), + }), + AbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + instance: V1AssetInstance, + }), + All: sts.unit(), + AllAbstractFungible: sts.enumStruct({ + id: sts.bytes(), + }), + AllAbstractNonFungible: sts.enumStruct({ + class: sts.bytes(), + }), + AllConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + }), + AllConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + }), + AllFungible: sts.unit(), + AllNonFungible: sts.unit(), + ConcreteFungible: sts.enumStruct({ + id: V0MultiLocation, + amount: sts.bigint(), + }), + ConcreteNonFungible: sts.enumStruct({ + class: V0MultiLocation, + instance: V1AssetInstance, + }), + None: sts.unit(), + } +}) + +export const V0MultiLocation: sts.Type = sts.closedEnum(() => { + return { + Null: sts.unit(), + X1: V0Junction, + X2: sts.tuple(() => [V0Junction, V0Junction]), + X3: sts.tuple(() => [V0Junction, V0Junction, V0Junction]), + X4: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction]), + X5: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X6: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X7: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + X8: sts.tuple(() => [V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction, V0Junction]), + } +}) + +export const V0Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V0NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V0NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V0NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: WeakBoundedVec, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Parent: sts.unit(), + Plurality: sts.enumStruct({ + id: V0BodyId, + part: V0BodyPart, + }), + } +}) + +export const V0Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V0MultiAsset), + } +}) + +export type V0Response = V0Response_Assets + +export interface V0Response_Assets { + __kind: 'Assets' + value: V0MultiAsset[] +} + +export type V0Xcm = V0Xcm_HrmpChannelAccepted | V0Xcm_HrmpChannelClosing | V0Xcm_HrmpNewChannelOpenRequest | V0Xcm_QueryResponse | V0Xcm_RelayedFrom | V0Xcm_ReserveAssetDeposit | V0Xcm_TeleportAsset | V0Xcm_Transact | V0Xcm_TransferAsset | V0Xcm_TransferReserveAsset | V0Xcm_WithdrawAsset + +export interface V0Xcm_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V0Xcm_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V0Xcm_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V0Xcm_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface V0Xcm_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: V0Xcm +} + +export interface V0Xcm_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export interface V0Xcm_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V0Xcm_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface V0Xcm_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface V0Xcm_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: V0Order[] +} + +export type VersionedXcm = VersionedXcm_V0 | VersionedXcm_V1 | VersionedXcm_V2 + +export interface VersionedXcm_V0 { + __kind: 'V0' + value: V0Xcm +} + +export interface VersionedXcm_V1 { + __kind: 'V1' + value: V1Xcm +} + +export interface VersionedXcm_V2 { + __kind: 'V2' + value: V2Instruction[] +} + +export const V2WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: sts.bigint(), + Unlimited: sts.unit(), + } +}) + +export const VersionedMultiAssets: sts.Type = sts.closedEnum(() => { + return { + V0: sts.array(() => V0MultiAsset), + V1: sts.array(() => V1MultiAsset), + } +}) + +export type VersionedMultiAssets = VersionedMultiAssets_V0 | VersionedMultiAssets_V1 + +export interface VersionedMultiAssets_V0 { + __kind: 'V0' + value: V0MultiAsset[] +} + +export interface VersionedMultiAssets_V1 { + __kind: 'V1' + value: V1MultiAsset[] +} + +export const V1MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V1Junctions, + } +}) + +export const VersionedMultiLocation: sts.Type = sts.closedEnum(() => { + return { + V0: V0MultiLocation, + V1: V1MultiLocation, + } +}) + +export type VersionedMultiLocation = VersionedMultiLocation_V0 | VersionedMultiLocation_V1 + +export interface VersionedMultiLocation_V0 { + __kind: 'V0' + value: V0MultiLocation +} + +export interface VersionedMultiLocation_V1 { + __kind: 'V1' + value: V1MultiLocation +} + +export const Type_425: sts.Type = sts.closedEnum(() => { + return { + V0: Type_426, + V1: Type_431, + V2: sts.array(() => Type_437), + } +}) + +export const Type_437: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + ticket: V1MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V1Junctions, + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V1MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V1MultiAsset), + SetAppendix: sts.array(() => Type_437), + SetErrorHandler: sts.array(() => Type_437), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_430, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V1MultiAsset), + } +}) + +export const Type_430: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface Type_430 { + encoded: Bytes +} + +export type Type_437 = Type_437_BuyExecution | Type_437_ClaimAsset | Type_437_ClearError | Type_437_ClearOrigin | Type_437_DepositAsset | Type_437_DepositReserveAsset | Type_437_DescendOrigin | Type_437_ExchangeAsset | Type_437_HrmpChannelAccepted | Type_437_HrmpChannelClosing | Type_437_HrmpNewChannelOpenRequest | Type_437_InitiateReserveWithdraw | Type_437_InitiateTeleport | Type_437_QueryHolding | Type_437_QueryResponse | Type_437_ReceiveTeleportedAsset | Type_437_RefundSurplus | Type_437_ReportError | Type_437_ReserveAssetDeposited | Type_437_SetAppendix | Type_437_SetErrorHandler | Type_437_SubscribeVersion | Type_437_Transact | Type_437_TransferAsset | Type_437_TransferReserveAsset | Type_437_Trap | Type_437_UnsubscribeVersion | Type_437_WithdrawAsset + +export interface Type_437_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weightLimit: V2WeightLimit +} + +export interface Type_437_ClaimAsset { + __kind: 'ClaimAsset' + assets: V1MultiAsset[] + ticket: V1MultiLocation +} + +export interface Type_437_ClearError { + __kind: 'ClearError' +} + +export interface Type_437_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_437_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_437_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_437_DescendOrigin { + __kind: 'DescendOrigin' + value: V1Junctions +} + +export interface Type_437_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_437_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_437_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_437_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_437_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_437_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_437_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter + maxResponseWeight: bigint +} + +export interface Type_437_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface Type_437_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V1MultiAsset[] +} + +export interface Type_437_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_437_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V1MultiLocation + maxResponseWeight: bigint +} + +export interface Type_437_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V1MultiAsset[] +} + +export interface Type_437_SetAppendix { + __kind: 'SetAppendix' + value: Type_437[] +} + +export interface Type_437_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_437[] +} + +export interface Type_437_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_437_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_430 +} + +export interface Type_437_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_437_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + xcm: V2Instruction[] +} + +export interface Type_437_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_437_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_437_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V1MultiAsset[] +} + +export const Type_431: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V1Response, + }), + ReceiveTeleportedAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_433), + }), + RelayedFrom: sts.enumStruct({ + who: V1Junctions, + message: Type_431, + }), + ReserveAssetDeposited: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_433), + }), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_430, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + beneficiary: V1MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V1MultiAsset), + effects: sts.array(() => Type_433), + }), + } +}) + +export const Type_433: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V1MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + instructions: sts.array(() => Type_431), + }), + DepositAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V1MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V1MultiAssetFilter, + maxAssets: sts.number(), + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + ExchangeAsset: sts.enumStruct({ + give: V1MultiAssetFilter, + receive: sts.array(() => V1MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V1MultiAssetFilter, + reserve: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: V1MultiAssetFilter, + dest: V1MultiLocation, + effects: sts.array(() => V1Order), + }), + Noop: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V1MultiLocation, + assets: V1MultiAssetFilter, + }), + } +}) + +export type Type_433 = Type_433_BuyExecution | Type_433_DepositAsset | Type_433_DepositReserveAsset | Type_433_ExchangeAsset | Type_433_InitiateReserveWithdraw | Type_433_InitiateTeleport | Type_433_Noop | Type_433_QueryHolding + +export interface Type_433_BuyExecution { + __kind: 'BuyExecution' + fees: V1MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + instructions: Type_431[] +} + +export interface Type_433_DepositAsset { + __kind: 'DepositAsset' + assets: V1MultiAssetFilter + maxAssets: number + beneficiary: V1MultiLocation +} + +export interface Type_433_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V1MultiAssetFilter + maxAssets: number + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_433_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V1MultiAssetFilter + receive: V1MultiAsset[] +} + +export interface Type_433_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V1MultiAssetFilter + reserve: V1MultiLocation + effects: V1Order[] +} + +export interface Type_433_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V1MultiAssetFilter + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_433_Noop { + __kind: 'Noop' +} + +export interface Type_433_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V1MultiLocation + assets: V1MultiAssetFilter +} + +export type Type_431 = Type_431_HrmpChannelAccepted | Type_431_HrmpChannelClosing | Type_431_HrmpNewChannelOpenRequest | Type_431_QueryResponse | Type_431_ReceiveTeleportedAsset | Type_431_RelayedFrom | Type_431_ReserveAssetDeposited | Type_431_SubscribeVersion | Type_431_Transact | Type_431_TransferAsset | Type_431_TransferReserveAsset | Type_431_UnsubscribeVersion | Type_431_WithdrawAsset + +export interface Type_431_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_431_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_431_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_431_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V1Response +} + +export interface Type_431_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + assets: V1MultiAsset[] + effects: Type_433[] +} + +export interface Type_431_RelayedFrom { + __kind: 'RelayedFrom' + who: V1Junctions + message: Type_431 +} + +export interface Type_431_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + assets: V1MultiAsset[] + effects: Type_433[] +} + +export interface Type_431_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_431_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_430 +} + +export interface Type_431_TransferAsset { + __kind: 'TransferAsset' + assets: V1MultiAsset[] + beneficiary: V1MultiLocation +} + +export interface Type_431_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V1MultiAsset[] + dest: V1MultiLocation + effects: V1Order[] +} + +export interface Type_431_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_431_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V1MultiAsset[] + effects: Type_433[] +} + +export const Type_426: sts.Type = sts.closedEnum(() => { + return { + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V0Response, + }), + RelayedFrom: sts.enumStruct({ + who: V0MultiLocation, + message: Type_426, + }), + ReserveAssetDeposit: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_428), + }), + TeleportAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_428), + }), + Transact: sts.enumStruct({ + originType: V0OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_430, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + WithdrawAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + effects: sts.array(() => Type_428), + }), + } +}) + +export const Type_428: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V0MultiAsset, + weight: sts.bigint(), + debt: sts.bigint(), + haltOnError: sts.boolean(), + xcm: sts.array(() => Type_426), + }), + DepositAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + ExchangeAsset: sts.enumStruct({ + give: sts.array(() => V0MultiAsset), + receive: sts.array(() => V0MultiAsset), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + reserve: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + InitiateTeleport: sts.enumStruct({ + assets: sts.array(() => V0MultiAsset), + dest: V0MultiLocation, + effects: sts.array(() => V0Order), + }), + Null: sts.unit(), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V0MultiLocation, + assets: sts.array(() => V0MultiAsset), + }), + } +}) + +export type Type_428 = Type_428_BuyExecution | Type_428_DepositAsset | Type_428_DepositReserveAsset | Type_428_ExchangeAsset | Type_428_InitiateReserveWithdraw | Type_428_InitiateTeleport | Type_428_Null | Type_428_QueryHolding + +export interface Type_428_BuyExecution { + __kind: 'BuyExecution' + fees: V0MultiAsset + weight: bigint + debt: bigint + haltOnError: boolean + xcm: Type_426[] +} + +export interface Type_428_DepositAsset { + __kind: 'DepositAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_428_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_428_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V0MultiAsset[] + receive: V0MultiAsset[] +} + +export interface Type_428_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V0MultiAsset[] + reserve: V0MultiLocation + effects: V0Order[] +} + +export interface Type_428_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_428_Null { + __kind: 'Null' +} + +export interface Type_428_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V0MultiLocation + assets: V0MultiAsset[] +} + +export type Type_426 = Type_426_HrmpChannelAccepted | Type_426_HrmpChannelClosing | Type_426_HrmpNewChannelOpenRequest | Type_426_QueryResponse | Type_426_RelayedFrom | Type_426_ReserveAssetDeposit | Type_426_TeleportAsset | Type_426_Transact | Type_426_TransferAsset | Type_426_TransferReserveAsset | Type_426_WithdrawAsset + +export interface Type_426_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_426_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_426_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_426_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V0Response +} + +export interface Type_426_RelayedFrom { + __kind: 'RelayedFrom' + who: V0MultiLocation + message: Type_426 +} + +export interface Type_426_ReserveAssetDeposit { + __kind: 'ReserveAssetDeposit' + assets: V0MultiAsset[] + effects: Type_428[] +} + +export interface Type_426_TeleportAsset { + __kind: 'TeleportAsset' + assets: V0MultiAsset[] + effects: Type_428[] +} + +export interface Type_426_Transact { + __kind: 'Transact' + originType: V0OriginKind + requireWeightAtMost: bigint + call: Type_430 +} + +export interface Type_426_TransferAsset { + __kind: 'TransferAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation +} + +export interface Type_426_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V0MultiAsset[] + dest: V0MultiLocation + effects: V0Order[] +} + +export interface Type_426_WithdrawAsset { + __kind: 'WithdrawAsset' + assets: V0MultiAsset[] + effects: Type_428[] +} + +export type Type_425 = Type_425_V0 | Type_425_V1 | Type_425_V2 + +export interface Type_425_V0 { + __kind: 'V0' + value: Type_426 +} + +export interface Type_425_V1 { + __kind: 'V1' + value: Type_431 +} + +export interface Type_425_V2 { + __kind: 'V2' + value: Type_437[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type XcmPalletCall = XcmPalletCall_execute | XcmPalletCall_force_default_xcm_version | XcmPalletCall_force_subscribe_version_notify | XcmPalletCall_force_unsubscribe_version_notify | XcmPalletCall_force_xcm_version | XcmPalletCall_limited_reserve_transfer_assets | XcmPalletCall_limited_teleport_assets | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets + +/** + * Execute an XCM message from a local, signed, origin. + * + * An event is deposited indicating whether `msg` could be executed completely or only + * partially. + * + * No more than `max_weight` will be used in its attempted execution. If this is less than the + * maximum amount of weight that the message could take to be executed, then no execution + * attempt will be made. + * + * NOTE: A successful return to this does *not* imply that the `msg` was executed successfully + * to completion; only that *some* of it was executed. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Type_425 + maxWeight: bigint +} + +/** + * Set a safe XCM version (the version that XCM should be encoded with if the most recent + * version a destination can accept is unknown). + * + * - `origin`: Must be Root. + * - `maybe_xcm_version`: The default XCM encoding version, or `None` to disable. + */ +export interface XcmPalletCall_force_default_xcm_version { + __kind: 'force_default_xcm_version' + maybeXcmVersion?: (number | undefined) +} + +/** + * Ask a location to notify us regarding their XCM version and any changes to it. + * + * - `origin`: Must be Root. + * - `location`: The location to which we should subscribe for XCM version notifications. + */ +export interface XcmPalletCall_force_subscribe_version_notify { + __kind: 'force_subscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Require that a particular destination should no longer notify us regarding any XCM + * version changes. + * + * - `origin`: Must be Root. + * - `location`: The location to which we are currently subscribed for XCM version + * notifications which we no longer desire. + */ +export interface XcmPalletCall_force_unsubscribe_version_notify { + __kind: 'force_unsubscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Extoll that a particular destination can be communicated with through a particular + * version of XCM. + * + * - `origin`: Must be Root. + * - `location`: The destination that is being described. + * - `xcm_version`: The latest version of XCM that `location` supports. + */ +export interface XcmPalletCall_force_xcm_version { + __kind: 'force_xcm_version' + location: V1MultiLocation + xcmVersion: number +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination + * chain and forward a notification XCM. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight + * is needed than `weight_limit`, then the operation will fail and the assets send may be + * at risk. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_reserve_transfer_assets { + __kind: 'limited_reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight + * is needed than `weight_limit`, then the operation will fail and the assets send may be + * at risk. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_teleport_assets { + __kind: 'limited_teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V2WeightLimit +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination + * chain and forward a notification XCM. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, + * with all fees taken as needed from the asset. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +export interface XcmPalletCall_send { + __kind: 'send' + dest: VersionedMultiLocation + message: VersionedXcm +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, + * with all fees taken as needed from the asset. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const WhitelistCall: sts.Type = sts.closedEnum(() => { + return { + dispatch_whitelisted_call: sts.enumStruct({ + callHash: H256, + callEncodedLen: sts.number(), + callWeightWitness: Weight, + }), + dispatch_whitelisted_call_with_preimage: sts.enumStruct({ + call: Call, + }), + remove_whitelisted_call: sts.enumStruct({ + callHash: H256, + }), + whitelist_call: sts.enumStruct({ + callHash: H256, + }), + } +}) + +export const H256 = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type WhitelistCall = WhitelistCall_dispatch_whitelisted_call | WhitelistCall_dispatch_whitelisted_call_with_preimage | WhitelistCall_remove_whitelisted_call | WhitelistCall_whitelist_call + +export interface WhitelistCall_dispatch_whitelisted_call { + __kind: 'dispatch_whitelisted_call' + callHash: H256 + callEncodedLen: number + callWeightWitness: Weight +} + +export interface WhitelistCall_dispatch_whitelisted_call_with_preimage { + __kind: 'dispatch_whitelisted_call_with_preimage' + call: Call +} + +export interface WhitelistCall_remove_whitelisted_call { + __kind: 'remove_whitelisted_call' + callHash: H256 +} + +export interface WhitelistCall_whitelist_call { + __kind: 'whitelist_call' + callHash: H256 +} + +export type H256 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VoterListCall: sts.Type = sts.closedEnum(() => { + return { + put_in_front_of: sts.enumStruct({ + lighter: MultiAddress, + }), + rebag: sts.enumStruct({ + dislocated: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VoterListCall = VoterListCall_put_in_front_of | VoterListCall_rebag + +/** + * Move the caller's Id directly in front of `lighter`. + * + * The dispatch origin for this call must be _Signed_ and can only be called by the Id of + * the account going in front of `lighter`. + * + * Only works if + * - both nodes are within the same bag, + * - and `origin` has a greater `Score` than `lighter`. + */ +export interface VoterListCall_put_in_front_of { + __kind: 'put_in_front_of' + lighter: MultiAddress +} + +/** + * Declare that some `dislocated` account has, through rewards or penalties, sufficiently + * changed its score that it should properly fall into a different bag than its current + * one. + * + * Anyone can call this function about any potentially dislocated account. + * + * Will always update the stored score of `dislocated` to the correct score, based on + * `ScoreProvider`. + * + * If `dislocated` does not exists, it returns an error. + */ +export interface VoterListCall_rebag { + __kind: 'rebag' + dislocated: MultiAddress +} + +export type MultiAddress = MultiAddress_Address20 | MultiAddress_Address32 | MultiAddress_Id | MultiAddress_Index | MultiAddress_Raw + +export interface MultiAddress_Address20 { + __kind: 'Address20' + value: Bytes +} + +export interface MultiAddress_Address32 { + __kind: 'Address32' + value: Bytes +} + +export interface MultiAddress_Id { + __kind: 'Id' + value: AccountId32 +} + +export interface MultiAddress_Index { + __kind: 'Index' +} + +export interface MultiAddress_Raw { + __kind: 'Raw' + value: Bytes +} + +export type AccountId32 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: MultiAddress, + target: MultiAddress, + schedule: VestingInfo, + }), + merge_schedules: sts.enumStruct({ + schedule1Index: sts.number(), + schedule2Index: sts.number(), + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: MultiAddress, + }), + vested_transfer: sts.enumStruct({ + target: MultiAddress, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: sts.bigint(), + perBlock: sts.bigint(), + startingBlock: sts.number(), + } +}) + +export interface VestingInfo { + locked: bigint + perBlock: bigint + startingBlock: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_merge_schedules | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: MultiAddress + target: MultiAddress + schedule: VestingInfo +} + +/** + * Merge two vesting schedules together, creating a new vesting schedule that unlocks over + * the highest possible start and end blocks. If both schedules have already started the + * current block will be used as the schedule start; with the caveat that if one schedule + * is finished by the current block, the other will be treated as the new merged schedule, + * unmodified. + * + * NOTE: If `schedule1_index == schedule2_index` this is a no-op. + * NOTE: This will unlock all schedules through the current block prior to merging. + * NOTE: If both schedules have ended by the current block, no new schedule will be created + * and both will be removed. + * + * Merged schedule attributes: + * - `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block, + * current_block)`. + * - `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`. + * - `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`. + * + * The dispatch origin for this call must be _Signed_. + * + * - `schedule1_index`: index of the first schedule to merge. + * - `schedule2_index`: index of the second schedule to merge. + */ +export interface VestingCall_merge_schedules { + __kind: 'merge_schedules' + schedule1Index: number + schedule2Index: number +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: MultiAddress +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account receiving the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: MultiAddress + schedule: VestingInfo +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Call, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Call), + }), + dispatch_as: sts.enumStruct({ + asOrigin: OriginCaller, + call: Call, + }), + force_batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + with_weight: sts.enumStruct({ + call: Call, + weight: Weight, + }), + } +}) + +export const OriginCaller: sts.Type = sts.closedEnum(() => { + return { + Council: Type_152, + Origins: Origin, + ParachainsOrigin: Type_155, + TechnicalCommittee: Type_153, + Void: Void, + XcmPallet: Type_157, + system: RawOrigin, + } +}) + +export const RawOrigin: sts.Type = sts.closedEnum(() => { + return { + None: sts.unit(), + Root: sts.unit(), + Signed: AccountId32, + } +}) + +export type RawOrigin = RawOrigin_None | RawOrigin_Root | RawOrigin_Signed + +export interface RawOrigin_None { + __kind: 'None' +} + +export interface RawOrigin_Root { + __kind: 'Root' +} + +export interface RawOrigin_Signed { + __kind: 'Signed' + value: AccountId32 +} + +export const Type_157: sts.Type = sts.closedEnum(() => { + return { + Response: V1MultiLocation, + Xcm: V1MultiLocation, + } +}) + +export type Type_157 = Type_157_Response | Type_157_Xcm + +export interface Type_157_Response { + __kind: 'Response' + value: V1MultiLocation +} + +export interface Type_157_Xcm { + __kind: 'Xcm' + value: V1MultiLocation +} + +export const Void: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Void = never + +export const Type_153: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_153 = Type_153_Member | Type_153_Members | Type_153__Phantom + +export interface Type_153_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_153_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_153__Phantom { + __kind: '_Phantom' +} + +export const Type_155: sts.Type = sts.closedEnum(() => { + return { + Parachain: Id, + } +}) + +export const Id = sts.number() + +export type Type_155 = Type_155_Parachain + +export interface Type_155_Parachain { + __kind: 'Parachain' + value: Id +} + +export type Id = number + +export const Origin: sts.Type = sts.closedEnum(() => { + return { + AuctionAdmin: sts.unit(), + BigSpender: sts.unit(), + BigTipper: sts.unit(), + Fellows: sts.unit(), + Fellowship1Dan: sts.unit(), + Fellowship2Dan: sts.unit(), + Fellowship3Dan: sts.unit(), + Fellowship4Dan: sts.unit(), + Fellowship5Dan: sts.unit(), + Fellowship6Dan: sts.unit(), + Fellowship7Dan: sts.unit(), + Fellowship8Dan: sts.unit(), + Fellowship9Dan: sts.unit(), + FellowshipAdmin: sts.unit(), + FellowshipExperts: sts.unit(), + FellowshipInitiates: sts.unit(), + FellowshipMasters: sts.unit(), + GeneralAdmin: sts.unit(), + LeaseAdmin: sts.unit(), + MediumSpender: sts.unit(), + ReferendumCanceller: sts.unit(), + ReferendumKiller: sts.unit(), + SmallSpender: sts.unit(), + SmallTipper: sts.unit(), + StakingAdmin: sts.unit(), + Treasurer: sts.unit(), + WhitelistedCaller: sts.unit(), + } +}) + +export type Origin = Origin_AuctionAdmin | Origin_BigSpender | Origin_BigTipper | Origin_Fellows | Origin_Fellowship1Dan | Origin_Fellowship2Dan | Origin_Fellowship3Dan | Origin_Fellowship4Dan | Origin_Fellowship5Dan | Origin_Fellowship6Dan | Origin_Fellowship7Dan | Origin_Fellowship8Dan | Origin_Fellowship9Dan | Origin_FellowshipAdmin | Origin_FellowshipExperts | Origin_FellowshipInitiates | Origin_FellowshipMasters | Origin_GeneralAdmin | Origin_LeaseAdmin | Origin_MediumSpender | Origin_ReferendumCanceller | Origin_ReferendumKiller | Origin_SmallSpender | Origin_SmallTipper | Origin_StakingAdmin | Origin_Treasurer | Origin_WhitelistedCaller + +export interface Origin_AuctionAdmin { + __kind: 'AuctionAdmin' +} + +export interface Origin_BigSpender { + __kind: 'BigSpender' +} + +export interface Origin_BigTipper { + __kind: 'BigTipper' +} + +export interface Origin_Fellows { + __kind: 'Fellows' +} + +export interface Origin_Fellowship1Dan { + __kind: 'Fellowship1Dan' +} + +export interface Origin_Fellowship2Dan { + __kind: 'Fellowship2Dan' +} + +export interface Origin_Fellowship3Dan { + __kind: 'Fellowship3Dan' +} + +export interface Origin_Fellowship4Dan { + __kind: 'Fellowship4Dan' +} + +export interface Origin_Fellowship5Dan { + __kind: 'Fellowship5Dan' +} + +export interface Origin_Fellowship6Dan { + __kind: 'Fellowship6Dan' +} + +export interface Origin_Fellowship7Dan { + __kind: 'Fellowship7Dan' +} + +export interface Origin_Fellowship8Dan { + __kind: 'Fellowship8Dan' +} + +export interface Origin_Fellowship9Dan { + __kind: 'Fellowship9Dan' +} + +export interface Origin_FellowshipAdmin { + __kind: 'FellowshipAdmin' +} + +export interface Origin_FellowshipExperts { + __kind: 'FellowshipExperts' +} + +export interface Origin_FellowshipInitiates { + __kind: 'FellowshipInitiates' +} + +export interface Origin_FellowshipMasters { + __kind: 'FellowshipMasters' +} + +export interface Origin_GeneralAdmin { + __kind: 'GeneralAdmin' +} + +export interface Origin_LeaseAdmin { + __kind: 'LeaseAdmin' +} + +export interface Origin_MediumSpender { + __kind: 'MediumSpender' +} + +export interface Origin_ReferendumCanceller { + __kind: 'ReferendumCanceller' +} + +export interface Origin_ReferendumKiller { + __kind: 'ReferendumKiller' +} + +export interface Origin_SmallSpender { + __kind: 'SmallSpender' +} + +export interface Origin_SmallTipper { + __kind: 'SmallTipper' +} + +export interface Origin_StakingAdmin { + __kind: 'StakingAdmin' +} + +export interface Origin_Treasurer { + __kind: 'Treasurer' +} + +export interface Origin_WhitelistedCaller { + __kind: 'WhitelistedCaller' +} + +export const Type_152: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_152 = Type_152_Member | Type_152_Members | Type_152__Phantom + +export interface Type_152_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_152_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_152__Phantom { + __kind: '_Phantom' +} + +export type OriginCaller = OriginCaller_Council | OriginCaller_Origins | OriginCaller_ParachainsOrigin | OriginCaller_TechnicalCommittee | OriginCaller_Void | OriginCaller_XcmPallet | OriginCaller_system + +export interface OriginCaller_Council { + __kind: 'Council' + value: Type_152 +} + +export interface OriginCaller_Origins { + __kind: 'Origins' + value: Origin +} + +export interface OriginCaller_ParachainsOrigin { + __kind: 'ParachainsOrigin' + value: Type_155 +} + +export interface OriginCaller_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: Type_153 +} + +export interface OriginCaller_Void { + __kind: 'Void' + value: Void +} + +export interface OriginCaller_XcmPallet { + __kind: 'XcmPallet' + value: Type_157 +} + +export interface OriginCaller_system { + __kind: 'system' + value: RawOrigin +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all | UtilityCall_dispatch_as | UtilityCall_force_batch | UtilityCall_with_weight + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Call +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin except `None`. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then the calls are dispatched without checking origin filter. (This + * includes bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Call[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin except `None`. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then the calls are dispatched without checking origin filter. (This + * includes bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Call[] +} + +/** + * Dispatches a function call with a provided origin. + * + * The dispatch origin for this call must be _Root_. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB write (event). + * - Weight of derivative `call` execution + T::WeightInfo::dispatch_as(). + * # + */ +export interface UtilityCall_dispatch_as { + __kind: 'dispatch_as' + asOrigin: OriginCaller + call: Call +} + +/** + * Send a batch of dispatch calls. + * Unlike `batch`, it allows errors and won't interrupt. + * + * May be called from any origin except `None`. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then the calls are dispatch without checking origin filter. (This + * includes bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_force_batch { + __kind: 'force_batch' + calls: Call[] +} + +/** + * Dispatch a function call with a specified weight. + * + * This function does not check the weight of the call, and instead allows the + * Root origin to specify the weight of the call. + * + * The dispatch origin for this call must be _Root_. + */ +export interface UtilityCall_with_weight { + __kind: 'with_weight' + call: Call + weight: Weight +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UmpCall: sts.Type = sts.closedEnum(() => { + return { + service_overweight: sts.enumStruct({ + index: sts.bigint(), + weightLimit: Weight, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UmpCall = UmpCall_service_overweight + +/** + * Service a single overweight upward message. + * + * - `origin`: Must pass `ExecuteOverweightOrigin`. + * - `index`: The index of the overweight message to service. + * - `weight_limit`: The amount of weight that message execution may take. + * + * Errors: + * - `UnknownMessageIndex`: Message of `index` is unknown. + * - `WeightOverLimit`: Message execution may use greater than `weight_limit`. + * + * Events: + * - `OverweightServiced`: On success. + */ +export interface UmpCall_service_overweight { + __kind: 'service_overweight' + index: bigint + weightLimit: Weight +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: MultiAddress, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + remove_approval: sts.enumStruct({ + proposalId: sts.number(), + }), + spend: sts.enumStruct({ + amount: sts.bigint(), + beneficiary: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_remove_approval | TreasuryCall_spend + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: MultiAddress +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Force a previously approved proposal to be removed from the approval queue. + * The original deposit will no longer be returned. + * + * May only be called from `T::RejectOrigin`. + * - `proposal_id`: The index of a proposal + * + * # + * - Complexity: O(A) where `A` is the number of approvals + * - Db reads and writes: `Approvals` + * # + * + * Errors: + * - `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue, + * i.e., the proposal has not been approved. This could also mean the proposal does not + * exist altogether, thus there is no way it would have been approved in the first place. + */ +export interface TreasuryCall_remove_approval { + __kind: 'remove_approval' + proposalId: number +} + +/** + * Propose and approve a spend of treasury funds. + * + * - `origin`: Must be `SpendOrigin` with the `Success` value being at least `amount`. + * - `amount`: The amount to be transferred from the treasury to the `beneficiary`. + * - `beneficiary`: The destination account for the transfer. + * + * NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the + * beneficiary. + */ +export interface TreasuryCall_spend { + __kind: 'spend' + amount: bigint + beneficiary: MultiAddress +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TipsCall: sts.Type = sts.closedEnum(() => { + return { + close_tip: sts.enumStruct({ + hash: H256, + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: MultiAddress, + }), + retract_tip: sts.enumStruct({ + hash: H256, + }), + slash_tip: sts.enumStruct({ + hash: H256, + }), + tip: sts.enumStruct({ + hash: H256, + tipValue: sts.bigint(), + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: MultiAddress, + tipValue: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TipsCall = TipsCall_close_tip | TipsCall_report_awesome | TipsCall_retract_tip | TipsCall_slash_tip | TipsCall_tip | TipsCall_tip_new + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost + * depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TipsCall_close_tip { + __kind: 'close_tip' + hash: H256 +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: MultiAddress +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TipsCall_retract_tip { + __kind: 'retract_tip' + hash: H256 +} + +/** + * Remove and slash an already-open tip. + * + * May only be called from `T::RejectOrigin`. + * + * As a result, the finder is slashed and the deposits are lost. + * + * Emits `TipSlashed` if successful. + * + * # + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * # + */ +export interface TipsCall_slash_tip { + __kind: 'slash_tip' + hash: H256 +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`, insert tip and check closing, `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TipsCall_tip { + __kind: 'tip' + hash: H256 + tipValue: bigint +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of + * `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: MultiAddress + tipValue: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in + * `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: MultiAddress, + }), + change_key: sts.enumStruct({ + new: MultiAddress, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: MultiAddress, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId32), + }), + set_prime: sts.enumStruct({ + who: MultiAddress, + }), + swap_member: sts.enumStruct({ + remove: MultiAddress, + add: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: MultiAddress +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: MultiAddress +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: MultiAddress +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId32[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: MultiAddress +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: MultiAddress + add: MultiAddress +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: Weight, + lengthBound: sts.number(), + }), + close_old_weight: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_close_old_weight | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: Weight + lengthBound: number +} + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close_old_weight { + __kind: 'close_old_weight' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + kill_prefix: sts.enumStruct({ + prefix: sts.bytes(), + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => sts.bytes()), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SystemCall = SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Bytes + subkeys: number +} + +/** + * Kill some items from storage. + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Bytes[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Make some on-chain remark and emit event. + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is + * expensive). + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very + * expensive. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full + * block. # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: [Bytes, Bytes][] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: MultiAddress, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: sts.number(), + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + controller: AccountId32, + }), + force_apply_min_commission: sts.enumStruct({ + validatorStash: AccountId32, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => MultiAddress), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => MultiAddress), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + }), + reap_stash: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: MultiAddress, + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId32), + }), + set_min_commission: sts.enumStruct({ + new: Perbill, + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_staking_configs: sts.enumStruct({ + minNominatorBond: ConfigOp, + minValidatorBond: ConfigOp, + maxNominatorCount: Type_104, + maxValidatorCount: Type_104, + chillThreshold: Type_105, + minCommission: Type_106, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export const Type_106: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export type Type_106 = Type_106_Noop | Type_106_Remove | Type_106_Set + +export interface Type_106_Noop { + __kind: 'Noop' +} + +export interface Type_106_Remove { + __kind: 'Remove' +} + +export interface Type_106_Set { + __kind: 'Set' + value: Perbill +} + +export type Perbill = number + +export const Type_105: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Percent, + } +}) + +export type Type_105 = Type_105_Noop | Type_105_Remove | Type_105_Set + +export interface Type_105_Noop { + __kind: 'Noop' +} + +export interface Type_105_Remove { + __kind: 'Remove' +} + +export interface Type_105_Set { + __kind: 'Set' + value: Percent +} + +export type Percent = number + +export const Type_104: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_104 = Type_104_Noop | Type_104_Remove | Type_104_Set + +export interface Type_104_Noop { + __kind: 'Noop' +} + +export interface Type_104_Remove { + __kind: 'Remove' +} + +export interface Type_104_Set { + __kind: 'Set' + value: number +} + +export const ConfigOp: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type ConfigOp = ConfigOp_Noop | ConfigOp_Remove | ConfigOp_Set + +export interface ConfigOp_Noop { + __kind: 'Noop' +} + +export interface ConfigOp_Remove { + __kind: 'Remove' +} + +export interface ConfigOp_Set { + __kind: 'Set' + value: bigint +} + +export const Perbill = sts.number() + +export const Percent = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_force_apply_min_commission | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_invulnerables | StakingCall_set_min_commission | StakingCall_set_payee | StakingCall_set_staking_configs | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: MultiAddress + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose + * any limitation on the amount that can be added. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::AdminOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: number + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Declare a `controller` to stop participating as either a validator or nominator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_, but can be called by anyone. + * + * If the caller is the same as the controller being targeted, then no further checks are + * enforced, and this function behaves just like `chill`. + * + * If the caller is different than the controller being targeted, the following conditions + * must be met: + * + * * `controller` must belong to a nominator who has become non-decodable, + * + * Or: + * + * * A `ChillThreshold` must be set and checked which defines how close to the max + * nominators or validators we must reach before users can start chilling one-another. + * * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine + * how close we are to the threshold. + * * A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines + * if this is a person that should be chilled because they have not met the threshold + * bond required. + * + * This can be helpful if bond requirements are updated, and we need to remove old users + * who do not satisfy these requirements. + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + controller: AccountId32 +} + +/** + * Force a validator to have at least the minimum commission. This will not affect a + * validator who already has a commission greater than or equal to the minimum. Any account + * can call this. + */ +export interface StakingCall_force_apply_min_commission { + __kind: 'force_apply_min_commission' + validatorStash: AccountId32 +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * Thus the election process may be ongoing when this is called. In this case the + * election will continue until the next era is triggered. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators upto maximum of + * `ElectionProviderBase::MaxWinners`. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: MultiAddress[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (T::MaxNominations). + * - Both the reads and writes follow a similar pattern. + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: MultiAddress[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId32 + era: number +} + +/** + * Remove all data structures concerning a staker/stash once it is at a state where it can + * be considered `dust` in the staking system. The requirements are: + * + * 1. the `total_balance` of the stash is below existential deposit. + * 2. or, the `ledger.total` of the stash is below existential deposit. + * + * The former can happen in cases like a slash; the latter when a fully unbonded account + * is still receiving staking rewards in `RewardDestination::Staked`. + * + * It can be called by anyone, as long as `stash` meets the above requirements. + * + * Refunds the transaction fees upon successful execution. + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MaxUnlockingChunks`. + * - Storage changes: Can't increase storage, only decrease it. + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor upto maximum of + * `ElectionProviderBase::MaxWinners`. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt instantly (as soon as this function is completed successfully). + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: MultiAddress +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId32[] +} + +/** + * Sets the minimum amount of commission that each validators must maintain. + * + * This call has lower privilege requirements than `set_staking_config` and can be called + * by the `T::AdminOrigin`. Root can always call this. + */ +export interface StakingCall_set_min_commission { + __kind: 'set_min_commission' + new: Perbill +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt instantly (as soon as this function is completed successfully). + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Update the various staking configurations . + * + * * `min_nominator_bond`: The minimum active bond needed to be a nominator. + * * `min_validator_bond`: The minimum active bond needed to be a validator. + * * `max_nominator_count`: The max number of users who can be a nominator at once. When + * set to `None`, no limit is enforced. + * * `max_validator_count`: The max number of users who can be a validator at once. When + * set to `None`, no limit is enforced. + * * `chill_threshold`: The ratio of `max_nominator_count` or `max_validator_count` which + * should be filled in order for the `chill_other` transaction to work. + * * `min_commission`: The minimum amount of commission that each validators must maintain. + * This is checked only upon calling `validate`. Existing validators are not affected. + * + * RuntimeOrigin must be Root to call this function. + * + * NOTE: Existing nominators and validators will not be affected by this update. + * to kick people under the new limits, `chill_other` should be called. + */ +export interface StakingCall_set_staking_configs { + __kind: 'set_staking_configs' + minNominatorBond: ConfigOp + minValidatorBond: ConfigOp + maxNominatorCount: Type_104 + maxValidatorCount: Type_104 + chillThreshold: Type_105 + minCommission: Type_106 +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`) + * can co-exists at the same time. If there are no unlocking chunks slots available + * [`Call::withdraw_unbonded`] is called to remove some of the chunks (if possible). + * + * If a user encounters the `InsufficientBond` error when calling this extrinsic, + * they should call `chill` first in order to free up their bonded funds. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * Complexity O(S) where S is the number of slashing spans to remove + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: sts.bigint(), + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: MultiAddress, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: MultiAddress, + judgement: Type_222, + }), + judge_suspended_member: sts.enumStruct({ + who: MultiAddress, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: MultiAddress, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: MultiAddress, + value: sts.bigint(), + tip: sts.bigint(), + }), + } +}) + +export const Type_222: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export type Type_222 = Type_222_Approve | Type_222_Rebid | Type_222_Reject + +export interface Type_222_Approve { + __kind: 'Approve' +} + +export interface Type_222_Rebid { + __kind: 'Rebid' +} + +export interface Type_222_Reject { + __kind: 'Reject' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: bigint +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * pallet to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: MultiAddress + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: MultiAddress + judgement: Type_222 +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin forgives + * (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to + * society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: MultiAddress + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured + * payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be approved (`true`) or + * rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: MultiAddress + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: MultiAddress + value: bigint + tip: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: Id, + }), + force_lease: sts.enumStruct({ + para: Id, + leaser: AccountId32, + amount: sts.bigint(), + periodBegin: sts.number(), + periodCount: sts.number(), + }), + trigger_onboard: sts.enumStruct({ + para: Id, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * Clear all leases for a Para Id, refunding any deposits back to the original owners. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: Id +} + +/** + * Just a connect into the `lease_out` call, in case Root wants to force some lease to happen + * independently of any other on-chain mechanism to use it. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: Id + leaser: AccountId32 + amount: bigint + periodBegin: number + periodCount: number +} + +/** + * Try to onboard a parachain that has a lease for the current lease period. + * + * This function can be useful if there was some state issue with a para that should + * have onboarded, but was unable to. As long as they have a lease period, we can + * let them onboard from here. + * + * Origin must be signed, but can be called by anyone. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: SessionKeys, + proof: sts.bytes(), + }), + } +}) + +export const SessionKeys: sts.Type = sts.struct(() => { + return { + grandpa: Public, + babe: sts.bytes(), + imOnline: sts.bytes(), + paraValidator: V2Public, + paraAssignment: sts.bytes(), + authorityDiscovery: sts.bytes(), + } +}) + +export const V2Public = sts.bytes() + +export const Public = sts.bytes() + +export interface SessionKeys { + grandpa: Public + babe: Bytes + imOnline: Bytes + paraValidator: V2Public + paraAssignment: Bytes + authorityDiscovery: Bytes +} + +export type V2Public = Bytes + +export type Public = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be Signed and the account must be either be + * convertible to a validator ID using the chain's typical addressing system (this usually + * means being a controller account) or directly convertible into a validator ID (which + * usually means being a stash account). + * + * # + * - Complexity: `O(1)` in number of key types. Actual cost depends on the number of length + * of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)`. Actual cost depends on the number of length of + * `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: SessionKeys + proof: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: sts.number(), + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_after: sts.enumStruct({ + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: number + index: number +} + +/** + * Cancel a named scheduled task. + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Schedule a named task. + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`](Self::schedule_named). + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + add_lock: sts.enumStruct({ + para: Id, + }), + deregister: sts.enumStruct({ + id: Id, + }), + force_register: sts.enumStruct({ + who: AccountId32, + deposit: sts.bigint(), + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + register: sts.enumStruct({ + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + remove_lock: sts.enumStruct({ + para: Id, + }), + reserve: sts.unit(), + schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + swap: sts.enumStruct({ + id: Id, + other: Id, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RegistrarCall = RegistrarCall_add_lock | RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_register | RegistrarCall_remove_lock | RegistrarCall_reserve | RegistrarCall_schedule_code_upgrade | RegistrarCall_set_current_head | RegistrarCall_swap + +/** + * Add a manager lock from a para. This will prevent the manager of a + * para to deregister or swap a para. + * + * Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked. + */ +export interface RegistrarCall_add_lock { + __kind: 'add_lock' + para: Id +} + +/** + * Deregister a Para Id, freeing all data and returning any deposit. + * + * The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: Id +} + +/** + * Force the registration of a Para Id on the relay chain. + * + * This function must be called by a Root origin. + * + * The deposit taken can be specified for this registration. Any `ParaId` + * can be registered, including sub-1000 IDs which are System Parachains. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId32 + deposit: bigint + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Register head data and validation code for a reserved Para Id. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. + * - `id`: The para ID. Must be owned/managed by the `origin` signing account. + * - `genesis_head`: The genesis head data of the parachain/thread. + * - `validation_code`: The initial validation code of the parachain/thread. + * + * ## Deposits/Fees + * The origin signed account must reserve a corresponding deposit for the registration. Anything already + * reserved previously for this para ID is accounted for. + * + * ## Events + * The `Registered` event is emitted in case of success. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Remove a manager lock from a para. This will allow the manager of a + * previously locked para to deregister or swap a para without using governance. + * + * Can only be called by the Root origin or the parachain. + */ +export interface RegistrarCall_remove_lock { + __kind: 'remove_lock' + para: Id +} + +/** + * Reserve a Para Id on the relay chain. + * + * This function will reserve a new Para Id to be owned/managed by the origin account. + * The origin account is able to register head data and validation code using `register` to create + * a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID. + * + * ## Deposits/Fees + * The origin must reserve a deposit of `ParaDeposit` for the registration. + * + * ## Events + * The `Reserved` event is emitted in case of success, which provides the ID reserved for use. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * Schedule a parachain upgrade. + * + * Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked. + */ +export interface RegistrarCall_schedule_code_upgrade { + __kind: 'schedule_code_upgrade' + para: Id + newCode: ValidationCode +} + +/** + * Set the parachain's current head. + * + * Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked. + */ +export interface RegistrarCall_set_current_head { + __kind: 'set_current_head' + para: Id + newHead: HeadData +} + +/** + * Swap a parachain with another parachain or parathread. + * + * The origin must be Root, the `para` owner, or the `para` itself. + * + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: Id + other: Id +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ReferendaCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + index: sts.number(), + }), + kill: sts.enumStruct({ + index: sts.number(), + }), + nudge_referendum: sts.enumStruct({ + index: sts.number(), + }), + one_fewer_deciding: sts.enumStruct({ + track: sts.number(), + }), + place_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_submission_deposit: sts.enumStruct({ + index: sts.number(), + }), + submit: sts.enumStruct({ + proposalOrigin: OriginCaller, + proposal: Bounded, + enactmentMoment: DispatchTime, + }), + } +}) + +export const DispatchTime: sts.Type = sts.closedEnum(() => { + return { + After: sts.number(), + At: sts.number(), + } +}) + +export type DispatchTime = DispatchTime_After | DispatchTime_At + +export interface DispatchTime_After { + __kind: 'After' + value: number +} + +export interface DispatchTime_At { + __kind: 'At' + value: number +} + +export const Bounded: sts.Type = sts.closedEnum(() => { + return { + Inline: BoundedVec, + Legacy: sts.enumStruct({ + hash: H256, + }), + Lookup: sts.enumStruct({ + hash: H256, + len: sts.number(), + }), + } +}) + +export const BoundedVec = sts.bytes() + +export type Bounded = Bounded_Inline | Bounded_Legacy | Bounded_Lookup + +export interface Bounded_Inline { + __kind: 'Inline' + value: BoundedVec +} + +export interface Bounded_Legacy { + __kind: 'Legacy' + hash: H256 +} + +export interface Bounded_Lookup { + __kind: 'Lookup' + hash: H256 + len: number +} + +export type BoundedVec = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ReferendaCall = ReferendaCall_cancel | ReferendaCall_kill | ReferendaCall_nudge_referendum | ReferendaCall_one_fewer_deciding | ReferendaCall_place_decision_deposit | ReferendaCall_refund_decision_deposit | ReferendaCall_refund_submission_deposit | ReferendaCall_submit + +/** + * Cancel an ongoing referendum. + * + * - `origin`: must be the `CancelOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Cancelled`. + */ +export interface ReferendaCall_cancel { + __kind: 'cancel' + index: number +} + +/** + * Cancel an ongoing referendum and slash the deposits. + * + * - `origin`: must be the `KillOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Killed` and `DepositSlashed`. + */ +export interface ReferendaCall_kill { + __kind: 'kill' + index: number +} + +/** + * Advance a referendum onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `index`: the referendum to be advanced. + */ +export interface ReferendaCall_nudge_referendum { + __kind: 'nudge_referendum' + index: number +} + +/** + * Advance a track onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `track`: the track to be advanced. + * + * Action item for when there is now one fewer referendum in the deciding phase and the + * `DecidingCount` is not yet updated. This means that we should either: + * - begin deciding another referendum (and leave `DecidingCount` alone); or + * - decrement `DecidingCount`. + */ +export interface ReferendaCall_one_fewer_deciding { + __kind: 'one_fewer_deciding' + track: number +} + +/** + * Post the Decision Deposit for a referendum. + * + * - `origin`: must be `Signed` and the account must have funds available for the + * referendum's track's Decision Deposit. + * - `index`: The index of the submitted referendum whose Decision Deposit is yet to be + * posted. + * + * Emits `DecisionDepositPlaced`. + */ +export interface ReferendaCall_place_decision_deposit { + __kind: 'place_decision_deposit' + index: number +} + +/** + * Refund the Decision Deposit for a closed referendum back to the depositor. + * + * - `origin`: must be `Signed` or `Root`. + * - `index`: The index of a closed referendum whose Decision Deposit has not yet been + * refunded. + * + * Emits `DecisionDepositRefunded`. + */ +export interface ReferendaCall_refund_decision_deposit { + __kind: 'refund_decision_deposit' + index: number +} + +/** + * Refund the Submission Deposit for a closed referendum back to the depositor. + * + * - `origin`: must be `Signed` or `Root`. + * - `index`: The index of a closed referendum whose Submission Deposit has not yet been + * refunded. + * + * Emits `SubmissionDepositRefunded`. + */ +export interface ReferendaCall_refund_submission_deposit { + __kind: 'refund_submission_deposit' + index: number +} + +/** + * Propose a referendum on a privileged action. + * + * - `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds + * available. + * - `proposal_origin`: The origin from which the proposal should be executed. + * - `proposal`: The proposal. + * - `enactment_moment`: The moment that the proposal should be enacted. + * + * Emits `Submitted`. + */ +export interface ReferendaCall_submit { + __kind: 'submit' + proposalOrigin: OriginCaller + proposal: Bounded + enactmentMoment: DispatchTime +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: MultiAddress, + call: Call, + }), + cancel_recovered: sts.enumStruct({ + account: MultiAddress, + }), + claim_recovery: sts.enumStruct({ + account: MultiAddress, + }), + close_recovery: sts.enumStruct({ + rescuer: MultiAddress, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId32), + threshold: sts.number(), + delayPeriod: sts.number(), + }), + initiate_recovery: sts.enumStruct({ + account: MultiAddress, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + vouch_recovery: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: MultiAddress + call: Call +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: MultiAddress +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully recovered by + * you. + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: MultiAddress +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: MultiAddress +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. Should be + * ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt before the + * account can be recovered. Should be less than or equal to the length of the list of + * friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized that + * needs to pass before the account can be recovered. + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId32[] + threshold: number + delayPeriod: number +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account needs to be + * recoverable (i.e. have a recovery configuration). + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: MultiAddress +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + announce: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + create_pure: sts.enumStruct({ + proxyType: ProxyType, + delay: sts.number(), + index: sts.number(), + }), + kill_pure: sts.enumStruct({ + spawner: MultiAddress, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + proxy_announced: sts.enumStruct({ + delegate: MultiAddress, + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + reject_announcement: sts.enumStruct({ + delegate: MultiAddress, + callHash: H256, + }), + remove_announcement: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_create_pure | ProxyCall_kill_pure | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: MultiAddress + callHash: H256 +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + */ +export interface ProxyCall_create_pure { + __kind: 'create_pure' + proxyType: ProxyType + delay: number + index: number +} + +/** + * Removes a previously spawned pure proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `pure` with corresponding parameters. + * + * - `spawner`: The account that originally called `pure` to create this account. + * - `index`: The disambiguation index originally passed to `pure`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `pure`. + * - `height`: The height of the chain when the call to `pure` was processed. + * - `ext_index`: The extrinsic index in which the call to `pure` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created pure + * account whose `pure` call has corresponding parameters. + */ +export interface ProxyCall_kill_pure { + __kind: 'kill_pure' + spawner: MultiAddress + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Dispatch the given `call` from an account that the sender is authorized for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: MultiAddress + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: MultiAddress + callHash: H256 +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: MultiAddress + callHash: H256 +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `pure`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Society | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Society { + __kind: 'Society' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PreimageCall: sts.Type = sts.closedEnum(() => { + return { + note_preimage: sts.enumStruct({ + bytes: sts.bytes(), + }), + request_preimage: sts.enumStruct({ + hash: H256, + }), + unnote_preimage: sts.enumStruct({ + hash: H256, + }), + unrequest_preimage: sts.enumStruct({ + hash: H256, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PreimageCall = PreimageCall_note_preimage | PreimageCall_request_preimage | PreimageCall_unnote_preimage | PreimageCall_unrequest_preimage + +/** + * Register a preimage on-chain. + * + * If the preimage was previously requested, no fees or deposits are taken for providing + * the preimage. Otherwise, a deposit is taken proportional to the size of the preimage. + */ +export interface PreimageCall_note_preimage { + __kind: 'note_preimage' + bytes: Bytes +} + +/** + * Request a preimage be uploaded to the chain without paying any fees or deposits. + * + * If the preimage requests has already been provided on-chain, we unreserve any deposit + * a user may have paid, and take the control of the preimage out of their hands. + */ +export interface PreimageCall_request_preimage { + __kind: 'request_preimage' + hash: H256 +} + +/** + * Clear an unrequested preimage from the runtime storage. + * + * If `len` is provided, then it will be a much cheaper operation. + * + * - `hash`: The hash of the preimage to be removed from the store. + * - `len`: The length of the preimage of `hash`. + */ +export interface PreimageCall_unnote_preimage { + __kind: 'unnote_preimage' + hash: H256 +} + +/** + * Clear a previously made request for a preimage. + * + * NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. + */ +export interface PreimageCall_unrequest_preimage { + __kind: 'unrequest_preimage' + hash: H256 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PhragmenElectionCall: sts.Type = sts.closedEnum(() => { + return { + clean_defunct_voters: sts.enumStruct({ + numVoters: sts.number(), + numDefunct: sts.number(), + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + slashBond: sts.boolean(), + rerunElection: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId32), + value: sts.bigint(), + }), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PhragmenElectionCall = PhragmenElectionCall_clean_defunct_voters | PhragmenElectionCall_remove_member | PhragmenElectionCall_remove_voter | PhragmenElectionCall_renounce_candidacy | PhragmenElectionCall_submit_candidacy | PhragmenElectionCall_vote + +/** + * Clean all voters who are defunct (i.e. they do not serve any purpose at all). The + * deposit of the removed voters are returned. + * + * This is an root function to be used only for cleaning the state. + * + * The dispatch origin of this call must be root. + * + * # + * The total number of voters and those that are defunct must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_clean_defunct_voters { + __kind: 'clean_defunct_voters' + numVoters: number + numDefunct: number +} + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, if `rerun_election` is `true`, a new phragmen election is + * started, else, nothing happens. + * + * If `slash_bond` is set to true, the bond of the member being removed is slashed. Else, + * it is returned. + * + * The dispatch origin of this call must be root. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement, we use a small weight. Else, since this is a root call and + * will go into phragmen, we assume full block for now. + * # + */ +export interface PhragmenElectionCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + slashBond: boolean + rerunElection: boolean +} + +/** + * Remove `origin` as a voter. + * + * This removes the lock and returns the deposit. + * + * The dispatch origin of this call must be signed and be a voter. + */ +export interface PhragmenElectionCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * + * - `origin` is a candidate and not elected in any set. In this case, the deposit is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the deposit is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the deposit is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_member`](Self::remove_member), if replacement runners exists, they + * are immediately used. If the prime is renouncing, then no prime will exist until the + * next round. + * + * The dispatch origin of this call must be signed, and have one of the above roles. + * + * # + * The type of renouncing must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Submit oneself for candidacy. A fixed amount of deposit is recorded. + * + * All candidates are wiped at the end of the term. They either become a member/runner-up, + * or leave the system while their deposit is slashed. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`] + * to get their deposit back. Losing the spot in an election will always lead to a slash. + * + * # + * The number of current candidates must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is + * reserved. The deposit is based on the number of votes and can be updated over time. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * If `value` is more than `who`'s free balance, then the maximum of the two is used. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * It is the responsibility of the caller to **NOT** place all of their balance into the + * lock and keep some for further operations. + * + * # + * We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less. + * # + */ +export interface PhragmenElectionCall_vote { + __kind: 'vote' + votes: AccountId32[] + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasSharedCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasDisputesCall: sts.Type = sts.closedEnum(() => { + return { + force_unfreeze: sts.unit(), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasDisputesCall = ParasDisputesCall_force_unfreeze + +export interface ParasDisputesCall_force_unfreeze { + __kind: 'force_unfreeze' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + add_trusted_validation_code: sts.enumStruct({ + validationCode: ValidationCode, + }), + force_note_new_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: Id, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + relayParentNumber: sts.number(), + }), + force_set_current_code: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + include_pvf_check_statement: sts.enumStruct({ + stmt: V2PvfCheckStatement, + signature: V2Signature, + }), + poke_unused_validation_code: sts.enumStruct({ + validationCodeHash: ValidationCodeHash, + }), + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const V2Signature = sts.bytes() + +export const V2PvfCheckStatement: sts.Type = sts.struct(() => { + return { + accept: sts.boolean(), + subject: ValidationCodeHash, + sessionIndex: sts.number(), + validatorIndex: V2ValidatorIndex, + } +}) + +export const V2ValidatorIndex = sts.number() + +export interface V2PvfCheckStatement { + accept: boolean + subject: ValidationCodeHash + sessionIndex: number + validatorIndex: V2ValidatorIndex +} + +export type V2ValidatorIndex = number + +export type ValidationCodeHash = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasCall = ParasCall_add_trusted_validation_code | ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head | ParasCall_include_pvf_check_statement | ParasCall_poke_unused_validation_code + +/** + * Adds the validation code to the storage. + * + * The code will not be added if it is already present. Additionally, if PVF pre-checking + * is running for that code, it will be instantly accepted. + * + * Otherwise, the code will be added into the storage. Note that the code will be added + * into storage with reference count 0. This is to account the fact that there are no users + * for this code yet. The caller will have to make sure that this code eventually gets + * used by some parachain or removed from the storage to avoid storage leaks. For the latter + * prefer to use the `poke_unused_validation_code` dispatchable to raw storage manipulation. + * + * This function is mainly meant to be used for upgrading parachains that do not follow + * the go-ahead signal while the PVF pre-checking feature is enabled. + */ +export interface ParasCall_add_trusted_validation_code { + __kind: 'add_trusted_validation_code' + validationCode: ValidationCode +} + +/** + * Note a new block head for para within the context of the current block. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: Id + newHead: HeadData +} + +/** + * Put a parachain directly into the next session's action queue. + * We can't queue it any sooner than this without going into the + * initializer... + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: Id +} + +/** + * Schedule an upgrade as if it was scheduled in the given relay parent block. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: Id + newCode: ValidationCode + relayParentNumber: number +} + +/** + * Set the storage for the parachain validation code immediately. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: Id + newCode: ValidationCode +} + +/** + * Set the storage for the current parachain head data immediately. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: Id + newHead: HeadData +} + +/** + * Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and + * enacts the results if that was the last vote before achieving the supermajority. + */ +export interface ParasCall_include_pvf_check_statement { + __kind: 'include_pvf_check_statement' + stmt: V2PvfCheckStatement + signature: V2Signature +} + +/** + * Remove the validation code from the storage iff the reference count is 0. + * + * This is better than removing the storage directly, because it will not remove the code + * that was suddenly got used by some parachain while this dispatchable was pending + * dispatching. + */ +export interface ParasCall_poke_unused_validation_code { + __kind: 'poke_unused_validation_code' + validationCodeHash: ValidationCodeHash +} + +export type V2Signature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: V2InherentData, + }), + } +}) + +export const V2InherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => V2UncheckedSigned), + backedCandidates: sts.array(() => V2BackedCandidate), + disputes: sts.array(() => V2DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: H256, + number: sts.number(), + stateRoot: H256, + extrinsicsRoot: H256, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + Consensus: sts.tuple(() => [sts.bytes(), sts.bytes()]), + Other: sts.bytes(), + PreRuntime: sts.tuple(() => [sts.bytes(), sts.bytes()]), + RuntimeEnvironmentUpdated: sts.unit(), + Seal: sts.tuple(() => [sts.bytes(), sts.bytes()]), + } +}) + +export type DigestItem = DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: [Bytes, Bytes] +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: [Bytes, Bytes] +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: [Bytes, Bytes] +} + +export interface Digest { + logs: DigestItem[] +} + +export interface Header { + parentHash: H256 + number: number + stateRoot: H256 + extrinsicsRoot: H256 + digest: Digest +} + +export const V2DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: sts.number(), + statements: sts.array(() => sts.tuple(() => [V2DisputeStatement, V2ValidatorIndex, V2Signature])), + } +}) + +export const V2DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: V2InvalidDisputeStatementKind, + Valid: V2ValidDisputeStatementKind, + } +}) + +export const V2ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + BackingSeconded: H256, + BackingValid: H256, + Explicit: sts.unit(), + } +}) + +export type V2ValidDisputeStatementKind = V2ValidDisputeStatementKind_ApprovalChecking | V2ValidDisputeStatementKind_BackingSeconded | V2ValidDisputeStatementKind_BackingValid | V2ValidDisputeStatementKind_Explicit + +export interface V2ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface V2ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: H256 +} + +export interface V2ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: H256 +} + +export interface V2ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export const V2InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export type V2InvalidDisputeStatementKind = V2InvalidDisputeStatementKind_Explicit + +export interface V2InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type V2DisputeStatement = V2DisputeStatement_Invalid | V2DisputeStatement_Valid + +export interface V2DisputeStatement_Invalid { + __kind: 'Invalid' + value: V2InvalidDisputeStatementKind +} + +export interface V2DisputeStatement_Valid { + __kind: 'Valid' + value: V2ValidDisputeStatementKind +} + +export const CandidateHash = sts.bytes() + +export interface V2DisputeStatementSet { + candidateHash: CandidateHash + session: number + statements: [V2DisputeStatement, V2ValidatorIndex, V2Signature][] +} + +export type CandidateHash = Bytes + +export const V2BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: V2CommittedCandidateReceipt, + validityVotes: sts.array(() => V2ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const V2ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: V2Signature, + Implicit: V2Signature, + } +}) + +export type V2ValidityAttestation = V2ValidityAttestation_Explicit | V2ValidityAttestation_Implicit + +export interface V2ValidityAttestation_Explicit { + __kind: 'Explicit' + value: V2Signature +} + +export interface V2ValidityAttestation_Implicit { + __kind: 'Implicit' + value: V2Signature +} + +export const V2CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: V2CandidateDescriptor, + commitments: V2CandidateCommitments, + } +}) + +export const V2CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => sts.bytes()), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: sts.number(), + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: Id, + data: sts.bytes(), + } +}) + +export interface OutboundHrmpMessage { + recipient: Id + data: Bytes +} + +export interface V2CandidateCommitments { + upwardMessages: Bytes[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: number +} + +export const V2CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: Id, + relayParent: H256, + collator: sts.bytes(), + persistedValidationDataHash: H256, + povHash: H256, + erasureRoot: H256, + signature: sts.bytes(), + paraHead: H256, + validationCodeHash: ValidationCodeHash, + } +}) + +export interface V2CandidateDescriptor { + paraId: Id + relayParent: H256 + collator: Bytes + persistedValidationDataHash: H256 + povHash: H256 + erasureRoot: H256 + signature: Bytes + paraHead: H256 + validationCodeHash: ValidationCodeHash +} + +export interface V2CommittedCandidateReceipt { + descriptor: V2CandidateDescriptor + commitments: V2CandidateCommitments +} + +export interface V2BackedCandidate { + candidate: V2CommittedCandidateReceipt + validityVotes: V2ValidityAttestation[] + validatorIndices: BitSequence +} + +export const V2UncheckedSigned: sts.Type = sts.struct(() => { + return { + payload: V2AvailabilityBitfield, + validatorIndex: V2ValidatorIndex, + signature: V2Signature, + } +}) + +export const V2AvailabilityBitfield = sts.bitseq() + +export interface V2UncheckedSigned { + payload: V2AvailabilityBitfield + validatorIndex: V2ValidatorIndex + signature: V2Signature +} + +export type V2AvailabilityBitfield = BitSequence + +export interface V2InherentData { + bitfields: V2UncheckedSigned[] + backedCandidates: V2BackedCandidate[] + disputes: V2DisputeStatementSet[] + parentHeader: Header +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInherentCall = ParaInherentCall_enter + +/** + * Enter the paras inherent. This will process bitfields and backed candidates. + */ +export interface ParaInherentCall_enter { + __kind: 'enter' + data: V2InherentData +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInclusionCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const NominationPoolsCall: sts.Type = sts.closedEnum(() => { + return { + bond_extra: sts.enumStruct({ + extra: BondExtra, + }), + chill: sts.enumStruct({ + poolId: sts.number(), + }), + claim_payout: sts.unit(), + create: sts.enumStruct({ + amount: sts.bigint(), + root: MultiAddress, + nominator: MultiAddress, + stateToggler: MultiAddress, + }), + create_with_pool_id: sts.enumStruct({ + amount: sts.bigint(), + root: MultiAddress, + nominator: MultiAddress, + stateToggler: MultiAddress, + poolId: sts.number(), + }), + join: sts.enumStruct({ + amount: sts.bigint(), + poolId: sts.number(), + }), + nominate: sts.enumStruct({ + poolId: sts.number(), + validators: sts.array(() => AccountId32), + }), + pool_withdraw_unbonded: sts.enumStruct({ + poolId: sts.number(), + numSlashingSpans: sts.number(), + }), + set_configs: sts.enumStruct({ + minJoinBond: Type_329, + minCreateBond: Type_329, + maxPools: Type_330, + maxMembers: Type_330, + maxMembersPerPool: Type_330, + }), + set_metadata: sts.enumStruct({ + poolId: sts.number(), + metadata: sts.bytes(), + }), + set_state: sts.enumStruct({ + poolId: sts.number(), + state: PoolState, + }), + unbond: sts.enumStruct({ + memberAccount: MultiAddress, + unbondingPoints: sts.bigint(), + }), + update_roles: sts.enumStruct({ + poolId: sts.number(), + newRoot: Type_331, + newNominator: Type_331, + newStateToggler: Type_331, + }), + withdraw_unbonded: sts.enumStruct({ + memberAccount: MultiAddress, + numSlashingSpans: sts.number(), + }), + } +}) + +export const Type_331: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: AccountId32, + } +}) + +export type Type_331 = Type_331_Noop | Type_331_Remove | Type_331_Set + +export interface Type_331_Noop { + __kind: 'Noop' +} + +export interface Type_331_Remove { + __kind: 'Remove' +} + +export interface Type_331_Set { + __kind: 'Set' + value: AccountId32 +} + +export const PoolState: sts.Type = sts.closedEnum(() => { + return { + Blocked: sts.unit(), + Destroying: sts.unit(), + Open: sts.unit(), + } +}) + +export type PoolState = PoolState_Blocked | PoolState_Destroying | PoolState_Open + +export interface PoolState_Blocked { + __kind: 'Blocked' +} + +export interface PoolState_Destroying { + __kind: 'Destroying' +} + +export interface PoolState_Open { + __kind: 'Open' +} + +export const Type_330: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_330 = Type_330_Noop | Type_330_Remove | Type_330_Set + +export interface Type_330_Noop { + __kind: 'Noop' +} + +export interface Type_330_Remove { + __kind: 'Remove' +} + +export interface Type_330_Set { + __kind: 'Set' + value: number +} + +export const Type_329: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type Type_329 = Type_329_Noop | Type_329_Remove | Type_329_Set + +export interface Type_329_Noop { + __kind: 'Noop' +} + +export interface Type_329_Remove { + __kind: 'Remove' +} + +export interface Type_329_Set { + __kind: 'Set' + value: bigint +} + +export const BondExtra: sts.Type = sts.closedEnum(() => { + return { + FreeBalance: sts.bigint(), + Rewards: sts.unit(), + } +}) + +export type BondExtra = BondExtra_FreeBalance | BondExtra_Rewards + +export interface BondExtra_FreeBalance { + __kind: 'FreeBalance' + value: bigint +} + +export interface BondExtra_Rewards { + __kind: 'Rewards' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type NominationPoolsCall = NominationPoolsCall_bond_extra | NominationPoolsCall_chill | NominationPoolsCall_claim_payout | NominationPoolsCall_create | NominationPoolsCall_create_with_pool_id | NominationPoolsCall_join | NominationPoolsCall_nominate | NominationPoolsCall_pool_withdraw_unbonded | NominationPoolsCall_set_configs | NominationPoolsCall_set_metadata | NominationPoolsCall_set_state | NominationPoolsCall_unbond | NominationPoolsCall_update_roles | NominationPoolsCall_withdraw_unbonded + +/** + * Bond `extra` more funds from `origin` into the pool to which they already belong. + * + * Additional funds can come from either the free balance of the account, of from the + * accumulated rewards, see [`BondExtra`]. + * + * Bonding extra funds implies an automatic payout of all pending rewards as well. + */ +export interface NominationPoolsCall_bond_extra { + __kind: 'bond_extra' + extra: BondExtra +} + +/** + * Chill on behalf of the pool. + * + * The dispatch origin of this call must be signed by the pool nominator or the pool + * root role, same as [`Pallet::nominate`]. + * + * This directly forward the call to the staking pallet, on behalf of the pool bonded + * account. + */ +export interface NominationPoolsCall_chill { + __kind: 'chill' + poolId: number +} + +/** + * A bonded member can use this to claim their payout based on the rewards that the pool + * has accumulated since their last claimed payout (OR since joining if this is there first + * time claiming rewards). The payout will be transferred to the member's account. + * + * The member will earn rewards pro rata based on the members stake vs the sum of the + * members in the pools stake. Rewards do not "expire". + */ +export interface NominationPoolsCall_claim_payout { + __kind: 'claim_payout' +} + +/** + * Create a new delegation pool. + * + * # Arguments + * + * * `amount` - The amount of funds to delegate to the pool. This also acts of a sort of + * deposit since the pools creator cannot fully unbond funds until the pool is being + * destroyed. + * * `index` - A disambiguation index for creating the account. Likely only useful when + * creating multiple pools in the same extrinsic. + * * `root` - The account to set as [`PoolRoles::root`]. + * * `nominator` - The account to set as the [`PoolRoles::nominator`]. + * * `state_toggler` - The account to set as the [`PoolRoles::state_toggler`]. + * + * # Note + * + * In addition to `amount`, the caller will transfer the existential deposit; so the caller + * needs at have at least `amount + existential_deposit` transferrable. + */ +export interface NominationPoolsCall_create { + __kind: 'create' + amount: bigint + root: MultiAddress + nominator: MultiAddress + stateToggler: MultiAddress +} + +/** + * Create a new delegation pool with a previously used pool id + * + * # Arguments + * + * same as `create` with the inclusion of + * * `pool_id` - `A valid PoolId. + */ +export interface NominationPoolsCall_create_with_pool_id { + __kind: 'create_with_pool_id' + amount: bigint + root: MultiAddress + nominator: MultiAddress + stateToggler: MultiAddress + poolId: number +} + +/** + * Stake funds with a pool. The amount to bond is transferred from the member to the + * pools account and immediately increases the pools bond. + * + * # Note + * + * * An account can only be a member of a single pool. + * * An account cannot join the same pool multiple times. + * * This call will *not* dust the member account, so the member must have at least + * `existential deposit + amount` in their account. + * * Only a pool with [`PoolState::Open`] can be joined + */ +export interface NominationPoolsCall_join { + __kind: 'join' + amount: bigint + poolId: number +} + +/** + * Nominate on behalf of the pool. + * + * The dispatch origin of this call must be signed by the pool nominator or the pool + * root role. + * + * This directly forward the call to the staking pallet, on behalf of the pool bonded + * account. + */ +export interface NominationPoolsCall_nominate { + __kind: 'nominate' + poolId: number + validators: AccountId32[] +} + +/** + * Call `withdraw_unbonded` for the pools account. This call can be made by any account. + * + * This is useful if their are too many unlocking chunks to call `unbond`, and some + * can be cleared by withdrawing. In the case there are too many unlocking chunks, the user + * would probably see an error like `NoMoreChunks` emitted from the staking system when + * they attempt to unbond. + */ +export interface NominationPoolsCall_pool_withdraw_unbonded { + __kind: 'pool_withdraw_unbonded' + poolId: number + numSlashingSpans: number +} + +/** + * Update configurations for the nomination pools. The origin for this call must be + * Root. + * + * # Arguments + * + * * `min_join_bond` - Set [`MinJoinBond`]. + * * `min_create_bond` - Set [`MinCreateBond`]. + * * `max_pools` - Set [`MaxPools`]. + * * `max_members` - Set [`MaxPoolMembers`]. + * * `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]. + */ +export interface NominationPoolsCall_set_configs { + __kind: 'set_configs' + minJoinBond: Type_329 + minCreateBond: Type_329 + maxPools: Type_330 + maxMembers: Type_330 + maxMembersPerPool: Type_330 +} + +/** + * Set a new metadata for the pool. + * + * The dispatch origin of this call must be signed by the state toggler, or the root role + * of the pool. + */ +export interface NominationPoolsCall_set_metadata { + __kind: 'set_metadata' + poolId: number + metadata: Bytes +} + +/** + * Set a new state for the pool. + * + * If a pool is already in the `Destroying` state, then under no condition can its state + * change again. + * + * The dispatch origin of this call must be either: + * + * 1. signed by the state toggler, or the root role of the pool, + * 2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and + * then the state of the pool can be permissionlessly changed to `Destroying`. + */ +export interface NominationPoolsCall_set_state { + __kind: 'set_state' + poolId: number + state: PoolState +} + +/** + * Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It + * implicitly collects the rewards one last time, since not doing so would mean some + * rewards would be forfeited. + * + * Under certain conditions, this call can be dispatched permissionlessly (i.e. by any + * account). + * + * # Conditions for a permissionless dispatch. + * + * * The pool is blocked and the caller is either the root or state-toggler. This is + * refereed to as a kick. + * * The pool is destroying and the member is not the depositor. + * * The pool is destroying, the member is the depositor and no other members are in the + * pool. + * + * ## Conditions for permissioned dispatch (i.e. the caller is also the + * `member_account`): + * + * * The caller is not the depositor. + * * The caller is the depositor, the pool is destroying and no other members are in the + * pool. + * + * # Note + * + * If there are too many unlocking chunks to unbond with the pool account, + * [`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks. + * The [`StakingInterface::unbond`] will implicitly call [`Call::pool_withdraw_unbonded`] + * to try to free chunks if necessary (ie. if unbound was called and no unlocking chunks + * are available). However, it may not be possible to release the current unlocking chunks, + * in which case, the result of this call will likely be the `NoMoreChunks` error from the + * staking system. + */ +export interface NominationPoolsCall_unbond { + __kind: 'unbond' + memberAccount: MultiAddress + unbondingPoints: bigint +} + +/** + * Update the roles of the pool. + * + * The root is the only entity that can change any of the roles, including itself, + * excluding the depositor, who can never change. + * + * It emits an event, notifying UIs of the role change. This event is quite relevant to + * most pool members and they should be informed of changes to pool roles. + */ +export interface NominationPoolsCall_update_roles { + __kind: 'update_roles' + poolId: number + newRoot: Type_331 + newNominator: Type_331 + newStateToggler: Type_331 +} + +/** + * Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an + * error is returned. + * + * Under certain conditions, this call can be dispatched permissionlessly (i.e. by any + * account). + * + * # Conditions for a permissionless dispatch + * + * * The pool is in destroy mode and the target is not the depositor. + * * The target is the depositor and they are the only member in the sub pools. + * * The pool is blocked and the caller is either the root or state-toggler. + * + * # Conditions for permissioned dispatch + * + * * The caller is the target and they are not the depositor. + * + * # Note + * + * If the target is the depositor, the pool will be destroyed. + */ +export interface NominationPoolsCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + memberAccount: MultiAddress + numSlashingSpans: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const NisCounterpartBalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type NisCounterpartBalancesCall = NisCounterpartBalancesCall_force_transfer | NisCounterpartBalancesCall_force_unreserve | NisCounterpartBalancesCall_set_balance | NisCounterpartBalancesCall_transfer | NisCounterpartBalancesCall_transfer_all | NisCounterpartBalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is not + * assumed to be in the overlay. + * # + */ +export interface NisCounterpartBalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * Unreserve some balance from a user by force. + * + * Can only be called by ROOT. + */ +export interface NisCounterpartBalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also alter the total issuance of the system (`TotalIssuance`) appropriately. + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + */ +export interface NisCounterpartBalancesCall_set_balance { + __kind: 'set_balance' + who: MultiAddress + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for input config + * types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex + * computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional check + * that the transfer will not kill the origin account. + * --------------------------------- + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface NisCounterpartBalancesCall_transfer { + __kind: 'transfer' + dest: MultiAddress + value: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). # + * - O(1). Just like transfer, but reading the user's transferable balance first. + * # + */ +export interface NisCounterpartBalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + */ +export interface NisCounterpartBalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const NisCall: sts.Type = sts.closedEnum(() => { + return { + fund_deficit: sts.unit(), + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + thaw: sts.enumStruct({ + index: sts.number(), + portion: sts.option(() => sts.bigint()), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type NisCall = NisCall_fund_deficit | NisCall_place_bid | NisCall_retract_bid | NisCall_thaw + +/** + * Ensure we have sufficient funding for all potential payouts. + * + * - `origin`: Must be accepted by `FundOrigin`. + */ +export interface NisCall_fund_deficit { + __kind: 'fund_deficit' +} + +/** + * Place a bid. + * + * Origin must be Signed, and account must have at least `amount` in free balance. + * + * - `amount`: The amount of the bid; these funds will be reserved, and if/when + * consolidated, removed. Must be at least `MinBid`. + * - `duration`: The number of periods before which the newly consolidated bid may be + * thawed. Must be greater than 1 and no more than `QueueCount`. + * + * Complexities: + * - `Queues[duration].len()` (just take max). + */ +export interface NisCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * Retract a previously placed bid. + * + * Origin must be Signed, and the account should have previously issued a still-active bid + * of `amount` for `duration`. + * + * - `amount`: The amount of the previous bid. + * - `duration`: The duration of the previous bid. + */ +export interface NisCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * Reduce or remove an outstanding receipt, placing the according proportion of funds into + * the account of the owner. + * + * - `origin`: Must be Signed and the account must be the owner of the receipt `index` as + * well as any fungible counterpart. + * - `index`: The index of the receipt. + * - `portion`: If `Some`, then only the given portion of the receipt should be thawed. If + * `None`, then all of it should be. + */ +export interface NisCall_thaw { + __kind: 'thaw' + index: number + portion?: (bigint | undefined) +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + call: Call, + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId32), + call: Call, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account] + * - Writes: Multisig Storage, [Caller Account] + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + call: Call + maxWeight: Weight +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId32[] + call: Call +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account + * - Write: Multisig Storage, [Caller Account], Refund Account + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId32[] + timepoint: Timepoint + callHash: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const InitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type InitializerCall = InitializerCall_force_approve + +/** + * Issue a signal to the consensus engine to forcibly act as though all parachain + * blocks in all relay chain blocks up to and including the given number in the current + * chain are valid and should be finalized. + */ +export interface InitializerCall_force_approve { + __kind: 'force_approve' + upTo: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: sts.number(), + }), + force_transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: sts.number(), + }), + freeze: sts.enumStruct({ + index: sts.number(), + }), + transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: number +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: MultiAddress + index: number + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: number +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the + * deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: number +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: MultiAddress + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: sts.bytes(), + }), + } +}) + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: sts.number(), + networkState: OpaqueNetworkState, + sessionIndex: sts.number(), + authorityIndex: sts.number(), + validatorsLen: sts.number(), + } +}) + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export interface Heartbeat { + blockNumber: number + networkState: OpaqueNetworkState + sessionIndex: number + authorityIndex: number + validatorsLen: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is + * length of `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Bytes +} + +/** + * Identity pallet declaration. + */ +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: MultiAddress, + }), + add_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: sts.number(), + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: MultiAddress, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: MultiAddress, + judgement: Judgement, + identity: H256, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: MultiAddress, + }), + rename_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: MultiAddress, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: BitFlags, + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId32, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => sts.tuple(() => [Data, Data])), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => sts.bytes()), + image: Data, + twitter: Data, + } +}) + +export interface IdentityInfo { + additional: [Data, Data][] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (Bytes | undefined) + image: Data + twitter: Data +} + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: Bytes +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: Bytes +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: Bytes +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: Bytes +} + +export const BitFlags = sts.bigint() + +export const Judgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: sts.bigint(), + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export type Judgement = Judgement_Erroneous | Judgement_FeePaid | Judgement_KnownGood | Judgement_LowQuality | Judgement_OutOfDate | Judgement_Reasonable | Judgement_Unknown + +export interface Judgement_Erroneous { + __kind: 'Erroneous' +} + +export interface Judgement_FeePaid { + __kind: 'FeePaid' + value: bigint +} + +export interface Judgement_KnownGood { + __kind: 'KnownGood' +} + +export interface Judgement_LowQuality { + __kind: 'LowQuality' +} + +export interface Judgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface Judgement_Reasonable { + __kind: 'Reasonable' +} + +export interface Judgement_Unknown { + __kind: 'Unknown' +} + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: sts.bytes(), + Keccak256: sts.bytes(), + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: sts.bytes(), + ShaThree256: sts.bytes(), + } +}) + +/** + * Identity pallet declaration. + */ +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: MultiAddress +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: MultiAddress + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: number +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: MultiAddress +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * - `identity`: The hash of the [`IdentityInfo`] for that the judgement is provided. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: MultiAddress + judgement: Judgement + identity: H256 +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: MultiAddress +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: MultiAddress + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: MultiAddress +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: BitFlags +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId32, Data][] +} + +export type BitFlags = bigint + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const HrmpCall: sts.Type = sts.closedEnum(() => { + return { + force_clean_hrmp: sts.enumStruct({ + para: Id, + inbound: sts.number(), + outbound: sts.number(), + }), + force_open_hrmp_channel: sts.enumStruct({ + sender: Id, + recipient: Id, + maxCapacity: sts.number(), + maxMessageSize: sts.number(), + }), + force_process_hrmp_close: sts.enumStruct({ + channels: sts.number(), + }), + force_process_hrmp_open: sts.enumStruct({ + channels: sts.number(), + }), + hrmp_accept_open_channel: sts.enumStruct({ + sender: Id, + }), + hrmp_cancel_open_request: sts.enumStruct({ + channelId: HrmpChannelId, + openRequests: sts.number(), + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: Id, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: Id, + recipient: Id, + } +}) + +export interface HrmpChannelId { + sender: Id + recipient: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type HrmpCall = HrmpCall_force_clean_hrmp | HrmpCall_force_open_hrmp_channel | HrmpCall_force_process_hrmp_close | HrmpCall_force_process_hrmp_open | HrmpCall_hrmp_accept_open_channel | HrmpCall_hrmp_cancel_open_request | HrmpCall_hrmp_close_channel | HrmpCall_hrmp_init_open_channel + +/** + * This extrinsic triggers the cleanup of all the HRMP storage items that + * a para may have. Normally this happens once per session, but this allows + * you to trigger the cleanup immediately for a specific parachain. + * + * Origin must be Root. + * + * Number of inbound and outbound channels for `para` must be provided as witness data of weighing. + */ +export interface HrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: Id + inbound: number + outbound: number +} + +/** + * Open a channel from a `sender` to a `recipient` `ParaId` using the Root origin. Although + * opened by Root, the `max_capacity` and `max_message_size` are still subject to the Relay + * Chain's configured limits. + * + * Expected use is when one of the `ParaId`s involved in the channel is governed by the + * Relay Chain, e.g. a common good parachain. + */ +export interface HrmpCall_force_open_hrmp_channel { + __kind: 'force_open_hrmp_channel' + sender: Id + recipient: Id + maxCapacity: number + maxMessageSize: number +} + +/** + * Force process HRMP close channel requests. + * + * If there are pending HRMP close channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of closing channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' + channels: number +} + +/** + * Force process HRMP open channel requests. + * + * If there are pending HRMP open channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of opening channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' + channels: number +} + +/** + * Accept a pending open channel request from the given sender. + * + * The channel will be opened only on the next session boundary. + */ +export interface HrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: Id +} + +/** + * This cancels a pending open channel request. It can be canceled by either of the sender + * or the recipient for that request. The origin must be either of those. + * + * The cancellation happens immediately. It is not possible to cancel the request if it is + * already accepted. + * + * Total number of open requests (i.e. `HrmpOpenChannelRequestsList`) must be provided as + * witness data. + */ +export interface HrmpCall_hrmp_cancel_open_request { + __kind: 'hrmp_cancel_open_request' + channelId: HrmpChannelId + openRequests: number +} + +/** + * Initiate unilateral closing of a channel. The origin must be either the sender or the + * recipient in the channel being closed. + * + * The closure can only happen on a session change. + */ +export interface HrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * Initiate opening a channel from a parachain to a given recipient with given channel + * parameters. + * + * - `proposed_max_capacity` - specifies how many messages can be in the channel at once. + * - `proposed_max_message_size` - specifies the maximum size of the messages. + * + * These numbers are a subject to the relay-chain configuration limits. + * + * The channel can be opened only after the recipient confirms it and only on a session + * change. + */ +export interface HrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: Id + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: sts.number(), + bestFinalizedBlockNumber: sts.number(), + }), + report_equivocation: sts.enumStruct({ + equivocationProof: Type_113, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_113, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: sts.number(), + trieNodes: sts.array(() => sts.bytes()), + validatorCount: sts.number(), + } +}) + +export interface MembershipProof { + session: number + trieNodes: Bytes[] + validatorCount: number +} + +export const Type_113: sts.Type = sts.struct(() => { + return { + setId: sts.bigint(), + equivocation: Equivocation, + } +}) + +export const Equivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: Type_121, + Prevote: Type_115, + } +}) + +export const Type_115: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Prevote, Signature]), + second: sts.tuple(() => [Prevote, Signature]), + } +}) + +export const Signature = sts.bytes() + +export const Prevote: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Prevote { + targetHash: H256 + targetNumber: number +} + +export interface Type_115 { + roundNumber: bigint + identity: Public + first: [Prevote, Signature] + second: [Prevote, Signature] +} + +export type Signature = Bytes + +export const Type_121: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Precommit, Signature]), + second: sts.tuple(() => [Precommit, Signature]), + } +}) + +export const Precommit: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Precommit { + targetHash: H256 + targetNumber: number +} + +export interface Type_121 { + roundNumber: bigint + identity: Public + first: [Precommit, Signature] + second: [Precommit, Signature] +} + +export type Equivocation = Equivocation_Precommit | Equivocation_Prevote + +export interface Equivocation_Precommit { + __kind: 'Precommit' + value: Type_121 +} + +export interface Equivocation_Prevote { + __kind: 'Prevote' + value: Type_115 +} + +export interface Type_113 { + setId: bigint + equivocation: Equivocation +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has stalled. + * + * This will trigger a forced authority set change at the beginning of the next session, to + * be enacted `delay` blocks after that. The `delay` should be high enough to safely assume + * that the block signalling the forced change will not be re-orged e.g. 1000 blocks. + * The block production rate (which may be slowed down because of finality lagging) should + * be taken into account when choosing the `delay`. The GRANDPA voters based on the new + * authority will start voting on top of `best_finalized_block_number` for new finalized + * blocks. `best_finalized_block_number` should be the highest of the latest finalized + * block of all validators of the new authority set. + * + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: number + bestFinalizedBlockNumber: number +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_113 + keyOwnerProof: MembershipProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_113 + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const FellowshipReferendaCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + index: sts.number(), + }), + kill: sts.enumStruct({ + index: sts.number(), + }), + nudge_referendum: sts.enumStruct({ + index: sts.number(), + }), + one_fewer_deciding: sts.enumStruct({ + track: sts.number(), + }), + place_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_submission_deposit: sts.enumStruct({ + index: sts.number(), + }), + submit: sts.enumStruct({ + proposalOrigin: OriginCaller, + proposal: Bounded, + enactmentMoment: DispatchTime, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type FellowshipReferendaCall = FellowshipReferendaCall_cancel | FellowshipReferendaCall_kill | FellowshipReferendaCall_nudge_referendum | FellowshipReferendaCall_one_fewer_deciding | FellowshipReferendaCall_place_decision_deposit | FellowshipReferendaCall_refund_decision_deposit | FellowshipReferendaCall_refund_submission_deposit | FellowshipReferendaCall_submit + +/** + * Cancel an ongoing referendum. + * + * - `origin`: must be the `CancelOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Cancelled`. + */ +export interface FellowshipReferendaCall_cancel { + __kind: 'cancel' + index: number +} + +/** + * Cancel an ongoing referendum and slash the deposits. + * + * - `origin`: must be the `KillOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Killed` and `DepositSlashed`. + */ +export interface FellowshipReferendaCall_kill { + __kind: 'kill' + index: number +} + +/** + * Advance a referendum onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `index`: the referendum to be advanced. + */ +export interface FellowshipReferendaCall_nudge_referendum { + __kind: 'nudge_referendum' + index: number +} + +/** + * Advance a track onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `track`: the track to be advanced. + * + * Action item for when there is now one fewer referendum in the deciding phase and the + * `DecidingCount` is not yet updated. This means that we should either: + * - begin deciding another referendum (and leave `DecidingCount` alone); or + * - decrement `DecidingCount`. + */ +export interface FellowshipReferendaCall_one_fewer_deciding { + __kind: 'one_fewer_deciding' + track: number +} + +/** + * Post the Decision Deposit for a referendum. + * + * - `origin`: must be `Signed` and the account must have funds available for the + * referendum's track's Decision Deposit. + * - `index`: The index of the submitted referendum whose Decision Deposit is yet to be + * posted. + * + * Emits `DecisionDepositPlaced`. + */ +export interface FellowshipReferendaCall_place_decision_deposit { + __kind: 'place_decision_deposit' + index: number +} + +/** + * Refund the Decision Deposit for a closed referendum back to the depositor. + * + * - `origin`: must be `Signed` or `Root`. + * - `index`: The index of a closed referendum whose Decision Deposit has not yet been + * refunded. + * + * Emits `DecisionDepositRefunded`. + */ +export interface FellowshipReferendaCall_refund_decision_deposit { + __kind: 'refund_decision_deposit' + index: number +} + +/** + * Refund the Submission Deposit for a closed referendum back to the depositor. + * + * - `origin`: must be `Signed` or `Root`. + * - `index`: The index of a closed referendum whose Submission Deposit has not yet been + * refunded. + * + * Emits `SubmissionDepositRefunded`. + */ +export interface FellowshipReferendaCall_refund_submission_deposit { + __kind: 'refund_submission_deposit' + index: number +} + +/** + * Propose a referendum on a privileged action. + * + * - `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds + * available. + * - `proposal_origin`: The origin from which the proposal should be executed. + * - `proposal`: The proposal. + * - `enactment_moment`: The moment that the proposal should be enacted. + * + * Emits `Submitted`. + */ +export interface FellowshipReferendaCall_submit { + __kind: 'submit' + proposalOrigin: OriginCaller + proposal: Bounded + enactmentMoment: DispatchTime +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const FellowshipCollectiveCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: MultiAddress, + }), + cleanup_poll: sts.enumStruct({ + pollIndex: sts.number(), + max: sts.number(), + }), + demote_member: sts.enumStruct({ + who: MultiAddress, + }), + promote_member: sts.enumStruct({ + who: MultiAddress, + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + minRank: sts.number(), + }), + vote: sts.enumStruct({ + poll: sts.number(), + aye: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type FellowshipCollectiveCall = FellowshipCollectiveCall_add_member | FellowshipCollectiveCall_cleanup_poll | FellowshipCollectiveCall_demote_member | FellowshipCollectiveCall_promote_member | FellowshipCollectiveCall_remove_member | FellowshipCollectiveCall_vote + +/** + * Introduce a new member. + * + * - `origin`: Must be the `AdminOrigin`. + * - `who`: Account of non-member which will become a member. + * - `rank`: The rank to give the new member. + * + * Weight: `O(1)` + */ +export interface FellowshipCollectiveCall_add_member { + __kind: 'add_member' + who: MultiAddress +} + +/** + * Remove votes from the given poll. It must have ended. + * + * - `origin`: Must be `Signed` by any account. + * - `poll_index`: Index of a poll which is completed and for which votes continue to + * exist. + * - `max`: Maximum number of vote items from remove in this call. + * + * Transaction fees are waived if the operation is successful. + * + * Weight `O(max)` (less if there are fewer items to remove than `max`). + */ +export interface FellowshipCollectiveCall_cleanup_poll { + __kind: 'cleanup_poll' + pollIndex: number + max: number +} + +/** + * Decrement the rank of an existing member by one. If the member is already at rank zero, + * then they are removed entirely. + * + * - `origin`: Must be the `AdminOrigin`. + * - `who`: Account of existing member of rank greater than zero. + * + * Weight: `O(1)`, less if the member's index is highest in its rank. + */ +export interface FellowshipCollectiveCall_demote_member { + __kind: 'demote_member' + who: MultiAddress +} + +/** + * Increment the rank of an existing member by one. + * + * - `origin`: Must be the `AdminOrigin`. + * - `who`: Account of existing member. + * + * Weight: `O(1)` + */ +export interface FellowshipCollectiveCall_promote_member { + __kind: 'promote_member' + who: MultiAddress +} + +/** + * Remove the member entirely. + * + * - `origin`: Must be the `AdminOrigin`. + * - `who`: Account of existing member of rank greater than zero. + * - `min_rank`: The rank of the member or greater. + * + * Weight: `O(min_rank)`. + */ +export interface FellowshipCollectiveCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + minRank: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * - `origin`: Must be `Signed` by a member account. + * - `poll`: Index of a poll which is ongoing. + * - `aye`: `true` if the vote is to approve the proposal, `false` otherwise. + * + * Transaction fees are be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * + * Weight: `O(1)`, less if there was no previous vote on the poll by the member. + */ +export interface FellowshipCollectiveCall_vote { + __kind: 'vote' + poll: number + aye: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const FastUnstakeCall: sts.Type = sts.closedEnum(() => { + return { + control: sts.enumStruct({ + uncheckedErasToCheck: sts.number(), + }), + deregister: sts.unit(), + register_fast_unstake: sts.unit(), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type FastUnstakeCall = FastUnstakeCall_control | FastUnstakeCall_deregister | FastUnstakeCall_register_fast_unstake + +/** + * Control the operation of this pallet. + * + * Dispatch origin must be signed by the [`Config::ControlOrigin`]. + */ +export interface FastUnstakeCall_control { + __kind: 'control' + uncheckedErasToCheck: number +} + +/** + * Deregister oneself from the fast-unstake. + * + * This is useful if one is registered, they are still waiting, and they change their mind. + * + * Note that the associated stash is still fully unbonded and chilled as a consequence of + * calling `register_fast_unstake`. This should probably be followed by a call to + * `Staking::rebond`. + */ +export interface FastUnstakeCall_deregister { + __kind: 'deregister' +} + +/** + * Register oneself for fast-unstake. + * + * The dispatch origin of this call must be signed by the controller account, similar to + * `staking::unbond`. + * + * The stash associated with the origin must have no ongoing unlocking chunks. If + * successful, this will fully unbond and chill the stash. Then, it will enqueue the stash + * to be checked in further blocks. + * + * If by the time this is called, the stash is actually eligible for fast-unstake, then + * they are guaranteed to remain eligible, because the call will chill them as well. + * + * If the check works, the entire staking data is removed, i.e. the stash is fully + * unstaked. + * + * If the check fails, the stash remains chilled and waiting for being unbonded as in with + * the normal staking system, but they lose part of their unbonding chunks due to consuming + * the chain's resources. + */ +export interface FastUnstakeCall_register_fast_unstake { + __kind: 'register_fast_unstake' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + governance_fallback: sts.enumStruct({ + maybeMaxVoters: sts.option(() => sts.number()), + maybeMaxTargets: sts.option(() => sts.number()), + }), + set_emergency_election_result: sts.enumStruct({ + supports: sts.array(() => sts.tuple(() => [AccountId32, Support])), + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => ElectionScore), + }), + submit: sts.enumStruct({ + rawSolution: RawSolution, + }), + submit_unsigned: sts.enumStruct({ + rawSolution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export const RawSolution: sts.Type = sts.struct(() => { + return { + solution: NposCompactSolution24, + score: ElectionScore, + round: sts.number(), + } +}) + +export const NposCompactSolution24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), + votes2: sts.array(() => sts.tuple(() => [sts.number(), sts.tuple(() => [sts.number(), sts.number()]), sts.number()])), + votes3: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes4: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes5: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes6: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes7: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes8: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes9: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes10: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes11: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes12: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes13: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes14: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes15: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes16: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes17: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes18: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes19: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes20: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes21: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes22: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes23: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes24: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + } +}) + +export interface NposCompactSolution24 { + votes1: [number, number][] + votes2: [number, [number, number], number][] + votes3: [number, [number, number][], number][] + votes4: [number, [number, number][], number][] + votes5: [number, [number, number][], number][] + votes6: [number, [number, number][], number][] + votes7: [number, [number, number][], number][] + votes8: [number, [number, number][], number][] + votes9: [number, [number, number][], number][] + votes10: [number, [number, number][], number][] + votes11: [number, [number, number][], number][] + votes12: [number, [number, number][], number][] + votes13: [number, [number, number][], number][] + votes14: [number, [number, number][], number][] + votes15: [number, [number, number][], number][] + votes16: [number, [number, number][], number][] + votes17: [number, [number, number][], number][] + votes18: [number, [number, number][], number][] + votes19: [number, [number, number][], number][] + votes20: [number, [number, number][], number][] + votes21: [number, [number, number][], number][] + votes22: [number, [number, number][], number][] + votes23: [number, [number, number][], number][] + votes24: [number, [number, number][], number][] +} + +export interface RawSolution { + solution: NposCompactSolution24 + score: ElectionScore + round: number +} + +export interface ElectionScore { + minimalStake: bigint + sumStake: bigint + sumStakeSquared: bigint +} + +export const ElectionScore: sts.Type = sts.struct(() => { + return { + minimalStake: sts.bigint(), + sumStake: sts.bigint(), + sumStakeSquared: sts.bigint(), + } +}) + +export const Support: sts.Type = sts.struct(() => { + return { + total: sts.bigint(), + voters: sts.array(() => sts.tuple(() => [AccountId32, sts.bigint()])), + } +}) + +export interface Support { + total: bigint + voters: [AccountId32, bigint][] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_governance_fallback | ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * Trigger the governance fallback. + * + * This can only be called when [`Phase::Emergency`] is enabled, as an alternative to + * calling [`Call::set_emergency_election_result`]. + */ +export interface ElectionProviderMultiPhaseCall_governance_fallback { + __kind: 'governance_fallback' + maybeMaxVoters?: (number | undefined) + maybeMaxTargets?: (number | undefined) +} + +/** + * Set a solution in the queue, to be handed out to the client of this pallet in the next + * call to `ElectionProvider::elect`. + * + * This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`. + * + * The solution is not checked for any feasibility and is assumed to be trustworthy, as any + * feasibility check itself can in principle cause the election process to fail (due to + * memory/weight constrains). + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + supports: [AccountId32, Support][] +} + +/** + * Set a new value for `MinimumUntrustedScore`. + * + * Dispatch origin must be aligned with `T::ForceOrigin`. + * + * This check can be turned off by setting the value to `None`. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (ElectionScore | undefined) +} + +/** + * Submit a solution for the signed phase. + * + * The dispatch origin fo this call must be __signed__. + * + * The solution is potentially queued, based on the claimed score and processed at the end + * of the signed phase. + * + * A deposit is reserved and recorded for the solution. Based on the outcome, the solution + * might be rewarded, slashed, or get all or a part of the deposit back. + */ +export interface ElectionProviderMultiPhaseCall_submit { + __kind: 'submit' + rawSolution: RawSolution +} + +/** + * Submit a solution for the unsigned phase. + * + * The dispatch origin fo this call must be __none__. + * + * This submission is checked on the fly. Moreover, this unsigned solution is only + * validated when submitted to the pool from the **local** node. Effectively, this means + * that only active validators can submit this transaction when authoring a block (similar + * to an inherent). + * + * To prevent any incorrect solution (and thus wasted time/weight), this transaction will + * panic if the solution submitted by the validator is invalid in any way, effectively + * putting their authoring reward at risk. + * + * No deposit or reward is associated with this submission. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + rawSolution: RawSolution + witness: SolutionOrSnapshotSize +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DmpCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + blacklist: sts.enumStruct({ + proposalHash: H256, + maybeRefIndex: sts.option(() => sts.number()), + }), + cancel_proposal: sts.enumStruct({ + propIndex: sts.number(), + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: MultiAddress, + conviction: Conviction, + balance: sts.bigint(), + }), + emergency_cancel: sts.enumStruct({ + refIndex: sts.number(), + }), + external_propose: sts.enumStruct({ + proposal: Bounded, + }), + external_propose_default: sts.enumStruct({ + proposal: Bounded, + }), + external_propose_majority: sts.enumStruct({ + proposal: Bounded, + }), + fast_track: sts.enumStruct({ + proposalHash: H256, + votingPeriod: sts.number(), + delay: sts.number(), + }), + propose: sts.enumStruct({ + proposal: Bounded, + value: sts.bigint(), + }), + remove_other_vote: sts.enumStruct({ + target: MultiAddress, + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + index: sts.number(), + }), + second: sts.enumStruct({ + proposal: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: MultiAddress, + }), + veto_external: sts.enumStruct({ + proposalHash: H256, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface AccountVote_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DemocracyCall = DemocracyCall_blacklist | DemocracyCall_cancel_proposal | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_propose | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. + * + * If called on a queued public or external proposal, then this will result in it being + * removed. If the `ref_index` supplied is an active referendum with the proposal hash, + * then it will be cancelled. + * + * The dispatch origin of this call must be `BlacklistOrigin`. + * + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. + * + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). + */ +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: H256 + maybeRefIndex?: (number | undefined) +} + +/** + * Remove a proposal. + * + * The dispatch origin of this call must be `CancelProposalOrigin`. + * + * - `prop_index`: The index of the proposal to cancel. + * + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must not + * be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: MultiAddress + conviction: Conviction + balance: bigint +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: number +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposal: Bounded +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposal: Bounded +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposal: Bounded +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * Must be always greater than zero. + * For `FastTrackOrigin` must be equal or greater than `FastTrackVotingPeriod`. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: H256 + votingPeriod: number + delay: number +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposal: Bounded + value: bigint +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: MultiAddress + index: number +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: number +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: MultiAddress +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * Weight: `O(V + log(V))` where V is number of `existing vetoers` + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: H256 +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: Id, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + contribute_all: sts.enumStruct({ + index: sts.number(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: Id, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId32, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_contribute_all | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * Add an optional memo to an existing crowdloan contribution. + * + * Origin must be Signed, and the user must have contributed to the crowdloan. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: Id + memo: Bytes +} + +/** + * Contribute to a crowd sale. This will transfer some balance over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * Contribute your entire balance to a crowd sale. This will transfer the entire balance of a user over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute_all { + __kind: 'contribute_all' + index: number + signature?: (MultiSignature | undefined) +} + +/** + * Create a new crowdloaning campaign for a parachain slot with the given lease period range. + * + * This applies a lock to your parachain configuration, ensuring that it cannot be changed + * by the parachain manager. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Remove a fund after the retirement period has ended and all funds have been returned. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * Edit the configuration for an in-progress crowdloan. + * + * Can only be called by Root origin. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Poke the fund into `NewRaise` + * + * Origin must be Signed, and the fund has non-zero raise. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: Id +} + +/** + * Automatically refund contributors of an ended crowdloan. + * Due to weight restrictions, this function may need to be called multiple + * times to fully refund all users. We will refund `RemoveKeysLimit` users at a time. + * + * Origin must be signed, but can come from anyone. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * Withdraw full balance of a specific contributor. + * + * Origin must be signed, but can come from anyone. + * + * The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement + * flag must be set. For a fund to be ready for retirement, then: + * - it must not already be in retirement; + * - the amount of raised funds must be bigger than the _free_ balance of the account; + * - and either: + * - the block number must be at least `end`; or + * - the current lease period must be greater than the fund's `last_period`. + * + * In this case, the fund's retirement flag is set and its `end` is reset to the current block + * number. + * + * - `who`: The account whose contribution should be withdrawn. + * - `index`: The parachain to whose crowdloan the contribution was made. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: Weight, + lengthBound: sts.number(), + }), + close_old_weight: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CouncilCall = CouncilCall_close | CouncilCall_close_old_weight | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: Weight + lengthBound: number +} + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close_old_weight { + __kind: 'close_old_weight' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ConvictionVotingCall: sts.Type = sts.closedEnum(() => { + return { + delegate: sts.enumStruct({ + class: sts.number(), + to: MultiAddress, + conviction: Type_147, + balance: sts.bigint(), + }), + remove_other_vote: sts.enumStruct({ + target: MultiAddress, + class: sts.number(), + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + class: sts.option(() => sts.number()), + index: sts.number(), + }), + undelegate: sts.enumStruct({ + class: sts.number(), + }), + unlock: sts.enumStruct({ + class: sts.number(), + target: MultiAddress, + }), + vote: sts.enumStruct({ + pollIndex: sts.number(), + vote: Type_145, + }), + } +}) + +export const Type_145: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + SplitAbstain: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + abstain: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type Type_145 = Type_145_Split | Type_145_SplitAbstain | Type_145_Standard + +export interface Type_145_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface Type_145_SplitAbstain { + __kind: 'SplitAbstain' + aye: bigint + nay: bigint + abstain: bigint +} + +export interface Type_145_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Type_147: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Type_147 = Type_147_Locked1x | Type_147_Locked2x | Type_147_Locked3x | Type_147_Locked4x | Type_147_Locked5x | Type_147_Locked6x | Type_147_None + +export interface Type_147_Locked1x { + __kind: 'Locked1x' +} + +export interface Type_147_Locked2x { + __kind: 'Locked2x' +} + +export interface Type_147_Locked3x { + __kind: 'Locked3x' +} + +export interface Type_147_Locked4x { + __kind: 'Locked4x' +} + +export interface Type_147_Locked5x { + __kind: 'Locked5x' +} + +export interface Type_147_Locked6x { + __kind: 'Locked6x' +} + +export interface Type_147_None { + __kind: 'None' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ConvictionVotingCall = ConvictionVotingCall_delegate | ConvictionVotingCall_remove_other_vote | ConvictionVotingCall_remove_vote | ConvictionVotingCall_undelegate | ConvictionVotingCall_unlock | ConvictionVotingCall_vote + +/** + * Delegate the voting power (with some given conviction) of the sending account for a + * particular class of polls. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `class`: The class of polls to delegate. To delegate multiple classes, multiple calls + * to this function are required. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must not + * be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of polls the voter delegating to has + * voted on. Weight is initially charged as if maximum votes, but is refunded later. + */ +export interface ConvictionVotingCall_delegate { + __kind: 'delegate' + class: number + to: MultiAddress + conviction: Type_147 + balance: bigint +} + +/** + * Remove a vote for a poll. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the poll was cancelled, because the voter lost the poll or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for poll + * `index`. + * - `index`: The index of poll of the vote to be removed. + * - `class`: The class of the poll. + * + * Weight: `O(R + log R)` where R is the number of polls that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface ConvictionVotingCall_remove_other_vote { + __kind: 'remove_other_vote' + target: MultiAddress + class: number + index: number +} + +/** + * Remove a vote for a poll. + * + * If: + * - the poll was cancelled, or + * - the poll is ongoing, or + * - the poll has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the poll has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for poll `index`. + * + * - `index`: The index of poll of the vote to be removed. + * - `class`: Optional parameter, if given it indicates the class of the poll. For polls + * which have finished or are cancelled, this must be `Some`. + * + * Weight: `O(R + log R)` where R is the number of polls that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface ConvictionVotingCall_remove_vote { + __kind: 'remove_vote' + class?: (number | undefined) + index: number +} + +/** + * Undelegate the voting power of the sending account for a particular class of polls. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued has passed. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * - `class`: The class of polls to remove the delegation from. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of polls the voter delegating to has + * voted on. Weight is initially charged as if maximum votes, but is refunded later. + */ +export interface ConvictionVotingCall_undelegate { + __kind: 'undelegate' + class: number +} + +/** + * Remove the lock caused by prior voting/delegating which has expired within a particular + * class. + * + * The dispatch origin of this call must be _Signed_. + * + * - `class`: The class of polls to unlock. + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface ConvictionVotingCall_unlock { + __kind: 'unlock' + class: number + target: MultiAddress +} + +/** + * Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `poll_index`: The index of the poll to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of polls the voter has voted on. + */ +export interface ConvictionVotingCall_vote { + __kind: 'vote' + pollIndex: number + vote: Type_145 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_bypass_consistency_check: sts.enumStruct({ + new: sts.boolean(), + }), + set_chain_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_code_retention_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_conclusion_by_time_out_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: sts.number(), + }), + set_group_rotation_frequency: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_minimum_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_cores: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_retries: sts.enumStruct({ + new: sts.number(), + }), + set_pvf_checking_enabled: sts.enumStruct({ + new: sts.boolean(), + }), + set_pvf_voting_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_thread_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_ump_max_individual_weight: sts.enumStruct({ + new: Weight, + }), + set_ump_service_total_weight: sts.enumStruct({ + new: Weight, + }), + set_validation_upgrade_cooldown: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ConfigurationCall = ConfigurationCall_set_bypass_consistency_check | ConfigurationCall_set_chain_availability_period | ConfigurationCall_set_code_retention_period | ConfigurationCall_set_dispute_conclusion_by_time_out_period | ConfigurationCall_set_dispute_period | ConfigurationCall_set_dispute_post_conclusion_acceptance_period | ConfigurationCall_set_group_rotation_frequency | ConfigurationCall_set_hrmp_channel_max_capacity | ConfigurationCall_set_hrmp_channel_max_message_size | ConfigurationCall_set_hrmp_channel_max_total_size | ConfigurationCall_set_hrmp_max_message_num_per_candidate | ConfigurationCall_set_hrmp_max_parachain_inbound_channels | ConfigurationCall_set_hrmp_max_parachain_outbound_channels | ConfigurationCall_set_hrmp_max_parathread_inbound_channels | ConfigurationCall_set_hrmp_max_parathread_outbound_channels | ConfigurationCall_set_hrmp_open_request_ttl | ConfigurationCall_set_hrmp_recipient_deposit | ConfigurationCall_set_hrmp_sender_deposit | ConfigurationCall_set_max_code_size | ConfigurationCall_set_max_downward_message_size | ConfigurationCall_set_max_head_data_size | ConfigurationCall_set_max_pov_size | ConfigurationCall_set_max_upward_message_num_per_candidate | ConfigurationCall_set_max_upward_message_size | ConfigurationCall_set_max_upward_queue_count | ConfigurationCall_set_max_upward_queue_size | ConfigurationCall_set_max_validators | ConfigurationCall_set_max_validators_per_core | ConfigurationCall_set_minimum_validation_upgrade_delay | ConfigurationCall_set_n_delay_tranches | ConfigurationCall_set_needed_approvals | ConfigurationCall_set_no_show_slots | ConfigurationCall_set_parathread_cores | ConfigurationCall_set_parathread_retries | ConfigurationCall_set_pvf_checking_enabled | ConfigurationCall_set_pvf_voting_ttl | ConfigurationCall_set_relay_vrf_modulo_samples | ConfigurationCall_set_scheduling_lookahead | ConfigurationCall_set_thread_availability_period | ConfigurationCall_set_ump_max_individual_weight | ConfigurationCall_set_ump_service_total_weight | ConfigurationCall_set_validation_upgrade_cooldown | ConfigurationCall_set_validation_upgrade_delay | ConfigurationCall_set_zeroth_delay_tranche_width + +/** + * Setting this to true will disable consistency checks for the configuration setters. + * Use with caution. + */ +export interface ConfigurationCall_set_bypass_consistency_check { + __kind: 'set_bypass_consistency_check' + new: boolean +} + +/** + * Set the availability period for parachains. + */ +export interface ConfigurationCall_set_chain_availability_period { + __kind: 'set_chain_availability_period' + new: number +} + +/** + * Set the acceptance period for an included candidate. + */ +export interface ConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: number +} + +/** + * Set the dispute conclusion by time out period. + */ +export interface ConfigurationCall_set_dispute_conclusion_by_time_out_period { + __kind: 'set_dispute_conclusion_by_time_out_period' + new: number +} + +/** + * Set the dispute period, in number of sessions to keep for disputes. + */ +export interface ConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: number +} + +/** + * Set the dispute post conclusion acceptance period. + */ +export interface ConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: number +} + +/** + * Set the parachain validator-group rotation frequency + */ +export interface ConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: number +} + +/** + * Sets the maximum number of messages allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * Sets the maximum size of a message that could ever be put into an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * Sets the maximum total size of messages in bytes allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * Sets the maximum number of outbound HRMP messages can be sent by a candidate. + */ +export interface ConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parachain is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parachain is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parathread is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_inbound_channels { + __kind: 'set_hrmp_max_parathread_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parathread is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_outbound_channels { + __kind: 'set_hrmp_max_parathread_outbound_channels' + new: number +} + +/** + * Sets the number of sessions after which an HRMP open channel request expires. + */ +export interface ConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * Sets the amount of funds that the recipient should provide for accepting opening an HRMP + * channel. + */ +export interface ConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: bigint +} + +/** + * Sets the amount of funds that the sender should provide for opening an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: bigint +} + +/** + * Set the max validation code size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * Set the critical downward message size. + */ +export interface ConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * Set the max head data size for paras. + */ +export interface ConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * Set the max POV block size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * Sets the maximum number of messages that a candidate can contain. + */ +export interface ConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum size of an upward message that can be sent by a candidate. + */ +export interface ConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * Sets the maximum items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * Sets the maximum total size of items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * Set the maximum number of validators to use in parachain consensus. + */ +export interface ConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * Set the maximum number of validators to assign to any core. + */ +export interface ConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * Sets the minimum delay between announcing the upgrade block for a parachain until the + * upgrade taking place. + * + * See the field documentation for information and constraints for the new value. + */ +export interface ConfigurationCall_set_minimum_validation_upgrade_delay { + __kind: 'set_minimum_validation_upgrade_delay' + new: number +} + +/** + * Set the total number of delay tranches. + */ +export interface ConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * Set the number of validators needed to approve a block. + */ +export interface ConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * Set the no show slots, in number of number of consensus slots. + * Must be at least 1. + */ +export interface ConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * Set the number of parathread execution cores. + */ +export interface ConfigurationCall_set_parathread_cores { + __kind: 'set_parathread_cores' + new: number +} + +/** + * Set the number of retries for a particular parathread. + */ +export interface ConfigurationCall_set_parathread_retries { + __kind: 'set_parathread_retries' + new: number +} + +/** + * Enable or disable PVF pre-checking. Consult the field documentation prior executing. + */ +export interface ConfigurationCall_set_pvf_checking_enabled { + __kind: 'set_pvf_checking_enabled' + new: boolean +} + +/** + * Set the number of session changes after which a PVF pre-checking voting is rejected. + */ +export interface ConfigurationCall_set_pvf_voting_ttl { + __kind: 'set_pvf_voting_ttl' + new: number +} + +/** + * Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion. + */ +export interface ConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * Set the scheduling lookahead, in expected number of blocks at peak throughput. + */ +export interface ConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * Set the availability period for parathreads. + */ +export interface ConfigurationCall_set_thread_availability_period { + __kind: 'set_thread_availability_period' + new: number +} + +/** + * Sets the maximum amount of weight any individual upward message may consume. + */ +export interface ConfigurationCall_set_ump_max_individual_weight { + __kind: 'set_ump_max_individual_weight' + new: Weight +} + +/** + * Sets the soft limit for the phase of dispatching dispatchable upward messages. + */ +export interface ConfigurationCall_set_ump_service_total_weight { + __kind: 'set_ump_service_total_weight' + new: Weight +} + +/** + * Set the validation upgrade cooldown. + */ +export interface ConfigurationCall_set_validation_upgrade_cooldown { + __kind: 'set_validation_upgrade_cooldown' + new: number +} + +/** + * Set the validation upgrade delay. + */ +export interface ConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: number +} + +/** + * Set the zeroth delay tranche width. + */ +export interface ConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: sts.bigint(), + vestingSchedule: sts.option(() => sts.tuple(() => [sts.bigint(), sts.bigint(), sts.number()])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId32), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId32 + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId32 + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: bigint + vestingSchedule?: ([bigint, bigint, number] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId32 | undefined) +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ChildBountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + add_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + value: sts.bigint(), + description: sts.bytes(), + }), + award_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + close_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + propose_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ChildBountiesCall = ChildBountiesCall_accept_curator | ChildBountiesCall_add_child_bounty | ChildBountiesCall_award_child_bounty | ChildBountiesCall_claim_child_bounty | ChildBountiesCall_close_child_bounty | ChildBountiesCall_propose_curator | ChildBountiesCall_unassign_curator + +/** + * Accept the curator role for the child-bounty. + * + * The dispatch origin for this call must be the curator of this + * child-bounty. + * + * A deposit will be reserved from the curator and refund upon + * successful payout or cancellation. + * + * Fee for curator is deducted from curator fee of parent bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in "CuratorProposed" state, for processing the + * call. And state of child-bounty is moved to "Active" on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_accept_curator { + __kind: 'accept_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Add a new child-bounty. + * + * The dispatch origin for this call must be the curator of parent + * bounty and the parent bounty must be in "active" state. + * + * Child-bounty gets added successfully & fund gets transferred from + * parent bounty to child-bounty account, if parent bounty has enough + * funds, else the call fails. + * + * Upper bound to maximum number of active child bounties that can be + * added are managed via runtime trait config + * [`Config::MaxActiveChildBountyCount`]. + * + * If the call is success, the status of child-bounty is updated to + * "Added". + * + * - `parent_bounty_id`: Index of parent bounty for which child-bounty is being added. + * - `value`: Value for executing the proposal. + * - `description`: Text description for the child-bounty. + */ +export interface ChildBountiesCall_add_child_bounty { + __kind: 'add_child_bounty' + parentBountyId: number + value: bigint + description: Bytes +} + +/** + * Award child-bounty to a beneficiary. + * + * The beneficiary will be able to claim the funds after a delay. + * + * The dispatch origin for this call must be the parent curator or + * curator of this child-bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in active state, for processing the call. And + * state of child-bounty is moved to "PendingPayout" on successful call + * completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + * - `beneficiary`: Beneficiary account. + */ +export interface ChildBountiesCall_award_child_bounty { + __kind: 'award_child_bounty' + parentBountyId: number + childBountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded child-bounty after payout delay. + * + * The dispatch origin for this call may be any signed origin. + * + * Call works independent of parent bounty state, No need for parent + * bounty to be in active state. + * + * The Beneficiary is paid out with agreed bounty value. Curator fee is + * paid & curator deposit is unreserved. + * + * Child-bounty must be in "PendingPayout" state, for processing the + * call. And instance of child-bounty is removed from the state on + * successful call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_claim_child_bounty { + __kind: 'claim_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * Cancel a proposed or active child-bounty. Child-bounty account funds + * are transferred to parent bounty account. The child-bounty curator + * deposit may be unreserved if possible. + * + * The dispatch origin for this call must be either parent curator or + * `T::RejectOrigin`. + * + * If the state of child-bounty is `Active`, curator deposit is + * unreserved. + * + * If the state of child-bounty is `PendingPayout`, call fails & + * returns `PendingPayout` error. + * + * For the origin other than T::RejectOrigin, parent bounty must be in + * active state, for this child-bounty call to work. For origin + * T::RejectOrigin execution is forced. + * + * Instance of child-bounty is removed from the state on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_close_child_bounty { + __kind: 'close_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * Propose curator for funded child-bounty. + * + * The dispatch origin for this call must be curator of parent bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in "Added" state, for processing the call. And + * state of child-bounty is moved to "CuratorProposed" on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + * - `curator`: Address of child-bounty curator. + * - `fee`: payment fee to child-bounty curator for execution. + */ +export interface ChildBountiesCall_propose_curator { + __kind: 'propose_curator' + parentBountyId: number + childBountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a child-bounty. + * + * The dispatch origin for this call can be either `RejectOrigin`, or + * the curator of the parent bounty, or any signed origin. + * + * For the origin other than T::RejectOrigin and the child-bounty + * curator, parent bounty must be in active state, for this call to + * work. We allow child-bounty curator and T::RejectOrigin to execute + * this call irrespective of the parent bounty state. + * + * If this function is called by the `RejectOrigin` or the + * parent bounty curator, we assume that the child-bounty curator is + * malicious or inactive. As a result, child-bounty curator deposit is + * slashed. + * + * If the origin is the child-bounty curator, we take this as a sign + * that they are unable to do their job, and are willingly giving up. + * We could slash the deposit, but for now we allow them to unreserve + * their deposit and exit without issue. (We may want to change this if + * it is abused.) + * + * Finally, the origin can be anyone iff the child-bounty curator is + * "inactive". Expiry update due of parent bounty is used to estimate + * inactive state of child-bounty curator. + * + * This allows anyone in the community to call out that a child-bounty + * curator is not doing their due diligence, and we should pick a new + * one. In this case the child-bounty curator deposit is slashed. + * + * State of child-bounty is moved to Added state on successful call + * completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_unassign_curator { + __kind: 'unassign_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::SpendOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds + * after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::SpendOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is + * malicious or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_force_unreserve | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_all | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is not + * assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * Unreserve some balance from a user by force. + * + * Can only be called by ROOT. + */ +export interface BalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also alter the total issuance of the system (`TotalIssuance`) appropriately. + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: MultiAddress + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for input config + * types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex + * computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional check + * that the transfer will not kill the origin account. + * --------------------------------- + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: MultiAddress + value: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). # + * - O(1). Just like transfer, but reading the user's transferable balance first. + * # + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const EquivocationProof: sts.Type = sts.struct(() => { + return { + offender: sts.bytes(), + slot: Slot, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Slot = sts.bigint() + +export interface EquivocationProof { + offender: Bytes + slot: Slot + firstHeader: Header + secondHeader: Header +} + +export type Slot = bigint + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V1: sts.enumStruct({ + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + }), + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type NextConfigDescriptor = NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Plan an epoch config change. The epoch config change is recorded and will be enacted on + * the next call to `enact_epoch_change`. The config will be activated one epoch after. + * Multiple calls to this method will replace any existing planned config change that had + * not been enacted yet. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuthorshipCall: sts.Type = sts.closedEnum(() => { + return { + set_uncles: sts.enumStruct({ + newUncles: sts.array(() => Header), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuthorshipCall = AuthorshipCall_set_uncles + +/** + * Provide a set of uncles. + */ +export interface AuthorshipCall_set_uncles { + __kind: 'set_uncles' + newUncles: Header[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Cancel an in-progress auction. + * + * Can only be called by Root origin. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +export type Call = Call_Auctions | Call_Authorship | Call_Babe | Call_Balances | Call_Bounties | Call_ChildBounties | Call_Claims | Call_Configuration | Call_ConvictionVoting | Call_Council | Call_Crowdloan | Call_Democracy | Call_Dmp | Call_ElectionProviderMultiPhase | Call_FastUnstake | Call_FellowshipCollective | Call_FellowshipReferenda | Call_Grandpa | Call_Hrmp | Call_Identity | Call_ImOnline | Call_Indices | Call_Initializer | Call_Multisig | Call_Nis | Call_NisCounterpartBalances | Call_NominationPools | Call_ParaInclusion | Call_ParaInherent | Call_Paras | Call_ParasDisputes | Call_ParasShared | Call_PhragmenElection | Call_Preimage | Call_Proxy | Call_Recovery | Call_Referenda | Call_Registrar | Call_Scheduler | Call_Session | Call_Slots | Call_Society | Call_Staking | Call_System | Call_TechnicalCommittee | Call_TechnicalMembership | Call_Timestamp | Call_Tips | Call_Treasury | Call_Ump | Call_Utility | Call_Vesting | Call_VoterList | Call_Whitelist | Call_XcmPallet + +export interface Call_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Call_Authorship { + __kind: 'Authorship' + value: AuthorshipCall +} + +export interface Call_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Call_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Call_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Call_ChildBounties { + __kind: 'ChildBounties' + value: ChildBountiesCall +} + +export interface Call_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Call_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Call_ConvictionVoting { + __kind: 'ConvictionVoting' + value: ConvictionVotingCall +} + +export interface Call_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Call_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Call_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Call_Dmp { + __kind: 'Dmp' + value: DmpCall +} + +export interface Call_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Call_FastUnstake { + __kind: 'FastUnstake' + value: FastUnstakeCall +} + +export interface Call_FellowshipCollective { + __kind: 'FellowshipCollective' + value: FellowshipCollectiveCall +} + +export interface Call_FellowshipReferenda { + __kind: 'FellowshipReferenda' + value: FellowshipReferendaCall +} + +export interface Call_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Call_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Call_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Call_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Call_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Call_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Call_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Call_Nis { + __kind: 'Nis' + value: NisCall +} + +export interface Call_NisCounterpartBalances { + __kind: 'NisCounterpartBalances' + value: NisCounterpartBalancesCall +} + +export interface Call_NominationPools { + __kind: 'NominationPools' + value: NominationPoolsCall +} + +export interface Call_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Call_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Call_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Call_ParasDisputes { + __kind: 'ParasDisputes' + value: ParasDisputesCall +} + +export interface Call_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Call_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Call_Preimage { + __kind: 'Preimage' + value: PreimageCall +} + +export interface Call_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Call_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Call_Referenda { + __kind: 'Referenda' + value: ReferendaCall +} + +export interface Call_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Call_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Call_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Call_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Call_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Call_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Call_System { + __kind: 'System' + value: SystemCall +} + +export interface Call_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Call_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Call_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Call_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Call_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Call_Ump { + __kind: 'Ump' + value: UmpCall +} + +export interface Call_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Call_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Call_VoterList { + __kind: 'VoterList' + value: VoterListCall +} + +export interface Call_Whitelist { + __kind: 'Whitelist' + value: WhitelistCall +} + +export interface Call_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Society: sts.unit(), + Staking: sts.unit(), + } +}) + +export const MultiAddress: sts.Type = sts.closedEnum(() => { + return { + Address20: sts.bytes(), + Address32: sts.bytes(), + Id: AccountId32, + Index: sts.unit(), + Raw: sts.bytes(), + } +}) diff --git a/squid/src/types/v9381.ts b/squid/src/types/v9381.ts new file mode 100644 index 00000000..73497f93 --- /dev/null +++ b/squid/src/types/v9381.ts @@ -0,0 +1,13856 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Weight: sts.Type = sts.struct(() => { + return { + refTime: sts.bigint(), + proofSize: sts.bigint(), + } +}) + +export interface Weight { + refTime: bigint + proofSize: bigint +} + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: sts.number(), + index: sts.number(), + } +}) + +export interface Timepoint { + height: number + index: number +} + +export const AccountId32 = sts.bytes() + +export const Call: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + ChildBounties: ChildBountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + ConvictionVoting: ConvictionVotingCall, + Council: CouncilCall, + Crowdloan: CrowdloanCall, + Democracy: DemocracyCall, + Dmp: DmpCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + FastUnstake: FastUnstakeCall, + FellowshipCollective: FellowshipCollectiveCall, + FellowshipReferenda: FellowshipReferendaCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Initializer: InitializerCall, + Multisig: MultisigCall, + Nis: NisCall, + NisCounterpartBalances: NisCounterpartBalancesCall, + NominationPools: NominationPoolsCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Paras: ParasCall, + ParasDisputes: ParasDisputesCall, + ParasShared: ParasSharedCall, + PhragmenElection: PhragmenElectionCall, + Preimage: PreimageCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Referenda: ReferendaCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + TechnicalCommittee: TechnicalCommitteeCall, + TechnicalMembership: TechnicalMembershipCall, + Timestamp: TimestampCall, + Tips: TipsCall, + Treasury: TreasuryCall, + Ump: UmpCall, + Utility: UtilityCall, + Vesting: VestingCall, + VoterList: VoterListCall, + Whitelist: WhitelistCall, + XcmPallet: XcmPalletCall, + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + execute: sts.enumStruct({ + message: Type_440, + maxWeight: Weight, + }), + force_default_xcm_version: sts.enumStruct({ + maybeXcmVersion: sts.option(() => sts.number()), + }), + force_subscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_unsubscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_xcm_version: sts.enumStruct({ + location: V3MultiLocation, + xcmVersion: sts.number(), + }), + limited_reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V3WeightLimit, + }), + limited_teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V3WeightLimit, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + send: sts.enumStruct({ + dest: VersionedMultiLocation, + message: VersionedXcm, + }), + teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + } +}) + +export const VersionedXcm: sts.Type = sts.closedEnum(() => { + return { + V2: sts.array(() => V2Instruction), + V3: sts.array(() => V3Instruction), + } +}) + +export const V3Instruction: sts.Type = sts.closedEnum(() => { + return { + AliasOrigin: V3MultiLocation, + BurnAsset: sts.array(() => V3MultiAsset), + BuyExecution: sts.enumStruct({ + fees: V3MultiAsset, + weightLimit: V3WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + ticket: V3MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + ClearTopic: sts.unit(), + ClearTransactStatus: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + beneficiary: V3MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + DescendOrigin: V3Junctions, + ExchangeAsset: sts.enumStruct({ + give: V3MultiAssetFilter, + want: sts.array(() => V3MultiAsset), + maximal: sts.boolean(), + }), + ExpectAsset: sts.array(() => V3MultiAsset), + ExpectError: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + ExpectOrigin: sts.option(() => V3MultiLocation), + ExpectPallet: sts.enumStruct({ + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + crateMajor: sts.number(), + minCrateMinor: sts.number(), + }), + ExpectTransactStatus: V3MaybeErrorCode, + ExportMessage: sts.enumStruct({ + network: V3NetworkId, + destination: V3Junctions, + xcm: sts.array(() => V3Instruction), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V3MultiAssetFilter, + reserve: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + LockAsset: sts.enumStruct({ + asset: V3MultiAsset, + unlocker: V3MultiLocation, + }), + NoteUnlockable: sts.enumStruct({ + asset: V3MultiAsset, + owner: V3MultiLocation, + }), + QueryPallet: sts.enumStruct({ + moduleName: sts.bytes(), + responseInfo: V3QueryResponseInfo, + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V3Response, + maxWeight: Weight, + querier: sts.option(() => V3MultiLocation), + }), + ReceiveTeleportedAsset: sts.array(() => V3MultiAsset), + RefundSurplus: sts.unit(), + ReportError: V3QueryResponseInfo, + ReportHolding: sts.enumStruct({ + responseInfo: V3QueryResponseInfo, + assets: V3MultiAssetFilter, + }), + ReportTransactStatus: V3QueryResponseInfo, + RequestUnlock: sts.enumStruct({ + asset: V3MultiAsset, + locker: V3MultiLocation, + }), + ReserveAssetDeposited: sts.array(() => V3MultiAsset), + SetAppendix: sts.array(() => V3Instruction), + SetErrorHandler: sts.array(() => V3Instruction), + SetFeesMode: sts.enumStruct({ + jitWithdraw: sts.boolean(), + }), + SetTopic: sts.bytes(), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: Weight, + }), + Transact: sts.enumStruct({ + originKind: V2OriginKind, + requireWeightAtMost: Weight, + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + beneficiary: V3MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + Trap: sts.bigint(), + UniversalOrigin: V3Junction, + UnlockAsset: sts.enumStruct({ + asset: V3MultiAsset, + target: V3MultiLocation, + }), + UnpaidExecution: sts.enumStruct({ + weightLimit: V3WeightLimit, + checkOrigin: sts.option(() => V3MultiLocation), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V3MultiAsset), + } +}) + +export const V3Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: sts.option(() => V3NetworkId), + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: sts.option(() => V3NetworkId), + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: sts.option(() => V3NetworkId), + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.enumStruct({ + length: sts.number(), + data: sts.bytes(), + }), + GlobalConsensus: V3NetworkId, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V3BodyId, + part: V3BodyPart, + }), + } +}) + +export const V3BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export type V3BodyPart = V3BodyPart_AtLeastProportion | V3BodyPart_Fraction | V3BodyPart_Members | V3BodyPart_MoreThanProportion | V3BodyPart_Voice + +export interface V3BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V3BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V3BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V3BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V3BodyPart_Voice { + __kind: 'Voice' +} + +export const V3BodyId: sts.Type = sts.closedEnum(() => { + return { + Administration: sts.unit(), + Defense: sts.unit(), + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Moniker: sts.bytes(), + Technical: sts.unit(), + Treasury: sts.unit(), + Unit: sts.unit(), + } +}) + +export type V3BodyId = V3BodyId_Administration | V3BodyId_Defense | V3BodyId_Executive | V3BodyId_Index | V3BodyId_Judicial | V3BodyId_Legislative | V3BodyId_Moniker | V3BodyId_Technical | V3BodyId_Treasury | V3BodyId_Unit + +export interface V3BodyId_Administration { + __kind: 'Administration' +} + +export interface V3BodyId_Defense { + __kind: 'Defense' +} + +export interface V3BodyId_Executive { + __kind: 'Executive' +} + +export interface V3BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V3BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V3BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V3BodyId_Moniker { + __kind: 'Moniker' + value: Bytes +} + +export interface V3BodyId_Technical { + __kind: 'Technical' +} + +export interface V3BodyId_Treasury { + __kind: 'Treasury' +} + +export interface V3BodyId_Unit { + __kind: 'Unit' +} + +export type V3Junction = V3Junction_AccountId32 | V3Junction_AccountIndex64 | V3Junction_AccountKey20 | V3Junction_GeneralIndex | V3Junction_GeneralKey | V3Junction_GlobalConsensus | V3Junction_OnlyChild | V3Junction_PalletInstance | V3Junction_Parachain | V3Junction_Plurality + +export interface V3Junction_AccountId32 { + __kind: 'AccountId32' + network?: (V3NetworkId | undefined) + id: Bytes +} + +export interface V3Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network?: (V3NetworkId | undefined) + index: bigint +} + +export interface V3Junction_AccountKey20 { + __kind: 'AccountKey20' + network?: (V3NetworkId | undefined) + key: Bytes +} + +export interface V3Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V3Junction_GeneralKey { + __kind: 'GeneralKey' + length: number + data: Bytes +} + +export interface V3Junction_GlobalConsensus { + __kind: 'GlobalConsensus' + value: V3NetworkId +} + +export interface V3Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V3Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V3Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V3Junction_Plurality { + __kind: 'Plurality' + id: V3BodyId + part: V3BodyPart +} + +export type V3NetworkId = V3NetworkId_BitcoinCash | V3NetworkId_BitcoinCore | V3NetworkId_ByFork | V3NetworkId_ByGenesis | V3NetworkId_Ethereum | V3NetworkId_Kusama | V3NetworkId_Polkadot | V3NetworkId_Rococo | V3NetworkId_Westend | V3NetworkId_Wococo + +export interface V3NetworkId_BitcoinCash { + __kind: 'BitcoinCash' +} + +export interface V3NetworkId_BitcoinCore { + __kind: 'BitcoinCore' +} + +export interface V3NetworkId_ByFork { + __kind: 'ByFork' + blockNumber: bigint + blockHash: Bytes +} + +export interface V3NetworkId_ByGenesis { + __kind: 'ByGenesis' + value: Bytes +} + +export interface V3NetworkId_Ethereum { + __kind: 'Ethereum' + chainId: bigint +} + +export interface V3NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V3NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export interface V3NetworkId_Rococo { + __kind: 'Rococo' +} + +export interface V3NetworkId_Westend { + __kind: 'Westend' +} + +export interface V3NetworkId_Wococo { + __kind: 'Wococo' +} + +export const DoubleEncoded: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncoded { + encoded: Bytes +} + +export const V2OriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type V2OriginKind = V2OriginKind_Native | V2OriginKind_SovereignAccount | V2OriginKind_Superuser | V2OriginKind_Xcm + +export interface V2OriginKind_Native { + __kind: 'Native' +} + +export interface V2OriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface V2OriginKind_Superuser { + __kind: 'Superuser' +} + +export interface V2OriginKind_Xcm { + __kind: 'Xcm' +} + +export const V3Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V3MultiAsset), + DispatchResult: V3MaybeErrorCode, + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + Null: sts.unit(), + PalletsInfo: sts.array(() => V3PalletInfo), + Version: sts.number(), + } +}) + +export const V3PalletInfo: sts.Type = sts.struct(() => { + return { + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + major: sts.number(), + minor: sts.number(), + patch: sts.number(), + } +}) + +export interface V3PalletInfo { + index: number + name: Bytes + moduleName: Bytes + major: number + minor: number + patch: number +} + +export type V3Response = V3Response_Assets | V3Response_DispatchResult | V3Response_ExecutionResult | V3Response_Null | V3Response_PalletsInfo | V3Response_Version + +export interface V3Response_Assets { + __kind: 'Assets' + value: V3MultiAsset[] +} + +export interface V3Response_DispatchResult { + __kind: 'DispatchResult' + value: V3MaybeErrorCode +} + +export interface V3Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V3Error] | undefined) +} + +export interface V3Response_Null { + __kind: 'Null' +} + +export interface V3Response_PalletsInfo { + __kind: 'PalletsInfo' + value: V3PalletInfo[] +} + +export interface V3Response_Version { + __kind: 'Version' + value: number +} + +export type V3Error = V3Error_AssetNotFound | V3Error_BadOrigin | V3Error_Barrier | V3Error_DestinationUnsupported | V3Error_ExceedsMaxMessageSize | V3Error_ExceedsStackLimit | V3Error_ExpectationFalse | V3Error_ExportError | V3Error_FailedToDecode | V3Error_FailedToTransactAsset | V3Error_FeesNotMet | V3Error_HoldingWouldOverflow | V3Error_InvalidLocation | V3Error_LocationCannotHold | V3Error_LocationFull | V3Error_LocationNotInvertible | V3Error_LockError | V3Error_MaxWeightInvalid | V3Error_NameMismatch | V3Error_NoDeal | V3Error_NoPermission | V3Error_NotDepositable | V3Error_NotHoldingFees | V3Error_NotWithdrawable | V3Error_Overflow | V3Error_PalletNotFound | V3Error_ReanchorFailed | V3Error_TooExpensive | V3Error_Transport | V3Error_Trap | V3Error_Unanchored | V3Error_UnhandledXcmVersion | V3Error_Unimplemented | V3Error_UnknownClaim | V3Error_Unroutable | V3Error_UntrustedReserveLocation | V3Error_UntrustedTeleportLocation | V3Error_VersionIncompatible | V3Error_WeightLimitReached | V3Error_WeightNotComputable + +export interface V3Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V3Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V3Error_Barrier { + __kind: 'Barrier' +} + +export interface V3Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V3Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V3Error_ExceedsStackLimit { + __kind: 'ExceedsStackLimit' +} + +export interface V3Error_ExpectationFalse { + __kind: 'ExpectationFalse' +} + +export interface V3Error_ExportError { + __kind: 'ExportError' +} + +export interface V3Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V3Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V3Error_FeesNotMet { + __kind: 'FeesNotMet' +} + +export interface V3Error_HoldingWouldOverflow { + __kind: 'HoldingWouldOverflow' +} + +export interface V3Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V3Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V3Error_LocationFull { + __kind: 'LocationFull' +} + +export interface V3Error_LocationNotInvertible { + __kind: 'LocationNotInvertible' +} + +export interface V3Error_LockError { + __kind: 'LockError' +} + +export interface V3Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V3Error_NameMismatch { + __kind: 'NameMismatch' +} + +export interface V3Error_NoDeal { + __kind: 'NoDeal' +} + +export interface V3Error_NoPermission { + __kind: 'NoPermission' +} + +export interface V3Error_NotDepositable { + __kind: 'NotDepositable' +} + +export interface V3Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V3Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V3Error_Overflow { + __kind: 'Overflow' +} + +export interface V3Error_PalletNotFound { + __kind: 'PalletNotFound' +} + +export interface V3Error_ReanchorFailed { + __kind: 'ReanchorFailed' +} + +export interface V3Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V3Error_Transport { + __kind: 'Transport' +} + +export interface V3Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V3Error_Unanchored { + __kind: 'Unanchored' +} + +export interface V3Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V3Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V3Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V3Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V3Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V3Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V3Error_VersionIncompatible { + __kind: 'VersionIncompatible' +} + +export interface V3Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: Weight +} + +export interface V3Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V3MaybeErrorCode = V3MaybeErrorCode_Error | V3MaybeErrorCode_Success | V3MaybeErrorCode_TruncatedError + +export interface V3MaybeErrorCode_Error { + __kind: 'Error' + value: Bytes +} + +export interface V3MaybeErrorCode_Success { + __kind: 'Success' +} + +export interface V3MaybeErrorCode_TruncatedError { + __kind: 'TruncatedError' + value: Bytes +} + +export interface V3MultiAsset { + id: V3AssetId + fun: V3Fungibility +} + +export type V3Fungibility = V3Fungibility_Fungible | V3Fungibility_NonFungible + +export interface V3Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V3Fungibility_NonFungible { + __kind: 'NonFungible' + value: V3AssetInstance +} + +export type V3AssetInstance = V3AssetInstance_Array16 | V3AssetInstance_Array32 | V3AssetInstance_Array4 | V3AssetInstance_Array8 | V3AssetInstance_Index | V3AssetInstance_Undefined + +export interface V3AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V3AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V3AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V3AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V3AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V3AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V3AssetId = V3AssetId_Abstract | V3AssetId_Concrete + +export interface V3AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V3AssetId_Concrete { + __kind: 'Concrete' + value: V3MultiLocation +} + +export interface V3MultiLocation { + parents: number + interior: V3Junctions +} + +export type V3Junctions = V3Junctions_Here | V3Junctions_X1 | V3Junctions_X2 | V3Junctions_X3 | V3Junctions_X4 | V3Junctions_X5 | V3Junctions_X6 | V3Junctions_X7 | V3Junctions_X8 + +export interface V3Junctions_Here { + __kind: 'Here' +} + +export interface V3Junctions_X1 { + __kind: 'X1' + value: V3Junction +} + +export interface V3Junctions_X2 { + __kind: 'X2' + value: [V3Junction, V3Junction] +} + +export interface V3Junctions_X3 { + __kind: 'X3' + value: [V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X4 { + __kind: 'X4' + value: [V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X5 { + __kind: 'X5' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X6 { + __kind: 'X6' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X7 { + __kind: 'X7' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X8 { + __kind: 'X8' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export const V3QueryResponseInfo: sts.Type = sts.struct(() => { + return { + destination: V3MultiLocation, + queryId: sts.bigint(), + maxWeight: Weight, + } +}) + +export interface V3QueryResponseInfo { + destination: V3MultiLocation + queryId: bigint + maxWeight: Weight +} + +export const V3NetworkId: sts.Type = sts.closedEnum(() => { + return { + BitcoinCash: sts.unit(), + BitcoinCore: sts.unit(), + ByFork: sts.enumStruct({ + blockNumber: sts.bigint(), + blockHash: sts.bytes(), + }), + ByGenesis: sts.bytes(), + Ethereum: sts.enumStruct({ + chainId: sts.bigint(), + }), + Kusama: sts.unit(), + Polkadot: sts.unit(), + Rococo: sts.unit(), + Westend: sts.unit(), + Wococo: sts.unit(), + } +}) + +export const V3MaybeErrorCode: sts.Type = sts.closedEnum(() => { + return { + Error: sts.bytes(), + Success: sts.unit(), + TruncatedError: sts.bytes(), + } +}) + +export const V3Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + ExceedsStackLimit: sts.unit(), + ExpectationFalse: sts.unit(), + ExportError: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + FeesNotMet: sts.unit(), + HoldingWouldOverflow: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + LocationFull: sts.unit(), + LocationNotInvertible: sts.unit(), + LockError: sts.unit(), + MaxWeightInvalid: sts.unit(), + NameMismatch: sts.unit(), + NoDeal: sts.unit(), + NoPermission: sts.unit(), + NotDepositable: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + PalletNotFound: sts.unit(), + ReanchorFailed: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + Unanchored: sts.unit(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + VersionIncompatible: sts.unit(), + WeightLimitReached: Weight, + WeightNotComputable: sts.unit(), + } +}) + +export const V3Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V3Junction, + X2: sts.tuple(() => [V3Junction, V3Junction]), + X3: sts.tuple(() => [V3Junction, V3Junction, V3Junction]), + X4: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction]), + X5: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + X6: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + X7: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + X8: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + } +}) + +export const V3MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V3MultiAsset), + Wild: V3WildMultiAsset, + } +}) + +export const V3WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllCounted: sts.number(), + AllOf: sts.enumStruct({ + id: V3AssetId, + fun: V3WildFungibility, + }), + AllOfCounted: sts.enumStruct({ + id: V3AssetId, + fun: V3WildFungibility, + count: sts.number(), + }), + } +}) + +export const V3WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V3WildFungibility = V3WildFungibility_Fungible | V3WildFungibility_NonFungible + +export interface V3WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V3WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V3AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V3MultiLocation, + } +}) + +export type V3WildMultiAsset = V3WildMultiAsset_All | V3WildMultiAsset_AllCounted | V3WildMultiAsset_AllOf | V3WildMultiAsset_AllOfCounted + +export interface V3WildMultiAsset_All { + __kind: 'All' +} + +export interface V3WildMultiAsset_AllCounted { + __kind: 'AllCounted' + value: number +} + +export interface V3WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V3AssetId + fun: V3WildFungibility +} + +export interface V3WildMultiAsset_AllOfCounted { + __kind: 'AllOfCounted' + id: V3AssetId + fun: V3WildFungibility + count: number +} + +export type V3MultiAssetFilter = V3MultiAssetFilter_Definite | V3MultiAssetFilter_Wild + +export interface V3MultiAssetFilter_Definite { + __kind: 'Definite' + value: V3MultiAsset[] +} + +export interface V3MultiAssetFilter_Wild { + __kind: 'Wild' + value: V3WildMultiAsset +} + +export const V3MultiAsset: sts.Type = sts.struct(() => { + return { + id: V3AssetId, + fun: V3Fungibility, + } +}) + +export const V3Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V3AssetInstance, + } +}) + +export const V3AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V3Instruction = V3Instruction_AliasOrigin | V3Instruction_BurnAsset | V3Instruction_BuyExecution | V3Instruction_ClaimAsset | V3Instruction_ClearError | V3Instruction_ClearOrigin | V3Instruction_ClearTopic | V3Instruction_ClearTransactStatus | V3Instruction_DepositAsset | V3Instruction_DepositReserveAsset | V3Instruction_DescendOrigin | V3Instruction_ExchangeAsset | V3Instruction_ExpectAsset | V3Instruction_ExpectError | V3Instruction_ExpectOrigin | V3Instruction_ExpectPallet | V3Instruction_ExpectTransactStatus | V3Instruction_ExportMessage | V3Instruction_HrmpChannelAccepted | V3Instruction_HrmpChannelClosing | V3Instruction_HrmpNewChannelOpenRequest | V3Instruction_InitiateReserveWithdraw | V3Instruction_InitiateTeleport | V3Instruction_LockAsset | V3Instruction_NoteUnlockable | V3Instruction_QueryPallet | V3Instruction_QueryResponse | V3Instruction_ReceiveTeleportedAsset | V3Instruction_RefundSurplus | V3Instruction_ReportError | V3Instruction_ReportHolding | V3Instruction_ReportTransactStatus | V3Instruction_RequestUnlock | V3Instruction_ReserveAssetDeposited | V3Instruction_SetAppendix | V3Instruction_SetErrorHandler | V3Instruction_SetFeesMode | V3Instruction_SetTopic | V3Instruction_SubscribeVersion | V3Instruction_Transact | V3Instruction_TransferAsset | V3Instruction_TransferReserveAsset | V3Instruction_Trap | V3Instruction_UniversalOrigin | V3Instruction_UnlockAsset | V3Instruction_UnpaidExecution | V3Instruction_UnsubscribeVersion | V3Instruction_WithdrawAsset + +export interface V3Instruction_AliasOrigin { + __kind: 'AliasOrigin' + value: V3MultiLocation +} + +export interface V3Instruction_BurnAsset { + __kind: 'BurnAsset' + value: V3MultiAsset[] +} + +export interface V3Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V3MultiAsset + weightLimit: V3WeightLimit +} + +export interface V3Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V3MultiAsset[] + ticket: V3MultiLocation +} + +export interface V3Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V3Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V3Instruction_ClearTopic { + __kind: 'ClearTopic' +} + +export interface V3Instruction_ClearTransactStatus { + __kind: 'ClearTransactStatus' +} + +export interface V3Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V3MultiAssetFilter + beneficiary: V3MultiLocation +} + +export interface V3Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V3Junctions +} + +export interface V3Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V3MultiAssetFilter + want: V3MultiAsset[] + maximal: boolean +} + +export interface V3Instruction_ExpectAsset { + __kind: 'ExpectAsset' + value: V3MultiAsset[] +} + +export interface V3Instruction_ExpectError { + __kind: 'ExpectError' + value?: ([number, V3Error] | undefined) +} + +export interface V3Instruction_ExpectOrigin { + __kind: 'ExpectOrigin' + value?: (V3MultiLocation | undefined) +} + +export interface V3Instruction_ExpectPallet { + __kind: 'ExpectPallet' + index: number + name: Bytes + moduleName: Bytes + crateMajor: number + minCrateMinor: number +} + +export interface V3Instruction_ExpectTransactStatus { + __kind: 'ExpectTransactStatus' + value: V3MaybeErrorCode +} + +export interface V3Instruction_ExportMessage { + __kind: 'ExportMessage' + network: V3NetworkId + destination: V3Junctions + xcm: V3Instruction[] +} + +export interface V3Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V3Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V3Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V3Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V3MultiAssetFilter + reserve: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_LockAsset { + __kind: 'LockAsset' + asset: V3MultiAsset + unlocker: V3MultiLocation +} + +export interface V3Instruction_NoteUnlockable { + __kind: 'NoteUnlockable' + asset: V3MultiAsset + owner: V3MultiLocation +} + +export interface V3Instruction_QueryPallet { + __kind: 'QueryPallet' + moduleName: Bytes + responseInfo: V3QueryResponseInfo +} + +export interface V3Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V3Response + maxWeight: Weight + querier?: (V3MultiLocation | undefined) +} + +export interface V3Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V3MultiAsset[] +} + +export interface V3Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V3Instruction_ReportError { + __kind: 'ReportError' + value: V3QueryResponseInfo +} + +export interface V3Instruction_ReportHolding { + __kind: 'ReportHolding' + responseInfo: V3QueryResponseInfo + assets: V3MultiAssetFilter +} + +export interface V3Instruction_ReportTransactStatus { + __kind: 'ReportTransactStatus' + value: V3QueryResponseInfo +} + +export interface V3Instruction_RequestUnlock { + __kind: 'RequestUnlock' + asset: V3MultiAsset + locker: V3MultiLocation +} + +export interface V3Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V3MultiAsset[] +} + +export interface V3Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V3Instruction[] +} + +export interface V3Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V3Instruction[] +} + +export interface V3Instruction_SetFeesMode { + __kind: 'SetFeesMode' + jitWithdraw: boolean +} + +export interface V3Instruction_SetTopic { + __kind: 'SetTopic' + value: Bytes +} + +export interface V3Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: Weight +} + +export interface V3Instruction_Transact { + __kind: 'Transact' + originKind: V2OriginKind + requireWeightAtMost: Weight + call: DoubleEncoded +} + +export interface V3Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V3MultiAsset[] + beneficiary: V3MultiLocation +} + +export interface V3Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V3MultiAsset[] + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V3Instruction_UniversalOrigin { + __kind: 'UniversalOrigin' + value: V3Junction +} + +export interface V3Instruction_UnlockAsset { + __kind: 'UnlockAsset' + asset: V3MultiAsset + target: V3MultiLocation +} + +export interface V3Instruction_UnpaidExecution { + __kind: 'UnpaidExecution' + weightLimit: V3WeightLimit + checkOrigin?: (V3MultiLocation | undefined) +} + +export interface V3Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V3Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V3MultiAsset[] +} + +export type V3WeightLimit = V3WeightLimit_Limited | V3WeightLimit_Unlimited + +export interface V3WeightLimit_Limited { + __kind: 'Limited' + value: Weight +} + +export interface V3WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V2Instruction: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V2MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + ticket: V2MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V2MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V2Junctions, + ExchangeAsset: sts.enumStruct({ + give: V2MultiAssetFilter, + receive: sts.array(() => V2MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V2MultiAssetFilter, + reserve: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V2MultiAssetFilter, + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + assets: V2MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V2MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V2MultiAsset), + SetAppendix: sts.array(() => V2Instruction), + SetErrorHandler: sts.array(() => V2Instruction), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V2OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + beneficiary: V2MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V2MultiAsset), + } +}) + +export const V2Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V2MultiAsset), + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V2Error])), + Null: sts.unit(), + Version: sts.number(), + } +}) + +export const V2Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + MaxWeightInvalid: sts.unit(), + MultiLocationFull: sts.unit(), + MultiLocationNotInvertible: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + WeightLimitReached: sts.bigint(), + WeightNotComputable: sts.unit(), + } +}) + +export type V2Error = V2Error_AssetNotFound | V2Error_BadOrigin | V2Error_Barrier | V2Error_DestinationUnsupported | V2Error_ExceedsMaxMessageSize | V2Error_FailedToDecode | V2Error_FailedToTransactAsset | V2Error_InvalidLocation | V2Error_LocationCannotHold | V2Error_MaxWeightInvalid | V2Error_MultiLocationFull | V2Error_MultiLocationNotInvertible | V2Error_NotHoldingFees | V2Error_NotWithdrawable | V2Error_Overflow | V2Error_TooExpensive | V2Error_Transport | V2Error_Trap | V2Error_UnhandledXcmVersion | V2Error_Unimplemented | V2Error_UnknownClaim | V2Error_Unroutable | V2Error_UntrustedReserveLocation | V2Error_UntrustedTeleportLocation | V2Error_WeightLimitReached | V2Error_WeightNotComputable + +export interface V2Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V2Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V2Error_Barrier { + __kind: 'Barrier' +} + +export interface V2Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V2Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V2Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V2Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V2Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V2Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V2Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V2Error_MultiLocationFull { + __kind: 'MultiLocationFull' +} + +export interface V2Error_MultiLocationNotInvertible { + __kind: 'MultiLocationNotInvertible' +} + +export interface V2Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V2Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V2Error_Overflow { + __kind: 'Overflow' +} + +export interface V2Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V2Error_Transport { + __kind: 'Transport' +} + +export interface V2Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V2Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V2Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V2Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V2Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V2Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V2Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: bigint +} + +export interface V2Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V2Response = V2Response_Assets | V2Response_ExecutionResult | V2Response_Null | V2Response_Version + +export interface V2Response_Assets { + __kind: 'Assets' + value: V2MultiAsset[] +} + +export interface V2Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V2Error] | undefined) +} + +export interface V2Response_Null { + __kind: 'Null' +} + +export interface V2Response_Version { + __kind: 'Version' + value: number +} + +export interface V2MultiAsset { + id: V2AssetId + fun: V2Fungibility +} + +export type V2Fungibility = V2Fungibility_Fungible | V2Fungibility_NonFungible + +export interface V2Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V2Fungibility_NonFungible { + __kind: 'NonFungible' + value: V2AssetInstance +} + +export type V2AssetInstance = V2AssetInstance_Array16 | V2AssetInstance_Array32 | V2AssetInstance_Array4 | V2AssetInstance_Array8 | V2AssetInstance_Blob | V2AssetInstance_Index | V2AssetInstance_Undefined + +export interface V2AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V2AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V2AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V2AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V2AssetInstance_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface V2AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V2AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V2AssetId = V2AssetId_Abstract | V2AssetId_Concrete + +export interface V2AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V2AssetId_Concrete { + __kind: 'Concrete' + value: V2MultiLocation +} + +export interface V2MultiLocation { + parents: number + interior: V2Junctions +} + +export type V2Junctions = V2Junctions_Here | V2Junctions_X1 | V2Junctions_X2 | V2Junctions_X3 | V2Junctions_X4 | V2Junctions_X5 | V2Junctions_X6 | V2Junctions_X7 | V2Junctions_X8 + +export interface V2Junctions_Here { + __kind: 'Here' +} + +export interface V2Junctions_X1 { + __kind: 'X1' + value: V2Junction +} + +export interface V2Junctions_X2 { + __kind: 'X2' + value: [V2Junction, V2Junction] +} + +export interface V2Junctions_X3 { + __kind: 'X3' + value: [V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X4 { + __kind: 'X4' + value: [V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X5 { + __kind: 'X5' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X6 { + __kind: 'X6' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X7 { + __kind: 'X7' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X8 { + __kind: 'X8' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export type V2Junction = V2Junction_AccountId32 | V2Junction_AccountIndex64 | V2Junction_AccountKey20 | V2Junction_GeneralIndex | V2Junction_GeneralKey | V2Junction_OnlyChild | V2Junction_PalletInstance | V2Junction_Parachain | V2Junction_Plurality + +export interface V2Junction_AccountId32 { + __kind: 'AccountId32' + network: V2NetworkId + id: Bytes +} + +export interface V2Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V2NetworkId + index: bigint +} + +export interface V2Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V2NetworkId + key: Bytes +} + +export interface V2Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V2Junction_GeneralKey { + __kind: 'GeneralKey' + value: WeakBoundedVec +} + +export interface V2Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V2Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V2Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V2Junction_Plurality { + __kind: 'Plurality' + id: V2BodyId + part: V2BodyPart +} + +export type V2BodyPart = V2BodyPart_AtLeastProportion | V2BodyPart_Fraction | V2BodyPart_Members | V2BodyPart_MoreThanProportion | V2BodyPart_Voice + +export interface V2BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V2BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V2BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V2BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V2BodyPart_Voice { + __kind: 'Voice' +} + +export type V2BodyId = V2BodyId_Administration | V2BodyId_Defense | V2BodyId_Executive | V2BodyId_Index | V2BodyId_Judicial | V2BodyId_Legislative | V2BodyId_Named | V2BodyId_Technical | V2BodyId_Treasury | V2BodyId_Unit + +export interface V2BodyId_Administration { + __kind: 'Administration' +} + +export interface V2BodyId_Defense { + __kind: 'Defense' +} + +export interface V2BodyId_Executive { + __kind: 'Executive' +} + +export interface V2BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V2BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V2BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V2BodyId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V2BodyId_Technical { + __kind: 'Technical' +} + +export interface V2BodyId_Treasury { + __kind: 'Treasury' +} + +export interface V2BodyId_Unit { + __kind: 'Unit' +} + +export type WeakBoundedVec = Bytes + +export type V2NetworkId = V2NetworkId_Any | V2NetworkId_Kusama | V2NetworkId_Named | V2NetworkId_Polkadot + +export interface V2NetworkId_Any { + __kind: 'Any' +} + +export interface V2NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V2NetworkId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V2NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export const V2Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V2Junction, + X2: sts.tuple(() => [V2Junction, V2Junction]), + X3: sts.tuple(() => [V2Junction, V2Junction, V2Junction]), + X4: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction]), + X5: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + X6: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + X7: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + X8: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + } +}) + +export const V2Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V2NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V2NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V2NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: WeakBoundedVec, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V2BodyId, + part: V2BodyPart, + }), + } +}) + +export const V2BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export const V2BodyId: sts.Type = sts.closedEnum(() => { + return { + Administration: sts.unit(), + Defense: sts.unit(), + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: WeakBoundedVec, + Technical: sts.unit(), + Treasury: sts.unit(), + Unit: sts.unit(), + } +}) + +export const WeakBoundedVec = sts.bytes() + +export const V2NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: WeakBoundedVec, + Polkadot: sts.unit(), + } +}) + +export const V2MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V2MultiAsset), + Wild: V2WildMultiAsset, + } +}) + +export const V2WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllOf: sts.enumStruct({ + id: V2AssetId, + fun: V2WildFungibility, + }), + } +}) + +export const V2WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V2WildFungibility = V2WildFungibility_Fungible | V2WildFungibility_NonFungible + +export interface V2WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V2WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V2AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V2MultiLocation, + } +}) + +export type V2WildMultiAsset = V2WildMultiAsset_All | V2WildMultiAsset_AllOf + +export interface V2WildMultiAsset_All { + __kind: 'All' +} + +export interface V2WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V2AssetId + fun: V2WildFungibility +} + +export type V2MultiAssetFilter = V2MultiAssetFilter_Definite | V2MultiAssetFilter_Wild + +export interface V2MultiAssetFilter_Definite { + __kind: 'Definite' + value: V2MultiAsset[] +} + +export interface V2MultiAssetFilter_Wild { + __kind: 'Wild' + value: V2WildMultiAsset +} + +export const V2MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V2Junctions, + } +}) + +export const V2WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: sts.bigint(), + Unlimited: sts.unit(), + } +}) + +export type V2WeightLimit = V2WeightLimit_Limited | V2WeightLimit_Unlimited + +export interface V2WeightLimit_Limited { + __kind: 'Limited' + value: bigint +} + +export interface V2WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V2MultiAsset: sts.Type = sts.struct(() => { + return { + id: V2AssetId, + fun: V2Fungibility, + } +}) + +export const V2Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V2AssetInstance, + } +}) + +export const V2AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V2Instruction = V2Instruction_BuyExecution | V2Instruction_ClaimAsset | V2Instruction_ClearError | V2Instruction_ClearOrigin | V2Instruction_DepositAsset | V2Instruction_DepositReserveAsset | V2Instruction_DescendOrigin | V2Instruction_ExchangeAsset | V2Instruction_HrmpChannelAccepted | V2Instruction_HrmpChannelClosing | V2Instruction_HrmpNewChannelOpenRequest | V2Instruction_InitiateReserveWithdraw | V2Instruction_InitiateTeleport | V2Instruction_QueryHolding | V2Instruction_QueryResponse | V2Instruction_ReceiveTeleportedAsset | V2Instruction_RefundSurplus | V2Instruction_ReportError | V2Instruction_ReserveAssetDeposited | V2Instruction_SetAppendix | V2Instruction_SetErrorHandler | V2Instruction_SubscribeVersion | V2Instruction_Transact | V2Instruction_TransferAsset | V2Instruction_TransferReserveAsset | V2Instruction_Trap | V2Instruction_UnsubscribeVersion | V2Instruction_WithdrawAsset + +export interface V2Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V2MultiAsset + weightLimit: V2WeightLimit +} + +export interface V2Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V2MultiAsset[] + ticket: V2MultiLocation +} + +export interface V2Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V2Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V2Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V2MultiAssetFilter + maxAssets: number + beneficiary: V2MultiLocation +} + +export interface V2Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V2MultiAssetFilter + maxAssets: number + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V2Junctions +} + +export interface V2Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V2MultiAssetFilter + receive: V2MultiAsset[] +} + +export interface V2Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V2Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V2Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V2Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V2MultiAssetFilter + reserve: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V2MultiAssetFilter + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V2MultiLocation + assets: V2MultiAssetFilter + maxResponseWeight: bigint +} + +export interface V2Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface V2Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V2MultiAsset[] +} + +export interface V2Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V2Instruction_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V2MultiLocation + maxResponseWeight: bigint +} + +export interface V2Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V2MultiAsset[] +} + +export interface V2Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V2Instruction[] +} + +export interface V2Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V2Instruction[] +} + +export interface V2Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V2Instruction_Transact { + __kind: 'Transact' + originType: V2OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V2Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V2MultiAsset[] + beneficiary: V2MultiLocation +} + +export interface V2Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V2MultiAsset[] + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V2Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V2MultiAsset[] +} + +export type VersionedXcm = VersionedXcm_V2 | VersionedXcm_V3 + +export interface VersionedXcm_V2 { + __kind: 'V2' + value: V2Instruction[] +} + +export interface VersionedXcm_V3 { + __kind: 'V3' + value: V3Instruction[] +} + +export const V3WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: Weight, + Unlimited: sts.unit(), + } +}) + +export const VersionedMultiAssets: sts.Type = sts.closedEnum(() => { + return { + V2: sts.array(() => V2MultiAsset), + V3: sts.array(() => V3MultiAsset), + } +}) + +export type VersionedMultiAssets = VersionedMultiAssets_V2 | VersionedMultiAssets_V3 + +export interface VersionedMultiAssets_V2 { + __kind: 'V2' + value: V2MultiAsset[] +} + +export interface VersionedMultiAssets_V3 { + __kind: 'V3' + value: V3MultiAsset[] +} + +export const V3MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V3Junctions, + } +}) + +export const VersionedMultiLocation: sts.Type = sts.closedEnum(() => { + return { + V2: V2MultiLocation, + V3: V3MultiLocation, + } +}) + +export type VersionedMultiLocation = VersionedMultiLocation_V2 | VersionedMultiLocation_V3 + +export interface VersionedMultiLocation_V2 { + __kind: 'V2' + value: V2MultiLocation +} + +export interface VersionedMultiLocation_V3 { + __kind: 'V3' + value: V3MultiLocation +} + +export const Type_440: sts.Type = sts.closedEnum(() => { + return { + V2: sts.array(() => Type_443), + V3: sts.array(() => Type_447), + } +}) + +export const Type_447: sts.Type = sts.closedEnum(() => { + return { + AliasOrigin: V3MultiLocation, + BurnAsset: sts.array(() => V3MultiAsset), + BuyExecution: sts.enumStruct({ + fees: V3MultiAsset, + weightLimit: V3WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + ticket: V3MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + ClearTopic: sts.unit(), + ClearTransactStatus: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + beneficiary: V3MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + DescendOrigin: V3Junctions, + ExchangeAsset: sts.enumStruct({ + give: V3MultiAssetFilter, + want: sts.array(() => V3MultiAsset), + maximal: sts.boolean(), + }), + ExpectAsset: sts.array(() => V3MultiAsset), + ExpectError: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + ExpectOrigin: sts.option(() => V3MultiLocation), + ExpectPallet: sts.enumStruct({ + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + crateMajor: sts.number(), + minCrateMinor: sts.number(), + }), + ExpectTransactStatus: V3MaybeErrorCode, + ExportMessage: sts.enumStruct({ + network: V3NetworkId, + destination: V3Junctions, + xcm: sts.array(() => V3Instruction), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V3MultiAssetFilter, + reserve: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + LockAsset: sts.enumStruct({ + asset: V3MultiAsset, + unlocker: V3MultiLocation, + }), + NoteUnlockable: sts.enumStruct({ + asset: V3MultiAsset, + owner: V3MultiLocation, + }), + QueryPallet: sts.enumStruct({ + moduleName: sts.bytes(), + responseInfo: V3QueryResponseInfo, + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V3Response, + maxWeight: Weight, + querier: sts.option(() => V3MultiLocation), + }), + ReceiveTeleportedAsset: sts.array(() => V3MultiAsset), + RefundSurplus: sts.unit(), + ReportError: V3QueryResponseInfo, + ReportHolding: sts.enumStruct({ + responseInfo: V3QueryResponseInfo, + assets: V3MultiAssetFilter, + }), + ReportTransactStatus: V3QueryResponseInfo, + RequestUnlock: sts.enumStruct({ + asset: V3MultiAsset, + locker: V3MultiLocation, + }), + ReserveAssetDeposited: sts.array(() => V3MultiAsset), + SetAppendix: sts.array(() => Type_447), + SetErrorHandler: sts.array(() => Type_447), + SetFeesMode: sts.enumStruct({ + jitWithdraw: sts.boolean(), + }), + SetTopic: sts.bytes(), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: Weight, + }), + Transact: sts.enumStruct({ + originKind: V2OriginKind, + requireWeightAtMost: Weight, + call: Type_444, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + beneficiary: V3MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + Trap: sts.bigint(), + UniversalOrigin: V3Junction, + UnlockAsset: sts.enumStruct({ + asset: V3MultiAsset, + target: V3MultiLocation, + }), + UnpaidExecution: sts.enumStruct({ + weightLimit: V3WeightLimit, + checkOrigin: sts.option(() => V3MultiLocation), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V3MultiAsset), + } +}) + +export const Type_444: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface Type_444 { + encoded: Bytes +} + +export type Type_447 = Type_447_AliasOrigin | Type_447_BurnAsset | Type_447_BuyExecution | Type_447_ClaimAsset | Type_447_ClearError | Type_447_ClearOrigin | Type_447_ClearTopic | Type_447_ClearTransactStatus | Type_447_DepositAsset | Type_447_DepositReserveAsset | Type_447_DescendOrigin | Type_447_ExchangeAsset | Type_447_ExpectAsset | Type_447_ExpectError | Type_447_ExpectOrigin | Type_447_ExpectPallet | Type_447_ExpectTransactStatus | Type_447_ExportMessage | Type_447_HrmpChannelAccepted | Type_447_HrmpChannelClosing | Type_447_HrmpNewChannelOpenRequest | Type_447_InitiateReserveWithdraw | Type_447_InitiateTeleport | Type_447_LockAsset | Type_447_NoteUnlockable | Type_447_QueryPallet | Type_447_QueryResponse | Type_447_ReceiveTeleportedAsset | Type_447_RefundSurplus | Type_447_ReportError | Type_447_ReportHolding | Type_447_ReportTransactStatus | Type_447_RequestUnlock | Type_447_ReserveAssetDeposited | Type_447_SetAppendix | Type_447_SetErrorHandler | Type_447_SetFeesMode | Type_447_SetTopic | Type_447_SubscribeVersion | Type_447_Transact | Type_447_TransferAsset | Type_447_TransferReserveAsset | Type_447_Trap | Type_447_UniversalOrigin | Type_447_UnlockAsset | Type_447_UnpaidExecution | Type_447_UnsubscribeVersion | Type_447_WithdrawAsset + +export interface Type_447_AliasOrigin { + __kind: 'AliasOrigin' + value: V3MultiLocation +} + +export interface Type_447_BurnAsset { + __kind: 'BurnAsset' + value: V3MultiAsset[] +} + +export interface Type_447_BuyExecution { + __kind: 'BuyExecution' + fees: V3MultiAsset + weightLimit: V3WeightLimit +} + +export interface Type_447_ClaimAsset { + __kind: 'ClaimAsset' + assets: V3MultiAsset[] + ticket: V3MultiLocation +} + +export interface Type_447_ClearError { + __kind: 'ClearError' +} + +export interface Type_447_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_447_ClearTopic { + __kind: 'ClearTopic' +} + +export interface Type_447_ClearTransactStatus { + __kind: 'ClearTransactStatus' +} + +export interface Type_447_DepositAsset { + __kind: 'DepositAsset' + assets: V3MultiAssetFilter + beneficiary: V3MultiLocation +} + +export interface Type_447_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_447_DescendOrigin { + __kind: 'DescendOrigin' + value: V3Junctions +} + +export interface Type_447_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V3MultiAssetFilter + want: V3MultiAsset[] + maximal: boolean +} + +export interface Type_447_ExpectAsset { + __kind: 'ExpectAsset' + value: V3MultiAsset[] +} + +export interface Type_447_ExpectError { + __kind: 'ExpectError' + value?: ([number, V3Error] | undefined) +} + +export interface Type_447_ExpectOrigin { + __kind: 'ExpectOrigin' + value?: (V3MultiLocation | undefined) +} + +export interface Type_447_ExpectPallet { + __kind: 'ExpectPallet' + index: number + name: Bytes + moduleName: Bytes + crateMajor: number + minCrateMinor: number +} + +export interface Type_447_ExpectTransactStatus { + __kind: 'ExpectTransactStatus' + value: V3MaybeErrorCode +} + +export interface Type_447_ExportMessage { + __kind: 'ExportMessage' + network: V3NetworkId + destination: V3Junctions + xcm: V3Instruction[] +} + +export interface Type_447_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_447_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_447_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_447_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V3MultiAssetFilter + reserve: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_447_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_447_LockAsset { + __kind: 'LockAsset' + asset: V3MultiAsset + unlocker: V3MultiLocation +} + +export interface Type_447_NoteUnlockable { + __kind: 'NoteUnlockable' + asset: V3MultiAsset + owner: V3MultiLocation +} + +export interface Type_447_QueryPallet { + __kind: 'QueryPallet' + moduleName: Bytes + responseInfo: V3QueryResponseInfo +} + +export interface Type_447_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V3Response + maxWeight: Weight + querier?: (V3MultiLocation | undefined) +} + +export interface Type_447_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V3MultiAsset[] +} + +export interface Type_447_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_447_ReportError { + __kind: 'ReportError' + value: V3QueryResponseInfo +} + +export interface Type_447_ReportHolding { + __kind: 'ReportHolding' + responseInfo: V3QueryResponseInfo + assets: V3MultiAssetFilter +} + +export interface Type_447_ReportTransactStatus { + __kind: 'ReportTransactStatus' + value: V3QueryResponseInfo +} + +export interface Type_447_RequestUnlock { + __kind: 'RequestUnlock' + asset: V3MultiAsset + locker: V3MultiLocation +} + +export interface Type_447_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V3MultiAsset[] +} + +export interface Type_447_SetAppendix { + __kind: 'SetAppendix' + value: Type_447[] +} + +export interface Type_447_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_447[] +} + +export interface Type_447_SetFeesMode { + __kind: 'SetFeesMode' + jitWithdraw: boolean +} + +export interface Type_447_SetTopic { + __kind: 'SetTopic' + value: Bytes +} + +export interface Type_447_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: Weight +} + +export interface Type_447_Transact { + __kind: 'Transact' + originKind: V2OriginKind + requireWeightAtMost: Weight + call: Type_444 +} + +export interface Type_447_TransferAsset { + __kind: 'TransferAsset' + assets: V3MultiAsset[] + beneficiary: V3MultiLocation +} + +export interface Type_447_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V3MultiAsset[] + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_447_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_447_UniversalOrigin { + __kind: 'UniversalOrigin' + value: V3Junction +} + +export interface Type_447_UnlockAsset { + __kind: 'UnlockAsset' + asset: V3MultiAsset + target: V3MultiLocation +} + +export interface Type_447_UnpaidExecution { + __kind: 'UnpaidExecution' + weightLimit: V3WeightLimit + checkOrigin?: (V3MultiLocation | undefined) +} + +export interface Type_447_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_447_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V3MultiAsset[] +} + +export const Type_443: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V2MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + ticket: V2MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V2MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V2Junctions, + ExchangeAsset: sts.enumStruct({ + give: V2MultiAssetFilter, + receive: sts.array(() => V2MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V2MultiAssetFilter, + reserve: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V2MultiAssetFilter, + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + assets: V2MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V2MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V2MultiAsset), + SetAppendix: sts.array(() => Type_443), + SetErrorHandler: sts.array(() => Type_443), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V2OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_444, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + beneficiary: V2MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V2MultiAsset), + } +}) + +export type Type_443 = Type_443_BuyExecution | Type_443_ClaimAsset | Type_443_ClearError | Type_443_ClearOrigin | Type_443_DepositAsset | Type_443_DepositReserveAsset | Type_443_DescendOrigin | Type_443_ExchangeAsset | Type_443_HrmpChannelAccepted | Type_443_HrmpChannelClosing | Type_443_HrmpNewChannelOpenRequest | Type_443_InitiateReserveWithdraw | Type_443_InitiateTeleport | Type_443_QueryHolding | Type_443_QueryResponse | Type_443_ReceiveTeleportedAsset | Type_443_RefundSurplus | Type_443_ReportError | Type_443_ReserveAssetDeposited | Type_443_SetAppendix | Type_443_SetErrorHandler | Type_443_SubscribeVersion | Type_443_Transact | Type_443_TransferAsset | Type_443_TransferReserveAsset | Type_443_Trap | Type_443_UnsubscribeVersion | Type_443_WithdrawAsset + +export interface Type_443_BuyExecution { + __kind: 'BuyExecution' + fees: V2MultiAsset + weightLimit: V2WeightLimit +} + +export interface Type_443_ClaimAsset { + __kind: 'ClaimAsset' + assets: V2MultiAsset[] + ticket: V2MultiLocation +} + +export interface Type_443_ClearError { + __kind: 'ClearError' +} + +export interface Type_443_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_443_DepositAsset { + __kind: 'DepositAsset' + assets: V2MultiAssetFilter + maxAssets: number + beneficiary: V2MultiLocation +} + +export interface Type_443_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V2MultiAssetFilter + maxAssets: number + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_443_DescendOrigin { + __kind: 'DescendOrigin' + value: V2Junctions +} + +export interface Type_443_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V2MultiAssetFilter + receive: V2MultiAsset[] +} + +export interface Type_443_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_443_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_443_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_443_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V2MultiAssetFilter + reserve: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_443_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V2MultiAssetFilter + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_443_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V2MultiLocation + assets: V2MultiAssetFilter + maxResponseWeight: bigint +} + +export interface Type_443_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface Type_443_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V2MultiAsset[] +} + +export interface Type_443_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_443_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V2MultiLocation + maxResponseWeight: bigint +} + +export interface Type_443_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V2MultiAsset[] +} + +export interface Type_443_SetAppendix { + __kind: 'SetAppendix' + value: Type_443[] +} + +export interface Type_443_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_443[] +} + +export interface Type_443_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_443_Transact { + __kind: 'Transact' + originType: V2OriginKind + requireWeightAtMost: bigint + call: Type_444 +} + +export interface Type_443_TransferAsset { + __kind: 'TransferAsset' + assets: V2MultiAsset[] + beneficiary: V2MultiLocation +} + +export interface Type_443_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V2MultiAsset[] + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_443_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_443_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_443_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V2MultiAsset[] +} + +export type Type_440 = Type_440_V2 | Type_440_V3 + +export interface Type_440_V2 { + __kind: 'V2' + value: Type_443[] +} + +export interface Type_440_V3 { + __kind: 'V3' + value: Type_447[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type XcmPalletCall = XcmPalletCall_execute | XcmPalletCall_force_default_xcm_version | XcmPalletCall_force_subscribe_version_notify | XcmPalletCall_force_unsubscribe_version_notify | XcmPalletCall_force_xcm_version | XcmPalletCall_limited_reserve_transfer_assets | XcmPalletCall_limited_teleport_assets | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets + +/** + * Execute an XCM message from a local, signed, origin. + * + * An event is deposited indicating whether `msg` could be executed completely or only + * partially. + * + * No more than `max_weight` will be used in its attempted execution. If this is less than the + * maximum amount of weight that the message could take to be executed, then no execution + * attempt will be made. + * + * NOTE: A successful return to this does *not* imply that the `msg` was executed successfully + * to completion; only that *some* of it was executed. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Type_440 + maxWeight: Weight +} + +/** + * Set a safe XCM version (the version that XCM should be encoded with if the most recent + * version a destination can accept is unknown). + * + * - `origin`: Must be Root. + * - `maybe_xcm_version`: The default XCM encoding version, or `None` to disable. + */ +export interface XcmPalletCall_force_default_xcm_version { + __kind: 'force_default_xcm_version' + maybeXcmVersion?: (number | undefined) +} + +/** + * Ask a location to notify us regarding their XCM version and any changes to it. + * + * - `origin`: Must be Root. + * - `location`: The location to which we should subscribe for XCM version notifications. + */ +export interface XcmPalletCall_force_subscribe_version_notify { + __kind: 'force_subscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Require that a particular destination should no longer notify us regarding any XCM + * version changes. + * + * - `origin`: Must be Root. + * - `location`: The location to which we are currently subscribed for XCM version + * notifications which we no longer desire. + */ +export interface XcmPalletCall_force_unsubscribe_version_notify { + __kind: 'force_unsubscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Extoll that a particular destination can be communicated with through a particular + * version of XCM. + * + * - `origin`: Must be Root. + * - `location`: The destination that is being described. + * - `xcm_version`: The latest version of XCM that `location` supports. + */ +export interface XcmPalletCall_force_xcm_version { + __kind: 'force_xcm_version' + location: V3MultiLocation + xcmVersion: number +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination + * chain and forward a notification XCM. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight + * is needed than `weight_limit`, then the operation will fail and the assets send may be + * at risk. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_reserve_transfer_assets { + __kind: 'limited_reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V3WeightLimit +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight + * is needed than `weight_limit`, then the operation will fail and the assets send may be + * at risk. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_teleport_assets { + __kind: 'limited_teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V3WeightLimit +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination + * chain and forward a notification XCM. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, + * with all fees taken as needed from the asset. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +export interface XcmPalletCall_send { + __kind: 'send' + dest: VersionedMultiLocation + message: VersionedXcm +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, + * with all fees taken as needed from the asset. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const WhitelistCall: sts.Type = sts.closedEnum(() => { + return { + dispatch_whitelisted_call: sts.enumStruct({ + callHash: H256, + callEncodedLen: sts.number(), + callWeightWitness: Weight, + }), + dispatch_whitelisted_call_with_preimage: sts.enumStruct({ + call: Call, + }), + remove_whitelisted_call: sts.enumStruct({ + callHash: H256, + }), + whitelist_call: sts.enumStruct({ + callHash: H256, + }), + } +}) + +export const H256 = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type WhitelistCall = WhitelistCall_dispatch_whitelisted_call | WhitelistCall_dispatch_whitelisted_call_with_preimage | WhitelistCall_remove_whitelisted_call | WhitelistCall_whitelist_call + +export interface WhitelistCall_dispatch_whitelisted_call { + __kind: 'dispatch_whitelisted_call' + callHash: H256 + callEncodedLen: number + callWeightWitness: Weight +} + +export interface WhitelistCall_dispatch_whitelisted_call_with_preimage { + __kind: 'dispatch_whitelisted_call_with_preimage' + call: Call +} + +export interface WhitelistCall_remove_whitelisted_call { + __kind: 'remove_whitelisted_call' + callHash: H256 +} + +export interface WhitelistCall_whitelist_call { + __kind: 'whitelist_call' + callHash: H256 +} + +export type H256 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VoterListCall: sts.Type = sts.closedEnum(() => { + return { + put_in_front_of: sts.enumStruct({ + lighter: MultiAddress, + }), + rebag: sts.enumStruct({ + dislocated: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VoterListCall = VoterListCall_put_in_front_of | VoterListCall_rebag + +/** + * Move the caller's Id directly in front of `lighter`. + * + * The dispatch origin for this call must be _Signed_ and can only be called by the Id of + * the account going in front of `lighter`. + * + * Only works if + * - both nodes are within the same bag, + * - and `origin` has a greater `Score` than `lighter`. + */ +export interface VoterListCall_put_in_front_of { + __kind: 'put_in_front_of' + lighter: MultiAddress +} + +/** + * Declare that some `dislocated` account has, through rewards or penalties, sufficiently + * changed its score that it should properly fall into a different bag than its current + * one. + * + * Anyone can call this function about any potentially dislocated account. + * + * Will always update the stored score of `dislocated` to the correct score, based on + * `ScoreProvider`. + * + * If `dislocated` does not exists, it returns an error. + */ +export interface VoterListCall_rebag { + __kind: 'rebag' + dislocated: MultiAddress +} + +export type MultiAddress = MultiAddress_Address20 | MultiAddress_Address32 | MultiAddress_Id | MultiAddress_Index | MultiAddress_Raw + +export interface MultiAddress_Address20 { + __kind: 'Address20' + value: Bytes +} + +export interface MultiAddress_Address32 { + __kind: 'Address32' + value: Bytes +} + +export interface MultiAddress_Id { + __kind: 'Id' + value: AccountId32 +} + +export interface MultiAddress_Index { + __kind: 'Index' +} + +export interface MultiAddress_Raw { + __kind: 'Raw' + value: Bytes +} + +export type AccountId32 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: MultiAddress, + target: MultiAddress, + schedule: VestingInfo, + }), + merge_schedules: sts.enumStruct({ + schedule1Index: sts.number(), + schedule2Index: sts.number(), + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: MultiAddress, + }), + vested_transfer: sts.enumStruct({ + target: MultiAddress, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: sts.bigint(), + perBlock: sts.bigint(), + startingBlock: sts.number(), + } +}) + +export interface VestingInfo { + locked: bigint + perBlock: bigint + startingBlock: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_merge_schedules | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 4 Reads, 4 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account + * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account + * # + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: MultiAddress + target: MultiAddress + schedule: VestingInfo +} + +/** + * Merge two vesting schedules together, creating a new vesting schedule that unlocks over + * the highest possible start and end blocks. If both schedules have already started the + * current block will be used as the schedule start; with the caveat that if one schedule + * is finished by the current block, the other will be treated as the new merged schedule, + * unmodified. + * + * NOTE: If `schedule1_index == schedule2_index` this is a no-op. + * NOTE: This will unlock all schedules through the current block prior to merging. + * NOTE: If both schedules have ended by the current block, no new schedule will be created + * and both will be removed. + * + * Merged schedule attributes: + * - `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block, + * current_block)`. + * - `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`. + * - `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`. + * + * The dispatch origin for this call must be _Signed_. + * + * - `schedule1_index`: index of the first schedule to merge. + * - `schedule2_index`: index of the second schedule to merge. + */ +export interface VestingCall_merge_schedules { + __kind: 'merge_schedules' + schedule1Index: number + schedule2Index: number +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 2 Reads, 2 Writes + * - Reads: Vesting Storage, Balances Locks, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, [Sender Account] + * # + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: MultiAddress +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account receiving the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account] + * # + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: MultiAddress + schedule: VestingInfo +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Call, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Call), + }), + dispatch_as: sts.enumStruct({ + asOrigin: OriginCaller, + call: Call, + }), + force_batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + with_weight: sts.enumStruct({ + call: Call, + weight: Weight, + }), + } +}) + +export const OriginCaller: sts.Type = sts.closedEnum(() => { + return { + Council: Type_150, + Origins: Origin, + ParachainsOrigin: Type_153, + TechnicalCommittee: Type_151, + Void: Void, + XcmPallet: Type_155, + system: RawOrigin, + } +}) + +export const RawOrigin: sts.Type = sts.closedEnum(() => { + return { + None: sts.unit(), + Root: sts.unit(), + Signed: AccountId32, + } +}) + +export type RawOrigin = RawOrigin_None | RawOrigin_Root | RawOrigin_Signed + +export interface RawOrigin_None { + __kind: 'None' +} + +export interface RawOrigin_Root { + __kind: 'Root' +} + +export interface RawOrigin_Signed { + __kind: 'Signed' + value: AccountId32 +} + +export const Type_155: sts.Type = sts.closedEnum(() => { + return { + Response: V3MultiLocation, + Xcm: V3MultiLocation, + } +}) + +export type Type_155 = Type_155_Response | Type_155_Xcm + +export interface Type_155_Response { + __kind: 'Response' + value: V3MultiLocation +} + +export interface Type_155_Xcm { + __kind: 'Xcm' + value: V3MultiLocation +} + +export const Void: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Void = never + +export const Type_151: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_151 = Type_151_Member | Type_151_Members | Type_151__Phantom + +export interface Type_151_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_151_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_151__Phantom { + __kind: '_Phantom' +} + +export const Type_153: sts.Type = sts.closedEnum(() => { + return { + Parachain: Id, + } +}) + +export const Id = sts.number() + +export type Type_153 = Type_153_Parachain + +export interface Type_153_Parachain { + __kind: 'Parachain' + value: Id +} + +export type Id = number + +export const Origin: sts.Type = sts.closedEnum(() => { + return { + AuctionAdmin: sts.unit(), + BigSpender: sts.unit(), + BigTipper: sts.unit(), + Fellows: sts.unit(), + Fellowship1Dan: sts.unit(), + Fellowship2Dan: sts.unit(), + Fellowship3Dan: sts.unit(), + Fellowship4Dan: sts.unit(), + Fellowship5Dan: sts.unit(), + Fellowship6Dan: sts.unit(), + Fellowship7Dan: sts.unit(), + Fellowship8Dan: sts.unit(), + Fellowship9Dan: sts.unit(), + FellowshipAdmin: sts.unit(), + FellowshipExperts: sts.unit(), + FellowshipInitiates: sts.unit(), + FellowshipMasters: sts.unit(), + GeneralAdmin: sts.unit(), + LeaseAdmin: sts.unit(), + MediumSpender: sts.unit(), + ReferendumCanceller: sts.unit(), + ReferendumKiller: sts.unit(), + SmallSpender: sts.unit(), + SmallTipper: sts.unit(), + StakingAdmin: sts.unit(), + Treasurer: sts.unit(), + WhitelistedCaller: sts.unit(), + } +}) + +export type Origin = Origin_AuctionAdmin | Origin_BigSpender | Origin_BigTipper | Origin_Fellows | Origin_Fellowship1Dan | Origin_Fellowship2Dan | Origin_Fellowship3Dan | Origin_Fellowship4Dan | Origin_Fellowship5Dan | Origin_Fellowship6Dan | Origin_Fellowship7Dan | Origin_Fellowship8Dan | Origin_Fellowship9Dan | Origin_FellowshipAdmin | Origin_FellowshipExperts | Origin_FellowshipInitiates | Origin_FellowshipMasters | Origin_GeneralAdmin | Origin_LeaseAdmin | Origin_MediumSpender | Origin_ReferendumCanceller | Origin_ReferendumKiller | Origin_SmallSpender | Origin_SmallTipper | Origin_StakingAdmin | Origin_Treasurer | Origin_WhitelistedCaller + +export interface Origin_AuctionAdmin { + __kind: 'AuctionAdmin' +} + +export interface Origin_BigSpender { + __kind: 'BigSpender' +} + +export interface Origin_BigTipper { + __kind: 'BigTipper' +} + +export interface Origin_Fellows { + __kind: 'Fellows' +} + +export interface Origin_Fellowship1Dan { + __kind: 'Fellowship1Dan' +} + +export interface Origin_Fellowship2Dan { + __kind: 'Fellowship2Dan' +} + +export interface Origin_Fellowship3Dan { + __kind: 'Fellowship3Dan' +} + +export interface Origin_Fellowship4Dan { + __kind: 'Fellowship4Dan' +} + +export interface Origin_Fellowship5Dan { + __kind: 'Fellowship5Dan' +} + +export interface Origin_Fellowship6Dan { + __kind: 'Fellowship6Dan' +} + +export interface Origin_Fellowship7Dan { + __kind: 'Fellowship7Dan' +} + +export interface Origin_Fellowship8Dan { + __kind: 'Fellowship8Dan' +} + +export interface Origin_Fellowship9Dan { + __kind: 'Fellowship9Dan' +} + +export interface Origin_FellowshipAdmin { + __kind: 'FellowshipAdmin' +} + +export interface Origin_FellowshipExperts { + __kind: 'FellowshipExperts' +} + +export interface Origin_FellowshipInitiates { + __kind: 'FellowshipInitiates' +} + +export interface Origin_FellowshipMasters { + __kind: 'FellowshipMasters' +} + +export interface Origin_GeneralAdmin { + __kind: 'GeneralAdmin' +} + +export interface Origin_LeaseAdmin { + __kind: 'LeaseAdmin' +} + +export interface Origin_MediumSpender { + __kind: 'MediumSpender' +} + +export interface Origin_ReferendumCanceller { + __kind: 'ReferendumCanceller' +} + +export interface Origin_ReferendumKiller { + __kind: 'ReferendumKiller' +} + +export interface Origin_SmallSpender { + __kind: 'SmallSpender' +} + +export interface Origin_SmallTipper { + __kind: 'SmallTipper' +} + +export interface Origin_StakingAdmin { + __kind: 'StakingAdmin' +} + +export interface Origin_Treasurer { + __kind: 'Treasurer' +} + +export interface Origin_WhitelistedCaller { + __kind: 'WhitelistedCaller' +} + +export const Type_150: sts.Type = sts.closedEnum(() => { + return { + Member: AccountId32, + Members: sts.tuple(() => [sts.number(), sts.number()]), + _Phantom: sts.unit(), + } +}) + +export type Type_150 = Type_150_Member | Type_150_Members | Type_150__Phantom + +export interface Type_150_Member { + __kind: 'Member' + value: AccountId32 +} + +export interface Type_150_Members { + __kind: 'Members' + value: [number, number] +} + +export interface Type_150__Phantom { + __kind: '_Phantom' +} + +export type OriginCaller = OriginCaller_Council | OriginCaller_Origins | OriginCaller_ParachainsOrigin | OriginCaller_TechnicalCommittee | OriginCaller_Void | OriginCaller_XcmPallet | OriginCaller_system + +export interface OriginCaller_Council { + __kind: 'Council' + value: Type_150 +} + +export interface OriginCaller_Origins { + __kind: 'Origins' + value: Origin +} + +export interface OriginCaller_ParachainsOrigin { + __kind: 'ParachainsOrigin' + value: Type_153 +} + +export interface OriginCaller_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: Type_151 +} + +export interface OriginCaller_Void { + __kind: 'Void' + value: Void +} + +export interface OriginCaller_XcmPallet { + __kind: 'XcmPallet' + value: Type_155 +} + +export interface OriginCaller_system { + __kind: 'system' + value: RawOrigin +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all | UtilityCall_dispatch_as | UtilityCall_force_batch | UtilityCall_with_weight + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Call +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin except `None`. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then the calls are dispatched without checking origin filter. (This + * includes bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Call[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin except `None`. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then the calls are dispatched without checking origin filter. (This + * includes bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Call[] +} + +/** + * Dispatches a function call with a provided origin. + * + * The dispatch origin for this call must be _Root_. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB write (event). + * - Weight of derivative `call` execution + T::WeightInfo::dispatch_as(). + * # + */ +export interface UtilityCall_dispatch_as { + __kind: 'dispatch_as' + asOrigin: OriginCaller + call: Call +} + +/** + * Send a batch of dispatch calls. + * Unlike `batch`, it allows errors and won't interrupt. + * + * May be called from any origin except `None`. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then the calls are dispatch without checking origin filter. (This + * includes bypassing `frame_system::Config::BaseCallFilter`). + * + * # + * - Complexity: O(C) where C is the number of calls to be batched. + * # + */ +export interface UtilityCall_force_batch { + __kind: 'force_batch' + calls: Call[] +} + +/** + * Dispatch a function call with a specified weight. + * + * This function does not check the weight of the call, and instead allows the + * Root origin to specify the weight of the call. + * + * The dispatch origin for this call must be _Root_. + */ +export interface UtilityCall_with_weight { + __kind: 'with_weight' + call: Call + weight: Weight +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UmpCall: sts.Type = sts.closedEnum(() => { + return { + service_overweight: sts.enumStruct({ + index: sts.bigint(), + weightLimit: Weight, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UmpCall = UmpCall_service_overweight + +/** + * Service a single overweight upward message. + * + * - `origin`: Must pass `ExecuteOverweightOrigin`. + * - `index`: The index of the overweight message to service. + * - `weight_limit`: The amount of weight that message execution may take. + * + * Errors: + * - `UnknownMessageIndex`: Message of `index` is unknown. + * - `WeightOverLimit`: Message execution may use greater than `weight_limit`. + * + * Events: + * - `OverweightServiced`: On success. + */ +export interface UmpCall_service_overweight { + __kind: 'service_overweight' + index: bigint + weightLimit: Weight +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: MultiAddress, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + remove_approval: sts.enumStruct({ + proposalId: sts.number(), + }), + spend: sts.enumStruct({ + amount: sts.bigint(), + beneficiary: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_remove_approval | TreasuryCall_spend + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: MultiAddress +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Force a previously approved proposal to be removed from the approval queue. + * The original deposit will no longer be returned. + * + * May only be called from `T::RejectOrigin`. + * - `proposal_id`: The index of a proposal + * + * # + * - Complexity: O(A) where `A` is the number of approvals + * - Db reads and writes: `Approvals` + * # + * + * Errors: + * - `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue, + * i.e., the proposal has not been approved. This could also mean the proposal does not + * exist altogether, thus there is no way it would have been approved in the first place. + */ +export interface TreasuryCall_remove_approval { + __kind: 'remove_approval' + proposalId: number +} + +/** + * Propose and approve a spend of treasury funds. + * + * - `origin`: Must be `SpendOrigin` with the `Success` value being at least `amount`. + * - `amount`: The amount to be transferred from the treasury to the `beneficiary`. + * - `beneficiary`: The destination account for the transfer. + * + * NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the + * beneficiary. + */ +export interface TreasuryCall_spend { + __kind: 'spend' + amount: bigint + beneficiary: MultiAddress +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TipsCall: sts.Type = sts.closedEnum(() => { + return { + close_tip: sts.enumStruct({ + hash: H256, + }), + report_awesome: sts.enumStruct({ + reason: sts.bytes(), + who: MultiAddress, + }), + retract_tip: sts.enumStruct({ + hash: H256, + }), + slash_tip: sts.enumStruct({ + hash: H256, + }), + tip: sts.enumStruct({ + hash: H256, + tipValue: sts.bigint(), + }), + tip_new: sts.enumStruct({ + reason: sts.bytes(), + who: MultiAddress, + tipValue: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TipsCall = TipsCall_close_tip | TipsCall_report_awesome | TipsCall_retract_tip | TipsCall_slash_tip | TipsCall_tip | TipsCall_tip_new + +/** + * Close and payout a tip. + * + * The dispatch origin for this call must be _Signed_. + * + * The tip identified by `hash` must have finished its countdown period. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost + * depends on the implementation of `T::Tippers`. + * - DbReads: `Tips`, `Tippers`, `tip finder` + * - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder` + * # + */ +export interface TipsCall_close_tip { + __kind: 'close_tip' + hash: H256 +} + +/** + * Report something `reason` that deserves a tip and claim any eventual the finder's fee. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R)` where `R` length of `reason`. + * - encoding and hashing of 'reason' + * - DbReads: `Reasons`, `Tips` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_report_awesome { + __kind: 'report_awesome' + reason: Bytes + who: MultiAddress +} + +/** + * Retract a prior tip-report from `report_awesome`, and cancel the process of tipping. + * + * If successful, the original deposit will be unreserved. + * + * The dispatch origin for this call must be _Signed_ and the tip identified by `hash` + * must have been reported by the signing account through `report_awesome` (and not + * through `tip_new`). + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the original tip `reason` and the beneficiary account ID. + * + * Emits `TipRetracted` if successful. + * + * # + * - Complexity: `O(1)` + * - Depends on the length of `T::Hash` which is fixed. + * - DbReads: `Tips`, `origin account` + * - DbWrites: `Reasons`, `Tips`, `origin account` + * # + */ +export interface TipsCall_retract_tip { + __kind: 'retract_tip' + hash: H256 +} + +/** + * Remove and slash an already-open tip. + * + * May only be called from `T::RejectOrigin`. + * + * As a result, the finder is slashed and the deposits are lost. + * + * Emits `TipSlashed` if successful. + * + * # + * `T` is charged as upper bound given by `ContainsLengthBound`. + * The actual cost depends on the implementation of `T::Tippers`. + * # + */ +export interface TipsCall_slash_tip { + __kind: 'slash_tip' + hash: H256 +} + +/** + * Declare a tip value for an already-open tip. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `hash`: The identity of the open tip for which a tip value is declared. This is formed + * as the hash of the tuple of the hash of the original tip `reason` and the beneficiary + * account ID. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `TipClosing` if the threshold of tippers has been reached and the countdown period + * has started. + * + * # + * - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length + * `T`, insert tip and check closing, `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of `T::Tippers`. + * + * Actually weight could be lower as it depends on how many tips are in `OpenTip` but it + * is weighted as if almost full i.e of length `T-1`. + * - DbReads: `Tippers`, `Tips` + * - DbWrites: `Tips` + * # + */ +export interface TipsCall_tip { + __kind: 'tip' + hash: H256 + tipValue: bigint +} + +/** + * Give a tip for something new; no finder's fee will be taken. + * + * The dispatch origin for this call must be _Signed_ and the signing account must be a + * member of the `Tippers` set. + * + * - `reason`: The reason for, or the thing that deserves, the tip; generally this will be + * a UTF-8-encoded URL. + * - `who`: The account which should be credited for the tip. + * - `tip_value`: The amount of tip that the sender would like to give. The median tip + * value of active tippers will be given to the `who`. + * + * Emits `NewTip` if successful. + * + * # + * - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. + * - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by + * `ContainsLengthBound`. The actual cost depends on the implementation of + * `T::Tippers`. + * - `O(R)`: hashing and encoding of reason of length `R` + * - DbReads: `Tippers`, `Reasons` + * - DbWrites: `Reasons`, `Tips` + * # + */ +export interface TipsCall_tip_new { + __kind: 'tip_new' + reason: Bytes + who: MultiAddress + tipValue: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * # + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in + * `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + * # + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalMembershipCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: MultiAddress, + }), + change_key: sts.enumStruct({ + new: MultiAddress, + }), + clear_prime: sts.unit(), + remove_member: sts.enumStruct({ + who: MultiAddress, + }), + reset_members: sts.enumStruct({ + members: sts.array(() => AccountId32), + }), + set_prime: sts.enumStruct({ + who: MultiAddress, + }), + swap_member: sts.enumStruct({ + remove: MultiAddress, + add: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalMembershipCall = TechnicalMembershipCall_add_member | TechnicalMembershipCall_change_key | TechnicalMembershipCall_clear_prime | TechnicalMembershipCall_remove_member | TechnicalMembershipCall_reset_members | TechnicalMembershipCall_set_prime | TechnicalMembershipCall_swap_member + +/** + * Add a member `who` to the set. + * + * May only be called from `T::AddOrigin`. + */ +export interface TechnicalMembershipCall_add_member { + __kind: 'add_member' + who: MultiAddress +} + +/** + * Swap out the sending member for some other key `new`. + * + * May only be called from `Signed` origin of a current member. + * + * Prime membership is passed from the origin account to `new`, if extant. + */ +export interface TechnicalMembershipCall_change_key { + __kind: 'change_key' + new: MultiAddress +} + +/** + * Remove the prime member if it exists. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_clear_prime { + __kind: 'clear_prime' +} + +/** + * Remove a member `who` from the set. + * + * May only be called from `T::RemoveOrigin`. + */ +export interface TechnicalMembershipCall_remove_member { + __kind: 'remove_member' + who: MultiAddress +} + +/** + * Change the membership to a new set, disregarding the existing membership. Be nice and + * pass `members` pre-sorted. + * + * May only be called from `T::ResetOrigin`. + */ +export interface TechnicalMembershipCall_reset_members { + __kind: 'reset_members' + members: AccountId32[] +} + +/** + * Set the prime member. Must be a current member. + * + * May only be called from `T::PrimeOrigin`. + */ +export interface TechnicalMembershipCall_set_prime { + __kind: 'set_prime' + who: MultiAddress +} + +/** + * Swap out one member `remove` for another `add`. + * + * May only be called from `T::SwapOrigin`. + * + * Prime membership is *not* passed from `remove` to `add`, if extant. + */ +export interface TechnicalMembershipCall_swap_member { + __kind: 'swap_member' + remove: MultiAddress + add: MultiAddress +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TechnicalCommitteeCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: Weight, + lengthBound: sts.number(), + }), + close_old_weight: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TechnicalCommitteeCall = TechnicalCommitteeCall_close | TechnicalCommitteeCall_close_old_weight | TechnicalCommitteeCall_disapprove_proposal | TechnicalCommitteeCall_execute | TechnicalCommitteeCall_propose | TechnicalCommitteeCall_set_members | TechnicalCommitteeCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: Weight + lengthBound: number +} + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface TechnicalCommitteeCall_close_old_weight { + __kind: 'close_old_weight' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechnicalCommitteeCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface TechnicalCommitteeCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface TechnicalCommitteeCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + kill_prefix: sts.enumStruct({ + prefix: sts.bytes(), + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => sts.bytes()), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SystemCall = SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Bytes + subkeys: number +} + +/** + * Kill some items from storage. + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Bytes[] +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Make some on-chain remark and emit event. + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * Set the new runtime code. + * + * # + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is + * expensive). + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime, but generally this is very + * expensive. We will treat this as a full block. + * # + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * # + * - `O(C)` where `C` length of `code` + * - 1 storage write (codec `O(C)`). + * - 1 digest item. + * - 1 event. + * The weight of this function is dependent on the runtime. We will treat this as a full + * block. # + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: [Bytes, Bytes][] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: MultiAddress, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: sts.number(), + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + controller: AccountId32, + }), + force_apply_min_commission: sts.enumStruct({ + validatorStash: AccountId32, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => MultiAddress), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => MultiAddress), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + }), + reap_stash: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: MultiAddress, + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId32), + }), + set_min_commission: sts.enumStruct({ + new: Perbill, + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_staking_configs: sts.enumStruct({ + minNominatorBond: ConfigOp, + minValidatorBond: ConfigOp, + maxNominatorCount: Type_102, + maxValidatorCount: Type_102, + chillThreshold: Type_103, + minCommission: Type_104, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export const Type_104: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export type Type_104 = Type_104_Noop | Type_104_Remove | Type_104_Set + +export interface Type_104_Noop { + __kind: 'Noop' +} + +export interface Type_104_Remove { + __kind: 'Remove' +} + +export interface Type_104_Set { + __kind: 'Set' + value: Perbill +} + +export type Perbill = number + +export const Type_103: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Percent, + } +}) + +export type Type_103 = Type_103_Noop | Type_103_Remove | Type_103_Set + +export interface Type_103_Noop { + __kind: 'Noop' +} + +export interface Type_103_Remove { + __kind: 'Remove' +} + +export interface Type_103_Set { + __kind: 'Set' + value: Percent +} + +export type Percent = number + +export const Type_102: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_102 = Type_102_Noop | Type_102_Remove | Type_102_Set + +export interface Type_102_Noop { + __kind: 'Noop' +} + +export interface Type_102_Remove { + __kind: 'Remove' +} + +export interface Type_102_Set { + __kind: 'Set' + value: number +} + +export const ConfigOp: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type ConfigOp = ConfigOp_Noop | ConfigOp_Remove | ConfigOp_Set + +export interface ConfigOp_Noop { + __kind: 'Noop' +} + +export interface ConfigOp_Remove { + __kind: 'Remove' +} + +export interface ConfigOp_Set { + __kind: 'Set' + value: bigint +} + +export const Perbill = sts.number() + +export const Percent = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_force_apply_min_commission | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_invulnerables | StakingCall_set_min_commission | StakingCall_set_payee | StakingCall_set_staking_configs | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * # + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + * ------------------ + * # + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: MultiAddress + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose + * any limitation on the amount that can be added. + * + * Emits `Bonded`. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - O(1). + * # + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::AdminOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: number + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + * # + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Declare a `controller` to stop participating as either a validator or nominator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_, but can be called by anyone. + * + * If the caller is the same as the controller being targeted, then no further checks are + * enforced, and this function behaves just like `chill`. + * + * If the caller is different than the controller being targeted, the following conditions + * must be met: + * + * * `controller` must belong to a nominator who has become non-decodable, + * + * Or: + * + * * A `ChillThreshold` must be set and checked which defines how close to the max + * nominators or validators we must reach before users can start chilling one-another. + * * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine + * how close we are to the threshold. + * * A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines + * if this is a person that should be chilled because they have not met the threshold + * bond required. + * + * This can be helpful if bond requirements are updated, and we need to remove old users + * who do not satisfy these requirements. + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + controller: AccountId32 +} + +/** + * Force a validator to have at least the minimum commission. This will not affect a + * validator who already has a commission greater than or equal to the minimum. Any account + * can call this. + */ +export interface StakingCall_force_apply_min_commission { + __kind: 'force_apply_min_commission' + validatorStash: AccountId32 +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write ForceEra + * # + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * Thus the election process may be ongoing when this is called. In this case the + * election will continue until the next era is triggered. + * + * # + * - No arguments. + * - Weight: O(1) + * - Write: ForceEra + * # + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators upto maximum of + * `ElectionProviderBase::MaxWinners`. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: MultiAddress[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (T::MaxNominations). + * - Both the reads and writes follow a similar pattern. + * # + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: MultiAddress[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * # + * - Time complexity: at most O(MaxNominatorRewardedPerValidator). + * - Contains a limited number of reads and writes. + * ----------- + * N is the Number of payouts for the validator (including the validator) + * Weight: + * - Reward Destination Staked: O(N) + * - Reward Destination Controller (Creating): O(N) + * + * NOTE: weights are assuming that payouts are made to alive stash account (Staked). + * Paying even a dead controller is cheaper weight-wise. We don't do any refunds here. + * # + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId32 + era: number +} + +/** + * Remove all data structures concerning a staker/stash once it is at a state where it can + * be considered `dust` in the staking system. The requirements are: + * + * 1. the `total_balance` of the stash is below existential deposit. + * 2. or, the `ledger.total` of the stash is below existential deposit. + * + * The former can happen in cases like a slash; the latter when a fully unbonded account + * is still receiving staking rewards in `RewardDestination::Staked`. + * + * It can be called by anyone, as long as `stash` meets the above requirements. + * + * Refunds the transaction fees upon successful execution. + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller. + * + * # + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MaxUnlockingChunks`. + * - Storage changes: Can't increase storage, only decrease it. + * # + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor upto maximum of + * `ElectionProviderBase::MaxWinners`. + * + * The dispatch origin must be Root. + * + * # + * Same as [`Self::set_validator_count`]. + * # + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt instantly (as soon as this function is completed successfully). + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * ---------- + * Weight: O(1) + * DB Weight: + * - Read: Bonded, Ledger New Controller, Ledger Old Controller + * - Write: Bonded, Ledger New Controller, Ledger Old Controller + * # + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: MultiAddress +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId32[] +} + +/** + * Sets the minimum amount of commission that each validators must maintain. + * + * This call has lower privilege requirements than `set_staking_config` and can be called + * by the `T::AdminOrigin`. Root can always call this. + */ +export interface StakingCall_set_min_commission { + __kind: 'set_min_commission' + new: Perbill +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt instantly (as soon as this function is completed successfully). + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * # + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + * - Weight: O(1) + * - DB Weight: + * - Read: Ledger + * - Write: Payee + * # + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Update the various staking configurations . + * + * * `min_nominator_bond`: The minimum active bond needed to be a nominator. + * * `min_validator_bond`: The minimum active bond needed to be a validator. + * * `max_nominator_count`: The max number of users who can be a nominator at once. When + * set to `None`, no limit is enforced. + * * `max_validator_count`: The max number of users who can be a validator at once. When + * set to `None`, no limit is enforced. + * * `chill_threshold`: The ratio of `max_nominator_count` or `max_validator_count` which + * should be filled in order for the `chill_other` transaction to work. + * * `min_commission`: The minimum amount of commission that each validators must maintain. + * This is checked only upon calling `validate`. Existing validators are not affected. + * + * RuntimeOrigin must be Root to call this function. + * + * NOTE: Existing nominators and validators will not be affected by this update. + * to kick people under the new limits, `chill_other` should be called. + */ +export interface StakingCall_set_staking_configs { + __kind: 'set_staking_configs' + minNominatorBond: ConfigOp + minValidatorBond: ConfigOp + maxNominatorCount: Type_102 + maxValidatorCount: Type_102 + chillThreshold: Type_103 + minCommission: Type_104 +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * # + * Weight: O(1) + * Write: Validator Count + * # + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`) + * can co-exists at the same time. If there are no unlocking chunks slots available + * [`Call::withdraw_unbonded`] is called to remove some of the chunks (if possible). + * + * If a user encounters the `InsufficientBond` error when calling this extrinsic, + * they should call `chill` first in order to free up their bonded funds. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * # + * Complexity O(S) where S is the number of slashing spans to remove + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + * # + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: sts.bigint(), + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: MultiAddress, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: MultiAddress, + judgement: Type_220, + }), + judge_suspended_member: sts.enumStruct({ + who: MultiAddress, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: MultiAddress, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: MultiAddress, + value: sts.bigint(), + tip: sts.bigint(), + }), + } +}) + +export const Type_220: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export type Type_220 = Type_220_Approve | Type_220_Rebid | Type_220_Reject + +export interface Type_220_Approve { + __kind: 'Approve' +} + +export interface Type_220_Rebid { + __kind: 'Rebid' +} + +export interface Type_220_Reject { + __kind: 'Reject' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve) + * - Storage Reads: + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - One storage read to retrieve all members. O(M) + * - Storage Writes: + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for new bid. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: bigint +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * # + * - Key: M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM) + * # + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * pallet to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * # + * - Two storage mutates to set `Head` and `Founder`. O(1) + * - One storage write to add the first member to society. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_found { + __kind: 'found' + founder: MultiAddress + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * # + * Key: B (len of bids), M (len of members), X (balance action) + * - One storage read to check `who` is a suspended candidate. + * - One storage removal of the suspended candidate. + * - Approve Logic + * - One storage read to get the available pot to pay users with. O(1) + * - One storage write to update the available pot. O(1) + * - One storage read to get the current block number. O(1) + * - One storage read to get all members. O(M) + * - Up to one unreserve currency action. + * - Up to two new storage writes to payouts. + * - Up to one storage write with O(log M) binary search to add a member to society. + * - Reject Logic + * - Up to one repatriate reserved currency action. O(X) + * - Up to one storage write to ban the vouching member from vouching again. + * - Rebid Logic + * - Storage mutate with O(log B) binary search to place the user back into bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B + X) + * # + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: MultiAddress + judgement: Type_220 +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin forgives + * (`true`) or rejects (`false`) a suspended member. + * + * # + * Key: B (len of bids), M (len of members) + * - One storage read to check `who` is a suspended member. O(1) + * - Up to one storage write O(M) with O(log M) binary search to add a member back to + * society. + * - Up to 3 storage removals O(1) to clean up a removed member. + * - Up to one storage write O(B) with O(B) search to remove vouched bid from bids. + * - Up to one additional event if unvouch takes place. + * - One storage removal. O(1) + * - One event for the judgement. + * + * Total Complexity: O(M + logM + B) + * # + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: MultiAddress + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured + * payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * # + * Key: M (len of members), P (number of payouts for a particular member) + * - One storage read O(M) and O(log M) search to check signer is a member. + * - One storage read O(P) to get all payouts for a member. + * - One storage read O(1) to get the current block number. + * - One currency transfer call. O(X) + * - One storage write or removal to update the member's payouts. O(P) + * + * Total Complexity: O(M + logM + P + X) + * # + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * # + * - One storage write to update the max. O(1) + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * # + * Key: B (len of bids), X (balance unreserve) + * - One storage read and write to retrieve and update the bids. O(B) + * - Either one unreserve balance action O(X) or one vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B + X) + * # + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * # + * - Two storage reads O(1). + * - Four storage removals O(1). + * - One event. + * + * Total Complexity: O(1) + * # + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * # + * Key: B (len of bids) + * - One storage read O(1) to check the signer is a vouching member. + * - One storage mutate to retrieve and update the bids. O(B) + * - One vouching storage removal. O(1) + * - One event. + * + * Total Complexity: O(B) + * # + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be approved (`true`) or + * rejected (`false`). + * + * # + * Key: C (len of candidates), M (len of members) + * - One storage read O(M) and O(log M) search to check user is a member. + * - One account lookup. + * - One storage read O(C) and O(C) search to check that user is a candidate. + * - One storage write to add vote to votes. O(1) + * - One event. + * + * Total Complexity: O(M + logM + C) + * # + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: MultiAddress + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * # + * Key: B (len of bids), C (len of candidates), M (len of members) + * - Storage Reads: + * - One storage read to retrieve all members. O(M) + * - One storage read to check member is not already vouching. O(1) + * - One storage read to check for suspended candidate. O(1) + * - One storage read to check for suspended member. O(1) + * - One storage read to retrieve all current bids. O(B) + * - One storage read to retrieve all current candidates. O(C) + * - Storage Writes: + * - One storage write to insert vouching status to the member. O(1) + * - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization + * w/ read) + * - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1) + * - Notable Computation: + * - O(log M) search to check sender is a member. + * - O(B + C + log M) search to check user is not already a part of society. + * - O(log B) search to insert the new bid sorted. + * - External Pallet Operations: + * - One balance reserve operation. O(X) + * - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT. + * - Events: + * - One event for vouch. + * - Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT. + * + * Total Complexity: O(M + B + C + logM + logB + X) + * # + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: MultiAddress + value: bigint + tip: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: Id, + }), + force_lease: sts.enumStruct({ + para: Id, + leaser: AccountId32, + amount: sts.bigint(), + periodBegin: sts.number(), + periodCount: sts.number(), + }), + trigger_onboard: sts.enumStruct({ + para: Id, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * Clear all leases for a Para Id, refunding any deposits back to the original owners. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: Id +} + +/** + * Just a connect into the `lease_out` call, in case Root wants to force some lease to happen + * independently of any other on-chain mechanism to use it. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: Id + leaser: AccountId32 + amount: bigint + periodBegin: number + periodCount: number +} + +/** + * Try to onboard a parachain that has a lease for the current lease period. + * + * This function can be useful if there was some state issue with a para that should + * have onboarded, but was unable to. As long as they have a lease period, we can + * let them onboard from here. + * + * Origin must be signed, but can be called by anyone. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: SessionKeys, + proof: sts.bytes(), + }), + } +}) + +export const SessionKeys: sts.Type = sts.struct(() => { + return { + grandpa: Public, + babe: sts.bytes(), + imOnline: sts.bytes(), + paraValidator: V2Public, + paraAssignment: sts.bytes(), + authorityDiscovery: sts.bytes(), + } +}) + +export const V2Public = sts.bytes() + +export const Public = sts.bytes() + +export interface SessionKeys { + grandpa: Public + babe: Bytes + imOnline: Bytes + paraValidator: V2Public + paraAssignment: Bytes + authorityDiscovery: Bytes +} + +export type V2Public = Bytes + +export type Public = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be Signed and the account must be either be + * convertible to a validator ID using the chain's typical addressing system (this usually + * means being a controller account) or directly convertible into a validator ID (which + * usually means being a stash account). + * + * # + * - Complexity: `O(1)` in number of key types. Actual cost depends on the number of length + * of `T::Keys::key_ids()` which is fixed. + * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account` + * - DbWrites: `NextKeys`, `origin account` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * # + * - Complexity: `O(1)`. Actual cost depends on the number of length of + * `T::Keys::key_ids()` which is fixed. + * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys` + * - DbWrites: `origin account`, `NextKeys` + * - DbReads per key id: `KeyOwner` + * - DbWrites per key id: `KeyOwner` + * # + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: SessionKeys + proof: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: sts.number(), + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_after: sts.enumStruct({ + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: number + index: number +} + +/** + * Cancel a named scheduled task. + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Anonymously schedule a task after a delay. + * + * # + * Same as [`schedule`]. + * # + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Schedule a named task. + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`](Self::schedule_named). + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + add_lock: sts.enumStruct({ + para: Id, + }), + deregister: sts.enumStruct({ + id: Id, + }), + force_register: sts.enumStruct({ + who: AccountId32, + deposit: sts.bigint(), + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + register: sts.enumStruct({ + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + remove_lock: sts.enumStruct({ + para: Id, + }), + reserve: sts.unit(), + schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + swap: sts.enumStruct({ + id: Id, + other: Id, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RegistrarCall = RegistrarCall_add_lock | RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_register | RegistrarCall_remove_lock | RegistrarCall_reserve | RegistrarCall_schedule_code_upgrade | RegistrarCall_set_current_head | RegistrarCall_swap + +/** + * Add a manager lock from a para. This will prevent the manager of a + * para to deregister or swap a para. + * + * Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked. + */ +export interface RegistrarCall_add_lock { + __kind: 'add_lock' + para: Id +} + +/** + * Deregister a Para Id, freeing all data and returning any deposit. + * + * The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: Id +} + +/** + * Force the registration of a Para Id on the relay chain. + * + * This function must be called by a Root origin. + * + * The deposit taken can be specified for this registration. Any `ParaId` + * can be registered, including sub-1000 IDs which are System Parachains. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId32 + deposit: bigint + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Register head data and validation code for a reserved Para Id. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. + * - `id`: The para ID. Must be owned/managed by the `origin` signing account. + * - `genesis_head`: The genesis head data of the parachain/thread. + * - `validation_code`: The initial validation code of the parachain/thread. + * + * ## Deposits/Fees + * The origin signed account must reserve a corresponding deposit for the registration. Anything already + * reserved previously for this para ID is accounted for. + * + * ## Events + * The `Registered` event is emitted in case of success. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Remove a manager lock from a para. This will allow the manager of a + * previously locked para to deregister or swap a para without using governance. + * + * Can only be called by the Root origin or the parachain. + */ +export interface RegistrarCall_remove_lock { + __kind: 'remove_lock' + para: Id +} + +/** + * Reserve a Para Id on the relay chain. + * + * This function will reserve a new Para Id to be owned/managed by the origin account. + * The origin account is able to register head data and validation code using `register` to create + * a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID. + * + * ## Deposits/Fees + * The origin must reserve a deposit of `ParaDeposit` for the registration. + * + * ## Events + * The `Reserved` event is emitted in case of success, which provides the ID reserved for use. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * Schedule a parachain upgrade. + * + * Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked. + */ +export interface RegistrarCall_schedule_code_upgrade { + __kind: 'schedule_code_upgrade' + para: Id + newCode: ValidationCode +} + +/** + * Set the parachain's current head. + * + * Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked. + */ +export interface RegistrarCall_set_current_head { + __kind: 'set_current_head' + para: Id + newHead: HeadData +} + +/** + * Swap a parachain with another parachain or parathread. + * + * The origin must be Root, the `para` owner, or the `para` itself. + * + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: Id + other: Id +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ReferendaCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + index: sts.number(), + }), + kill: sts.enumStruct({ + index: sts.number(), + }), + nudge_referendum: sts.enumStruct({ + index: sts.number(), + }), + one_fewer_deciding: sts.enumStruct({ + track: sts.number(), + }), + place_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_submission_deposit: sts.enumStruct({ + index: sts.number(), + }), + submit: sts.enumStruct({ + proposalOrigin: OriginCaller, + proposal: Bounded, + enactmentMoment: DispatchTime, + }), + } +}) + +export const DispatchTime: sts.Type = sts.closedEnum(() => { + return { + After: sts.number(), + At: sts.number(), + } +}) + +export type DispatchTime = DispatchTime_After | DispatchTime_At + +export interface DispatchTime_After { + __kind: 'After' + value: number +} + +export interface DispatchTime_At { + __kind: 'At' + value: number +} + +export const Bounded: sts.Type = sts.closedEnum(() => { + return { + Inline: BoundedVec, + Legacy: sts.enumStruct({ + hash: H256, + }), + Lookup: sts.enumStruct({ + hash: H256, + len: sts.number(), + }), + } +}) + +export const BoundedVec = sts.bytes() + +export type Bounded = Bounded_Inline | Bounded_Legacy | Bounded_Lookup + +export interface Bounded_Inline { + __kind: 'Inline' + value: BoundedVec +} + +export interface Bounded_Legacy { + __kind: 'Legacy' + hash: H256 +} + +export interface Bounded_Lookup { + __kind: 'Lookup' + hash: H256 + len: number +} + +export type BoundedVec = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ReferendaCall = ReferendaCall_cancel | ReferendaCall_kill | ReferendaCall_nudge_referendum | ReferendaCall_one_fewer_deciding | ReferendaCall_place_decision_deposit | ReferendaCall_refund_decision_deposit | ReferendaCall_refund_submission_deposit | ReferendaCall_submit + +/** + * Cancel an ongoing referendum. + * + * - `origin`: must be the `CancelOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Cancelled`. + */ +export interface ReferendaCall_cancel { + __kind: 'cancel' + index: number +} + +/** + * Cancel an ongoing referendum and slash the deposits. + * + * - `origin`: must be the `KillOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Killed` and `DepositSlashed`. + */ +export interface ReferendaCall_kill { + __kind: 'kill' + index: number +} + +/** + * Advance a referendum onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `index`: the referendum to be advanced. + */ +export interface ReferendaCall_nudge_referendum { + __kind: 'nudge_referendum' + index: number +} + +/** + * Advance a track onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `track`: the track to be advanced. + * + * Action item for when there is now one fewer referendum in the deciding phase and the + * `DecidingCount` is not yet updated. This means that we should either: + * - begin deciding another referendum (and leave `DecidingCount` alone); or + * - decrement `DecidingCount`. + */ +export interface ReferendaCall_one_fewer_deciding { + __kind: 'one_fewer_deciding' + track: number +} + +/** + * Post the Decision Deposit for a referendum. + * + * - `origin`: must be `Signed` and the account must have funds available for the + * referendum's track's Decision Deposit. + * - `index`: The index of the submitted referendum whose Decision Deposit is yet to be + * posted. + * + * Emits `DecisionDepositPlaced`. + */ +export interface ReferendaCall_place_decision_deposit { + __kind: 'place_decision_deposit' + index: number +} + +/** + * Refund the Decision Deposit for a closed referendum back to the depositor. + * + * - `origin`: must be `Signed` or `Root`. + * - `index`: The index of a closed referendum whose Decision Deposit has not yet been + * refunded. + * + * Emits `DecisionDepositRefunded`. + */ +export interface ReferendaCall_refund_decision_deposit { + __kind: 'refund_decision_deposit' + index: number +} + +/** + * Refund the Submission Deposit for a closed referendum back to the depositor. + * + * - `origin`: must be `Signed` or `Root`. + * - `index`: The index of a closed referendum whose Submission Deposit has not yet been + * refunded. + * + * Emits `SubmissionDepositRefunded`. + */ +export interface ReferendaCall_refund_submission_deposit { + __kind: 'refund_submission_deposit' + index: number +} + +/** + * Propose a referendum on a privileged action. + * + * - `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds + * available. + * - `proposal_origin`: The origin from which the proposal should be executed. + * - `proposal`: The proposal. + * - `enactment_moment`: The moment that the proposal should be enacted. + * + * Emits `Submitted`. + */ +export interface ReferendaCall_submit { + __kind: 'submit' + proposalOrigin: OriginCaller + proposal: Bounded + enactmentMoment: DispatchTime +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: MultiAddress, + call: Call, + }), + cancel_recovered: sts.enumStruct({ + account: MultiAddress, + }), + claim_recovery: sts.enumStruct({ + account: MultiAddress, + }), + close_recovery: sts.enumStruct({ + rescuer: MultiAddress, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId32), + threshold: sts.number(), + delayPeriod: sts.number(), + }), + initiate_recovery: sts.enumStruct({ + account: MultiAddress, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + vouch_recovery: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: MultiAddress + call: Call +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: MultiAddress +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully recovered by + * you. + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: MultiAddress +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: MultiAddress +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. Should be + * ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt before the + * account can be recovered. Should be less than or equal to the length of the list of + * friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized that + * needs to pass before the account can be recovered. + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId32[] + threshold: number + delayPeriod: number +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account needs to be + * recoverable (i.e. have a recovery configuration). + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: MultiAddress +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + announce: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + create_pure: sts.enumStruct({ + proxyType: ProxyType, + delay: sts.number(), + index: sts.number(), + }), + kill_pure: sts.enumStruct({ + spawner: MultiAddress, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + proxy_announced: sts.enumStruct({ + delegate: MultiAddress, + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + reject_announcement: sts.enumStruct({ + delegate: MultiAddress, + callHash: H256, + }), + remove_announcement: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_create_pure | ProxyCall_kill_pure | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: MultiAddress + callHash: H256 +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + */ +export interface ProxyCall_create_pure { + __kind: 'create_pure' + proxyType: ProxyType + delay: number + index: number +} + +/** + * Removes a previously spawned pure proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `pure` with corresponding parameters. + * + * - `spawner`: The account that originally called `pure` to create this account. + * - `index`: The disambiguation index originally passed to `pure`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `pure`. + * - `height`: The height of the chain when the call to `pure` was processed. + * - `ext_index`: The extrinsic index in which the call to `pure` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created pure + * account whose `pure` call has corresponding parameters. + */ +export interface ProxyCall_kill_pure { + __kind: 'kill_pure' + spawner: MultiAddress + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Dispatch the given `call` from an account that the sender is authorized for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: MultiAddress + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: MultiAddress + callHash: H256 +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: MultiAddress + callHash: H256 +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `pure`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NonTransfer | ProxyType_Society | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Society { + __kind: 'Society' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PreimageCall: sts.Type = sts.closedEnum(() => { + return { + note_preimage: sts.enumStruct({ + bytes: sts.bytes(), + }), + request_preimage: sts.enumStruct({ + hash: H256, + }), + unnote_preimage: sts.enumStruct({ + hash: H256, + }), + unrequest_preimage: sts.enumStruct({ + hash: H256, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PreimageCall = PreimageCall_note_preimage | PreimageCall_request_preimage | PreimageCall_unnote_preimage | PreimageCall_unrequest_preimage + +/** + * Register a preimage on-chain. + * + * If the preimage was previously requested, no fees or deposits are taken for providing + * the preimage. Otherwise, a deposit is taken proportional to the size of the preimage. + */ +export interface PreimageCall_note_preimage { + __kind: 'note_preimage' + bytes: Bytes +} + +/** + * Request a preimage be uploaded to the chain without paying any fees or deposits. + * + * If the preimage requests has already been provided on-chain, we unreserve any deposit + * a user may have paid, and take the control of the preimage out of their hands. + */ +export interface PreimageCall_request_preimage { + __kind: 'request_preimage' + hash: H256 +} + +/** + * Clear an unrequested preimage from the runtime storage. + * + * If `len` is provided, then it will be a much cheaper operation. + * + * - `hash`: The hash of the preimage to be removed from the store. + * - `len`: The length of the preimage of `hash`. + */ +export interface PreimageCall_unnote_preimage { + __kind: 'unnote_preimage' + hash: H256 +} + +/** + * Clear a previously made request for a preimage. + * + * NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. + */ +export interface PreimageCall_unrequest_preimage { + __kind: 'unrequest_preimage' + hash: H256 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PhragmenElectionCall: sts.Type = sts.closedEnum(() => { + return { + clean_defunct_voters: sts.enumStruct({ + numVoters: sts.number(), + numDefunct: sts.number(), + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + slashBond: sts.boolean(), + rerunElection: sts.boolean(), + }), + remove_voter: sts.unit(), + renounce_candidacy: sts.enumStruct({ + renouncing: Renouncing, + }), + submit_candidacy: sts.enumStruct({ + candidateCount: sts.number(), + }), + vote: sts.enumStruct({ + votes: sts.array(() => AccountId32), + value: sts.bigint(), + }), + } +}) + +export const Renouncing: sts.Type = sts.closedEnum(() => { + return { + Candidate: sts.number(), + Member: sts.unit(), + RunnerUp: sts.unit(), + } +}) + +export type Renouncing = Renouncing_Candidate | Renouncing_Member | Renouncing_RunnerUp + +export interface Renouncing_Candidate { + __kind: 'Candidate' + value: number +} + +export interface Renouncing_Member { + __kind: 'Member' +} + +export interface Renouncing_RunnerUp { + __kind: 'RunnerUp' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PhragmenElectionCall = PhragmenElectionCall_clean_defunct_voters | PhragmenElectionCall_remove_member | PhragmenElectionCall_remove_voter | PhragmenElectionCall_renounce_candidacy | PhragmenElectionCall_submit_candidacy | PhragmenElectionCall_vote + +/** + * Clean all voters who are defunct (i.e. they do not serve any purpose at all). The + * deposit of the removed voters are returned. + * + * This is an root function to be used only for cleaning the state. + * + * The dispatch origin of this call must be root. + * + * # + * The total number of voters and those that are defunct must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_clean_defunct_voters { + __kind: 'clean_defunct_voters' + numVoters: number + numDefunct: number +} + +/** + * Remove a particular member from the set. This is effective immediately and the bond of + * the outgoing member is slashed. + * + * If a runner-up is available, then the best runner-up will be removed and replaces the + * outgoing member. Otherwise, if `rerun_election` is `true`, a new phragmen election is + * started, else, nothing happens. + * + * If `slash_bond` is set to true, the bond of the member being removed is slashed. Else, + * it is returned. + * + * The dispatch origin of this call must be root. + * + * Note that this does not affect the designated block number of the next election. + * + * # + * If we have a replacement, we use a small weight. Else, since this is a root call and + * will go into phragmen, we assume full block for now. + * # + */ +export interface PhragmenElectionCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + slashBond: boolean + rerunElection: boolean +} + +/** + * Remove `origin` as a voter. + * + * This removes the lock and returns the deposit. + * + * The dispatch origin of this call must be signed and be a voter. + */ +export interface PhragmenElectionCall_remove_voter { + __kind: 'remove_voter' +} + +/** + * Renounce one's intention to be a candidate for the next election round. 3 potential + * outcomes exist: + * + * - `origin` is a candidate and not elected in any set. In this case, the deposit is + * unreserved, returned and origin is removed as a candidate. + * - `origin` is a current runner-up. In this case, the deposit is unreserved, returned and + * origin is removed as a runner-up. + * - `origin` is a current member. In this case, the deposit is unreserved and origin is + * removed as a member, consequently not being a candidate for the next round anymore. + * Similar to [`remove_member`](Self::remove_member), if replacement runners exists, they + * are immediately used. If the prime is renouncing, then no prime will exist until the + * next round. + * + * The dispatch origin of this call must be signed, and have one of the above roles. + * + * # + * The type of renouncing must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_renounce_candidacy { + __kind: 'renounce_candidacy' + renouncing: Renouncing +} + +/** + * Submit oneself for candidacy. A fixed amount of deposit is recorded. + * + * All candidates are wiped at the end of the term. They either become a member/runner-up, + * or leave the system while their deposit is slashed. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`] + * to get their deposit back. Losing the spot in an election will always lead to a slash. + * + * # + * The number of current candidates must be provided as witness data. + * # + */ +export interface PhragmenElectionCall_submit_candidacy { + __kind: 'submit_candidacy' + candidateCount: number +} + +/** + * Vote for a set of candidates for the upcoming round of election. This can be called to + * set the initial votes, or update already existing votes. + * + * Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is + * reserved. The deposit is based on the number of votes and can be updated over time. + * + * The `votes` should: + * - not be empty. + * - be less than the number of possible candidates. Note that all current members and + * runners-up are also automatically candidates for the next round. + * + * If `value` is more than `who`'s free balance, then the maximum of the two is used. + * + * The dispatch origin of this call must be signed. + * + * ### Warning + * + * It is the responsibility of the caller to **NOT** place all of their balance into the + * lock and keep some for further operations. + * + * # + * We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less. + * # + */ +export interface PhragmenElectionCall_vote { + __kind: 'vote' + votes: AccountId32[] + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasSharedCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasDisputesCall: sts.Type = sts.closedEnum(() => { + return { + force_unfreeze: sts.unit(), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasDisputesCall = ParasDisputesCall_force_unfreeze + +export interface ParasDisputesCall_force_unfreeze { + __kind: 'force_unfreeze' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + add_trusted_validation_code: sts.enumStruct({ + validationCode: ValidationCode, + }), + force_note_new_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: Id, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + relayParentNumber: sts.number(), + }), + force_set_current_code: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + include_pvf_check_statement: sts.enumStruct({ + stmt: V2PvfCheckStatement, + signature: V2Signature, + }), + poke_unused_validation_code: sts.enumStruct({ + validationCodeHash: ValidationCodeHash, + }), + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const V2Signature = sts.bytes() + +export const V2PvfCheckStatement: sts.Type = sts.struct(() => { + return { + accept: sts.boolean(), + subject: ValidationCodeHash, + sessionIndex: sts.number(), + validatorIndex: V2ValidatorIndex, + } +}) + +export const V2ValidatorIndex = sts.number() + +export interface V2PvfCheckStatement { + accept: boolean + subject: ValidationCodeHash + sessionIndex: number + validatorIndex: V2ValidatorIndex +} + +export type V2ValidatorIndex = number + +export type ValidationCodeHash = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasCall = ParasCall_add_trusted_validation_code | ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head | ParasCall_include_pvf_check_statement | ParasCall_poke_unused_validation_code + +/** + * Adds the validation code to the storage. + * + * The code will not be added if it is already present. Additionally, if PVF pre-checking + * is running for that code, it will be instantly accepted. + * + * Otherwise, the code will be added into the storage. Note that the code will be added + * into storage with reference count 0. This is to account the fact that there are no users + * for this code yet. The caller will have to make sure that this code eventually gets + * used by some parachain or removed from the storage to avoid storage leaks. For the latter + * prefer to use the `poke_unused_validation_code` dispatchable to raw storage manipulation. + * + * This function is mainly meant to be used for upgrading parachains that do not follow + * the go-ahead signal while the PVF pre-checking feature is enabled. + */ +export interface ParasCall_add_trusted_validation_code { + __kind: 'add_trusted_validation_code' + validationCode: ValidationCode +} + +/** + * Note a new block head for para within the context of the current block. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: Id + newHead: HeadData +} + +/** + * Put a parachain directly into the next session's action queue. + * We can't queue it any sooner than this without going into the + * initializer... + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: Id +} + +/** + * Schedule an upgrade as if it was scheduled in the given relay parent block. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: Id + newCode: ValidationCode + relayParentNumber: number +} + +/** + * Set the storage for the parachain validation code immediately. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: Id + newCode: ValidationCode +} + +/** + * Set the storage for the current parachain head data immediately. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: Id + newHead: HeadData +} + +/** + * Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and + * enacts the results if that was the last vote before achieving the supermajority. + */ +export interface ParasCall_include_pvf_check_statement { + __kind: 'include_pvf_check_statement' + stmt: V2PvfCheckStatement + signature: V2Signature +} + +/** + * Remove the validation code from the storage iff the reference count is 0. + * + * This is better than removing the storage directly, because it will not remove the code + * that was suddenly got used by some parachain while this dispatchable was pending + * dispatching. + */ +export interface ParasCall_poke_unused_validation_code { + __kind: 'poke_unused_validation_code' + validationCodeHash: ValidationCodeHash +} + +export type V2Signature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: V2InherentData, + }), + } +}) + +export const V2InherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => V2UncheckedSigned), + backedCandidates: sts.array(() => V2BackedCandidate), + disputes: sts.array(() => V2DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: H256, + number: sts.number(), + stateRoot: H256, + extrinsicsRoot: H256, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + Consensus: sts.tuple(() => [sts.bytes(), sts.bytes()]), + Other: sts.bytes(), + PreRuntime: sts.tuple(() => [sts.bytes(), sts.bytes()]), + RuntimeEnvironmentUpdated: sts.unit(), + Seal: sts.tuple(() => [sts.bytes(), sts.bytes()]), + } +}) + +export type DigestItem = DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: [Bytes, Bytes] +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: [Bytes, Bytes] +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: [Bytes, Bytes] +} + +export interface Digest { + logs: DigestItem[] +} + +export interface Header { + parentHash: H256 + number: number + stateRoot: H256 + extrinsicsRoot: H256 + digest: Digest +} + +export const V2DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: sts.number(), + statements: sts.array(() => sts.tuple(() => [V2DisputeStatement, V2ValidatorIndex, V2Signature])), + } +}) + +export const V2DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: V2InvalidDisputeStatementKind, + Valid: V2ValidDisputeStatementKind, + } +}) + +export const V2ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + BackingSeconded: H256, + BackingValid: H256, + Explicit: sts.unit(), + } +}) + +export type V2ValidDisputeStatementKind = V2ValidDisputeStatementKind_ApprovalChecking | V2ValidDisputeStatementKind_BackingSeconded | V2ValidDisputeStatementKind_BackingValid | V2ValidDisputeStatementKind_Explicit + +export interface V2ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface V2ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: H256 +} + +export interface V2ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: H256 +} + +export interface V2ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export const V2InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export type V2InvalidDisputeStatementKind = V2InvalidDisputeStatementKind_Explicit + +export interface V2InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type V2DisputeStatement = V2DisputeStatement_Invalid | V2DisputeStatement_Valid + +export interface V2DisputeStatement_Invalid { + __kind: 'Invalid' + value: V2InvalidDisputeStatementKind +} + +export interface V2DisputeStatement_Valid { + __kind: 'Valid' + value: V2ValidDisputeStatementKind +} + +export const CandidateHash = sts.bytes() + +export interface V2DisputeStatementSet { + candidateHash: CandidateHash + session: number + statements: [V2DisputeStatement, V2ValidatorIndex, V2Signature][] +} + +export type CandidateHash = Bytes + +export const V2BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: V2CommittedCandidateReceipt, + validityVotes: sts.array(() => V2ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const V2ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: V2Signature, + Implicit: V2Signature, + } +}) + +export type V2ValidityAttestation = V2ValidityAttestation_Explicit | V2ValidityAttestation_Implicit + +export interface V2ValidityAttestation_Explicit { + __kind: 'Explicit' + value: V2Signature +} + +export interface V2ValidityAttestation_Implicit { + __kind: 'Implicit' + value: V2Signature +} + +export const V2CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: V2CandidateDescriptor, + commitments: V2CandidateCommitments, + } +}) + +export const V2CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => sts.bytes()), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: sts.number(), + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: Id, + data: sts.bytes(), + } +}) + +export interface OutboundHrmpMessage { + recipient: Id + data: Bytes +} + +export interface V2CandidateCommitments { + upwardMessages: Bytes[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: number +} + +export const V2CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: Id, + relayParent: H256, + collator: sts.bytes(), + persistedValidationDataHash: H256, + povHash: H256, + erasureRoot: H256, + signature: sts.bytes(), + paraHead: H256, + validationCodeHash: ValidationCodeHash, + } +}) + +export interface V2CandidateDescriptor { + paraId: Id + relayParent: H256 + collator: Bytes + persistedValidationDataHash: H256 + povHash: H256 + erasureRoot: H256 + signature: Bytes + paraHead: H256 + validationCodeHash: ValidationCodeHash +} + +export interface V2CommittedCandidateReceipt { + descriptor: V2CandidateDescriptor + commitments: V2CandidateCommitments +} + +export interface V2BackedCandidate { + candidate: V2CommittedCandidateReceipt + validityVotes: V2ValidityAttestation[] + validatorIndices: BitSequence +} + +export const V2UncheckedSigned: sts.Type = sts.struct(() => { + return { + payload: V2AvailabilityBitfield, + validatorIndex: V2ValidatorIndex, + signature: V2Signature, + } +}) + +export const V2AvailabilityBitfield = sts.bitseq() + +export interface V2UncheckedSigned { + payload: V2AvailabilityBitfield + validatorIndex: V2ValidatorIndex + signature: V2Signature +} + +export type V2AvailabilityBitfield = BitSequence + +export interface V2InherentData { + bitfields: V2UncheckedSigned[] + backedCandidates: V2BackedCandidate[] + disputes: V2DisputeStatementSet[] + parentHeader: Header +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInherentCall = ParaInherentCall_enter + +/** + * Enter the paras inherent. This will process bitfields and backed candidates. + */ +export interface ParaInherentCall_enter { + __kind: 'enter' + data: V2InherentData +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInclusionCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const NominationPoolsCall: sts.Type = sts.closedEnum(() => { + return { + bond_extra: sts.enumStruct({ + extra: BondExtra, + }), + chill: sts.enumStruct({ + poolId: sts.number(), + }), + claim_payout: sts.unit(), + create: sts.enumStruct({ + amount: sts.bigint(), + root: MultiAddress, + nominator: MultiAddress, + stateToggler: MultiAddress, + }), + create_with_pool_id: sts.enumStruct({ + amount: sts.bigint(), + root: MultiAddress, + nominator: MultiAddress, + stateToggler: MultiAddress, + poolId: sts.number(), + }), + join: sts.enumStruct({ + amount: sts.bigint(), + poolId: sts.number(), + }), + nominate: sts.enumStruct({ + poolId: sts.number(), + validators: sts.array(() => AccountId32), + }), + pool_withdraw_unbonded: sts.enumStruct({ + poolId: sts.number(), + numSlashingSpans: sts.number(), + }), + set_configs: sts.enumStruct({ + minJoinBond: Type_328, + minCreateBond: Type_328, + maxPools: Type_329, + maxMembers: Type_329, + maxMembersPerPool: Type_329, + }), + set_metadata: sts.enumStruct({ + poolId: sts.number(), + metadata: sts.bytes(), + }), + set_state: sts.enumStruct({ + poolId: sts.number(), + state: PoolState, + }), + unbond: sts.enumStruct({ + memberAccount: MultiAddress, + unbondingPoints: sts.bigint(), + }), + update_roles: sts.enumStruct({ + poolId: sts.number(), + newRoot: Type_330, + newNominator: Type_330, + newStateToggler: Type_330, + }), + withdraw_unbonded: sts.enumStruct({ + memberAccount: MultiAddress, + numSlashingSpans: sts.number(), + }), + } +}) + +export const Type_330: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: AccountId32, + } +}) + +export type Type_330 = Type_330_Noop | Type_330_Remove | Type_330_Set + +export interface Type_330_Noop { + __kind: 'Noop' +} + +export interface Type_330_Remove { + __kind: 'Remove' +} + +export interface Type_330_Set { + __kind: 'Set' + value: AccountId32 +} + +export const PoolState: sts.Type = sts.closedEnum(() => { + return { + Blocked: sts.unit(), + Destroying: sts.unit(), + Open: sts.unit(), + } +}) + +export type PoolState = PoolState_Blocked | PoolState_Destroying | PoolState_Open + +export interface PoolState_Blocked { + __kind: 'Blocked' +} + +export interface PoolState_Destroying { + __kind: 'Destroying' +} + +export interface PoolState_Open { + __kind: 'Open' +} + +export const Type_329: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_329 = Type_329_Noop | Type_329_Remove | Type_329_Set + +export interface Type_329_Noop { + __kind: 'Noop' +} + +export interface Type_329_Remove { + __kind: 'Remove' +} + +export interface Type_329_Set { + __kind: 'Set' + value: number +} + +export const Type_328: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type Type_328 = Type_328_Noop | Type_328_Remove | Type_328_Set + +export interface Type_328_Noop { + __kind: 'Noop' +} + +export interface Type_328_Remove { + __kind: 'Remove' +} + +export interface Type_328_Set { + __kind: 'Set' + value: bigint +} + +export const BondExtra: sts.Type = sts.closedEnum(() => { + return { + FreeBalance: sts.bigint(), + Rewards: sts.unit(), + } +}) + +export type BondExtra = BondExtra_FreeBalance | BondExtra_Rewards + +export interface BondExtra_FreeBalance { + __kind: 'FreeBalance' + value: bigint +} + +export interface BondExtra_Rewards { + __kind: 'Rewards' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type NominationPoolsCall = NominationPoolsCall_bond_extra | NominationPoolsCall_chill | NominationPoolsCall_claim_payout | NominationPoolsCall_create | NominationPoolsCall_create_with_pool_id | NominationPoolsCall_join | NominationPoolsCall_nominate | NominationPoolsCall_pool_withdraw_unbonded | NominationPoolsCall_set_configs | NominationPoolsCall_set_metadata | NominationPoolsCall_set_state | NominationPoolsCall_unbond | NominationPoolsCall_update_roles | NominationPoolsCall_withdraw_unbonded + +/** + * Bond `extra` more funds from `origin` into the pool to which they already belong. + * + * Additional funds can come from either the free balance of the account, of from the + * accumulated rewards, see [`BondExtra`]. + * + * Bonding extra funds implies an automatic payout of all pending rewards as well. + */ +export interface NominationPoolsCall_bond_extra { + __kind: 'bond_extra' + extra: BondExtra +} + +/** + * Chill on behalf of the pool. + * + * The dispatch origin of this call must be signed by the pool nominator or the pool + * root role, same as [`Pallet::nominate`]. + * + * This directly forward the call to the staking pallet, on behalf of the pool bonded + * account. + */ +export interface NominationPoolsCall_chill { + __kind: 'chill' + poolId: number +} + +/** + * A bonded member can use this to claim their payout based on the rewards that the pool + * has accumulated since their last claimed payout (OR since joining if this is there first + * time claiming rewards). The payout will be transferred to the member's account. + * + * The member will earn rewards pro rata based on the members stake vs the sum of the + * members in the pools stake. Rewards do not "expire". + */ +export interface NominationPoolsCall_claim_payout { + __kind: 'claim_payout' +} + +/** + * Create a new delegation pool. + * + * # Arguments + * + * * `amount` - The amount of funds to delegate to the pool. This also acts of a sort of + * deposit since the pools creator cannot fully unbond funds until the pool is being + * destroyed. + * * `index` - A disambiguation index for creating the account. Likely only useful when + * creating multiple pools in the same extrinsic. + * * `root` - The account to set as [`PoolRoles::root`]. + * * `nominator` - The account to set as the [`PoolRoles::nominator`]. + * * `state_toggler` - The account to set as the [`PoolRoles::state_toggler`]. + * + * # Note + * + * In addition to `amount`, the caller will transfer the existential deposit; so the caller + * needs at have at least `amount + existential_deposit` transferrable. + */ +export interface NominationPoolsCall_create { + __kind: 'create' + amount: bigint + root: MultiAddress + nominator: MultiAddress + stateToggler: MultiAddress +} + +/** + * Create a new delegation pool with a previously used pool id + * + * # Arguments + * + * same as `create` with the inclusion of + * * `pool_id` - `A valid PoolId. + */ +export interface NominationPoolsCall_create_with_pool_id { + __kind: 'create_with_pool_id' + amount: bigint + root: MultiAddress + nominator: MultiAddress + stateToggler: MultiAddress + poolId: number +} + +/** + * Stake funds with a pool. The amount to bond is transferred from the member to the + * pools account and immediately increases the pools bond. + * + * # Note + * + * * An account can only be a member of a single pool. + * * An account cannot join the same pool multiple times. + * * This call will *not* dust the member account, so the member must have at least + * `existential deposit + amount` in their account. + * * Only a pool with [`PoolState::Open`] can be joined + */ +export interface NominationPoolsCall_join { + __kind: 'join' + amount: bigint + poolId: number +} + +/** + * Nominate on behalf of the pool. + * + * The dispatch origin of this call must be signed by the pool nominator or the pool + * root role. + * + * This directly forward the call to the staking pallet, on behalf of the pool bonded + * account. + */ +export interface NominationPoolsCall_nominate { + __kind: 'nominate' + poolId: number + validators: AccountId32[] +} + +/** + * Call `withdraw_unbonded` for the pools account. This call can be made by any account. + * + * This is useful if their are too many unlocking chunks to call `unbond`, and some + * can be cleared by withdrawing. In the case there are too many unlocking chunks, the user + * would probably see an error like `NoMoreChunks` emitted from the staking system when + * they attempt to unbond. + */ +export interface NominationPoolsCall_pool_withdraw_unbonded { + __kind: 'pool_withdraw_unbonded' + poolId: number + numSlashingSpans: number +} + +/** + * Update configurations for the nomination pools. The origin for this call must be + * Root. + * + * # Arguments + * + * * `min_join_bond` - Set [`MinJoinBond`]. + * * `min_create_bond` - Set [`MinCreateBond`]. + * * `max_pools` - Set [`MaxPools`]. + * * `max_members` - Set [`MaxPoolMembers`]. + * * `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]. + */ +export interface NominationPoolsCall_set_configs { + __kind: 'set_configs' + minJoinBond: Type_328 + minCreateBond: Type_328 + maxPools: Type_329 + maxMembers: Type_329 + maxMembersPerPool: Type_329 +} + +/** + * Set a new metadata for the pool. + * + * The dispatch origin of this call must be signed by the state toggler, or the root role + * of the pool. + */ +export interface NominationPoolsCall_set_metadata { + __kind: 'set_metadata' + poolId: number + metadata: Bytes +} + +/** + * Set a new state for the pool. + * + * If a pool is already in the `Destroying` state, then under no condition can its state + * change again. + * + * The dispatch origin of this call must be either: + * + * 1. signed by the state toggler, or the root role of the pool, + * 2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and + * then the state of the pool can be permissionlessly changed to `Destroying`. + */ +export interface NominationPoolsCall_set_state { + __kind: 'set_state' + poolId: number + state: PoolState +} + +/** + * Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It + * implicitly collects the rewards one last time, since not doing so would mean some + * rewards would be forfeited. + * + * Under certain conditions, this call can be dispatched permissionlessly (i.e. by any + * account). + * + * # Conditions for a permissionless dispatch. + * + * * The pool is blocked and the caller is either the root or state-toggler. This is + * refereed to as a kick. + * * The pool is destroying and the member is not the depositor. + * * The pool is destroying, the member is the depositor and no other members are in the + * pool. + * + * ## Conditions for permissioned dispatch (i.e. the caller is also the + * `member_account`): + * + * * The caller is not the depositor. + * * The caller is the depositor, the pool is destroying and no other members are in the + * pool. + * + * # Note + * + * If there are too many unlocking chunks to unbond with the pool account, + * [`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks. + * The [`StakingInterface::unbond`] will implicitly call [`Call::pool_withdraw_unbonded`] + * to try to free chunks if necessary (ie. if unbound was called and no unlocking chunks + * are available). However, it may not be possible to release the current unlocking chunks, + * in which case, the result of this call will likely be the `NoMoreChunks` error from the + * staking system. + */ +export interface NominationPoolsCall_unbond { + __kind: 'unbond' + memberAccount: MultiAddress + unbondingPoints: bigint +} + +/** + * Update the roles of the pool. + * + * The root is the only entity that can change any of the roles, including itself, + * excluding the depositor, who can never change. + * + * It emits an event, notifying UIs of the role change. This event is quite relevant to + * most pool members and they should be informed of changes to pool roles. + */ +export interface NominationPoolsCall_update_roles { + __kind: 'update_roles' + poolId: number + newRoot: Type_330 + newNominator: Type_330 + newStateToggler: Type_330 +} + +/** + * Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an + * error is returned. + * + * Under certain conditions, this call can be dispatched permissionlessly (i.e. by any + * account). + * + * # Conditions for a permissionless dispatch + * + * * The pool is in destroy mode and the target is not the depositor. + * * The target is the depositor and they are the only member in the sub pools. + * * The pool is blocked and the caller is either the root or state-toggler. + * + * # Conditions for permissioned dispatch + * + * * The caller is the target and they are not the depositor. + * + * # Note + * + * If the target is the depositor, the pool will be destroyed. + */ +export interface NominationPoolsCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + memberAccount: MultiAddress + numSlashingSpans: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const NisCounterpartBalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type NisCounterpartBalancesCall = NisCounterpartBalancesCall_force_transfer | NisCounterpartBalancesCall_force_unreserve | NisCounterpartBalancesCall_set_balance | NisCounterpartBalancesCall_transfer | NisCounterpartBalancesCall_transfer_all | NisCounterpartBalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is not + * assumed to be in the overlay. + * # + */ +export interface NisCounterpartBalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * Unreserve some balance from a user by force. + * + * Can only be called by ROOT. + */ +export interface NisCounterpartBalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also alter the total issuance of the system (`TotalIssuance`) appropriately. + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + */ +export interface NisCounterpartBalancesCall_set_balance { + __kind: 'set_balance' + who: MultiAddress + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for input config + * types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex + * computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional check + * that the transfer will not kill the origin account. + * --------------------------------- + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface NisCounterpartBalancesCall_transfer { + __kind: 'transfer' + dest: MultiAddress + value: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). # + * - O(1). Just like transfer, but reading the user's transferable balance first. + * # + */ +export interface NisCounterpartBalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + */ +export interface NisCounterpartBalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const NisCall: sts.Type = sts.closedEnum(() => { + return { + communify: sts.enumStruct({ + index: sts.number(), + }), + fund_deficit: sts.unit(), + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + privatize: sts.enumStruct({ + index: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + thaw_communal: sts.enumStruct({ + index: sts.number(), + }), + thaw_private: sts.enumStruct({ + index: sts.number(), + maybeProportion: sts.option(() => Perquintill), + }), + } +}) + +export const Perquintill = sts.bigint() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type NisCall = NisCall_communify | NisCall_fund_deficit | NisCall_place_bid | NisCall_privatize | NisCall_retract_bid | NisCall_thaw_communal | NisCall_thaw_private + +/** + * Make a private receipt communal and create fungible counterparts for its owner. + */ +export interface NisCall_communify { + __kind: 'communify' + index: number +} + +/** + * Ensure we have sufficient funding for all potential payouts. + * + * - `origin`: Must be accepted by `FundOrigin`. + */ +export interface NisCall_fund_deficit { + __kind: 'fund_deficit' +} + +/** + * Place a bid. + * + * Origin must be Signed, and account must have at least `amount` in free balance. + * + * - `amount`: The amount of the bid; these funds will be reserved, and if/when + * consolidated, removed. Must be at least `MinBid`. + * - `duration`: The number of periods before which the newly consolidated bid may be + * thawed. Must be greater than 1 and no more than `QueueCount`. + * + * Complexities: + * - `Queues[duration].len()` (just take max). + */ +export interface NisCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * Make a communal receipt private and burn fungible counterparts from its owner. + */ +export interface NisCall_privatize { + __kind: 'privatize' + index: number +} + +/** + * Retract a previously placed bid. + * + * Origin must be Signed, and the account should have previously issued a still-active bid + * of `amount` for `duration`. + * + * - `amount`: The amount of the previous bid. + * - `duration`: The duration of the previous bid. + */ +export interface NisCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * Reduce or remove an outstanding receipt, placing the according proportion of funds into + * the account of the owner. + * + * - `origin`: Must be Signed and the account must be the owner of the fungible counterpart + * for receipt `index`. + * - `index`: The index of the receipt. + */ +export interface NisCall_thaw_communal { + __kind: 'thaw_communal' + index: number +} + +/** + * Reduce or remove an outstanding receipt, placing the according proportion of funds into + * the account of the owner. + * + * - `origin`: Must be Signed and the account must be the owner of the receipt `index` as + * well as any fungible counterpart. + * - `index`: The index of the receipt. + * - `portion`: If `Some`, then only the given portion of the receipt should be thawed. If + * `None`, then all of it should be. + */ +export interface NisCall_thaw_private { + __kind: 'thaw_private' + index: number + maybeProportion?: (Perquintill | undefined) +} + +export type Perquintill = bigint + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + call: Call, + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId32), + call: Call, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account] + * - Write: Multisig Storage, [Caller Account] + * # + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * # + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + * ------------------------------- + * - DB Weight: + * - Reads: Multisig Storage, [Caller Account] + * - Writes: Multisig Storage, [Caller Account] + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + call: Call + maxWeight: Weight +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * # + * O(Z + C) where Z is the length of the call and C its execution weight. + * ------------------------------- + * - DB Weight: None + * - Plus Call Weight + * # + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId32[] + call: Call +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * # + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + * ---------------------------------- + * - DB Weight: + * - Read: Multisig Storage, [Caller Account], Refund Account + * - Write: Multisig Storage, [Caller Account], Refund Account + * # + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId32[] + timepoint: Timepoint + callHash: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const InitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type InitializerCall = InitializerCall_force_approve + +/** + * Issue a signal to the consensus engine to forcibly act as though all parachain + * blocks in all relay chain blocks up to and including the given number in the current + * chain are valid and should be finalized. + */ +export interface InitializerCall_force_approve { + __kind: 'force_approve' + upTo: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: sts.number(), + }), + force_transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: sts.number(), + }), + freeze: sts.enumStruct({ + index: sts.number(), + }), + transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: number +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one reserve operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (original owner) + * - Writes: Indices Accounts, System Account (original owner) + * # + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: MultiAddress + index: number + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One reserve operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_free { + __kind: 'free' + index: number +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the + * deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - Up to one slash operation. + * - One event. + * ------------------- + * - DB Weight: 1 Read/Write (Accounts) + * # + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: number +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * # + * - `O(1)`. + * - One storage mutation (codec `O(1)`). + * - One transfer operation. + * - One event. + * ------------------- + * - DB Weight: + * - Reads: Indices Accounts, System Account (recipient) + * - Writes: Indices Accounts, System Account (recipient) + * # + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: MultiAddress + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: sts.bytes(), + }), + } +}) + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: sts.number(), + networkState: OpaqueNetworkState, + sessionIndex: sts.number(), + authorityIndex: sts.number(), + validatorsLen: sts.number(), + } +}) + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export interface Heartbeat { + blockNumber: number + networkState: OpaqueNetworkState + sessionIndex: number + authorityIndex: number + validatorsLen: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * # + * - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is + * length of `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`, + * `ReceivedHeartbeats` + * - DbWrites: `ReceivedHeartbeats` + * # + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Bytes +} + +/** + * Identity pallet declaration. + */ +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: MultiAddress, + }), + add_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: sts.number(), + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: MultiAddress, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: MultiAddress, + judgement: Judgement, + identity: H256, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: MultiAddress, + }), + rename_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: MultiAddress, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: BitFlags, + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId32, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => sts.tuple(() => [Data, Data])), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => sts.bytes()), + image: Data, + twitter: Data, + } +}) + +export interface IdentityInfo { + additional: [Data, Data][] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (Bytes | undefined) + image: Data + twitter: Data +} + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: Bytes +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: Bytes +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: Bytes +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: Bytes +} + +export const BitFlags = sts.bigint() + +export const Judgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: sts.bigint(), + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export type Judgement = Judgement_Erroneous | Judgement_FeePaid | Judgement_KnownGood | Judgement_LowQuality | Judgement_OutOfDate | Judgement_Reasonable | Judgement_Unknown + +export interface Judgement_Erroneous { + __kind: 'Erroneous' +} + +export interface Judgement_FeePaid { + __kind: 'FeePaid' + value: bigint +} + +export interface Judgement_KnownGood { + __kind: 'KnownGood' +} + +export interface Judgement_LowQuality { + __kind: 'LowQuality' +} + +export interface Judgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface Judgement_Reasonable { + __kind: 'Reasonable' +} + +export interface Judgement_Unknown { + __kind: 'Unknown' +} + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: sts.bytes(), + Keccak256: sts.bytes(), + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: sts.bytes(), + ShaThree256: sts.bytes(), + } +}) + +/** + * Identity pallet declaration. + */ +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: MultiAddress +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: MultiAddress + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: number +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * # + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + * - One balance-unreserve operation. + * - `2` storage reads and `S + 2` storage deletions. + * - One event. + * # + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * # + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. + * # + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: MultiAddress +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * - `identity`: The hash of the [`IdentityInfo`] for that the judgement is provided. + * + * Emits `JudgementGiven` if successful. + * + * # + * - `O(R + X)`. + * - One balance-transfer operation. + * - Up to one account-lookup operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`. + * - One event. + * # + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: MultiAddress + judgement: Judgement + identity: H256 +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: MultiAddress +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: MultiAddress + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. + * - One event. + * # + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: MultiAddress +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: BitFlags +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * # + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + * - One balance reserve operation. + * - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`). + * - One event. + * # + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * # + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - At most one balance operations. + * - DB: + * - `P + S` storage mutations (codec complexity `O(1)`) + * - One storage read (codec complexity `O(P)`). + * - One storage write (codec complexity `O(S)`). + * - One storage-exists (`IdentityOf::contains_key`). + * # + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId32, Data][] +} + +export type BitFlags = bigint + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const HrmpCall: sts.Type = sts.closedEnum(() => { + return { + force_clean_hrmp: sts.enumStruct({ + para: Id, + inbound: sts.number(), + outbound: sts.number(), + }), + force_open_hrmp_channel: sts.enumStruct({ + sender: Id, + recipient: Id, + maxCapacity: sts.number(), + maxMessageSize: sts.number(), + }), + force_process_hrmp_close: sts.enumStruct({ + channels: sts.number(), + }), + force_process_hrmp_open: sts.enumStruct({ + channels: sts.number(), + }), + hrmp_accept_open_channel: sts.enumStruct({ + sender: Id, + }), + hrmp_cancel_open_request: sts.enumStruct({ + channelId: HrmpChannelId, + openRequests: sts.number(), + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: Id, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: Id, + recipient: Id, + } +}) + +export interface HrmpChannelId { + sender: Id + recipient: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type HrmpCall = HrmpCall_force_clean_hrmp | HrmpCall_force_open_hrmp_channel | HrmpCall_force_process_hrmp_close | HrmpCall_force_process_hrmp_open | HrmpCall_hrmp_accept_open_channel | HrmpCall_hrmp_cancel_open_request | HrmpCall_hrmp_close_channel | HrmpCall_hrmp_init_open_channel + +/** + * This extrinsic triggers the cleanup of all the HRMP storage items that + * a para may have. Normally this happens once per session, but this allows + * you to trigger the cleanup immediately for a specific parachain. + * + * Origin must be Root. + * + * Number of inbound and outbound channels for `para` must be provided as witness data of weighing. + */ +export interface HrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: Id + inbound: number + outbound: number +} + +/** + * Open a channel from a `sender` to a `recipient` `ParaId` using the Root origin. Although + * opened by Root, the `max_capacity` and `max_message_size` are still subject to the Relay + * Chain's configured limits. + * + * Expected use is when one of the `ParaId`s involved in the channel is governed by the + * Relay Chain, e.g. a common good parachain. + */ +export interface HrmpCall_force_open_hrmp_channel { + __kind: 'force_open_hrmp_channel' + sender: Id + recipient: Id + maxCapacity: number + maxMessageSize: number +} + +/** + * Force process HRMP close channel requests. + * + * If there are pending HRMP close channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of closing channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' + channels: number +} + +/** + * Force process HRMP open channel requests. + * + * If there are pending HRMP open channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of opening channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' + channels: number +} + +/** + * Accept a pending open channel request from the given sender. + * + * The channel will be opened only on the next session boundary. + */ +export interface HrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: Id +} + +/** + * This cancels a pending open channel request. It can be canceled by either of the sender + * or the recipient for that request. The origin must be either of those. + * + * The cancellation happens immediately. It is not possible to cancel the request if it is + * already accepted. + * + * Total number of open requests (i.e. `HrmpOpenChannelRequestsList`) must be provided as + * witness data. + */ +export interface HrmpCall_hrmp_cancel_open_request { + __kind: 'hrmp_cancel_open_request' + channelId: HrmpChannelId + openRequests: number +} + +/** + * Initiate unilateral closing of a channel. The origin must be either the sender or the + * recipient in the channel being closed. + * + * The closure can only happen on a session change. + */ +export interface HrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * Initiate opening a channel from a parachain to a given recipient with given channel + * parameters. + * + * - `proposed_max_capacity` - specifies how many messages can be in the channel at once. + * - `proposed_max_message_size` - specifies the maximum size of the messages. + * + * These numbers are a subject to the relay-chain configuration limits. + * + * The channel can be opened only after the recipient confirms it and only on a session + * change. + */ +export interface HrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: Id + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: sts.number(), + bestFinalizedBlockNumber: sts.number(), + }), + report_equivocation: sts.enumStruct({ + equivocationProof: Type_111, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_111, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: sts.number(), + trieNodes: sts.array(() => sts.bytes()), + validatorCount: sts.number(), + } +}) + +export interface MembershipProof { + session: number + trieNodes: Bytes[] + validatorCount: number +} + +export const Type_111: sts.Type = sts.struct(() => { + return { + setId: sts.bigint(), + equivocation: Equivocation, + } +}) + +export const Equivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: Type_119, + Prevote: Type_113, + } +}) + +export const Type_113: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Prevote, Signature]), + second: sts.tuple(() => [Prevote, Signature]), + } +}) + +export const Signature = sts.bytes() + +export const Prevote: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Prevote { + targetHash: H256 + targetNumber: number +} + +export interface Type_113 { + roundNumber: bigint + identity: Public + first: [Prevote, Signature] + second: [Prevote, Signature] +} + +export type Signature = Bytes + +export const Type_119: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Precommit, Signature]), + second: sts.tuple(() => [Precommit, Signature]), + } +}) + +export const Precommit: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Precommit { + targetHash: H256 + targetNumber: number +} + +export interface Type_119 { + roundNumber: bigint + identity: Public + first: [Precommit, Signature] + second: [Precommit, Signature] +} + +export type Equivocation = Equivocation_Precommit | Equivocation_Prevote + +export interface Equivocation_Precommit { + __kind: 'Precommit' + value: Type_119 +} + +export interface Equivocation_Prevote { + __kind: 'Prevote' + value: Type_113 +} + +export interface Type_111 { + setId: bigint + equivocation: Equivocation +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has stalled. + * + * This will trigger a forced authority set change at the beginning of the next session, to + * be enacted `delay` blocks after that. The `delay` should be high enough to safely assume + * that the block signalling the forced change will not be re-orged e.g. 1000 blocks. + * The block production rate (which may be slowed down because of finality lagging) should + * be taken into account when choosing the `delay`. The GRANDPA voters based on the new + * authority will start voting on top of `best_finalized_block_number` for new finalized + * blocks. `best_finalized_block_number` should be the highest of the latest finalized + * block of all validators of the new authority set. + * + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: number + bestFinalizedBlockNumber: number +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_111 + keyOwnerProof: MembershipProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_111 + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const FellowshipReferendaCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + index: sts.number(), + }), + kill: sts.enumStruct({ + index: sts.number(), + }), + nudge_referendum: sts.enumStruct({ + index: sts.number(), + }), + one_fewer_deciding: sts.enumStruct({ + track: sts.number(), + }), + place_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_submission_deposit: sts.enumStruct({ + index: sts.number(), + }), + submit: sts.enumStruct({ + proposalOrigin: OriginCaller, + proposal: Bounded, + enactmentMoment: DispatchTime, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type FellowshipReferendaCall = FellowshipReferendaCall_cancel | FellowshipReferendaCall_kill | FellowshipReferendaCall_nudge_referendum | FellowshipReferendaCall_one_fewer_deciding | FellowshipReferendaCall_place_decision_deposit | FellowshipReferendaCall_refund_decision_deposit | FellowshipReferendaCall_refund_submission_deposit | FellowshipReferendaCall_submit + +/** + * Cancel an ongoing referendum. + * + * - `origin`: must be the `CancelOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Cancelled`. + */ +export interface FellowshipReferendaCall_cancel { + __kind: 'cancel' + index: number +} + +/** + * Cancel an ongoing referendum and slash the deposits. + * + * - `origin`: must be the `KillOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Killed` and `DepositSlashed`. + */ +export interface FellowshipReferendaCall_kill { + __kind: 'kill' + index: number +} + +/** + * Advance a referendum onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `index`: the referendum to be advanced. + */ +export interface FellowshipReferendaCall_nudge_referendum { + __kind: 'nudge_referendum' + index: number +} + +/** + * Advance a track onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `track`: the track to be advanced. + * + * Action item for when there is now one fewer referendum in the deciding phase and the + * `DecidingCount` is not yet updated. This means that we should either: + * - begin deciding another referendum (and leave `DecidingCount` alone); or + * - decrement `DecidingCount`. + */ +export interface FellowshipReferendaCall_one_fewer_deciding { + __kind: 'one_fewer_deciding' + track: number +} + +/** + * Post the Decision Deposit for a referendum. + * + * - `origin`: must be `Signed` and the account must have funds available for the + * referendum's track's Decision Deposit. + * - `index`: The index of the submitted referendum whose Decision Deposit is yet to be + * posted. + * + * Emits `DecisionDepositPlaced`. + */ +export interface FellowshipReferendaCall_place_decision_deposit { + __kind: 'place_decision_deposit' + index: number +} + +/** + * Refund the Decision Deposit for a closed referendum back to the depositor. + * + * - `origin`: must be `Signed` or `Root`. + * - `index`: The index of a closed referendum whose Decision Deposit has not yet been + * refunded. + * + * Emits `DecisionDepositRefunded`. + */ +export interface FellowshipReferendaCall_refund_decision_deposit { + __kind: 'refund_decision_deposit' + index: number +} + +/** + * Refund the Submission Deposit for a closed referendum back to the depositor. + * + * - `origin`: must be `Signed` or `Root`. + * - `index`: The index of a closed referendum whose Submission Deposit has not yet been + * refunded. + * + * Emits `SubmissionDepositRefunded`. + */ +export interface FellowshipReferendaCall_refund_submission_deposit { + __kind: 'refund_submission_deposit' + index: number +} + +/** + * Propose a referendum on a privileged action. + * + * - `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds + * available. + * - `proposal_origin`: The origin from which the proposal should be executed. + * - `proposal`: The proposal. + * - `enactment_moment`: The moment that the proposal should be enacted. + * + * Emits `Submitted`. + */ +export interface FellowshipReferendaCall_submit { + __kind: 'submit' + proposalOrigin: OriginCaller + proposal: Bounded + enactmentMoment: DispatchTime +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const FellowshipCollectiveCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: MultiAddress, + }), + cleanup_poll: sts.enumStruct({ + pollIndex: sts.number(), + max: sts.number(), + }), + demote_member: sts.enumStruct({ + who: MultiAddress, + }), + promote_member: sts.enumStruct({ + who: MultiAddress, + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + minRank: sts.number(), + }), + vote: sts.enumStruct({ + poll: sts.number(), + aye: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type FellowshipCollectiveCall = FellowshipCollectiveCall_add_member | FellowshipCollectiveCall_cleanup_poll | FellowshipCollectiveCall_demote_member | FellowshipCollectiveCall_promote_member | FellowshipCollectiveCall_remove_member | FellowshipCollectiveCall_vote + +/** + * Introduce a new member. + * + * - `origin`: Must be the `AdminOrigin`. + * - `who`: Account of non-member which will become a member. + * - `rank`: The rank to give the new member. + * + * Weight: `O(1)` + */ +export interface FellowshipCollectiveCall_add_member { + __kind: 'add_member' + who: MultiAddress +} + +/** + * Remove votes from the given poll. It must have ended. + * + * - `origin`: Must be `Signed` by any account. + * - `poll_index`: Index of a poll which is completed and for which votes continue to + * exist. + * - `max`: Maximum number of vote items from remove in this call. + * + * Transaction fees are waived if the operation is successful. + * + * Weight `O(max)` (less if there are fewer items to remove than `max`). + */ +export interface FellowshipCollectiveCall_cleanup_poll { + __kind: 'cleanup_poll' + pollIndex: number + max: number +} + +/** + * Decrement the rank of an existing member by one. If the member is already at rank zero, + * then they are removed entirely. + * + * - `origin`: Must be the `AdminOrigin`. + * - `who`: Account of existing member of rank greater than zero. + * + * Weight: `O(1)`, less if the member's index is highest in its rank. + */ +export interface FellowshipCollectiveCall_demote_member { + __kind: 'demote_member' + who: MultiAddress +} + +/** + * Increment the rank of an existing member by one. + * + * - `origin`: Must be the `AdminOrigin`. + * - `who`: Account of existing member. + * + * Weight: `O(1)` + */ +export interface FellowshipCollectiveCall_promote_member { + __kind: 'promote_member' + who: MultiAddress +} + +/** + * Remove the member entirely. + * + * - `origin`: Must be the `AdminOrigin`. + * - `who`: Account of existing member of rank greater than zero. + * - `min_rank`: The rank of the member or greater. + * + * Weight: `O(min_rank)`. + */ +export interface FellowshipCollectiveCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + minRank: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * - `origin`: Must be `Signed` by a member account. + * - `poll`: Index of a poll which is ongoing. + * - `aye`: `true` if the vote is to approve the proposal, `false` otherwise. + * + * Transaction fees are be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * + * Weight: `O(1)`, less if there was no previous vote on the poll by the member. + */ +export interface FellowshipCollectiveCall_vote { + __kind: 'vote' + poll: number + aye: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const FastUnstakeCall: sts.Type = sts.closedEnum(() => { + return { + control: sts.enumStruct({ + erasToCheck: sts.number(), + }), + deregister: sts.unit(), + register_fast_unstake: sts.unit(), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type FastUnstakeCall = FastUnstakeCall_control | FastUnstakeCall_deregister | FastUnstakeCall_register_fast_unstake + +/** + * Control the operation of this pallet. + * + * Dispatch origin must be signed by the [`Config::ControlOrigin`]. + */ +export interface FastUnstakeCall_control { + __kind: 'control' + erasToCheck: number +} + +/** + * Deregister oneself from the fast-unstake. + * + * This is useful if one is registered, they are still waiting, and they change their mind. + * + * Note that the associated stash is still fully unbonded and chilled as a consequence of + * calling `register_fast_unstake`. This should probably be followed by a call to + * `Staking::rebond`. + */ +export interface FastUnstakeCall_deregister { + __kind: 'deregister' +} + +/** + * Register oneself for fast-unstake. + * + * The dispatch origin of this call must be signed by the controller account, similar to + * `staking::unbond`. + * + * The stash associated with the origin must have no ongoing unlocking chunks. If + * successful, this will fully unbond and chill the stash. Then, it will enqueue the stash + * to be checked in further blocks. + * + * If by the time this is called, the stash is actually eligible for fast-unstake, then + * they are guaranteed to remain eligible, because the call will chill them as well. + * + * If the check works, the entire staking data is removed, i.e. the stash is fully + * unstaked. + * + * If the check fails, the stash remains chilled and waiting for being unbonded as in with + * the normal staking system, but they lose part of their unbonding chunks due to consuming + * the chain's resources. + */ +export interface FastUnstakeCall_register_fast_unstake { + __kind: 'register_fast_unstake' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + governance_fallback: sts.enumStruct({ + maybeMaxVoters: sts.option(() => sts.number()), + maybeMaxTargets: sts.option(() => sts.number()), + }), + set_emergency_election_result: sts.enumStruct({ + supports: sts.array(() => sts.tuple(() => [AccountId32, Support])), + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => ElectionScore), + }), + submit: sts.enumStruct({ + rawSolution: RawSolution, + }), + submit_unsigned: sts.enumStruct({ + rawSolution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export const RawSolution: sts.Type = sts.struct(() => { + return { + solution: NposCompactSolution24, + score: ElectionScore, + round: sts.number(), + } +}) + +export const NposCompactSolution24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), + votes2: sts.array(() => sts.tuple(() => [sts.number(), sts.tuple(() => [sts.number(), sts.number()]), sts.number()])), + votes3: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes4: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes5: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes6: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes7: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes8: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes9: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes10: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes11: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes12: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes13: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes14: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes15: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes16: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes17: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes18: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes19: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes20: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes21: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes22: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes23: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes24: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + } +}) + +export interface NposCompactSolution24 { + votes1: [number, number][] + votes2: [number, [number, number], number][] + votes3: [number, [number, number][], number][] + votes4: [number, [number, number][], number][] + votes5: [number, [number, number][], number][] + votes6: [number, [number, number][], number][] + votes7: [number, [number, number][], number][] + votes8: [number, [number, number][], number][] + votes9: [number, [number, number][], number][] + votes10: [number, [number, number][], number][] + votes11: [number, [number, number][], number][] + votes12: [number, [number, number][], number][] + votes13: [number, [number, number][], number][] + votes14: [number, [number, number][], number][] + votes15: [number, [number, number][], number][] + votes16: [number, [number, number][], number][] + votes17: [number, [number, number][], number][] + votes18: [number, [number, number][], number][] + votes19: [number, [number, number][], number][] + votes20: [number, [number, number][], number][] + votes21: [number, [number, number][], number][] + votes22: [number, [number, number][], number][] + votes23: [number, [number, number][], number][] + votes24: [number, [number, number][], number][] +} + +export interface RawSolution { + solution: NposCompactSolution24 + score: ElectionScore + round: number +} + +export interface ElectionScore { + minimalStake: bigint + sumStake: bigint + sumStakeSquared: bigint +} + +export const ElectionScore: sts.Type = sts.struct(() => { + return { + minimalStake: sts.bigint(), + sumStake: sts.bigint(), + sumStakeSquared: sts.bigint(), + } +}) + +export const Support: sts.Type = sts.struct(() => { + return { + total: sts.bigint(), + voters: sts.array(() => sts.tuple(() => [AccountId32, sts.bigint()])), + } +}) + +export interface Support { + total: bigint + voters: [AccountId32, bigint][] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_governance_fallback | ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * Trigger the governance fallback. + * + * This can only be called when [`Phase::Emergency`] is enabled, as an alternative to + * calling [`Call::set_emergency_election_result`]. + */ +export interface ElectionProviderMultiPhaseCall_governance_fallback { + __kind: 'governance_fallback' + maybeMaxVoters?: (number | undefined) + maybeMaxTargets?: (number | undefined) +} + +/** + * Set a solution in the queue, to be handed out to the client of this pallet in the next + * call to `ElectionProvider::elect`. + * + * This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`. + * + * The solution is not checked for any feasibility and is assumed to be trustworthy, as any + * feasibility check itself can in principle cause the election process to fail (due to + * memory/weight constrains). + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + supports: [AccountId32, Support][] +} + +/** + * Set a new value for `MinimumUntrustedScore`. + * + * Dispatch origin must be aligned with `T::ForceOrigin`. + * + * This check can be turned off by setting the value to `None`. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (ElectionScore | undefined) +} + +/** + * Submit a solution for the signed phase. + * + * The dispatch origin fo this call must be __signed__. + * + * The solution is potentially queued, based on the claimed score and processed at the end + * of the signed phase. + * + * A deposit is reserved and recorded for the solution. Based on the outcome, the solution + * might be rewarded, slashed, or get all or a part of the deposit back. + */ +export interface ElectionProviderMultiPhaseCall_submit { + __kind: 'submit' + rawSolution: RawSolution +} + +/** + * Submit a solution for the unsigned phase. + * + * The dispatch origin fo this call must be __none__. + * + * This submission is checked on the fly. Moreover, this unsigned solution is only + * validated when submitted to the pool from the **local** node. Effectively, this means + * that only active validators can submit this transaction when authoring a block (similar + * to an inherent). + * + * To prevent any incorrect solution (and thus wasted time/weight), this transaction will + * panic if the solution submitted by the validator is invalid in any way, effectively + * putting their authoring reward at risk. + * + * No deposit or reward is associated with this submission. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + rawSolution: RawSolution + witness: SolutionOrSnapshotSize +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DmpCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DmpCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const DemocracyCall: sts.Type = sts.closedEnum(() => { + return { + blacklist: sts.enumStruct({ + proposalHash: H256, + maybeRefIndex: sts.option(() => sts.number()), + }), + cancel_proposal: sts.enumStruct({ + propIndex: sts.number(), + }), + cancel_referendum: sts.enumStruct({ + refIndex: sts.number(), + }), + clear_public_proposals: sts.unit(), + delegate: sts.enumStruct({ + to: MultiAddress, + conviction: Conviction, + balance: sts.bigint(), + }), + emergency_cancel: sts.enumStruct({ + refIndex: sts.number(), + }), + external_propose: sts.enumStruct({ + proposal: Bounded, + }), + external_propose_default: sts.enumStruct({ + proposal: Bounded, + }), + external_propose_majority: sts.enumStruct({ + proposal: Bounded, + }), + fast_track: sts.enumStruct({ + proposalHash: H256, + votingPeriod: sts.number(), + delay: sts.number(), + }), + propose: sts.enumStruct({ + proposal: Bounded, + value: sts.bigint(), + }), + remove_other_vote: sts.enumStruct({ + target: MultiAddress, + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + index: sts.number(), + }), + second: sts.enumStruct({ + proposal: sts.number(), + }), + undelegate: sts.unit(), + unlock: sts.enumStruct({ + target: MultiAddress, + }), + veto_external: sts.enumStruct({ + proposalHash: H256, + }), + vote: sts.enumStruct({ + refIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type AccountVote = AccountVote_Split | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface AccountVote_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type DemocracyCall = DemocracyCall_blacklist | DemocracyCall_cancel_proposal | DemocracyCall_cancel_referendum | DemocracyCall_clear_public_proposals | DemocracyCall_delegate | DemocracyCall_emergency_cancel | DemocracyCall_external_propose | DemocracyCall_external_propose_default | DemocracyCall_external_propose_majority | DemocracyCall_fast_track | DemocracyCall_propose | DemocracyCall_remove_other_vote | DemocracyCall_remove_vote | DemocracyCall_second | DemocracyCall_undelegate | DemocracyCall_unlock | DemocracyCall_veto_external | DemocracyCall_vote + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. + * + * If called on a queued public or external proposal, then this will result in it being + * removed. If the `ref_index` supplied is an active referendum with the proposal hash, + * then it will be cancelled. + * + * The dispatch origin of this call must be `BlacklistOrigin`. + * + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. + * + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). + */ +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: H256 + maybeRefIndex?: (number | undefined) +} + +/** + * Remove a proposal. + * + * The dispatch origin of this call must be `CancelProposalOrigin`. + * + * - `prop_index`: The index of the proposal to cancel. + * + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number +} + +/** + * Remove a referendum. + * + * The dispatch origin of this call must be _Root_. + * + * - `ref_index`: The index of the referendum to cancel. + * + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Clears all public proposals. + * + * The dispatch origin of this call must be _Root_. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' +} + +/** + * Delegate the voting power (with some given conviction) of the sending account. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must not + * be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: MultiAddress + conviction: Conviction + balance: bigint +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. + * + * The dispatch origin of this call must be `CancellationOrigin`. + * + * -`ref_index`: The index of the referendum to cancel. + * + * Weight: `O(1)`. + */ +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: number +} + +/** + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. + * + * The dispatch origin of this call must be `ExternalOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + */ +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposal: Bounded +} + +/** + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. + * + * The dispatch of this call must be `ExternalDefaultOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposal: Bounded +} + +/** + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. + * + * The dispatch of this call must be `ExternalMajorityOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal. + * + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposal: Bounded +} + +/** + * Schedule the currently externally-proposed majority-carries referendum to be tabled + * immediately. If there is no externally-proposed referendum currently, or if there is one + * but it is not a majority-carries referendum then it fails. + * + * The dispatch of this call must be `FastTrackOrigin`. + * + * - `proposal_hash`: The hash of the current external proposal. + * - `voting_period`: The period that is allowed for voting on this proposal. Increased to + * Must be always greater than zero. + * For `FastTrackOrigin` must be equal or greater than `FastTrackVotingPeriod`. + * - `delay`: The number of block after voting has ended in approval and this should be + * enacted. This doesn't have a minimum amount. + * + * Emits `Started`. + * + * Weight: `O(1)` + */ +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: H256 + votingPeriod: number + delay: number +} + +/** + * Propose a sensitive action to be taken. + * + * The dispatch origin of this call must be _Signed_ and the sender must + * have funds to cover the deposit. + * + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * + * Emits `Proposed`. + */ +export interface DemocracyCall_propose { + __kind: 'propose' + proposal: Bounded + value: bigint +} + +/** + * Remove a vote for a referendum. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the referendum was cancelled, because the voter lost the referendum or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for + * referendum `index`. + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: MultiAddress + index: number +} + +/** + * Remove a vote for a referendum. + * + * If: + * - the referendum was cancelled, or + * - the referendum is ongoing, or + * - the referendum has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the referendum has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. + * + * - `index`: The index of referendum of the vote to be removed. + * + * Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: number +} + +/** + * Signals agreement with a particular proposal. + * + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. + * + * - `proposal`: The index of the proposal to second. + */ +export interface DemocracyCall_second { + __kind: 'second' + proposal: number +} + +/** + * Undelegate the voting power of the sending account. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of referendums the voter delegating to has + * voted on. Weight is charged as if maximum votes. + */ +export interface DemocracyCall_undelegate { + __kind: 'undelegate' +} + +/** + * Unlock tokens that have an expired lock. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: MultiAddress +} + +/** + * Veto and blacklist the external proposal hash. + * + * The dispatch origin of this call must be `VetoOrigin`. + * + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * + * Emits `Vetoed`. + * + * Weight: `O(V + log(V))` where V is number of `existing vetoers` + */ +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: H256 +} + +/** + * Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. + */ +export interface DemocracyCall_vote { + __kind: 'vote' + refIndex: number + vote: AccountVote +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: Id, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + contribute_all: sts.enumStruct({ + index: sts.number(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: Id, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId32, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_contribute_all | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * Add an optional memo to an existing crowdloan contribution. + * + * Origin must be Signed, and the user must have contributed to the crowdloan. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: Id + memo: Bytes +} + +/** + * Contribute to a crowd sale. This will transfer some balance over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * Contribute your entire balance to a crowd sale. This will transfer the entire balance of a user over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute_all { + __kind: 'contribute_all' + index: number + signature?: (MultiSignature | undefined) +} + +/** + * Create a new crowdloaning campaign for a parachain slot with the given lease period range. + * + * This applies a lock to your parachain configuration, ensuring that it cannot be changed + * by the parachain manager. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Remove a fund after the retirement period has ended and all funds have been returned. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * Edit the configuration for an in-progress crowdloan. + * + * Can only be called by Root origin. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Poke the fund into `NewRaise` + * + * Origin must be Signed, and the fund has non-zero raise. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: Id +} + +/** + * Automatically refund contributors of an ended crowdloan. + * Due to weight restrictions, this function may need to be called multiple + * times to fully refund all users. We will refund `RemoveKeysLimit` users at a time. + * + * Origin must be signed, but can come from anyone. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * Withdraw full balance of a specific contributor. + * + * Origin must be signed, but can come from anyone. + * + * The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement + * flag must be set. For a fund to be ready for retirement, then: + * - it must not already be in retirement; + * - the amount of raised funds must be bigger than the _free_ balance of the account; + * - and either: + * - the block number must be at least `end`; or + * - the current lease period must be greater than the fund's `last_period`. + * + * In this case, the fund's retirement flag is set and its `end` is reset to the current block + * number. + * + * - `who`: The account whose contribution should be withdrawn. + * - `index`: The parachain to whose crowdloan the contribution was made. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CouncilCall: sts.Type = sts.closedEnum(() => { + return { + close: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: Weight, + lengthBound: sts.number(), + }), + close_old_weight: sts.enumStruct({ + proposalHash: H256, + index: sts.number(), + proposalWeightBound: sts.bigint(), + lengthBound: sts.number(), + }), + disapprove_proposal: sts.enumStruct({ + proposalHash: H256, + }), + execute: sts.enumStruct({ + proposal: Call, + lengthBound: sts.number(), + }), + propose: sts.enumStruct({ + threshold: sts.number(), + proposal: Call, + lengthBound: sts.number(), + }), + set_members: sts.enumStruct({ + newMembers: sts.array(() => AccountId32), + prime: sts.option(() => AccountId32), + oldCount: sts.number(), + }), + vote: sts.enumStruct({ + proposal: H256, + index: sts.number(), + approve: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CouncilCall = CouncilCall_close | CouncilCall_close_old_weight | CouncilCall_disapprove_proposal | CouncilCall_execute | CouncilCall_propose | CouncilCall_set_members | CouncilCall_vote + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close { + __kind: 'close' + proposalHash: H256 + index: number + proposalWeightBound: Weight + lengthBound: number +} + +/** + * Close a vote that is either approved, disapproved or whose voting period has ended. + * + * May be called by any signed account in order to finish voting and close the proposal. + * + * If called before the end of the voting period it will only close the vote if it is + * has enough votes to be approved or disapproved. + * + * If called after the end of the voting period abstentions are counted as rejections + * unless there is a prime member set and the prime member cast an approval. + * + * If the close operation completes successfully with disapproval, the transaction fee will + * be waived. Otherwise execution of the approved operation will be charged to the caller. + * + * + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed + * proposal. + * + `length_bound`: The upper bound for the length of the proposal in storage. Checked via + * `storage::read` so it is `size_of::() == 4` larger than the pure length. + * + * # + * ## Weight + * - `O(B + M + P1 + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - `P1` is the complexity of `proposal` preimage. + * - `P2` is proposal-count (code-bounded) + * - DB: + * - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`) + * - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec + * `O(P2)`) + * - any mutations done while executing `proposal` (`P1`) + * - up to 3 events + * # + */ +export interface CouncilCall_close_old_weight { + __kind: 'close_old_weight' + proposalHash: H256 + index: number + proposalWeightBound: bigint + lengthBound: number +} + +/** + * Disapprove a proposal, close, and remove it from the system, regardless of its current + * state. + * + * Must be called by the Root origin. + * + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. + * + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface CouncilCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: H256 +} + +/** + * Dispatch a proposal from a member using the `Member` origin. + * + * Origin must be a member of the collective. + * + * # + * ## Weight + * - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching + * `proposal` + * - DB: 1 read (codec `O(M)`) + DB access of `proposal` + * - 1 event + * # + */ +export interface CouncilCall_execute { + __kind: 'execute' + proposal: Call + lengthBound: number +} + +/** + * Add a new proposal to either be voted on or executed directly. + * + * Requires the sender to be member. + * + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. + * + * # + * ## Weight + * - `O(B + M + P1)` or `O(B + M + P2)` where: + * - `B` is `proposal` size in bytes (length-fee-bounded) + * - `M` is members-count (code- and governance-bounded) + * - branching is influenced by `threshold` where: + * - `P1` is proposal execution complexity (`threshold < 2`) + * - `P2` is proposals-count (code-bounded) (`threshold >= 2`) + * - DB: + * - 1 storage read `is_member` (codec `O(M)`) + * - 1 storage read `ProposalOf::contains_key` (codec `O(1)`) + * - DB accesses influenced by `threshold`: + * - EITHER storage accesses done by `proposal` (`threshold < 2`) + * - OR proposal insertion (`threshold <= 2`) + * - 1 storage mutation `Proposals` (codec `O(P2)`) + * - 1 storage mutation `ProposalCount` (codec `O(1)`) + * - 1 storage write `ProposalOf` (codec `O(B)`) + * - 1 storage write `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_propose { + __kind: 'propose' + threshold: number + proposal: Call + lengthBound: number +} + +/** + * Set the collective's membership. + * + * - `new_members`: The new member list. Be nice to the chain and provide it sorted. + * - `prime`: The prime member whose vote sets the default. + * - `old_count`: The upper bound for the previous number of members in storage. Used for + * weight estimation. + * + * Requires root origin. + * + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but + * the weight estimations rely on it to estimate dispatchable weight. + * + * # WARNING: + * + * The `pallet-collective` can also be managed by logic outside of the pallet through the + * implementation of the trait [`ChangeMembers`]. + * Any call to `set_members` must be careful that the member set doesn't get out of sync + * with other logic managing the member set. + * + * # + * ## Weight + * - `O(MP + N)` where: + * - `M` old-members-count (code- and governance-bounded) + * - `N` new-members-count (code- and governance-bounded) + * - `P` proposals-count (code-bounded) + * - DB: + * - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the + * members + * - 1 storage read (codec `O(P)`) for reading the proposals + * - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal + * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one + * # + */ +export interface CouncilCall_set_members { + __kind: 'set_members' + newMembers: AccountId32[] + prime?: (AccountId32 | undefined) + oldCount: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * Requires the sender to be a member. + * + * Transaction fees will be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * # + * ## Weight + * - `O(M)` where `M` is members-count (code- and governance-bounded) + * - DB: + * - 1 storage read `Members` (codec `O(M)`) + * - 1 storage mutation `Voting` (codec `O(M)`) + * - 1 event + * # + */ +export interface CouncilCall_vote { + __kind: 'vote' + proposal: H256 + index: number + approve: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ConvictionVotingCall: sts.Type = sts.closedEnum(() => { + return { + delegate: sts.enumStruct({ + class: sts.number(), + to: MultiAddress, + conviction: Type_145, + balance: sts.bigint(), + }), + remove_other_vote: sts.enumStruct({ + target: MultiAddress, + class: sts.number(), + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + class: sts.option(() => sts.number()), + index: sts.number(), + }), + undelegate: sts.enumStruct({ + class: sts.number(), + }), + unlock: sts.enumStruct({ + class: sts.number(), + target: MultiAddress, + }), + vote: sts.enumStruct({ + pollIndex: sts.number(), + vote: Type_143, + }), + } +}) + +export const Type_143: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + SplitAbstain: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + abstain: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type Type_143 = Type_143_Split | Type_143_SplitAbstain | Type_143_Standard + +export interface Type_143_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface Type_143_SplitAbstain { + __kind: 'SplitAbstain' + aye: bigint + nay: bigint + abstain: bigint +} + +export interface Type_143_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Type_145: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Type_145 = Type_145_Locked1x | Type_145_Locked2x | Type_145_Locked3x | Type_145_Locked4x | Type_145_Locked5x | Type_145_Locked6x | Type_145_None + +export interface Type_145_Locked1x { + __kind: 'Locked1x' +} + +export interface Type_145_Locked2x { + __kind: 'Locked2x' +} + +export interface Type_145_Locked3x { + __kind: 'Locked3x' +} + +export interface Type_145_Locked4x { + __kind: 'Locked4x' +} + +export interface Type_145_Locked5x { + __kind: 'Locked5x' +} + +export interface Type_145_Locked6x { + __kind: 'Locked6x' +} + +export interface Type_145_None { + __kind: 'None' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ConvictionVotingCall = ConvictionVotingCall_delegate | ConvictionVotingCall_remove_other_vote | ConvictionVotingCall_remove_vote | ConvictionVotingCall_undelegate | ConvictionVotingCall_unlock | ConvictionVotingCall_vote + +/** + * Delegate the voting power (with some given conviction) of the sending account for a + * particular class of polls. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `class`: The class of polls to delegate. To delegate multiple classes, multiple calls + * to this function are required. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must not + * be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of polls the voter delegating to has + * voted on. Weight is initially charged as if maximum votes, but is refunded later. + */ +export interface ConvictionVotingCall_delegate { + __kind: 'delegate' + class: number + to: MultiAddress + conviction: Type_145 + balance: bigint +} + +/** + * Remove a vote for a poll. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the poll was cancelled, because the voter lost the poll or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for poll + * `index`. + * - `index`: The index of poll of the vote to be removed. + * - `class`: The class of the poll. + * + * Weight: `O(R + log R)` where R is the number of polls that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface ConvictionVotingCall_remove_other_vote { + __kind: 'remove_other_vote' + target: MultiAddress + class: number + index: number +} + +/** + * Remove a vote for a poll. + * + * If: + * - the poll was cancelled, or + * - the poll is ongoing, or + * - the poll has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the poll has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for poll `index`. + * + * - `index`: The index of poll of the vote to be removed. + * - `class`: Optional parameter, if given it indicates the class of the poll. For polls + * which have finished or are cancelled, this must be `Some`. + * + * Weight: `O(R + log R)` where R is the number of polls that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface ConvictionVotingCall_remove_vote { + __kind: 'remove_vote' + class?: (number | undefined) + index: number +} + +/** + * Undelegate the voting power of the sending account for a particular class of polls. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued has passed. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * - `class`: The class of polls to remove the delegation from. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of polls the voter delegating to has + * voted on. Weight is initially charged as if maximum votes, but is refunded later. + */ +export interface ConvictionVotingCall_undelegate { + __kind: 'undelegate' + class: number +} + +/** + * Remove the lock caused by prior voting/delegating which has expired within a particular + * class. + * + * The dispatch origin of this call must be _Signed_. + * + * - `class`: The class of polls to unlock. + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface ConvictionVotingCall_unlock { + __kind: 'unlock' + class: number + target: MultiAddress +} + +/** + * Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `poll_index`: The index of the poll to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of polls the voter has voted on. + */ +export interface ConvictionVotingCall_vote { + __kind: 'vote' + pollIndex: number + vote: Type_143 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_bypass_consistency_check: sts.enumStruct({ + new: sts.boolean(), + }), + set_chain_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_code_retention_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_conclusion_by_time_out_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: sts.number(), + }), + set_group_rotation_frequency: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_minimum_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_cores: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_retries: sts.enumStruct({ + new: sts.number(), + }), + set_pvf_checking_enabled: sts.enumStruct({ + new: sts.boolean(), + }), + set_pvf_voting_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_thread_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_ump_max_individual_weight: sts.enumStruct({ + new: Weight, + }), + set_ump_service_total_weight: sts.enumStruct({ + new: Weight, + }), + set_validation_upgrade_cooldown: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ConfigurationCall = ConfigurationCall_set_bypass_consistency_check | ConfigurationCall_set_chain_availability_period | ConfigurationCall_set_code_retention_period | ConfigurationCall_set_dispute_conclusion_by_time_out_period | ConfigurationCall_set_dispute_period | ConfigurationCall_set_dispute_post_conclusion_acceptance_period | ConfigurationCall_set_group_rotation_frequency | ConfigurationCall_set_hrmp_channel_max_capacity | ConfigurationCall_set_hrmp_channel_max_message_size | ConfigurationCall_set_hrmp_channel_max_total_size | ConfigurationCall_set_hrmp_max_message_num_per_candidate | ConfigurationCall_set_hrmp_max_parachain_inbound_channels | ConfigurationCall_set_hrmp_max_parachain_outbound_channels | ConfigurationCall_set_hrmp_max_parathread_inbound_channels | ConfigurationCall_set_hrmp_max_parathread_outbound_channels | ConfigurationCall_set_hrmp_open_request_ttl | ConfigurationCall_set_hrmp_recipient_deposit | ConfigurationCall_set_hrmp_sender_deposit | ConfigurationCall_set_max_code_size | ConfigurationCall_set_max_downward_message_size | ConfigurationCall_set_max_head_data_size | ConfigurationCall_set_max_pov_size | ConfigurationCall_set_max_upward_message_num_per_candidate | ConfigurationCall_set_max_upward_message_size | ConfigurationCall_set_max_upward_queue_count | ConfigurationCall_set_max_upward_queue_size | ConfigurationCall_set_max_validators | ConfigurationCall_set_max_validators_per_core | ConfigurationCall_set_minimum_validation_upgrade_delay | ConfigurationCall_set_n_delay_tranches | ConfigurationCall_set_needed_approvals | ConfigurationCall_set_no_show_slots | ConfigurationCall_set_parathread_cores | ConfigurationCall_set_parathread_retries | ConfigurationCall_set_pvf_checking_enabled | ConfigurationCall_set_pvf_voting_ttl | ConfigurationCall_set_relay_vrf_modulo_samples | ConfigurationCall_set_scheduling_lookahead | ConfigurationCall_set_thread_availability_period | ConfigurationCall_set_ump_max_individual_weight | ConfigurationCall_set_ump_service_total_weight | ConfigurationCall_set_validation_upgrade_cooldown | ConfigurationCall_set_validation_upgrade_delay | ConfigurationCall_set_zeroth_delay_tranche_width + +/** + * Setting this to true will disable consistency checks for the configuration setters. + * Use with caution. + */ +export interface ConfigurationCall_set_bypass_consistency_check { + __kind: 'set_bypass_consistency_check' + new: boolean +} + +/** + * Set the availability period for parachains. + */ +export interface ConfigurationCall_set_chain_availability_period { + __kind: 'set_chain_availability_period' + new: number +} + +/** + * Set the acceptance period for an included candidate. + */ +export interface ConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: number +} + +/** + * Set the dispute conclusion by time out period. + */ +export interface ConfigurationCall_set_dispute_conclusion_by_time_out_period { + __kind: 'set_dispute_conclusion_by_time_out_period' + new: number +} + +/** + * Set the dispute period, in number of sessions to keep for disputes. + */ +export interface ConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: number +} + +/** + * Set the dispute post conclusion acceptance period. + */ +export interface ConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: number +} + +/** + * Set the parachain validator-group rotation frequency + */ +export interface ConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: number +} + +/** + * Sets the maximum number of messages allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * Sets the maximum size of a message that could ever be put into an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * Sets the maximum total size of messages in bytes allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * Sets the maximum number of outbound HRMP messages can be sent by a candidate. + */ +export interface ConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parachain is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parachain is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parathread is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_inbound_channels { + __kind: 'set_hrmp_max_parathread_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parathread is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_outbound_channels { + __kind: 'set_hrmp_max_parathread_outbound_channels' + new: number +} + +/** + * Sets the number of sessions after which an HRMP open channel request expires. + */ +export interface ConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * Sets the amount of funds that the recipient should provide for accepting opening an HRMP + * channel. + */ +export interface ConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: bigint +} + +/** + * Sets the amount of funds that the sender should provide for opening an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: bigint +} + +/** + * Set the max validation code size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * Set the critical downward message size. + */ +export interface ConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * Set the max head data size for paras. + */ +export interface ConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * Set the max POV block size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * Sets the maximum number of messages that a candidate can contain. + */ +export interface ConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum size of an upward message that can be sent by a candidate. + */ +export interface ConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * Sets the maximum items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * Sets the maximum total size of items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * Set the maximum number of validators to use in parachain consensus. + */ +export interface ConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * Set the maximum number of validators to assign to any core. + */ +export interface ConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * Sets the minimum delay between announcing the upgrade block for a parachain until the + * upgrade taking place. + * + * See the field documentation for information and constraints for the new value. + */ +export interface ConfigurationCall_set_minimum_validation_upgrade_delay { + __kind: 'set_minimum_validation_upgrade_delay' + new: number +} + +/** + * Set the total number of delay tranches. + */ +export interface ConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * Set the number of validators needed to approve a block. + */ +export interface ConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * Set the no show slots, in number of number of consensus slots. + * Must be at least 1. + */ +export interface ConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * Set the number of parathread execution cores. + */ +export interface ConfigurationCall_set_parathread_cores { + __kind: 'set_parathread_cores' + new: number +} + +/** + * Set the number of retries for a particular parathread. + */ +export interface ConfigurationCall_set_parathread_retries { + __kind: 'set_parathread_retries' + new: number +} + +/** + * Enable or disable PVF pre-checking. Consult the field documentation prior executing. + */ +export interface ConfigurationCall_set_pvf_checking_enabled { + __kind: 'set_pvf_checking_enabled' + new: boolean +} + +/** + * Set the number of session changes after which a PVF pre-checking voting is rejected. + */ +export interface ConfigurationCall_set_pvf_voting_ttl { + __kind: 'set_pvf_voting_ttl' + new: number +} + +/** + * Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion. + */ +export interface ConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * Set the scheduling lookahead, in expected number of blocks at peak throughput. + */ +export interface ConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * Set the availability period for parathreads. + */ +export interface ConfigurationCall_set_thread_availability_period { + __kind: 'set_thread_availability_period' + new: number +} + +/** + * Sets the maximum amount of weight any individual upward message may consume. + */ +export interface ConfigurationCall_set_ump_max_individual_weight { + __kind: 'set_ump_max_individual_weight' + new: Weight +} + +/** + * Sets the soft limit for the phase of dispatching dispatchable upward messages. + */ +export interface ConfigurationCall_set_ump_service_total_weight { + __kind: 'set_ump_service_total_weight' + new: Weight +} + +/** + * Set the validation upgrade cooldown. + */ +export interface ConfigurationCall_set_validation_upgrade_cooldown { + __kind: 'set_validation_upgrade_cooldown' + new: number +} + +/** + * Set the validation upgrade delay. + */ +export interface ConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: number +} + +/** + * Set the zeroth delay tranche width. + */ +export interface ConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: sts.bigint(), + vestingSchedule: sts.option(() => sts.tuple(() => [sts.bigint(), sts.bigint(), sts.number()])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId32), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId32 + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId32 + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: bigint + vestingSchedule?: ([bigint, bigint, number] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId32 | undefined) +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ChildBountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + add_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + value: sts.bigint(), + description: sts.bytes(), + }), + award_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + close_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + propose_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ChildBountiesCall = ChildBountiesCall_accept_curator | ChildBountiesCall_add_child_bounty | ChildBountiesCall_award_child_bounty | ChildBountiesCall_claim_child_bounty | ChildBountiesCall_close_child_bounty | ChildBountiesCall_propose_curator | ChildBountiesCall_unassign_curator + +/** + * Accept the curator role for the child-bounty. + * + * The dispatch origin for this call must be the curator of this + * child-bounty. + * + * A deposit will be reserved from the curator and refund upon + * successful payout or cancellation. + * + * Fee for curator is deducted from curator fee of parent bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in "CuratorProposed" state, for processing the + * call. And state of child-bounty is moved to "Active" on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_accept_curator { + __kind: 'accept_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Add a new child-bounty. + * + * The dispatch origin for this call must be the curator of parent + * bounty and the parent bounty must be in "active" state. + * + * Child-bounty gets added successfully & fund gets transferred from + * parent bounty to child-bounty account, if parent bounty has enough + * funds, else the call fails. + * + * Upper bound to maximum number of active child bounties that can be + * added are managed via runtime trait config + * [`Config::MaxActiveChildBountyCount`]. + * + * If the call is success, the status of child-bounty is updated to + * "Added". + * + * - `parent_bounty_id`: Index of parent bounty for which child-bounty is being added. + * - `value`: Value for executing the proposal. + * - `description`: Text description for the child-bounty. + */ +export interface ChildBountiesCall_add_child_bounty { + __kind: 'add_child_bounty' + parentBountyId: number + value: bigint + description: Bytes +} + +/** + * Award child-bounty to a beneficiary. + * + * The beneficiary will be able to claim the funds after a delay. + * + * The dispatch origin for this call must be the parent curator or + * curator of this child-bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in active state, for processing the call. And + * state of child-bounty is moved to "PendingPayout" on successful call + * completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + * - `beneficiary`: Beneficiary account. + */ +export interface ChildBountiesCall_award_child_bounty { + __kind: 'award_child_bounty' + parentBountyId: number + childBountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded child-bounty after payout delay. + * + * The dispatch origin for this call may be any signed origin. + * + * Call works independent of parent bounty state, No need for parent + * bounty to be in active state. + * + * The Beneficiary is paid out with agreed bounty value. Curator fee is + * paid & curator deposit is unreserved. + * + * Child-bounty must be in "PendingPayout" state, for processing the + * call. And instance of child-bounty is removed from the state on + * successful call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_claim_child_bounty { + __kind: 'claim_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * Cancel a proposed or active child-bounty. Child-bounty account funds + * are transferred to parent bounty account. The child-bounty curator + * deposit may be unreserved if possible. + * + * The dispatch origin for this call must be either parent curator or + * `T::RejectOrigin`. + * + * If the state of child-bounty is `Active`, curator deposit is + * unreserved. + * + * If the state of child-bounty is `PendingPayout`, call fails & + * returns `PendingPayout` error. + * + * For the origin other than T::RejectOrigin, parent bounty must be in + * active state, for this child-bounty call to work. For origin + * T::RejectOrigin execution is forced. + * + * Instance of child-bounty is removed from the state on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_close_child_bounty { + __kind: 'close_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * Propose curator for funded child-bounty. + * + * The dispatch origin for this call must be curator of parent bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in "Added" state, for processing the call. And + * state of child-bounty is moved to "CuratorProposed" on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + * - `curator`: Address of child-bounty curator. + * - `fee`: payment fee to child-bounty curator for execution. + */ +export interface ChildBountiesCall_propose_curator { + __kind: 'propose_curator' + parentBountyId: number + childBountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a child-bounty. + * + * The dispatch origin for this call can be either `RejectOrigin`, or + * the curator of the parent bounty, or any signed origin. + * + * For the origin other than T::RejectOrigin and the child-bounty + * curator, parent bounty must be in active state, for this call to + * work. We allow child-bounty curator and T::RejectOrigin to execute + * this call irrespective of the parent bounty state. + * + * If this function is called by the `RejectOrigin` or the + * parent bounty curator, we assume that the child-bounty curator is + * malicious or inactive. As a result, child-bounty curator deposit is + * slashed. + * + * If the origin is the child-bounty curator, we take this as a sign + * that they are unable to do their job, and are willingly giving up. + * We could slash the deposit, but for now we allow them to unreserve + * their deposit and exit without issue. (We may want to change this if + * it is abused.) + * + * Finally, the origin can be anyone iff the child-bounty curator is + * "inactive". Expiry update due of parent bounty is used to estimate + * inactive state of child-bounty curator. + * + * This allows anyone in the community to call out that a child-bounty + * curator is not doing their due diligence, and we should pick a new + * one. In this case the child-bounty curator deposit is slashed. + * + * State of child-bounty is moved to Added state on successful call + * completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_unassign_curator { + __kind: 'unassign_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::SpendOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds + * after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::SpendOrigin`. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is + * malicious or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * # + * - O(1). + * # + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + newReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BalancesCall = BalancesCall_force_transfer | BalancesCall_force_unreserve | BalancesCall_set_balance | BalancesCall_transfer | BalancesCall_transfer_all | BalancesCall_transfer_keep_alive + +/** + * Exactly as `transfer`, except the origin must be root and the source account may be + * specified. + * # + * - Same as transfer, but additional read and write because the source account is not + * assumed to be in the overlay. + * # + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * Unreserve some balance from a user by force. + * + * Can only be called by ROOT. + */ +export interface BalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * Set the balances of a given account. + * + * This will alter `FreeBalance` and `ReservedBalance` in storage. it will + * also alter the total issuance of the system (`TotalIssuance`) appropriately. + * If the new free or reserved balance is below the existential deposit, + * it will reset the account nonce (`frame_system::AccountNonce`). + * + * The dispatch origin for this call is `root`. + */ +export interface BalancesCall_set_balance { + __kind: 'set_balance' + who: MultiAddress + newFree: bigint + newReserved: bigint +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer` will set the `FreeBalance` of the sender and receiver. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + * + * # + * - Dependent on arguments but not critical, given proper implementations for input config + * types. See related functions below. + * - It contains a limited number of reads and writes internally and no complex + * computation. + * + * Related functions: + * + * - `ensure_can_withdraw` is always called internally but has a bounded complexity. + * - Transferring balances to accounts that did not exist before will cause + * `T::OnNewAccount::on_new_account` to be called. + * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. + * - `transfer_keep_alive` works the same way as `transfer`, but has an additional check + * that the transfer will not kill the origin account. + * --------------------------------- + * - Origin account is already in memory, so no DB operations for them. + * # + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: MultiAddress + value: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). # + * - O(1). Just like transfer, but reading the user's transferable balance first. + * # + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * Same as the [`transfer`] call, but with a check that the transfer will not kill the + * origin account. + * + * 99% of the time you want [`transfer`] instead. + * + * [`transfer`]: struct.Pallet.html#method.transfer + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const EquivocationProof: sts.Type = sts.struct(() => { + return { + offender: sts.bytes(), + slot: Slot, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Slot = sts.bigint() + +export interface EquivocationProof { + offender: Bytes + slot: Slot + firstHeader: Header + secondHeader: Header +} + +export type Slot = bigint + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V1: sts.enumStruct({ + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + }), + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type NextConfigDescriptor = NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Plan an epoch config change. The epoch config change is recorded and will be enacted on + * the next call to `enact_epoch_change`. The config will be activated one epoch after. + * Multiple calls to this method will replace any existing planned config change that had + * not been enacted yet. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Cancel an in-progress auction. + * + * Can only be called by Root origin. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +export type Call = Call_Auctions | Call_Babe | Call_Balances | Call_Bounties | Call_ChildBounties | Call_Claims | Call_Configuration | Call_ConvictionVoting | Call_Council | Call_Crowdloan | Call_Democracy | Call_Dmp | Call_ElectionProviderMultiPhase | Call_FastUnstake | Call_FellowshipCollective | Call_FellowshipReferenda | Call_Grandpa | Call_Hrmp | Call_Identity | Call_ImOnline | Call_Indices | Call_Initializer | Call_Multisig | Call_Nis | Call_NisCounterpartBalances | Call_NominationPools | Call_ParaInclusion | Call_ParaInherent | Call_Paras | Call_ParasDisputes | Call_ParasShared | Call_PhragmenElection | Call_Preimage | Call_Proxy | Call_Recovery | Call_Referenda | Call_Registrar | Call_Scheduler | Call_Session | Call_Slots | Call_Society | Call_Staking | Call_System | Call_TechnicalCommittee | Call_TechnicalMembership | Call_Timestamp | Call_Tips | Call_Treasury | Call_Ump | Call_Utility | Call_Vesting | Call_VoterList | Call_Whitelist | Call_XcmPallet + +export interface Call_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Call_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Call_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Call_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Call_ChildBounties { + __kind: 'ChildBounties' + value: ChildBountiesCall +} + +export interface Call_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Call_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Call_ConvictionVoting { + __kind: 'ConvictionVoting' + value: ConvictionVotingCall +} + +export interface Call_Council { + __kind: 'Council' + value: CouncilCall +} + +export interface Call_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Call_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Call_Dmp { + __kind: 'Dmp' + value: DmpCall +} + +export interface Call_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Call_FastUnstake { + __kind: 'FastUnstake' + value: FastUnstakeCall +} + +export interface Call_FellowshipCollective { + __kind: 'FellowshipCollective' + value: FellowshipCollectiveCall +} + +export interface Call_FellowshipReferenda { + __kind: 'FellowshipReferenda' + value: FellowshipReferendaCall +} + +export interface Call_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Call_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Call_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Call_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Call_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Call_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Call_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Call_Nis { + __kind: 'Nis' + value: NisCall +} + +export interface Call_NisCounterpartBalances { + __kind: 'NisCounterpartBalances' + value: NisCounterpartBalancesCall +} + +export interface Call_NominationPools { + __kind: 'NominationPools' + value: NominationPoolsCall +} + +export interface Call_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Call_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Call_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Call_ParasDisputes { + __kind: 'ParasDisputes' + value: ParasDisputesCall +} + +export interface Call_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Call_PhragmenElection { + __kind: 'PhragmenElection' + value: PhragmenElectionCall +} + +export interface Call_Preimage { + __kind: 'Preimage' + value: PreimageCall +} + +export interface Call_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Call_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Call_Referenda { + __kind: 'Referenda' + value: ReferendaCall +} + +export interface Call_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Call_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Call_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Call_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Call_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Call_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Call_System { + __kind: 'System' + value: SystemCall +} + +export interface Call_TechnicalCommittee { + __kind: 'TechnicalCommittee' + value: TechnicalCommitteeCall +} + +export interface Call_TechnicalMembership { + __kind: 'TechnicalMembership' + value: TechnicalMembershipCall +} + +export interface Call_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Call_Tips { + __kind: 'Tips' + value: TipsCall +} + +export interface Call_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Call_Ump { + __kind: 'Ump' + value: UmpCall +} + +export interface Call_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Call_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Call_VoterList { + __kind: 'VoterList' + value: VoterListCall +} + +export interface Call_Whitelist { + __kind: 'Whitelist' + value: WhitelistCall +} + +export interface Call_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NonTransfer: sts.unit(), + Society: sts.unit(), + Staking: sts.unit(), + } +}) + +export const MultiAddress: sts.Type = sts.closedEnum(() => { + return { + Address20: sts.bytes(), + Address32: sts.bytes(), + Id: AccountId32, + Index: sts.unit(), + Raw: sts.bytes(), + } +}) diff --git a/squid/src/types/v9420.ts b/squid/src/types/v9420.ts new file mode 100644 index 00000000..36127f84 --- /dev/null +++ b/squid/src/types/v9420.ts @@ -0,0 +1,12401 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Weight: sts.Type = sts.struct(() => { + return { + refTime: sts.bigint(), + proofSize: sts.bigint(), + } +}) + +export interface Weight { + refTime: bigint + proofSize: bigint +} + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: sts.number(), + index: sts.number(), + } +}) + +export interface Timepoint { + height: number + index: number +} + +export const Call: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + ChildBounties: ChildBountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + ConvictionVoting: ConvictionVotingCall, + Crowdloan: CrowdloanCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + FastUnstake: FastUnstakeCall, + FellowshipCollective: FellowshipCollectiveCall, + FellowshipReferenda: FellowshipReferendaCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Initializer: InitializerCall, + Multisig: MultisigCall, + Nis: NisCall, + NisCounterpartBalances: NisCounterpartBalancesCall, + NominationPools: NominationPoolsCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Paras: ParasCall, + ParasDisputes: ParasDisputesCall, + ParasShared: ParasSharedCall, + ParasSlashing: ParasSlashingCall, + Preimage: PreimageCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Referenda: ReferendaCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + Timestamp: TimestampCall, + Treasury: TreasuryCall, + Ump: UmpCall, + Utility: UtilityCall, + Vesting: VestingCall, + VoterList: VoterListCall, + Whitelist: WhitelistCall, + XcmPallet: XcmPalletCall, + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + execute: sts.enumStruct({ + message: Type_439, + maxWeight: Weight, + }), + force_default_xcm_version: sts.enumStruct({ + maybeXcmVersion: sts.option(() => sts.number()), + }), + force_subscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_suspension: sts.enumStruct({ + suspended: sts.boolean(), + }), + force_unsubscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_xcm_version: sts.enumStruct({ + location: V3MultiLocation, + xcmVersion: sts.number(), + }), + limited_reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V3WeightLimit, + }), + limited_teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V3WeightLimit, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + send: sts.enumStruct({ + dest: VersionedMultiLocation, + message: VersionedXcm, + }), + teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + } +}) + +export const VersionedXcm: sts.Type = sts.closedEnum(() => { + return { + V2: sts.array(() => V2Instruction), + V3: sts.array(() => V3Instruction), + } +}) + +export const V3Instruction: sts.Type = sts.closedEnum(() => { + return { + AliasOrigin: V3MultiLocation, + BurnAsset: sts.array(() => V3MultiAsset), + BuyExecution: sts.enumStruct({ + fees: V3MultiAsset, + weightLimit: V3WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + ticket: V3MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + ClearTopic: sts.unit(), + ClearTransactStatus: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + beneficiary: V3MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + DescendOrigin: V3Junctions, + ExchangeAsset: sts.enumStruct({ + give: V3MultiAssetFilter, + want: sts.array(() => V3MultiAsset), + maximal: sts.boolean(), + }), + ExpectAsset: sts.array(() => V3MultiAsset), + ExpectError: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + ExpectOrigin: sts.option(() => V3MultiLocation), + ExpectPallet: sts.enumStruct({ + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + crateMajor: sts.number(), + minCrateMinor: sts.number(), + }), + ExpectTransactStatus: V3MaybeErrorCode, + ExportMessage: sts.enumStruct({ + network: V3NetworkId, + destination: V3Junctions, + xcm: sts.array(() => V3Instruction), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V3MultiAssetFilter, + reserve: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + LockAsset: sts.enumStruct({ + asset: V3MultiAsset, + unlocker: V3MultiLocation, + }), + NoteUnlockable: sts.enumStruct({ + asset: V3MultiAsset, + owner: V3MultiLocation, + }), + QueryPallet: sts.enumStruct({ + moduleName: sts.bytes(), + responseInfo: V3QueryResponseInfo, + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V3Response, + maxWeight: Weight, + querier: sts.option(() => V3MultiLocation), + }), + ReceiveTeleportedAsset: sts.array(() => V3MultiAsset), + RefundSurplus: sts.unit(), + ReportError: V3QueryResponseInfo, + ReportHolding: sts.enumStruct({ + responseInfo: V3QueryResponseInfo, + assets: V3MultiAssetFilter, + }), + ReportTransactStatus: V3QueryResponseInfo, + RequestUnlock: sts.enumStruct({ + asset: V3MultiAsset, + locker: V3MultiLocation, + }), + ReserveAssetDeposited: sts.array(() => V3MultiAsset), + SetAppendix: sts.array(() => V3Instruction), + SetErrorHandler: sts.array(() => V3Instruction), + SetFeesMode: sts.enumStruct({ + jitWithdraw: sts.boolean(), + }), + SetTopic: sts.bytes(), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: Weight, + }), + Transact: sts.enumStruct({ + originKind: V2OriginKind, + requireWeightAtMost: Weight, + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + beneficiary: V3MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + Trap: sts.bigint(), + UniversalOrigin: V3Junction, + UnlockAsset: sts.enumStruct({ + asset: V3MultiAsset, + target: V3MultiLocation, + }), + UnpaidExecution: sts.enumStruct({ + weightLimit: V3WeightLimit, + checkOrigin: sts.option(() => V3MultiLocation), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V3MultiAsset), + } +}) + +export const V3Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: sts.option(() => V3NetworkId), + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: sts.option(() => V3NetworkId), + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: sts.option(() => V3NetworkId), + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.enumStruct({ + length: sts.number(), + data: sts.bytes(), + }), + GlobalConsensus: V3NetworkId, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V3BodyId, + part: V3BodyPart, + }), + } +}) + +export const V3BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export type V3BodyPart = V3BodyPart_AtLeastProportion | V3BodyPart_Fraction | V3BodyPart_Members | V3BodyPart_MoreThanProportion | V3BodyPart_Voice + +export interface V3BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V3BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V3BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V3BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V3BodyPart_Voice { + __kind: 'Voice' +} + +export const V3BodyId: sts.Type = sts.closedEnum(() => { + return { + Administration: sts.unit(), + Defense: sts.unit(), + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Moniker: sts.bytes(), + Technical: sts.unit(), + Treasury: sts.unit(), + Unit: sts.unit(), + } +}) + +export type V3BodyId = V3BodyId_Administration | V3BodyId_Defense | V3BodyId_Executive | V3BodyId_Index | V3BodyId_Judicial | V3BodyId_Legislative | V3BodyId_Moniker | V3BodyId_Technical | V3BodyId_Treasury | V3BodyId_Unit + +export interface V3BodyId_Administration { + __kind: 'Administration' +} + +export interface V3BodyId_Defense { + __kind: 'Defense' +} + +export interface V3BodyId_Executive { + __kind: 'Executive' +} + +export interface V3BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V3BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V3BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V3BodyId_Moniker { + __kind: 'Moniker' + value: Bytes +} + +export interface V3BodyId_Technical { + __kind: 'Technical' +} + +export interface V3BodyId_Treasury { + __kind: 'Treasury' +} + +export interface V3BodyId_Unit { + __kind: 'Unit' +} + +export type V3Junction = V3Junction_AccountId32 | V3Junction_AccountIndex64 | V3Junction_AccountKey20 | V3Junction_GeneralIndex | V3Junction_GeneralKey | V3Junction_GlobalConsensus | V3Junction_OnlyChild | V3Junction_PalletInstance | V3Junction_Parachain | V3Junction_Plurality + +export interface V3Junction_AccountId32 { + __kind: 'AccountId32' + network?: (V3NetworkId | undefined) + id: Bytes +} + +export interface V3Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network?: (V3NetworkId | undefined) + index: bigint +} + +export interface V3Junction_AccountKey20 { + __kind: 'AccountKey20' + network?: (V3NetworkId | undefined) + key: Bytes +} + +export interface V3Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V3Junction_GeneralKey { + __kind: 'GeneralKey' + length: number + data: Bytes +} + +export interface V3Junction_GlobalConsensus { + __kind: 'GlobalConsensus' + value: V3NetworkId +} + +export interface V3Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V3Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V3Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V3Junction_Plurality { + __kind: 'Plurality' + id: V3BodyId + part: V3BodyPart +} + +export type V3NetworkId = V3NetworkId_BitcoinCash | V3NetworkId_BitcoinCore | V3NetworkId_ByFork | V3NetworkId_ByGenesis | V3NetworkId_Ethereum | V3NetworkId_Kusama | V3NetworkId_Polkadot | V3NetworkId_Rococo | V3NetworkId_Westend | V3NetworkId_Wococo + +export interface V3NetworkId_BitcoinCash { + __kind: 'BitcoinCash' +} + +export interface V3NetworkId_BitcoinCore { + __kind: 'BitcoinCore' +} + +export interface V3NetworkId_ByFork { + __kind: 'ByFork' + blockNumber: bigint + blockHash: Bytes +} + +export interface V3NetworkId_ByGenesis { + __kind: 'ByGenesis' + value: Bytes +} + +export interface V3NetworkId_Ethereum { + __kind: 'Ethereum' + chainId: bigint +} + +export interface V3NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V3NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export interface V3NetworkId_Rococo { + __kind: 'Rococo' +} + +export interface V3NetworkId_Westend { + __kind: 'Westend' +} + +export interface V3NetworkId_Wococo { + __kind: 'Wococo' +} + +export const DoubleEncoded: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncoded { + encoded: Bytes +} + +export const V2OriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type V2OriginKind = V2OriginKind_Native | V2OriginKind_SovereignAccount | V2OriginKind_Superuser | V2OriginKind_Xcm + +export interface V2OriginKind_Native { + __kind: 'Native' +} + +export interface V2OriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface V2OriginKind_Superuser { + __kind: 'Superuser' +} + +export interface V2OriginKind_Xcm { + __kind: 'Xcm' +} + +export const V3Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V3MultiAsset), + DispatchResult: V3MaybeErrorCode, + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + Null: sts.unit(), + PalletsInfo: sts.array(() => V3PalletInfo), + Version: sts.number(), + } +}) + +export const V3PalletInfo: sts.Type = sts.struct(() => { + return { + index: sts.number(), + name: BoundedVec, + moduleName: BoundedVec, + major: sts.number(), + minor: sts.number(), + patch: sts.number(), + } +}) + +export const BoundedVec = sts.bytes() + +export interface V3PalletInfo { + index: number + name: BoundedVec + moduleName: BoundedVec + major: number + minor: number + patch: number +} + +export type BoundedVec = Bytes + +export type V3Response = V3Response_Assets | V3Response_DispatchResult | V3Response_ExecutionResult | V3Response_Null | V3Response_PalletsInfo | V3Response_Version + +export interface V3Response_Assets { + __kind: 'Assets' + value: V3MultiAsset[] +} + +export interface V3Response_DispatchResult { + __kind: 'DispatchResult' + value: V3MaybeErrorCode +} + +export interface V3Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V3Error] | undefined) +} + +export interface V3Response_Null { + __kind: 'Null' +} + +export interface V3Response_PalletsInfo { + __kind: 'PalletsInfo' + value: V3PalletInfo[] +} + +export interface V3Response_Version { + __kind: 'Version' + value: number +} + +export type V3Error = V3Error_AssetNotFound | V3Error_BadOrigin | V3Error_Barrier | V3Error_DestinationUnsupported | V3Error_ExceedsMaxMessageSize | V3Error_ExceedsStackLimit | V3Error_ExpectationFalse | V3Error_ExportError | V3Error_FailedToDecode | V3Error_FailedToTransactAsset | V3Error_FeesNotMet | V3Error_HoldingWouldOverflow | V3Error_InvalidLocation | V3Error_LocationCannotHold | V3Error_LocationFull | V3Error_LocationNotInvertible | V3Error_LockError | V3Error_MaxWeightInvalid | V3Error_NameMismatch | V3Error_NoDeal | V3Error_NoPermission | V3Error_NotDepositable | V3Error_NotHoldingFees | V3Error_NotWithdrawable | V3Error_Overflow | V3Error_PalletNotFound | V3Error_ReanchorFailed | V3Error_TooExpensive | V3Error_Transport | V3Error_Trap | V3Error_Unanchored | V3Error_UnhandledXcmVersion | V3Error_Unimplemented | V3Error_UnknownClaim | V3Error_Unroutable | V3Error_UntrustedReserveLocation | V3Error_UntrustedTeleportLocation | V3Error_VersionIncompatible | V3Error_WeightLimitReached | V3Error_WeightNotComputable + +export interface V3Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V3Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V3Error_Barrier { + __kind: 'Barrier' +} + +export interface V3Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V3Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V3Error_ExceedsStackLimit { + __kind: 'ExceedsStackLimit' +} + +export interface V3Error_ExpectationFalse { + __kind: 'ExpectationFalse' +} + +export interface V3Error_ExportError { + __kind: 'ExportError' +} + +export interface V3Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V3Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V3Error_FeesNotMet { + __kind: 'FeesNotMet' +} + +export interface V3Error_HoldingWouldOverflow { + __kind: 'HoldingWouldOverflow' +} + +export interface V3Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V3Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V3Error_LocationFull { + __kind: 'LocationFull' +} + +export interface V3Error_LocationNotInvertible { + __kind: 'LocationNotInvertible' +} + +export interface V3Error_LockError { + __kind: 'LockError' +} + +export interface V3Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V3Error_NameMismatch { + __kind: 'NameMismatch' +} + +export interface V3Error_NoDeal { + __kind: 'NoDeal' +} + +export interface V3Error_NoPermission { + __kind: 'NoPermission' +} + +export interface V3Error_NotDepositable { + __kind: 'NotDepositable' +} + +export interface V3Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V3Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V3Error_Overflow { + __kind: 'Overflow' +} + +export interface V3Error_PalletNotFound { + __kind: 'PalletNotFound' +} + +export interface V3Error_ReanchorFailed { + __kind: 'ReanchorFailed' +} + +export interface V3Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V3Error_Transport { + __kind: 'Transport' +} + +export interface V3Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V3Error_Unanchored { + __kind: 'Unanchored' +} + +export interface V3Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V3Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V3Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V3Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V3Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V3Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V3Error_VersionIncompatible { + __kind: 'VersionIncompatible' +} + +export interface V3Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: Weight +} + +export interface V3Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V3MaybeErrorCode = V3MaybeErrorCode_Error | V3MaybeErrorCode_Success | V3MaybeErrorCode_TruncatedError + +export interface V3MaybeErrorCode_Error { + __kind: 'Error' + value: Bytes +} + +export interface V3MaybeErrorCode_Success { + __kind: 'Success' +} + +export interface V3MaybeErrorCode_TruncatedError { + __kind: 'TruncatedError' + value: Bytes +} + +export interface V3MultiAsset { + id: V3AssetId + fun: V3Fungibility +} + +export type V3Fungibility = V3Fungibility_Fungible | V3Fungibility_NonFungible + +export interface V3Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V3Fungibility_NonFungible { + __kind: 'NonFungible' + value: V3AssetInstance +} + +export type V3AssetInstance = V3AssetInstance_Array16 | V3AssetInstance_Array32 | V3AssetInstance_Array4 | V3AssetInstance_Array8 | V3AssetInstance_Index | V3AssetInstance_Undefined + +export interface V3AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V3AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V3AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V3AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V3AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V3AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V3AssetId = V3AssetId_Abstract | V3AssetId_Concrete + +export interface V3AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V3AssetId_Concrete { + __kind: 'Concrete' + value: V3MultiLocation +} + +export interface V3MultiLocation { + parents: number + interior: V3Junctions +} + +export type V3Junctions = V3Junctions_Here | V3Junctions_X1 | V3Junctions_X2 | V3Junctions_X3 | V3Junctions_X4 | V3Junctions_X5 | V3Junctions_X6 | V3Junctions_X7 | V3Junctions_X8 + +export interface V3Junctions_Here { + __kind: 'Here' +} + +export interface V3Junctions_X1 { + __kind: 'X1' + value: V3Junction +} + +export interface V3Junctions_X2 { + __kind: 'X2' + value: [V3Junction, V3Junction] +} + +export interface V3Junctions_X3 { + __kind: 'X3' + value: [V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X4 { + __kind: 'X4' + value: [V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X5 { + __kind: 'X5' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X6 { + __kind: 'X6' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X7 { + __kind: 'X7' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X8 { + __kind: 'X8' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export const V3QueryResponseInfo: sts.Type = sts.struct(() => { + return { + destination: V3MultiLocation, + queryId: sts.bigint(), + maxWeight: Weight, + } +}) + +export interface V3QueryResponseInfo { + destination: V3MultiLocation + queryId: bigint + maxWeight: Weight +} + +export const V3NetworkId: sts.Type = sts.closedEnum(() => { + return { + BitcoinCash: sts.unit(), + BitcoinCore: sts.unit(), + ByFork: sts.enumStruct({ + blockNumber: sts.bigint(), + blockHash: sts.bytes(), + }), + ByGenesis: sts.bytes(), + Ethereum: sts.enumStruct({ + chainId: sts.bigint(), + }), + Kusama: sts.unit(), + Polkadot: sts.unit(), + Rococo: sts.unit(), + Westend: sts.unit(), + Wococo: sts.unit(), + } +}) + +export const V3MaybeErrorCode: sts.Type = sts.closedEnum(() => { + return { + Error: sts.bytes(), + Success: sts.unit(), + TruncatedError: sts.bytes(), + } +}) + +export const V3Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + ExceedsStackLimit: sts.unit(), + ExpectationFalse: sts.unit(), + ExportError: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + FeesNotMet: sts.unit(), + HoldingWouldOverflow: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + LocationFull: sts.unit(), + LocationNotInvertible: sts.unit(), + LockError: sts.unit(), + MaxWeightInvalid: sts.unit(), + NameMismatch: sts.unit(), + NoDeal: sts.unit(), + NoPermission: sts.unit(), + NotDepositable: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + PalletNotFound: sts.unit(), + ReanchorFailed: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + Unanchored: sts.unit(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + VersionIncompatible: sts.unit(), + WeightLimitReached: Weight, + WeightNotComputable: sts.unit(), + } +}) + +export const V3Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V3Junction, + X2: sts.tuple(() => [V3Junction, V3Junction]), + X3: sts.tuple(() => [V3Junction, V3Junction, V3Junction]), + X4: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction]), + X5: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + X6: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + X7: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + X8: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + } +}) + +export const V3MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V3MultiAsset), + Wild: V3WildMultiAsset, + } +}) + +export const V3WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllCounted: sts.number(), + AllOf: sts.enumStruct({ + id: V3AssetId, + fun: V3WildFungibility, + }), + AllOfCounted: sts.enumStruct({ + id: V3AssetId, + fun: V3WildFungibility, + count: sts.number(), + }), + } +}) + +export const V3WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V3WildFungibility = V3WildFungibility_Fungible | V3WildFungibility_NonFungible + +export interface V3WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V3WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V3AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V3MultiLocation, + } +}) + +export type V3WildMultiAsset = V3WildMultiAsset_All | V3WildMultiAsset_AllCounted | V3WildMultiAsset_AllOf | V3WildMultiAsset_AllOfCounted + +export interface V3WildMultiAsset_All { + __kind: 'All' +} + +export interface V3WildMultiAsset_AllCounted { + __kind: 'AllCounted' + value: number +} + +export interface V3WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V3AssetId + fun: V3WildFungibility +} + +export interface V3WildMultiAsset_AllOfCounted { + __kind: 'AllOfCounted' + id: V3AssetId + fun: V3WildFungibility + count: number +} + +export type V3MultiAssetFilter = V3MultiAssetFilter_Definite | V3MultiAssetFilter_Wild + +export interface V3MultiAssetFilter_Definite { + __kind: 'Definite' + value: V3MultiAsset[] +} + +export interface V3MultiAssetFilter_Wild { + __kind: 'Wild' + value: V3WildMultiAsset +} + +export const V3MultiAsset: sts.Type = sts.struct(() => { + return { + id: V3AssetId, + fun: V3Fungibility, + } +}) + +export const V3Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V3AssetInstance, + } +}) + +export const V3AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V3Instruction = V3Instruction_AliasOrigin | V3Instruction_BurnAsset | V3Instruction_BuyExecution | V3Instruction_ClaimAsset | V3Instruction_ClearError | V3Instruction_ClearOrigin | V3Instruction_ClearTopic | V3Instruction_ClearTransactStatus | V3Instruction_DepositAsset | V3Instruction_DepositReserveAsset | V3Instruction_DescendOrigin | V3Instruction_ExchangeAsset | V3Instruction_ExpectAsset | V3Instruction_ExpectError | V3Instruction_ExpectOrigin | V3Instruction_ExpectPallet | V3Instruction_ExpectTransactStatus | V3Instruction_ExportMessage | V3Instruction_HrmpChannelAccepted | V3Instruction_HrmpChannelClosing | V3Instruction_HrmpNewChannelOpenRequest | V3Instruction_InitiateReserveWithdraw | V3Instruction_InitiateTeleport | V3Instruction_LockAsset | V3Instruction_NoteUnlockable | V3Instruction_QueryPallet | V3Instruction_QueryResponse | V3Instruction_ReceiveTeleportedAsset | V3Instruction_RefundSurplus | V3Instruction_ReportError | V3Instruction_ReportHolding | V3Instruction_ReportTransactStatus | V3Instruction_RequestUnlock | V3Instruction_ReserveAssetDeposited | V3Instruction_SetAppendix | V3Instruction_SetErrorHandler | V3Instruction_SetFeesMode | V3Instruction_SetTopic | V3Instruction_SubscribeVersion | V3Instruction_Transact | V3Instruction_TransferAsset | V3Instruction_TransferReserveAsset | V3Instruction_Trap | V3Instruction_UniversalOrigin | V3Instruction_UnlockAsset | V3Instruction_UnpaidExecution | V3Instruction_UnsubscribeVersion | V3Instruction_WithdrawAsset + +export interface V3Instruction_AliasOrigin { + __kind: 'AliasOrigin' + value: V3MultiLocation +} + +export interface V3Instruction_BurnAsset { + __kind: 'BurnAsset' + value: V3MultiAsset[] +} + +export interface V3Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V3MultiAsset + weightLimit: V3WeightLimit +} + +export interface V3Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V3MultiAsset[] + ticket: V3MultiLocation +} + +export interface V3Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V3Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V3Instruction_ClearTopic { + __kind: 'ClearTopic' +} + +export interface V3Instruction_ClearTransactStatus { + __kind: 'ClearTransactStatus' +} + +export interface V3Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V3MultiAssetFilter + beneficiary: V3MultiLocation +} + +export interface V3Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V3Junctions +} + +export interface V3Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V3MultiAssetFilter + want: V3MultiAsset[] + maximal: boolean +} + +export interface V3Instruction_ExpectAsset { + __kind: 'ExpectAsset' + value: V3MultiAsset[] +} + +export interface V3Instruction_ExpectError { + __kind: 'ExpectError' + value?: ([number, V3Error] | undefined) +} + +export interface V3Instruction_ExpectOrigin { + __kind: 'ExpectOrigin' + value?: (V3MultiLocation | undefined) +} + +export interface V3Instruction_ExpectPallet { + __kind: 'ExpectPallet' + index: number + name: Bytes + moduleName: Bytes + crateMajor: number + minCrateMinor: number +} + +export interface V3Instruction_ExpectTransactStatus { + __kind: 'ExpectTransactStatus' + value: V3MaybeErrorCode +} + +export interface V3Instruction_ExportMessage { + __kind: 'ExportMessage' + network: V3NetworkId + destination: V3Junctions + xcm: V3Instruction[] +} + +export interface V3Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V3Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V3Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V3Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V3MultiAssetFilter + reserve: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_LockAsset { + __kind: 'LockAsset' + asset: V3MultiAsset + unlocker: V3MultiLocation +} + +export interface V3Instruction_NoteUnlockable { + __kind: 'NoteUnlockable' + asset: V3MultiAsset + owner: V3MultiLocation +} + +export interface V3Instruction_QueryPallet { + __kind: 'QueryPallet' + moduleName: Bytes + responseInfo: V3QueryResponseInfo +} + +export interface V3Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V3Response + maxWeight: Weight + querier?: (V3MultiLocation | undefined) +} + +export interface V3Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V3MultiAsset[] +} + +export interface V3Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V3Instruction_ReportError { + __kind: 'ReportError' + value: V3QueryResponseInfo +} + +export interface V3Instruction_ReportHolding { + __kind: 'ReportHolding' + responseInfo: V3QueryResponseInfo + assets: V3MultiAssetFilter +} + +export interface V3Instruction_ReportTransactStatus { + __kind: 'ReportTransactStatus' + value: V3QueryResponseInfo +} + +export interface V3Instruction_RequestUnlock { + __kind: 'RequestUnlock' + asset: V3MultiAsset + locker: V3MultiLocation +} + +export interface V3Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V3MultiAsset[] +} + +export interface V3Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V3Instruction[] +} + +export interface V3Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V3Instruction[] +} + +export interface V3Instruction_SetFeesMode { + __kind: 'SetFeesMode' + jitWithdraw: boolean +} + +export interface V3Instruction_SetTopic { + __kind: 'SetTopic' + value: Bytes +} + +export interface V3Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: Weight +} + +export interface V3Instruction_Transact { + __kind: 'Transact' + originKind: V2OriginKind + requireWeightAtMost: Weight + call: DoubleEncoded +} + +export interface V3Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V3MultiAsset[] + beneficiary: V3MultiLocation +} + +export interface V3Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V3MultiAsset[] + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V3Instruction_UniversalOrigin { + __kind: 'UniversalOrigin' + value: V3Junction +} + +export interface V3Instruction_UnlockAsset { + __kind: 'UnlockAsset' + asset: V3MultiAsset + target: V3MultiLocation +} + +export interface V3Instruction_UnpaidExecution { + __kind: 'UnpaidExecution' + weightLimit: V3WeightLimit + checkOrigin?: (V3MultiLocation | undefined) +} + +export interface V3Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V3Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V3MultiAsset[] +} + +export type V3WeightLimit = V3WeightLimit_Limited | V3WeightLimit_Unlimited + +export interface V3WeightLimit_Limited { + __kind: 'Limited' + value: Weight +} + +export interface V3WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V2Instruction: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V2MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + ticket: V2MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V2MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V2Junctions, + ExchangeAsset: sts.enumStruct({ + give: V2MultiAssetFilter, + receive: sts.array(() => V2MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V2MultiAssetFilter, + reserve: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V2MultiAssetFilter, + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + assets: V2MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V2MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V2MultiAsset), + SetAppendix: sts.array(() => V2Instruction), + SetErrorHandler: sts.array(() => V2Instruction), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V2OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + beneficiary: V2MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V2MultiAsset), + } +}) + +export const V2Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V2MultiAsset), + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V2Error])), + Null: sts.unit(), + Version: sts.number(), + } +}) + +export const V2Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + MaxWeightInvalid: sts.unit(), + MultiLocationFull: sts.unit(), + MultiLocationNotInvertible: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + WeightLimitReached: sts.bigint(), + WeightNotComputable: sts.unit(), + } +}) + +export type V2Error = V2Error_AssetNotFound | V2Error_BadOrigin | V2Error_Barrier | V2Error_DestinationUnsupported | V2Error_ExceedsMaxMessageSize | V2Error_FailedToDecode | V2Error_FailedToTransactAsset | V2Error_InvalidLocation | V2Error_LocationCannotHold | V2Error_MaxWeightInvalid | V2Error_MultiLocationFull | V2Error_MultiLocationNotInvertible | V2Error_NotHoldingFees | V2Error_NotWithdrawable | V2Error_Overflow | V2Error_TooExpensive | V2Error_Transport | V2Error_Trap | V2Error_UnhandledXcmVersion | V2Error_Unimplemented | V2Error_UnknownClaim | V2Error_Unroutable | V2Error_UntrustedReserveLocation | V2Error_UntrustedTeleportLocation | V2Error_WeightLimitReached | V2Error_WeightNotComputable + +export interface V2Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V2Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V2Error_Barrier { + __kind: 'Barrier' +} + +export interface V2Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V2Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V2Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V2Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V2Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V2Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V2Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V2Error_MultiLocationFull { + __kind: 'MultiLocationFull' +} + +export interface V2Error_MultiLocationNotInvertible { + __kind: 'MultiLocationNotInvertible' +} + +export interface V2Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V2Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V2Error_Overflow { + __kind: 'Overflow' +} + +export interface V2Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V2Error_Transport { + __kind: 'Transport' +} + +export interface V2Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V2Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V2Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V2Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V2Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V2Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V2Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: bigint +} + +export interface V2Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V2Response = V2Response_Assets | V2Response_ExecutionResult | V2Response_Null | V2Response_Version + +export interface V2Response_Assets { + __kind: 'Assets' + value: V2MultiAsset[] +} + +export interface V2Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V2Error] | undefined) +} + +export interface V2Response_Null { + __kind: 'Null' +} + +export interface V2Response_Version { + __kind: 'Version' + value: number +} + +export interface V2MultiAsset { + id: V2AssetId + fun: V2Fungibility +} + +export type V2Fungibility = V2Fungibility_Fungible | V2Fungibility_NonFungible + +export interface V2Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V2Fungibility_NonFungible { + __kind: 'NonFungible' + value: V2AssetInstance +} + +export type V2AssetInstance = V2AssetInstance_Array16 | V2AssetInstance_Array32 | V2AssetInstance_Array4 | V2AssetInstance_Array8 | V2AssetInstance_Blob | V2AssetInstance_Index | V2AssetInstance_Undefined + +export interface V2AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V2AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V2AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V2AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V2AssetInstance_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface V2AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V2AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V2AssetId = V2AssetId_Abstract | V2AssetId_Concrete + +export interface V2AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V2AssetId_Concrete { + __kind: 'Concrete' + value: V2MultiLocation +} + +export interface V2MultiLocation { + parents: number + interior: V2Junctions +} + +export type V2Junctions = V2Junctions_Here | V2Junctions_X1 | V2Junctions_X2 | V2Junctions_X3 | V2Junctions_X4 | V2Junctions_X5 | V2Junctions_X6 | V2Junctions_X7 | V2Junctions_X8 + +export interface V2Junctions_Here { + __kind: 'Here' +} + +export interface V2Junctions_X1 { + __kind: 'X1' + value: V2Junction +} + +export interface V2Junctions_X2 { + __kind: 'X2' + value: [V2Junction, V2Junction] +} + +export interface V2Junctions_X3 { + __kind: 'X3' + value: [V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X4 { + __kind: 'X4' + value: [V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X5 { + __kind: 'X5' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X6 { + __kind: 'X6' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X7 { + __kind: 'X7' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X8 { + __kind: 'X8' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export type V2Junction = V2Junction_AccountId32 | V2Junction_AccountIndex64 | V2Junction_AccountKey20 | V2Junction_GeneralIndex | V2Junction_GeneralKey | V2Junction_OnlyChild | V2Junction_PalletInstance | V2Junction_Parachain | V2Junction_Plurality + +export interface V2Junction_AccountId32 { + __kind: 'AccountId32' + network: V2NetworkId + id: Bytes +} + +export interface V2Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V2NetworkId + index: bigint +} + +export interface V2Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V2NetworkId + key: Bytes +} + +export interface V2Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V2Junction_GeneralKey { + __kind: 'GeneralKey' + value: WeakBoundedVec +} + +export interface V2Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V2Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V2Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V2Junction_Plurality { + __kind: 'Plurality' + id: V2BodyId + part: V2BodyPart +} + +export type V2BodyPart = V2BodyPart_AtLeastProportion | V2BodyPart_Fraction | V2BodyPart_Members | V2BodyPart_MoreThanProportion | V2BodyPart_Voice + +export interface V2BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V2BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V2BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V2BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V2BodyPart_Voice { + __kind: 'Voice' +} + +export type V2BodyId = V2BodyId_Administration | V2BodyId_Defense | V2BodyId_Executive | V2BodyId_Index | V2BodyId_Judicial | V2BodyId_Legislative | V2BodyId_Named | V2BodyId_Technical | V2BodyId_Treasury | V2BodyId_Unit + +export interface V2BodyId_Administration { + __kind: 'Administration' +} + +export interface V2BodyId_Defense { + __kind: 'Defense' +} + +export interface V2BodyId_Executive { + __kind: 'Executive' +} + +export interface V2BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V2BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V2BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V2BodyId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V2BodyId_Technical { + __kind: 'Technical' +} + +export interface V2BodyId_Treasury { + __kind: 'Treasury' +} + +export interface V2BodyId_Unit { + __kind: 'Unit' +} + +export type WeakBoundedVec = Bytes + +export type V2NetworkId = V2NetworkId_Any | V2NetworkId_Kusama | V2NetworkId_Named | V2NetworkId_Polkadot + +export interface V2NetworkId_Any { + __kind: 'Any' +} + +export interface V2NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V2NetworkId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V2NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export const V2Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V2Junction, + X2: sts.tuple(() => [V2Junction, V2Junction]), + X3: sts.tuple(() => [V2Junction, V2Junction, V2Junction]), + X4: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction]), + X5: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + X6: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + X7: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + X8: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + } +}) + +export const V2Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V2NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V2NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V2NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: WeakBoundedVec, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V2BodyId, + part: V2BodyPart, + }), + } +}) + +export const V2BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export const V2BodyId: sts.Type = sts.closedEnum(() => { + return { + Administration: sts.unit(), + Defense: sts.unit(), + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: WeakBoundedVec, + Technical: sts.unit(), + Treasury: sts.unit(), + Unit: sts.unit(), + } +}) + +export const WeakBoundedVec = sts.bytes() + +export const V2NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: WeakBoundedVec, + Polkadot: sts.unit(), + } +}) + +export const V2MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V2MultiAsset), + Wild: V2WildMultiAsset, + } +}) + +export const V2WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllOf: sts.enumStruct({ + id: V2AssetId, + fun: V2WildFungibility, + }), + } +}) + +export const V2WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V2WildFungibility = V2WildFungibility_Fungible | V2WildFungibility_NonFungible + +export interface V2WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V2WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V2AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V2MultiLocation, + } +}) + +export type V2WildMultiAsset = V2WildMultiAsset_All | V2WildMultiAsset_AllOf + +export interface V2WildMultiAsset_All { + __kind: 'All' +} + +export interface V2WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V2AssetId + fun: V2WildFungibility +} + +export type V2MultiAssetFilter = V2MultiAssetFilter_Definite | V2MultiAssetFilter_Wild + +export interface V2MultiAssetFilter_Definite { + __kind: 'Definite' + value: V2MultiAsset[] +} + +export interface V2MultiAssetFilter_Wild { + __kind: 'Wild' + value: V2WildMultiAsset +} + +export const V2MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V2Junctions, + } +}) + +export const V2WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: sts.bigint(), + Unlimited: sts.unit(), + } +}) + +export type V2WeightLimit = V2WeightLimit_Limited | V2WeightLimit_Unlimited + +export interface V2WeightLimit_Limited { + __kind: 'Limited' + value: bigint +} + +export interface V2WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V2MultiAsset: sts.Type = sts.struct(() => { + return { + id: V2AssetId, + fun: V2Fungibility, + } +}) + +export const V2Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V2AssetInstance, + } +}) + +export const V2AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V2Instruction = V2Instruction_BuyExecution | V2Instruction_ClaimAsset | V2Instruction_ClearError | V2Instruction_ClearOrigin | V2Instruction_DepositAsset | V2Instruction_DepositReserveAsset | V2Instruction_DescendOrigin | V2Instruction_ExchangeAsset | V2Instruction_HrmpChannelAccepted | V2Instruction_HrmpChannelClosing | V2Instruction_HrmpNewChannelOpenRequest | V2Instruction_InitiateReserveWithdraw | V2Instruction_InitiateTeleport | V2Instruction_QueryHolding | V2Instruction_QueryResponse | V2Instruction_ReceiveTeleportedAsset | V2Instruction_RefundSurplus | V2Instruction_ReportError | V2Instruction_ReserveAssetDeposited | V2Instruction_SetAppendix | V2Instruction_SetErrorHandler | V2Instruction_SubscribeVersion | V2Instruction_Transact | V2Instruction_TransferAsset | V2Instruction_TransferReserveAsset | V2Instruction_Trap | V2Instruction_UnsubscribeVersion | V2Instruction_WithdrawAsset + +export interface V2Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V2MultiAsset + weightLimit: V2WeightLimit +} + +export interface V2Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V2MultiAsset[] + ticket: V2MultiLocation +} + +export interface V2Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V2Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V2Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V2MultiAssetFilter + maxAssets: number + beneficiary: V2MultiLocation +} + +export interface V2Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V2MultiAssetFilter + maxAssets: number + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V2Junctions +} + +export interface V2Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V2MultiAssetFilter + receive: V2MultiAsset[] +} + +export interface V2Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V2Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V2Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V2Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V2MultiAssetFilter + reserve: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V2MultiAssetFilter + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V2MultiLocation + assets: V2MultiAssetFilter + maxResponseWeight: bigint +} + +export interface V2Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface V2Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V2MultiAsset[] +} + +export interface V2Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V2Instruction_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V2MultiLocation + maxResponseWeight: bigint +} + +export interface V2Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V2MultiAsset[] +} + +export interface V2Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V2Instruction[] +} + +export interface V2Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V2Instruction[] +} + +export interface V2Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V2Instruction_Transact { + __kind: 'Transact' + originType: V2OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V2Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V2MultiAsset[] + beneficiary: V2MultiLocation +} + +export interface V2Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V2MultiAsset[] + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V2Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V2MultiAsset[] +} + +export type VersionedXcm = VersionedXcm_V2 | VersionedXcm_V3 + +export interface VersionedXcm_V2 { + __kind: 'V2' + value: V2Instruction[] +} + +export interface VersionedXcm_V3 { + __kind: 'V3' + value: V3Instruction[] +} + +export const V3WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: Weight, + Unlimited: sts.unit(), + } +}) + +export const VersionedMultiAssets: sts.Type = sts.closedEnum(() => { + return { + V2: sts.array(() => V2MultiAsset), + V3: sts.array(() => V3MultiAsset), + } +}) + +export type VersionedMultiAssets = VersionedMultiAssets_V2 | VersionedMultiAssets_V3 + +export interface VersionedMultiAssets_V2 { + __kind: 'V2' + value: V2MultiAsset[] +} + +export interface VersionedMultiAssets_V3 { + __kind: 'V3' + value: V3MultiAsset[] +} + +export const V3MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V3Junctions, + } +}) + +export const VersionedMultiLocation: sts.Type = sts.closedEnum(() => { + return { + V2: V2MultiLocation, + V3: V3MultiLocation, + } +}) + +export type VersionedMultiLocation = VersionedMultiLocation_V2 | VersionedMultiLocation_V3 + +export interface VersionedMultiLocation_V2 { + __kind: 'V2' + value: V2MultiLocation +} + +export interface VersionedMultiLocation_V3 { + __kind: 'V3' + value: V3MultiLocation +} + +export const Type_439: sts.Type = sts.closedEnum(() => { + return { + V2: sts.array(() => Type_442), + V3: sts.array(() => Type_446), + } +}) + +export const Type_446: sts.Type = sts.closedEnum(() => { + return { + AliasOrigin: V3MultiLocation, + BurnAsset: sts.array(() => V3MultiAsset), + BuyExecution: sts.enumStruct({ + fees: V3MultiAsset, + weightLimit: V3WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + ticket: V3MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + ClearTopic: sts.unit(), + ClearTransactStatus: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + beneficiary: V3MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + DescendOrigin: V3Junctions, + ExchangeAsset: sts.enumStruct({ + give: V3MultiAssetFilter, + want: sts.array(() => V3MultiAsset), + maximal: sts.boolean(), + }), + ExpectAsset: sts.array(() => V3MultiAsset), + ExpectError: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + ExpectOrigin: sts.option(() => V3MultiLocation), + ExpectPallet: sts.enumStruct({ + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + crateMajor: sts.number(), + minCrateMinor: sts.number(), + }), + ExpectTransactStatus: V3MaybeErrorCode, + ExportMessage: sts.enumStruct({ + network: V3NetworkId, + destination: V3Junctions, + xcm: sts.array(() => V3Instruction), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V3MultiAssetFilter, + reserve: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + LockAsset: sts.enumStruct({ + asset: V3MultiAsset, + unlocker: V3MultiLocation, + }), + NoteUnlockable: sts.enumStruct({ + asset: V3MultiAsset, + owner: V3MultiLocation, + }), + QueryPallet: sts.enumStruct({ + moduleName: sts.bytes(), + responseInfo: V3QueryResponseInfo, + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V3Response, + maxWeight: Weight, + querier: sts.option(() => V3MultiLocation), + }), + ReceiveTeleportedAsset: sts.array(() => V3MultiAsset), + RefundSurplus: sts.unit(), + ReportError: V3QueryResponseInfo, + ReportHolding: sts.enumStruct({ + responseInfo: V3QueryResponseInfo, + assets: V3MultiAssetFilter, + }), + ReportTransactStatus: V3QueryResponseInfo, + RequestUnlock: sts.enumStruct({ + asset: V3MultiAsset, + locker: V3MultiLocation, + }), + ReserveAssetDeposited: sts.array(() => V3MultiAsset), + SetAppendix: sts.array(() => Type_446), + SetErrorHandler: sts.array(() => Type_446), + SetFeesMode: sts.enumStruct({ + jitWithdraw: sts.boolean(), + }), + SetTopic: sts.bytes(), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: Weight, + }), + Transact: sts.enumStruct({ + originKind: V2OriginKind, + requireWeightAtMost: Weight, + call: Type_443, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + beneficiary: V3MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + Trap: sts.bigint(), + UniversalOrigin: V3Junction, + UnlockAsset: sts.enumStruct({ + asset: V3MultiAsset, + target: V3MultiLocation, + }), + UnpaidExecution: sts.enumStruct({ + weightLimit: V3WeightLimit, + checkOrigin: sts.option(() => V3MultiLocation), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V3MultiAsset), + } +}) + +export const Type_443: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface Type_443 { + encoded: Bytes +} + +export type Type_446 = Type_446_AliasOrigin | Type_446_BurnAsset | Type_446_BuyExecution | Type_446_ClaimAsset | Type_446_ClearError | Type_446_ClearOrigin | Type_446_ClearTopic | Type_446_ClearTransactStatus | Type_446_DepositAsset | Type_446_DepositReserveAsset | Type_446_DescendOrigin | Type_446_ExchangeAsset | Type_446_ExpectAsset | Type_446_ExpectError | Type_446_ExpectOrigin | Type_446_ExpectPallet | Type_446_ExpectTransactStatus | Type_446_ExportMessage | Type_446_HrmpChannelAccepted | Type_446_HrmpChannelClosing | Type_446_HrmpNewChannelOpenRequest | Type_446_InitiateReserveWithdraw | Type_446_InitiateTeleport | Type_446_LockAsset | Type_446_NoteUnlockable | Type_446_QueryPallet | Type_446_QueryResponse | Type_446_ReceiveTeleportedAsset | Type_446_RefundSurplus | Type_446_ReportError | Type_446_ReportHolding | Type_446_ReportTransactStatus | Type_446_RequestUnlock | Type_446_ReserveAssetDeposited | Type_446_SetAppendix | Type_446_SetErrorHandler | Type_446_SetFeesMode | Type_446_SetTopic | Type_446_SubscribeVersion | Type_446_Transact | Type_446_TransferAsset | Type_446_TransferReserveAsset | Type_446_Trap | Type_446_UniversalOrigin | Type_446_UnlockAsset | Type_446_UnpaidExecution | Type_446_UnsubscribeVersion | Type_446_WithdrawAsset + +export interface Type_446_AliasOrigin { + __kind: 'AliasOrigin' + value: V3MultiLocation +} + +export interface Type_446_BurnAsset { + __kind: 'BurnAsset' + value: V3MultiAsset[] +} + +export interface Type_446_BuyExecution { + __kind: 'BuyExecution' + fees: V3MultiAsset + weightLimit: V3WeightLimit +} + +export interface Type_446_ClaimAsset { + __kind: 'ClaimAsset' + assets: V3MultiAsset[] + ticket: V3MultiLocation +} + +export interface Type_446_ClearError { + __kind: 'ClearError' +} + +export interface Type_446_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_446_ClearTopic { + __kind: 'ClearTopic' +} + +export interface Type_446_ClearTransactStatus { + __kind: 'ClearTransactStatus' +} + +export interface Type_446_DepositAsset { + __kind: 'DepositAsset' + assets: V3MultiAssetFilter + beneficiary: V3MultiLocation +} + +export interface Type_446_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_446_DescendOrigin { + __kind: 'DescendOrigin' + value: V3Junctions +} + +export interface Type_446_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V3MultiAssetFilter + want: V3MultiAsset[] + maximal: boolean +} + +export interface Type_446_ExpectAsset { + __kind: 'ExpectAsset' + value: V3MultiAsset[] +} + +export interface Type_446_ExpectError { + __kind: 'ExpectError' + value?: ([number, V3Error] | undefined) +} + +export interface Type_446_ExpectOrigin { + __kind: 'ExpectOrigin' + value?: (V3MultiLocation | undefined) +} + +export interface Type_446_ExpectPallet { + __kind: 'ExpectPallet' + index: number + name: Bytes + moduleName: Bytes + crateMajor: number + minCrateMinor: number +} + +export interface Type_446_ExpectTransactStatus { + __kind: 'ExpectTransactStatus' + value: V3MaybeErrorCode +} + +export interface Type_446_ExportMessage { + __kind: 'ExportMessage' + network: V3NetworkId + destination: V3Junctions + xcm: V3Instruction[] +} + +export interface Type_446_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_446_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_446_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_446_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V3MultiAssetFilter + reserve: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_446_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_446_LockAsset { + __kind: 'LockAsset' + asset: V3MultiAsset + unlocker: V3MultiLocation +} + +export interface Type_446_NoteUnlockable { + __kind: 'NoteUnlockable' + asset: V3MultiAsset + owner: V3MultiLocation +} + +export interface Type_446_QueryPallet { + __kind: 'QueryPallet' + moduleName: Bytes + responseInfo: V3QueryResponseInfo +} + +export interface Type_446_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V3Response + maxWeight: Weight + querier?: (V3MultiLocation | undefined) +} + +export interface Type_446_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V3MultiAsset[] +} + +export interface Type_446_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_446_ReportError { + __kind: 'ReportError' + value: V3QueryResponseInfo +} + +export interface Type_446_ReportHolding { + __kind: 'ReportHolding' + responseInfo: V3QueryResponseInfo + assets: V3MultiAssetFilter +} + +export interface Type_446_ReportTransactStatus { + __kind: 'ReportTransactStatus' + value: V3QueryResponseInfo +} + +export interface Type_446_RequestUnlock { + __kind: 'RequestUnlock' + asset: V3MultiAsset + locker: V3MultiLocation +} + +export interface Type_446_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V3MultiAsset[] +} + +export interface Type_446_SetAppendix { + __kind: 'SetAppendix' + value: Type_446[] +} + +export interface Type_446_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_446[] +} + +export interface Type_446_SetFeesMode { + __kind: 'SetFeesMode' + jitWithdraw: boolean +} + +export interface Type_446_SetTopic { + __kind: 'SetTopic' + value: Bytes +} + +export interface Type_446_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: Weight +} + +export interface Type_446_Transact { + __kind: 'Transact' + originKind: V2OriginKind + requireWeightAtMost: Weight + call: Type_443 +} + +export interface Type_446_TransferAsset { + __kind: 'TransferAsset' + assets: V3MultiAsset[] + beneficiary: V3MultiLocation +} + +export interface Type_446_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V3MultiAsset[] + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_446_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_446_UniversalOrigin { + __kind: 'UniversalOrigin' + value: V3Junction +} + +export interface Type_446_UnlockAsset { + __kind: 'UnlockAsset' + asset: V3MultiAsset + target: V3MultiLocation +} + +export interface Type_446_UnpaidExecution { + __kind: 'UnpaidExecution' + weightLimit: V3WeightLimit + checkOrigin?: (V3MultiLocation | undefined) +} + +export interface Type_446_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_446_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V3MultiAsset[] +} + +export const Type_442: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V2MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + ticket: V2MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V2MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V2Junctions, + ExchangeAsset: sts.enumStruct({ + give: V2MultiAssetFilter, + receive: sts.array(() => V2MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V2MultiAssetFilter, + reserve: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V2MultiAssetFilter, + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + assets: V2MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V2MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V2MultiAsset), + SetAppendix: sts.array(() => Type_442), + SetErrorHandler: sts.array(() => Type_442), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V2OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_443, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + beneficiary: V2MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V2MultiAsset), + } +}) + +export type Type_442 = Type_442_BuyExecution | Type_442_ClaimAsset | Type_442_ClearError | Type_442_ClearOrigin | Type_442_DepositAsset | Type_442_DepositReserveAsset | Type_442_DescendOrigin | Type_442_ExchangeAsset | Type_442_HrmpChannelAccepted | Type_442_HrmpChannelClosing | Type_442_HrmpNewChannelOpenRequest | Type_442_InitiateReserveWithdraw | Type_442_InitiateTeleport | Type_442_QueryHolding | Type_442_QueryResponse | Type_442_ReceiveTeleportedAsset | Type_442_RefundSurplus | Type_442_ReportError | Type_442_ReserveAssetDeposited | Type_442_SetAppendix | Type_442_SetErrorHandler | Type_442_SubscribeVersion | Type_442_Transact | Type_442_TransferAsset | Type_442_TransferReserveAsset | Type_442_Trap | Type_442_UnsubscribeVersion | Type_442_WithdrawAsset + +export interface Type_442_BuyExecution { + __kind: 'BuyExecution' + fees: V2MultiAsset + weightLimit: V2WeightLimit +} + +export interface Type_442_ClaimAsset { + __kind: 'ClaimAsset' + assets: V2MultiAsset[] + ticket: V2MultiLocation +} + +export interface Type_442_ClearError { + __kind: 'ClearError' +} + +export interface Type_442_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_442_DepositAsset { + __kind: 'DepositAsset' + assets: V2MultiAssetFilter + maxAssets: number + beneficiary: V2MultiLocation +} + +export interface Type_442_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V2MultiAssetFilter + maxAssets: number + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_442_DescendOrigin { + __kind: 'DescendOrigin' + value: V2Junctions +} + +export interface Type_442_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V2MultiAssetFilter + receive: V2MultiAsset[] +} + +export interface Type_442_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_442_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_442_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_442_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V2MultiAssetFilter + reserve: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_442_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V2MultiAssetFilter + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_442_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V2MultiLocation + assets: V2MultiAssetFilter + maxResponseWeight: bigint +} + +export interface Type_442_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface Type_442_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V2MultiAsset[] +} + +export interface Type_442_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_442_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V2MultiLocation + maxResponseWeight: bigint +} + +export interface Type_442_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V2MultiAsset[] +} + +export interface Type_442_SetAppendix { + __kind: 'SetAppendix' + value: Type_442[] +} + +export interface Type_442_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_442[] +} + +export interface Type_442_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_442_Transact { + __kind: 'Transact' + originType: V2OriginKind + requireWeightAtMost: bigint + call: Type_443 +} + +export interface Type_442_TransferAsset { + __kind: 'TransferAsset' + assets: V2MultiAsset[] + beneficiary: V2MultiLocation +} + +export interface Type_442_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V2MultiAsset[] + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_442_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_442_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_442_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V2MultiAsset[] +} + +export type Type_439 = Type_439_V2 | Type_439_V3 + +export interface Type_439_V2 { + __kind: 'V2' + value: Type_442[] +} + +export interface Type_439_V3 { + __kind: 'V3' + value: Type_446[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type XcmPalletCall = XcmPalletCall_execute | XcmPalletCall_force_default_xcm_version | XcmPalletCall_force_subscribe_version_notify | XcmPalletCall_force_suspension | XcmPalletCall_force_unsubscribe_version_notify | XcmPalletCall_force_xcm_version | XcmPalletCall_limited_reserve_transfer_assets | XcmPalletCall_limited_teleport_assets | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets + +/** + * Execute an XCM message from a local, signed, origin. + * + * An event is deposited indicating whether `msg` could be executed completely or only + * partially. + * + * No more than `max_weight` will be used in its attempted execution. If this is less than the + * maximum amount of weight that the message could take to be executed, then no execution + * attempt will be made. + * + * NOTE: A successful return to this does *not* imply that the `msg` was executed successfully + * to completion; only that *some* of it was executed. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Type_439 + maxWeight: Weight +} + +/** + * Set a safe XCM version (the version that XCM should be encoded with if the most recent + * version a destination can accept is unknown). + * + * - `origin`: Must be an origin specified by AdminOrigin. + * - `maybe_xcm_version`: The default XCM encoding version, or `None` to disable. + */ +export interface XcmPalletCall_force_default_xcm_version { + __kind: 'force_default_xcm_version' + maybeXcmVersion?: (number | undefined) +} + +/** + * Ask a location to notify us regarding their XCM version and any changes to it. + * + * - `origin`: Must be an origin specified by AdminOrigin. + * - `location`: The location to which we should subscribe for XCM version notifications. + */ +export interface XcmPalletCall_force_subscribe_version_notify { + __kind: 'force_subscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Set or unset the global suspension state of the XCM executor. + * + * - `origin`: Must be an origin specified by AdminOrigin. + * - `suspended`: `true` to suspend, `false` to resume. + */ +export interface XcmPalletCall_force_suspension { + __kind: 'force_suspension' + suspended: boolean +} + +/** + * Require that a particular destination should no longer notify us regarding any XCM + * version changes. + * + * - `origin`: Must be an origin specified by AdminOrigin. + * - `location`: The location to which we are currently subscribed for XCM version + * notifications which we no longer desire. + */ +export interface XcmPalletCall_force_unsubscribe_version_notify { + __kind: 'force_unsubscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Extoll that a particular destination can be communicated with through a particular + * version of XCM. + * + * - `origin`: Must be an origin specified by AdminOrigin. + * - `location`: The destination that is being described. + * - `xcm_version`: The latest version of XCM that `location` supports. + */ +export interface XcmPalletCall_force_xcm_version { + __kind: 'force_xcm_version' + location: V3MultiLocation + xcmVersion: number +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination + * chain and forward a notification XCM. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight + * is needed than `weight_limit`, then the operation will fail and the assets send may be + * at risk. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_reserve_transfer_assets { + __kind: 'limited_reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V3WeightLimit +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight + * is needed than `weight_limit`, then the operation will fail and the assets send may be + * at risk. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_teleport_assets { + __kind: 'limited_teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V3WeightLimit +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination + * chain and forward a notification XCM. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, + * with all fees taken as needed from the asset. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +export interface XcmPalletCall_send { + __kind: 'send' + dest: VersionedMultiLocation + message: VersionedXcm +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, + * with all fees taken as needed from the asset. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const WhitelistCall: sts.Type = sts.closedEnum(() => { + return { + dispatch_whitelisted_call: sts.enumStruct({ + callHash: H256, + callEncodedLen: sts.number(), + callWeightWitness: Weight, + }), + dispatch_whitelisted_call_with_preimage: sts.enumStruct({ + call: Call, + }), + remove_whitelisted_call: sts.enumStruct({ + callHash: H256, + }), + whitelist_call: sts.enumStruct({ + callHash: H256, + }), + } +}) + +export const H256 = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type WhitelistCall = WhitelistCall_dispatch_whitelisted_call | WhitelistCall_dispatch_whitelisted_call_with_preimage | WhitelistCall_remove_whitelisted_call | WhitelistCall_whitelist_call + +export interface WhitelistCall_dispatch_whitelisted_call { + __kind: 'dispatch_whitelisted_call' + callHash: H256 + callEncodedLen: number + callWeightWitness: Weight +} + +export interface WhitelistCall_dispatch_whitelisted_call_with_preimage { + __kind: 'dispatch_whitelisted_call_with_preimage' + call: Call +} + +export interface WhitelistCall_remove_whitelisted_call { + __kind: 'remove_whitelisted_call' + callHash: H256 +} + +export interface WhitelistCall_whitelist_call { + __kind: 'whitelist_call' + callHash: H256 +} + +export type H256 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VoterListCall: sts.Type = sts.closedEnum(() => { + return { + put_in_front_of: sts.enumStruct({ + lighter: MultiAddress, + }), + rebag: sts.enumStruct({ + dislocated: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VoterListCall = VoterListCall_put_in_front_of | VoterListCall_rebag + +/** + * Move the caller's Id directly in front of `lighter`. + * + * The dispatch origin for this call must be _Signed_ and can only be called by the Id of + * the account going in front of `lighter`. + * + * Only works if + * - both nodes are within the same bag, + * - and `origin` has a greater `Score` than `lighter`. + */ +export interface VoterListCall_put_in_front_of { + __kind: 'put_in_front_of' + lighter: MultiAddress +} + +/** + * Declare that some `dislocated` account has, through rewards or penalties, sufficiently + * changed its score that it should properly fall into a different bag than its current + * one. + * + * Anyone can call this function about any potentially dislocated account. + * + * Will always update the stored score of `dislocated` to the correct score, based on + * `ScoreProvider`. + * + * If `dislocated` does not exists, it returns an error. + */ +export interface VoterListCall_rebag { + __kind: 'rebag' + dislocated: MultiAddress +} + +export type MultiAddress = MultiAddress_Address20 | MultiAddress_Address32 | MultiAddress_Id | MultiAddress_Index | MultiAddress_Raw + +export interface MultiAddress_Address20 { + __kind: 'Address20' + value: Bytes +} + +export interface MultiAddress_Address32 { + __kind: 'Address32' + value: Bytes +} + +export interface MultiAddress_Id { + __kind: 'Id' + value: AccountId32 +} + +export interface MultiAddress_Index { + __kind: 'Index' +} + +export interface MultiAddress_Raw { + __kind: 'Raw' + value: Bytes +} + +export type AccountId32 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: MultiAddress, + target: MultiAddress, + schedule: VestingInfo, + }), + merge_schedules: sts.enumStruct({ + schedule1Index: sts.number(), + schedule2Index: sts.number(), + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: MultiAddress, + }), + vested_transfer: sts.enumStruct({ + target: MultiAddress, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: sts.bigint(), + perBlock: sts.bigint(), + startingBlock: sts.number(), + } +}) + +export interface VestingInfo { + locked: bigint + perBlock: bigint + startingBlock: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_merge_schedules | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * ## Complexity + * - `O(1)`. + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: MultiAddress + target: MultiAddress + schedule: VestingInfo +} + +/** + * Merge two vesting schedules together, creating a new vesting schedule that unlocks over + * the highest possible start and end blocks. If both schedules have already started the + * current block will be used as the schedule start; with the caveat that if one schedule + * is finished by the current block, the other will be treated as the new merged schedule, + * unmodified. + * + * NOTE: If `schedule1_index == schedule2_index` this is a no-op. + * NOTE: This will unlock all schedules through the current block prior to merging. + * NOTE: If both schedules have ended by the current block, no new schedule will be created + * and both will be removed. + * + * Merged schedule attributes: + * - `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block, + * current_block)`. + * - `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`. + * - `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`. + * + * The dispatch origin for this call must be _Signed_. + * + * - `schedule1_index`: index of the first schedule to merge. + * - `schedule2_index`: index of the second schedule to merge. + */ +export interface VestingCall_merge_schedules { + __kind: 'merge_schedules' + schedule1Index: number + schedule2Index: number +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * ## Complexity + * - `O(1)`. + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * ## Complexity + * - `O(1)`. + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: MultiAddress +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account receiving the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * ## Complexity + * - `O(1)`. + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: MultiAddress + schedule: VestingInfo +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Call, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Call), + }), + dispatch_as: sts.enumStruct({ + asOrigin: OriginCaller, + call: Call, + }), + force_batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + with_weight: sts.enumStruct({ + call: Call, + weight: Weight, + }), + } +}) + +export const OriginCaller: sts.Type = sts.closedEnum(() => { + return { + Origins: Origin, + ParachainsOrigin: Type_130, + Void: Void, + XcmPallet: Type_132, + system: RawOrigin, + } +}) + +export const RawOrigin: sts.Type = sts.closedEnum(() => { + return { + None: sts.unit(), + Root: sts.unit(), + Signed: AccountId32, + } +}) + +export type RawOrigin = RawOrigin_None | RawOrigin_Root | RawOrigin_Signed + +export interface RawOrigin_None { + __kind: 'None' +} + +export interface RawOrigin_Root { + __kind: 'Root' +} + +export interface RawOrigin_Signed { + __kind: 'Signed' + value: AccountId32 +} + +export const Type_132: sts.Type = sts.closedEnum(() => { + return { + Response: V3MultiLocation, + Xcm: V3MultiLocation, + } +}) + +export type Type_132 = Type_132_Response | Type_132_Xcm + +export interface Type_132_Response { + __kind: 'Response' + value: V3MultiLocation +} + +export interface Type_132_Xcm { + __kind: 'Xcm' + value: V3MultiLocation +} + +export const Void: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Void = never + +export const Type_130: sts.Type = sts.closedEnum(() => { + return { + Parachain: Id, + } +}) + +export const Id = sts.number() + +export type Type_130 = Type_130_Parachain + +export interface Type_130_Parachain { + __kind: 'Parachain' + value: Id +} + +export type Id = number + +export const Origin: sts.Type = sts.closedEnum(() => { + return { + AuctionAdmin: sts.unit(), + BigSpender: sts.unit(), + BigTipper: sts.unit(), + Fellows: sts.unit(), + Fellowship1Dan: sts.unit(), + Fellowship2Dan: sts.unit(), + Fellowship3Dan: sts.unit(), + Fellowship4Dan: sts.unit(), + Fellowship5Dan: sts.unit(), + Fellowship6Dan: sts.unit(), + Fellowship7Dan: sts.unit(), + Fellowship8Dan: sts.unit(), + Fellowship9Dan: sts.unit(), + FellowshipAdmin: sts.unit(), + FellowshipExperts: sts.unit(), + FellowshipInitiates: sts.unit(), + FellowshipMasters: sts.unit(), + GeneralAdmin: sts.unit(), + LeaseAdmin: sts.unit(), + MediumSpender: sts.unit(), + ReferendumCanceller: sts.unit(), + ReferendumKiller: sts.unit(), + SmallSpender: sts.unit(), + SmallTipper: sts.unit(), + StakingAdmin: sts.unit(), + Treasurer: sts.unit(), + WhitelistedCaller: sts.unit(), + } +}) + +export type Origin = Origin_AuctionAdmin | Origin_BigSpender | Origin_BigTipper | Origin_Fellows | Origin_Fellowship1Dan | Origin_Fellowship2Dan | Origin_Fellowship3Dan | Origin_Fellowship4Dan | Origin_Fellowship5Dan | Origin_Fellowship6Dan | Origin_Fellowship7Dan | Origin_Fellowship8Dan | Origin_Fellowship9Dan | Origin_FellowshipAdmin | Origin_FellowshipExperts | Origin_FellowshipInitiates | Origin_FellowshipMasters | Origin_GeneralAdmin | Origin_LeaseAdmin | Origin_MediumSpender | Origin_ReferendumCanceller | Origin_ReferendumKiller | Origin_SmallSpender | Origin_SmallTipper | Origin_StakingAdmin | Origin_Treasurer | Origin_WhitelistedCaller + +export interface Origin_AuctionAdmin { + __kind: 'AuctionAdmin' +} + +export interface Origin_BigSpender { + __kind: 'BigSpender' +} + +export interface Origin_BigTipper { + __kind: 'BigTipper' +} + +export interface Origin_Fellows { + __kind: 'Fellows' +} + +export interface Origin_Fellowship1Dan { + __kind: 'Fellowship1Dan' +} + +export interface Origin_Fellowship2Dan { + __kind: 'Fellowship2Dan' +} + +export interface Origin_Fellowship3Dan { + __kind: 'Fellowship3Dan' +} + +export interface Origin_Fellowship4Dan { + __kind: 'Fellowship4Dan' +} + +export interface Origin_Fellowship5Dan { + __kind: 'Fellowship5Dan' +} + +export interface Origin_Fellowship6Dan { + __kind: 'Fellowship6Dan' +} + +export interface Origin_Fellowship7Dan { + __kind: 'Fellowship7Dan' +} + +export interface Origin_Fellowship8Dan { + __kind: 'Fellowship8Dan' +} + +export interface Origin_Fellowship9Dan { + __kind: 'Fellowship9Dan' +} + +export interface Origin_FellowshipAdmin { + __kind: 'FellowshipAdmin' +} + +export interface Origin_FellowshipExperts { + __kind: 'FellowshipExperts' +} + +export interface Origin_FellowshipInitiates { + __kind: 'FellowshipInitiates' +} + +export interface Origin_FellowshipMasters { + __kind: 'FellowshipMasters' +} + +export interface Origin_GeneralAdmin { + __kind: 'GeneralAdmin' +} + +export interface Origin_LeaseAdmin { + __kind: 'LeaseAdmin' +} + +export interface Origin_MediumSpender { + __kind: 'MediumSpender' +} + +export interface Origin_ReferendumCanceller { + __kind: 'ReferendumCanceller' +} + +export interface Origin_ReferendumKiller { + __kind: 'ReferendumKiller' +} + +export interface Origin_SmallSpender { + __kind: 'SmallSpender' +} + +export interface Origin_SmallTipper { + __kind: 'SmallTipper' +} + +export interface Origin_StakingAdmin { + __kind: 'StakingAdmin' +} + +export interface Origin_Treasurer { + __kind: 'Treasurer' +} + +export interface Origin_WhitelistedCaller { + __kind: 'WhitelistedCaller' +} + +export type OriginCaller = OriginCaller_Origins | OriginCaller_ParachainsOrigin | OriginCaller_Void | OriginCaller_XcmPallet | OriginCaller_system + +export interface OriginCaller_Origins { + __kind: 'Origins' + value: Origin +} + +export interface OriginCaller_ParachainsOrigin { + __kind: 'ParachainsOrigin' + value: Type_130 +} + +export interface OriginCaller_Void { + __kind: 'Void' + value: Void +} + +export interface OriginCaller_XcmPallet { + __kind: 'XcmPallet' + value: Type_132 +} + +export interface OriginCaller_system { + __kind: 'system' + value: RawOrigin +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all | UtilityCall_dispatch_as | UtilityCall_force_batch | UtilityCall_with_weight + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Call +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin except `None`. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then the calls are dispatched without checking origin filter. (This + * includes bypassing `frame_system::Config::BaseCallFilter`). + * + * ## Complexity + * - O(C) where C is the number of calls to be batched. + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Call[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin except `None`. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then the calls are dispatched without checking origin filter. (This + * includes bypassing `frame_system::Config::BaseCallFilter`). + * + * ## Complexity + * - O(C) where C is the number of calls to be batched. + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Call[] +} + +/** + * Dispatches a function call with a provided origin. + * + * The dispatch origin for this call must be _Root_. + * + * ## Complexity + * - O(1). + */ +export interface UtilityCall_dispatch_as { + __kind: 'dispatch_as' + asOrigin: OriginCaller + call: Call +} + +/** + * Send a batch of dispatch calls. + * Unlike `batch`, it allows errors and won't interrupt. + * + * May be called from any origin except `None`. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then the calls are dispatch without checking origin filter. (This + * includes bypassing `frame_system::Config::BaseCallFilter`). + * + * ## Complexity + * - O(C) where C is the number of calls to be batched. + */ +export interface UtilityCall_force_batch { + __kind: 'force_batch' + calls: Call[] +} + +/** + * Dispatch a function call with a specified weight. + * + * This function does not check the weight of the call, and instead allows the + * Root origin to specify the weight of the call. + * + * The dispatch origin for this call must be _Root_. + */ +export interface UtilityCall_with_weight { + __kind: 'with_weight' + call: Call + weight: Weight +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UmpCall: sts.Type = sts.closedEnum(() => { + return { + service_overweight: sts.enumStruct({ + index: sts.bigint(), + weightLimit: Weight, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UmpCall = UmpCall_service_overweight + +/** + * Service a single overweight upward message. + * + * - `origin`: Must pass `ExecuteOverweightOrigin`. + * - `index`: The index of the overweight message to service. + * - `weight_limit`: The amount of weight that message execution may take. + * + * Errors: + * - `UnknownMessageIndex`: Message of `index` is unknown. + * - `WeightOverLimit`: Message execution may use greater than `weight_limit`. + * + * Events: + * - `OverweightServiced`: On success. + */ +export interface UmpCall_service_overweight { + __kind: 'service_overweight' + index: bigint + weightLimit: Weight +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: MultiAddress, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + remove_approval: sts.enumStruct({ + proposalId: sts.number(), + }), + spend: sts.enumStruct({ + amount: sts.bigint(), + beneficiary: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_remove_approval | TreasuryCall_spend + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * ## Complexity + * - O(1). + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * ## Complexity + * - O(1) + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: MultiAddress +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * ## Complexity + * - O(1) + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Force a previously approved proposal to be removed from the approval queue. + * The original deposit will no longer be returned. + * + * May only be called from `T::RejectOrigin`. + * - `proposal_id`: The index of a proposal + * + * ## Complexity + * - O(A) where `A` is the number of approvals + * + * Errors: + * - `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue, + * i.e., the proposal has not been approved. This could also mean the proposal does not + * exist altogether, thus there is no way it would have been approved in the first place. + */ +export interface TreasuryCall_remove_approval { + __kind: 'remove_approval' + proposalId: number +} + +/** + * Propose and approve a spend of treasury funds. + * + * - `origin`: Must be `SpendOrigin` with the `Success` value being at least `amount`. + * - `amount`: The amount to be transferred from the treasury to the `beneficiary`. + * - `beneficiary`: The destination account for the transfer. + * + * NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the + * beneficiary. + */ +export interface TreasuryCall_spend { + __kind: 'spend' + amount: bigint + beneficiary: MultiAddress +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * ## Complexity + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in + * `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + kill_prefix: sts.enumStruct({ + prefix: sts.bytes(), + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => sts.bytes()), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SystemCall = SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Bytes + subkeys: number +} + +/** + * Kill some items from storage. + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Bytes[] +} + +/** + * Make some on-chain remark. + * + * ## Complexity + * - `O(1)` + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Make some on-chain remark and emit event. + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * Set the new runtime code. + * + * ## Complexity + * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + * + * ## Complexity + * - `O(C)` where `C` length of `code` + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: [Bytes, Bytes][] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + controller: MultiAddress, + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: sts.number(), + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + controller: AccountId32, + }), + force_apply_min_commission: sts.enumStruct({ + validatorStash: AccountId32, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => MultiAddress), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => MultiAddress), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + }), + reap_stash: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.enumStruct({ + controller: MultiAddress, + }), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId32), + }), + set_min_commission: sts.enumStruct({ + new: Perbill, + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_staking_configs: sts.enumStruct({ + minNominatorBond: ConfigOp, + minValidatorBond: ConfigOp, + maxNominatorCount: Type_92, + maxValidatorCount: Type_92, + chillThreshold: Type_93, + minCommission: Type_94, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export const Type_94: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export type Type_94 = Type_94_Noop | Type_94_Remove | Type_94_Set + +export interface Type_94_Noop { + __kind: 'Noop' +} + +export interface Type_94_Remove { + __kind: 'Remove' +} + +export interface Type_94_Set { + __kind: 'Set' + value: Perbill +} + +export type Perbill = number + +export const Type_93: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Percent, + } +}) + +export type Type_93 = Type_93_Noop | Type_93_Remove | Type_93_Set + +export interface Type_93_Noop { + __kind: 'Noop' +} + +export interface Type_93_Remove { + __kind: 'Remove' +} + +export interface Type_93_Set { + __kind: 'Set' + value: Percent +} + +export type Percent = number + +export const Type_92: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_92 = Type_92_Noop | Type_92_Remove | Type_92_Set + +export interface Type_92_Noop { + __kind: 'Noop' +} + +export interface Type_92_Remove { + __kind: 'Remove' +} + +export interface Type_92_Set { + __kind: 'Set' + value: number +} + +export const ConfigOp: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type ConfigOp = ConfigOp_Noop | ConfigOp_Remove | ConfigOp_Set + +export interface ConfigOp_Noop { + __kind: 'Noop' +} + +export interface ConfigOp_Remove { + __kind: 'Remove' +} + +export interface ConfigOp_Set { + __kind: 'Set' + value: bigint +} + +export const Perbill = sts.number() + +export const Percent = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_force_apply_min_commission | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_invulnerables | StakingCall_set_min_commission | StakingCall_set_payee | StakingCall_set_staking_configs | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * ## Complexity + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + */ +export interface StakingCall_bond { + __kind: 'bond' + controller: MultiAddress + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose + * any limitation on the amount that can be added. + * + * Emits `Bonded`. + * + * ## Complexity + * - Independent of the arguments. Insignificant complexity. + * - O(1). + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::AdminOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: number + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * ## Complexity + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Declare a `controller` to stop participating as either a validator or nominator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_, but can be called by anyone. + * + * If the caller is the same as the controller being targeted, then no further checks are + * enforced, and this function behaves just like `chill`. + * + * If the caller is different than the controller being targeted, the following conditions + * must be met: + * + * * `controller` must belong to a nominator who has become non-decodable, + * + * Or: + * + * * A `ChillThreshold` must be set and checked which defines how close to the max + * nominators or validators we must reach before users can start chilling one-another. + * * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine + * how close we are to the threshold. + * * A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines + * if this is a person that should be chilled because they have not met the threshold + * bond required. + * + * This can be helpful if bond requirements are updated, and we need to remove old users + * who do not satisfy these requirements. + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + controller: AccountId32 +} + +/** + * Force a validator to have at least the minimum commission. This will not affect a + * validator who already has a commission greater than or equal to the minimum. Any account + * can call this. + */ +export interface StakingCall_force_apply_min_commission { + __kind: 'force_apply_min_commission' + validatorStash: AccountId32 +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * ## Complexity + * - No arguments. + * - Weight: O(1) + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * Thus the election process may be ongoing when this is called. In this case the + * election will continue until the next era is triggered. + * + * ## Complexity + * - No arguments. + * - Weight: O(1) + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators upto maximum of + * `ElectionProviderBase::MaxWinners`. + * + * The dispatch origin must be Root. + * + * ## Complexity + * Same as [`Self::set_validator_count`]. + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: MultiAddress[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * ## Complexity + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (T::MaxNominations). + * - Both the reads and writes follow a similar pattern. + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: MultiAddress[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * ## Complexity + * - At most O(MaxNominatorRewardedPerValidator). + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId32 + era: number +} + +/** + * Remove all data structures concerning a staker/stash once it is at a state where it can + * be considered `dust` in the staking system. The requirements are: + * + * 1. the `total_balance` of the stash is below existential deposit. + * 2. or, the `ledger.total` of the stash is below existential deposit. + * + * The former can happen in cases like a slash; the latter when a fully unbonded account + * is still receiving staking rewards in `RewardDestination::Staked`. + * + * It can be called by anyone, as long as `stash` meets the above requirements. + * + * Refunds the transaction fees upon successful execution. + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller. + * + * ## Complexity + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MaxUnlockingChunks`. + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor upto maximum of + * `ElectionProviderBase::MaxWinners`. + * + * The dispatch origin must be Root. + * + * ## Complexity + * Same as [`Self::set_validator_count`]. + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)set the controller of a stash. + * + * Effects will be felt instantly (as soon as this function is completed successfully). + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * ## Complexity + * O(1) + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' + controller: MultiAddress +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId32[] +} + +/** + * Sets the minimum amount of commission that each validators must maintain. + * + * This call has lower privilege requirements than `set_staking_config` and can be called + * by the `T::AdminOrigin`. Root can always call this. + */ +export interface StakingCall_set_min_commission { + __kind: 'set_min_commission' + new: Perbill +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt instantly (as soon as this function is completed successfully). + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * ## Complexity + * - O(1) + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Update the various staking configurations . + * + * * `min_nominator_bond`: The minimum active bond needed to be a nominator. + * * `min_validator_bond`: The minimum active bond needed to be a validator. + * * `max_nominator_count`: The max number of users who can be a nominator at once. When + * set to `None`, no limit is enforced. + * * `max_validator_count`: The max number of users who can be a validator at once. When + * set to `None`, no limit is enforced. + * * `chill_threshold`: The ratio of `max_nominator_count` or `max_validator_count` which + * should be filled in order for the `chill_other` transaction to work. + * * `min_commission`: The minimum amount of commission that each validators must maintain. + * This is checked only upon calling `validate`. Existing validators are not affected. + * + * RuntimeOrigin must be Root to call this function. + * + * NOTE: Existing nominators and validators will not be affected by this update. + * to kick people under the new limits, `chill_other` should be called. + */ +export interface StakingCall_set_staking_configs { + __kind: 'set_staking_configs' + minNominatorBond: ConfigOp + minValidatorBond: ConfigOp + maxNominatorCount: Type_92 + maxValidatorCount: Type_92 + chillThreshold: Type_93 + minCommission: Type_94 +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * ## Complexity + * O(1) + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`) + * can co-exists at the same time. If there are no unlocking chunks slots available + * [`Call::withdraw_unbonded`] is called to remove some of the chunks (if possible). + * + * If a user encounters the `InsufficientBond` error when calling this extrinsic, + * they should call `chill` first in order to free up their bonded funds. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * ## Complexity + * O(S) where S is the number of slashing spans to remove + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: sts.bigint(), + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: MultiAddress, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: MultiAddress, + judgement: Type_199, + }), + judge_suspended_member: sts.enumStruct({ + who: MultiAddress, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: MultiAddress, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: MultiAddress, + value: sts.bigint(), + tip: sts.bigint(), + }), + } +}) + +export const Type_199: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export type Type_199 = Type_199_Approve | Type_199_Rebid | Type_199_Reject + +export interface Type_199_Approve { + __kind: 'Approve' +} + +export interface Type_199_Rebid { + __kind: 'Rebid' +} + +export interface Type_199_Reject { + __kind: 'Reject' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * ## Complexity + * - O(M + B + C + logM + logB + X) + * - B (len of bids) + * - C (len of candidates) + * - M (len of members) + * - X (balance reserve) + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: bigint +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * ## Complexity + * - O(M + logM) + * - M (len of members) + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * pallet to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * ## Complexity + * - O(1) + */ +export interface SocietyCall_found { + __kind: 'found' + founder: MultiAddress + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * ## Complexity + * - O(M + logM + B + X) + * - B (len of bids) + * - M (len of members) + * - X (balance action) + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: MultiAddress + judgement: Type_199 +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin forgives + * (`true`) or rejects (`false`) a suspended member. + * + * ## Complexity + * - O(M + logM + B) + * - B (len of bids) + * - M (len of members) + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: MultiAddress + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured + * payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * ## Complexity + * - O(M + logM + P + X) + * - M (len of members) + * - P (number of payouts for a particular member) + * - X (currency transfer call) + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * ## Complexity + * - O(1) + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * ## Complexity + * - O(B + X) + * - B (len of bids) + * - X (balance unreserve) + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * ## Complexity + * - O(1) + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * ## Complexity + * - O(B) + * - B (len of bids) + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be approved (`true`) or + * rejected (`false`). + * + * ## Complexity + * - O(M + logM + C) + * - C (len of candidates) + * - M (len of members) + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: MultiAddress + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * ## Complexity + * - O(M + B + C + logM + logB + X) + * - B (len of bids) + * - C (len of candidates) + * - M (len of members) + * - X (balance reserve) + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: MultiAddress + value: bigint + tip: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: Id, + }), + force_lease: sts.enumStruct({ + para: Id, + leaser: AccountId32, + amount: sts.bigint(), + periodBegin: sts.number(), + periodCount: sts.number(), + }), + trigger_onboard: sts.enumStruct({ + para: Id, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * Clear all leases for a Para Id, refunding any deposits back to the original owners. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: Id +} + +/** + * Just a connect into the `lease_out` call, in case Root wants to force some lease to happen + * independently of any other on-chain mechanism to use it. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: Id + leaser: AccountId32 + amount: bigint + periodBegin: number + periodCount: number +} + +/** + * Try to onboard a parachain that has a lease for the current lease period. + * + * This function can be useful if there was some state issue with a para that should + * have onboarded, but was unable to. As long as they have a lease period, we can + * let them onboard from here. + * + * Origin must be signed, but can be called by anyone. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: SessionKeys, + proof: sts.bytes(), + }), + } +}) + +export const SessionKeys: sts.Type = sts.struct(() => { + return { + grandpa: Public, + babe: sts.bytes(), + imOnline: sts.bytes(), + paraValidator: V4Public, + paraAssignment: sts.bytes(), + authorityDiscovery: sts.bytes(), + } +}) + +export const V4Public = sts.bytes() + +export const Public = sts.bytes() + +export interface SessionKeys { + grandpa: Public + babe: Bytes + imOnline: Bytes + paraValidator: V4Public + paraAssignment: Bytes + authorityDiscovery: Bytes +} + +export type V4Public = Bytes + +export type Public = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be Signed and the account must be either be + * convertible to a validator ID using the chain's typical addressing system (this usually + * means being a controller account) or directly convertible into a validator ID (which + * usually means being a stash account). + * + * ## Complexity + * - `O(1)` in number of key types. Actual cost depends on the number of length of + * `T::Keys::key_ids()` which is fixed. + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * ## Complexity + * - `O(1)`. Actual cost depends on the number of length of `T::Keys::key_ids()` which is + * fixed. + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: SessionKeys + proof: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: sts.number(), + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_after: sts.enumStruct({ + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: number + index: number +} + +/** + * Cancel a named scheduled task. + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Anonymously schedule a task after a delay. + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Schedule a named task. + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Schedule a named task after a delay. + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + add_lock: sts.enumStruct({ + para: Id, + }), + deregister: sts.enumStruct({ + id: Id, + }), + force_register: sts.enumStruct({ + who: AccountId32, + deposit: sts.bigint(), + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + register: sts.enumStruct({ + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + remove_lock: sts.enumStruct({ + para: Id, + }), + reserve: sts.unit(), + schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + swap: sts.enumStruct({ + id: Id, + other: Id, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RegistrarCall = RegistrarCall_add_lock | RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_register | RegistrarCall_remove_lock | RegistrarCall_reserve | RegistrarCall_schedule_code_upgrade | RegistrarCall_set_current_head | RegistrarCall_swap + +/** + * Add a manager lock from a para. This will prevent the manager of a + * para to deregister or swap a para. + * + * Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked. + */ +export interface RegistrarCall_add_lock { + __kind: 'add_lock' + para: Id +} + +/** + * Deregister a Para Id, freeing all data and returning any deposit. + * + * The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: Id +} + +/** + * Force the registration of a Para Id on the relay chain. + * + * This function must be called by a Root origin. + * + * The deposit taken can be specified for this registration. Any `ParaId` + * can be registered, including sub-1000 IDs which are System Parachains. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId32 + deposit: bigint + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Register head data and validation code for a reserved Para Id. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. + * - `id`: The para ID. Must be owned/managed by the `origin` signing account. + * - `genesis_head`: The genesis head data of the parachain/thread. + * - `validation_code`: The initial validation code of the parachain/thread. + * + * ## Deposits/Fees + * The origin signed account must reserve a corresponding deposit for the registration. Anything already + * reserved previously for this para ID is accounted for. + * + * ## Events + * The `Registered` event is emitted in case of success. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Remove a manager lock from a para. This will allow the manager of a + * previously locked para to deregister or swap a para without using governance. + * + * Can only be called by the Root origin or the parachain. + */ +export interface RegistrarCall_remove_lock { + __kind: 'remove_lock' + para: Id +} + +/** + * Reserve a Para Id on the relay chain. + * + * This function will reserve a new Para Id to be owned/managed by the origin account. + * The origin account is able to register head data and validation code using `register` to create + * a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID. + * + * ## Deposits/Fees + * The origin must reserve a deposit of `ParaDeposit` for the registration. + * + * ## Events + * The `Reserved` event is emitted in case of success, which provides the ID reserved for use. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * Schedule a parachain upgrade. + * + * Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked. + */ +export interface RegistrarCall_schedule_code_upgrade { + __kind: 'schedule_code_upgrade' + para: Id + newCode: ValidationCode +} + +/** + * Set the parachain's current head. + * + * Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked. + */ +export interface RegistrarCall_set_current_head { + __kind: 'set_current_head' + para: Id + newHead: HeadData +} + +/** + * Swap a parachain with another parachain or parathread. + * + * The origin must be Root, the `para` owner, or the `para` itself. + * + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: Id + other: Id +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ReferendaCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + index: sts.number(), + }), + kill: sts.enumStruct({ + index: sts.number(), + }), + nudge_referendum: sts.enumStruct({ + index: sts.number(), + }), + one_fewer_deciding: sts.enumStruct({ + track: sts.number(), + }), + place_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_submission_deposit: sts.enumStruct({ + index: sts.number(), + }), + set_metadata: sts.enumStruct({ + index: sts.number(), + maybeHash: sts.option(() => H256), + }), + submit: sts.enumStruct({ + proposalOrigin: OriginCaller, + proposal: Bounded, + enactmentMoment: DispatchTime, + }), + } +}) + +export const DispatchTime: sts.Type = sts.closedEnum(() => { + return { + After: sts.number(), + At: sts.number(), + } +}) + +export type DispatchTime = DispatchTime_After | DispatchTime_At + +export interface DispatchTime_After { + __kind: 'After' + value: number +} + +export interface DispatchTime_At { + __kind: 'At' + value: number +} + +export const Bounded: sts.Type = sts.closedEnum(() => { + return { + Inline: sts.bytes(), + Legacy: sts.enumStruct({ + hash: H256, + }), + Lookup: sts.enumStruct({ + hash: H256, + len: sts.number(), + }), + } +}) + +export type Bounded = Bounded_Inline | Bounded_Legacy | Bounded_Lookup + +export interface Bounded_Inline { + __kind: 'Inline' + value: Bytes +} + +export interface Bounded_Legacy { + __kind: 'Legacy' + hash: H256 +} + +export interface Bounded_Lookup { + __kind: 'Lookup' + hash: H256 + len: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ReferendaCall = ReferendaCall_cancel | ReferendaCall_kill | ReferendaCall_nudge_referendum | ReferendaCall_one_fewer_deciding | ReferendaCall_place_decision_deposit | ReferendaCall_refund_decision_deposit | ReferendaCall_refund_submission_deposit | ReferendaCall_set_metadata | ReferendaCall_submit + +/** + * Cancel an ongoing referendum. + * + * - `origin`: must be the `CancelOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Cancelled`. + */ +export interface ReferendaCall_cancel { + __kind: 'cancel' + index: number +} + +/** + * Cancel an ongoing referendum and slash the deposits. + * + * - `origin`: must be the `KillOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Killed` and `DepositSlashed`. + */ +export interface ReferendaCall_kill { + __kind: 'kill' + index: number +} + +/** + * Advance a referendum onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `index`: the referendum to be advanced. + */ +export interface ReferendaCall_nudge_referendum { + __kind: 'nudge_referendum' + index: number +} + +/** + * Advance a track onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `track`: the track to be advanced. + * + * Action item for when there is now one fewer referendum in the deciding phase and the + * `DecidingCount` is not yet updated. This means that we should either: + * - begin deciding another referendum (and leave `DecidingCount` alone); or + * - decrement `DecidingCount`. + */ +export interface ReferendaCall_one_fewer_deciding { + __kind: 'one_fewer_deciding' + track: number +} + +/** + * Post the Decision Deposit for a referendum. + * + * - `origin`: must be `Signed` and the account must have funds available for the + * referendum's track's Decision Deposit. + * - `index`: The index of the submitted referendum whose Decision Deposit is yet to be + * posted. + * + * Emits `DecisionDepositPlaced`. + */ +export interface ReferendaCall_place_decision_deposit { + __kind: 'place_decision_deposit' + index: number +} + +/** + * Refund the Decision Deposit for a closed referendum back to the depositor. + * + * - `origin`: must be `Signed` or `Root`. + * - `index`: The index of a closed referendum whose Decision Deposit has not yet been + * refunded. + * + * Emits `DecisionDepositRefunded`. + */ +export interface ReferendaCall_refund_decision_deposit { + __kind: 'refund_decision_deposit' + index: number +} + +/** + * Refund the Submission Deposit for a closed referendum back to the depositor. + * + * - `origin`: must be `Signed` or `Root`. + * - `index`: The index of a closed referendum whose Submission Deposit has not yet been + * refunded. + * + * Emits `SubmissionDepositRefunded`. + */ +export interface ReferendaCall_refund_submission_deposit { + __kind: 'refund_submission_deposit' + index: number +} + +/** + * Set or clear metadata of a referendum. + * + * Parameters: + * - `origin`: Must be `Signed` by a creator of a referendum or by anyone to clear a + * metadata of a finished referendum. + * - `index`: The index of a referendum to set or clear metadata for. + * - `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata. + */ +export interface ReferendaCall_set_metadata { + __kind: 'set_metadata' + index: number + maybeHash?: (H256 | undefined) +} + +/** + * Propose a referendum on a privileged action. + * + * - `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds + * available. + * - `proposal_origin`: The origin from which the proposal should be executed. + * - `proposal`: The proposal. + * - `enactment_moment`: The moment that the proposal should be enacted. + * + * Emits `Submitted`. + */ +export interface ReferendaCall_submit { + __kind: 'submit' + proposalOrigin: OriginCaller + proposal: Bounded + enactmentMoment: DispatchTime +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: MultiAddress, + call: Call, + }), + cancel_recovered: sts.enumStruct({ + account: MultiAddress, + }), + claim_recovery: sts.enumStruct({ + account: MultiAddress, + }), + close_recovery: sts.enumStruct({ + rescuer: MultiAddress, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId32), + threshold: sts.number(), + delayPeriod: sts.number(), + }), + initiate_recovery: sts.enumStruct({ + account: MultiAddress, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + vouch_recovery: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: MultiAddress + call: Call +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: MultiAddress +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully recovered by + * you. + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: MultiAddress +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: MultiAddress +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. Should be + * ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt before the + * account can be recovered. Should be less than or equal to the length of the list of + * friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized that + * needs to pass before the account can be recovered. + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId32[] + threshold: number + delayPeriod: number +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account needs to be + * recoverable (i.e. have a recovery configuration). + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: MultiAddress +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + announce: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + create_pure: sts.enumStruct({ + proxyType: ProxyType, + delay: sts.number(), + index: sts.number(), + }), + kill_pure: sts.enumStruct({ + spawner: MultiAddress, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + proxy_announced: sts.enumStruct({ + delegate: MultiAddress, + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + reject_announcement: sts.enumStruct({ + delegate: MultiAddress, + callHash: H256, + }), + remove_announcement: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_create_pure | ProxyCall_kill_pure | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: MultiAddress + callHash: H256 +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + */ +export interface ProxyCall_create_pure { + __kind: 'create_pure' + proxyType: ProxyType + delay: number + index: number +} + +/** + * Removes a previously spawned pure proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `pure` with corresponding parameters. + * + * - `spawner`: The account that originally called `pure` to create this account. + * - `index`: The disambiguation index originally passed to `pure`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `pure`. + * - `height`: The height of the chain when the call to `pure` was processed. + * - `ext_index`: The extrinsic index in which the call to `pure` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created pure + * account whose `pure` call has corresponding parameters. + */ +export interface ProxyCall_kill_pure { + __kind: 'kill_pure' + spawner: MultiAddress + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Dispatch the given `call` from an account that the sender is authorized for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: MultiAddress + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: MultiAddress + callHash: H256 +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: MultiAddress + callHash: H256 +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `pure`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NominationPools | ProxyType_NonTransfer | ProxyType_Society | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NominationPools { + __kind: 'NominationPools' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Society { + __kind: 'Society' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PreimageCall: sts.Type = sts.closedEnum(() => { + return { + note_preimage: sts.enumStruct({ + bytes: sts.bytes(), + }), + request_preimage: sts.enumStruct({ + hash: H256, + }), + unnote_preimage: sts.enumStruct({ + hash: H256, + }), + unrequest_preimage: sts.enumStruct({ + hash: H256, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PreimageCall = PreimageCall_note_preimage | PreimageCall_request_preimage | PreimageCall_unnote_preimage | PreimageCall_unrequest_preimage + +/** + * Register a preimage on-chain. + * + * If the preimage was previously requested, no fees or deposits are taken for providing + * the preimage. Otherwise, a deposit is taken proportional to the size of the preimage. + */ +export interface PreimageCall_note_preimage { + __kind: 'note_preimage' + bytes: Bytes +} + +/** + * Request a preimage be uploaded to the chain without paying any fees or deposits. + * + * If the preimage requests has already been provided on-chain, we unreserve any deposit + * a user may have paid, and take the control of the preimage out of their hands. + */ +export interface PreimageCall_request_preimage { + __kind: 'request_preimage' + hash: H256 +} + +/** + * Clear an unrequested preimage from the runtime storage. + * + * If `len` is provided, then it will be a much cheaper operation. + * + * - `hash`: The hash of the preimage to be removed from the store. + * - `len`: The length of the preimage of `hash`. + */ +export interface PreimageCall_unnote_preimage { + __kind: 'unnote_preimage' + hash: H256 +} + +/** + * Clear a previously made request for a preimage. + * + * NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. + */ +export interface PreimageCall_unrequest_preimage { + __kind: 'unrequest_preimage' + hash: H256 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasSlashingCall: sts.Type = sts.closedEnum(() => { + return { + report_dispute_lost_unsigned: sts.enumStruct({ + disputeProof: DisputeProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: sts.number(), + trieNodes: sts.array(() => sts.bytes()), + validatorCount: sts.number(), + } +}) + +export interface MembershipProof { + session: number + trieNodes: Bytes[] + validatorCount: number +} + +export const DisputeProof: sts.Type = sts.struct(() => { + return { + timeSlot: DisputesTimeSlot, + kind: SlashingOffenceKind, + validatorIndex: V4ValidatorIndex, + validatorId: V4Public, + } +}) + +export const V4ValidatorIndex = sts.number() + +export const SlashingOffenceKind: sts.Type = sts.closedEnum(() => { + return { + AgainstValid: sts.unit(), + ForInvalid: sts.unit(), + } +}) + +export type SlashingOffenceKind = SlashingOffenceKind_AgainstValid | SlashingOffenceKind_ForInvalid + +export interface SlashingOffenceKind_AgainstValid { + __kind: 'AgainstValid' +} + +export interface SlashingOffenceKind_ForInvalid { + __kind: 'ForInvalid' +} + +export const DisputesTimeSlot: sts.Type = sts.struct(() => { + return { + sessionIndex: sts.number(), + candidateHash: CandidateHash, + } +}) + +export const CandidateHash = sts.bytes() + +export interface DisputesTimeSlot { + sessionIndex: number + candidateHash: CandidateHash +} + +export type CandidateHash = Bytes + +export interface DisputeProof { + timeSlot: DisputesTimeSlot + kind: SlashingOffenceKind + validatorIndex: V4ValidatorIndex + validatorId: V4Public +} + +export type V4ValidatorIndex = number + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasSlashingCall = ParasSlashingCall_report_dispute_lost_unsigned + +export interface ParasSlashingCall_report_dispute_lost_unsigned { + __kind: 'report_dispute_lost_unsigned' + disputeProof: DisputeProof + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasSharedCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasDisputesCall: sts.Type = sts.closedEnum(() => { + return { + force_unfreeze: sts.unit(), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasDisputesCall = ParasDisputesCall_force_unfreeze + +export interface ParasDisputesCall_force_unfreeze { + __kind: 'force_unfreeze' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + add_trusted_validation_code: sts.enumStruct({ + validationCode: ValidationCode, + }), + force_note_new_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: Id, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + relayParentNumber: sts.number(), + }), + force_set_current_code: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + include_pvf_check_statement: sts.enumStruct({ + stmt: V4PvfCheckStatement, + signature: V4Signature, + }), + poke_unused_validation_code: sts.enumStruct({ + validationCodeHash: ValidationCodeHash, + }), + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const V4Signature = sts.bytes() + +export const V4PvfCheckStatement: sts.Type = sts.struct(() => { + return { + accept: sts.boolean(), + subject: ValidationCodeHash, + sessionIndex: sts.number(), + validatorIndex: V4ValidatorIndex, + } +}) + +export interface V4PvfCheckStatement { + accept: boolean + subject: ValidationCodeHash + sessionIndex: number + validatorIndex: V4ValidatorIndex +} + +export type ValidationCodeHash = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasCall = ParasCall_add_trusted_validation_code | ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head | ParasCall_include_pvf_check_statement | ParasCall_poke_unused_validation_code + +/** + * Adds the validation code to the storage. + * + * The code will not be added if it is already present. Additionally, if PVF pre-checking + * is running for that code, it will be instantly accepted. + * + * Otherwise, the code will be added into the storage. Note that the code will be added + * into storage with reference count 0. This is to account the fact that there are no users + * for this code yet. The caller will have to make sure that this code eventually gets + * used by some parachain or removed from the storage to avoid storage leaks. For the latter + * prefer to use the `poke_unused_validation_code` dispatchable to raw storage manipulation. + * + * This function is mainly meant to be used for upgrading parachains that do not follow + * the go-ahead signal while the PVF pre-checking feature is enabled. + */ +export interface ParasCall_add_trusted_validation_code { + __kind: 'add_trusted_validation_code' + validationCode: ValidationCode +} + +/** + * Note a new block head for para within the context of the current block. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: Id + newHead: HeadData +} + +/** + * Put a parachain directly into the next session's action queue. + * We can't queue it any sooner than this without going into the + * initializer... + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: Id +} + +/** + * Schedule an upgrade as if it was scheduled in the given relay parent block. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: Id + newCode: ValidationCode + relayParentNumber: number +} + +/** + * Set the storage for the parachain validation code immediately. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: Id + newCode: ValidationCode +} + +/** + * Set the storage for the current parachain head data immediately. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: Id + newHead: HeadData +} + +/** + * Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and + * enacts the results if that was the last vote before achieving the supermajority. + */ +export interface ParasCall_include_pvf_check_statement { + __kind: 'include_pvf_check_statement' + stmt: V4PvfCheckStatement + signature: V4Signature +} + +/** + * Remove the validation code from the storage iff the reference count is 0. + * + * This is better than removing the storage directly, because it will not remove the code + * that was suddenly got used by some parachain while this dispatchable was pending + * dispatching. + */ +export interface ParasCall_poke_unused_validation_code { + __kind: 'poke_unused_validation_code' + validationCodeHash: ValidationCodeHash +} + +export type V4Signature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: V4InherentData, + }), + } +}) + +export const V4InherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => V4UncheckedSigned), + backedCandidates: sts.array(() => V4BackedCandidate), + disputes: sts.array(() => V4DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: H256, + number: sts.number(), + stateRoot: H256, + extrinsicsRoot: H256, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + Consensus: sts.tuple(() => [sts.bytes(), sts.bytes()]), + Other: sts.bytes(), + PreRuntime: sts.tuple(() => [sts.bytes(), sts.bytes()]), + RuntimeEnvironmentUpdated: sts.unit(), + Seal: sts.tuple(() => [sts.bytes(), sts.bytes()]), + } +}) + +export type DigestItem = DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: [Bytes, Bytes] +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: [Bytes, Bytes] +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: [Bytes, Bytes] +} + +export interface Digest { + logs: DigestItem[] +} + +export interface Header { + parentHash: H256 + number: number + stateRoot: H256 + extrinsicsRoot: H256 + digest: Digest +} + +export const V4DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: sts.number(), + statements: sts.array(() => sts.tuple(() => [V4DisputeStatement, V4ValidatorIndex, V4Signature])), + } +}) + +export const V4DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: V4InvalidDisputeStatementKind, + Valid: V4ValidDisputeStatementKind, + } +}) + +export const V4ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + BackingSeconded: H256, + BackingValid: H256, + Explicit: sts.unit(), + } +}) + +export type V4ValidDisputeStatementKind = V4ValidDisputeStatementKind_ApprovalChecking | V4ValidDisputeStatementKind_BackingSeconded | V4ValidDisputeStatementKind_BackingValid | V4ValidDisputeStatementKind_Explicit + +export interface V4ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface V4ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: H256 +} + +export interface V4ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: H256 +} + +export interface V4ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export const V4InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export type V4InvalidDisputeStatementKind = V4InvalidDisputeStatementKind_Explicit + +export interface V4InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type V4DisputeStatement = V4DisputeStatement_Invalid | V4DisputeStatement_Valid + +export interface V4DisputeStatement_Invalid { + __kind: 'Invalid' + value: V4InvalidDisputeStatementKind +} + +export interface V4DisputeStatement_Valid { + __kind: 'Valid' + value: V4ValidDisputeStatementKind +} + +export interface V4DisputeStatementSet { + candidateHash: CandidateHash + session: number + statements: [V4DisputeStatement, V4ValidatorIndex, V4Signature][] +} + +export const V4BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: V4CommittedCandidateReceipt, + validityVotes: sts.array(() => V4ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const V4ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: V4Signature, + Implicit: V4Signature, + } +}) + +export type V4ValidityAttestation = V4ValidityAttestation_Explicit | V4ValidityAttestation_Implicit + +export interface V4ValidityAttestation_Explicit { + __kind: 'Explicit' + value: V4Signature +} + +export interface V4ValidityAttestation_Implicit { + __kind: 'Implicit' + value: V4Signature +} + +export const V4CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: V4CandidateDescriptor, + commitments: V4CandidateCommitments, + } +}) + +export const V4CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => sts.bytes()), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: sts.number(), + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: Id, + data: sts.bytes(), + } +}) + +export interface OutboundHrmpMessage { + recipient: Id + data: Bytes +} + +export interface V4CandidateCommitments { + upwardMessages: Bytes[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: number +} + +export const V4CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: Id, + relayParent: H256, + collator: sts.bytes(), + persistedValidationDataHash: H256, + povHash: H256, + erasureRoot: H256, + signature: sts.bytes(), + paraHead: H256, + validationCodeHash: ValidationCodeHash, + } +}) + +export interface V4CandidateDescriptor { + paraId: Id + relayParent: H256 + collator: Bytes + persistedValidationDataHash: H256 + povHash: H256 + erasureRoot: H256 + signature: Bytes + paraHead: H256 + validationCodeHash: ValidationCodeHash +} + +export interface V4CommittedCandidateReceipt { + descriptor: V4CandidateDescriptor + commitments: V4CandidateCommitments +} + +export interface V4BackedCandidate { + candidate: V4CommittedCandidateReceipt + validityVotes: V4ValidityAttestation[] + validatorIndices: BitSequence +} + +export const V4UncheckedSigned: sts.Type = sts.struct(() => { + return { + payload: V4AvailabilityBitfield, + validatorIndex: V4ValidatorIndex, + signature: V4Signature, + } +}) + +export const V4AvailabilityBitfield = sts.bitseq() + +export interface V4UncheckedSigned { + payload: V4AvailabilityBitfield + validatorIndex: V4ValidatorIndex + signature: V4Signature +} + +export type V4AvailabilityBitfield = BitSequence + +export interface V4InherentData { + bitfields: V4UncheckedSigned[] + backedCandidates: V4BackedCandidate[] + disputes: V4DisputeStatementSet[] + parentHeader: Header +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInherentCall = ParaInherentCall_enter + +/** + * Enter the paras inherent. This will process bitfields and backed candidates. + */ +export interface ParaInherentCall_enter { + __kind: 'enter' + data: V4InherentData +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInclusionCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const NominationPoolsCall: sts.Type = sts.closedEnum(() => { + return { + bond_extra: sts.enumStruct({ + extra: BondExtra, + }), + bond_extra_other: sts.enumStruct({ + member: MultiAddress, + extra: BondExtra, + }), + chill: sts.enumStruct({ + poolId: sts.number(), + }), + claim_commission: sts.enumStruct({ + poolId: sts.number(), + }), + claim_payout: sts.unit(), + claim_payout_other: sts.enumStruct({ + other: AccountId32, + }), + create: sts.enumStruct({ + amount: sts.bigint(), + root: MultiAddress, + nominator: MultiAddress, + bouncer: MultiAddress, + }), + create_with_pool_id: sts.enumStruct({ + amount: sts.bigint(), + root: MultiAddress, + nominator: MultiAddress, + bouncer: MultiAddress, + poolId: sts.number(), + }), + join: sts.enumStruct({ + amount: sts.bigint(), + poolId: sts.number(), + }), + nominate: sts.enumStruct({ + poolId: sts.number(), + validators: sts.array(() => AccountId32), + }), + pool_withdraw_unbonded: sts.enumStruct({ + poolId: sts.number(), + numSlashingSpans: sts.number(), + }), + set_claim_permission: sts.enumStruct({ + permission: ClaimPermission, + }), + set_commission: sts.enumStruct({ + poolId: sts.number(), + newCommission: sts.option(() => sts.tuple(() => [Perbill, AccountId32])), + }), + set_commission_change_rate: sts.enumStruct({ + poolId: sts.number(), + changeRate: CommissionChangeRate, + }), + set_commission_max: sts.enumStruct({ + poolId: sts.number(), + maxCommission: Perbill, + }), + set_configs: sts.enumStruct({ + minJoinBond: Type_309, + minCreateBond: Type_309, + maxPools: Type_310, + maxMembers: Type_310, + maxMembersPerPool: Type_310, + globalMaxCommission: Type_311, + }), + set_metadata: sts.enumStruct({ + poolId: sts.number(), + metadata: sts.bytes(), + }), + set_state: sts.enumStruct({ + poolId: sts.number(), + state: PoolState, + }), + unbond: sts.enumStruct({ + memberAccount: MultiAddress, + unbondingPoints: sts.bigint(), + }), + update_roles: sts.enumStruct({ + poolId: sts.number(), + newRoot: Type_312, + newNominator: Type_312, + newBouncer: Type_312, + }), + withdraw_unbonded: sts.enumStruct({ + memberAccount: MultiAddress, + numSlashingSpans: sts.number(), + }), + } +}) + +export const Type_312: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: AccountId32, + } +}) + +export type Type_312 = Type_312_Noop | Type_312_Remove | Type_312_Set + +export interface Type_312_Noop { + __kind: 'Noop' +} + +export interface Type_312_Remove { + __kind: 'Remove' +} + +export interface Type_312_Set { + __kind: 'Set' + value: AccountId32 +} + +export const PoolState: sts.Type = sts.closedEnum(() => { + return { + Blocked: sts.unit(), + Destroying: sts.unit(), + Open: sts.unit(), + } +}) + +export type PoolState = PoolState_Blocked | PoolState_Destroying | PoolState_Open + +export interface PoolState_Blocked { + __kind: 'Blocked' +} + +export interface PoolState_Destroying { + __kind: 'Destroying' +} + +export interface PoolState_Open { + __kind: 'Open' +} + +export const Type_311: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export type Type_311 = Type_311_Noop | Type_311_Remove | Type_311_Set + +export interface Type_311_Noop { + __kind: 'Noop' +} + +export interface Type_311_Remove { + __kind: 'Remove' +} + +export interface Type_311_Set { + __kind: 'Set' + value: Perbill +} + +export const Type_310: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_310 = Type_310_Noop | Type_310_Remove | Type_310_Set + +export interface Type_310_Noop { + __kind: 'Noop' +} + +export interface Type_310_Remove { + __kind: 'Remove' +} + +export interface Type_310_Set { + __kind: 'Set' + value: number +} + +export const Type_309: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type Type_309 = Type_309_Noop | Type_309_Remove | Type_309_Set + +export interface Type_309_Noop { + __kind: 'Noop' +} + +export interface Type_309_Remove { + __kind: 'Remove' +} + +export interface Type_309_Set { + __kind: 'Set' + value: bigint +} + +export const CommissionChangeRate: sts.Type = sts.struct(() => { + return { + maxIncrease: Perbill, + minDelay: sts.number(), + } +}) + +export interface CommissionChangeRate { + maxIncrease: Perbill + minDelay: number +} + +export const ClaimPermission: sts.Type = sts.closedEnum(() => { + return { + Permissioned: sts.unit(), + PermissionlessAll: sts.unit(), + PermissionlessCompound: sts.unit(), + PermissionlessWithdraw: sts.unit(), + } +}) + +export type ClaimPermission = ClaimPermission_Permissioned | ClaimPermission_PermissionlessAll | ClaimPermission_PermissionlessCompound | ClaimPermission_PermissionlessWithdraw + +export interface ClaimPermission_Permissioned { + __kind: 'Permissioned' +} + +export interface ClaimPermission_PermissionlessAll { + __kind: 'PermissionlessAll' +} + +export interface ClaimPermission_PermissionlessCompound { + __kind: 'PermissionlessCompound' +} + +export interface ClaimPermission_PermissionlessWithdraw { + __kind: 'PermissionlessWithdraw' +} + +export const BondExtra: sts.Type = sts.closedEnum(() => { + return { + FreeBalance: sts.bigint(), + Rewards: sts.unit(), + } +}) + +export type BondExtra = BondExtra_FreeBalance | BondExtra_Rewards + +export interface BondExtra_FreeBalance { + __kind: 'FreeBalance' + value: bigint +} + +export interface BondExtra_Rewards { + __kind: 'Rewards' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type NominationPoolsCall = NominationPoolsCall_bond_extra | NominationPoolsCall_bond_extra_other | NominationPoolsCall_chill | NominationPoolsCall_claim_commission | NominationPoolsCall_claim_payout | NominationPoolsCall_claim_payout_other | NominationPoolsCall_create | NominationPoolsCall_create_with_pool_id | NominationPoolsCall_join | NominationPoolsCall_nominate | NominationPoolsCall_pool_withdraw_unbonded | NominationPoolsCall_set_claim_permission | NominationPoolsCall_set_commission | NominationPoolsCall_set_commission_change_rate | NominationPoolsCall_set_commission_max | NominationPoolsCall_set_configs | NominationPoolsCall_set_metadata | NominationPoolsCall_set_state | NominationPoolsCall_unbond | NominationPoolsCall_update_roles | NominationPoolsCall_withdraw_unbonded + +/** + * Bond `extra` more funds from `origin` into the pool to which they already belong. + * + * Additional funds can come from either the free balance of the account, of from the + * accumulated rewards, see [`BondExtra`]. + * + * Bonding extra funds implies an automatic payout of all pending rewards as well. + * See `bond_extra_other` to bond pending rewards of `other` members. + */ +export interface NominationPoolsCall_bond_extra { + __kind: 'bond_extra' + extra: BondExtra +} + +/** + * `origin` bonds funds from `extra` for some pool member `member` into their respective + * pools. + * + * `origin` can bond extra funds from free balance or pending rewards when `origin == + * other`. + * + * In the case of `origin != other`, `origin` can only bond extra pending rewards of + * `other` members assuming set_claim_permission for the given member is + * `PermissionlessAll` or `PermissionlessCompound`. + */ +export interface NominationPoolsCall_bond_extra_other { + __kind: 'bond_extra_other' + member: MultiAddress + extra: BondExtra +} + +/** + * Chill on behalf of the pool. + * + * The dispatch origin of this call must be signed by the pool nominator or the pool + * root role, same as [`Pallet::nominate`]. + * + * This directly forward the call to the staking pallet, on behalf of the pool bonded + * account. + */ +export interface NominationPoolsCall_chill { + __kind: 'chill' + poolId: number +} + +/** + * Claim pending commission. + * + * The dispatch origin of this call must be signed by the `root` role of the pool. Pending + * commission is paid out and added to total claimed commission`. Total pending commission + * is reset to zero. the current. + */ +export interface NominationPoolsCall_claim_commission { + __kind: 'claim_commission' + poolId: number +} + +/** + * A bonded member can use this to claim their payout based on the rewards that the pool + * has accumulated since their last claimed payout (OR since joining if this is their first + * time claiming rewards). The payout will be transferred to the member's account. + * + * The member will earn rewards pro rata based on the members stake vs the sum of the + * members in the pools stake. Rewards do not "expire". + * + * See `claim_payout_other` to caim rewards on bahalf of some `other` pool member. + */ +export interface NominationPoolsCall_claim_payout { + __kind: 'claim_payout' +} + +/** + * `origin` can claim payouts on some pool member `other`'s behalf. + * + * Pool member `other` must have a `PermissionlessAll` or `PermissionlessWithdraw` in order + * for this call to be successful. + */ +export interface NominationPoolsCall_claim_payout_other { + __kind: 'claim_payout_other' + other: AccountId32 +} + +/** + * Create a new delegation pool. + * + * # Arguments + * + * * `amount` - The amount of funds to delegate to the pool. This also acts of a sort of + * deposit since the pools creator cannot fully unbond funds until the pool is being + * destroyed. + * * `index` - A disambiguation index for creating the account. Likely only useful when + * creating multiple pools in the same extrinsic. + * * `root` - The account to set as [`PoolRoles::root`]. + * * `nominator` - The account to set as the [`PoolRoles::nominator`]. + * * `bouncer` - The account to set as the [`PoolRoles::bouncer`]. + * + * # Note + * + * In addition to `amount`, the caller will transfer the existential deposit; so the caller + * needs at have at least `amount + existential_deposit` transferrable. + */ +export interface NominationPoolsCall_create { + __kind: 'create' + amount: bigint + root: MultiAddress + nominator: MultiAddress + bouncer: MultiAddress +} + +/** + * Create a new delegation pool with a previously used pool id + * + * # Arguments + * + * same as `create` with the inclusion of + * * `pool_id` - `A valid PoolId. + */ +export interface NominationPoolsCall_create_with_pool_id { + __kind: 'create_with_pool_id' + amount: bigint + root: MultiAddress + nominator: MultiAddress + bouncer: MultiAddress + poolId: number +} + +/** + * Stake funds with a pool. The amount to bond is transferred from the member to the + * pools account and immediately increases the pools bond. + * + * # Note + * + * * An account can only be a member of a single pool. + * * An account cannot join the same pool multiple times. + * * This call will *not* dust the member account, so the member must have at least + * `existential deposit + amount` in their account. + * * Only a pool with [`PoolState::Open`] can be joined + */ +export interface NominationPoolsCall_join { + __kind: 'join' + amount: bigint + poolId: number +} + +/** + * Nominate on behalf of the pool. + * + * The dispatch origin of this call must be signed by the pool nominator or the pool + * root role. + * + * This directly forward the call to the staking pallet, on behalf of the pool bonded + * account. + */ +export interface NominationPoolsCall_nominate { + __kind: 'nominate' + poolId: number + validators: AccountId32[] +} + +/** + * Call `withdraw_unbonded` for the pools account. This call can be made by any account. + * + * This is useful if their are too many unlocking chunks to call `unbond`, and some + * can be cleared by withdrawing. In the case there are too many unlocking chunks, the user + * would probably see an error like `NoMoreChunks` emitted from the staking system when + * they attempt to unbond. + */ +export interface NominationPoolsCall_pool_withdraw_unbonded { + __kind: 'pool_withdraw_unbonded' + poolId: number + numSlashingSpans: number +} + +/** + * Allows a pool member to set a claim permission to allow or disallow permissionless + * bonding and withdrawing. + * + * By default, this is `Permissioned`, which implies only the pool member themselves can + * claim their pending rewards. If a pool member wishes so, they can set this to + * `PermissionlessAll` to allow any account to claim their rewards and bond extra to the + * pool. + * + * # Arguments + * + * * `origin` - Member of a pool. + * * `actor` - Account to claim reward. // improve this + */ +export interface NominationPoolsCall_set_claim_permission { + __kind: 'set_claim_permission' + permission: ClaimPermission +} + +/** + * Set the commission of a pool. + * Both a commission percentage and a commission payee must be provided in the `current` + * tuple. Where a `current` of `None` is provided, any current commission will be removed. + * + * - If a `None` is supplied to `new_commission`, existing commission will be removed. + */ +export interface NominationPoolsCall_set_commission { + __kind: 'set_commission' + poolId: number + newCommission?: ([Perbill, AccountId32] | undefined) +} + +/** + * Set the commission change rate for a pool. + * + * Initial change rate is not bounded, whereas subsequent updates can only be more + * restrictive than the current. + */ +export interface NominationPoolsCall_set_commission_change_rate { + __kind: 'set_commission_change_rate' + poolId: number + changeRate: CommissionChangeRate +} + +/** + * Set the maximum commission of a pool. + * + * - Initial max can be set to any `Perbill`, and only smaller values thereafter. + * - Current commission will be lowered in the event it is higher than a new max + * commission. + */ +export interface NominationPoolsCall_set_commission_max { + __kind: 'set_commission_max' + poolId: number + maxCommission: Perbill +} + +/** + * Update configurations for the nomination pools. The origin for this call must be + * Root. + * + * # Arguments + * + * * `min_join_bond` - Set [`MinJoinBond`]. + * * `min_create_bond` - Set [`MinCreateBond`]. + * * `max_pools` - Set [`MaxPools`]. + * * `max_members` - Set [`MaxPoolMembers`]. + * * `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]. + * * `global_max_commission` - Set [`GlobalMaxCommission`]. + */ +export interface NominationPoolsCall_set_configs { + __kind: 'set_configs' + minJoinBond: Type_309 + minCreateBond: Type_309 + maxPools: Type_310 + maxMembers: Type_310 + maxMembersPerPool: Type_310 + globalMaxCommission: Type_311 +} + +/** + * Set a new metadata for the pool. + * + * The dispatch origin of this call must be signed by the bouncer, or the root role of the + * pool. + */ +export interface NominationPoolsCall_set_metadata { + __kind: 'set_metadata' + poolId: number + metadata: Bytes +} + +/** + * Set a new state for the pool. + * + * If a pool is already in the `Destroying` state, then under no condition can its state + * change again. + * + * The dispatch origin of this call must be either: + * + * 1. signed by the bouncer, or the root role of the pool, + * 2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and + * then the state of the pool can be permissionlessly changed to `Destroying`. + */ +export interface NominationPoolsCall_set_state { + __kind: 'set_state' + poolId: number + state: PoolState +} + +/** + * Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It + * implicitly collects the rewards one last time, since not doing so would mean some + * rewards would be forfeited. + * + * Under certain conditions, this call can be dispatched permissionlessly (i.e. by any + * account). + * + * # Conditions for a permissionless dispatch. + * + * * The pool is blocked and the caller is either the root or bouncer. This is refereed to + * as a kick. + * * The pool is destroying and the member is not the depositor. + * * The pool is destroying, the member is the depositor and no other members are in the + * pool. + * + * ## Conditions for permissioned dispatch (i.e. the caller is also the + * `member_account`): + * + * * The caller is not the depositor. + * * The caller is the depositor, the pool is destroying and no other members are in the + * pool. + * + * # Note + * + * If there are too many unlocking chunks to unbond with the pool account, + * [`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks. + * The [`StakingInterface::unbond`] will implicitly call [`Call::pool_withdraw_unbonded`] + * to try to free chunks if necessary (ie. if unbound was called and no unlocking chunks + * are available). However, it may not be possible to release the current unlocking chunks, + * in which case, the result of this call will likely be the `NoMoreChunks` error from the + * staking system. + */ +export interface NominationPoolsCall_unbond { + __kind: 'unbond' + memberAccount: MultiAddress + unbondingPoints: bigint +} + +/** + * Update the roles of the pool. + * + * The root is the only entity that can change any of the roles, including itself, + * excluding the depositor, who can never change. + * + * It emits an event, notifying UIs of the role change. This event is quite relevant to + * most pool members and they should be informed of changes to pool roles. + */ +export interface NominationPoolsCall_update_roles { + __kind: 'update_roles' + poolId: number + newRoot: Type_312 + newNominator: Type_312 + newBouncer: Type_312 +} + +/** + * Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an + * error is returned. + * + * Under certain conditions, this call can be dispatched permissionlessly (i.e. by any + * account). + * + * # Conditions for a permissionless dispatch + * + * * The pool is in destroy mode and the target is not the depositor. + * * The target is the depositor and they are the only member in the sub pools. + * * The pool is blocked and the caller is either the root or bouncer. + * + * # Conditions for permissioned dispatch + * + * * The caller is the target and they are not the depositor. + * + * # Note + * + * If the target is the depositor, the pool will be destroyed. + */ +export interface NominationPoolsCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + memberAccount: MultiAddress + numSlashingSpans: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const NisCounterpartBalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + }), + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + set_balance_deprecated: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + oldReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_allow_death: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + upgrade_accounts: sts.enumStruct({ + who: sts.array(() => AccountId32), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type NisCounterpartBalancesCall = NisCounterpartBalancesCall_force_set_balance | NisCounterpartBalancesCall_force_transfer | NisCounterpartBalancesCall_force_unreserve | NisCounterpartBalancesCall_set_balance_deprecated | NisCounterpartBalancesCall_transfer | NisCounterpartBalancesCall_transfer_all | NisCounterpartBalancesCall_transfer_allow_death | NisCounterpartBalancesCall_transfer_keep_alive | NisCounterpartBalancesCall_upgrade_accounts + +/** + * Set the regular balance of a given account. + * + * The dispatch origin for this call is `root`. + */ +export interface NisCounterpartBalancesCall_force_set_balance { + __kind: 'force_set_balance' + who: MultiAddress + newFree: bigint +} + +/** + * Exactly as `transfer_allow_death`, except the origin must be root and the source account + * may be specified. + */ +export interface NisCounterpartBalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * Unreserve some balance from a user by force. + * + * Can only be called by ROOT. + */ +export interface NisCounterpartBalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * Set the regular balance of a given account; it also takes a reserved balance but this + * must be the same as the account's current reserved balance. + * + * The dispatch origin for this call is `root`. + * + * WARNING: This call is DEPRECATED! Use `force_set_balance` instead. + */ +export interface NisCounterpartBalancesCall_set_balance_deprecated { + __kind: 'set_balance_deprecated' + who: MultiAddress + newFree: bigint + oldReserved: bigint +} + +/** + * Alias for `transfer_allow_death`, provided only for name-wise compatibility. + * + * WARNING: DEPRECATED! Will be released in approximately 3 months. + */ +export interface NisCounterpartBalancesCall_transfer { + __kind: 'transfer' + dest: MultiAddress + value: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). + */ +export interface NisCounterpartBalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer_allow_death` will set the `FreeBalance` of the sender and receiver. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + */ +export interface NisCounterpartBalancesCall_transfer_allow_death { + __kind: 'transfer_allow_death' + dest: MultiAddress + value: bigint +} + +/** + * Same as the [`transfer_allow_death`] call, but with a check that the transfer will not + * kill the origin account. + * + * 99% of the time you want [`transfer_allow_death`] instead. + * + * [`transfer_allow_death`]: struct.Pallet.html#method.transfer + */ +export interface NisCounterpartBalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * Upgrade a specified account. + * + * - `origin`: Must be `Signed`. + * - `who`: The account to be upgraded. + * + * This will waive the transaction fee if at least all but 10% of the accounts needed to + * be upgraded. (We let some not have to be upgraded just in order to allow for the + * possibililty of churn). + */ +export interface NisCounterpartBalancesCall_upgrade_accounts { + __kind: 'upgrade_accounts' + who: AccountId32[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const NisCall: sts.Type = sts.closedEnum(() => { + return { + communify: sts.enumStruct({ + index: sts.number(), + }), + fund_deficit: sts.unit(), + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + privatize: sts.enumStruct({ + index: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + thaw_communal: sts.enumStruct({ + index: sts.number(), + }), + thaw_private: sts.enumStruct({ + index: sts.number(), + maybeProportion: sts.option(() => Perquintill), + }), + } +}) + +export const Perquintill = sts.bigint() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type NisCall = NisCall_communify | NisCall_fund_deficit | NisCall_place_bid | NisCall_privatize | NisCall_retract_bid | NisCall_thaw_communal | NisCall_thaw_private + +/** + * Make a private receipt communal and create fungible counterparts for its owner. + */ +export interface NisCall_communify { + __kind: 'communify' + index: number +} + +/** + * Ensure we have sufficient funding for all potential payouts. + * + * - `origin`: Must be accepted by `FundOrigin`. + */ +export interface NisCall_fund_deficit { + __kind: 'fund_deficit' +} + +/** + * Place a bid. + * + * Origin must be Signed, and account must have at least `amount` in free balance. + * + * - `amount`: The amount of the bid; these funds will be reserved, and if/when + * consolidated, removed. Must be at least `MinBid`. + * - `duration`: The number of periods before which the newly consolidated bid may be + * thawed. Must be greater than 1 and no more than `QueueCount`. + * + * Complexities: + * - `Queues[duration].len()` (just take max). + */ +export interface NisCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * Make a communal receipt private and burn fungible counterparts from its owner. + */ +export interface NisCall_privatize { + __kind: 'privatize' + index: number +} + +/** + * Retract a previously placed bid. + * + * Origin must be Signed, and the account should have previously issued a still-active bid + * of `amount` for `duration`. + * + * - `amount`: The amount of the previous bid. + * - `duration`: The duration of the previous bid. + */ +export interface NisCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * Reduce or remove an outstanding receipt, placing the according proportion of funds into + * the account of the owner. + * + * - `origin`: Must be Signed and the account must be the owner of the fungible counterpart + * for receipt `index`. + * - `index`: The index of the receipt. + */ +export interface NisCall_thaw_communal { + __kind: 'thaw_communal' + index: number +} + +/** + * Reduce or remove an outstanding receipt, placing the according proportion of funds into + * the account of the owner. + * + * - `origin`: Must be Signed and the account must be the owner of the receipt `index` as + * well as any fungible counterpart. + * - `index`: The index of the receipt. + * - `portion`: If `Some`, then only the given portion of the receipt should be thawed. If + * `None`, then all of it should be. + */ +export interface NisCall_thaw_private { + __kind: 'thaw_private' + index: number + maybeProportion?: (Perquintill | undefined) +} + +export type Perquintill = bigint + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + call: Call, + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId32), + call: Call, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * ## Complexity + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * ## Complexity + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + call: Call + maxWeight: Weight +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * ## Complexity + * O(Z + C) where Z is the length of the call and C its execution weight. + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId32[] + call: Call +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * ## Complexity + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId32[] + timepoint: Timepoint + callHash: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const InitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type InitializerCall = InitializerCall_force_approve + +/** + * Issue a signal to the consensus engine to forcibly act as though all parachain + * blocks in all relay chain blocks up to and including the given number in the current + * chain are valid and should be finalized. + */ +export interface InitializerCall_force_approve { + __kind: 'force_approve' + upTo: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: sts.number(), + }), + force_transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: sts.number(), + }), + freeze: sts.enumStruct({ + index: sts.number(), + }), + transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * ## Complexity + * - `O(1)`. + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: number +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * ## Complexity + * - `O(1)`. + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: MultiAddress + index: number + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * ## Complexity + * - `O(1)`. + */ +export interface IndicesCall_free { + __kind: 'free' + index: number +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the + * deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * ## Complexity + * - `O(1)`. + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: number +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * ## Complexity + * - `O(1)`. + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: MultiAddress + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: sts.bytes(), + }), + } +}) + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: sts.number(), + networkState: OpaqueNetworkState, + sessionIndex: sts.number(), + authorityIndex: sts.number(), + validatorsLen: sts.number(), + } +}) + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export interface Heartbeat { + blockNumber: number + networkState: OpaqueNetworkState + sessionIndex: number + authorityIndex: number + validatorsLen: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * ## Complexity: + * - `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is length of + * `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Bytes +} + +/** + * Identity pallet declaration. + */ +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: MultiAddress, + }), + add_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: sts.number(), + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: MultiAddress, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: MultiAddress, + judgement: Judgement, + identity: H256, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: MultiAddress, + }), + rename_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: MultiAddress, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: BitFlags, + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId32, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => sts.tuple(() => [Data, Data])), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => sts.bytes()), + image: Data, + twitter: Data, + } +}) + +export interface IdentityInfo { + additional: [Data, Data][] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (Bytes | undefined) + image: Data + twitter: Data +} + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: Bytes +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: Bytes +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: Bytes +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: Bytes +} + +export const BitFlags = sts.bigint() + +export const Judgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: sts.bigint(), + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export type Judgement = Judgement_Erroneous | Judgement_FeePaid | Judgement_KnownGood | Judgement_LowQuality | Judgement_OutOfDate | Judgement_Reasonable | Judgement_Unknown + +export interface Judgement_Erroneous { + __kind: 'Erroneous' +} + +export interface Judgement_FeePaid { + __kind: 'FeePaid' + value: bigint +} + +export interface Judgement_KnownGood { + __kind: 'KnownGood' +} + +export interface Judgement_LowQuality { + __kind: 'LowQuality' +} + +export interface Judgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface Judgement_Reasonable { + __kind: 'Reasonable' +} + +export interface Judgement_Unknown { + __kind: 'Unknown' +} + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: sts.bytes(), + Keccak256: sts.bytes(), + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: sts.bytes(), + ShaThree256: sts.bytes(), + } +}) + +/** + * Identity pallet declaration. + */ +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * ## Complexity + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: MultiAddress +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: MultiAddress + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * ## Complexity + * - `O(R + X)`. + * - where `R` registrar-count (governance-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: number +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * ## Complexity + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * ## Complexity + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: MultiAddress +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * - `identity`: The hash of the [`IdentityInfo`] for that the judgement is provided. + * + * Emits `JudgementGiven` if successful. + * + * ## Complexity + * - `O(R + X)`. + * - where `R` registrar-count (governance-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: MultiAddress + judgement: Judgement + identity: H256 +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: MultiAddress +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: MultiAddress + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * ## Complexity + * - `O(R + X)`. + * - where `R` registrar-count (governance-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * ## Complexity + * - `O(R)`. + * - where `R` registrar-count (governance-bounded). + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: MultiAddress +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * ## Complexity + * - `O(R)`. + * - where `R` registrar-count (governance-bounded). + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * ## Complexity + * - `O(R)`. + * - where `R` registrar-count (governance-bounded). + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: BitFlags +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * ## Complexity + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * ## Complexity + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId32, Data][] +} + +export type BitFlags = bigint + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const HrmpCall: sts.Type = sts.closedEnum(() => { + return { + force_clean_hrmp: sts.enumStruct({ + para: Id, + inbound: sts.number(), + outbound: sts.number(), + }), + force_open_hrmp_channel: sts.enumStruct({ + sender: Id, + recipient: Id, + maxCapacity: sts.number(), + maxMessageSize: sts.number(), + }), + force_process_hrmp_close: sts.enumStruct({ + channels: sts.number(), + }), + force_process_hrmp_open: sts.enumStruct({ + channels: sts.number(), + }), + hrmp_accept_open_channel: sts.enumStruct({ + sender: Id, + }), + hrmp_cancel_open_request: sts.enumStruct({ + channelId: HrmpChannelId, + openRequests: sts.number(), + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: Id, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: Id, + recipient: Id, + } +}) + +export interface HrmpChannelId { + sender: Id + recipient: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type HrmpCall = HrmpCall_force_clean_hrmp | HrmpCall_force_open_hrmp_channel | HrmpCall_force_process_hrmp_close | HrmpCall_force_process_hrmp_open | HrmpCall_hrmp_accept_open_channel | HrmpCall_hrmp_cancel_open_request | HrmpCall_hrmp_close_channel | HrmpCall_hrmp_init_open_channel + +/** + * This extrinsic triggers the cleanup of all the HRMP storage items that + * a para may have. Normally this happens once per session, but this allows + * you to trigger the cleanup immediately for a specific parachain. + * + * Origin must be Root. + * + * Number of inbound and outbound channels for `para` must be provided as witness data of weighing. + */ +export interface HrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: Id + inbound: number + outbound: number +} + +/** + * Open a channel from a `sender` to a `recipient` `ParaId` using the Root origin. Although + * opened by Root, the `max_capacity` and `max_message_size` are still subject to the Relay + * Chain's configured limits. + * + * Expected use is when one of the `ParaId`s involved in the channel is governed by the + * Relay Chain, e.g. a common good parachain. + */ +export interface HrmpCall_force_open_hrmp_channel { + __kind: 'force_open_hrmp_channel' + sender: Id + recipient: Id + maxCapacity: number + maxMessageSize: number +} + +/** + * Force process HRMP close channel requests. + * + * If there are pending HRMP close channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of closing channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' + channels: number +} + +/** + * Force process HRMP open channel requests. + * + * If there are pending HRMP open channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of opening channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' + channels: number +} + +/** + * Accept a pending open channel request from the given sender. + * + * The channel will be opened only on the next session boundary. + */ +export interface HrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: Id +} + +/** + * This cancels a pending open channel request. It can be canceled by either of the sender + * or the recipient for that request. The origin must be either of those. + * + * The cancellation happens immediately. It is not possible to cancel the request if it is + * already accepted. + * + * Total number of open requests (i.e. `HrmpOpenChannelRequestsList`) must be provided as + * witness data. + */ +export interface HrmpCall_hrmp_cancel_open_request { + __kind: 'hrmp_cancel_open_request' + channelId: HrmpChannelId + openRequests: number +} + +/** + * Initiate unilateral closing of a channel. The origin must be either the sender or the + * recipient in the channel being closed. + * + * The closure can only happen on a session change. + */ +export interface HrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * Initiate opening a channel from a parachain to a given recipient with given channel + * parameters. + * + * - `proposed_max_capacity` - specifies how many messages can be in the channel at once. + * - `proposed_max_message_size` - specifies the maximum size of the messages. + * + * These numbers are a subject to the relay-chain configuration limits. + * + * The channel can be opened only after the recipient confirms it and only on a session + * change. + */ +export interface HrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: Id + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: sts.number(), + bestFinalizedBlockNumber: sts.number(), + }), + report_equivocation: sts.enumStruct({ + equivocationProof: Type_101, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_101, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const Type_101: sts.Type = sts.struct(() => { + return { + setId: sts.bigint(), + equivocation: Equivocation, + } +}) + +export const Equivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: Type_109, + Prevote: Type_103, + } +}) + +export const Type_103: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Prevote, Signature]), + second: sts.tuple(() => [Prevote, Signature]), + } +}) + +export const Signature = sts.bytes() + +export const Prevote: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Prevote { + targetHash: H256 + targetNumber: number +} + +export interface Type_103 { + roundNumber: bigint + identity: Public + first: [Prevote, Signature] + second: [Prevote, Signature] +} + +export type Signature = Bytes + +export const Type_109: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Precommit, Signature]), + second: sts.tuple(() => [Precommit, Signature]), + } +}) + +export const Precommit: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Precommit { + targetHash: H256 + targetNumber: number +} + +export interface Type_109 { + roundNumber: bigint + identity: Public + first: [Precommit, Signature] + second: [Precommit, Signature] +} + +export type Equivocation = Equivocation_Precommit | Equivocation_Prevote + +export interface Equivocation_Precommit { + __kind: 'Precommit' + value: Type_109 +} + +export interface Equivocation_Prevote { + __kind: 'Prevote' + value: Type_103 +} + +export interface Type_101 { + setId: bigint + equivocation: Equivocation +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has stalled. + * + * This will trigger a forced authority set change at the beginning of the next session, to + * be enacted `delay` blocks after that. The `delay` should be high enough to safely assume + * that the block signalling the forced change will not be re-orged e.g. 1000 blocks. + * The block production rate (which may be slowed down because of finality lagging) should + * be taken into account when choosing the `delay`. The GRANDPA voters based on the new + * authority will start voting on top of `best_finalized_block_number` for new finalized + * blocks. `best_finalized_block_number` should be the highest of the latest finalized + * block of all validators of the new authority set. + * + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: number + bestFinalizedBlockNumber: number +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_101 + keyOwnerProof: MembershipProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_101 + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const FellowshipReferendaCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + index: sts.number(), + }), + kill: sts.enumStruct({ + index: sts.number(), + }), + nudge_referendum: sts.enumStruct({ + index: sts.number(), + }), + one_fewer_deciding: sts.enumStruct({ + track: sts.number(), + }), + place_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_submission_deposit: sts.enumStruct({ + index: sts.number(), + }), + set_metadata: sts.enumStruct({ + index: sts.number(), + maybeHash: sts.option(() => H256), + }), + submit: sts.enumStruct({ + proposalOrigin: OriginCaller, + proposal: Bounded, + enactmentMoment: DispatchTime, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type FellowshipReferendaCall = FellowshipReferendaCall_cancel | FellowshipReferendaCall_kill | FellowshipReferendaCall_nudge_referendum | FellowshipReferendaCall_one_fewer_deciding | FellowshipReferendaCall_place_decision_deposit | FellowshipReferendaCall_refund_decision_deposit | FellowshipReferendaCall_refund_submission_deposit | FellowshipReferendaCall_set_metadata | FellowshipReferendaCall_submit + +/** + * Cancel an ongoing referendum. + * + * - `origin`: must be the `CancelOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Cancelled`. + */ +export interface FellowshipReferendaCall_cancel { + __kind: 'cancel' + index: number +} + +/** + * Cancel an ongoing referendum and slash the deposits. + * + * - `origin`: must be the `KillOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Killed` and `DepositSlashed`. + */ +export interface FellowshipReferendaCall_kill { + __kind: 'kill' + index: number +} + +/** + * Advance a referendum onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `index`: the referendum to be advanced. + */ +export interface FellowshipReferendaCall_nudge_referendum { + __kind: 'nudge_referendum' + index: number +} + +/** + * Advance a track onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `track`: the track to be advanced. + * + * Action item for when there is now one fewer referendum in the deciding phase and the + * `DecidingCount` is not yet updated. This means that we should either: + * - begin deciding another referendum (and leave `DecidingCount` alone); or + * - decrement `DecidingCount`. + */ +export interface FellowshipReferendaCall_one_fewer_deciding { + __kind: 'one_fewer_deciding' + track: number +} + +/** + * Post the Decision Deposit for a referendum. + * + * - `origin`: must be `Signed` and the account must have funds available for the + * referendum's track's Decision Deposit. + * - `index`: The index of the submitted referendum whose Decision Deposit is yet to be + * posted. + * + * Emits `DecisionDepositPlaced`. + */ +export interface FellowshipReferendaCall_place_decision_deposit { + __kind: 'place_decision_deposit' + index: number +} + +/** + * Refund the Decision Deposit for a closed referendum back to the depositor. + * + * - `origin`: must be `Signed` or `Root`. + * - `index`: The index of a closed referendum whose Decision Deposit has not yet been + * refunded. + * + * Emits `DecisionDepositRefunded`. + */ +export interface FellowshipReferendaCall_refund_decision_deposit { + __kind: 'refund_decision_deposit' + index: number +} + +/** + * Refund the Submission Deposit for a closed referendum back to the depositor. + * + * - `origin`: must be `Signed` or `Root`. + * - `index`: The index of a closed referendum whose Submission Deposit has not yet been + * refunded. + * + * Emits `SubmissionDepositRefunded`. + */ +export interface FellowshipReferendaCall_refund_submission_deposit { + __kind: 'refund_submission_deposit' + index: number +} + +/** + * Set or clear metadata of a referendum. + * + * Parameters: + * - `origin`: Must be `Signed` by a creator of a referendum or by anyone to clear a + * metadata of a finished referendum. + * - `index`: The index of a referendum to set or clear metadata for. + * - `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata. + */ +export interface FellowshipReferendaCall_set_metadata { + __kind: 'set_metadata' + index: number + maybeHash?: (H256 | undefined) +} + +/** + * Propose a referendum on a privileged action. + * + * - `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds + * available. + * - `proposal_origin`: The origin from which the proposal should be executed. + * - `proposal`: The proposal. + * - `enactment_moment`: The moment that the proposal should be enacted. + * + * Emits `Submitted`. + */ +export interface FellowshipReferendaCall_submit { + __kind: 'submit' + proposalOrigin: OriginCaller + proposal: Bounded + enactmentMoment: DispatchTime +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const FellowshipCollectiveCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: MultiAddress, + }), + cleanup_poll: sts.enumStruct({ + pollIndex: sts.number(), + max: sts.number(), + }), + demote_member: sts.enumStruct({ + who: MultiAddress, + }), + promote_member: sts.enumStruct({ + who: MultiAddress, + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + minRank: sts.number(), + }), + vote: sts.enumStruct({ + poll: sts.number(), + aye: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type FellowshipCollectiveCall = FellowshipCollectiveCall_add_member | FellowshipCollectiveCall_cleanup_poll | FellowshipCollectiveCall_demote_member | FellowshipCollectiveCall_promote_member | FellowshipCollectiveCall_remove_member | FellowshipCollectiveCall_vote + +/** + * Introduce a new member. + * + * - `origin`: Must be the `AdminOrigin`. + * - `who`: Account of non-member which will become a member. + * - `rank`: The rank to give the new member. + * + * Weight: `O(1)` + */ +export interface FellowshipCollectiveCall_add_member { + __kind: 'add_member' + who: MultiAddress +} + +/** + * Remove votes from the given poll. It must have ended. + * + * - `origin`: Must be `Signed` by any account. + * - `poll_index`: Index of a poll which is completed and for which votes continue to + * exist. + * - `max`: Maximum number of vote items from remove in this call. + * + * Transaction fees are waived if the operation is successful. + * + * Weight `O(max)` (less if there are fewer items to remove than `max`). + */ +export interface FellowshipCollectiveCall_cleanup_poll { + __kind: 'cleanup_poll' + pollIndex: number + max: number +} + +/** + * Decrement the rank of an existing member by one. If the member is already at rank zero, + * then they are removed entirely. + * + * - `origin`: Must be the `AdminOrigin`. + * - `who`: Account of existing member of rank greater than zero. + * + * Weight: `O(1)`, less if the member's index is highest in its rank. + */ +export interface FellowshipCollectiveCall_demote_member { + __kind: 'demote_member' + who: MultiAddress +} + +/** + * Increment the rank of an existing member by one. + * + * - `origin`: Must be the `AdminOrigin`. + * - `who`: Account of existing member. + * + * Weight: `O(1)` + */ +export interface FellowshipCollectiveCall_promote_member { + __kind: 'promote_member' + who: MultiAddress +} + +/** + * Remove the member entirely. + * + * - `origin`: Must be the `AdminOrigin`. + * - `who`: Account of existing member of rank greater than zero. + * - `min_rank`: The rank of the member or greater. + * + * Weight: `O(min_rank)`. + */ +export interface FellowshipCollectiveCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + minRank: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * - `origin`: Must be `Signed` by a member account. + * - `poll`: Index of a poll which is ongoing. + * - `aye`: `true` if the vote is to approve the proposal, `false` otherwise. + * + * Transaction fees are be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * + * Weight: `O(1)`, less if there was no previous vote on the poll by the member. + */ +export interface FellowshipCollectiveCall_vote { + __kind: 'vote' + poll: number + aye: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const FastUnstakeCall: sts.Type = sts.closedEnum(() => { + return { + control: sts.enumStruct({ + erasToCheck: sts.number(), + }), + deregister: sts.unit(), + register_fast_unstake: sts.unit(), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type FastUnstakeCall = FastUnstakeCall_control | FastUnstakeCall_deregister | FastUnstakeCall_register_fast_unstake + +/** + * Control the operation of this pallet. + * + * Dispatch origin must be signed by the [`Config::ControlOrigin`]. + */ +export interface FastUnstakeCall_control { + __kind: 'control' + erasToCheck: number +} + +/** + * Deregister oneself from the fast-unstake. + * + * This is useful if one is registered, they are still waiting, and they change their mind. + * + * Note that the associated stash is still fully unbonded and chilled as a consequence of + * calling `register_fast_unstake`. This should probably be followed by a call to + * `Staking::rebond`. + */ +export interface FastUnstakeCall_deregister { + __kind: 'deregister' +} + +/** + * Register oneself for fast-unstake. + * + * The dispatch origin of this call must be signed by the controller account, similar to + * `staking::unbond`. + * + * The stash associated with the origin must have no ongoing unlocking chunks. If + * successful, this will fully unbond and chill the stash. Then, it will enqueue the stash + * to be checked in further blocks. + * + * If by the time this is called, the stash is actually eligible for fast-unstake, then + * they are guaranteed to remain eligible, because the call will chill them as well. + * + * If the check works, the entire staking data is removed, i.e. the stash is fully + * unstaked. + * + * If the check fails, the stash remains chilled and waiting for being unbonded as in with + * the normal staking system, but they lose part of their unbonding chunks due to consuming + * the chain's resources. + */ +export interface FastUnstakeCall_register_fast_unstake { + __kind: 'register_fast_unstake' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + governance_fallback: sts.enumStruct({ + maybeMaxVoters: sts.option(() => sts.number()), + maybeMaxTargets: sts.option(() => sts.number()), + }), + set_emergency_election_result: sts.enumStruct({ + supports: sts.array(() => sts.tuple(() => [AccountId32, Support])), + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => ElectionScore), + }), + submit: sts.enumStruct({ + rawSolution: RawSolution, + }), + submit_unsigned: sts.enumStruct({ + rawSolution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export const RawSolution: sts.Type = sts.struct(() => { + return { + solution: NposCompactSolution24, + score: ElectionScore, + round: sts.number(), + } +}) + +export const NposCompactSolution24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), + votes2: sts.array(() => sts.tuple(() => [sts.number(), sts.tuple(() => [sts.number(), sts.number()]), sts.number()])), + votes3: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes4: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes5: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes6: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes7: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes8: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes9: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes10: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes11: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes12: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes13: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes14: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes15: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes16: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes17: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes18: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes19: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes20: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes21: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes22: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes23: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes24: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + } +}) + +export interface NposCompactSolution24 { + votes1: [number, number][] + votes2: [number, [number, number], number][] + votes3: [number, [number, number][], number][] + votes4: [number, [number, number][], number][] + votes5: [number, [number, number][], number][] + votes6: [number, [number, number][], number][] + votes7: [number, [number, number][], number][] + votes8: [number, [number, number][], number][] + votes9: [number, [number, number][], number][] + votes10: [number, [number, number][], number][] + votes11: [number, [number, number][], number][] + votes12: [number, [number, number][], number][] + votes13: [number, [number, number][], number][] + votes14: [number, [number, number][], number][] + votes15: [number, [number, number][], number][] + votes16: [number, [number, number][], number][] + votes17: [number, [number, number][], number][] + votes18: [number, [number, number][], number][] + votes19: [number, [number, number][], number][] + votes20: [number, [number, number][], number][] + votes21: [number, [number, number][], number][] + votes22: [number, [number, number][], number][] + votes23: [number, [number, number][], number][] + votes24: [number, [number, number][], number][] +} + +export interface RawSolution { + solution: NposCompactSolution24 + score: ElectionScore + round: number +} + +export interface ElectionScore { + minimalStake: bigint + sumStake: bigint + sumStakeSquared: bigint +} + +export const ElectionScore: sts.Type = sts.struct(() => { + return { + minimalStake: sts.bigint(), + sumStake: sts.bigint(), + sumStakeSquared: sts.bigint(), + } +}) + +export const Support: sts.Type = sts.struct(() => { + return { + total: sts.bigint(), + voters: sts.array(() => sts.tuple(() => [AccountId32, sts.bigint()])), + } +}) + +export interface Support { + total: bigint + voters: [AccountId32, bigint][] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_governance_fallback | ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * Trigger the governance fallback. + * + * This can only be called when [`Phase::Emergency`] is enabled, as an alternative to + * calling [`Call::set_emergency_election_result`]. + */ +export interface ElectionProviderMultiPhaseCall_governance_fallback { + __kind: 'governance_fallback' + maybeMaxVoters?: (number | undefined) + maybeMaxTargets?: (number | undefined) +} + +/** + * Set a solution in the queue, to be handed out to the client of this pallet in the next + * call to `ElectionProvider::elect`. + * + * This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`. + * + * The solution is not checked for any feasibility and is assumed to be trustworthy, as any + * feasibility check itself can in principle cause the election process to fail (due to + * memory/weight constrains). + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + supports: [AccountId32, Support][] +} + +/** + * Set a new value for `MinimumUntrustedScore`. + * + * Dispatch origin must be aligned with `T::ForceOrigin`. + * + * This check can be turned off by setting the value to `None`. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (ElectionScore | undefined) +} + +/** + * Submit a solution for the signed phase. + * + * The dispatch origin fo this call must be __signed__. + * + * The solution is potentially queued, based on the claimed score and processed at the end + * of the signed phase. + * + * A deposit is reserved and recorded for the solution. Based on the outcome, the solution + * might be rewarded, slashed, or get all or a part of the deposit back. + */ +export interface ElectionProviderMultiPhaseCall_submit { + __kind: 'submit' + rawSolution: RawSolution +} + +/** + * Submit a solution for the unsigned phase. + * + * The dispatch origin fo this call must be __none__. + * + * This submission is checked on the fly. Moreover, this unsigned solution is only + * validated when submitted to the pool from the **local** node. Effectively, this means + * that only active validators can submit this transaction when authoring a block (similar + * to an inherent). + * + * To prevent any incorrect solution (and thus wasted time/weight), this transaction will + * panic if the solution submitted by the validator is invalid in any way, effectively + * putting their authoring reward at risk. + * + * No deposit or reward is associated with this submission. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + rawSolution: RawSolution + witness: SolutionOrSnapshotSize +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: Id, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + contribute_all: sts.enumStruct({ + index: sts.number(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: Id, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId32, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_contribute_all | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * Add an optional memo to an existing crowdloan contribution. + * + * Origin must be Signed, and the user must have contributed to the crowdloan. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: Id + memo: Bytes +} + +/** + * Contribute to a crowd sale. This will transfer some balance over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * Contribute your entire balance to a crowd sale. This will transfer the entire balance of a user over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute_all { + __kind: 'contribute_all' + index: number + signature?: (MultiSignature | undefined) +} + +/** + * Create a new crowdloaning campaign for a parachain slot with the given lease period range. + * + * This applies a lock to your parachain configuration, ensuring that it cannot be changed + * by the parachain manager. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Remove a fund after the retirement period has ended and all funds have been returned. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * Edit the configuration for an in-progress crowdloan. + * + * Can only be called by Root origin. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Poke the fund into `NewRaise` + * + * Origin must be Signed, and the fund has non-zero raise. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: Id +} + +/** + * Automatically refund contributors of an ended crowdloan. + * Due to weight restrictions, this function may need to be called multiple + * times to fully refund all users. We will refund `RemoveKeysLimit` users at a time. + * + * Origin must be signed, but can come from anyone. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * Withdraw full balance of a specific contributor. + * + * Origin must be signed, but can come from anyone. + * + * The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement + * flag must be set. For a fund to be ready for retirement, then: + * - it must not already be in retirement; + * - the amount of raised funds must be bigger than the _free_ balance of the account; + * - and either: + * - the block number must be at least `end`; or + * - the current lease period must be greater than the fund's `last_period`. + * + * In this case, the fund's retirement flag is set and its `end` is reset to the current block + * number. + * + * - `who`: The account whose contribution should be withdrawn. + * - `index`: The parachain to whose crowdloan the contribution was made. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ConvictionVotingCall: sts.Type = sts.closedEnum(() => { + return { + delegate: sts.enumStruct({ + class: sts.number(), + to: MultiAddress, + conviction: Conviction, + balance: sts.bigint(), + }), + remove_other_vote: sts.enumStruct({ + target: MultiAddress, + class: sts.number(), + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + class: sts.option(() => sts.number()), + index: sts.number(), + }), + undelegate: sts.enumStruct({ + class: sts.number(), + }), + unlock: sts.enumStruct({ + class: sts.number(), + target: MultiAddress, + }), + vote: sts.enumStruct({ + pollIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + SplitAbstain: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + abstain: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type AccountVote = AccountVote_Split | AccountVote_SplitAbstain | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface AccountVote_SplitAbstain { + __kind: 'SplitAbstain' + aye: bigint + nay: bigint + abstain: bigint +} + +export interface AccountVote_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ConvictionVotingCall = ConvictionVotingCall_delegate | ConvictionVotingCall_remove_other_vote | ConvictionVotingCall_remove_vote | ConvictionVotingCall_undelegate | ConvictionVotingCall_unlock | ConvictionVotingCall_vote + +/** + * Delegate the voting power (with some given conviction) of the sending account for a + * particular class of polls. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `class`: The class of polls to delegate. To delegate multiple classes, multiple calls + * to this function are required. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must not + * be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of polls the voter delegating to has + * voted on. Weight is initially charged as if maximum votes, but is refunded later. + */ +export interface ConvictionVotingCall_delegate { + __kind: 'delegate' + class: number + to: MultiAddress + conviction: Conviction + balance: bigint +} + +/** + * Remove a vote for a poll. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the poll was cancelled, because the voter lost the poll or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for poll + * `index`. + * - `index`: The index of poll of the vote to be removed. + * - `class`: The class of the poll. + * + * Weight: `O(R + log R)` where R is the number of polls that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface ConvictionVotingCall_remove_other_vote { + __kind: 'remove_other_vote' + target: MultiAddress + class: number + index: number +} + +/** + * Remove a vote for a poll. + * + * If: + * - the poll was cancelled, or + * - the poll is ongoing, or + * - the poll has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the poll has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for poll `index`. + * + * - `index`: The index of poll of the vote to be removed. + * - `class`: Optional parameter, if given it indicates the class of the poll. For polls + * which have finished or are cancelled, this must be `Some`. + * + * Weight: `O(R + log R)` where R is the number of polls that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface ConvictionVotingCall_remove_vote { + __kind: 'remove_vote' + class?: (number | undefined) + index: number +} + +/** + * Undelegate the voting power of the sending account for a particular class of polls. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued has passed. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * - `class`: The class of polls to remove the delegation from. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of polls the voter delegating to has + * voted on. Weight is initially charged as if maximum votes, but is refunded later. + */ +export interface ConvictionVotingCall_undelegate { + __kind: 'undelegate' + class: number +} + +/** + * Remove the lock caused by prior voting/delegating which has expired within a particular + * class. + * + * The dispatch origin of this call must be _Signed_. + * + * - `class`: The class of polls to unlock. + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface ConvictionVotingCall_unlock { + __kind: 'unlock' + class: number + target: MultiAddress +} + +/** + * Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `poll_index`: The index of the poll to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of polls the voter has voted on. + */ +export interface ConvictionVotingCall_vote { + __kind: 'vote' + pollIndex: number + vote: AccountVote +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_async_backing_params: sts.enumStruct({ + new: AsyncBackingParams, + }), + set_bypass_consistency_check: sts.enumStruct({ + new: sts.boolean(), + }), + set_chain_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_code_retention_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: sts.number(), + }), + set_executor_params: sts.enumStruct({ + new: sts.array(() => V4ExecutorParam), + }), + set_group_rotation_frequency: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_minimum_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_cores: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_retries: sts.enumStruct({ + new: sts.number(), + }), + set_pvf_checking_enabled: sts.enumStruct({ + new: sts.boolean(), + }), + set_pvf_voting_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_thread_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_ump_max_individual_weight: sts.enumStruct({ + new: Weight, + }), + set_ump_service_total_weight: sts.enumStruct({ + new: Weight, + }), + set_validation_upgrade_cooldown: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +export const V4ExecutorParam: sts.Type = sts.closedEnum(() => { + return { + MaxMemoryPages: sts.number(), + PrecheckingMaxMemory: sts.bigint(), + PvfExecTimeout: sts.tuple(() => [V4PvfExecTimeoutKind, sts.bigint()]), + PvfPrepTimeout: sts.tuple(() => [V4PvfPrepTimeoutKind, sts.bigint()]), + StackLogicalMax: sts.number(), + StackNativeMax: sts.number(), + WasmExtBulkMemory: sts.unit(), + } +}) + +export const V4PvfPrepTimeoutKind: sts.Type = sts.closedEnum(() => { + return { + Lenient: sts.unit(), + Precheck: sts.unit(), + } +}) + +export type V4PvfPrepTimeoutKind = V4PvfPrepTimeoutKind_Lenient | V4PvfPrepTimeoutKind_Precheck + +export interface V4PvfPrepTimeoutKind_Lenient { + __kind: 'Lenient' +} + +export interface V4PvfPrepTimeoutKind_Precheck { + __kind: 'Precheck' +} + +export const V4PvfExecTimeoutKind: sts.Type = sts.closedEnum(() => { + return { + Approval: sts.unit(), + Backing: sts.unit(), + } +}) + +export type V4PvfExecTimeoutKind = V4PvfExecTimeoutKind_Approval | V4PvfExecTimeoutKind_Backing + +export interface V4PvfExecTimeoutKind_Approval { + __kind: 'Approval' +} + +export interface V4PvfExecTimeoutKind_Backing { + __kind: 'Backing' +} + +export type V4ExecutorParam = V4ExecutorParam_MaxMemoryPages | V4ExecutorParam_PrecheckingMaxMemory | V4ExecutorParam_PvfExecTimeout | V4ExecutorParam_PvfPrepTimeout | V4ExecutorParam_StackLogicalMax | V4ExecutorParam_StackNativeMax | V4ExecutorParam_WasmExtBulkMemory + +export interface V4ExecutorParam_MaxMemoryPages { + __kind: 'MaxMemoryPages' + value: number +} + +export interface V4ExecutorParam_PrecheckingMaxMemory { + __kind: 'PrecheckingMaxMemory' + value: bigint +} + +export interface V4ExecutorParam_PvfExecTimeout { + __kind: 'PvfExecTimeout' + value: [V4PvfExecTimeoutKind, bigint] +} + +export interface V4ExecutorParam_PvfPrepTimeout { + __kind: 'PvfPrepTimeout' + value: [V4PvfPrepTimeoutKind, bigint] +} + +export interface V4ExecutorParam_StackLogicalMax { + __kind: 'StackLogicalMax' + value: number +} + +export interface V4ExecutorParam_StackNativeMax { + __kind: 'StackNativeMax' + value: number +} + +export interface V4ExecutorParam_WasmExtBulkMemory { + __kind: 'WasmExtBulkMemory' +} + +export const AsyncBackingParams: sts.Type = sts.struct(() => { + return { + maxCandidateDepth: sts.number(), + allowedAncestryLen: sts.number(), + } +}) + +export interface AsyncBackingParams { + maxCandidateDepth: number + allowedAncestryLen: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ConfigurationCall = ConfigurationCall_set_async_backing_params | ConfigurationCall_set_bypass_consistency_check | ConfigurationCall_set_chain_availability_period | ConfigurationCall_set_code_retention_period | ConfigurationCall_set_dispute_period | ConfigurationCall_set_dispute_post_conclusion_acceptance_period | ConfigurationCall_set_executor_params | ConfigurationCall_set_group_rotation_frequency | ConfigurationCall_set_hrmp_channel_max_capacity | ConfigurationCall_set_hrmp_channel_max_message_size | ConfigurationCall_set_hrmp_channel_max_total_size | ConfigurationCall_set_hrmp_max_message_num_per_candidate | ConfigurationCall_set_hrmp_max_parachain_inbound_channels | ConfigurationCall_set_hrmp_max_parachain_outbound_channels | ConfigurationCall_set_hrmp_max_parathread_inbound_channels | ConfigurationCall_set_hrmp_max_parathread_outbound_channels | ConfigurationCall_set_hrmp_open_request_ttl | ConfigurationCall_set_hrmp_recipient_deposit | ConfigurationCall_set_hrmp_sender_deposit | ConfigurationCall_set_max_code_size | ConfigurationCall_set_max_downward_message_size | ConfigurationCall_set_max_head_data_size | ConfigurationCall_set_max_pov_size | ConfigurationCall_set_max_upward_message_num_per_candidate | ConfigurationCall_set_max_upward_message_size | ConfigurationCall_set_max_upward_queue_count | ConfigurationCall_set_max_upward_queue_size | ConfigurationCall_set_max_validators | ConfigurationCall_set_max_validators_per_core | ConfigurationCall_set_minimum_validation_upgrade_delay | ConfigurationCall_set_n_delay_tranches | ConfigurationCall_set_needed_approvals | ConfigurationCall_set_no_show_slots | ConfigurationCall_set_parathread_cores | ConfigurationCall_set_parathread_retries | ConfigurationCall_set_pvf_checking_enabled | ConfigurationCall_set_pvf_voting_ttl | ConfigurationCall_set_relay_vrf_modulo_samples | ConfigurationCall_set_scheduling_lookahead | ConfigurationCall_set_thread_availability_period | ConfigurationCall_set_ump_max_individual_weight | ConfigurationCall_set_ump_service_total_weight | ConfigurationCall_set_validation_upgrade_cooldown | ConfigurationCall_set_validation_upgrade_delay | ConfigurationCall_set_zeroth_delay_tranche_width + +/** + * Set the asynchronous backing parameters. + */ +export interface ConfigurationCall_set_async_backing_params { + __kind: 'set_async_backing_params' + new: AsyncBackingParams +} + +/** + * Setting this to true will disable consistency checks for the configuration setters. + * Use with caution. + */ +export interface ConfigurationCall_set_bypass_consistency_check { + __kind: 'set_bypass_consistency_check' + new: boolean +} + +/** + * Set the availability period for parachains. + */ +export interface ConfigurationCall_set_chain_availability_period { + __kind: 'set_chain_availability_period' + new: number +} + +/** + * Set the acceptance period for an included candidate. + */ +export interface ConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: number +} + +/** + * Set the dispute period, in number of sessions to keep for disputes. + */ +export interface ConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: number +} + +/** + * Set the dispute post conclusion acceptance period. + */ +export interface ConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: number +} + +/** + * Set PVF executor parameters. + */ +export interface ConfigurationCall_set_executor_params { + __kind: 'set_executor_params' + new: V4ExecutorParam[] +} + +/** + * Set the parachain validator-group rotation frequency + */ +export interface ConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: number +} + +/** + * Sets the maximum number of messages allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * Sets the maximum size of a message that could ever be put into an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * Sets the maximum total size of messages in bytes allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * Sets the maximum number of outbound HRMP messages can be sent by a candidate. + */ +export interface ConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parachain is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parachain is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parathread is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_inbound_channels { + __kind: 'set_hrmp_max_parathread_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parathread is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_outbound_channels { + __kind: 'set_hrmp_max_parathread_outbound_channels' + new: number +} + +/** + * Sets the number of sessions after which an HRMP open channel request expires. + */ +export interface ConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * Sets the amount of funds that the recipient should provide for accepting opening an HRMP + * channel. + */ +export interface ConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: bigint +} + +/** + * Sets the amount of funds that the sender should provide for opening an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: bigint +} + +/** + * Set the max validation code size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * Set the critical downward message size. + */ +export interface ConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * Set the max head data size for paras. + */ +export interface ConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * Set the max POV block size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * Sets the maximum number of messages that a candidate can contain. + */ +export interface ConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum size of an upward message that can be sent by a candidate. + */ +export interface ConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * Sets the maximum items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * Sets the maximum total size of items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * Set the maximum number of validators to use in parachain consensus. + */ +export interface ConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * Set the maximum number of validators to assign to any core. + */ +export interface ConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * Sets the minimum delay between announcing the upgrade block for a parachain until the + * upgrade taking place. + * + * See the field documentation for information and constraints for the new value. + */ +export interface ConfigurationCall_set_minimum_validation_upgrade_delay { + __kind: 'set_minimum_validation_upgrade_delay' + new: number +} + +/** + * Set the total number of delay tranches. + */ +export interface ConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * Set the number of validators needed to approve a block. + */ +export interface ConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * Set the no show slots, in number of number of consensus slots. + * Must be at least 1. + */ +export interface ConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * Set the number of parathread execution cores. + */ +export interface ConfigurationCall_set_parathread_cores { + __kind: 'set_parathread_cores' + new: number +} + +/** + * Set the number of retries for a particular parathread. + */ +export interface ConfigurationCall_set_parathread_retries { + __kind: 'set_parathread_retries' + new: number +} + +/** + * Enable or disable PVF pre-checking. Consult the field documentation prior executing. + */ +export interface ConfigurationCall_set_pvf_checking_enabled { + __kind: 'set_pvf_checking_enabled' + new: boolean +} + +/** + * Set the number of session changes after which a PVF pre-checking voting is rejected. + */ +export interface ConfigurationCall_set_pvf_voting_ttl { + __kind: 'set_pvf_voting_ttl' + new: number +} + +/** + * Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion. + */ +export interface ConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * Set the scheduling lookahead, in expected number of blocks at peak throughput. + */ +export interface ConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * Set the availability period for parathreads. + */ +export interface ConfigurationCall_set_thread_availability_period { + __kind: 'set_thread_availability_period' + new: number +} + +/** + * Sets the maximum amount of weight any individual upward message may consume. + */ +export interface ConfigurationCall_set_ump_max_individual_weight { + __kind: 'set_ump_max_individual_weight' + new: Weight +} + +/** + * Sets the soft limit for the phase of dispatching dispatchable upward messages. + */ +export interface ConfigurationCall_set_ump_service_total_weight { + __kind: 'set_ump_service_total_weight' + new: Weight +} + +/** + * Set the validation upgrade cooldown. + */ +export interface ConfigurationCall_set_validation_upgrade_cooldown { + __kind: 'set_validation_upgrade_cooldown' + new: number +} + +/** + * Set the validation upgrade delay. + */ +export interface ConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: number +} + +/** + * Set the zeroth delay tranche width. + */ +export interface ConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: sts.bigint(), + vestingSchedule: sts.option(() => sts.tuple(() => [sts.bigint(), sts.bigint(), sts.number()])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId32), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId32 + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId32 + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: bigint + vestingSchedule?: ([bigint, bigint, number] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId32 | undefined) +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ChildBountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + add_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + value: sts.bigint(), + description: sts.bytes(), + }), + award_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + close_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + propose_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ChildBountiesCall = ChildBountiesCall_accept_curator | ChildBountiesCall_add_child_bounty | ChildBountiesCall_award_child_bounty | ChildBountiesCall_claim_child_bounty | ChildBountiesCall_close_child_bounty | ChildBountiesCall_propose_curator | ChildBountiesCall_unassign_curator + +/** + * Accept the curator role for the child-bounty. + * + * The dispatch origin for this call must be the curator of this + * child-bounty. + * + * A deposit will be reserved from the curator and refund upon + * successful payout or cancellation. + * + * Fee for curator is deducted from curator fee of parent bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in "CuratorProposed" state, for processing the + * call. And state of child-bounty is moved to "Active" on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_accept_curator { + __kind: 'accept_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Add a new child-bounty. + * + * The dispatch origin for this call must be the curator of parent + * bounty and the parent bounty must be in "active" state. + * + * Child-bounty gets added successfully & fund gets transferred from + * parent bounty to child-bounty account, if parent bounty has enough + * funds, else the call fails. + * + * Upper bound to maximum number of active child bounties that can be + * added are managed via runtime trait config + * [`Config::MaxActiveChildBountyCount`]. + * + * If the call is success, the status of child-bounty is updated to + * "Added". + * + * - `parent_bounty_id`: Index of parent bounty for which child-bounty is being added. + * - `value`: Value for executing the proposal. + * - `description`: Text description for the child-bounty. + */ +export interface ChildBountiesCall_add_child_bounty { + __kind: 'add_child_bounty' + parentBountyId: number + value: bigint + description: Bytes +} + +/** + * Award child-bounty to a beneficiary. + * + * The beneficiary will be able to claim the funds after a delay. + * + * The dispatch origin for this call must be the parent curator or + * curator of this child-bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in active state, for processing the call. And + * state of child-bounty is moved to "PendingPayout" on successful call + * completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + * - `beneficiary`: Beneficiary account. + */ +export interface ChildBountiesCall_award_child_bounty { + __kind: 'award_child_bounty' + parentBountyId: number + childBountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded child-bounty after payout delay. + * + * The dispatch origin for this call may be any signed origin. + * + * Call works independent of parent bounty state, No need for parent + * bounty to be in active state. + * + * The Beneficiary is paid out with agreed bounty value. Curator fee is + * paid & curator deposit is unreserved. + * + * Child-bounty must be in "PendingPayout" state, for processing the + * call. And instance of child-bounty is removed from the state on + * successful call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_claim_child_bounty { + __kind: 'claim_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * Cancel a proposed or active child-bounty. Child-bounty account funds + * are transferred to parent bounty account. The child-bounty curator + * deposit may be unreserved if possible. + * + * The dispatch origin for this call must be either parent curator or + * `T::RejectOrigin`. + * + * If the state of child-bounty is `Active`, curator deposit is + * unreserved. + * + * If the state of child-bounty is `PendingPayout`, call fails & + * returns `PendingPayout` error. + * + * For the origin other than T::RejectOrigin, parent bounty must be in + * active state, for this child-bounty call to work. For origin + * T::RejectOrigin execution is forced. + * + * Instance of child-bounty is removed from the state on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_close_child_bounty { + __kind: 'close_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * Propose curator for funded child-bounty. + * + * The dispatch origin for this call must be curator of parent bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in "Added" state, for processing the call. And + * state of child-bounty is moved to "CuratorProposed" on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + * - `curator`: Address of child-bounty curator. + * - `fee`: payment fee to child-bounty curator for execution. + */ +export interface ChildBountiesCall_propose_curator { + __kind: 'propose_curator' + parentBountyId: number + childBountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a child-bounty. + * + * The dispatch origin for this call can be either `RejectOrigin`, or + * the curator of the parent bounty, or any signed origin. + * + * For the origin other than T::RejectOrigin and the child-bounty + * curator, parent bounty must be in active state, for this call to + * work. We allow child-bounty curator and T::RejectOrigin to execute + * this call irrespective of the parent bounty state. + * + * If this function is called by the `RejectOrigin` or the + * parent bounty curator, we assume that the child-bounty curator is + * malicious or inactive. As a result, child-bounty curator deposit is + * slashed. + * + * If the origin is the child-bounty curator, we take this as a sign + * that they are unable to do their job, and are willingly giving up. + * We could slash the deposit, but for now we allow them to unreserve + * their deposit and exit without issue. (We may want to change this if + * it is abused.) + * + * Finally, the origin can be anyone iff the child-bounty curator is + * "inactive". Expiry update due of parent bounty is used to estimate + * inactive state of child-bounty curator. + * + * This allows anyone in the community to call out that a child-bounty + * curator is not doing their due diligence, and we should pick a new + * one. In this case the child-bounty curator deposit is slashed. + * + * State of child-bounty is moved to Added state on successful call + * completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_unassign_curator { + __kind: 'unassign_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * ## Complexity + * - O(1). + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::SpendOrigin`. + * + * ## Complexity + * - O(1). + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds + * after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * ## Complexity + * - O(1). + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * ## Complexity + * - O(1). + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * ## Complexity + * - O(1). + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * ## Complexity + * - O(1). + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::SpendOrigin`. + * + * ## Complexity + * - O(1). + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is + * malicious or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * ## Complexity + * - O(1). + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + }), + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + set_balance_deprecated: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + oldReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_allow_death: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + upgrade_accounts: sts.enumStruct({ + who: sts.array(() => AccountId32), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BalancesCall = BalancesCall_force_set_balance | BalancesCall_force_transfer | BalancesCall_force_unreserve | BalancesCall_set_balance_deprecated | BalancesCall_transfer | BalancesCall_transfer_all | BalancesCall_transfer_allow_death | BalancesCall_transfer_keep_alive | BalancesCall_upgrade_accounts + +/** + * Set the regular balance of a given account. + * + * The dispatch origin for this call is `root`. + */ +export interface BalancesCall_force_set_balance { + __kind: 'force_set_balance' + who: MultiAddress + newFree: bigint +} + +/** + * Exactly as `transfer_allow_death`, except the origin must be root and the source account + * may be specified. + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * Unreserve some balance from a user by force. + * + * Can only be called by ROOT. + */ +export interface BalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * Set the regular balance of a given account; it also takes a reserved balance but this + * must be the same as the account's current reserved balance. + * + * The dispatch origin for this call is `root`. + * + * WARNING: This call is DEPRECATED! Use `force_set_balance` instead. + */ +export interface BalancesCall_set_balance_deprecated { + __kind: 'set_balance_deprecated' + who: MultiAddress + newFree: bigint + oldReserved: bigint +} + +/** + * Alias for `transfer_allow_death`, provided only for name-wise compatibility. + * + * WARNING: DEPRECATED! Will be released in approximately 3 months. + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: MultiAddress + value: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer_allow_death` will set the `FreeBalance` of the sender and receiver. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + */ +export interface BalancesCall_transfer_allow_death { + __kind: 'transfer_allow_death' + dest: MultiAddress + value: bigint +} + +/** + * Same as the [`transfer_allow_death`] call, but with a check that the transfer will not + * kill the origin account. + * + * 99% of the time you want [`transfer_allow_death`] instead. + * + * [`transfer_allow_death`]: struct.Pallet.html#method.transfer + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * Upgrade a specified account. + * + * - `origin`: Must be `Signed`. + * - `who`: The account to be upgraded. + * + * This will waive the transaction fee if at least all but 10% of the accounts needed to + * be upgraded. (We let some not have to be upgraded just in order to allow for the + * possibililty of churn). + */ +export interface BalancesCall_upgrade_accounts { + __kind: 'upgrade_accounts' + who: AccountId32[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const EquivocationProof: sts.Type = sts.struct(() => { + return { + offender: sts.bytes(), + slot: Slot, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Slot = sts.bigint() + +export interface EquivocationProof { + offender: Bytes + slot: Slot + firstHeader: Header + secondHeader: Header +} + +export type Slot = bigint + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V1: sts.enumStruct({ + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + }), + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type NextConfigDescriptor = NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Plan an epoch config change. The epoch config change is recorded and will be enacted on + * the next call to `enact_epoch_change`. The config will be activated one epoch after. + * Multiple calls to this method will replace any existing planned config change that had + * not been enacted yet. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Cancel an in-progress auction. + * + * Can only be called by Root origin. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +export type Call = Call_Auctions | Call_Babe | Call_Balances | Call_Bounties | Call_ChildBounties | Call_Claims | Call_Configuration | Call_ConvictionVoting | Call_Crowdloan | Call_ElectionProviderMultiPhase | Call_FastUnstake | Call_FellowshipCollective | Call_FellowshipReferenda | Call_Grandpa | Call_Hrmp | Call_Identity | Call_ImOnline | Call_Indices | Call_Initializer | Call_Multisig | Call_Nis | Call_NisCounterpartBalances | Call_NominationPools | Call_ParaInclusion | Call_ParaInherent | Call_Paras | Call_ParasDisputes | Call_ParasShared | Call_ParasSlashing | Call_Preimage | Call_Proxy | Call_Recovery | Call_Referenda | Call_Registrar | Call_Scheduler | Call_Session | Call_Slots | Call_Society | Call_Staking | Call_System | Call_Timestamp | Call_Treasury | Call_Ump | Call_Utility | Call_Vesting | Call_VoterList | Call_Whitelist | Call_XcmPallet + +export interface Call_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Call_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Call_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Call_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Call_ChildBounties { + __kind: 'ChildBounties' + value: ChildBountiesCall +} + +export interface Call_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Call_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Call_ConvictionVoting { + __kind: 'ConvictionVoting' + value: ConvictionVotingCall +} + +export interface Call_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Call_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Call_FastUnstake { + __kind: 'FastUnstake' + value: FastUnstakeCall +} + +export interface Call_FellowshipCollective { + __kind: 'FellowshipCollective' + value: FellowshipCollectiveCall +} + +export interface Call_FellowshipReferenda { + __kind: 'FellowshipReferenda' + value: FellowshipReferendaCall +} + +export interface Call_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Call_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Call_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Call_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Call_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Call_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Call_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Call_Nis { + __kind: 'Nis' + value: NisCall +} + +export interface Call_NisCounterpartBalances { + __kind: 'NisCounterpartBalances' + value: NisCounterpartBalancesCall +} + +export interface Call_NominationPools { + __kind: 'NominationPools' + value: NominationPoolsCall +} + +export interface Call_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Call_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Call_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Call_ParasDisputes { + __kind: 'ParasDisputes' + value: ParasDisputesCall +} + +export interface Call_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Call_ParasSlashing { + __kind: 'ParasSlashing' + value: ParasSlashingCall +} + +export interface Call_Preimage { + __kind: 'Preimage' + value: PreimageCall +} + +export interface Call_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Call_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Call_Referenda { + __kind: 'Referenda' + value: ReferendaCall +} + +export interface Call_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Call_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Call_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Call_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Call_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Call_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Call_System { + __kind: 'System' + value: SystemCall +} + +export interface Call_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Call_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Call_Ump { + __kind: 'Ump' + value: UmpCall +} + +export interface Call_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Call_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Call_VoterList { + __kind: 'VoterList' + value: VoterListCall +} + +export interface Call_Whitelist { + __kind: 'Whitelist' + value: WhitelistCall +} + +export interface Call_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const MultiAddress: sts.Type = sts.closedEnum(() => { + return { + Address20: sts.bytes(), + Address32: sts.bytes(), + Id: AccountId32, + Index: sts.unit(), + Raw: sts.bytes(), + } +}) + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NominationPools: sts.unit(), + NonTransfer: sts.unit(), + Society: sts.unit(), + Staking: sts.unit(), + } +}) + +export const AccountId32 = sts.bytes() diff --git a/squid/src/types/v9430.ts b/squid/src/types/v9430.ts new file mode 100644 index 00000000..e1cd4f89 --- /dev/null +++ b/squid/src/types/v9430.ts @@ -0,0 +1,12414 @@ +import {sts, Result, Option, Bytes, BitSequence} from './support' + +export const Weight: sts.Type = sts.struct(() => { + return { + refTime: sts.bigint(), + proofSize: sts.bigint(), + } +}) + +export interface Weight { + refTime: bigint + proofSize: bigint +} + +export const Timepoint: sts.Type = sts.struct(() => { + return { + height: sts.number(), + index: sts.number(), + } +}) + +export interface Timepoint { + height: number + index: number +} + +export const AccountId32 = sts.bytes() + +export const Call: sts.Type = sts.closedEnum(() => { + return { + Auctions: AuctionsCall, + Babe: BabeCall, + Balances: BalancesCall, + Bounties: BountiesCall, + ChildBounties: ChildBountiesCall, + Claims: ClaimsCall, + Configuration: ConfigurationCall, + ConvictionVoting: ConvictionVotingCall, + Crowdloan: CrowdloanCall, + ElectionProviderMultiPhase: ElectionProviderMultiPhaseCall, + FastUnstake: FastUnstakeCall, + FellowshipCollective: FellowshipCollectiveCall, + FellowshipReferenda: FellowshipReferendaCall, + Grandpa: GrandpaCall, + Hrmp: HrmpCall, + Identity: IdentityCall, + ImOnline: ImOnlineCall, + Indices: IndicesCall, + Initializer: InitializerCall, + MessageQueue: MessageQueueCall, + Multisig: MultisigCall, + Nis: NisCall, + NisCounterpartBalances: NisCounterpartBalancesCall, + NominationPools: NominationPoolsCall, + ParaInclusion: ParaInclusionCall, + ParaInherent: ParaInherentCall, + Paras: ParasCall, + ParasDisputes: ParasDisputesCall, + ParasShared: ParasSharedCall, + ParasSlashing: ParasSlashingCall, + Preimage: PreimageCall, + Proxy: ProxyCall, + Recovery: RecoveryCall, + Referenda: ReferendaCall, + Registrar: RegistrarCall, + Scheduler: SchedulerCall, + Session: SessionCall, + Slots: SlotsCall, + Society: SocietyCall, + Staking: StakingCall, + System: SystemCall, + Timestamp: TimestampCall, + Treasury: TreasuryCall, + Utility: UtilityCall, + Vesting: VestingCall, + VoterList: VoterListCall, + Whitelist: WhitelistCall, + XcmPallet: XcmPalletCall, + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const XcmPalletCall: sts.Type = sts.closedEnum(() => { + return { + execute: sts.enumStruct({ + message: Type_438, + maxWeight: Weight, + }), + force_default_xcm_version: sts.enumStruct({ + maybeXcmVersion: sts.option(() => sts.number()), + }), + force_subscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_suspension: sts.enumStruct({ + suspended: sts.boolean(), + }), + force_unsubscribe_version_notify: sts.enumStruct({ + location: VersionedMultiLocation, + }), + force_xcm_version: sts.enumStruct({ + location: V3MultiLocation, + xcmVersion: sts.number(), + }), + limited_reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V3WeightLimit, + }), + limited_teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + weightLimit: V3WeightLimit, + }), + reserve_transfer_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + send: sts.enumStruct({ + dest: VersionedMultiLocation, + message: VersionedXcm, + }), + teleport_assets: sts.enumStruct({ + dest: VersionedMultiLocation, + beneficiary: VersionedMultiLocation, + assets: VersionedMultiAssets, + feeAssetItem: sts.number(), + }), + } +}) + +export const VersionedXcm: sts.Type = sts.closedEnum(() => { + return { + V2: sts.array(() => V2Instruction), + V3: sts.array(() => V3Instruction), + } +}) + +export const V3Instruction: sts.Type = sts.closedEnum(() => { + return { + AliasOrigin: V3MultiLocation, + BurnAsset: sts.array(() => V3MultiAsset), + BuyExecution: sts.enumStruct({ + fees: V3MultiAsset, + weightLimit: V3WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + ticket: V3MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + ClearTopic: sts.unit(), + ClearTransactStatus: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + beneficiary: V3MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + DescendOrigin: V3Junctions, + ExchangeAsset: sts.enumStruct({ + give: V3MultiAssetFilter, + want: sts.array(() => V3MultiAsset), + maximal: sts.boolean(), + }), + ExpectAsset: sts.array(() => V3MultiAsset), + ExpectError: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + ExpectOrigin: sts.option(() => V3MultiLocation), + ExpectPallet: sts.enumStruct({ + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + crateMajor: sts.number(), + minCrateMinor: sts.number(), + }), + ExpectTransactStatus: V3MaybeErrorCode, + ExportMessage: sts.enumStruct({ + network: V3NetworkId, + destination: V3Junctions, + xcm: sts.array(() => V3Instruction), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V3MultiAssetFilter, + reserve: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + LockAsset: sts.enumStruct({ + asset: V3MultiAsset, + unlocker: V3MultiLocation, + }), + NoteUnlockable: sts.enumStruct({ + asset: V3MultiAsset, + owner: V3MultiLocation, + }), + QueryPallet: sts.enumStruct({ + moduleName: sts.bytes(), + responseInfo: V3QueryResponseInfo, + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V3Response, + maxWeight: Weight, + querier: sts.option(() => V3MultiLocation), + }), + ReceiveTeleportedAsset: sts.array(() => V3MultiAsset), + RefundSurplus: sts.unit(), + ReportError: V3QueryResponseInfo, + ReportHolding: sts.enumStruct({ + responseInfo: V3QueryResponseInfo, + assets: V3MultiAssetFilter, + }), + ReportTransactStatus: V3QueryResponseInfo, + RequestUnlock: sts.enumStruct({ + asset: V3MultiAsset, + locker: V3MultiLocation, + }), + ReserveAssetDeposited: sts.array(() => V3MultiAsset), + SetAppendix: sts.array(() => V3Instruction), + SetErrorHandler: sts.array(() => V3Instruction), + SetFeesMode: sts.enumStruct({ + jitWithdraw: sts.boolean(), + }), + SetTopic: sts.bytes(), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: Weight, + }), + Transact: sts.enumStruct({ + originKind: V2OriginKind, + requireWeightAtMost: Weight, + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + beneficiary: V3MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + Trap: sts.bigint(), + UniversalOrigin: V3Junction, + UnlockAsset: sts.enumStruct({ + asset: V3MultiAsset, + target: V3MultiLocation, + }), + UnpaidExecution: sts.enumStruct({ + weightLimit: V3WeightLimit, + checkOrigin: sts.option(() => V3MultiLocation), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V3MultiAsset), + } +}) + +export const V3Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: sts.option(() => V3NetworkId), + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: sts.option(() => V3NetworkId), + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: sts.option(() => V3NetworkId), + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: sts.enumStruct({ + length: sts.number(), + data: sts.bytes(), + }), + GlobalConsensus: V3NetworkId, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V3BodyId, + part: V3BodyPart, + }), + } +}) + +export const V3BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export type V3BodyPart = V3BodyPart_AtLeastProportion | V3BodyPart_Fraction | V3BodyPart_Members | V3BodyPart_MoreThanProportion | V3BodyPart_Voice + +export interface V3BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V3BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V3BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V3BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V3BodyPart_Voice { + __kind: 'Voice' +} + +export const V3BodyId: sts.Type = sts.closedEnum(() => { + return { + Administration: sts.unit(), + Defense: sts.unit(), + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Moniker: sts.bytes(), + Technical: sts.unit(), + Treasury: sts.unit(), + Unit: sts.unit(), + } +}) + +export type V3BodyId = V3BodyId_Administration | V3BodyId_Defense | V3BodyId_Executive | V3BodyId_Index | V3BodyId_Judicial | V3BodyId_Legislative | V3BodyId_Moniker | V3BodyId_Technical | V3BodyId_Treasury | V3BodyId_Unit + +export interface V3BodyId_Administration { + __kind: 'Administration' +} + +export interface V3BodyId_Defense { + __kind: 'Defense' +} + +export interface V3BodyId_Executive { + __kind: 'Executive' +} + +export interface V3BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V3BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V3BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V3BodyId_Moniker { + __kind: 'Moniker' + value: Bytes +} + +export interface V3BodyId_Technical { + __kind: 'Technical' +} + +export interface V3BodyId_Treasury { + __kind: 'Treasury' +} + +export interface V3BodyId_Unit { + __kind: 'Unit' +} + +export type V3Junction = V3Junction_AccountId32 | V3Junction_AccountIndex64 | V3Junction_AccountKey20 | V3Junction_GeneralIndex | V3Junction_GeneralKey | V3Junction_GlobalConsensus | V3Junction_OnlyChild | V3Junction_PalletInstance | V3Junction_Parachain | V3Junction_Plurality + +export interface V3Junction_AccountId32 { + __kind: 'AccountId32' + network?: (V3NetworkId | undefined) + id: Bytes +} + +export interface V3Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network?: (V3NetworkId | undefined) + index: bigint +} + +export interface V3Junction_AccountKey20 { + __kind: 'AccountKey20' + network?: (V3NetworkId | undefined) + key: Bytes +} + +export interface V3Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V3Junction_GeneralKey { + __kind: 'GeneralKey' + length: number + data: Bytes +} + +export interface V3Junction_GlobalConsensus { + __kind: 'GlobalConsensus' + value: V3NetworkId +} + +export interface V3Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V3Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V3Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V3Junction_Plurality { + __kind: 'Plurality' + id: V3BodyId + part: V3BodyPart +} + +export type V3NetworkId = V3NetworkId_BitcoinCash | V3NetworkId_BitcoinCore | V3NetworkId_ByFork | V3NetworkId_ByGenesis | V3NetworkId_Ethereum | V3NetworkId_Kusama | V3NetworkId_Polkadot | V3NetworkId_Rococo | V3NetworkId_Westend | V3NetworkId_Wococo + +export interface V3NetworkId_BitcoinCash { + __kind: 'BitcoinCash' +} + +export interface V3NetworkId_BitcoinCore { + __kind: 'BitcoinCore' +} + +export interface V3NetworkId_ByFork { + __kind: 'ByFork' + blockNumber: bigint + blockHash: Bytes +} + +export interface V3NetworkId_ByGenesis { + __kind: 'ByGenesis' + value: Bytes +} + +export interface V3NetworkId_Ethereum { + __kind: 'Ethereum' + chainId: bigint +} + +export interface V3NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V3NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export interface V3NetworkId_Rococo { + __kind: 'Rococo' +} + +export interface V3NetworkId_Westend { + __kind: 'Westend' +} + +export interface V3NetworkId_Wococo { + __kind: 'Wococo' +} + +export const DoubleEncoded: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface DoubleEncoded { + encoded: Bytes +} + +export const V2OriginKind: sts.Type = sts.closedEnum(() => { + return { + Native: sts.unit(), + SovereignAccount: sts.unit(), + Superuser: sts.unit(), + Xcm: sts.unit(), + } +}) + +export type V2OriginKind = V2OriginKind_Native | V2OriginKind_SovereignAccount | V2OriginKind_Superuser | V2OriginKind_Xcm + +export interface V2OriginKind_Native { + __kind: 'Native' +} + +export interface V2OriginKind_SovereignAccount { + __kind: 'SovereignAccount' +} + +export interface V2OriginKind_Superuser { + __kind: 'Superuser' +} + +export interface V2OriginKind_Xcm { + __kind: 'Xcm' +} + +export const V3Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V3MultiAsset), + DispatchResult: V3MaybeErrorCode, + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + Null: sts.unit(), + PalletsInfo: sts.array(() => V3PalletInfo), + Version: sts.number(), + } +}) + +export const V3PalletInfo: sts.Type = sts.struct(() => { + return { + index: sts.number(), + name: BoundedVec, + moduleName: BoundedVec, + major: sts.number(), + minor: sts.number(), + patch: sts.number(), + } +}) + +export const BoundedVec = sts.bytes() + +export interface V3PalletInfo { + index: number + name: BoundedVec + moduleName: BoundedVec + major: number + minor: number + patch: number +} + +export type BoundedVec = Bytes + +export type V3Response = V3Response_Assets | V3Response_DispatchResult | V3Response_ExecutionResult | V3Response_Null | V3Response_PalletsInfo | V3Response_Version + +export interface V3Response_Assets { + __kind: 'Assets' + value: V3MultiAsset[] +} + +export interface V3Response_DispatchResult { + __kind: 'DispatchResult' + value: V3MaybeErrorCode +} + +export interface V3Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V3Error] | undefined) +} + +export interface V3Response_Null { + __kind: 'Null' +} + +export interface V3Response_PalletsInfo { + __kind: 'PalletsInfo' + value: V3PalletInfo[] +} + +export interface V3Response_Version { + __kind: 'Version' + value: number +} + +export type V3Error = V3Error_AssetNotFound | V3Error_BadOrigin | V3Error_Barrier | V3Error_DestinationUnsupported | V3Error_ExceedsMaxMessageSize | V3Error_ExceedsStackLimit | V3Error_ExpectationFalse | V3Error_ExportError | V3Error_FailedToDecode | V3Error_FailedToTransactAsset | V3Error_FeesNotMet | V3Error_HoldingWouldOverflow | V3Error_InvalidLocation | V3Error_LocationCannotHold | V3Error_LocationFull | V3Error_LocationNotInvertible | V3Error_LockError | V3Error_MaxWeightInvalid | V3Error_NameMismatch | V3Error_NoDeal | V3Error_NoPermission | V3Error_NotDepositable | V3Error_NotHoldingFees | V3Error_NotWithdrawable | V3Error_Overflow | V3Error_PalletNotFound | V3Error_ReanchorFailed | V3Error_TooExpensive | V3Error_Transport | V3Error_Trap | V3Error_Unanchored | V3Error_UnhandledXcmVersion | V3Error_Unimplemented | V3Error_UnknownClaim | V3Error_Unroutable | V3Error_UntrustedReserveLocation | V3Error_UntrustedTeleportLocation | V3Error_VersionIncompatible | V3Error_WeightLimitReached | V3Error_WeightNotComputable + +export interface V3Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V3Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V3Error_Barrier { + __kind: 'Barrier' +} + +export interface V3Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V3Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V3Error_ExceedsStackLimit { + __kind: 'ExceedsStackLimit' +} + +export interface V3Error_ExpectationFalse { + __kind: 'ExpectationFalse' +} + +export interface V3Error_ExportError { + __kind: 'ExportError' +} + +export interface V3Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V3Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V3Error_FeesNotMet { + __kind: 'FeesNotMet' +} + +export interface V3Error_HoldingWouldOverflow { + __kind: 'HoldingWouldOverflow' +} + +export interface V3Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V3Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V3Error_LocationFull { + __kind: 'LocationFull' +} + +export interface V3Error_LocationNotInvertible { + __kind: 'LocationNotInvertible' +} + +export interface V3Error_LockError { + __kind: 'LockError' +} + +export interface V3Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V3Error_NameMismatch { + __kind: 'NameMismatch' +} + +export interface V3Error_NoDeal { + __kind: 'NoDeal' +} + +export interface V3Error_NoPermission { + __kind: 'NoPermission' +} + +export interface V3Error_NotDepositable { + __kind: 'NotDepositable' +} + +export interface V3Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V3Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V3Error_Overflow { + __kind: 'Overflow' +} + +export interface V3Error_PalletNotFound { + __kind: 'PalletNotFound' +} + +export interface V3Error_ReanchorFailed { + __kind: 'ReanchorFailed' +} + +export interface V3Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V3Error_Transport { + __kind: 'Transport' +} + +export interface V3Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V3Error_Unanchored { + __kind: 'Unanchored' +} + +export interface V3Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V3Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V3Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V3Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V3Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V3Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V3Error_VersionIncompatible { + __kind: 'VersionIncompatible' +} + +export interface V3Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: Weight +} + +export interface V3Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V3MaybeErrorCode = V3MaybeErrorCode_Error | V3MaybeErrorCode_Success | V3MaybeErrorCode_TruncatedError + +export interface V3MaybeErrorCode_Error { + __kind: 'Error' + value: Bytes +} + +export interface V3MaybeErrorCode_Success { + __kind: 'Success' +} + +export interface V3MaybeErrorCode_TruncatedError { + __kind: 'TruncatedError' + value: Bytes +} + +export interface V3MultiAsset { + id: V3AssetId + fun: V3Fungibility +} + +export type V3Fungibility = V3Fungibility_Fungible | V3Fungibility_NonFungible + +export interface V3Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V3Fungibility_NonFungible { + __kind: 'NonFungible' + value: V3AssetInstance +} + +export type V3AssetInstance = V3AssetInstance_Array16 | V3AssetInstance_Array32 | V3AssetInstance_Array4 | V3AssetInstance_Array8 | V3AssetInstance_Index | V3AssetInstance_Undefined + +export interface V3AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V3AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V3AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V3AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V3AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V3AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V3AssetId = V3AssetId_Abstract | V3AssetId_Concrete + +export interface V3AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V3AssetId_Concrete { + __kind: 'Concrete' + value: V3MultiLocation +} + +export interface V3MultiLocation { + parents: number + interior: V3Junctions +} + +export type V3Junctions = V3Junctions_Here | V3Junctions_X1 | V3Junctions_X2 | V3Junctions_X3 | V3Junctions_X4 | V3Junctions_X5 | V3Junctions_X6 | V3Junctions_X7 | V3Junctions_X8 + +export interface V3Junctions_Here { + __kind: 'Here' +} + +export interface V3Junctions_X1 { + __kind: 'X1' + value: V3Junction +} + +export interface V3Junctions_X2 { + __kind: 'X2' + value: [V3Junction, V3Junction] +} + +export interface V3Junctions_X3 { + __kind: 'X3' + value: [V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X4 { + __kind: 'X4' + value: [V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X5 { + __kind: 'X5' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X6 { + __kind: 'X6' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X7 { + __kind: 'X7' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export interface V3Junctions_X8 { + __kind: 'X8' + value: [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction] +} + +export const V3QueryResponseInfo: sts.Type = sts.struct(() => { + return { + destination: V3MultiLocation, + queryId: sts.bigint(), + maxWeight: Weight, + } +}) + +export interface V3QueryResponseInfo { + destination: V3MultiLocation + queryId: bigint + maxWeight: Weight +} + +export const V3NetworkId: sts.Type = sts.closedEnum(() => { + return { + BitcoinCash: sts.unit(), + BitcoinCore: sts.unit(), + ByFork: sts.enumStruct({ + blockNumber: sts.bigint(), + blockHash: sts.bytes(), + }), + ByGenesis: sts.bytes(), + Ethereum: sts.enumStruct({ + chainId: sts.bigint(), + }), + Kusama: sts.unit(), + Polkadot: sts.unit(), + Rococo: sts.unit(), + Westend: sts.unit(), + Wococo: sts.unit(), + } +}) + +export const V3MaybeErrorCode: sts.Type = sts.closedEnum(() => { + return { + Error: sts.bytes(), + Success: sts.unit(), + TruncatedError: sts.bytes(), + } +}) + +export const V3Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + ExceedsStackLimit: sts.unit(), + ExpectationFalse: sts.unit(), + ExportError: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + FeesNotMet: sts.unit(), + HoldingWouldOverflow: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + LocationFull: sts.unit(), + LocationNotInvertible: sts.unit(), + LockError: sts.unit(), + MaxWeightInvalid: sts.unit(), + NameMismatch: sts.unit(), + NoDeal: sts.unit(), + NoPermission: sts.unit(), + NotDepositable: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + PalletNotFound: sts.unit(), + ReanchorFailed: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + Unanchored: sts.unit(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + VersionIncompatible: sts.unit(), + WeightLimitReached: Weight, + WeightNotComputable: sts.unit(), + } +}) + +export const V3Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V3Junction, + X2: sts.tuple(() => [V3Junction, V3Junction]), + X3: sts.tuple(() => [V3Junction, V3Junction, V3Junction]), + X4: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction]), + X5: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + X6: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + X7: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + X8: sts.tuple(() => [V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction, V3Junction]), + } +}) + +export const V3MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V3MultiAsset), + Wild: V3WildMultiAsset, + } +}) + +export const V3WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllCounted: sts.number(), + AllOf: sts.enumStruct({ + id: V3AssetId, + fun: V3WildFungibility, + }), + AllOfCounted: sts.enumStruct({ + id: V3AssetId, + fun: V3WildFungibility, + count: sts.number(), + }), + } +}) + +export const V3WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V3WildFungibility = V3WildFungibility_Fungible | V3WildFungibility_NonFungible + +export interface V3WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V3WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V3AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V3MultiLocation, + } +}) + +export type V3WildMultiAsset = V3WildMultiAsset_All | V3WildMultiAsset_AllCounted | V3WildMultiAsset_AllOf | V3WildMultiAsset_AllOfCounted + +export interface V3WildMultiAsset_All { + __kind: 'All' +} + +export interface V3WildMultiAsset_AllCounted { + __kind: 'AllCounted' + value: number +} + +export interface V3WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V3AssetId + fun: V3WildFungibility +} + +export interface V3WildMultiAsset_AllOfCounted { + __kind: 'AllOfCounted' + id: V3AssetId + fun: V3WildFungibility + count: number +} + +export type V3MultiAssetFilter = V3MultiAssetFilter_Definite | V3MultiAssetFilter_Wild + +export interface V3MultiAssetFilter_Definite { + __kind: 'Definite' + value: V3MultiAsset[] +} + +export interface V3MultiAssetFilter_Wild { + __kind: 'Wild' + value: V3WildMultiAsset +} + +export const V3MultiAsset: sts.Type = sts.struct(() => { + return { + id: V3AssetId, + fun: V3Fungibility, + } +}) + +export const V3Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V3AssetInstance, + } +}) + +export const V3AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V3Instruction = V3Instruction_AliasOrigin | V3Instruction_BurnAsset | V3Instruction_BuyExecution | V3Instruction_ClaimAsset | V3Instruction_ClearError | V3Instruction_ClearOrigin | V3Instruction_ClearTopic | V3Instruction_ClearTransactStatus | V3Instruction_DepositAsset | V3Instruction_DepositReserveAsset | V3Instruction_DescendOrigin | V3Instruction_ExchangeAsset | V3Instruction_ExpectAsset | V3Instruction_ExpectError | V3Instruction_ExpectOrigin | V3Instruction_ExpectPallet | V3Instruction_ExpectTransactStatus | V3Instruction_ExportMessage | V3Instruction_HrmpChannelAccepted | V3Instruction_HrmpChannelClosing | V3Instruction_HrmpNewChannelOpenRequest | V3Instruction_InitiateReserveWithdraw | V3Instruction_InitiateTeleport | V3Instruction_LockAsset | V3Instruction_NoteUnlockable | V3Instruction_QueryPallet | V3Instruction_QueryResponse | V3Instruction_ReceiveTeleportedAsset | V3Instruction_RefundSurplus | V3Instruction_ReportError | V3Instruction_ReportHolding | V3Instruction_ReportTransactStatus | V3Instruction_RequestUnlock | V3Instruction_ReserveAssetDeposited | V3Instruction_SetAppendix | V3Instruction_SetErrorHandler | V3Instruction_SetFeesMode | V3Instruction_SetTopic | V3Instruction_SubscribeVersion | V3Instruction_Transact | V3Instruction_TransferAsset | V3Instruction_TransferReserveAsset | V3Instruction_Trap | V3Instruction_UniversalOrigin | V3Instruction_UnlockAsset | V3Instruction_UnpaidExecution | V3Instruction_UnsubscribeVersion | V3Instruction_WithdrawAsset + +export interface V3Instruction_AliasOrigin { + __kind: 'AliasOrigin' + value: V3MultiLocation +} + +export interface V3Instruction_BurnAsset { + __kind: 'BurnAsset' + value: V3MultiAsset[] +} + +export interface V3Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V3MultiAsset + weightLimit: V3WeightLimit +} + +export interface V3Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V3MultiAsset[] + ticket: V3MultiLocation +} + +export interface V3Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V3Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V3Instruction_ClearTopic { + __kind: 'ClearTopic' +} + +export interface V3Instruction_ClearTransactStatus { + __kind: 'ClearTransactStatus' +} + +export interface V3Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V3MultiAssetFilter + beneficiary: V3MultiLocation +} + +export interface V3Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V3Junctions +} + +export interface V3Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V3MultiAssetFilter + want: V3MultiAsset[] + maximal: boolean +} + +export interface V3Instruction_ExpectAsset { + __kind: 'ExpectAsset' + value: V3MultiAsset[] +} + +export interface V3Instruction_ExpectError { + __kind: 'ExpectError' + value?: ([number, V3Error] | undefined) +} + +export interface V3Instruction_ExpectOrigin { + __kind: 'ExpectOrigin' + value?: (V3MultiLocation | undefined) +} + +export interface V3Instruction_ExpectPallet { + __kind: 'ExpectPallet' + index: number + name: Bytes + moduleName: Bytes + crateMajor: number + minCrateMinor: number +} + +export interface V3Instruction_ExpectTransactStatus { + __kind: 'ExpectTransactStatus' + value: V3MaybeErrorCode +} + +export interface V3Instruction_ExportMessage { + __kind: 'ExportMessage' + network: V3NetworkId + destination: V3Junctions + xcm: V3Instruction[] +} + +export interface V3Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V3Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V3Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V3Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V3MultiAssetFilter + reserve: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_LockAsset { + __kind: 'LockAsset' + asset: V3MultiAsset + unlocker: V3MultiLocation +} + +export interface V3Instruction_NoteUnlockable { + __kind: 'NoteUnlockable' + asset: V3MultiAsset + owner: V3MultiLocation +} + +export interface V3Instruction_QueryPallet { + __kind: 'QueryPallet' + moduleName: Bytes + responseInfo: V3QueryResponseInfo +} + +export interface V3Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V3Response + maxWeight: Weight + querier?: (V3MultiLocation | undefined) +} + +export interface V3Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V3MultiAsset[] +} + +export interface V3Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V3Instruction_ReportError { + __kind: 'ReportError' + value: V3QueryResponseInfo +} + +export interface V3Instruction_ReportHolding { + __kind: 'ReportHolding' + responseInfo: V3QueryResponseInfo + assets: V3MultiAssetFilter +} + +export interface V3Instruction_ReportTransactStatus { + __kind: 'ReportTransactStatus' + value: V3QueryResponseInfo +} + +export interface V3Instruction_RequestUnlock { + __kind: 'RequestUnlock' + asset: V3MultiAsset + locker: V3MultiLocation +} + +export interface V3Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V3MultiAsset[] +} + +export interface V3Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V3Instruction[] +} + +export interface V3Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V3Instruction[] +} + +export interface V3Instruction_SetFeesMode { + __kind: 'SetFeesMode' + jitWithdraw: boolean +} + +export interface V3Instruction_SetTopic { + __kind: 'SetTopic' + value: Bytes +} + +export interface V3Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: Weight +} + +export interface V3Instruction_Transact { + __kind: 'Transact' + originKind: V2OriginKind + requireWeightAtMost: Weight + call: DoubleEncoded +} + +export interface V3Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V3MultiAsset[] + beneficiary: V3MultiLocation +} + +export interface V3Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V3MultiAsset[] + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface V3Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V3Instruction_UniversalOrigin { + __kind: 'UniversalOrigin' + value: V3Junction +} + +export interface V3Instruction_UnlockAsset { + __kind: 'UnlockAsset' + asset: V3MultiAsset + target: V3MultiLocation +} + +export interface V3Instruction_UnpaidExecution { + __kind: 'UnpaidExecution' + weightLimit: V3WeightLimit + checkOrigin?: (V3MultiLocation | undefined) +} + +export interface V3Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V3Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V3MultiAsset[] +} + +export type V3WeightLimit = V3WeightLimit_Limited | V3WeightLimit_Unlimited + +export interface V3WeightLimit_Limited { + __kind: 'Limited' + value: Weight +} + +export interface V3WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V2Instruction: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V2MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + ticket: V2MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V2MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V2Junctions, + ExchangeAsset: sts.enumStruct({ + give: V2MultiAssetFilter, + receive: sts.array(() => V2MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V2MultiAssetFilter, + reserve: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V2MultiAssetFilter, + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + assets: V2MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V2MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V2MultiAsset), + SetAppendix: sts.array(() => V2Instruction), + SetErrorHandler: sts.array(() => V2Instruction), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V2OriginKind, + requireWeightAtMost: sts.bigint(), + call: DoubleEncoded, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + beneficiary: V2MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V2MultiAsset), + } +}) + +export const V2Response: sts.Type = sts.closedEnum(() => { + return { + Assets: sts.array(() => V2MultiAsset), + ExecutionResult: sts.option(() => sts.tuple(() => [sts.number(), V2Error])), + Null: sts.unit(), + Version: sts.number(), + } +}) + +export const V2Error: sts.Type = sts.closedEnum(() => { + return { + AssetNotFound: sts.unit(), + BadOrigin: sts.unit(), + Barrier: sts.unit(), + DestinationUnsupported: sts.unit(), + ExceedsMaxMessageSize: sts.unit(), + FailedToDecode: sts.unit(), + FailedToTransactAsset: sts.unit(), + InvalidLocation: sts.unit(), + LocationCannotHold: sts.unit(), + MaxWeightInvalid: sts.unit(), + MultiLocationFull: sts.unit(), + MultiLocationNotInvertible: sts.unit(), + NotHoldingFees: sts.unit(), + NotWithdrawable: sts.unit(), + Overflow: sts.unit(), + TooExpensive: sts.unit(), + Transport: sts.unit(), + Trap: sts.bigint(), + UnhandledXcmVersion: sts.unit(), + Unimplemented: sts.unit(), + UnknownClaim: sts.unit(), + Unroutable: sts.unit(), + UntrustedReserveLocation: sts.unit(), + UntrustedTeleportLocation: sts.unit(), + WeightLimitReached: sts.bigint(), + WeightNotComputable: sts.unit(), + } +}) + +export type V2Error = V2Error_AssetNotFound | V2Error_BadOrigin | V2Error_Barrier | V2Error_DestinationUnsupported | V2Error_ExceedsMaxMessageSize | V2Error_FailedToDecode | V2Error_FailedToTransactAsset | V2Error_InvalidLocation | V2Error_LocationCannotHold | V2Error_MaxWeightInvalid | V2Error_MultiLocationFull | V2Error_MultiLocationNotInvertible | V2Error_NotHoldingFees | V2Error_NotWithdrawable | V2Error_Overflow | V2Error_TooExpensive | V2Error_Transport | V2Error_Trap | V2Error_UnhandledXcmVersion | V2Error_Unimplemented | V2Error_UnknownClaim | V2Error_Unroutable | V2Error_UntrustedReserveLocation | V2Error_UntrustedTeleportLocation | V2Error_WeightLimitReached | V2Error_WeightNotComputable + +export interface V2Error_AssetNotFound { + __kind: 'AssetNotFound' +} + +export interface V2Error_BadOrigin { + __kind: 'BadOrigin' +} + +export interface V2Error_Barrier { + __kind: 'Barrier' +} + +export interface V2Error_DestinationUnsupported { + __kind: 'DestinationUnsupported' +} + +export interface V2Error_ExceedsMaxMessageSize { + __kind: 'ExceedsMaxMessageSize' +} + +export interface V2Error_FailedToDecode { + __kind: 'FailedToDecode' +} + +export interface V2Error_FailedToTransactAsset { + __kind: 'FailedToTransactAsset' +} + +export interface V2Error_InvalidLocation { + __kind: 'InvalidLocation' +} + +export interface V2Error_LocationCannotHold { + __kind: 'LocationCannotHold' +} + +export interface V2Error_MaxWeightInvalid { + __kind: 'MaxWeightInvalid' +} + +export interface V2Error_MultiLocationFull { + __kind: 'MultiLocationFull' +} + +export interface V2Error_MultiLocationNotInvertible { + __kind: 'MultiLocationNotInvertible' +} + +export interface V2Error_NotHoldingFees { + __kind: 'NotHoldingFees' +} + +export interface V2Error_NotWithdrawable { + __kind: 'NotWithdrawable' +} + +export interface V2Error_Overflow { + __kind: 'Overflow' +} + +export interface V2Error_TooExpensive { + __kind: 'TooExpensive' +} + +export interface V2Error_Transport { + __kind: 'Transport' +} + +export interface V2Error_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Error_UnhandledXcmVersion { + __kind: 'UnhandledXcmVersion' +} + +export interface V2Error_Unimplemented { + __kind: 'Unimplemented' +} + +export interface V2Error_UnknownClaim { + __kind: 'UnknownClaim' +} + +export interface V2Error_Unroutable { + __kind: 'Unroutable' +} + +export interface V2Error_UntrustedReserveLocation { + __kind: 'UntrustedReserveLocation' +} + +export interface V2Error_UntrustedTeleportLocation { + __kind: 'UntrustedTeleportLocation' +} + +export interface V2Error_WeightLimitReached { + __kind: 'WeightLimitReached' + value: bigint +} + +export interface V2Error_WeightNotComputable { + __kind: 'WeightNotComputable' +} + +export type V2Response = V2Response_Assets | V2Response_ExecutionResult | V2Response_Null | V2Response_Version + +export interface V2Response_Assets { + __kind: 'Assets' + value: V2MultiAsset[] +} + +export interface V2Response_ExecutionResult { + __kind: 'ExecutionResult' + value?: ([number, V2Error] | undefined) +} + +export interface V2Response_Null { + __kind: 'Null' +} + +export interface V2Response_Version { + __kind: 'Version' + value: number +} + +export interface V2MultiAsset { + id: V2AssetId + fun: V2Fungibility +} + +export type V2Fungibility = V2Fungibility_Fungible | V2Fungibility_NonFungible + +export interface V2Fungibility_Fungible { + __kind: 'Fungible' + value: bigint +} + +export interface V2Fungibility_NonFungible { + __kind: 'NonFungible' + value: V2AssetInstance +} + +export type V2AssetInstance = V2AssetInstance_Array16 | V2AssetInstance_Array32 | V2AssetInstance_Array4 | V2AssetInstance_Array8 | V2AssetInstance_Blob | V2AssetInstance_Index | V2AssetInstance_Undefined + +export interface V2AssetInstance_Array16 { + __kind: 'Array16' + value: Bytes +} + +export interface V2AssetInstance_Array32 { + __kind: 'Array32' + value: Bytes +} + +export interface V2AssetInstance_Array4 { + __kind: 'Array4' + value: Bytes +} + +export interface V2AssetInstance_Array8 { + __kind: 'Array8' + value: Bytes +} + +export interface V2AssetInstance_Blob { + __kind: 'Blob' + value: Bytes +} + +export interface V2AssetInstance_Index { + __kind: 'Index' + value: bigint +} + +export interface V2AssetInstance_Undefined { + __kind: 'Undefined' +} + +export type V2AssetId = V2AssetId_Abstract | V2AssetId_Concrete + +export interface V2AssetId_Abstract { + __kind: 'Abstract' + value: Bytes +} + +export interface V2AssetId_Concrete { + __kind: 'Concrete' + value: V2MultiLocation +} + +export interface V2MultiLocation { + parents: number + interior: V2Junctions +} + +export type V2Junctions = V2Junctions_Here | V2Junctions_X1 | V2Junctions_X2 | V2Junctions_X3 | V2Junctions_X4 | V2Junctions_X5 | V2Junctions_X6 | V2Junctions_X7 | V2Junctions_X8 + +export interface V2Junctions_Here { + __kind: 'Here' +} + +export interface V2Junctions_X1 { + __kind: 'X1' + value: V2Junction +} + +export interface V2Junctions_X2 { + __kind: 'X2' + value: [V2Junction, V2Junction] +} + +export interface V2Junctions_X3 { + __kind: 'X3' + value: [V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X4 { + __kind: 'X4' + value: [V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X5 { + __kind: 'X5' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X6 { + __kind: 'X6' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X7 { + __kind: 'X7' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export interface V2Junctions_X8 { + __kind: 'X8' + value: [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction] +} + +export type V2Junction = V2Junction_AccountId32 | V2Junction_AccountIndex64 | V2Junction_AccountKey20 | V2Junction_GeneralIndex | V2Junction_GeneralKey | V2Junction_OnlyChild | V2Junction_PalletInstance | V2Junction_Parachain | V2Junction_Plurality + +export interface V2Junction_AccountId32 { + __kind: 'AccountId32' + network: V2NetworkId + id: Bytes +} + +export interface V2Junction_AccountIndex64 { + __kind: 'AccountIndex64' + network: V2NetworkId + index: bigint +} + +export interface V2Junction_AccountKey20 { + __kind: 'AccountKey20' + network: V2NetworkId + key: Bytes +} + +export interface V2Junction_GeneralIndex { + __kind: 'GeneralIndex' + value: bigint +} + +export interface V2Junction_GeneralKey { + __kind: 'GeneralKey' + value: WeakBoundedVec +} + +export interface V2Junction_OnlyChild { + __kind: 'OnlyChild' +} + +export interface V2Junction_PalletInstance { + __kind: 'PalletInstance' + value: number +} + +export interface V2Junction_Parachain { + __kind: 'Parachain' + value: number +} + +export interface V2Junction_Plurality { + __kind: 'Plurality' + id: V2BodyId + part: V2BodyPart +} + +export type V2BodyPart = V2BodyPart_AtLeastProportion | V2BodyPart_Fraction | V2BodyPart_Members | V2BodyPart_MoreThanProportion | V2BodyPart_Voice + +export interface V2BodyPart_AtLeastProportion { + __kind: 'AtLeastProportion' + nom: number + denom: number +} + +export interface V2BodyPart_Fraction { + __kind: 'Fraction' + nom: number + denom: number +} + +export interface V2BodyPart_Members { + __kind: 'Members' + count: number +} + +export interface V2BodyPart_MoreThanProportion { + __kind: 'MoreThanProportion' + nom: number + denom: number +} + +export interface V2BodyPart_Voice { + __kind: 'Voice' +} + +export type V2BodyId = V2BodyId_Administration | V2BodyId_Defense | V2BodyId_Executive | V2BodyId_Index | V2BodyId_Judicial | V2BodyId_Legislative | V2BodyId_Named | V2BodyId_Technical | V2BodyId_Treasury | V2BodyId_Unit + +export interface V2BodyId_Administration { + __kind: 'Administration' +} + +export interface V2BodyId_Defense { + __kind: 'Defense' +} + +export interface V2BodyId_Executive { + __kind: 'Executive' +} + +export interface V2BodyId_Index { + __kind: 'Index' + value: number +} + +export interface V2BodyId_Judicial { + __kind: 'Judicial' +} + +export interface V2BodyId_Legislative { + __kind: 'Legislative' +} + +export interface V2BodyId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V2BodyId_Technical { + __kind: 'Technical' +} + +export interface V2BodyId_Treasury { + __kind: 'Treasury' +} + +export interface V2BodyId_Unit { + __kind: 'Unit' +} + +export type WeakBoundedVec = Bytes + +export type V2NetworkId = V2NetworkId_Any | V2NetworkId_Kusama | V2NetworkId_Named | V2NetworkId_Polkadot + +export interface V2NetworkId_Any { + __kind: 'Any' +} + +export interface V2NetworkId_Kusama { + __kind: 'Kusama' +} + +export interface V2NetworkId_Named { + __kind: 'Named' + value: WeakBoundedVec +} + +export interface V2NetworkId_Polkadot { + __kind: 'Polkadot' +} + +export const V2Junctions: sts.Type = sts.closedEnum(() => { + return { + Here: sts.unit(), + X1: V2Junction, + X2: sts.tuple(() => [V2Junction, V2Junction]), + X3: sts.tuple(() => [V2Junction, V2Junction, V2Junction]), + X4: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction]), + X5: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + X6: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + X7: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + X8: sts.tuple(() => [V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction, V2Junction]), + } +}) + +export const V2Junction: sts.Type = sts.closedEnum(() => { + return { + AccountId32: sts.enumStruct({ + network: V2NetworkId, + id: sts.bytes(), + }), + AccountIndex64: sts.enumStruct({ + network: V2NetworkId, + index: sts.bigint(), + }), + AccountKey20: sts.enumStruct({ + network: V2NetworkId, + key: sts.bytes(), + }), + GeneralIndex: sts.bigint(), + GeneralKey: WeakBoundedVec, + OnlyChild: sts.unit(), + PalletInstance: sts.number(), + Parachain: sts.number(), + Plurality: sts.enumStruct({ + id: V2BodyId, + part: V2BodyPart, + }), + } +}) + +export const V2BodyPart: sts.Type = sts.closedEnum(() => { + return { + AtLeastProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Fraction: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Members: sts.enumStruct({ + count: sts.number(), + }), + MoreThanProportion: sts.enumStruct({ + nom: sts.number(), + denom: sts.number(), + }), + Voice: sts.unit(), + } +}) + +export const V2BodyId: sts.Type = sts.closedEnum(() => { + return { + Administration: sts.unit(), + Defense: sts.unit(), + Executive: sts.unit(), + Index: sts.number(), + Judicial: sts.unit(), + Legislative: sts.unit(), + Named: WeakBoundedVec, + Technical: sts.unit(), + Treasury: sts.unit(), + Unit: sts.unit(), + } +}) + +export const WeakBoundedVec = sts.bytes() + +export const V2NetworkId: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Kusama: sts.unit(), + Named: WeakBoundedVec, + Polkadot: sts.unit(), + } +}) + +export const V2MultiAssetFilter: sts.Type = sts.closedEnum(() => { + return { + Definite: sts.array(() => V2MultiAsset), + Wild: V2WildMultiAsset, + } +}) + +export const V2WildMultiAsset: sts.Type = sts.closedEnum(() => { + return { + All: sts.unit(), + AllOf: sts.enumStruct({ + id: V2AssetId, + fun: V2WildFungibility, + }), + } +}) + +export const V2WildFungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.unit(), + NonFungible: sts.unit(), + } +}) + +export type V2WildFungibility = V2WildFungibility_Fungible | V2WildFungibility_NonFungible + +export interface V2WildFungibility_Fungible { + __kind: 'Fungible' +} + +export interface V2WildFungibility_NonFungible { + __kind: 'NonFungible' +} + +export const V2AssetId: sts.Type = sts.closedEnum(() => { + return { + Abstract: sts.bytes(), + Concrete: V2MultiLocation, + } +}) + +export type V2WildMultiAsset = V2WildMultiAsset_All | V2WildMultiAsset_AllOf + +export interface V2WildMultiAsset_All { + __kind: 'All' +} + +export interface V2WildMultiAsset_AllOf { + __kind: 'AllOf' + id: V2AssetId + fun: V2WildFungibility +} + +export type V2MultiAssetFilter = V2MultiAssetFilter_Definite | V2MultiAssetFilter_Wild + +export interface V2MultiAssetFilter_Definite { + __kind: 'Definite' + value: V2MultiAsset[] +} + +export interface V2MultiAssetFilter_Wild { + __kind: 'Wild' + value: V2WildMultiAsset +} + +export const V2MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V2Junctions, + } +}) + +export const V2WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: sts.bigint(), + Unlimited: sts.unit(), + } +}) + +export type V2WeightLimit = V2WeightLimit_Limited | V2WeightLimit_Unlimited + +export interface V2WeightLimit_Limited { + __kind: 'Limited' + value: bigint +} + +export interface V2WeightLimit_Unlimited { + __kind: 'Unlimited' +} + +export const V2MultiAsset: sts.Type = sts.struct(() => { + return { + id: V2AssetId, + fun: V2Fungibility, + } +}) + +export const V2Fungibility: sts.Type = sts.closedEnum(() => { + return { + Fungible: sts.bigint(), + NonFungible: V2AssetInstance, + } +}) + +export const V2AssetInstance: sts.Type = sts.closedEnum(() => { + return { + Array16: sts.bytes(), + Array32: sts.bytes(), + Array4: sts.bytes(), + Array8: sts.bytes(), + Blob: sts.bytes(), + Index: sts.bigint(), + Undefined: sts.unit(), + } +}) + +export type V2Instruction = V2Instruction_BuyExecution | V2Instruction_ClaimAsset | V2Instruction_ClearError | V2Instruction_ClearOrigin | V2Instruction_DepositAsset | V2Instruction_DepositReserveAsset | V2Instruction_DescendOrigin | V2Instruction_ExchangeAsset | V2Instruction_HrmpChannelAccepted | V2Instruction_HrmpChannelClosing | V2Instruction_HrmpNewChannelOpenRequest | V2Instruction_InitiateReserveWithdraw | V2Instruction_InitiateTeleport | V2Instruction_QueryHolding | V2Instruction_QueryResponse | V2Instruction_ReceiveTeleportedAsset | V2Instruction_RefundSurplus | V2Instruction_ReportError | V2Instruction_ReserveAssetDeposited | V2Instruction_SetAppendix | V2Instruction_SetErrorHandler | V2Instruction_SubscribeVersion | V2Instruction_Transact | V2Instruction_TransferAsset | V2Instruction_TransferReserveAsset | V2Instruction_Trap | V2Instruction_UnsubscribeVersion | V2Instruction_WithdrawAsset + +export interface V2Instruction_BuyExecution { + __kind: 'BuyExecution' + fees: V2MultiAsset + weightLimit: V2WeightLimit +} + +export interface V2Instruction_ClaimAsset { + __kind: 'ClaimAsset' + assets: V2MultiAsset[] + ticket: V2MultiLocation +} + +export interface V2Instruction_ClearError { + __kind: 'ClearError' +} + +export interface V2Instruction_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface V2Instruction_DepositAsset { + __kind: 'DepositAsset' + assets: V2MultiAssetFilter + maxAssets: number + beneficiary: V2MultiLocation +} + +export interface V2Instruction_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V2MultiAssetFilter + maxAssets: number + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_DescendOrigin { + __kind: 'DescendOrigin' + value: V2Junctions +} + +export interface V2Instruction_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V2MultiAssetFilter + receive: V2MultiAsset[] +} + +export interface V2Instruction_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface V2Instruction_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface V2Instruction_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface V2Instruction_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V2MultiAssetFilter + reserve: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V2MultiAssetFilter + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V2MultiLocation + assets: V2MultiAssetFilter + maxResponseWeight: bigint +} + +export interface V2Instruction_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface V2Instruction_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V2MultiAsset[] +} + +export interface V2Instruction_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface V2Instruction_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V2MultiLocation + maxResponseWeight: bigint +} + +export interface V2Instruction_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V2MultiAsset[] +} + +export interface V2Instruction_SetAppendix { + __kind: 'SetAppendix' + value: V2Instruction[] +} + +export interface V2Instruction_SetErrorHandler { + __kind: 'SetErrorHandler' + value: V2Instruction[] +} + +export interface V2Instruction_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface V2Instruction_Transact { + __kind: 'Transact' + originType: V2OriginKind + requireWeightAtMost: bigint + call: DoubleEncoded +} + +export interface V2Instruction_TransferAsset { + __kind: 'TransferAsset' + assets: V2MultiAsset[] + beneficiary: V2MultiLocation +} + +export interface V2Instruction_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V2MultiAsset[] + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface V2Instruction_Trap { + __kind: 'Trap' + value: bigint +} + +export interface V2Instruction_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface V2Instruction_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V2MultiAsset[] +} + +export type VersionedXcm = VersionedXcm_V2 | VersionedXcm_V3 + +export interface VersionedXcm_V2 { + __kind: 'V2' + value: V2Instruction[] +} + +export interface VersionedXcm_V3 { + __kind: 'V3' + value: V3Instruction[] +} + +export const V3WeightLimit: sts.Type = sts.closedEnum(() => { + return { + Limited: Weight, + Unlimited: sts.unit(), + } +}) + +export const VersionedMultiAssets: sts.Type = sts.closedEnum(() => { + return { + V2: sts.array(() => V2MultiAsset), + V3: sts.array(() => V3MultiAsset), + } +}) + +export type VersionedMultiAssets = VersionedMultiAssets_V2 | VersionedMultiAssets_V3 + +export interface VersionedMultiAssets_V2 { + __kind: 'V2' + value: V2MultiAsset[] +} + +export interface VersionedMultiAssets_V3 { + __kind: 'V3' + value: V3MultiAsset[] +} + +export const V3MultiLocation: sts.Type = sts.struct(() => { + return { + parents: sts.number(), + interior: V3Junctions, + } +}) + +export const VersionedMultiLocation: sts.Type = sts.closedEnum(() => { + return { + V2: V2MultiLocation, + V3: V3MultiLocation, + } +}) + +export type VersionedMultiLocation = VersionedMultiLocation_V2 | VersionedMultiLocation_V3 + +export interface VersionedMultiLocation_V2 { + __kind: 'V2' + value: V2MultiLocation +} + +export interface VersionedMultiLocation_V3 { + __kind: 'V3' + value: V3MultiLocation +} + +export const Type_438: sts.Type = sts.closedEnum(() => { + return { + V2: sts.array(() => Type_441), + V3: sts.array(() => Type_445), + } +}) + +export const Type_445: sts.Type = sts.closedEnum(() => { + return { + AliasOrigin: V3MultiLocation, + BurnAsset: sts.array(() => V3MultiAsset), + BuyExecution: sts.enumStruct({ + fees: V3MultiAsset, + weightLimit: V3WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + ticket: V3MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + ClearTopic: sts.unit(), + ClearTransactStatus: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + beneficiary: V3MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + DescendOrigin: V3Junctions, + ExchangeAsset: sts.enumStruct({ + give: V3MultiAssetFilter, + want: sts.array(() => V3MultiAsset), + maximal: sts.boolean(), + }), + ExpectAsset: sts.array(() => V3MultiAsset), + ExpectError: sts.option(() => sts.tuple(() => [sts.number(), V3Error])), + ExpectOrigin: sts.option(() => V3MultiLocation), + ExpectPallet: sts.enumStruct({ + index: sts.number(), + name: sts.bytes(), + moduleName: sts.bytes(), + crateMajor: sts.number(), + minCrateMinor: sts.number(), + }), + ExpectTransactStatus: V3MaybeErrorCode, + ExportMessage: sts.enumStruct({ + network: V3NetworkId, + destination: V3Junctions, + xcm: sts.array(() => V3Instruction), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V3MultiAssetFilter, + reserve: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V3MultiAssetFilter, + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + LockAsset: sts.enumStruct({ + asset: V3MultiAsset, + unlocker: V3MultiLocation, + }), + NoteUnlockable: sts.enumStruct({ + asset: V3MultiAsset, + owner: V3MultiLocation, + }), + QueryPallet: sts.enumStruct({ + moduleName: sts.bytes(), + responseInfo: V3QueryResponseInfo, + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V3Response, + maxWeight: Weight, + querier: sts.option(() => V3MultiLocation), + }), + ReceiveTeleportedAsset: sts.array(() => V3MultiAsset), + RefundSurplus: sts.unit(), + ReportError: V3QueryResponseInfo, + ReportHolding: sts.enumStruct({ + responseInfo: V3QueryResponseInfo, + assets: V3MultiAssetFilter, + }), + ReportTransactStatus: V3QueryResponseInfo, + RequestUnlock: sts.enumStruct({ + asset: V3MultiAsset, + locker: V3MultiLocation, + }), + ReserveAssetDeposited: sts.array(() => V3MultiAsset), + SetAppendix: sts.array(() => Type_445), + SetErrorHandler: sts.array(() => Type_445), + SetFeesMode: sts.enumStruct({ + jitWithdraw: sts.boolean(), + }), + SetTopic: sts.bytes(), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: Weight, + }), + Transact: sts.enumStruct({ + originKind: V2OriginKind, + requireWeightAtMost: Weight, + call: Type_442, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + beneficiary: V3MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V3MultiAsset), + dest: V3MultiLocation, + xcm: sts.array(() => V3Instruction), + }), + Trap: sts.bigint(), + UniversalOrigin: V3Junction, + UnlockAsset: sts.enumStruct({ + asset: V3MultiAsset, + target: V3MultiLocation, + }), + UnpaidExecution: sts.enumStruct({ + weightLimit: V3WeightLimit, + checkOrigin: sts.option(() => V3MultiLocation), + }), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V3MultiAsset), + } +}) + +export const Type_442: sts.Type = sts.struct(() => { + return { + encoded: sts.bytes(), + } +}) + +export interface Type_442 { + encoded: Bytes +} + +export type Type_445 = Type_445_AliasOrigin | Type_445_BurnAsset | Type_445_BuyExecution | Type_445_ClaimAsset | Type_445_ClearError | Type_445_ClearOrigin | Type_445_ClearTopic | Type_445_ClearTransactStatus | Type_445_DepositAsset | Type_445_DepositReserveAsset | Type_445_DescendOrigin | Type_445_ExchangeAsset | Type_445_ExpectAsset | Type_445_ExpectError | Type_445_ExpectOrigin | Type_445_ExpectPallet | Type_445_ExpectTransactStatus | Type_445_ExportMessage | Type_445_HrmpChannelAccepted | Type_445_HrmpChannelClosing | Type_445_HrmpNewChannelOpenRequest | Type_445_InitiateReserveWithdraw | Type_445_InitiateTeleport | Type_445_LockAsset | Type_445_NoteUnlockable | Type_445_QueryPallet | Type_445_QueryResponse | Type_445_ReceiveTeleportedAsset | Type_445_RefundSurplus | Type_445_ReportError | Type_445_ReportHolding | Type_445_ReportTransactStatus | Type_445_RequestUnlock | Type_445_ReserveAssetDeposited | Type_445_SetAppendix | Type_445_SetErrorHandler | Type_445_SetFeesMode | Type_445_SetTopic | Type_445_SubscribeVersion | Type_445_Transact | Type_445_TransferAsset | Type_445_TransferReserveAsset | Type_445_Trap | Type_445_UniversalOrigin | Type_445_UnlockAsset | Type_445_UnpaidExecution | Type_445_UnsubscribeVersion | Type_445_WithdrawAsset + +export interface Type_445_AliasOrigin { + __kind: 'AliasOrigin' + value: V3MultiLocation +} + +export interface Type_445_BurnAsset { + __kind: 'BurnAsset' + value: V3MultiAsset[] +} + +export interface Type_445_BuyExecution { + __kind: 'BuyExecution' + fees: V3MultiAsset + weightLimit: V3WeightLimit +} + +export interface Type_445_ClaimAsset { + __kind: 'ClaimAsset' + assets: V3MultiAsset[] + ticket: V3MultiLocation +} + +export interface Type_445_ClearError { + __kind: 'ClearError' +} + +export interface Type_445_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_445_ClearTopic { + __kind: 'ClearTopic' +} + +export interface Type_445_ClearTransactStatus { + __kind: 'ClearTransactStatus' +} + +export interface Type_445_DepositAsset { + __kind: 'DepositAsset' + assets: V3MultiAssetFilter + beneficiary: V3MultiLocation +} + +export interface Type_445_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_445_DescendOrigin { + __kind: 'DescendOrigin' + value: V3Junctions +} + +export interface Type_445_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V3MultiAssetFilter + want: V3MultiAsset[] + maximal: boolean +} + +export interface Type_445_ExpectAsset { + __kind: 'ExpectAsset' + value: V3MultiAsset[] +} + +export interface Type_445_ExpectError { + __kind: 'ExpectError' + value?: ([number, V3Error] | undefined) +} + +export interface Type_445_ExpectOrigin { + __kind: 'ExpectOrigin' + value?: (V3MultiLocation | undefined) +} + +export interface Type_445_ExpectPallet { + __kind: 'ExpectPallet' + index: number + name: Bytes + moduleName: Bytes + crateMajor: number + minCrateMinor: number +} + +export interface Type_445_ExpectTransactStatus { + __kind: 'ExpectTransactStatus' + value: V3MaybeErrorCode +} + +export interface Type_445_ExportMessage { + __kind: 'ExportMessage' + network: V3NetworkId + destination: V3Junctions + xcm: V3Instruction[] +} + +export interface Type_445_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_445_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_445_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_445_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V3MultiAssetFilter + reserve: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_445_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V3MultiAssetFilter + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_445_LockAsset { + __kind: 'LockAsset' + asset: V3MultiAsset + unlocker: V3MultiLocation +} + +export interface Type_445_NoteUnlockable { + __kind: 'NoteUnlockable' + asset: V3MultiAsset + owner: V3MultiLocation +} + +export interface Type_445_QueryPallet { + __kind: 'QueryPallet' + moduleName: Bytes + responseInfo: V3QueryResponseInfo +} + +export interface Type_445_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V3Response + maxWeight: Weight + querier?: (V3MultiLocation | undefined) +} + +export interface Type_445_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V3MultiAsset[] +} + +export interface Type_445_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_445_ReportError { + __kind: 'ReportError' + value: V3QueryResponseInfo +} + +export interface Type_445_ReportHolding { + __kind: 'ReportHolding' + responseInfo: V3QueryResponseInfo + assets: V3MultiAssetFilter +} + +export interface Type_445_ReportTransactStatus { + __kind: 'ReportTransactStatus' + value: V3QueryResponseInfo +} + +export interface Type_445_RequestUnlock { + __kind: 'RequestUnlock' + asset: V3MultiAsset + locker: V3MultiLocation +} + +export interface Type_445_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V3MultiAsset[] +} + +export interface Type_445_SetAppendix { + __kind: 'SetAppendix' + value: Type_445[] +} + +export interface Type_445_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_445[] +} + +export interface Type_445_SetFeesMode { + __kind: 'SetFeesMode' + jitWithdraw: boolean +} + +export interface Type_445_SetTopic { + __kind: 'SetTopic' + value: Bytes +} + +export interface Type_445_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: Weight +} + +export interface Type_445_Transact { + __kind: 'Transact' + originKind: V2OriginKind + requireWeightAtMost: Weight + call: Type_442 +} + +export interface Type_445_TransferAsset { + __kind: 'TransferAsset' + assets: V3MultiAsset[] + beneficiary: V3MultiLocation +} + +export interface Type_445_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V3MultiAsset[] + dest: V3MultiLocation + xcm: V3Instruction[] +} + +export interface Type_445_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_445_UniversalOrigin { + __kind: 'UniversalOrigin' + value: V3Junction +} + +export interface Type_445_UnlockAsset { + __kind: 'UnlockAsset' + asset: V3MultiAsset + target: V3MultiLocation +} + +export interface Type_445_UnpaidExecution { + __kind: 'UnpaidExecution' + weightLimit: V3WeightLimit + checkOrigin?: (V3MultiLocation | undefined) +} + +export interface Type_445_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_445_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V3MultiAsset[] +} + +export const Type_441: sts.Type = sts.closedEnum(() => { + return { + BuyExecution: sts.enumStruct({ + fees: V2MultiAsset, + weightLimit: V2WeightLimit, + }), + ClaimAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + ticket: V2MultiLocation, + }), + ClearError: sts.unit(), + ClearOrigin: sts.unit(), + DepositAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + beneficiary: V2MultiLocation, + }), + DepositReserveAsset: sts.enumStruct({ + assets: V2MultiAssetFilter, + maxAssets: sts.number(), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + DescendOrigin: V2Junctions, + ExchangeAsset: sts.enumStruct({ + give: V2MultiAssetFilter, + receive: sts.array(() => V2MultiAsset), + }), + HrmpChannelAccepted: sts.enumStruct({ + recipient: sts.number(), + }), + HrmpChannelClosing: sts.enumStruct({ + initiator: sts.number(), + sender: sts.number(), + recipient: sts.number(), + }), + HrmpNewChannelOpenRequest: sts.enumStruct({ + sender: sts.number(), + maxMessageSize: sts.number(), + maxCapacity: sts.number(), + }), + InitiateReserveWithdraw: sts.enumStruct({ + assets: V2MultiAssetFilter, + reserve: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + InitiateTeleport: sts.enumStruct({ + assets: V2MultiAssetFilter, + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + QueryHolding: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + assets: V2MultiAssetFilter, + maxResponseWeight: sts.bigint(), + }), + QueryResponse: sts.enumStruct({ + queryId: sts.bigint(), + response: V2Response, + maxWeight: sts.bigint(), + }), + ReceiveTeleportedAsset: sts.array(() => V2MultiAsset), + RefundSurplus: sts.unit(), + ReportError: sts.enumStruct({ + queryId: sts.bigint(), + dest: V2MultiLocation, + maxResponseWeight: sts.bigint(), + }), + ReserveAssetDeposited: sts.array(() => V2MultiAsset), + SetAppendix: sts.array(() => Type_441), + SetErrorHandler: sts.array(() => Type_441), + SubscribeVersion: sts.enumStruct({ + queryId: sts.bigint(), + maxResponseWeight: sts.bigint(), + }), + Transact: sts.enumStruct({ + originType: V2OriginKind, + requireWeightAtMost: sts.bigint(), + call: Type_442, + }), + TransferAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + beneficiary: V2MultiLocation, + }), + TransferReserveAsset: sts.enumStruct({ + assets: sts.array(() => V2MultiAsset), + dest: V2MultiLocation, + xcm: sts.array(() => V2Instruction), + }), + Trap: sts.bigint(), + UnsubscribeVersion: sts.unit(), + WithdrawAsset: sts.array(() => V2MultiAsset), + } +}) + +export type Type_441 = Type_441_BuyExecution | Type_441_ClaimAsset | Type_441_ClearError | Type_441_ClearOrigin | Type_441_DepositAsset | Type_441_DepositReserveAsset | Type_441_DescendOrigin | Type_441_ExchangeAsset | Type_441_HrmpChannelAccepted | Type_441_HrmpChannelClosing | Type_441_HrmpNewChannelOpenRequest | Type_441_InitiateReserveWithdraw | Type_441_InitiateTeleport | Type_441_QueryHolding | Type_441_QueryResponse | Type_441_ReceiveTeleportedAsset | Type_441_RefundSurplus | Type_441_ReportError | Type_441_ReserveAssetDeposited | Type_441_SetAppendix | Type_441_SetErrorHandler | Type_441_SubscribeVersion | Type_441_Transact | Type_441_TransferAsset | Type_441_TransferReserveAsset | Type_441_Trap | Type_441_UnsubscribeVersion | Type_441_WithdrawAsset + +export interface Type_441_BuyExecution { + __kind: 'BuyExecution' + fees: V2MultiAsset + weightLimit: V2WeightLimit +} + +export interface Type_441_ClaimAsset { + __kind: 'ClaimAsset' + assets: V2MultiAsset[] + ticket: V2MultiLocation +} + +export interface Type_441_ClearError { + __kind: 'ClearError' +} + +export interface Type_441_ClearOrigin { + __kind: 'ClearOrigin' +} + +export interface Type_441_DepositAsset { + __kind: 'DepositAsset' + assets: V2MultiAssetFilter + maxAssets: number + beneficiary: V2MultiLocation +} + +export interface Type_441_DepositReserveAsset { + __kind: 'DepositReserveAsset' + assets: V2MultiAssetFilter + maxAssets: number + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_441_DescendOrigin { + __kind: 'DescendOrigin' + value: V2Junctions +} + +export interface Type_441_ExchangeAsset { + __kind: 'ExchangeAsset' + give: V2MultiAssetFilter + receive: V2MultiAsset[] +} + +export interface Type_441_HrmpChannelAccepted { + __kind: 'HrmpChannelAccepted' + recipient: number +} + +export interface Type_441_HrmpChannelClosing { + __kind: 'HrmpChannelClosing' + initiator: number + sender: number + recipient: number +} + +export interface Type_441_HrmpNewChannelOpenRequest { + __kind: 'HrmpNewChannelOpenRequest' + sender: number + maxMessageSize: number + maxCapacity: number +} + +export interface Type_441_InitiateReserveWithdraw { + __kind: 'InitiateReserveWithdraw' + assets: V2MultiAssetFilter + reserve: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_441_InitiateTeleport { + __kind: 'InitiateTeleport' + assets: V2MultiAssetFilter + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_441_QueryHolding { + __kind: 'QueryHolding' + queryId: bigint + dest: V2MultiLocation + assets: V2MultiAssetFilter + maxResponseWeight: bigint +} + +export interface Type_441_QueryResponse { + __kind: 'QueryResponse' + queryId: bigint + response: V2Response + maxWeight: bigint +} + +export interface Type_441_ReceiveTeleportedAsset { + __kind: 'ReceiveTeleportedAsset' + value: V2MultiAsset[] +} + +export interface Type_441_RefundSurplus { + __kind: 'RefundSurplus' +} + +export interface Type_441_ReportError { + __kind: 'ReportError' + queryId: bigint + dest: V2MultiLocation + maxResponseWeight: bigint +} + +export interface Type_441_ReserveAssetDeposited { + __kind: 'ReserveAssetDeposited' + value: V2MultiAsset[] +} + +export interface Type_441_SetAppendix { + __kind: 'SetAppendix' + value: Type_441[] +} + +export interface Type_441_SetErrorHandler { + __kind: 'SetErrorHandler' + value: Type_441[] +} + +export interface Type_441_SubscribeVersion { + __kind: 'SubscribeVersion' + queryId: bigint + maxResponseWeight: bigint +} + +export interface Type_441_Transact { + __kind: 'Transact' + originType: V2OriginKind + requireWeightAtMost: bigint + call: Type_442 +} + +export interface Type_441_TransferAsset { + __kind: 'TransferAsset' + assets: V2MultiAsset[] + beneficiary: V2MultiLocation +} + +export interface Type_441_TransferReserveAsset { + __kind: 'TransferReserveAsset' + assets: V2MultiAsset[] + dest: V2MultiLocation + xcm: V2Instruction[] +} + +export interface Type_441_Trap { + __kind: 'Trap' + value: bigint +} + +export interface Type_441_UnsubscribeVersion { + __kind: 'UnsubscribeVersion' +} + +export interface Type_441_WithdrawAsset { + __kind: 'WithdrawAsset' + value: V2MultiAsset[] +} + +export type Type_438 = Type_438_V2 | Type_438_V3 + +export interface Type_438_V2 { + __kind: 'V2' + value: Type_441[] +} + +export interface Type_438_V3 { + __kind: 'V3' + value: Type_445[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type XcmPalletCall = XcmPalletCall_execute | XcmPalletCall_force_default_xcm_version | XcmPalletCall_force_subscribe_version_notify | XcmPalletCall_force_suspension | XcmPalletCall_force_unsubscribe_version_notify | XcmPalletCall_force_xcm_version | XcmPalletCall_limited_reserve_transfer_assets | XcmPalletCall_limited_teleport_assets | XcmPalletCall_reserve_transfer_assets | XcmPalletCall_send | XcmPalletCall_teleport_assets + +/** + * Execute an XCM message from a local, signed, origin. + * + * An event is deposited indicating whether `msg` could be executed completely or only + * partially. + * + * No more than `max_weight` will be used in its attempted execution. If this is less than the + * maximum amount of weight that the message could take to be executed, then no execution + * attempt will be made. + * + * NOTE: A successful return to this does *not* imply that the `msg` was executed successfully + * to completion; only that *some* of it was executed. + */ +export interface XcmPalletCall_execute { + __kind: 'execute' + message: Type_438 + maxWeight: Weight +} + +/** + * Set a safe XCM version (the version that XCM should be encoded with if the most recent + * version a destination can accept is unknown). + * + * - `origin`: Must be an origin specified by AdminOrigin. + * - `maybe_xcm_version`: The default XCM encoding version, or `None` to disable. + */ +export interface XcmPalletCall_force_default_xcm_version { + __kind: 'force_default_xcm_version' + maybeXcmVersion?: (number | undefined) +} + +/** + * Ask a location to notify us regarding their XCM version and any changes to it. + * + * - `origin`: Must be an origin specified by AdminOrigin. + * - `location`: The location to which we should subscribe for XCM version notifications. + */ +export interface XcmPalletCall_force_subscribe_version_notify { + __kind: 'force_subscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Set or unset the global suspension state of the XCM executor. + * + * - `origin`: Must be an origin specified by AdminOrigin. + * - `suspended`: `true` to suspend, `false` to resume. + */ +export interface XcmPalletCall_force_suspension { + __kind: 'force_suspension' + suspended: boolean +} + +/** + * Require that a particular destination should no longer notify us regarding any XCM + * version changes. + * + * - `origin`: Must be an origin specified by AdminOrigin. + * - `location`: The location to which we are currently subscribed for XCM version + * notifications which we no longer desire. + */ +export interface XcmPalletCall_force_unsubscribe_version_notify { + __kind: 'force_unsubscribe_version_notify' + location: VersionedMultiLocation +} + +/** + * Extoll that a particular destination can be communicated with through a particular + * version of XCM. + * + * - `origin`: Must be an origin specified by AdminOrigin. + * - `location`: The destination that is being described. + * - `xcm_version`: The latest version of XCM that `location` supports. + */ +export interface XcmPalletCall_force_xcm_version { + __kind: 'force_xcm_version' + location: V3MultiLocation + xcmVersion: number +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination + * chain and forward a notification XCM. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight + * is needed than `weight_limit`, then the operation will fail and the assets send may be + * at risk. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_reserve_transfer_assets { + __kind: 'limited_reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V3WeightLimit +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight + * is needed than `weight_limit`, then the operation will fail and the assets send may be + * at risk. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + */ +export interface XcmPalletCall_limited_teleport_assets { + __kind: 'limited_teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number + weightLimit: V3WeightLimit +} + +/** + * Transfer some assets from the local chain to the sovereign account of a destination + * chain and forward a notification XCM. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, + * with all fees taken as needed from the asset. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the + * `dest` side. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_reserve_transfer_assets { + __kind: 'reserve_transfer_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +export interface XcmPalletCall_send { + __kind: 'send' + dest: VersionedMultiLocation + message: VersionedXcm +} + +/** + * Teleport some assets from the local chain to some destination chain. + * + * Fee payment on the destination side is made from the asset in the `assets` vector of + * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, + * with all fees taken as needed from the asset. + * + * - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send + * from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + * - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be + * an `AccountId32` value. + * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the + * `dest` side. May not be empty. + * - `fee_asset_item`: The index into `assets` of the item which should be used to pay + * fees. + */ +export interface XcmPalletCall_teleport_assets { + __kind: 'teleport_assets' + dest: VersionedMultiLocation + beneficiary: VersionedMultiLocation + assets: VersionedMultiAssets + feeAssetItem: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const WhitelistCall: sts.Type = sts.closedEnum(() => { + return { + dispatch_whitelisted_call: sts.enumStruct({ + callHash: H256, + callEncodedLen: sts.number(), + callWeightWitness: Weight, + }), + dispatch_whitelisted_call_with_preimage: sts.enumStruct({ + call: Call, + }), + remove_whitelisted_call: sts.enumStruct({ + callHash: H256, + }), + whitelist_call: sts.enumStruct({ + callHash: H256, + }), + } +}) + +export const H256 = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type WhitelistCall = WhitelistCall_dispatch_whitelisted_call | WhitelistCall_dispatch_whitelisted_call_with_preimage | WhitelistCall_remove_whitelisted_call | WhitelistCall_whitelist_call + +export interface WhitelistCall_dispatch_whitelisted_call { + __kind: 'dispatch_whitelisted_call' + callHash: H256 + callEncodedLen: number + callWeightWitness: Weight +} + +export interface WhitelistCall_dispatch_whitelisted_call_with_preimage { + __kind: 'dispatch_whitelisted_call_with_preimage' + call: Call +} + +export interface WhitelistCall_remove_whitelisted_call { + __kind: 'remove_whitelisted_call' + callHash: H256 +} + +export interface WhitelistCall_whitelist_call { + __kind: 'whitelist_call' + callHash: H256 +} + +export type H256 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VoterListCall: sts.Type = sts.closedEnum(() => { + return { + put_in_front_of: sts.enumStruct({ + lighter: MultiAddress, + }), + rebag: sts.enumStruct({ + dislocated: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VoterListCall = VoterListCall_put_in_front_of | VoterListCall_rebag + +/** + * Move the caller's Id directly in front of `lighter`. + * + * The dispatch origin for this call must be _Signed_ and can only be called by the Id of + * the account going in front of `lighter`. + * + * Only works if + * - both nodes are within the same bag, + * - and `origin` has a greater `Score` than `lighter`. + */ +export interface VoterListCall_put_in_front_of { + __kind: 'put_in_front_of' + lighter: MultiAddress +} + +/** + * Declare that some `dislocated` account has, through rewards or penalties, sufficiently + * changed its score that it should properly fall into a different bag than its current + * one. + * + * Anyone can call this function about any potentially dislocated account. + * + * Will always update the stored score of `dislocated` to the correct score, based on + * `ScoreProvider`. + * + * If `dislocated` does not exists, it returns an error. + */ +export interface VoterListCall_rebag { + __kind: 'rebag' + dislocated: MultiAddress +} + +export type MultiAddress = MultiAddress_Address20 | MultiAddress_Address32 | MultiAddress_Id | MultiAddress_Index | MultiAddress_Raw + +export interface MultiAddress_Address20 { + __kind: 'Address20' + value: Bytes +} + +export interface MultiAddress_Address32 { + __kind: 'Address32' + value: Bytes +} + +export interface MultiAddress_Id { + __kind: 'Id' + value: AccountId32 +} + +export interface MultiAddress_Index { + __kind: 'Index' +} + +export interface MultiAddress_Raw { + __kind: 'Raw' + value: Bytes +} + +export type AccountId32 = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const VestingCall: sts.Type = sts.closedEnum(() => { + return { + force_vested_transfer: sts.enumStruct({ + source: MultiAddress, + target: MultiAddress, + schedule: VestingInfo, + }), + merge_schedules: sts.enumStruct({ + schedule1Index: sts.number(), + schedule2Index: sts.number(), + }), + vest: sts.unit(), + vest_other: sts.enumStruct({ + target: MultiAddress, + }), + vested_transfer: sts.enumStruct({ + target: MultiAddress, + schedule: VestingInfo, + }), + } +}) + +export const VestingInfo: sts.Type = sts.struct(() => { + return { + locked: sts.bigint(), + perBlock: sts.bigint(), + startingBlock: sts.number(), + } +}) + +export interface VestingInfo { + locked: bigint + perBlock: bigint + startingBlock: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type VestingCall = VestingCall_force_vested_transfer | VestingCall_merge_schedules | VestingCall_vest | VestingCall_vest_other | VestingCall_vested_transfer + +/** + * Force a vested transfer. + * + * The dispatch origin for this call must be _Root_. + * + * - `source`: The account whose funds should be transferred. + * - `target`: The account that should be transferred the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * ## Complexity + * - `O(1)`. + */ +export interface VestingCall_force_vested_transfer { + __kind: 'force_vested_transfer' + source: MultiAddress + target: MultiAddress + schedule: VestingInfo +} + +/** + * Merge two vesting schedules together, creating a new vesting schedule that unlocks over + * the highest possible start and end blocks. If both schedules have already started the + * current block will be used as the schedule start; with the caveat that if one schedule + * is finished by the current block, the other will be treated as the new merged schedule, + * unmodified. + * + * NOTE: If `schedule1_index == schedule2_index` this is a no-op. + * NOTE: This will unlock all schedules through the current block prior to merging. + * NOTE: If both schedules have ended by the current block, no new schedule will be created + * and both will be removed. + * + * Merged schedule attributes: + * - `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block, + * current_block)`. + * - `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`. + * - `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`. + * + * The dispatch origin for this call must be _Signed_. + * + * - `schedule1_index`: index of the first schedule to merge. + * - `schedule2_index`: index of the second schedule to merge. + */ +export interface VestingCall_merge_schedules { + __kind: 'merge_schedules' + schedule1Index: number + schedule2Index: number +} + +/** + * Unlock any vested funds of the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * ## Complexity + * - `O(1)`. + */ +export interface VestingCall_vest { + __kind: 'vest' +} + +/** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * ## Complexity + * - `O(1)`. + */ +export interface VestingCall_vest_other { + __kind: 'vest_other' + target: MultiAddress +} + +/** + * Create a vested transfer. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account receiving the vested funds. + * - `schedule`: The vesting schedule attached to the transfer. + * + * Emits `VestingCreated`. + * + * NOTE: This will unlock all schedules through the current block. + * + * ## Complexity + * - `O(1)`. + */ +export interface VestingCall_vested_transfer { + __kind: 'vested_transfer' + target: MultiAddress + schedule: VestingInfo +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const UtilityCall: sts.Type = sts.closedEnum(() => { + return { + as_derivative: sts.enumStruct({ + index: sts.number(), + call: Call, + }), + batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + batch_all: sts.enumStruct({ + calls: sts.array(() => Call), + }), + dispatch_as: sts.enumStruct({ + asOrigin: OriginCaller, + call: Call, + }), + force_batch: sts.enumStruct({ + calls: sts.array(() => Call), + }), + with_weight: sts.enumStruct({ + call: Call, + weight: Weight, + }), + } +}) + +export const OriginCaller: sts.Type = sts.closedEnum(() => { + return { + Origins: Origin, + ParachainsOrigin: Type_130, + Void: Void, + XcmPallet: Type_132, + system: RawOrigin, + } +}) + +export const RawOrigin: sts.Type = sts.closedEnum(() => { + return { + None: sts.unit(), + Root: sts.unit(), + Signed: AccountId32, + } +}) + +export type RawOrigin = RawOrigin_None | RawOrigin_Root | RawOrigin_Signed + +export interface RawOrigin_None { + __kind: 'None' +} + +export interface RawOrigin_Root { + __kind: 'Root' +} + +export interface RawOrigin_Signed { + __kind: 'Signed' + value: AccountId32 +} + +export const Type_132: sts.Type = sts.closedEnum(() => { + return { + Response: V3MultiLocation, + Xcm: V3MultiLocation, + } +}) + +export type Type_132 = Type_132_Response | Type_132_Xcm + +export interface Type_132_Response { + __kind: 'Response' + value: V3MultiLocation +} + +export interface Type_132_Xcm { + __kind: 'Xcm' + value: V3MultiLocation +} + +export const Void: sts.Type = sts.closedEnum(() => { + return { + } +}) + +export type Void = never + +export const Type_130: sts.Type = sts.closedEnum(() => { + return { + Parachain: Id, + } +}) + +export const Id = sts.number() + +export type Type_130 = Type_130_Parachain + +export interface Type_130_Parachain { + __kind: 'Parachain' + value: Id +} + +export type Id = number + +export const Origin: sts.Type = sts.closedEnum(() => { + return { + AuctionAdmin: sts.unit(), + BigSpender: sts.unit(), + BigTipper: sts.unit(), + Fellows: sts.unit(), + Fellowship1Dan: sts.unit(), + Fellowship2Dan: sts.unit(), + Fellowship3Dan: sts.unit(), + Fellowship4Dan: sts.unit(), + Fellowship5Dan: sts.unit(), + Fellowship6Dan: sts.unit(), + Fellowship7Dan: sts.unit(), + Fellowship8Dan: sts.unit(), + Fellowship9Dan: sts.unit(), + FellowshipAdmin: sts.unit(), + FellowshipExperts: sts.unit(), + FellowshipInitiates: sts.unit(), + FellowshipMasters: sts.unit(), + GeneralAdmin: sts.unit(), + LeaseAdmin: sts.unit(), + MediumSpender: sts.unit(), + ReferendumCanceller: sts.unit(), + ReferendumKiller: sts.unit(), + SmallSpender: sts.unit(), + SmallTipper: sts.unit(), + StakingAdmin: sts.unit(), + Treasurer: sts.unit(), + WhitelistedCaller: sts.unit(), + } +}) + +export type Origin = Origin_AuctionAdmin | Origin_BigSpender | Origin_BigTipper | Origin_Fellows | Origin_Fellowship1Dan | Origin_Fellowship2Dan | Origin_Fellowship3Dan | Origin_Fellowship4Dan | Origin_Fellowship5Dan | Origin_Fellowship6Dan | Origin_Fellowship7Dan | Origin_Fellowship8Dan | Origin_Fellowship9Dan | Origin_FellowshipAdmin | Origin_FellowshipExperts | Origin_FellowshipInitiates | Origin_FellowshipMasters | Origin_GeneralAdmin | Origin_LeaseAdmin | Origin_MediumSpender | Origin_ReferendumCanceller | Origin_ReferendumKiller | Origin_SmallSpender | Origin_SmallTipper | Origin_StakingAdmin | Origin_Treasurer | Origin_WhitelistedCaller + +export interface Origin_AuctionAdmin { + __kind: 'AuctionAdmin' +} + +export interface Origin_BigSpender { + __kind: 'BigSpender' +} + +export interface Origin_BigTipper { + __kind: 'BigTipper' +} + +export interface Origin_Fellows { + __kind: 'Fellows' +} + +export interface Origin_Fellowship1Dan { + __kind: 'Fellowship1Dan' +} + +export interface Origin_Fellowship2Dan { + __kind: 'Fellowship2Dan' +} + +export interface Origin_Fellowship3Dan { + __kind: 'Fellowship3Dan' +} + +export interface Origin_Fellowship4Dan { + __kind: 'Fellowship4Dan' +} + +export interface Origin_Fellowship5Dan { + __kind: 'Fellowship5Dan' +} + +export interface Origin_Fellowship6Dan { + __kind: 'Fellowship6Dan' +} + +export interface Origin_Fellowship7Dan { + __kind: 'Fellowship7Dan' +} + +export interface Origin_Fellowship8Dan { + __kind: 'Fellowship8Dan' +} + +export interface Origin_Fellowship9Dan { + __kind: 'Fellowship9Dan' +} + +export interface Origin_FellowshipAdmin { + __kind: 'FellowshipAdmin' +} + +export interface Origin_FellowshipExperts { + __kind: 'FellowshipExperts' +} + +export interface Origin_FellowshipInitiates { + __kind: 'FellowshipInitiates' +} + +export interface Origin_FellowshipMasters { + __kind: 'FellowshipMasters' +} + +export interface Origin_GeneralAdmin { + __kind: 'GeneralAdmin' +} + +export interface Origin_LeaseAdmin { + __kind: 'LeaseAdmin' +} + +export interface Origin_MediumSpender { + __kind: 'MediumSpender' +} + +export interface Origin_ReferendumCanceller { + __kind: 'ReferendumCanceller' +} + +export interface Origin_ReferendumKiller { + __kind: 'ReferendumKiller' +} + +export interface Origin_SmallSpender { + __kind: 'SmallSpender' +} + +export interface Origin_SmallTipper { + __kind: 'SmallTipper' +} + +export interface Origin_StakingAdmin { + __kind: 'StakingAdmin' +} + +export interface Origin_Treasurer { + __kind: 'Treasurer' +} + +export interface Origin_WhitelistedCaller { + __kind: 'WhitelistedCaller' +} + +export type OriginCaller = OriginCaller_Origins | OriginCaller_ParachainsOrigin | OriginCaller_Void | OriginCaller_XcmPallet | OriginCaller_system + +export interface OriginCaller_Origins { + __kind: 'Origins' + value: Origin +} + +export interface OriginCaller_ParachainsOrigin { + __kind: 'ParachainsOrigin' + value: Type_130 +} + +export interface OriginCaller_Void { + __kind: 'Void' + value: Void +} + +export interface OriginCaller_XcmPallet { + __kind: 'XcmPallet' + value: Type_132 +} + +export interface OriginCaller_system { + __kind: 'system' + value: RawOrigin +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type UtilityCall = UtilityCall_as_derivative | UtilityCall_batch | UtilityCall_batch_all | UtilityCall_dispatch_as | UtilityCall_force_batch | UtilityCall_with_weight + +/** + * Send a call through an indexed pseudonym of the sender. + * + * Filter from origin are passed along. The call will be dispatched with an origin which + * use the same filter as the origin of this call. + * + * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. + * because you expect `proxy` to have been used prior in the call stack and you do not want + * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` + * in the Multisig pallet instead. + * + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. + */ +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Call +} + +/** + * Send a batch of dispatch calls. + * + * May be called from any origin except `None`. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then the calls are dispatched without checking origin filter. (This + * includes bypassing `frame_system::Config::BaseCallFilter`). + * + * ## Complexity + * - O(C) where C is the number of calls to be batched. + * + * This will return `Ok` in all circumstances. To determine the success of the batch, an + * event is deposited. If a call failed and the batch was interrupted, then the + * `BatchInterrupted` event is deposited, along with the number of successful calls made + * and the error of the failed call. If all were successful, then the `BatchCompleted` + * event is deposited. + */ +export interface UtilityCall_batch { + __kind: 'batch' + calls: Call[] +} + +/** + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. + * + * May be called from any origin except `None`. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then the calls are dispatched without checking origin filter. (This + * includes bypassing `frame_system::Config::BaseCallFilter`). + * + * ## Complexity + * - O(C) where C is the number of calls to be batched. + */ +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Call[] +} + +/** + * Dispatches a function call with a provided origin. + * + * The dispatch origin for this call must be _Root_. + * + * ## Complexity + * - O(1). + */ +export interface UtilityCall_dispatch_as { + __kind: 'dispatch_as' + asOrigin: OriginCaller + call: Call +} + +/** + * Send a batch of dispatch calls. + * Unlike `batch`, it allows errors and won't interrupt. + * + * May be called from any origin except `None`. + * + * - `calls`: The calls to be dispatched from the same origin. The number of call must not + * exceed the constant: `batched_calls_limit` (available in constant metadata). + * + * If origin is root then the calls are dispatch without checking origin filter. (This + * includes bypassing `frame_system::Config::BaseCallFilter`). + * + * ## Complexity + * - O(C) where C is the number of calls to be batched. + */ +export interface UtilityCall_force_batch { + __kind: 'force_batch' + calls: Call[] +} + +/** + * Dispatch a function call with a specified weight. + * + * This function does not check the weight of the call, and instead allows the + * Root origin to specify the weight of the call. + * + * The dispatch origin for this call must be _Root_. + */ +export interface UtilityCall_with_weight { + __kind: 'with_weight' + call: Call + weight: Weight +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TreasuryCall: sts.Type = sts.closedEnum(() => { + return { + approve_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + propose_spend: sts.enumStruct({ + value: sts.bigint(), + beneficiary: MultiAddress, + }), + reject_proposal: sts.enumStruct({ + proposalId: sts.number(), + }), + remove_approval: sts.enumStruct({ + proposalId: sts.number(), + }), + spend: sts.enumStruct({ + amount: sts.bigint(), + beneficiary: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TreasuryCall = TreasuryCall_approve_proposal | TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_remove_approval | TreasuryCall_spend + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. + * + * May only be called from `T::ApproveOrigin`. + * + * ## Complexity + * - O(1). + */ +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number +} + +/** + * Put forward a suggestion for spending. A deposit proportional to the value + * is reserved and slashed if the proposal is rejected. It is returned once the + * proposal is awarded. + * + * ## Complexity + * - O(1) + */ +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: MultiAddress +} + +/** + * Reject a proposed spend. The original deposit will be slashed. + * + * May only be called from `T::RejectOrigin`. + * + * ## Complexity + * - O(1) + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Force a previously approved proposal to be removed from the approval queue. + * The original deposit will no longer be returned. + * + * May only be called from `T::RejectOrigin`. + * - `proposal_id`: The index of a proposal + * + * ## Complexity + * - O(A) where `A` is the number of approvals + * + * Errors: + * - `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue, + * i.e., the proposal has not been approved. This could also mean the proposal does not + * exist altogether, thus there is no way it would have been approved in the first place. + */ +export interface TreasuryCall_remove_approval { + __kind: 'remove_approval' + proposalId: number +} + +/** + * Propose and approve a spend of treasury funds. + * + * - `origin`: Must be `SpendOrigin` with the `Success` value being at least `amount`. + * - `amount`: The amount to be transferred from the treasury to the `beneficiary`. + * - `beneficiary`: The destination account for the transfer. + * + * NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the + * beneficiary. + */ +export interface TreasuryCall_spend { + __kind: 'spend' + amount: bigint + beneficiary: MultiAddress +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const TimestampCall: sts.Type = sts.closedEnum(() => { + return { + set: sts.enumStruct({ + now: sts.bigint(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type TimestampCall = TimestampCall_set + +/** + * Set the current time. + * + * This call should be invoked exactly once per block. It will panic at the finalization + * phase, if this call hasn't been invoked by that time. + * + * The timestamp should be greater than the previous one by the amount specified by + * `MinimumPeriod`. + * + * The dispatch origin for this call must be `Inherent`. + * + * ## Complexity + * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in + * `on_finalize`) + * - 1 event handler `on_timestamp_set`. Must be `O(1)`. + */ +export interface TimestampCall_set { + __kind: 'set' + now: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SystemCall: sts.Type = sts.closedEnum(() => { + return { + kill_prefix: sts.enumStruct({ + prefix: sts.bytes(), + subkeys: sts.number(), + }), + kill_storage: sts.enumStruct({ + keys: sts.array(() => sts.bytes()), + }), + remark: sts.enumStruct({ + remark: sts.bytes(), + }), + remark_with_event: sts.enumStruct({ + remark: sts.bytes(), + }), + set_code: sts.enumStruct({ + code: sts.bytes(), + }), + set_code_without_checks: sts.enumStruct({ + code: sts.bytes(), + }), + set_heap_pages: sts.enumStruct({ + pages: sts.bigint(), + }), + set_storage: sts.enumStruct({ + items: sts.array(() => sts.tuple(() => [sts.bytes(), sts.bytes()])), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SystemCall = SystemCall_kill_prefix | SystemCall_kill_storage | SystemCall_remark | SystemCall_remark_with_event | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_heap_pages | SystemCall_set_storage + +/** + * Kill all storage items with a key that starts with the given prefix. + * + * **NOTE:** We rely on the Root origin to provide us the number of subkeys under + * the prefix we are removing to accurately calculate the weight of this function. + */ +export interface SystemCall_kill_prefix { + __kind: 'kill_prefix' + prefix: Bytes + subkeys: number +} + +/** + * Kill some items from storage. + */ +export interface SystemCall_kill_storage { + __kind: 'kill_storage' + keys: Bytes[] +} + +/** + * Make some on-chain remark. + * + * - `O(1)` + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Bytes +} + +/** + * Make some on-chain remark and emit event. + */ +export interface SystemCall_remark_with_event { + __kind: 'remark_with_event' + remark: Bytes +} + +/** + * Set the new runtime code. + */ +export interface SystemCall_set_code { + __kind: 'set_code' + code: Bytes +} + +/** + * Set the new runtime code without doing any checks of the given `code`. + */ +export interface SystemCall_set_code_without_checks { + __kind: 'set_code_without_checks' + code: Bytes +} + +/** + * Set the number of pages in the WebAssembly environment's heap. + */ +export interface SystemCall_set_heap_pages { + __kind: 'set_heap_pages' + pages: bigint +} + +/** + * Set some items of storage. + */ +export interface SystemCall_set_storage { + __kind: 'set_storage' + items: [Bytes, Bytes][] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const StakingCall: sts.Type = sts.closedEnum(() => { + return { + bond: sts.enumStruct({ + value: sts.bigint(), + payee: RewardDestination, + }), + bond_extra: sts.enumStruct({ + maxAdditional: sts.bigint(), + }), + cancel_deferred_slash: sts.enumStruct({ + era: sts.number(), + slashIndices: sts.array(() => sts.number()), + }), + chill: sts.unit(), + chill_other: sts.enumStruct({ + controller: AccountId32, + }), + force_apply_min_commission: sts.enumStruct({ + validatorStash: AccountId32, + }), + force_new_era: sts.unit(), + force_new_era_always: sts.unit(), + force_no_eras: sts.unit(), + force_unstake: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + increase_validator_count: sts.enumStruct({ + additional: sts.number(), + }), + kick: sts.enumStruct({ + who: sts.array(() => MultiAddress), + }), + nominate: sts.enumStruct({ + targets: sts.array(() => MultiAddress), + }), + payout_stakers: sts.enumStruct({ + validatorStash: AccountId32, + era: sts.number(), + }), + reap_stash: sts.enumStruct({ + stash: AccountId32, + numSlashingSpans: sts.number(), + }), + rebond: sts.enumStruct({ + value: sts.bigint(), + }), + scale_validator_count: sts.enumStruct({ + factor: Percent, + }), + set_controller: sts.unit(), + set_invulnerables: sts.enumStruct({ + invulnerables: sts.array(() => AccountId32), + }), + set_min_commission: sts.enumStruct({ + new: Perbill, + }), + set_payee: sts.enumStruct({ + payee: RewardDestination, + }), + set_staking_configs: sts.enumStruct({ + minNominatorBond: ConfigOp, + minValidatorBond: ConfigOp, + maxNominatorCount: Type_92, + maxValidatorCount: Type_92, + chillThreshold: Type_93, + minCommission: Type_94, + }), + set_validator_count: sts.enumStruct({ + new: sts.number(), + }), + unbond: sts.enumStruct({ + value: sts.bigint(), + }), + validate: sts.enumStruct({ + prefs: ValidatorPrefs, + }), + withdraw_unbonded: sts.enumStruct({ + numSlashingSpans: sts.number(), + }), + } +}) + +export const ValidatorPrefs: sts.Type = sts.struct(() => { + return { + commission: sts.number(), + blocked: sts.boolean(), + } +}) + +export interface ValidatorPrefs { + commission: number + blocked: boolean +} + +export const Type_94: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export type Type_94 = Type_94_Noop | Type_94_Remove | Type_94_Set + +export interface Type_94_Noop { + __kind: 'Noop' +} + +export interface Type_94_Remove { + __kind: 'Remove' +} + +export interface Type_94_Set { + __kind: 'Set' + value: Perbill +} + +export type Perbill = number + +export const Type_93: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Percent, + } +}) + +export type Type_93 = Type_93_Noop | Type_93_Remove | Type_93_Set + +export interface Type_93_Noop { + __kind: 'Noop' +} + +export interface Type_93_Remove { + __kind: 'Remove' +} + +export interface Type_93_Set { + __kind: 'Set' + value: Percent +} + +export type Percent = number + +export const Type_92: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_92 = Type_92_Noop | Type_92_Remove | Type_92_Set + +export interface Type_92_Noop { + __kind: 'Noop' +} + +export interface Type_92_Remove { + __kind: 'Remove' +} + +export interface Type_92_Set { + __kind: 'Set' + value: number +} + +export const ConfigOp: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type ConfigOp = ConfigOp_Noop | ConfigOp_Remove | ConfigOp_Set + +export interface ConfigOp_Noop { + __kind: 'Noop' +} + +export interface ConfigOp_Remove { + __kind: 'Remove' +} + +export interface ConfigOp_Set { + __kind: 'Set' + value: bigint +} + +export const Perbill = sts.number() + +export const Percent = sts.number() + +export const RewardDestination: sts.Type = sts.closedEnum(() => { + return { + Account: AccountId32, + Controller: sts.unit(), + None: sts.unit(), + Staked: sts.unit(), + Stash: sts.unit(), + } +}) + +export type RewardDestination = RewardDestination_Account | RewardDestination_Controller | RewardDestination_None | RewardDestination_Staked | RewardDestination_Stash + +export interface RewardDestination_Account { + __kind: 'Account' + value: AccountId32 +} + +export interface RewardDestination_Controller { + __kind: 'Controller' +} + +export interface RewardDestination_None { + __kind: 'None' +} + +export interface RewardDestination_Staked { + __kind: 'Staked' +} + +export interface RewardDestination_Stash { + __kind: 'Stash' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type StakingCall = StakingCall_bond | StakingCall_bond_extra | StakingCall_cancel_deferred_slash | StakingCall_chill | StakingCall_chill_other | StakingCall_force_apply_min_commission | StakingCall_force_new_era | StakingCall_force_new_era_always | StakingCall_force_no_eras | StakingCall_force_unstake | StakingCall_increase_validator_count | StakingCall_kick | StakingCall_nominate | StakingCall_payout_stakers | StakingCall_reap_stash | StakingCall_rebond | StakingCall_scale_validator_count | StakingCall_set_controller | StakingCall_set_invulnerables | StakingCall_set_min_commission | StakingCall_set_payee | StakingCall_set_staking_configs | StakingCall_set_validator_count | StakingCall_unbond | StakingCall_validate | StakingCall_withdraw_unbonded + +/** + * Take the origin account as a stash and lock up `value` of its balance. `controller` will + * be the account that controls it. + * + * `value` must be more than the `minimum_balance` specified by `T::Currency`. + * + * The dispatch origin for this call must be _Signed_ by the stash account. + * + * Emits `Bonded`. + * ## Complexity + * - Independent of the arguments. Moderate complexity. + * - O(1). + * - Three extra DB entries. + * + * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned + * unless the `origin` falls below _existential deposit_ and gets removed as dust. + */ +export interface StakingCall_bond { + __kind: 'bond' + value: bigint + payee: RewardDestination +} + +/** + * Add some extra amount that have appeared in the stash `free_balance` into the balance up + * for staking. + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * Use this if there are additional funds in your stash account that you wish to bond. + * Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose + * any limitation on the amount that can be added. + * + * Emits `Bonded`. + * + * ## Complexity + * - Independent of the arguments. Insignificant complexity. + * - O(1). + */ +export interface StakingCall_bond_extra { + __kind: 'bond_extra' + maxAdditional: bigint +} + +/** + * Cancel enactment of a deferred slash. + * + * Can be called by the `T::AdminOrigin`. + * + * Parameters: era and indices of the slashes for that era to kill. + */ +export interface StakingCall_cancel_deferred_slash { + __kind: 'cancel_deferred_slash' + era: number + slashIndices: number[] +} + +/** + * Declare no desire to either validate or nominate. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * ## Complexity + * - Independent of the arguments. Insignificant complexity. + * - Contains one read. + * - Writes are limited to the `origin` account key. + */ +export interface StakingCall_chill { + __kind: 'chill' +} + +/** + * Declare a `controller` to stop participating as either a validator or nominator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_, but can be called by anyone. + * + * If the caller is the same as the controller being targeted, then no further checks are + * enforced, and this function behaves just like `chill`. + * + * If the caller is different than the controller being targeted, the following conditions + * must be met: + * + * * `controller` must belong to a nominator who has become non-decodable, + * + * Or: + * + * * A `ChillThreshold` must be set and checked which defines how close to the max + * nominators or validators we must reach before users can start chilling one-another. + * * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine + * how close we are to the threshold. + * * A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines + * if this is a person that should be chilled because they have not met the threshold + * bond required. + * + * This can be helpful if bond requirements are updated, and we need to remove old users + * who do not satisfy these requirements. + */ +export interface StakingCall_chill_other { + __kind: 'chill_other' + controller: AccountId32 +} + +/** + * Force a validator to have at least the minimum commission. This will not affect a + * validator who already has a commission greater than or equal to the minimum. Any account + * can call this. + */ +export interface StakingCall_force_apply_min_commission { + __kind: 'force_apply_min_commission' + validatorStash: AccountId32 +} + +/** + * Force there to be a new era at the end of the next session. After this, it will be + * reset to normal (non-forced) behaviour. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + * + * ## Complexity + * - No arguments. + * - Weight: O(1) + */ +export interface StakingCall_force_new_era { + __kind: 'force_new_era' +} + +/** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * If this is called just before a new era is triggered, the election process may not + * have enough blocks to get a result. + */ +export interface StakingCall_force_new_era_always { + __kind: 'force_new_era_always' +} + +/** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. + * Thus the election process may be ongoing when this is called. In this case the + * election will continue until the next era is triggered. + * + * ## Complexity + * - No arguments. + * - Weight: O(1) + */ +export interface StakingCall_force_no_eras { + __kind: 'force_no_eras' +} + +/** + * Force a current staker to become completely unstaked, immediately. + * + * The dispatch origin must be Root. + */ +export interface StakingCall_force_unstake { + __kind: 'force_unstake' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Increments the ideal number of validators upto maximum of + * `ElectionProviderBase::MaxWinners`. + * + * The dispatch origin must be Root. + * + * ## Complexity + * Same as [`Self::set_validator_count`]. + */ +export interface StakingCall_increase_validator_count { + __kind: 'increase_validator_count' + additional: number +} + +/** + * Remove the given nominations from the calling validator. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * - `who`: A list of nominator stash accounts who are nominating this validator which + * should no longer be nominating this validator. + * + * Note: Making this call only makes sense if you first set the validator preferences to + * block any further nominations. + */ +export interface StakingCall_kick { + __kind: 'kick' + who: MultiAddress[] +} + +/** + * Declare the desire to nominate `targets` for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * ## Complexity + * - The transaction's complexity is proportional to the size of `targets` (N) + * which is capped at CompactAssignments::LIMIT (T::MaxNominations). + * - Both the reads and writes follow a similar pattern. + */ +export interface StakingCall_nominate { + __kind: 'nominate' + targets: MultiAddress[] +} + +/** + * Pay out all the stakers behind a single validator for a single era. + * + * - `validator_stash` is the stash account of the validator. Their nominators, up to + * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards. + * - `era` may be any era between `[current_era - history_depth; current_era]`. + * + * The origin of this call must be _Signed_. Any account can call this function, even if + * it is not one of the stakers. + * + * ## Complexity + * - At most O(MaxNominatorRewardedPerValidator). + */ +export interface StakingCall_payout_stakers { + __kind: 'payout_stakers' + validatorStash: AccountId32 + era: number +} + +/** + * Remove all data structures concerning a staker/stash once it is at a state where it can + * be considered `dust` in the staking system. The requirements are: + * + * 1. the `total_balance` of the stash is below existential deposit. + * 2. or, the `ledger.total` of the stash is below existential deposit. + * + * The former can happen in cases like a slash; the latter when a fully unbonded account + * is still receiving staking rewards in `RewardDestination::Staked`. + * + * It can be called by anyone, as long as `stash` meets the above requirements. + * + * Refunds the transaction fees upon successful execution. + */ +export interface StakingCall_reap_stash { + __kind: 'reap_stash' + stash: AccountId32 + numSlashingSpans: number +} + +/** + * Rebond a portion of the stash scheduled to be unlocked. + * + * The dispatch origin must be signed by the controller. + * + * ## Complexity + * - Time complexity: O(L), where L is unlocking chunks + * - Bounded by `MaxUnlockingChunks`. + */ +export interface StakingCall_rebond { + __kind: 'rebond' + value: bigint +} + +/** + * Scale up the ideal number of validators by a factor upto maximum of + * `ElectionProviderBase::MaxWinners`. + * + * The dispatch origin must be Root. + * + * ## Complexity + * Same as [`Self::set_validator_count`]. + */ +export interface StakingCall_scale_validator_count { + __kind: 'scale_validator_count' + factor: Percent +} + +/** + * (Re-)sets the controller of a stash to the stash itself. This function previously + * accepted a `controller` argument to set the controller to an account other than the + * stash itself. This functionality has now been removed, now only setting the controller + * to the stash, if it is not already. + * + * Effects will be felt instantly (as soon as this function is completed successfully). + * + * The dispatch origin for this call must be _Signed_ by the stash, not the controller. + * + * ## Complexity + * O(1) + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + */ +export interface StakingCall_set_controller { + __kind: 'set_controller' +} + +/** + * Set the validators who cannot be slashed (if any). + * + * The dispatch origin must be Root. + */ +export interface StakingCall_set_invulnerables { + __kind: 'set_invulnerables' + invulnerables: AccountId32[] +} + +/** + * Sets the minimum amount of commission that each validators must maintain. + * + * This call has lower privilege requirements than `set_staking_config` and can be called + * by the `T::AdminOrigin`. Root can always call this. + */ +export interface StakingCall_set_min_commission { + __kind: 'set_min_commission' + new: Perbill +} + +/** + * (Re-)set the payment target for a controller. + * + * Effects will be felt instantly (as soon as this function is completed successfully). + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * ## Complexity + * - O(1) + * - Independent of the arguments. Insignificant complexity. + * - Contains a limited number of reads. + * - Writes are limited to the `origin` account key. + * --------- + */ +export interface StakingCall_set_payee { + __kind: 'set_payee' + payee: RewardDestination +} + +/** + * Update the various staking configurations . + * + * * `min_nominator_bond`: The minimum active bond needed to be a nominator. + * * `min_validator_bond`: The minimum active bond needed to be a validator. + * * `max_nominator_count`: The max number of users who can be a nominator at once. When + * set to `None`, no limit is enforced. + * * `max_validator_count`: The max number of users who can be a validator at once. When + * set to `None`, no limit is enforced. + * * `chill_threshold`: The ratio of `max_nominator_count` or `max_validator_count` which + * should be filled in order for the `chill_other` transaction to work. + * * `min_commission`: The minimum amount of commission that each validators must maintain. + * This is checked only upon calling `validate`. Existing validators are not affected. + * + * RuntimeOrigin must be Root to call this function. + * + * NOTE: Existing nominators and validators will not be affected by this update. + * to kick people under the new limits, `chill_other` should be called. + */ +export interface StakingCall_set_staking_configs { + __kind: 'set_staking_configs' + minNominatorBond: ConfigOp + minValidatorBond: ConfigOp + maxNominatorCount: Type_92 + maxValidatorCount: Type_92 + chillThreshold: Type_93 + minCommission: Type_94 +} + +/** + * Sets the ideal number of validators. + * + * The dispatch origin must be Root. + * + * ## Complexity + * O(1) + */ +export interface StakingCall_set_validator_count { + __kind: 'set_validator_count' + new: number +} + +/** + * Schedule a portion of the stash to be unlocked ready for transfer out after the bond + * period ends. If this leaves an amount actively bonded less than + * T::Currency::minimum_balance(), then it is increased to the full amount. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + * + * Once the unlock period is done, you can call `withdraw_unbonded` to actually move + * the funds out of management ready for transfer. + * + * No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`) + * can co-exists at the same time. If there are no unlocking chunks slots available + * [`Call::withdraw_unbonded`] is called to remove some of the chunks (if possible). + * + * If a user encounters the `InsufficientBond` error when calling this extrinsic, + * they should call `chill` first in order to free up their bonded funds. + * + * Emits `Unbonded`. + * + * See also [`Call::withdraw_unbonded`]. + */ +export interface StakingCall_unbond { + __kind: 'unbond' + value: bigint +} + +/** + * Declare the desire to validate for the origin controller. + * + * Effects will be felt at the beginning of the next era. + * + * The dispatch origin for this call must be _Signed_ by the controller, not the stash. + */ +export interface StakingCall_validate { + __kind: 'validate' + prefs: ValidatorPrefs +} + +/** + * Remove any unlocked chunks from the `unlocking` queue from our management. + * + * This essentially frees up that balance to be used by the stash account to do + * whatever it wants. + * + * The dispatch origin for this call must be _Signed_ by the controller. + * + * Emits `Withdrawn`. + * + * See also [`Call::unbond`]. + * + * ## Complexity + * O(S) where S is the number of slashing spans to remove + * NOTE: Weight annotation is the kill scenario, we refund otherwise. + */ +export interface StakingCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + numSlashingSpans: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SocietyCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + value: sts.bigint(), + }), + defender_vote: sts.enumStruct({ + approve: sts.boolean(), + }), + found: sts.enumStruct({ + founder: MultiAddress, + maxMembers: sts.number(), + rules: sts.bytes(), + }), + judge_suspended_candidate: sts.enumStruct({ + who: MultiAddress, + judgement: Type_199, + }), + judge_suspended_member: sts.enumStruct({ + who: MultiAddress, + forgive: sts.boolean(), + }), + payout: sts.unit(), + set_max_members: sts.enumStruct({ + max: sts.number(), + }), + unbid: sts.enumStruct({ + pos: sts.number(), + }), + unfound: sts.unit(), + unvouch: sts.enumStruct({ + pos: sts.number(), + }), + vote: sts.enumStruct({ + candidate: MultiAddress, + approve: sts.boolean(), + }), + vouch: sts.enumStruct({ + who: MultiAddress, + value: sts.bigint(), + tip: sts.bigint(), + }), + } +}) + +export const Type_199: sts.Type = sts.closedEnum(() => { + return { + Approve: sts.unit(), + Rebid: sts.unit(), + Reject: sts.unit(), + } +}) + +export type Type_199 = Type_199_Approve | Type_199_Rebid | Type_199_Reject + +export interface Type_199_Approve { + __kind: 'Approve' +} + +export interface Type_199_Rebid { + __kind: 'Rebid' +} + +export interface Type_199_Reject { + __kind: 'Reject' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SocietyCall = SocietyCall_bid | SocietyCall_defender_vote | SocietyCall_found | SocietyCall_judge_suspended_candidate | SocietyCall_judge_suspended_member | SocietyCall_payout | SocietyCall_set_max_members | SocietyCall_unbid | SocietyCall_unfound | SocietyCall_unvouch | SocietyCall_vote | SocietyCall_vouch + +/** + * A user outside of the society can make a bid for entry. + * + * Payment: `CandidateDeposit` will be reserved for making a bid. It is returned + * when the bid becomes a member, or if the bid calls `unbid`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `value`: A one time payment the bid would like to receive when joining the society. + * + * ## Complexity + * - O(M + B + C + logM + logB + X) + * - B (len of bids) + * - C (len of candidates) + * - M (len of members) + * - X (balance reserve) + */ +export interface SocietyCall_bid { + __kind: 'bid' + value: bigint +} + +/** + * As a member, vote on the defender. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `approve`: A boolean which says if the candidate should be + * approved (`true`) or rejected (`false`). + * + * ## Complexity + * - O(M + logM) + * - M (len of members) + */ +export interface SocietyCall_defender_vote { + __kind: 'defender_vote' + approve: boolean +} + +/** + * Found the society. + * + * This is done as a discrete action in order to allow for the + * pallet to be included into a running chain and can only be done once. + * + * The dispatch origin for this call must be from the _FounderSetOrigin_. + * + * Parameters: + * - `founder` - The first member and head of the newly founded society. + * - `max_members` - The initial max number of members for the society. + * - `rules` - The rules of this society concerning membership. + * + * ## Complexity + * - O(1) + */ +export interface SocietyCall_found { + __kind: 'found' + founder: MultiAddress + maxMembers: number + rules: Bytes +} + +/** + * Allow suspended judgement origin to make judgement on a suspended candidate. + * + * If the judgement is `Approve`, we add them to society as a member with the appropriate + * payment for joining society. + * + * If the judgement is `Reject`, we either slash the deposit of the bid, giving it back + * to the society treasury, or we ban the voucher from vouching again. + * + * If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go + * through the induction process again. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended candidate to be judged. + * - `judgement` - `Approve`, `Reject`, or `Rebid`. + * + * ## Complexity + * - O(M + logM + B + X) + * - B (len of bids) + * - M (len of members) + * - X (balance action) + */ +export interface SocietyCall_judge_suspended_candidate { + __kind: 'judge_suspended_candidate' + who: MultiAddress + judgement: Type_199 +} + +/** + * Allow suspension judgement origin to make judgement on a suspended member. + * + * If a suspended member is forgiven, we simply add them back as a member, not affecting + * any of the existing storage items for that member. + * + * If a suspended member is rejected, remove all associated storage items, including + * their payouts, and remove any vouched bids they currently have. + * + * The dispatch origin for this call must be from the _SuspensionJudgementOrigin_. + * + * Parameters: + * - `who` - The suspended member to be judged. + * - `forgive` - A boolean representing whether the suspension judgement origin forgives + * (`true`) or rejects (`false`) a suspended member. + * + * ## Complexity + * - O(M + logM + B) + * - B (len of bids) + * - M (len of members) + */ +export interface SocietyCall_judge_suspended_member { + __kind: 'judge_suspended_member' + who: MultiAddress + forgive: boolean +} + +/** + * Transfer the first matured payout for the sender and remove it from the records. + * + * NOTE: This extrinsic needs to be called multiple times to claim multiple matured + * payouts. + * + * Payment: The member will receive a payment equal to their first matured + * payout to their free balance. + * + * The dispatch origin for this call must be _Signed_ and a member with + * payouts remaining. + * + * ## Complexity + * - O(M + logM + P + X) + * - M (len of members) + * - P (number of payouts for a particular member) + * - X (currency transfer call) + */ +export interface SocietyCall_payout { + __kind: 'payout' +} + +/** + * Allows root origin to change the maximum number of members in society. + * Max membership count must be greater than 1. + * + * The dispatch origin for this call must be from _ROOT_. + * + * Parameters: + * - `max` - The maximum number of members for the society. + * + * ## Complexity + * - O(1) + */ +export interface SocietyCall_set_max_members { + __kind: 'set_max_members' + max: number +} + +/** + * A bidder can remove their bid for entry into society. + * By doing so, they will have their candidate deposit returned or + * they will unvouch their voucher. + * + * Payment: The bid deposit is unreserved if the user made a bid. + * + * The dispatch origin for this call must be _Signed_ and a bidder. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who wants to unbid. + * + * ## Complexity + * - O(B + X) + * - B (len of bids) + * - X (balance unreserve) + */ +export interface SocietyCall_unbid { + __kind: 'unbid' + pos: number +} + +/** + * Annul the founding of the society. + * + * The dispatch origin for this call must be Signed, and the signing account must be both + * the `Founder` and the `Head`. This implies that it may only be done when there is one + * member. + * + * ## Complexity + * - O(1) + */ +export interface SocietyCall_unfound { + __kind: 'unfound' +} + +/** + * As a vouching member, unvouch a bid. This only works while vouched user is + * only a bidder (and not a candidate). + * + * The dispatch origin for this call must be _Signed_ and a vouching member. + * + * Parameters: + * - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + * + * ## Complexity + * - O(B) + * - B (len of bids) + */ +export interface SocietyCall_unvouch { + __kind: 'unvouch' + pos: number +} + +/** + * As a member, vote on a candidate. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `candidate`: The candidate that the member would like to bid on. + * - `approve`: A boolean which says if the candidate should be approved (`true`) or + * rejected (`false`). + * + * ## Complexity + * - O(M + logM + C) + * - C (len of candidates) + * - M (len of members) + */ +export interface SocietyCall_vote { + __kind: 'vote' + candidate: MultiAddress + approve: boolean +} + +/** + * As a member, vouch for someone to join society by placing a bid on their behalf. + * + * There is no deposit required to vouch for a new bid, but a member can only vouch for + * one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by + * the suspension judgement origin, the member will be banned from vouching again. + * + * As a vouching member, you can claim a tip if the candidate is accepted. This tip will + * be paid as a portion of the reward the member will receive for joining the society. + * + * The dispatch origin for this call must be _Signed_ and a member. + * + * Parameters: + * - `who`: The user who you would like to vouch for. + * - `value`: The total reward to be paid between you and the candidate if they become + * a member in the society. + * - `tip`: Your cut of the total `value` payout when the candidate is inducted into + * the society. Tips larger than `value` will be saturated upon payout. + * + * ## Complexity + * - O(M + B + C + logM + logB + X) + * - B (len of bids) + * - C (len of candidates) + * - M (len of members) + * - X (balance reserve) + */ +export interface SocietyCall_vouch { + __kind: 'vouch' + who: MultiAddress + value: bigint + tip: bigint +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SlotsCall: sts.Type = sts.closedEnum(() => { + return { + clear_all_leases: sts.enumStruct({ + para: Id, + }), + force_lease: sts.enumStruct({ + para: Id, + leaser: AccountId32, + amount: sts.bigint(), + periodBegin: sts.number(), + periodCount: sts.number(), + }), + trigger_onboard: sts.enumStruct({ + para: Id, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SlotsCall = SlotsCall_clear_all_leases | SlotsCall_force_lease | SlotsCall_trigger_onboard + +/** + * Clear all leases for a Para Id, refunding any deposits back to the original owners. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_clear_all_leases { + __kind: 'clear_all_leases' + para: Id +} + +/** + * Just a connect into the `lease_out` call, in case Root wants to force some lease to happen + * independently of any other on-chain mechanism to use it. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + */ +export interface SlotsCall_force_lease { + __kind: 'force_lease' + para: Id + leaser: AccountId32 + amount: bigint + periodBegin: number + periodCount: number +} + +/** + * Try to onboard a parachain that has a lease for the current lease period. + * + * This function can be useful if there was some state issue with a para that should + * have onboarded, but was unable to. As long as they have a lease period, we can + * let them onboard from here. + * + * Origin must be signed, but can be called by anyone. + */ +export interface SlotsCall_trigger_onboard { + __kind: 'trigger_onboard' + para: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SessionCall: sts.Type = sts.closedEnum(() => { + return { + purge_keys: sts.unit(), + set_keys: sts.enumStruct({ + keys: SessionKeys, + proof: sts.bytes(), + }), + } +}) + +export const SessionKeys: sts.Type = sts.struct(() => { + return { + grandpa: Public, + babe: sts.bytes(), + imOnline: sts.bytes(), + paraValidator: V4Public, + paraAssignment: sts.bytes(), + authorityDiscovery: sts.bytes(), + } +}) + +export const V4Public = sts.bytes() + +export const Public = sts.bytes() + +export interface SessionKeys { + grandpa: Public + babe: Bytes + imOnline: Bytes + paraValidator: V4Public + paraAssignment: Bytes + authorityDiscovery: Bytes +} + +export type V4Public = Bytes + +export type Public = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SessionCall = SessionCall_purge_keys | SessionCall_set_keys + +/** + * Removes any session key(s) of the function caller. + * + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be Signed and the account must be either be + * convertible to a validator ID using the chain's typical addressing system (this usually + * means being a controller account) or directly convertible into a validator ID (which + * usually means being a stash account). + * + * ## Complexity + * - `O(1)` in number of key types. Actual cost depends on the number of length of + * `T::Keys::key_ids()` which is fixed. + */ +export interface SessionCall_purge_keys { + __kind: 'purge_keys' +} + +/** + * Sets the session key(s) of the function caller to `keys`. + * Allows an account to set its session key prior to becoming a validator. + * This doesn't take effect until the next session. + * + * The dispatch origin of this function must be signed. + * + * ## Complexity + * - `O(1)`. Actual cost depends on the number of length of `T::Keys::key_ids()` which is + * fixed. + */ +export interface SessionCall_set_keys { + __kind: 'set_keys' + keys: SessionKeys + proof: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const SchedulerCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + when: sts.number(), + index: sts.number(), + }), + cancel_named: sts.enumStruct({ + id: sts.bytes(), + }), + schedule: sts.enumStruct({ + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_after: sts.enumStruct({ + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named: sts.enumStruct({ + id: sts.bytes(), + when: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + schedule_named_after: sts.enumStruct({ + id: sts.bytes(), + after: sts.number(), + maybePeriodic: sts.option(() => sts.tuple(() => [sts.number(), sts.number()])), + priority: sts.number(), + call: Call, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type SchedulerCall = SchedulerCall_cancel | SchedulerCall_cancel_named | SchedulerCall_schedule | SchedulerCall_schedule_after | SchedulerCall_schedule_named | SchedulerCall_schedule_named_after + +/** + * Cancel an anonymously scheduled task. + */ +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: number + index: number +} + +/** + * Cancel a named scheduled task. + */ +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Bytes +} + +/** + * Anonymously schedule a task. + */ +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Anonymously schedule a task after a delay. + */ +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Schedule a named task. + */ +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Bytes + when: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Schedule a named task after a delay. + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Bytes + after: number + maybePeriodic?: ([number, number] | undefined) + priority: number + call: Call +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RegistrarCall: sts.Type = sts.closedEnum(() => { + return { + add_lock: sts.enumStruct({ + para: Id, + }), + deregister: sts.enumStruct({ + id: Id, + }), + force_register: sts.enumStruct({ + who: AccountId32, + deposit: sts.bigint(), + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + register: sts.enumStruct({ + id: Id, + genesisHead: HeadData, + validationCode: ValidationCode, + }), + remove_lock: sts.enumStruct({ + para: Id, + }), + reserve: sts.unit(), + schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + swap: sts.enumStruct({ + id: Id, + other: Id, + }), + } +}) + +export const ValidationCode = sts.bytes() + +export const HeadData = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RegistrarCall = RegistrarCall_add_lock | RegistrarCall_deregister | RegistrarCall_force_register | RegistrarCall_register | RegistrarCall_remove_lock | RegistrarCall_reserve | RegistrarCall_schedule_code_upgrade | RegistrarCall_set_current_head | RegistrarCall_swap + +/** + * Add a manager lock from a para. This will prevent the manager of a + * para to deregister or swap a para. + * + * Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked. + */ +export interface RegistrarCall_add_lock { + __kind: 'add_lock' + para: Id +} + +/** + * Deregister a Para Id, freeing all data and returning any deposit. + * + * The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread. + */ +export interface RegistrarCall_deregister { + __kind: 'deregister' + id: Id +} + +/** + * Force the registration of a Para Id on the relay chain. + * + * This function must be called by a Root origin. + * + * The deposit taken can be specified for this registration. Any `ParaId` + * can be registered, including sub-1000 IDs which are System Parachains. + */ +export interface RegistrarCall_force_register { + __kind: 'force_register' + who: AccountId32 + deposit: bigint + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Register head data and validation code for a reserved Para Id. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. + * - `id`: The para ID. Must be owned/managed by the `origin` signing account. + * - `genesis_head`: The genesis head data of the parachain/thread. + * - `validation_code`: The initial validation code of the parachain/thread. + * + * ## Deposits/Fees + * The origin signed account must reserve a corresponding deposit for the registration. Anything already + * reserved previously for this para ID is accounted for. + * + * ## Events + * The `Registered` event is emitted in case of success. + */ +export interface RegistrarCall_register { + __kind: 'register' + id: Id + genesisHead: HeadData + validationCode: ValidationCode +} + +/** + * Remove a manager lock from a para. This will allow the manager of a + * previously locked para to deregister or swap a para without using governance. + * + * Can only be called by the Root origin or the parachain. + */ +export interface RegistrarCall_remove_lock { + __kind: 'remove_lock' + para: Id +} + +/** + * Reserve a Para Id on the relay chain. + * + * This function will reserve a new Para Id to be owned/managed by the origin account. + * The origin account is able to register head data and validation code using `register` to create + * a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot. + * + * ## Arguments + * - `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID. + * + * ## Deposits/Fees + * The origin must reserve a deposit of `ParaDeposit` for the registration. + * + * ## Events + * The `Reserved` event is emitted in case of success, which provides the ID reserved for use. + */ +export interface RegistrarCall_reserve { + __kind: 'reserve' +} + +/** + * Schedule a parachain upgrade. + * + * Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked. + */ +export interface RegistrarCall_schedule_code_upgrade { + __kind: 'schedule_code_upgrade' + para: Id + newCode: ValidationCode +} + +/** + * Set the parachain's current head. + * + * Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked. + */ +export interface RegistrarCall_set_current_head { + __kind: 'set_current_head' + para: Id + newHead: HeadData +} + +/** + * Swap a parachain with another parachain or parathread. + * + * The origin must be Root, the `para` owner, or the `para` itself. + * + * The swap will happen only if there is already an opposite swap pending. If there is not, + * the swap will be stored in the pending swaps map, ready for a later confirmatory swap. + * + * The `ParaId`s remain mapped to the same head data and code so external code can rely on + * `ParaId` to be a long-term identifier of a notional "parachain". However, their + * scheduling info (i.e. whether they're a parathread or parachain), auction information + * and the auction deposit are switched. + */ +export interface RegistrarCall_swap { + __kind: 'swap' + id: Id + other: Id +} + +export type ValidationCode = Bytes + +export type HeadData = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ReferendaCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + index: sts.number(), + }), + kill: sts.enumStruct({ + index: sts.number(), + }), + nudge_referendum: sts.enumStruct({ + index: sts.number(), + }), + one_fewer_deciding: sts.enumStruct({ + track: sts.number(), + }), + place_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_submission_deposit: sts.enumStruct({ + index: sts.number(), + }), + set_metadata: sts.enumStruct({ + index: sts.number(), + maybeHash: sts.option(() => H256), + }), + submit: sts.enumStruct({ + proposalOrigin: OriginCaller, + proposal: Bounded, + enactmentMoment: DispatchTime, + }), + } +}) + +export const DispatchTime: sts.Type = sts.closedEnum(() => { + return { + After: sts.number(), + At: sts.number(), + } +}) + +export type DispatchTime = DispatchTime_After | DispatchTime_At + +export interface DispatchTime_After { + __kind: 'After' + value: number +} + +export interface DispatchTime_At { + __kind: 'At' + value: number +} + +export const Bounded: sts.Type = sts.closedEnum(() => { + return { + Inline: sts.bytes(), + Legacy: sts.enumStruct({ + hash: H256, + }), + Lookup: sts.enumStruct({ + hash: H256, + len: sts.number(), + }), + } +}) + +export type Bounded = Bounded_Inline | Bounded_Legacy | Bounded_Lookup + +export interface Bounded_Inline { + __kind: 'Inline' + value: Bytes +} + +export interface Bounded_Legacy { + __kind: 'Legacy' + hash: H256 +} + +export interface Bounded_Lookup { + __kind: 'Lookup' + hash: H256 + len: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ReferendaCall = ReferendaCall_cancel | ReferendaCall_kill | ReferendaCall_nudge_referendum | ReferendaCall_one_fewer_deciding | ReferendaCall_place_decision_deposit | ReferendaCall_refund_decision_deposit | ReferendaCall_refund_submission_deposit | ReferendaCall_set_metadata | ReferendaCall_submit + +/** + * Cancel an ongoing referendum. + * + * - `origin`: must be the `CancelOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Cancelled`. + */ +export interface ReferendaCall_cancel { + __kind: 'cancel' + index: number +} + +/** + * Cancel an ongoing referendum and slash the deposits. + * + * - `origin`: must be the `KillOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Killed` and `DepositSlashed`. + */ +export interface ReferendaCall_kill { + __kind: 'kill' + index: number +} + +/** + * Advance a referendum onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `index`: the referendum to be advanced. + */ +export interface ReferendaCall_nudge_referendum { + __kind: 'nudge_referendum' + index: number +} + +/** + * Advance a track onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `track`: the track to be advanced. + * + * Action item for when there is now one fewer referendum in the deciding phase and the + * `DecidingCount` is not yet updated. This means that we should either: + * - begin deciding another referendum (and leave `DecidingCount` alone); or + * - decrement `DecidingCount`. + */ +export interface ReferendaCall_one_fewer_deciding { + __kind: 'one_fewer_deciding' + track: number +} + +/** + * Post the Decision Deposit for a referendum. + * + * - `origin`: must be `Signed` and the account must have funds available for the + * referendum's track's Decision Deposit. + * - `index`: The index of the submitted referendum whose Decision Deposit is yet to be + * posted. + * + * Emits `DecisionDepositPlaced`. + */ +export interface ReferendaCall_place_decision_deposit { + __kind: 'place_decision_deposit' + index: number +} + +/** + * Refund the Decision Deposit for a closed referendum back to the depositor. + * + * - `origin`: must be `Signed` or `Root`. + * - `index`: The index of a closed referendum whose Decision Deposit has not yet been + * refunded. + * + * Emits `DecisionDepositRefunded`. + */ +export interface ReferendaCall_refund_decision_deposit { + __kind: 'refund_decision_deposit' + index: number +} + +/** + * Refund the Submission Deposit for a closed referendum back to the depositor. + * + * - `origin`: must be `Signed` or `Root`. + * - `index`: The index of a closed referendum whose Submission Deposit has not yet been + * refunded. + * + * Emits `SubmissionDepositRefunded`. + */ +export interface ReferendaCall_refund_submission_deposit { + __kind: 'refund_submission_deposit' + index: number +} + +/** + * Set or clear metadata of a referendum. + * + * Parameters: + * - `origin`: Must be `Signed` by a creator of a referendum or by anyone to clear a + * metadata of a finished referendum. + * - `index`: The index of a referendum to set or clear metadata for. + * - `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata. + */ +export interface ReferendaCall_set_metadata { + __kind: 'set_metadata' + index: number + maybeHash?: (H256 | undefined) +} + +/** + * Propose a referendum on a privileged action. + * + * - `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds + * available. + * - `proposal_origin`: The origin from which the proposal should be executed. + * - `proposal`: The proposal. + * - `enactment_moment`: The moment that the proposal should be enacted. + * + * Emits `Submitted`. + */ +export interface ReferendaCall_submit { + __kind: 'submit' + proposalOrigin: OriginCaller + proposal: Bounded + enactmentMoment: DispatchTime +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const RecoveryCall: sts.Type = sts.closedEnum(() => { + return { + as_recovered: sts.enumStruct({ + account: MultiAddress, + call: Call, + }), + cancel_recovered: sts.enumStruct({ + account: MultiAddress, + }), + claim_recovery: sts.enumStruct({ + account: MultiAddress, + }), + close_recovery: sts.enumStruct({ + rescuer: MultiAddress, + }), + create_recovery: sts.enumStruct({ + friends: sts.array(() => AccountId32), + threshold: sts.number(), + delayPeriod: sts.number(), + }), + initiate_recovery: sts.enumStruct({ + account: MultiAddress, + }), + remove_recovery: sts.unit(), + set_recovered: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + vouch_recovery: sts.enumStruct({ + lost: MultiAddress, + rescuer: MultiAddress, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type RecoveryCall = RecoveryCall_as_recovered | RecoveryCall_cancel_recovered | RecoveryCall_claim_recovery | RecoveryCall_close_recovery | RecoveryCall_create_recovery | RecoveryCall_initiate_recovery | RecoveryCall_remove_recovery | RecoveryCall_set_recovered | RecoveryCall_vouch_recovery + +/** + * Send a call through a recovered account. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you want to make a call on-behalf-of. + * - `call`: The call you want to make with the recovered account. + */ +export interface RecoveryCall_as_recovered { + __kind: 'as_recovered' + account: MultiAddress + call: Call +} + +/** + * Cancel the ability to use `as_recovered` for `account`. + * + * The dispatch origin for this call must be _Signed_ and registered to + * be able to make calls on behalf of the recovered account. + * + * Parameters: + * - `account`: The recovered account you are able to call on-behalf-of. + */ +export interface RecoveryCall_cancel_recovered { + __kind: 'cancel_recovered' + account: MultiAddress +} + +/** + * Allow a successful rescuer to claim their recovered account. + * + * The dispatch origin for this call must be _Signed_ and must be a "rescuer" + * who has successfully completed the account recovery process: collected + * `threshold` or more vouches, waited `delay_period` blocks since initiation. + * + * Parameters: + * - `account`: The lost account that you want to claim has been successfully recovered by + * you. + */ +export interface RecoveryCall_claim_recovery { + __kind: 'claim_recovery' + account: MultiAddress +} + +/** + * As the controller of a recoverable account, close an active recovery + * process for your account. + * + * Payment: By calling this function, the recoverable account will receive + * the recovery deposit `RecoveryDeposit` placed by the rescuer. + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account with an active recovery process for it. + * + * Parameters: + * - `rescuer`: The account trying to rescue this recoverable account. + */ +export interface RecoveryCall_close_recovery { + __kind: 'close_recovery' + rescuer: MultiAddress +} + +/** + * Create a recovery configuration for your account. This makes your account recoverable. + * + * Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance + * will be reserved for storing the recovery configuration. This deposit is returned + * in full when the user calls `remove_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `friends`: A list of friends you trust to vouch for recovery attempts. Should be + * ordered and contain no duplicate values. + * - `threshold`: The number of friends that must vouch for a recovery attempt before the + * account can be recovered. Should be less than or equal to the length of the list of + * friends. + * - `delay_period`: The number of blocks after a recovery attempt is initialized that + * needs to pass before the account can be recovered. + */ +export interface RecoveryCall_create_recovery { + __kind: 'create_recovery' + friends: AccountId32[] + threshold: number + delayPeriod: number +} + +/** + * Initiate the process for recovering a recoverable account. + * + * Payment: `RecoveryDeposit` balance will be reserved for initiating the + * recovery process. This deposit will always be repatriated to the account + * trying to be recovered. See `close_recovery`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `account`: The lost account that you want to recover. This account needs to be + * recoverable (i.e. have a recovery configuration). + */ +export interface RecoveryCall_initiate_recovery { + __kind: 'initiate_recovery' + account: MultiAddress +} + +/** + * Remove the recovery process for your account. Recovered accounts are still accessible. + * + * NOTE: The user must make sure to call `close_recovery` on all active + * recovery attempts before calling this function else it will fail. + * + * Payment: By calling this function the recoverable account will unreserve + * their recovery configuration deposit. + * (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) + * + * The dispatch origin for this call must be _Signed_ and must be a + * recoverable account (i.e. has a recovery configuration). + */ +export interface RecoveryCall_remove_recovery { + __kind: 'remove_recovery' +} + +/** + * Allow ROOT to bypass the recovery process and set an a rescuer account + * for a lost account directly. + * + * The dispatch origin for this call must be _ROOT_. + * + * Parameters: + * - `lost`: The "lost account" to be recovered. + * - `rescuer`: The "rescuer account" which can call as the lost account. + */ +export interface RecoveryCall_set_recovered { + __kind: 'set_recovered' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * Allow a "friend" of a recoverable account to vouch for an active recovery + * process for that account. + * + * The dispatch origin for this call must be _Signed_ and must be a "friend" + * for the recoverable account. + * + * Parameters: + * - `lost`: The lost account that you want to recover. + * - `rescuer`: The account trying to rescue the lost account that you want to vouch for. + * + * The combination of these two parameters must point to an active recovery + * process. + */ +export interface RecoveryCall_vouch_recovery { + __kind: 'vouch_recovery' + lost: MultiAddress + rescuer: MultiAddress +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ProxyCall: sts.Type = sts.closedEnum(() => { + return { + add_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + announce: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + create_pure: sts.enumStruct({ + proxyType: ProxyType, + delay: sts.number(), + index: sts.number(), + }), + kill_pure: sts.enumStruct({ + spawner: MultiAddress, + proxyType: ProxyType, + index: sts.number(), + height: sts.number(), + extIndex: sts.number(), + }), + proxy: sts.enumStruct({ + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + proxy_announced: sts.enumStruct({ + delegate: MultiAddress, + real: MultiAddress, + forceProxyType: sts.option(() => ProxyType), + call: Call, + }), + reject_announcement: sts.enumStruct({ + delegate: MultiAddress, + callHash: H256, + }), + remove_announcement: sts.enumStruct({ + real: MultiAddress, + callHash: H256, + }), + remove_proxies: sts.unit(), + remove_proxy: sts.enumStruct({ + delegate: MultiAddress, + proxyType: ProxyType, + delay: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ProxyCall = ProxyCall_add_proxy | ProxyCall_announce | ProxyCall_create_pure | ProxyCall_kill_pure | ProxyCall_proxy | ProxyCall_proxy_announced | ProxyCall_reject_announcement | ProxyCall_remove_announcement | ProxyCall_remove_proxies | ProxyCall_remove_proxy + +/** + * Register a proxy account for the sender that is able to make calls on its behalf. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to make a proxy. + * - `proxy_type`: The permissions allowed for this proxy account. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + */ +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +/** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + */ +export interface ProxyCall_announce { + __kind: 'announce' + real: MultiAddress + callHash: H256 +} + +/** + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. + * + * Requires a `Signed` origin. + * + * - `proxy_type`: The type of the proxy that the sender will be registered as over the + * new account. This will almost always be the most permissive `ProxyType` possible to + * allow for maximum flexibility. + * - `index`: A disambiguation index, in case this is called multiple times in the same + * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just + * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. + * + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. + * + * Fails if there are insufficient funds to pay for deposit. + */ +export interface ProxyCall_create_pure { + __kind: 'create_pure' + proxyType: ProxyType + delay: number + index: number +} + +/** + * Removes a previously spawned pure proxy. + * + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. + * + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `pure` with corresponding parameters. + * + * - `spawner`: The account that originally called `pure` to create this account. + * - `index`: The disambiguation index originally passed to `pure`. Probably `0`. + * - `proxy_type`: The proxy type originally passed to `pure`. + * - `height`: The height of the chain when the call to `pure` was processed. + * - `ext_index`: The extrinsic index in which the call to `pure` was processed. + * + * Fails with `NoPermission` in case the caller is not a previously created pure + * account whose `pure` call has corresponding parameters. + */ +export interface ProxyCall_kill_pure { + __kind: 'kill_pure' + spawner: MultiAddress + proxyType: ProxyType + index: number + height: number + extIndex: number +} + +/** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + */ +export interface ProxyCall_proxy { + __kind: 'proxy' + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Dispatch the given `call` from an account that the sender is authorized for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + */ +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: MultiAddress + real: MultiAddress + forceProxyType?: (ProxyType | undefined) + call: Call +} + +/** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + */ +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: MultiAddress + callHash: H256 +} + +/** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + */ +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: MultiAddress + callHash: H256 +} + +/** + * Unregister all proxy accounts for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * WARNING: This may be called on accounts created by `pure`, however if done, then + * the unreserved fees will be inaccessible. **All access to this account will be lost.** + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * Unregister a proxy account for the sender. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `proxy`: The account that the `caller` would like to remove as a proxy. + * - `proxy_type`: The permissions currently enabled for the removed proxy account. + */ +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: MultiAddress + proxyType: ProxyType + delay: number +} + +export type ProxyType = ProxyType_Any | ProxyType_Auction | ProxyType_CancelProxy | ProxyType_Governance | ProxyType_IdentityJudgement | ProxyType_NominationPools | ProxyType_NonTransfer | ProxyType_Society | ProxyType_Staking + +export interface ProxyType_Any { + __kind: 'Any' +} + +export interface ProxyType_Auction { + __kind: 'Auction' +} + +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Governance { + __kind: 'Governance' +} + +export interface ProxyType_IdentityJudgement { + __kind: 'IdentityJudgement' +} + +export interface ProxyType_NominationPools { + __kind: 'NominationPools' +} + +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' +} + +export interface ProxyType_Society { + __kind: 'Society' +} + +export interface ProxyType_Staking { + __kind: 'Staking' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const PreimageCall: sts.Type = sts.closedEnum(() => { + return { + note_preimage: sts.enumStruct({ + bytes: sts.bytes(), + }), + request_preimage: sts.enumStruct({ + hash: H256, + }), + unnote_preimage: sts.enumStruct({ + hash: H256, + }), + unrequest_preimage: sts.enumStruct({ + hash: H256, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type PreimageCall = PreimageCall_note_preimage | PreimageCall_request_preimage | PreimageCall_unnote_preimage | PreimageCall_unrequest_preimage + +/** + * Register a preimage on-chain. + * + * If the preimage was previously requested, no fees or deposits are taken for providing + * the preimage. Otherwise, a deposit is taken proportional to the size of the preimage. + */ +export interface PreimageCall_note_preimage { + __kind: 'note_preimage' + bytes: Bytes +} + +/** + * Request a preimage be uploaded to the chain without paying any fees or deposits. + * + * If the preimage requests has already been provided on-chain, we unreserve any deposit + * a user may have paid, and take the control of the preimage out of their hands. + */ +export interface PreimageCall_request_preimage { + __kind: 'request_preimage' + hash: H256 +} + +/** + * Clear an unrequested preimage from the runtime storage. + * + * If `len` is provided, then it will be a much cheaper operation. + * + * - `hash`: The hash of the preimage to be removed from the store. + * - `len`: The length of the preimage of `hash`. + */ +export interface PreimageCall_unnote_preimage { + __kind: 'unnote_preimage' + hash: H256 +} + +/** + * Clear a previously made request for a preimage. + * + * NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. + */ +export interface PreimageCall_unrequest_preimage { + __kind: 'unrequest_preimage' + hash: H256 +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasSlashingCall: sts.Type = sts.closedEnum(() => { + return { + report_dispute_lost_unsigned: sts.enumStruct({ + disputeProof: DisputeProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const MembershipProof: sts.Type = sts.struct(() => { + return { + session: sts.number(), + trieNodes: sts.array(() => sts.bytes()), + validatorCount: sts.number(), + } +}) + +export interface MembershipProof { + session: number + trieNodes: Bytes[] + validatorCount: number +} + +export const DisputeProof: sts.Type = sts.struct(() => { + return { + timeSlot: DisputesTimeSlot, + kind: SlashingOffenceKind, + validatorIndex: V4ValidatorIndex, + validatorId: V4Public, + } +}) + +export const V4ValidatorIndex = sts.number() + +export const SlashingOffenceKind: sts.Type = sts.closedEnum(() => { + return { + AgainstValid: sts.unit(), + ForInvalid: sts.unit(), + } +}) + +export type SlashingOffenceKind = SlashingOffenceKind_AgainstValid | SlashingOffenceKind_ForInvalid + +export interface SlashingOffenceKind_AgainstValid { + __kind: 'AgainstValid' +} + +export interface SlashingOffenceKind_ForInvalid { + __kind: 'ForInvalid' +} + +export const DisputesTimeSlot: sts.Type = sts.struct(() => { + return { + sessionIndex: sts.number(), + candidateHash: CandidateHash, + } +}) + +export const CandidateHash = sts.bytes() + +export interface DisputesTimeSlot { + sessionIndex: number + candidateHash: CandidateHash +} + +export type CandidateHash = Bytes + +export interface DisputeProof { + timeSlot: DisputesTimeSlot + kind: SlashingOffenceKind + validatorIndex: V4ValidatorIndex + validatorId: V4Public +} + +export type V4ValidatorIndex = number + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasSlashingCall = ParasSlashingCall_report_dispute_lost_unsigned + +export interface ParasSlashingCall_report_dispute_lost_unsigned { + __kind: 'report_dispute_lost_unsigned' + disputeProof: DisputeProof + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasSharedCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasSharedCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasDisputesCall: sts.Type = sts.closedEnum(() => { + return { + force_unfreeze: sts.unit(), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasDisputesCall = ParasDisputesCall_force_unfreeze + +export interface ParasDisputesCall_force_unfreeze { + __kind: 'force_unfreeze' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParasCall: sts.Type = sts.closedEnum(() => { + return { + add_trusted_validation_code: sts.enumStruct({ + validationCode: ValidationCode, + }), + force_note_new_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + force_queue_action: sts.enumStruct({ + para: Id, + }), + force_schedule_code_upgrade: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + relayParentNumber: sts.number(), + }), + force_set_current_code: sts.enumStruct({ + para: Id, + newCode: ValidationCode, + }), + force_set_current_head: sts.enumStruct({ + para: Id, + newHead: HeadData, + }), + include_pvf_check_statement: sts.enumStruct({ + stmt: V4PvfCheckStatement, + signature: V4Signature, + }), + poke_unused_validation_code: sts.enumStruct({ + validationCodeHash: ValidationCodeHash, + }), + } +}) + +export const ValidationCodeHash = sts.bytes() + +export const V4Signature = sts.bytes() + +export const V4PvfCheckStatement: sts.Type = sts.struct(() => { + return { + accept: sts.boolean(), + subject: ValidationCodeHash, + sessionIndex: sts.number(), + validatorIndex: V4ValidatorIndex, + } +}) + +export interface V4PvfCheckStatement { + accept: boolean + subject: ValidationCodeHash + sessionIndex: number + validatorIndex: V4ValidatorIndex +} + +export type ValidationCodeHash = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParasCall = ParasCall_add_trusted_validation_code | ParasCall_force_note_new_head | ParasCall_force_queue_action | ParasCall_force_schedule_code_upgrade | ParasCall_force_set_current_code | ParasCall_force_set_current_head | ParasCall_include_pvf_check_statement | ParasCall_poke_unused_validation_code + +/** + * Adds the validation code to the storage. + * + * The code will not be added if it is already present. Additionally, if PVF pre-checking + * is running for that code, it will be instantly accepted. + * + * Otherwise, the code will be added into the storage. Note that the code will be added + * into storage with reference count 0. This is to account the fact that there are no users + * for this code yet. The caller will have to make sure that this code eventually gets + * used by some parachain or removed from the storage to avoid storage leaks. For the latter + * prefer to use the `poke_unused_validation_code` dispatchable to raw storage manipulation. + * + * This function is mainly meant to be used for upgrading parachains that do not follow + * the go-ahead signal while the PVF pre-checking feature is enabled. + */ +export interface ParasCall_add_trusted_validation_code { + __kind: 'add_trusted_validation_code' + validationCode: ValidationCode +} + +/** + * Note a new block head for para within the context of the current block. + */ +export interface ParasCall_force_note_new_head { + __kind: 'force_note_new_head' + para: Id + newHead: HeadData +} + +/** + * Put a parachain directly into the next session's action queue. + * We can't queue it any sooner than this without going into the + * initializer... + */ +export interface ParasCall_force_queue_action { + __kind: 'force_queue_action' + para: Id +} + +/** + * Schedule an upgrade as if it was scheduled in the given relay parent block. + */ +export interface ParasCall_force_schedule_code_upgrade { + __kind: 'force_schedule_code_upgrade' + para: Id + newCode: ValidationCode + relayParentNumber: number +} + +/** + * Set the storage for the parachain validation code immediately. + */ +export interface ParasCall_force_set_current_code { + __kind: 'force_set_current_code' + para: Id + newCode: ValidationCode +} + +/** + * Set the storage for the current parachain head data immediately. + */ +export interface ParasCall_force_set_current_head { + __kind: 'force_set_current_head' + para: Id + newHead: HeadData +} + +/** + * Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and + * enacts the results if that was the last vote before achieving the supermajority. + */ +export interface ParasCall_include_pvf_check_statement { + __kind: 'include_pvf_check_statement' + stmt: V4PvfCheckStatement + signature: V4Signature +} + +/** + * Remove the validation code from the storage iff the reference count is 0. + * + * This is better than removing the storage directly, because it will not remove the code + * that was suddenly got used by some parachain while this dispatchable was pending + * dispatching. + */ +export interface ParasCall_poke_unused_validation_code { + __kind: 'poke_unused_validation_code' + validationCodeHash: ValidationCodeHash +} + +export type V4Signature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInherentCall: sts.Type = sts.closedEnum(() => { + return { + enter: sts.enumStruct({ + data: V4InherentData, + }), + } +}) + +export const V4InherentData: sts.Type = sts.struct(() => { + return { + bitfields: sts.array(() => V4UncheckedSigned), + backedCandidates: sts.array(() => V4BackedCandidate), + disputes: sts.array(() => V4DisputeStatementSet), + parentHeader: Header, + } +}) + +export const Header: sts.Type
= sts.struct(() => { + return { + parentHash: H256, + number: sts.number(), + stateRoot: H256, + extrinsicsRoot: H256, + digest: Digest, + } +}) + +export const Digest: sts.Type = sts.struct(() => { + return { + logs: sts.array(() => DigestItem), + } +}) + +export const DigestItem: sts.Type = sts.closedEnum(() => { + return { + Consensus: sts.tuple(() => [sts.bytes(), sts.bytes()]), + Other: sts.bytes(), + PreRuntime: sts.tuple(() => [sts.bytes(), sts.bytes()]), + RuntimeEnvironmentUpdated: sts.unit(), + Seal: sts.tuple(() => [sts.bytes(), sts.bytes()]), + } +}) + +export type DigestItem = DigestItem_Consensus | DigestItem_Other | DigestItem_PreRuntime | DigestItem_RuntimeEnvironmentUpdated | DigestItem_Seal + +export interface DigestItem_Consensus { + __kind: 'Consensus' + value: [Bytes, Bytes] +} + +export interface DigestItem_Other { + __kind: 'Other' + value: Bytes +} + +export interface DigestItem_PreRuntime { + __kind: 'PreRuntime' + value: [Bytes, Bytes] +} + +export interface DigestItem_RuntimeEnvironmentUpdated { + __kind: 'RuntimeEnvironmentUpdated' +} + +export interface DigestItem_Seal { + __kind: 'Seal' + value: [Bytes, Bytes] +} + +export interface Digest { + logs: DigestItem[] +} + +export interface Header { + parentHash: H256 + number: number + stateRoot: H256 + extrinsicsRoot: H256 + digest: Digest +} + +export const V4DisputeStatementSet: sts.Type = sts.struct(() => { + return { + candidateHash: CandidateHash, + session: sts.number(), + statements: sts.array(() => sts.tuple(() => [V4DisputeStatement, V4ValidatorIndex, V4Signature])), + } +}) + +export const V4DisputeStatement: sts.Type = sts.closedEnum(() => { + return { + Invalid: V4InvalidDisputeStatementKind, + Valid: V4ValidDisputeStatementKind, + } +}) + +export const V4ValidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + ApprovalChecking: sts.unit(), + BackingSeconded: H256, + BackingValid: H256, + Explicit: sts.unit(), + } +}) + +export type V4ValidDisputeStatementKind = V4ValidDisputeStatementKind_ApprovalChecking | V4ValidDisputeStatementKind_BackingSeconded | V4ValidDisputeStatementKind_BackingValid | V4ValidDisputeStatementKind_Explicit + +export interface V4ValidDisputeStatementKind_ApprovalChecking { + __kind: 'ApprovalChecking' +} + +export interface V4ValidDisputeStatementKind_BackingSeconded { + __kind: 'BackingSeconded' + value: H256 +} + +export interface V4ValidDisputeStatementKind_BackingValid { + __kind: 'BackingValid' + value: H256 +} + +export interface V4ValidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export const V4InvalidDisputeStatementKind: sts.Type = sts.closedEnum(() => { + return { + Explicit: sts.unit(), + } +}) + +export type V4InvalidDisputeStatementKind = V4InvalidDisputeStatementKind_Explicit + +export interface V4InvalidDisputeStatementKind_Explicit { + __kind: 'Explicit' +} + +export type V4DisputeStatement = V4DisputeStatement_Invalid | V4DisputeStatement_Valid + +export interface V4DisputeStatement_Invalid { + __kind: 'Invalid' + value: V4InvalidDisputeStatementKind +} + +export interface V4DisputeStatement_Valid { + __kind: 'Valid' + value: V4ValidDisputeStatementKind +} + +export interface V4DisputeStatementSet { + candidateHash: CandidateHash + session: number + statements: [V4DisputeStatement, V4ValidatorIndex, V4Signature][] +} + +export const V4BackedCandidate: sts.Type = sts.struct(() => { + return { + candidate: V4CommittedCandidateReceipt, + validityVotes: sts.array(() => V4ValidityAttestation), + validatorIndices: sts.bitseq(), + } +}) + +export const V4ValidityAttestation: sts.Type = sts.closedEnum(() => { + return { + Explicit: V4Signature, + Implicit: V4Signature, + } +}) + +export type V4ValidityAttestation = V4ValidityAttestation_Explicit | V4ValidityAttestation_Implicit + +export interface V4ValidityAttestation_Explicit { + __kind: 'Explicit' + value: V4Signature +} + +export interface V4ValidityAttestation_Implicit { + __kind: 'Implicit' + value: V4Signature +} + +export const V4CommittedCandidateReceipt: sts.Type = sts.struct(() => { + return { + descriptor: V4CandidateDescriptor, + commitments: V4CandidateCommitments, + } +}) + +export const V4CandidateCommitments: sts.Type = sts.struct(() => { + return { + upwardMessages: sts.array(() => sts.bytes()), + horizontalMessages: sts.array(() => OutboundHrmpMessage), + newValidationCode: sts.option(() => ValidationCode), + headData: HeadData, + processedDownwardMessages: sts.number(), + hrmpWatermark: sts.number(), + } +}) + +export const OutboundHrmpMessage: sts.Type = sts.struct(() => { + return { + recipient: Id, + data: sts.bytes(), + } +}) + +export interface OutboundHrmpMessage { + recipient: Id + data: Bytes +} + +export interface V4CandidateCommitments { + upwardMessages: Bytes[] + horizontalMessages: OutboundHrmpMessage[] + newValidationCode?: (ValidationCode | undefined) + headData: HeadData + processedDownwardMessages: number + hrmpWatermark: number +} + +export const V4CandidateDescriptor: sts.Type = sts.struct(() => { + return { + paraId: Id, + relayParent: H256, + collator: sts.bytes(), + persistedValidationDataHash: H256, + povHash: H256, + erasureRoot: H256, + signature: sts.bytes(), + paraHead: H256, + validationCodeHash: ValidationCodeHash, + } +}) + +export interface V4CandidateDescriptor { + paraId: Id + relayParent: H256 + collator: Bytes + persistedValidationDataHash: H256 + povHash: H256 + erasureRoot: H256 + signature: Bytes + paraHead: H256 + validationCodeHash: ValidationCodeHash +} + +export interface V4CommittedCandidateReceipt { + descriptor: V4CandidateDescriptor + commitments: V4CandidateCommitments +} + +export interface V4BackedCandidate { + candidate: V4CommittedCandidateReceipt + validityVotes: V4ValidityAttestation[] + validatorIndices: BitSequence +} + +export const V4UncheckedSigned: sts.Type = sts.struct(() => { + return { + payload: V4AvailabilityBitfield, + validatorIndex: V4ValidatorIndex, + signature: V4Signature, + } +}) + +export const V4AvailabilityBitfield = sts.bitseq() + +export interface V4UncheckedSigned { + payload: V4AvailabilityBitfield + validatorIndex: V4ValidatorIndex + signature: V4Signature +} + +export type V4AvailabilityBitfield = BitSequence + +export interface V4InherentData { + bitfields: V4UncheckedSigned[] + backedCandidates: V4BackedCandidate[] + disputes: V4DisputeStatementSet[] + parentHeader: Header +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInherentCall = ParaInherentCall_enter + +/** + * Enter the paras inherent. This will process bitfields and backed candidates. + */ +export interface ParaInherentCall_enter { + __kind: 'enter' + data: V4InherentData +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ParaInclusionCall: sts.Type = sts.closedEnum(() => { + return { + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ParaInclusionCall = never + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const NominationPoolsCall: sts.Type = sts.closedEnum(() => { + return { + bond_extra: sts.enumStruct({ + extra: BondExtra, + }), + bond_extra_other: sts.enumStruct({ + member: MultiAddress, + extra: BondExtra, + }), + chill: sts.enumStruct({ + poolId: sts.number(), + }), + claim_commission: sts.enumStruct({ + poolId: sts.number(), + }), + claim_payout: sts.unit(), + claim_payout_other: sts.enumStruct({ + other: AccountId32, + }), + create: sts.enumStruct({ + amount: sts.bigint(), + root: MultiAddress, + nominator: MultiAddress, + bouncer: MultiAddress, + }), + create_with_pool_id: sts.enumStruct({ + amount: sts.bigint(), + root: MultiAddress, + nominator: MultiAddress, + bouncer: MultiAddress, + poolId: sts.number(), + }), + join: sts.enumStruct({ + amount: sts.bigint(), + poolId: sts.number(), + }), + nominate: sts.enumStruct({ + poolId: sts.number(), + validators: sts.array(() => AccountId32), + }), + pool_withdraw_unbonded: sts.enumStruct({ + poolId: sts.number(), + numSlashingSpans: sts.number(), + }), + set_claim_permission: sts.enumStruct({ + permission: ClaimPermission, + }), + set_commission: sts.enumStruct({ + poolId: sts.number(), + newCommission: sts.option(() => sts.tuple(() => [Perbill, AccountId32])), + }), + set_commission_change_rate: sts.enumStruct({ + poolId: sts.number(), + changeRate: CommissionChangeRate, + }), + set_commission_max: sts.enumStruct({ + poolId: sts.number(), + maxCommission: Perbill, + }), + set_configs: sts.enumStruct({ + minJoinBond: Type_309, + minCreateBond: Type_309, + maxPools: Type_310, + maxMembers: Type_310, + maxMembersPerPool: Type_310, + globalMaxCommission: Type_311, + }), + set_metadata: sts.enumStruct({ + poolId: sts.number(), + metadata: sts.bytes(), + }), + set_state: sts.enumStruct({ + poolId: sts.number(), + state: PoolState, + }), + unbond: sts.enumStruct({ + memberAccount: MultiAddress, + unbondingPoints: sts.bigint(), + }), + update_roles: sts.enumStruct({ + poolId: sts.number(), + newRoot: Type_312, + newNominator: Type_312, + newBouncer: Type_312, + }), + withdraw_unbonded: sts.enumStruct({ + memberAccount: MultiAddress, + numSlashingSpans: sts.number(), + }), + } +}) + +export const Type_312: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: AccountId32, + } +}) + +export type Type_312 = Type_312_Noop | Type_312_Remove | Type_312_Set + +export interface Type_312_Noop { + __kind: 'Noop' +} + +export interface Type_312_Remove { + __kind: 'Remove' +} + +export interface Type_312_Set { + __kind: 'Set' + value: AccountId32 +} + +export const PoolState: sts.Type = sts.closedEnum(() => { + return { + Blocked: sts.unit(), + Destroying: sts.unit(), + Open: sts.unit(), + } +}) + +export type PoolState = PoolState_Blocked | PoolState_Destroying | PoolState_Open + +export interface PoolState_Blocked { + __kind: 'Blocked' +} + +export interface PoolState_Destroying { + __kind: 'Destroying' +} + +export interface PoolState_Open { + __kind: 'Open' +} + +export const Type_311: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: Perbill, + } +}) + +export type Type_311 = Type_311_Noop | Type_311_Remove | Type_311_Set + +export interface Type_311_Noop { + __kind: 'Noop' +} + +export interface Type_311_Remove { + __kind: 'Remove' +} + +export interface Type_311_Set { + __kind: 'Set' + value: Perbill +} + +export const Type_310: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.number(), + } +}) + +export type Type_310 = Type_310_Noop | Type_310_Remove | Type_310_Set + +export interface Type_310_Noop { + __kind: 'Noop' +} + +export interface Type_310_Remove { + __kind: 'Remove' +} + +export interface Type_310_Set { + __kind: 'Set' + value: number +} + +export const Type_309: sts.Type = sts.closedEnum(() => { + return { + Noop: sts.unit(), + Remove: sts.unit(), + Set: sts.bigint(), + } +}) + +export type Type_309 = Type_309_Noop | Type_309_Remove | Type_309_Set + +export interface Type_309_Noop { + __kind: 'Noop' +} + +export interface Type_309_Remove { + __kind: 'Remove' +} + +export interface Type_309_Set { + __kind: 'Set' + value: bigint +} + +export const CommissionChangeRate: sts.Type = sts.struct(() => { + return { + maxIncrease: Perbill, + minDelay: sts.number(), + } +}) + +export interface CommissionChangeRate { + maxIncrease: Perbill + minDelay: number +} + +export const ClaimPermission: sts.Type = sts.closedEnum(() => { + return { + Permissioned: sts.unit(), + PermissionlessAll: sts.unit(), + PermissionlessCompound: sts.unit(), + PermissionlessWithdraw: sts.unit(), + } +}) + +export type ClaimPermission = ClaimPermission_Permissioned | ClaimPermission_PermissionlessAll | ClaimPermission_PermissionlessCompound | ClaimPermission_PermissionlessWithdraw + +export interface ClaimPermission_Permissioned { + __kind: 'Permissioned' +} + +export interface ClaimPermission_PermissionlessAll { + __kind: 'PermissionlessAll' +} + +export interface ClaimPermission_PermissionlessCompound { + __kind: 'PermissionlessCompound' +} + +export interface ClaimPermission_PermissionlessWithdraw { + __kind: 'PermissionlessWithdraw' +} + +export const BondExtra: sts.Type = sts.closedEnum(() => { + return { + FreeBalance: sts.bigint(), + Rewards: sts.unit(), + } +}) + +export type BondExtra = BondExtra_FreeBalance | BondExtra_Rewards + +export interface BondExtra_FreeBalance { + __kind: 'FreeBalance' + value: bigint +} + +export interface BondExtra_Rewards { + __kind: 'Rewards' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type NominationPoolsCall = NominationPoolsCall_bond_extra | NominationPoolsCall_bond_extra_other | NominationPoolsCall_chill | NominationPoolsCall_claim_commission | NominationPoolsCall_claim_payout | NominationPoolsCall_claim_payout_other | NominationPoolsCall_create | NominationPoolsCall_create_with_pool_id | NominationPoolsCall_join | NominationPoolsCall_nominate | NominationPoolsCall_pool_withdraw_unbonded | NominationPoolsCall_set_claim_permission | NominationPoolsCall_set_commission | NominationPoolsCall_set_commission_change_rate | NominationPoolsCall_set_commission_max | NominationPoolsCall_set_configs | NominationPoolsCall_set_metadata | NominationPoolsCall_set_state | NominationPoolsCall_unbond | NominationPoolsCall_update_roles | NominationPoolsCall_withdraw_unbonded + +/** + * Bond `extra` more funds from `origin` into the pool to which they already belong. + * + * Additional funds can come from either the free balance of the account, of from the + * accumulated rewards, see [`BondExtra`]. + * + * Bonding extra funds implies an automatic payout of all pending rewards as well. + * See `bond_extra_other` to bond pending rewards of `other` members. + */ +export interface NominationPoolsCall_bond_extra { + __kind: 'bond_extra' + extra: BondExtra +} + +/** + * `origin` bonds funds from `extra` for some pool member `member` into their respective + * pools. + * + * `origin` can bond extra funds from free balance or pending rewards when `origin == + * other`. + * + * In the case of `origin != other`, `origin` can only bond extra pending rewards of + * `other` members assuming set_claim_permission for the given member is + * `PermissionlessAll` or `PermissionlessCompound`. + */ +export interface NominationPoolsCall_bond_extra_other { + __kind: 'bond_extra_other' + member: MultiAddress + extra: BondExtra +} + +/** + * Chill on behalf of the pool. + * + * The dispatch origin of this call must be signed by the pool nominator or the pool + * root role, same as [`Pallet::nominate`]. + * + * This directly forward the call to the staking pallet, on behalf of the pool bonded + * account. + */ +export interface NominationPoolsCall_chill { + __kind: 'chill' + poolId: number +} + +/** + * Claim pending commission. + * + * The dispatch origin of this call must be signed by the `root` role of the pool. Pending + * commission is paid out and added to total claimed commission`. Total pending commission + * is reset to zero. the current. + */ +export interface NominationPoolsCall_claim_commission { + __kind: 'claim_commission' + poolId: number +} + +/** + * A bonded member can use this to claim their payout based on the rewards that the pool + * has accumulated since their last claimed payout (OR since joining if this is their first + * time claiming rewards). The payout will be transferred to the member's account. + * + * The member will earn rewards pro rata based on the members stake vs the sum of the + * members in the pools stake. Rewards do not "expire". + * + * See `claim_payout_other` to caim rewards on bahalf of some `other` pool member. + */ +export interface NominationPoolsCall_claim_payout { + __kind: 'claim_payout' +} + +/** + * `origin` can claim payouts on some pool member `other`'s behalf. + * + * Pool member `other` must have a `PermissionlessAll` or `PermissionlessWithdraw` in order + * for this call to be successful. + */ +export interface NominationPoolsCall_claim_payout_other { + __kind: 'claim_payout_other' + other: AccountId32 +} + +/** + * Create a new delegation pool. + * + * # Arguments + * + * * `amount` - The amount of funds to delegate to the pool. This also acts of a sort of + * deposit since the pools creator cannot fully unbond funds until the pool is being + * destroyed. + * * `index` - A disambiguation index for creating the account. Likely only useful when + * creating multiple pools in the same extrinsic. + * * `root` - The account to set as [`PoolRoles::root`]. + * * `nominator` - The account to set as the [`PoolRoles::nominator`]. + * * `bouncer` - The account to set as the [`PoolRoles::bouncer`]. + * + * # Note + * + * In addition to `amount`, the caller will transfer the existential deposit; so the caller + * needs at have at least `amount + existential_deposit` transferrable. + */ +export interface NominationPoolsCall_create { + __kind: 'create' + amount: bigint + root: MultiAddress + nominator: MultiAddress + bouncer: MultiAddress +} + +/** + * Create a new delegation pool with a previously used pool id + * + * # Arguments + * + * same as `create` with the inclusion of + * * `pool_id` - `A valid PoolId. + */ +export interface NominationPoolsCall_create_with_pool_id { + __kind: 'create_with_pool_id' + amount: bigint + root: MultiAddress + nominator: MultiAddress + bouncer: MultiAddress + poolId: number +} + +/** + * Stake funds with a pool. The amount to bond is transferred from the member to the + * pools account and immediately increases the pools bond. + * + * # Note + * + * * An account can only be a member of a single pool. + * * An account cannot join the same pool multiple times. + * * This call will *not* dust the member account, so the member must have at least + * `existential deposit + amount` in their account. + * * Only a pool with [`PoolState::Open`] can be joined + */ +export interface NominationPoolsCall_join { + __kind: 'join' + amount: bigint + poolId: number +} + +/** + * Nominate on behalf of the pool. + * + * The dispatch origin of this call must be signed by the pool nominator or the pool + * root role. + * + * This directly forward the call to the staking pallet, on behalf of the pool bonded + * account. + */ +export interface NominationPoolsCall_nominate { + __kind: 'nominate' + poolId: number + validators: AccountId32[] +} + +/** + * Call `withdraw_unbonded` for the pools account. This call can be made by any account. + * + * This is useful if their are too many unlocking chunks to call `unbond`, and some + * can be cleared by withdrawing. In the case there are too many unlocking chunks, the user + * would probably see an error like `NoMoreChunks` emitted from the staking system when + * they attempt to unbond. + */ +export interface NominationPoolsCall_pool_withdraw_unbonded { + __kind: 'pool_withdraw_unbonded' + poolId: number + numSlashingSpans: number +} + +/** + * Allows a pool member to set a claim permission to allow or disallow permissionless + * bonding and withdrawing. + * + * By default, this is `Permissioned`, which implies only the pool member themselves can + * claim their pending rewards. If a pool member wishes so, they can set this to + * `PermissionlessAll` to allow any account to claim their rewards and bond extra to the + * pool. + * + * # Arguments + * + * * `origin` - Member of a pool. + * * `actor` - Account to claim reward. // improve this + */ +export interface NominationPoolsCall_set_claim_permission { + __kind: 'set_claim_permission' + permission: ClaimPermission +} + +/** + * Set the commission of a pool. + * Both a commission percentage and a commission payee must be provided in the `current` + * tuple. Where a `current` of `None` is provided, any current commission will be removed. + * + * - If a `None` is supplied to `new_commission`, existing commission will be removed. + */ +export interface NominationPoolsCall_set_commission { + __kind: 'set_commission' + poolId: number + newCommission?: ([Perbill, AccountId32] | undefined) +} + +/** + * Set the commission change rate for a pool. + * + * Initial change rate is not bounded, whereas subsequent updates can only be more + * restrictive than the current. + */ +export interface NominationPoolsCall_set_commission_change_rate { + __kind: 'set_commission_change_rate' + poolId: number + changeRate: CommissionChangeRate +} + +/** + * Set the maximum commission of a pool. + * + * - Initial max can be set to any `Perbill`, and only smaller values thereafter. + * - Current commission will be lowered in the event it is higher than a new max + * commission. + */ +export interface NominationPoolsCall_set_commission_max { + __kind: 'set_commission_max' + poolId: number + maxCommission: Perbill +} + +/** + * Update configurations for the nomination pools. The origin for this call must be + * Root. + * + * # Arguments + * + * * `min_join_bond` - Set [`MinJoinBond`]. + * * `min_create_bond` - Set [`MinCreateBond`]. + * * `max_pools` - Set [`MaxPools`]. + * * `max_members` - Set [`MaxPoolMembers`]. + * * `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]. + * * `global_max_commission` - Set [`GlobalMaxCommission`]. + */ +export interface NominationPoolsCall_set_configs { + __kind: 'set_configs' + minJoinBond: Type_309 + minCreateBond: Type_309 + maxPools: Type_310 + maxMembers: Type_310 + maxMembersPerPool: Type_310 + globalMaxCommission: Type_311 +} + +/** + * Set a new metadata for the pool. + * + * The dispatch origin of this call must be signed by the bouncer, or the root role of the + * pool. + */ +export interface NominationPoolsCall_set_metadata { + __kind: 'set_metadata' + poolId: number + metadata: Bytes +} + +/** + * Set a new state for the pool. + * + * If a pool is already in the `Destroying` state, then under no condition can its state + * change again. + * + * The dispatch origin of this call must be either: + * + * 1. signed by the bouncer, or the root role of the pool, + * 2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and + * then the state of the pool can be permissionlessly changed to `Destroying`. + */ +export interface NominationPoolsCall_set_state { + __kind: 'set_state' + poolId: number + state: PoolState +} + +/** + * Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It + * implicitly collects the rewards one last time, since not doing so would mean some + * rewards would be forfeited. + * + * Under certain conditions, this call can be dispatched permissionlessly (i.e. by any + * account). + * + * # Conditions for a permissionless dispatch. + * + * * The pool is blocked and the caller is either the root or bouncer. This is refereed to + * as a kick. + * * The pool is destroying and the member is not the depositor. + * * The pool is destroying, the member is the depositor and no other members are in the + * pool. + * + * ## Conditions for permissioned dispatch (i.e. the caller is also the + * `member_account`): + * + * * The caller is not the depositor. + * * The caller is the depositor, the pool is destroying and no other members are in the + * pool. + * + * # Note + * + * If there are too many unlocking chunks to unbond with the pool account, + * [`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks. + * The [`StakingInterface::unbond`] will implicitly call [`Call::pool_withdraw_unbonded`] + * to try to free chunks if necessary (ie. if unbound was called and no unlocking chunks + * are available). However, it may not be possible to release the current unlocking chunks, + * in which case, the result of this call will likely be the `NoMoreChunks` error from the + * staking system. + */ +export interface NominationPoolsCall_unbond { + __kind: 'unbond' + memberAccount: MultiAddress + unbondingPoints: bigint +} + +/** + * Update the roles of the pool. + * + * The root is the only entity that can change any of the roles, including itself, + * excluding the depositor, who can never change. + * + * It emits an event, notifying UIs of the role change. This event is quite relevant to + * most pool members and they should be informed of changes to pool roles. + */ +export interface NominationPoolsCall_update_roles { + __kind: 'update_roles' + poolId: number + newRoot: Type_312 + newNominator: Type_312 + newBouncer: Type_312 +} + +/** + * Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an + * error is returned. + * + * Under certain conditions, this call can be dispatched permissionlessly (i.e. by any + * account). + * + * # Conditions for a permissionless dispatch + * + * * The pool is in destroy mode and the target is not the depositor. + * * The target is the depositor and they are the only member in the sub pools. + * * The pool is blocked and the caller is either the root or bouncer. + * + * # Conditions for permissioned dispatch + * + * * The caller is the target and they are not the depositor. + * + * # Note + * + * If the target is the depositor, the pool will be destroyed. + */ +export interface NominationPoolsCall_withdraw_unbonded { + __kind: 'withdraw_unbonded' + memberAccount: MultiAddress + numSlashingSpans: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const NisCounterpartBalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + }), + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + set_balance_deprecated: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + oldReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_allow_death: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + upgrade_accounts: sts.enumStruct({ + who: sts.array(() => AccountId32), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type NisCounterpartBalancesCall = NisCounterpartBalancesCall_force_set_balance | NisCounterpartBalancesCall_force_transfer | NisCounterpartBalancesCall_force_unreserve | NisCounterpartBalancesCall_set_balance_deprecated | NisCounterpartBalancesCall_transfer | NisCounterpartBalancesCall_transfer_all | NisCounterpartBalancesCall_transfer_allow_death | NisCounterpartBalancesCall_transfer_keep_alive | NisCounterpartBalancesCall_upgrade_accounts + +/** + * Set the regular balance of a given account. + * + * The dispatch origin for this call is `root`. + */ +export interface NisCounterpartBalancesCall_force_set_balance { + __kind: 'force_set_balance' + who: MultiAddress + newFree: bigint +} + +/** + * Exactly as `transfer_allow_death`, except the origin must be root and the source account + * may be specified. + */ +export interface NisCounterpartBalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * Unreserve some balance from a user by force. + * + * Can only be called by ROOT. + */ +export interface NisCounterpartBalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * Set the regular balance of a given account; it also takes a reserved balance but this + * must be the same as the account's current reserved balance. + * + * The dispatch origin for this call is `root`. + * + * WARNING: This call is DEPRECATED! Use `force_set_balance` instead. + */ +export interface NisCounterpartBalancesCall_set_balance_deprecated { + __kind: 'set_balance_deprecated' + who: MultiAddress + newFree: bigint + oldReserved: bigint +} + +/** + * Alias for `transfer_allow_death`, provided only for name-wise compatibility. + * + * WARNING: DEPRECATED! Will be released in approximately 3 months. + */ +export interface NisCounterpartBalancesCall_transfer { + __kind: 'transfer' + dest: MultiAddress + value: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). + */ +export interface NisCounterpartBalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer_allow_death` will set the `FreeBalance` of the sender and receiver. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + */ +export interface NisCounterpartBalancesCall_transfer_allow_death { + __kind: 'transfer_allow_death' + dest: MultiAddress + value: bigint +} + +/** + * Same as the [`transfer_allow_death`] call, but with a check that the transfer will not + * kill the origin account. + * + * 99% of the time you want [`transfer_allow_death`] instead. + * + * [`transfer_allow_death`]: struct.Pallet.html#method.transfer + */ +export interface NisCounterpartBalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * Upgrade a specified account. + * + * - `origin`: Must be `Signed`. + * - `who`: The account to be upgraded. + * + * This will waive the transaction fee if at least all but 10% of the accounts needed to + * be upgraded. (We let some not have to be upgraded just in order to allow for the + * possibililty of churn). + */ +export interface NisCounterpartBalancesCall_upgrade_accounts { + __kind: 'upgrade_accounts' + who: AccountId32[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const NisCall: sts.Type = sts.closedEnum(() => { + return { + communify: sts.enumStruct({ + index: sts.number(), + }), + fund_deficit: sts.unit(), + place_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + privatize: sts.enumStruct({ + index: sts.number(), + }), + retract_bid: sts.enumStruct({ + amount: sts.bigint(), + duration: sts.number(), + }), + thaw_communal: sts.enumStruct({ + index: sts.number(), + }), + thaw_private: sts.enumStruct({ + index: sts.number(), + maybeProportion: sts.option(() => Perquintill), + }), + } +}) + +export const Perquintill = sts.bigint() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type NisCall = NisCall_communify | NisCall_fund_deficit | NisCall_place_bid | NisCall_privatize | NisCall_retract_bid | NisCall_thaw_communal | NisCall_thaw_private + +/** + * Make a private receipt communal and create fungible counterparts for its owner. + */ +export interface NisCall_communify { + __kind: 'communify' + index: number +} + +/** + * Ensure we have sufficient funding for all potential payouts. + * + * - `origin`: Must be accepted by `FundOrigin`. + */ +export interface NisCall_fund_deficit { + __kind: 'fund_deficit' +} + +/** + * Place a bid. + * + * Origin must be Signed, and account must have at least `amount` in free balance. + * + * - `amount`: The amount of the bid; these funds will be reserved, and if/when + * consolidated, removed. Must be at least `MinBid`. + * - `duration`: The number of periods before which the newly consolidated bid may be + * thawed. Must be greater than 1 and no more than `QueueCount`. + * + * Complexities: + * - `Queues[duration].len()` (just take max). + */ +export interface NisCall_place_bid { + __kind: 'place_bid' + amount: bigint + duration: number +} + +/** + * Make a communal receipt private and burn fungible counterparts from its owner. + */ +export interface NisCall_privatize { + __kind: 'privatize' + index: number +} + +/** + * Retract a previously placed bid. + * + * Origin must be Signed, and the account should have previously issued a still-active bid + * of `amount` for `duration`. + * + * - `amount`: The amount of the previous bid. + * - `duration`: The duration of the previous bid. + */ +export interface NisCall_retract_bid { + __kind: 'retract_bid' + amount: bigint + duration: number +} + +/** + * Reduce or remove an outstanding receipt, placing the according proportion of funds into + * the account of the owner. + * + * - `origin`: Must be Signed and the account must be the owner of the fungible counterpart + * for receipt `index`. + * - `index`: The index of the receipt. + */ +export interface NisCall_thaw_communal { + __kind: 'thaw_communal' + index: number +} + +/** + * Reduce or remove an outstanding receipt, placing the according proportion of funds into + * the account of the owner. + * + * - `origin`: Must be Signed and the account must be the owner of the receipt `index` as + * well as any fungible counterpart. + * - `index`: The index of the receipt. + * - `portion`: If `Some`, then only the given portion of the receipt should be thawed. If + * `None`, then all of it should be. + */ +export interface NisCall_thaw_private { + __kind: 'thaw_private' + index: number + maybeProportion?: (Perquintill | undefined) +} + +export type Perquintill = bigint + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const MultisigCall: sts.Type = sts.closedEnum(() => { + return { + approve_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + callHash: sts.bytes(), + maxWeight: Weight, + }), + as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + maybeTimepoint: sts.option(() => Timepoint), + call: Call, + maxWeight: Weight, + }), + as_multi_threshold_1: sts.enumStruct({ + otherSignatories: sts.array(() => AccountId32), + call: Call, + }), + cancel_as_multi: sts.enumStruct({ + threshold: sts.number(), + otherSignatories: sts.array(() => AccountId32), + timepoint: Timepoint, + callHash: sts.bytes(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type MultisigCall = MultisigCall_approve_as_multi | MultisigCall_as_multi | MultisigCall_as_multi_threshold_1 | MultisigCall_cancel_as_multi + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call_hash`: The hash of the call to be executed. + * + * NOTE: If this is the final approval, you will want to use `as_multi` instead. + * + * ## Complexity + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + */ +export interface MultisigCall_approve_as_multi { + __kind: 'approve_as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + callHash: Bytes + maxWeight: Weight +} + +/** + * Register approval for a dispatch to be made from a deterministic composite account if + * approved by a total of `threshold - 1` of `other_signatories`. + * + * If there are enough, then dispatch the call. + * + * Payment: `DepositBase` will be reserved if this is the first approval, plus + * `threshold` times `DepositFactor`. It is returned once this dispatch happens or + * is cancelled. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + * not the first approval, then it must be `Some`, with the timepoint (block number and + * transaction index) of the first approval transaction. + * - `call`: The call to be executed. + * + * NOTE: Unless this is the final approval, you will generally want to use + * `approve_as_multi` instead, since it only requires a hash of the call. + * + * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise + * on success, result is `Ok` and the result from the interior call, if it was executed, + * may be found in the deposited `MultisigExecuted` event. + * + * ## Complexity + * - `O(S + Z + Call)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + * - One encode & hash, both of complexity `O(S)`. + * - Up to one binary search and insert (`O(logS + S)`). + * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + * - One event. + * - The weight of the `call`. + * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + * taken for its lifetime of `DepositBase + threshold * DepositFactor`. + */ +export interface MultisigCall_as_multi { + __kind: 'as_multi' + threshold: number + otherSignatories: AccountId32[] + maybeTimepoint?: (Timepoint | undefined) + call: Call + maxWeight: Weight +} + +/** + * Immediately dispatch a multi-signature call using a single approval from the caller. + * + * The dispatch origin for this call must be _Signed_. + * + * - `other_signatories`: The accounts (other than the sender) who are part of the + * multi-signature, but do not participate in the approval process. + * - `call`: The call to be executed. + * + * Result is equivalent to the dispatched result. + * + * ## Complexity + * O(Z + C) where Z is the length of the call and C its execution weight. + */ +export interface MultisigCall_as_multi_threshold_1 { + __kind: 'as_multi_threshold_1' + otherSignatories: AccountId32[] + call: Call +} + +/** + * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously + * for this operation will be unreserved on success. + * + * The dispatch origin for this call must be _Signed_. + * + * - `threshold`: The total number of approvals for this dispatch before it is executed. + * - `other_signatories`: The accounts (other than the sender) who can approve this + * dispatch. May not be empty. + * - `timepoint`: The timepoint (block number and transaction index) of the first approval + * transaction for this dispatch. + * - `call_hash`: The hash of the call to be executed. + * + * ## Complexity + * - `O(S)`. + * - Up to one balance-reserve or unreserve operation. + * - One passthrough operation, one insert, both `O(S)` where `S` is the number of + * signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + * - One encode & hash, both of complexity `O(S)`. + * - One event. + * - I/O: 1 read `O(S)`, one remove. + * - Storage: removes one item. + */ +export interface MultisigCall_cancel_as_multi { + __kind: 'cancel_as_multi' + threshold: number + otherSignatories: AccountId32[] + timepoint: Timepoint + callHash: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const MessageQueueCall: sts.Type = sts.closedEnum(() => { + return { + execute_overweight: sts.enumStruct({ + messageOrigin: AggregateMessageOrigin, + page: sts.number(), + index: sts.number(), + weightLimit: Weight, + }), + reap_page: sts.enumStruct({ + messageOrigin: AggregateMessageOrigin, + pageIndex: sts.number(), + }), + } +}) + +export const AggregateMessageOrigin: sts.Type = sts.closedEnum(() => { + return { + Ump: UmpQueueId, + } +}) + +export const UmpQueueId: sts.Type = sts.closedEnum(() => { + return { + Para: Id, + } +}) + +export type UmpQueueId = UmpQueueId_Para + +export interface UmpQueueId_Para { + __kind: 'Para' + value: Id +} + +export type AggregateMessageOrigin = AggregateMessageOrigin_Ump + +export interface AggregateMessageOrigin_Ump { + __kind: 'Ump' + value: UmpQueueId +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type MessageQueueCall = MessageQueueCall_execute_overweight | MessageQueueCall_reap_page + +/** + * Execute an overweight message. + * + * Temporary processing errors will be propagated whereas permanent errors are treated + * as success condition. + * + * - `origin`: Must be `Signed`. + * - `message_origin`: The origin from which the message to be executed arrived. + * - `page`: The page in the queue in which the message to be executed is sitting. + * - `index`: The index into the queue of the message to be executed. + * - `weight_limit`: The maximum amount of weight allowed to be consumed in the execution + * of the message. + * + * Benchmark complexity considerations: O(index + weight_limit). + */ +export interface MessageQueueCall_execute_overweight { + __kind: 'execute_overweight' + messageOrigin: AggregateMessageOrigin + page: number + index: number + weightLimit: Weight +} + +/** + * Remove a page which has no more messages remaining to be processed or is stale. + */ +export interface MessageQueueCall_reap_page { + __kind: 'reap_page' + messageOrigin: AggregateMessageOrigin + pageIndex: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const InitializerCall: sts.Type = sts.closedEnum(() => { + return { + force_approve: sts.enumStruct({ + upTo: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type InitializerCall = InitializerCall_force_approve + +/** + * Issue a signal to the consensus engine to forcibly act as though all parachain + * blocks in all relay chain blocks up to and including the given number in the current + * chain are valid and should be finalized. + */ +export interface InitializerCall_force_approve { + __kind: 'force_approve' + upTo: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const IndicesCall: sts.Type = sts.closedEnum(() => { + return { + claim: sts.enumStruct({ + index: sts.number(), + }), + force_transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + freeze: sts.boolean(), + }), + free: sts.enumStruct({ + index: sts.number(), + }), + freeze: sts.enumStruct({ + index: sts.number(), + }), + transfer: sts.enumStruct({ + new: MultiAddress, + index: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type IndicesCall = IndicesCall_claim | IndicesCall_force_transfer | IndicesCall_free | IndicesCall_freeze | IndicesCall_transfer + +/** + * Assign an previously unassigned index. + * + * Payment: `Deposit` is reserved from the sender account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be claimed. This must not be in use. + * + * Emits `IndexAssigned` if successful. + * + * ## Complexity + * - `O(1)`. + */ +export interface IndicesCall_claim { + __kind: 'claim' + index: number +} + +/** + * Force an index to an account. This doesn't require a deposit. If the index is already + * held, then any deposit is reimbursed to its current owner. + * + * The dispatch origin for this call must be _Root_. + * + * - `index`: the index to be (re-)assigned. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. + * + * Emits `IndexAssigned` if successful. + * + * ## Complexity + * - `O(1)`. + */ +export interface IndicesCall_force_transfer { + __kind: 'force_transfer' + new: MultiAddress + index: number + freeze: boolean +} + +/** + * Free up an index owned by the sender. + * + * Payment: Any previous deposit placed for the index is unreserved in the sender account. + * + * The dispatch origin for this call must be _Signed_ and the sender must own the index. + * + * - `index`: the index to be freed. This must be owned by the sender. + * + * Emits `IndexFreed` if successful. + * + * ## Complexity + * - `O(1)`. + */ +export interface IndicesCall_free { + __kind: 'free' + index: number +} + +/** + * Freeze an index so it will always point to the sender account. This consumes the + * deposit. + * + * The dispatch origin for this call must be _Signed_ and the signing account must have a + * non-frozen account `index`. + * + * - `index`: the index to be frozen in place. + * + * Emits `IndexFrozen` if successful. + * + * ## Complexity + * - `O(1)`. + */ +export interface IndicesCall_freeze { + __kind: 'freeze' + index: number +} + +/** + * Assign an index already owned by the sender to another account. The balance reservation + * is effectively transferred to the new account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `index`: the index to be re-assigned. This must be owned by the sender. + * - `new`: the new owner of the index. This function is a no-op if it is equal to sender. + * + * Emits `IndexAssigned` if successful. + * + * ## Complexity + * - `O(1)`. + */ +export interface IndicesCall_transfer { + __kind: 'transfer' + new: MultiAddress + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ImOnlineCall: sts.Type = sts.closedEnum(() => { + return { + heartbeat: sts.enumStruct({ + heartbeat: Heartbeat, + signature: sts.bytes(), + }), + } +}) + +export const Heartbeat: sts.Type = sts.struct(() => { + return { + blockNumber: sts.number(), + networkState: OpaqueNetworkState, + sessionIndex: sts.number(), + authorityIndex: sts.number(), + validatorsLen: sts.number(), + } +}) + +export const OpaqueNetworkState: sts.Type = sts.struct(() => { + return { + peerId: OpaquePeerId, + externalAddresses: sts.array(() => OpaqueMultiaddr), + } +}) + +export const OpaqueMultiaddr = sts.bytes() + +export const OpaquePeerId = sts.bytes() + +export interface OpaqueNetworkState { + peerId: OpaquePeerId + externalAddresses: OpaqueMultiaddr[] +} + +export type OpaqueMultiaddr = Bytes + +export type OpaquePeerId = Bytes + +export interface Heartbeat { + blockNumber: number + networkState: OpaqueNetworkState + sessionIndex: number + authorityIndex: number + validatorsLen: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ImOnlineCall = ImOnlineCall_heartbeat + +/** + * ## Complexity: + * - `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is length of + * `heartbeat.network_state.external_address` + * - `O(K)`: decoding of length `K` + * - `O(E)`: decoding/encoding of length `E` + */ +export interface ImOnlineCall_heartbeat { + __kind: 'heartbeat' + heartbeat: Heartbeat + signature: Bytes +} + +/** + * Identity pallet declaration. + */ +export const IdentityCall: sts.Type = sts.closedEnum(() => { + return { + add_registrar: sts.enumStruct({ + account: MultiAddress, + }), + add_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + cancel_request: sts.enumStruct({ + regIndex: sts.number(), + }), + clear_identity: sts.unit(), + kill_identity: sts.enumStruct({ + target: MultiAddress, + }), + provide_judgement: sts.enumStruct({ + regIndex: sts.number(), + target: MultiAddress, + judgement: Judgement, + identity: H256, + }), + quit_sub: sts.unit(), + remove_sub: sts.enumStruct({ + sub: MultiAddress, + }), + rename_sub: sts.enumStruct({ + sub: MultiAddress, + data: Data, + }), + request_judgement: sts.enumStruct({ + regIndex: sts.number(), + maxFee: sts.bigint(), + }), + set_account_id: sts.enumStruct({ + index: sts.number(), + new: MultiAddress, + }), + set_fee: sts.enumStruct({ + index: sts.number(), + fee: sts.bigint(), + }), + set_fields: sts.enumStruct({ + index: sts.number(), + fields: BitFlags, + }), + set_identity: sts.enumStruct({ + info: IdentityInfo, + }), + set_subs: sts.enumStruct({ + subs: sts.array(() => sts.tuple(() => [AccountId32, Data])), + }), + } +}) + +export const IdentityInfo: sts.Type = sts.struct(() => { + return { + additional: sts.array(() => sts.tuple(() => [Data, Data])), + display: Data, + legal: Data, + web: Data, + riot: Data, + email: Data, + pgpFingerprint: sts.option(() => sts.bytes()), + image: Data, + twitter: Data, + } +}) + +export interface IdentityInfo { + additional: [Data, Data][] + display: Data + legal: Data + web: Data + riot: Data + email: Data + pgpFingerprint?: (Bytes | undefined) + image: Data + twitter: Data +} + +export type Data = Data_BlakeTwo256 | Data_Keccak256 | Data_None | Data_Raw0 | Data_Raw1 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw2 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw3 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Sha256 | Data_ShaThree256 + +export interface Data_BlakeTwo256 { + __kind: 'BlakeTwo256' + value: Bytes +} + +export interface Data_Keccak256 { + __kind: 'Keccak256' + value: Bytes +} + +export interface Data_None { + __kind: 'None' +} + +export interface Data_Raw0 { + __kind: 'Raw0' + value: Bytes +} + +export interface Data_Raw1 { + __kind: 'Raw1' + value: Bytes +} + +export interface Data_Raw10 { + __kind: 'Raw10' + value: Bytes +} + +export interface Data_Raw11 { + __kind: 'Raw11' + value: Bytes +} + +export interface Data_Raw12 { + __kind: 'Raw12' + value: Bytes +} + +export interface Data_Raw13 { + __kind: 'Raw13' + value: Bytes +} + +export interface Data_Raw14 { + __kind: 'Raw14' + value: Bytes +} + +export interface Data_Raw15 { + __kind: 'Raw15' + value: Bytes +} + +export interface Data_Raw16 { + __kind: 'Raw16' + value: Bytes +} + +export interface Data_Raw17 { + __kind: 'Raw17' + value: Bytes +} + +export interface Data_Raw18 { + __kind: 'Raw18' + value: Bytes +} + +export interface Data_Raw19 { + __kind: 'Raw19' + value: Bytes +} + +export interface Data_Raw2 { + __kind: 'Raw2' + value: Bytes +} + +export interface Data_Raw20 { + __kind: 'Raw20' + value: Bytes +} + +export interface Data_Raw21 { + __kind: 'Raw21' + value: Bytes +} + +export interface Data_Raw22 { + __kind: 'Raw22' + value: Bytes +} + +export interface Data_Raw23 { + __kind: 'Raw23' + value: Bytes +} + +export interface Data_Raw24 { + __kind: 'Raw24' + value: Bytes +} + +export interface Data_Raw25 { + __kind: 'Raw25' + value: Bytes +} + +export interface Data_Raw26 { + __kind: 'Raw26' + value: Bytes +} + +export interface Data_Raw27 { + __kind: 'Raw27' + value: Bytes +} + +export interface Data_Raw28 { + __kind: 'Raw28' + value: Bytes +} + +export interface Data_Raw29 { + __kind: 'Raw29' + value: Bytes +} + +export interface Data_Raw3 { + __kind: 'Raw3' + value: Bytes +} + +export interface Data_Raw30 { + __kind: 'Raw30' + value: Bytes +} + +export interface Data_Raw31 { + __kind: 'Raw31' + value: Bytes +} + +export interface Data_Raw32 { + __kind: 'Raw32' + value: Bytes +} + +export interface Data_Raw4 { + __kind: 'Raw4' + value: Bytes +} + +export interface Data_Raw5 { + __kind: 'Raw5' + value: Bytes +} + +export interface Data_Raw6 { + __kind: 'Raw6' + value: Bytes +} + +export interface Data_Raw7 { + __kind: 'Raw7' + value: Bytes +} + +export interface Data_Raw8 { + __kind: 'Raw8' + value: Bytes +} + +export interface Data_Raw9 { + __kind: 'Raw9' + value: Bytes +} + +export interface Data_Sha256 { + __kind: 'Sha256' + value: Bytes +} + +export interface Data_ShaThree256 { + __kind: 'ShaThree256' + value: Bytes +} + +export const BitFlags = sts.bigint() + +export const Judgement: sts.Type = sts.closedEnum(() => { + return { + Erroneous: sts.unit(), + FeePaid: sts.bigint(), + KnownGood: sts.unit(), + LowQuality: sts.unit(), + OutOfDate: sts.unit(), + Reasonable: sts.unit(), + Unknown: sts.unit(), + } +}) + +export type Judgement = Judgement_Erroneous | Judgement_FeePaid | Judgement_KnownGood | Judgement_LowQuality | Judgement_OutOfDate | Judgement_Reasonable | Judgement_Unknown + +export interface Judgement_Erroneous { + __kind: 'Erroneous' +} + +export interface Judgement_FeePaid { + __kind: 'FeePaid' + value: bigint +} + +export interface Judgement_KnownGood { + __kind: 'KnownGood' +} + +export interface Judgement_LowQuality { + __kind: 'LowQuality' +} + +export interface Judgement_OutOfDate { + __kind: 'OutOfDate' +} + +export interface Judgement_Reasonable { + __kind: 'Reasonable' +} + +export interface Judgement_Unknown { + __kind: 'Unknown' +} + +export const Data: sts.Type = sts.closedEnum(() => { + return { + BlakeTwo256: sts.bytes(), + Keccak256: sts.bytes(), + None: sts.unit(), + Raw0: sts.bytes(), + Raw1: sts.bytes(), + Raw10: sts.bytes(), + Raw11: sts.bytes(), + Raw12: sts.bytes(), + Raw13: sts.bytes(), + Raw14: sts.bytes(), + Raw15: sts.bytes(), + Raw16: sts.bytes(), + Raw17: sts.bytes(), + Raw18: sts.bytes(), + Raw19: sts.bytes(), + Raw2: sts.bytes(), + Raw20: sts.bytes(), + Raw21: sts.bytes(), + Raw22: sts.bytes(), + Raw23: sts.bytes(), + Raw24: sts.bytes(), + Raw25: sts.bytes(), + Raw26: sts.bytes(), + Raw27: sts.bytes(), + Raw28: sts.bytes(), + Raw29: sts.bytes(), + Raw3: sts.bytes(), + Raw30: sts.bytes(), + Raw31: sts.bytes(), + Raw32: sts.bytes(), + Raw4: sts.bytes(), + Raw5: sts.bytes(), + Raw6: sts.bytes(), + Raw7: sts.bytes(), + Raw8: sts.bytes(), + Raw9: sts.bytes(), + Sha256: sts.bytes(), + ShaThree256: sts.bytes(), + } +}) + +/** + * Identity pallet declaration. + */ +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_add_sub | IdentityCall_cancel_request | IdentityCall_clear_identity | IdentityCall_kill_identity | IdentityCall_provide_judgement | IdentityCall_quit_sub | IdentityCall_remove_sub | IdentityCall_rename_sub | IdentityCall_request_judgement | IdentityCall_set_account_id | IdentityCall_set_fee | IdentityCall_set_fields | IdentityCall_set_identity | IdentityCall_set_subs + +/** + * Add a registrar to the system. + * + * The dispatch origin for this call must be `T::RegistrarOrigin`. + * + * - `account`: the account of the registrar. + * + * Emits `RegistrarAdded` if successful. + * + * ## Complexity + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + */ +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: MultiAddress +} + +/** + * Add the given account to the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_add_sub { + __kind: 'add_sub' + sub: MultiAddress + data: Data +} + +/** + * Cancel a previous request. + * + * Payment: A previously reserved deposit is returned on success. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * + * Emits `JudgementUnrequested` if successful. + * + * ## Complexity + * - `O(R + X)`. + * - where `R` registrar-count (governance-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + */ +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: number +} + +/** + * Clear an account's identity info and all sub-accounts and return all deposits. + * + * Payment: All reserved balances on the account are returned. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * Emits `IdentityCleared` if successful. + * + * ## Complexity + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + */ +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' +} + +/** + * Remove an account's identity and sub-account information and slash the deposits. + * + * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by + * `Slash`. Verification request deposits are not returned; they should be cancelled + * manually using `cancel_request`. + * + * The dispatch origin for this call must match `T::ForceOrigin`. + * + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * + * Emits `IdentityKilled` if successful. + * + * ## Complexity + * - `O(R + S + X)` + * - where `R` registrar-count (governance-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + */ +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: MultiAddress +} + +/** + * Provide a judgement for an account's identity. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. + * + * - `reg_index`: the index of the registrar whose judgement is being made. + * - `target`: the account whose identity the judgement is upon. This must be an account + * with a registered identity. + * - `judgement`: the judgement of the registrar of index `reg_index` about `target`. + * - `identity`: The hash of the [`IdentityInfo`] for that the judgement is provided. + * + * Emits `JudgementGiven` if successful. + * + * ## Complexity + * - `O(R + X)`. + * - where `R` registrar-count (governance-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + */ +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: MultiAddress + judgement: Judgement + identity: H256 +} + +/** + * Remove the sender as a sub-account. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. + * + * NOTE: This should not normally be used, but is provided in the case that the non- + * controller of an account is maliciously registered as a sub-account. + */ +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' +} + +/** + * Remove the given account from the sender's subs. + * + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: MultiAddress +} + +/** + * Alter the associated name of the given sub-account. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. + */ +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: MultiAddress + data: Data +} + +/** + * Request a judgement from a registrar. + * + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. + * + * - `reg_index`: The index of the registrar whose judgement is requested. + * - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: + * + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` + * + * Emits `JudgementRequested` if successful. + * + * ## Complexity + * - `O(R + X)`. + * - where `R` registrar-count (governance-bounded). + * - where `X` additional-field-count (deposit-bounded and code-bounded). + */ +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint +} + +/** + * Change the account associated with a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. + * + * ## Complexity + * - `O(R)`. + * - where `R` registrar-count (governance-bounded). + */ +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: MultiAddress +} + +/** + * Set the fee required for a judgement to be requested from a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fee`: the new fee. + * + * ## Complexity + * - `O(R)`. + * - where `R` registrar-count (governance-bounded). + */ +export interface IdentityCall_set_fee { + __kind: 'set_fee' + index: number + fee: bigint +} + +/** + * Set the field information for a registrar. + * + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. + * + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. + * + * ## Complexity + * - `O(R)`. + * - where `R` registrar-count (governance-bounded). + */ +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: BitFlags +} + +/** + * Set an account's identity information and reserve the appropriate deposit. + * + * If the account already has identity information, the deposit is taken as part payment + * for the new deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * - `info`: The identity information. + * + * Emits `IdentitySet` if successful. + * + * ## Complexity + * - `O(X + X' + R)` + * - where `X` additional-field-count (deposit-bounded and code-bounded) + * - where `R` judgements-count (registrar-count-bounded) + */ +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo +} + +/** + * Set the sub-accounts of the sender. + * + * Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned + * and an amount `SubAccountDeposit` will be reserved for each item in `subs`. + * + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. + * + * - `subs`: The identity's (new) sub-accounts. + * + * ## Complexity + * - `O(P + S)` + * - where `P` old-subs-count (hard- and deposit-bounded). + * - where `S` subs-count (hard- and deposit-bounded). + */ +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [AccountId32, Data][] +} + +export type BitFlags = bigint + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const HrmpCall: sts.Type = sts.closedEnum(() => { + return { + force_clean_hrmp: sts.enumStruct({ + para: Id, + inbound: sts.number(), + outbound: sts.number(), + }), + force_open_hrmp_channel: sts.enumStruct({ + sender: Id, + recipient: Id, + maxCapacity: sts.number(), + maxMessageSize: sts.number(), + }), + force_process_hrmp_close: sts.enumStruct({ + channels: sts.number(), + }), + force_process_hrmp_open: sts.enumStruct({ + channels: sts.number(), + }), + hrmp_accept_open_channel: sts.enumStruct({ + sender: Id, + }), + hrmp_cancel_open_request: sts.enumStruct({ + channelId: HrmpChannelId, + openRequests: sts.number(), + }), + hrmp_close_channel: sts.enumStruct({ + channelId: HrmpChannelId, + }), + hrmp_init_open_channel: sts.enumStruct({ + recipient: Id, + proposedMaxCapacity: sts.number(), + proposedMaxMessageSize: sts.number(), + }), + } +}) + +export const HrmpChannelId: sts.Type = sts.struct(() => { + return { + sender: Id, + recipient: Id, + } +}) + +export interface HrmpChannelId { + sender: Id + recipient: Id +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type HrmpCall = HrmpCall_force_clean_hrmp | HrmpCall_force_open_hrmp_channel | HrmpCall_force_process_hrmp_close | HrmpCall_force_process_hrmp_open | HrmpCall_hrmp_accept_open_channel | HrmpCall_hrmp_cancel_open_request | HrmpCall_hrmp_close_channel | HrmpCall_hrmp_init_open_channel + +/** + * This extrinsic triggers the cleanup of all the HRMP storage items that + * a para may have. Normally this happens once per session, but this allows + * you to trigger the cleanup immediately for a specific parachain. + * + * Origin must be Root. + * + * Number of inbound and outbound channels for `para` must be provided as witness data of weighing. + */ +export interface HrmpCall_force_clean_hrmp { + __kind: 'force_clean_hrmp' + para: Id + inbound: number + outbound: number +} + +/** + * Open a channel from a `sender` to a `recipient` `ParaId` using the Root origin. Although + * opened by Root, the `max_capacity` and `max_message_size` are still subject to the Relay + * Chain's configured limits. + * + * Expected use is when one of the `ParaId`s involved in the channel is governed by the + * Relay Chain, e.g. a common good parachain. + */ +export interface HrmpCall_force_open_hrmp_channel { + __kind: 'force_open_hrmp_channel' + sender: Id + recipient: Id + maxCapacity: number + maxMessageSize: number +} + +/** + * Force process HRMP close channel requests. + * + * If there are pending HRMP close channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of closing channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_close { + __kind: 'force_process_hrmp_close' + channels: number +} + +/** + * Force process HRMP open channel requests. + * + * If there are pending HRMP open channel requests, you can use this + * function process all of those requests immediately. + * + * Total number of opening channels must be provided as witness data of weighing. + */ +export interface HrmpCall_force_process_hrmp_open { + __kind: 'force_process_hrmp_open' + channels: number +} + +/** + * Accept a pending open channel request from the given sender. + * + * The channel will be opened only on the next session boundary. + */ +export interface HrmpCall_hrmp_accept_open_channel { + __kind: 'hrmp_accept_open_channel' + sender: Id +} + +/** + * This cancels a pending open channel request. It can be canceled by either of the sender + * or the recipient for that request. The origin must be either of those. + * + * The cancellation happens immediately. It is not possible to cancel the request if it is + * already accepted. + * + * Total number of open requests (i.e. `HrmpOpenChannelRequestsList`) must be provided as + * witness data. + */ +export interface HrmpCall_hrmp_cancel_open_request { + __kind: 'hrmp_cancel_open_request' + channelId: HrmpChannelId + openRequests: number +} + +/** + * Initiate unilateral closing of a channel. The origin must be either the sender or the + * recipient in the channel being closed. + * + * The closure can only happen on a session change. + */ +export interface HrmpCall_hrmp_close_channel { + __kind: 'hrmp_close_channel' + channelId: HrmpChannelId +} + +/** + * Initiate opening a channel from a parachain to a given recipient with given channel + * parameters. + * + * - `proposed_max_capacity` - specifies how many messages can be in the channel at once. + * - `proposed_max_message_size` - specifies the maximum size of the messages. + * + * These numbers are a subject to the relay-chain configuration limits. + * + * The channel can be opened only after the recipient confirms it and only on a session + * change. + */ +export interface HrmpCall_hrmp_init_open_channel { + __kind: 'hrmp_init_open_channel' + recipient: Id + proposedMaxCapacity: number + proposedMaxMessageSize: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const GrandpaCall: sts.Type = sts.closedEnum(() => { + return { + note_stalled: sts.enumStruct({ + delay: sts.number(), + bestFinalizedBlockNumber: sts.number(), + }), + report_equivocation: sts.enumStruct({ + equivocationProof: Type_101, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: Type_101, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const Type_101: sts.Type = sts.struct(() => { + return { + setId: sts.bigint(), + equivocation: Equivocation, + } +}) + +export const Equivocation: sts.Type = sts.closedEnum(() => { + return { + Precommit: Type_109, + Prevote: Type_103, + } +}) + +export const Type_103: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Prevote, Signature]), + second: sts.tuple(() => [Prevote, Signature]), + } +}) + +export const Signature = sts.bytes() + +export const Prevote: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Prevote { + targetHash: H256 + targetNumber: number +} + +export interface Type_103 { + roundNumber: bigint + identity: Public + first: [Prevote, Signature] + second: [Prevote, Signature] +} + +export type Signature = Bytes + +export const Type_109: sts.Type = sts.struct(() => { + return { + roundNumber: sts.bigint(), + identity: Public, + first: sts.tuple(() => [Precommit, Signature]), + second: sts.tuple(() => [Precommit, Signature]), + } +}) + +export const Precommit: sts.Type = sts.struct(() => { + return { + targetHash: H256, + targetNumber: sts.number(), + } +}) + +export interface Precommit { + targetHash: H256 + targetNumber: number +} + +export interface Type_109 { + roundNumber: bigint + identity: Public + first: [Precommit, Signature] + second: [Precommit, Signature] +} + +export type Equivocation = Equivocation_Precommit | Equivocation_Prevote + +export interface Equivocation_Precommit { + __kind: 'Precommit' + value: Type_109 +} + +export interface Equivocation_Prevote { + __kind: 'Prevote' + value: Type_103 +} + +export interface Type_101 { + setId: bigint + equivocation: Equivocation +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type GrandpaCall = GrandpaCall_note_stalled | GrandpaCall_report_equivocation | GrandpaCall_report_equivocation_unsigned + +/** + * Note that the current authority set of the GRANDPA finality gadget has stalled. + * + * This will trigger a forced authority set change at the beginning of the next session, to + * be enacted `delay` blocks after that. The `delay` should be high enough to safely assume + * that the block signalling the forced change will not be re-orged e.g. 1000 blocks. + * The block production rate (which may be slowed down because of finality lagging) should + * be taken into account when choosing the `delay`. The GRANDPA voters based on the new + * authority will start voting on top of `best_finalized_block_number` for new finalized + * blocks. `best_finalized_block_number` should be the highest of the latest finalized + * block of all validators of the new authority set. + * + * Only callable by root. + */ +export interface GrandpaCall_note_stalled { + __kind: 'note_stalled' + delay: number + bestFinalizedBlockNumber: number +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + */ +export interface GrandpaCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: Type_101 + keyOwnerProof: MembershipProof +} + +/** + * Report voter equivocation/misbehavior. This method will verify the + * equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence + * will be reported. + * + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface GrandpaCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: Type_101 + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const FellowshipReferendaCall: sts.Type = sts.closedEnum(() => { + return { + cancel: sts.enumStruct({ + index: sts.number(), + }), + kill: sts.enumStruct({ + index: sts.number(), + }), + nudge_referendum: sts.enumStruct({ + index: sts.number(), + }), + one_fewer_deciding: sts.enumStruct({ + track: sts.number(), + }), + place_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_decision_deposit: sts.enumStruct({ + index: sts.number(), + }), + refund_submission_deposit: sts.enumStruct({ + index: sts.number(), + }), + set_metadata: sts.enumStruct({ + index: sts.number(), + maybeHash: sts.option(() => H256), + }), + submit: sts.enumStruct({ + proposalOrigin: OriginCaller, + proposal: Bounded, + enactmentMoment: DispatchTime, + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type FellowshipReferendaCall = FellowshipReferendaCall_cancel | FellowshipReferendaCall_kill | FellowshipReferendaCall_nudge_referendum | FellowshipReferendaCall_one_fewer_deciding | FellowshipReferendaCall_place_decision_deposit | FellowshipReferendaCall_refund_decision_deposit | FellowshipReferendaCall_refund_submission_deposit | FellowshipReferendaCall_set_metadata | FellowshipReferendaCall_submit + +/** + * Cancel an ongoing referendum. + * + * - `origin`: must be the `CancelOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Cancelled`. + */ +export interface FellowshipReferendaCall_cancel { + __kind: 'cancel' + index: number +} + +/** + * Cancel an ongoing referendum and slash the deposits. + * + * - `origin`: must be the `KillOrigin`. + * - `index`: The index of the referendum to be cancelled. + * + * Emits `Killed` and `DepositSlashed`. + */ +export interface FellowshipReferendaCall_kill { + __kind: 'kill' + index: number +} + +/** + * Advance a referendum onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `index`: the referendum to be advanced. + */ +export interface FellowshipReferendaCall_nudge_referendum { + __kind: 'nudge_referendum' + index: number +} + +/** + * Advance a track onto its next logical state. Only used internally. + * + * - `origin`: must be `Root`. + * - `track`: the track to be advanced. + * + * Action item for when there is now one fewer referendum in the deciding phase and the + * `DecidingCount` is not yet updated. This means that we should either: + * - begin deciding another referendum (and leave `DecidingCount` alone); or + * - decrement `DecidingCount`. + */ +export interface FellowshipReferendaCall_one_fewer_deciding { + __kind: 'one_fewer_deciding' + track: number +} + +/** + * Post the Decision Deposit for a referendum. + * + * - `origin`: must be `Signed` and the account must have funds available for the + * referendum's track's Decision Deposit. + * - `index`: The index of the submitted referendum whose Decision Deposit is yet to be + * posted. + * + * Emits `DecisionDepositPlaced`. + */ +export interface FellowshipReferendaCall_place_decision_deposit { + __kind: 'place_decision_deposit' + index: number +} + +/** + * Refund the Decision Deposit for a closed referendum back to the depositor. + * + * - `origin`: must be `Signed` or `Root`. + * - `index`: The index of a closed referendum whose Decision Deposit has not yet been + * refunded. + * + * Emits `DecisionDepositRefunded`. + */ +export interface FellowshipReferendaCall_refund_decision_deposit { + __kind: 'refund_decision_deposit' + index: number +} + +/** + * Refund the Submission Deposit for a closed referendum back to the depositor. + * + * - `origin`: must be `Signed` or `Root`. + * - `index`: The index of a closed referendum whose Submission Deposit has not yet been + * refunded. + * + * Emits `SubmissionDepositRefunded`. + */ +export interface FellowshipReferendaCall_refund_submission_deposit { + __kind: 'refund_submission_deposit' + index: number +} + +/** + * Set or clear metadata of a referendum. + * + * Parameters: + * - `origin`: Must be `Signed` by a creator of a referendum or by anyone to clear a + * metadata of a finished referendum. + * - `index`: The index of a referendum to set or clear metadata for. + * - `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata. + */ +export interface FellowshipReferendaCall_set_metadata { + __kind: 'set_metadata' + index: number + maybeHash?: (H256 | undefined) +} + +/** + * Propose a referendum on a privileged action. + * + * - `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds + * available. + * - `proposal_origin`: The origin from which the proposal should be executed. + * - `proposal`: The proposal. + * - `enactment_moment`: The moment that the proposal should be enacted. + * + * Emits `Submitted`. + */ +export interface FellowshipReferendaCall_submit { + __kind: 'submit' + proposalOrigin: OriginCaller + proposal: Bounded + enactmentMoment: DispatchTime +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const FellowshipCollectiveCall: sts.Type = sts.closedEnum(() => { + return { + add_member: sts.enumStruct({ + who: MultiAddress, + }), + cleanup_poll: sts.enumStruct({ + pollIndex: sts.number(), + max: sts.number(), + }), + demote_member: sts.enumStruct({ + who: MultiAddress, + }), + promote_member: sts.enumStruct({ + who: MultiAddress, + }), + remove_member: sts.enumStruct({ + who: MultiAddress, + minRank: sts.number(), + }), + vote: sts.enumStruct({ + poll: sts.number(), + aye: sts.boolean(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type FellowshipCollectiveCall = FellowshipCollectiveCall_add_member | FellowshipCollectiveCall_cleanup_poll | FellowshipCollectiveCall_demote_member | FellowshipCollectiveCall_promote_member | FellowshipCollectiveCall_remove_member | FellowshipCollectiveCall_vote + +/** + * Introduce a new member. + * + * - `origin`: Must be the `AdminOrigin`. + * - `who`: Account of non-member which will become a member. + * - `rank`: The rank to give the new member. + * + * Weight: `O(1)` + */ +export interface FellowshipCollectiveCall_add_member { + __kind: 'add_member' + who: MultiAddress +} + +/** + * Remove votes from the given poll. It must have ended. + * + * - `origin`: Must be `Signed` by any account. + * - `poll_index`: Index of a poll which is completed and for which votes continue to + * exist. + * - `max`: Maximum number of vote items from remove in this call. + * + * Transaction fees are waived if the operation is successful. + * + * Weight `O(max)` (less if there are fewer items to remove than `max`). + */ +export interface FellowshipCollectiveCall_cleanup_poll { + __kind: 'cleanup_poll' + pollIndex: number + max: number +} + +/** + * Decrement the rank of an existing member by one. If the member is already at rank zero, + * then they are removed entirely. + * + * - `origin`: Must be the `AdminOrigin`. + * - `who`: Account of existing member of rank greater than zero. + * + * Weight: `O(1)`, less if the member's index is highest in its rank. + */ +export interface FellowshipCollectiveCall_demote_member { + __kind: 'demote_member' + who: MultiAddress +} + +/** + * Increment the rank of an existing member by one. + * + * - `origin`: Must be the `AdminOrigin`. + * - `who`: Account of existing member. + * + * Weight: `O(1)` + */ +export interface FellowshipCollectiveCall_promote_member { + __kind: 'promote_member' + who: MultiAddress +} + +/** + * Remove the member entirely. + * + * - `origin`: Must be the `AdminOrigin`. + * - `who`: Account of existing member of rank greater than zero. + * - `min_rank`: The rank of the member or greater. + * + * Weight: `O(min_rank)`. + */ +export interface FellowshipCollectiveCall_remove_member { + __kind: 'remove_member' + who: MultiAddress + minRank: number +} + +/** + * Add an aye or nay vote for the sender to the given proposal. + * + * - `origin`: Must be `Signed` by a member account. + * - `poll`: Index of a poll which is ongoing. + * - `aye`: `true` if the vote is to approve the proposal, `false` otherwise. + * + * Transaction fees are be waived if the member is voting on any particular proposal + * for the first time and the call is successful. Subsequent vote changes will charge a + * fee. + * + * Weight: `O(1)`, less if there was no previous vote on the poll by the member. + */ +export interface FellowshipCollectiveCall_vote { + __kind: 'vote' + poll: number + aye: boolean +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const FastUnstakeCall: sts.Type = sts.closedEnum(() => { + return { + control: sts.enumStruct({ + erasToCheck: sts.number(), + }), + deregister: sts.unit(), + register_fast_unstake: sts.unit(), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type FastUnstakeCall = FastUnstakeCall_control | FastUnstakeCall_deregister | FastUnstakeCall_register_fast_unstake + +/** + * Control the operation of this pallet. + * + * Dispatch origin must be signed by the [`Config::ControlOrigin`]. + */ +export interface FastUnstakeCall_control { + __kind: 'control' + erasToCheck: number +} + +/** + * Deregister oneself from the fast-unstake. + * + * This is useful if one is registered, they are still waiting, and they change their mind. + * + * Note that the associated stash is still fully unbonded and chilled as a consequence of + * calling `register_fast_unstake`. This should probably be followed by a call to + * `Staking::rebond`. + */ +export interface FastUnstakeCall_deregister { + __kind: 'deregister' +} + +/** + * Register oneself for fast-unstake. + * + * The dispatch origin of this call must be signed by the controller account, similar to + * `staking::unbond`. + * + * The stash associated with the origin must have no ongoing unlocking chunks. If + * successful, this will fully unbond and chill the stash. Then, it will enqueue the stash + * to be checked in further blocks. + * + * If by the time this is called, the stash is actually eligible for fast-unstake, then + * they are guaranteed to remain eligible, because the call will chill them as well. + * + * If the check works, the entire staking data is removed, i.e. the stash is fully + * unstaked. + * + * If the check fails, the stash remains chilled and waiting for being unbonded as in with + * the normal staking system, but they lose part of their unbonding chunks due to consuming + * the chain's resources. + */ +export interface FastUnstakeCall_register_fast_unstake { + __kind: 'register_fast_unstake' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ElectionProviderMultiPhaseCall: sts.Type = sts.closedEnum(() => { + return { + governance_fallback: sts.enumStruct({ + maybeMaxVoters: sts.option(() => sts.number()), + maybeMaxTargets: sts.option(() => sts.number()), + }), + set_emergency_election_result: sts.enumStruct({ + supports: sts.array(() => sts.tuple(() => [AccountId32, Support])), + }), + set_minimum_untrusted_score: sts.enumStruct({ + maybeNextScore: sts.option(() => ElectionScore), + }), + submit: sts.enumStruct({ + rawSolution: RawSolution, + }), + submit_unsigned: sts.enumStruct({ + rawSolution: RawSolution, + witness: SolutionOrSnapshotSize, + }), + } +}) + +export const SolutionOrSnapshotSize: sts.Type = sts.struct(() => { + return { + voters: sts.number(), + targets: sts.number(), + } +}) + +export interface SolutionOrSnapshotSize { + voters: number + targets: number +} + +export const RawSolution: sts.Type = sts.struct(() => { + return { + solution: NposCompactSolution24, + score: ElectionScore, + round: sts.number(), + } +}) + +export const NposCompactSolution24: sts.Type = sts.struct(() => { + return { + votes1: sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), + votes2: sts.array(() => sts.tuple(() => [sts.number(), sts.tuple(() => [sts.number(), sts.number()]), sts.number()])), + votes3: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes4: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes5: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes6: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes7: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes8: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes9: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes10: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes11: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes12: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes13: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes14: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes15: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes16: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes17: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes18: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes19: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes20: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes21: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes22: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes23: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + votes24: sts.array(() => sts.tuple(() => [sts.number(), sts.array(() => sts.tuple(() => [sts.number(), sts.number()])), sts.number()])), + } +}) + +export interface NposCompactSolution24 { + votes1: [number, number][] + votes2: [number, [number, number], number][] + votes3: [number, [number, number][], number][] + votes4: [number, [number, number][], number][] + votes5: [number, [number, number][], number][] + votes6: [number, [number, number][], number][] + votes7: [number, [number, number][], number][] + votes8: [number, [number, number][], number][] + votes9: [number, [number, number][], number][] + votes10: [number, [number, number][], number][] + votes11: [number, [number, number][], number][] + votes12: [number, [number, number][], number][] + votes13: [number, [number, number][], number][] + votes14: [number, [number, number][], number][] + votes15: [number, [number, number][], number][] + votes16: [number, [number, number][], number][] + votes17: [number, [number, number][], number][] + votes18: [number, [number, number][], number][] + votes19: [number, [number, number][], number][] + votes20: [number, [number, number][], number][] + votes21: [number, [number, number][], number][] + votes22: [number, [number, number][], number][] + votes23: [number, [number, number][], number][] + votes24: [number, [number, number][], number][] +} + +export interface RawSolution { + solution: NposCompactSolution24 + score: ElectionScore + round: number +} + +export interface ElectionScore { + minimalStake: bigint + sumStake: bigint + sumStakeSquared: bigint +} + +export const ElectionScore: sts.Type = sts.struct(() => { + return { + minimalStake: sts.bigint(), + sumStake: sts.bigint(), + sumStakeSquared: sts.bigint(), + } +}) + +export const Support: sts.Type = sts.struct(() => { + return { + total: sts.bigint(), + voters: sts.array(() => sts.tuple(() => [AccountId32, sts.bigint()])), + } +}) + +export interface Support { + total: bigint + voters: [AccountId32, bigint][] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ElectionProviderMultiPhaseCall = ElectionProviderMultiPhaseCall_governance_fallback | ElectionProviderMultiPhaseCall_set_emergency_election_result | ElectionProviderMultiPhaseCall_set_minimum_untrusted_score | ElectionProviderMultiPhaseCall_submit | ElectionProviderMultiPhaseCall_submit_unsigned + +/** + * Trigger the governance fallback. + * + * This can only be called when [`Phase::Emergency`] is enabled, as an alternative to + * calling [`Call::set_emergency_election_result`]. + */ +export interface ElectionProviderMultiPhaseCall_governance_fallback { + __kind: 'governance_fallback' + maybeMaxVoters?: (number | undefined) + maybeMaxTargets?: (number | undefined) +} + +/** + * Set a solution in the queue, to be handed out to the client of this pallet in the next + * call to `ElectionProvider::elect`. + * + * This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`. + * + * The solution is not checked for any feasibility and is assumed to be trustworthy, as any + * feasibility check itself can in principle cause the election process to fail (due to + * memory/weight constrains). + */ +export interface ElectionProviderMultiPhaseCall_set_emergency_election_result { + __kind: 'set_emergency_election_result' + supports: [AccountId32, Support][] +} + +/** + * Set a new value for `MinimumUntrustedScore`. + * + * Dispatch origin must be aligned with `T::ForceOrigin`. + * + * This check can be turned off by setting the value to `None`. + */ +export interface ElectionProviderMultiPhaseCall_set_minimum_untrusted_score { + __kind: 'set_minimum_untrusted_score' + maybeNextScore?: (ElectionScore | undefined) +} + +/** + * Submit a solution for the signed phase. + * + * The dispatch origin fo this call must be __signed__. + * + * The solution is potentially queued, based on the claimed score and processed at the end + * of the signed phase. + * + * A deposit is reserved and recorded for the solution. Based on the outcome, the solution + * might be rewarded, slashed, or get all or a part of the deposit back. + */ +export interface ElectionProviderMultiPhaseCall_submit { + __kind: 'submit' + rawSolution: RawSolution +} + +/** + * Submit a solution for the unsigned phase. + * + * The dispatch origin fo this call must be __none__. + * + * This submission is checked on the fly. Moreover, this unsigned solution is only + * validated when submitted to the pool from the **local** node. Effectively, this means + * that only active validators can submit this transaction when authoring a block (similar + * to an inherent). + * + * To prevent any incorrect solution (and thus wasted time/weight), this transaction will + * panic if the solution submitted by the validator is invalid in any way, effectively + * putting their authoring reward at risk. + * + * No deposit or reward is associated with this submission. + */ +export interface ElectionProviderMultiPhaseCall_submit_unsigned { + __kind: 'submit_unsigned' + rawSolution: RawSolution + witness: SolutionOrSnapshotSize +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const CrowdloanCall: sts.Type = sts.closedEnum(() => { + return { + add_memo: sts.enumStruct({ + index: Id, + memo: sts.bytes(), + }), + contribute: sts.enumStruct({ + index: sts.number(), + value: sts.bigint(), + signature: sts.option(() => MultiSignature), + }), + contribute_all: sts.enumStruct({ + index: sts.number(), + signature: sts.option(() => MultiSignature), + }), + create: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + dissolve: sts.enumStruct({ + index: sts.number(), + }), + edit: sts.enumStruct({ + index: sts.number(), + cap: sts.bigint(), + firstPeriod: sts.number(), + lastPeriod: sts.number(), + end: sts.number(), + verifier: sts.option(() => MultiSigner), + }), + poke: sts.enumStruct({ + index: Id, + }), + refund: sts.enumStruct({ + index: sts.number(), + }), + withdraw: sts.enumStruct({ + who: AccountId32, + index: sts.number(), + }), + } +}) + +export const MultiSigner: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSigner = MultiSigner_Ecdsa | MultiSigner_Ed25519 | MultiSigner_Sr25519 + +export interface MultiSigner_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSigner_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSigner_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +export const MultiSignature: sts.Type = sts.closedEnum(() => { + return { + Ecdsa: sts.bytes(), + Ed25519: sts.bytes(), + Sr25519: sts.bytes(), + } +}) + +export type MultiSignature = MultiSignature_Ecdsa | MultiSignature_Ed25519 | MultiSignature_Sr25519 + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: Bytes +} + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Bytes +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Bytes +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type CrowdloanCall = CrowdloanCall_add_memo | CrowdloanCall_contribute | CrowdloanCall_contribute_all | CrowdloanCall_create | CrowdloanCall_dissolve | CrowdloanCall_edit | CrowdloanCall_poke | CrowdloanCall_refund | CrowdloanCall_withdraw + +/** + * Add an optional memo to an existing crowdloan contribution. + * + * Origin must be Signed, and the user must have contributed to the crowdloan. + */ +export interface CrowdloanCall_add_memo { + __kind: 'add_memo' + index: Id + memo: Bytes +} + +/** + * Contribute to a crowd sale. This will transfer some balance over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute { + __kind: 'contribute' + index: number + value: bigint + signature?: (MultiSignature | undefined) +} + +/** + * Contribute your entire balance to a crowd sale. This will transfer the entire balance of a user over to fund a parachain + * slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + */ +export interface CrowdloanCall_contribute_all { + __kind: 'contribute_all' + index: number + signature?: (MultiSignature | undefined) +} + +/** + * Create a new crowdloaning campaign for a parachain slot with the given lease period range. + * + * This applies a lock to your parachain configuration, ensuring that it cannot be changed + * by the parachain manager. + */ +export interface CrowdloanCall_create { + __kind: 'create' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Remove a fund after the retirement period has ended and all funds have been returned. + */ +export interface CrowdloanCall_dissolve { + __kind: 'dissolve' + index: number +} + +/** + * Edit the configuration for an in-progress crowdloan. + * + * Can only be called by Root origin. + */ +export interface CrowdloanCall_edit { + __kind: 'edit' + index: number + cap: bigint + firstPeriod: number + lastPeriod: number + end: number + verifier?: (MultiSigner | undefined) +} + +/** + * Poke the fund into `NewRaise` + * + * Origin must be Signed, and the fund has non-zero raise. + */ +export interface CrowdloanCall_poke { + __kind: 'poke' + index: Id +} + +/** + * Automatically refund contributors of an ended crowdloan. + * Due to weight restrictions, this function may need to be called multiple + * times to fully refund all users. We will refund `RemoveKeysLimit` users at a time. + * + * Origin must be signed, but can come from anyone. + */ +export interface CrowdloanCall_refund { + __kind: 'refund' + index: number +} + +/** + * Withdraw full balance of a specific contributor. + * + * Origin must be signed, but can come from anyone. + * + * The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement + * flag must be set. For a fund to be ready for retirement, then: + * - it must not already be in retirement; + * - the amount of raised funds must be bigger than the _free_ balance of the account; + * - and either: + * - the block number must be at least `end`; or + * - the current lease period must be greater than the fund's `last_period`. + * + * In this case, the fund's retirement flag is set and its `end` is reset to the current block + * number. + * + * - `who`: The account whose contribution should be withdrawn. + * - `index`: The parachain to whose crowdloan the contribution was made. + */ +export interface CrowdloanCall_withdraw { + __kind: 'withdraw' + who: AccountId32 + index: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ConvictionVotingCall: sts.Type = sts.closedEnum(() => { + return { + delegate: sts.enumStruct({ + class: sts.number(), + to: MultiAddress, + conviction: Conviction, + balance: sts.bigint(), + }), + remove_other_vote: sts.enumStruct({ + target: MultiAddress, + class: sts.number(), + index: sts.number(), + }), + remove_vote: sts.enumStruct({ + class: sts.option(() => sts.number()), + index: sts.number(), + }), + undelegate: sts.enumStruct({ + class: sts.number(), + }), + unlock: sts.enumStruct({ + class: sts.number(), + target: MultiAddress, + }), + vote: sts.enumStruct({ + pollIndex: sts.number(), + vote: AccountVote, + }), + } +}) + +export const AccountVote: sts.Type = sts.closedEnum(() => { + return { + Split: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + }), + SplitAbstain: sts.enumStruct({ + aye: sts.bigint(), + nay: sts.bigint(), + abstain: sts.bigint(), + }), + Standard: sts.enumStruct({ + vote: sts.number(), + balance: sts.bigint(), + }), + } +}) + +export type AccountVote = AccountVote_Split | AccountVote_SplitAbstain | AccountVote_Standard + +export interface AccountVote_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export interface AccountVote_SplitAbstain { + __kind: 'SplitAbstain' + aye: bigint + nay: bigint + abstain: bigint +} + +export interface AccountVote_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export const Conviction: sts.Type = sts.closedEnum(() => { + return { + Locked1x: sts.unit(), + Locked2x: sts.unit(), + Locked3x: sts.unit(), + Locked4x: sts.unit(), + Locked5x: sts.unit(), + Locked6x: sts.unit(), + None: sts.unit(), + } +}) + +export type Conviction = Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x | Conviction_None + +export interface Conviction_Locked1x { + __kind: 'Locked1x' +} + +export interface Conviction_Locked2x { + __kind: 'Locked2x' +} + +export interface Conviction_Locked3x { + __kind: 'Locked3x' +} + +export interface Conviction_Locked4x { + __kind: 'Locked4x' +} + +export interface Conviction_Locked5x { + __kind: 'Locked5x' +} + +export interface Conviction_Locked6x { + __kind: 'Locked6x' +} + +export interface Conviction_None { + __kind: 'None' +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ConvictionVotingCall = ConvictionVotingCall_delegate | ConvictionVotingCall_remove_other_vote | ConvictionVotingCall_remove_vote | ConvictionVotingCall_undelegate | ConvictionVotingCall_unlock | ConvictionVotingCall_vote + +/** + * Delegate the voting power (with some given conviction) of the sending account for a + * particular class of polls. + * + * The balance delegated is locked for as long as it's delegated, and thereafter for the + * time appropriate for the conviction's lock period. + * + * The dispatch origin of this call must be _Signed_, and the signing account must either: + * - be delegating already; or + * - have no voting activity (if there is, then it will need to be removed/consolidated + * through `reap_vote` or `unvote`). + * + * - `to`: The account whose voting the `target` account's voting power will follow. + * - `class`: The class of polls to delegate. To delegate multiple classes, multiple calls + * to this function are required. + * - `conviction`: The conviction that will be attached to the delegated votes. When the + * account is undelegated, the funds will be locked for the corresponding period. + * - `balance`: The amount of the account's balance to be used in delegating. This must not + * be more than the account's current balance. + * + * Emits `Delegated`. + * + * Weight: `O(R)` where R is the number of polls the voter delegating to has + * voted on. Weight is initially charged as if maximum votes, but is refunded later. + */ +export interface ConvictionVotingCall_delegate { + __kind: 'delegate' + class: number + to: MultiAddress + conviction: Conviction + balance: bigint +} + +/** + * Remove a vote for a poll. + * + * If the `target` is equal to the signer, then this function is exactly equivalent to + * `remove_vote`. If not equal to the signer, then the vote must have expired, + * either because the poll was cancelled, because the voter lost the poll or + * because the conviction period is over. + * + * The dispatch origin of this call must be _Signed_. + * + * - `target`: The account of the vote to be removed; this account must have voted for poll + * `index`. + * - `index`: The index of poll of the vote to be removed. + * - `class`: The class of the poll. + * + * Weight: `O(R + log R)` where R is the number of polls that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface ConvictionVotingCall_remove_other_vote { + __kind: 'remove_other_vote' + target: MultiAddress + class: number + index: number +} + +/** + * Remove a vote for a poll. + * + * If: + * - the poll was cancelled, or + * - the poll is ongoing, or + * - the poll has ended such that + * - the vote of the account was in opposition to the result; or + * - there was no conviction to the account's vote; or + * - the account made a split vote + * ...then the vote is removed cleanly and a following call to `unlock` may result in more + * funds being available. + * + * If, however, the poll has ended and: + * - it finished corresponding to the vote of the account, and + * - the account made a standard vote with conviction, and + * - the lock period of the conviction is not over + * ...then the lock will be aggregated into the overall account's lock, which may involve + * *overlocking* (where the two locks are combined into a single lock that is the maximum + * of both the amount locked and the time is it locked for). + * + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for poll `index`. + * + * - `index`: The index of poll of the vote to be removed. + * - `class`: Optional parameter, if given it indicates the class of the poll. For polls + * which have finished or are cancelled, this must be `Some`. + * + * Weight: `O(R + log R)` where R is the number of polls that `target` has voted on. + * Weight is calculated for the maximum number of vote. + */ +export interface ConvictionVotingCall_remove_vote { + __kind: 'remove_vote' + class?: (number | undefined) + index: number +} + +/** + * Undelegate the voting power of the sending account for a particular class of polls. + * + * Tokens may be unlocked following once an amount of time consistent with the lock period + * of the conviction with which the delegation was issued has passed. + * + * The dispatch origin of this call must be _Signed_ and the signing account must be + * currently delegating. + * + * - `class`: The class of polls to remove the delegation from. + * + * Emits `Undelegated`. + * + * Weight: `O(R)` where R is the number of polls the voter delegating to has + * voted on. Weight is initially charged as if maximum votes, but is refunded later. + */ +export interface ConvictionVotingCall_undelegate { + __kind: 'undelegate' + class: number +} + +/** + * Remove the lock caused by prior voting/delegating which has expired within a particular + * class. + * + * The dispatch origin of this call must be _Signed_. + * + * - `class`: The class of polls to unlock. + * - `target`: The account to remove the lock on. + * + * Weight: `O(R)` with R number of vote of target. + */ +export interface ConvictionVotingCall_unlock { + __kind: 'unlock' + class: number + target: MultiAddress +} + +/** + * Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal; + * otherwise it is a vote to keep the status quo. + * + * The dispatch origin of this call must be _Signed_. + * + * - `poll_index`: The index of the poll to vote for. + * - `vote`: The vote configuration. + * + * Weight: `O(R)` where R is the number of polls the voter has voted on. + */ +export interface ConvictionVotingCall_vote { + __kind: 'vote' + pollIndex: number + vote: AccountVote +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ConfigurationCall: sts.Type = sts.closedEnum(() => { + return { + set_async_backing_params: sts.enumStruct({ + new: AsyncBackingParams, + }), + set_bypass_consistency_check: sts.enumStruct({ + new: sts.boolean(), + }), + set_chain_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_code_retention_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_period: sts.enumStruct({ + new: sts.number(), + }), + set_dispute_post_conclusion_acceptance_period: sts.enumStruct({ + new: sts.number(), + }), + set_executor_params: sts.enumStruct({ + new: sts.array(() => V4ExecutorParam), + }), + set_group_rotation_frequency: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_capacity: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_channel_max_total_size: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parachain_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_inbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_max_parathread_outbound_channels: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_open_request_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_hrmp_recipient_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_hrmp_sender_deposit: sts.enumStruct({ + new: sts.bigint(), + }), + set_max_code_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_downward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_head_data_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_pov_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_num_per_candidate: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_message_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_count: sts.enumStruct({ + new: sts.number(), + }), + set_max_upward_queue_size: sts.enumStruct({ + new: sts.number(), + }), + set_max_validators: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_max_validators_per_core: sts.enumStruct({ + new: sts.option(() => sts.number()), + }), + set_minimum_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_n_delay_tranches: sts.enumStruct({ + new: sts.number(), + }), + set_needed_approvals: sts.enumStruct({ + new: sts.number(), + }), + set_no_show_slots: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_cores: sts.enumStruct({ + new: sts.number(), + }), + set_parathread_retries: sts.enumStruct({ + new: sts.number(), + }), + set_pvf_checking_enabled: sts.enumStruct({ + new: sts.boolean(), + }), + set_pvf_voting_ttl: sts.enumStruct({ + new: sts.number(), + }), + set_relay_vrf_modulo_samples: sts.enumStruct({ + new: sts.number(), + }), + set_scheduling_lookahead: sts.enumStruct({ + new: sts.number(), + }), + set_thread_availability_period: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_cooldown: sts.enumStruct({ + new: sts.number(), + }), + set_validation_upgrade_delay: sts.enumStruct({ + new: sts.number(), + }), + set_zeroth_delay_tranche_width: sts.enumStruct({ + new: sts.number(), + }), + } +}) + +export const V4ExecutorParam: sts.Type = sts.closedEnum(() => { + return { + MaxMemoryPages: sts.number(), + PrecheckingMaxMemory: sts.bigint(), + PvfExecTimeout: sts.tuple(() => [V4PvfExecTimeoutKind, sts.bigint()]), + PvfPrepTimeout: sts.tuple(() => [V4PvfPrepTimeoutKind, sts.bigint()]), + StackLogicalMax: sts.number(), + StackNativeMax: sts.number(), + WasmExtBulkMemory: sts.unit(), + } +}) + +export const V4PvfPrepTimeoutKind: sts.Type = sts.closedEnum(() => { + return { + Lenient: sts.unit(), + Precheck: sts.unit(), + } +}) + +export type V4PvfPrepTimeoutKind = V4PvfPrepTimeoutKind_Lenient | V4PvfPrepTimeoutKind_Precheck + +export interface V4PvfPrepTimeoutKind_Lenient { + __kind: 'Lenient' +} + +export interface V4PvfPrepTimeoutKind_Precheck { + __kind: 'Precheck' +} + +export const V4PvfExecTimeoutKind: sts.Type = sts.closedEnum(() => { + return { + Approval: sts.unit(), + Backing: sts.unit(), + } +}) + +export type V4PvfExecTimeoutKind = V4PvfExecTimeoutKind_Approval | V4PvfExecTimeoutKind_Backing + +export interface V4PvfExecTimeoutKind_Approval { + __kind: 'Approval' +} + +export interface V4PvfExecTimeoutKind_Backing { + __kind: 'Backing' +} + +export type V4ExecutorParam = V4ExecutorParam_MaxMemoryPages | V4ExecutorParam_PrecheckingMaxMemory | V4ExecutorParam_PvfExecTimeout | V4ExecutorParam_PvfPrepTimeout | V4ExecutorParam_StackLogicalMax | V4ExecutorParam_StackNativeMax | V4ExecutorParam_WasmExtBulkMemory + +export interface V4ExecutorParam_MaxMemoryPages { + __kind: 'MaxMemoryPages' + value: number +} + +export interface V4ExecutorParam_PrecheckingMaxMemory { + __kind: 'PrecheckingMaxMemory' + value: bigint +} + +export interface V4ExecutorParam_PvfExecTimeout { + __kind: 'PvfExecTimeout' + value: [V4PvfExecTimeoutKind, bigint] +} + +export interface V4ExecutorParam_PvfPrepTimeout { + __kind: 'PvfPrepTimeout' + value: [V4PvfPrepTimeoutKind, bigint] +} + +export interface V4ExecutorParam_StackLogicalMax { + __kind: 'StackLogicalMax' + value: number +} + +export interface V4ExecutorParam_StackNativeMax { + __kind: 'StackNativeMax' + value: number +} + +export interface V4ExecutorParam_WasmExtBulkMemory { + __kind: 'WasmExtBulkMemory' +} + +export const AsyncBackingParams: sts.Type = sts.struct(() => { + return { + maxCandidateDepth: sts.number(), + allowedAncestryLen: sts.number(), + } +}) + +export interface AsyncBackingParams { + maxCandidateDepth: number + allowedAncestryLen: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ConfigurationCall = ConfigurationCall_set_async_backing_params | ConfigurationCall_set_bypass_consistency_check | ConfigurationCall_set_chain_availability_period | ConfigurationCall_set_code_retention_period | ConfigurationCall_set_dispute_period | ConfigurationCall_set_dispute_post_conclusion_acceptance_period | ConfigurationCall_set_executor_params | ConfigurationCall_set_group_rotation_frequency | ConfigurationCall_set_hrmp_channel_max_capacity | ConfigurationCall_set_hrmp_channel_max_message_size | ConfigurationCall_set_hrmp_channel_max_total_size | ConfigurationCall_set_hrmp_max_message_num_per_candidate | ConfigurationCall_set_hrmp_max_parachain_inbound_channels | ConfigurationCall_set_hrmp_max_parachain_outbound_channels | ConfigurationCall_set_hrmp_max_parathread_inbound_channels | ConfigurationCall_set_hrmp_max_parathread_outbound_channels | ConfigurationCall_set_hrmp_open_request_ttl | ConfigurationCall_set_hrmp_recipient_deposit | ConfigurationCall_set_hrmp_sender_deposit | ConfigurationCall_set_max_code_size | ConfigurationCall_set_max_downward_message_size | ConfigurationCall_set_max_head_data_size | ConfigurationCall_set_max_pov_size | ConfigurationCall_set_max_upward_message_num_per_candidate | ConfigurationCall_set_max_upward_message_size | ConfigurationCall_set_max_upward_queue_count | ConfigurationCall_set_max_upward_queue_size | ConfigurationCall_set_max_validators | ConfigurationCall_set_max_validators_per_core | ConfigurationCall_set_minimum_validation_upgrade_delay | ConfigurationCall_set_n_delay_tranches | ConfigurationCall_set_needed_approvals | ConfigurationCall_set_no_show_slots | ConfigurationCall_set_parathread_cores | ConfigurationCall_set_parathread_retries | ConfigurationCall_set_pvf_checking_enabled | ConfigurationCall_set_pvf_voting_ttl | ConfigurationCall_set_relay_vrf_modulo_samples | ConfigurationCall_set_scheduling_lookahead | ConfigurationCall_set_thread_availability_period | ConfigurationCall_set_validation_upgrade_cooldown | ConfigurationCall_set_validation_upgrade_delay | ConfigurationCall_set_zeroth_delay_tranche_width + +/** + * Set the asynchronous backing parameters. + */ +export interface ConfigurationCall_set_async_backing_params { + __kind: 'set_async_backing_params' + new: AsyncBackingParams +} + +/** + * Setting this to true will disable consistency checks for the configuration setters. + * Use with caution. + */ +export interface ConfigurationCall_set_bypass_consistency_check { + __kind: 'set_bypass_consistency_check' + new: boolean +} + +/** + * Set the availability period for parachains. + */ +export interface ConfigurationCall_set_chain_availability_period { + __kind: 'set_chain_availability_period' + new: number +} + +/** + * Set the acceptance period for an included candidate. + */ +export interface ConfigurationCall_set_code_retention_period { + __kind: 'set_code_retention_period' + new: number +} + +/** + * Set the dispute period, in number of sessions to keep for disputes. + */ +export interface ConfigurationCall_set_dispute_period { + __kind: 'set_dispute_period' + new: number +} + +/** + * Set the dispute post conclusion acceptance period. + */ +export interface ConfigurationCall_set_dispute_post_conclusion_acceptance_period { + __kind: 'set_dispute_post_conclusion_acceptance_period' + new: number +} + +/** + * Set PVF executor parameters. + */ +export interface ConfigurationCall_set_executor_params { + __kind: 'set_executor_params' + new: V4ExecutorParam[] +} + +/** + * Set the parachain validator-group rotation frequency + */ +export interface ConfigurationCall_set_group_rotation_frequency { + __kind: 'set_group_rotation_frequency' + new: number +} + +/** + * Sets the maximum number of messages allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_capacity { + __kind: 'set_hrmp_channel_max_capacity' + new: number +} + +/** + * Sets the maximum size of a message that could ever be put into an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_channel_max_message_size { + __kind: 'set_hrmp_channel_max_message_size' + new: number +} + +/** + * Sets the maximum total size of messages in bytes allowed in an HRMP channel at once. + */ +export interface ConfigurationCall_set_hrmp_channel_max_total_size { + __kind: 'set_hrmp_channel_max_total_size' + new: number +} + +/** + * Sets the maximum number of outbound HRMP messages can be sent by a candidate. + */ +export interface ConfigurationCall_set_hrmp_max_message_num_per_candidate { + __kind: 'set_hrmp_max_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parachain is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_inbound_channels { + __kind: 'set_hrmp_max_parachain_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parachain is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parachain_outbound_channels { + __kind: 'set_hrmp_max_parachain_outbound_channels' + new: number +} + +/** + * Sets the maximum number of inbound HRMP channels a parathread is allowed to accept. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_inbound_channels { + __kind: 'set_hrmp_max_parathread_inbound_channels' + new: number +} + +/** + * Sets the maximum number of outbound HRMP channels a parathread is allowed to open. + */ +export interface ConfigurationCall_set_hrmp_max_parathread_outbound_channels { + __kind: 'set_hrmp_max_parathread_outbound_channels' + new: number +} + +/** + * Sets the number of sessions after which an HRMP open channel request expires. + */ +export interface ConfigurationCall_set_hrmp_open_request_ttl { + __kind: 'set_hrmp_open_request_ttl' + new: number +} + +/** + * Sets the amount of funds that the recipient should provide for accepting opening an HRMP + * channel. + */ +export interface ConfigurationCall_set_hrmp_recipient_deposit { + __kind: 'set_hrmp_recipient_deposit' + new: bigint +} + +/** + * Sets the amount of funds that the sender should provide for opening an HRMP channel. + */ +export interface ConfigurationCall_set_hrmp_sender_deposit { + __kind: 'set_hrmp_sender_deposit' + new: bigint +} + +/** + * Set the max validation code size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_code_size { + __kind: 'set_max_code_size' + new: number +} + +/** + * Set the critical downward message size. + */ +export interface ConfigurationCall_set_max_downward_message_size { + __kind: 'set_max_downward_message_size' + new: number +} + +/** + * Set the max head data size for paras. + */ +export interface ConfigurationCall_set_max_head_data_size { + __kind: 'set_max_head_data_size' + new: number +} + +/** + * Set the max POV block size for incoming upgrades. + */ +export interface ConfigurationCall_set_max_pov_size { + __kind: 'set_max_pov_size' + new: number +} + +/** + * Sets the maximum number of messages that a candidate can contain. + */ +export interface ConfigurationCall_set_max_upward_message_num_per_candidate { + __kind: 'set_max_upward_message_num_per_candidate' + new: number +} + +/** + * Sets the maximum size of an upward message that can be sent by a candidate. + */ +export interface ConfigurationCall_set_max_upward_message_size { + __kind: 'set_max_upward_message_size' + new: number +} + +/** + * Sets the maximum items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_count { + __kind: 'set_max_upward_queue_count' + new: number +} + +/** + * Sets the maximum total size of items that can present in a upward dispatch queue at once. + */ +export interface ConfigurationCall_set_max_upward_queue_size { + __kind: 'set_max_upward_queue_size' + new: number +} + +/** + * Set the maximum number of validators to use in parachain consensus. + */ +export interface ConfigurationCall_set_max_validators { + __kind: 'set_max_validators' + new?: (number | undefined) +} + +/** + * Set the maximum number of validators to assign to any core. + */ +export interface ConfigurationCall_set_max_validators_per_core { + __kind: 'set_max_validators_per_core' + new?: (number | undefined) +} + +/** + * Sets the minimum delay between announcing the upgrade block for a parachain until the + * upgrade taking place. + * + * See the field documentation for information and constraints for the new value. + */ +export interface ConfigurationCall_set_minimum_validation_upgrade_delay { + __kind: 'set_minimum_validation_upgrade_delay' + new: number +} + +/** + * Set the total number of delay tranches. + */ +export interface ConfigurationCall_set_n_delay_tranches { + __kind: 'set_n_delay_tranches' + new: number +} + +/** + * Set the number of validators needed to approve a block. + */ +export interface ConfigurationCall_set_needed_approvals { + __kind: 'set_needed_approvals' + new: number +} + +/** + * Set the no show slots, in number of number of consensus slots. + * Must be at least 1. + */ +export interface ConfigurationCall_set_no_show_slots { + __kind: 'set_no_show_slots' + new: number +} + +/** + * Set the number of parathread execution cores. + */ +export interface ConfigurationCall_set_parathread_cores { + __kind: 'set_parathread_cores' + new: number +} + +/** + * Set the number of retries for a particular parathread. + */ +export interface ConfigurationCall_set_parathread_retries { + __kind: 'set_parathread_retries' + new: number +} + +/** + * Enable or disable PVF pre-checking. Consult the field documentation prior executing. + */ +export interface ConfigurationCall_set_pvf_checking_enabled { + __kind: 'set_pvf_checking_enabled' + new: boolean +} + +/** + * Set the number of session changes after which a PVF pre-checking voting is rejected. + */ +export interface ConfigurationCall_set_pvf_voting_ttl { + __kind: 'set_pvf_voting_ttl' + new: number +} + +/** + * Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion. + */ +export interface ConfigurationCall_set_relay_vrf_modulo_samples { + __kind: 'set_relay_vrf_modulo_samples' + new: number +} + +/** + * Set the scheduling lookahead, in expected number of blocks at peak throughput. + */ +export interface ConfigurationCall_set_scheduling_lookahead { + __kind: 'set_scheduling_lookahead' + new: number +} + +/** + * Set the availability period for parathreads. + */ +export interface ConfigurationCall_set_thread_availability_period { + __kind: 'set_thread_availability_period' + new: number +} + +/** + * Set the validation upgrade cooldown. + */ +export interface ConfigurationCall_set_validation_upgrade_cooldown { + __kind: 'set_validation_upgrade_cooldown' + new: number +} + +/** + * Set the validation upgrade delay. + */ +export interface ConfigurationCall_set_validation_upgrade_delay { + __kind: 'set_validation_upgrade_delay' + new: number +} + +/** + * Set the zeroth delay tranche width. + */ +export interface ConfigurationCall_set_zeroth_delay_tranche_width { + __kind: 'set_zeroth_delay_tranche_width' + new: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ClaimsCall: sts.Type = sts.closedEnum(() => { + return { + attest: sts.enumStruct({ + statement: sts.bytes(), + }), + claim: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + }), + claim_attest: sts.enumStruct({ + dest: AccountId32, + ethereumSignature: EcdsaSignature, + statement: sts.bytes(), + }), + mint_claim: sts.enumStruct({ + who: EthereumAddress, + value: sts.bigint(), + vestingSchedule: sts.option(() => sts.tuple(() => [sts.bigint(), sts.bigint(), sts.number()])), + statement: sts.option(() => StatementKind), + }), + move_claim: sts.enumStruct({ + old: EthereumAddress, + new: EthereumAddress, + maybePreclaim: sts.option(() => AccountId32), + }), + } +}) + +export const StatementKind: sts.Type = sts.closedEnum(() => { + return { + Regular: sts.unit(), + Saft: sts.unit(), + } +}) + +export type StatementKind = StatementKind_Regular | StatementKind_Saft + +export interface StatementKind_Regular { + __kind: 'Regular' +} + +export interface StatementKind_Saft { + __kind: 'Saft' +} + +export const EthereumAddress = sts.bytes() + +export const EcdsaSignature = sts.bytes() + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ClaimsCall = ClaimsCall_attest | ClaimsCall_claim | ClaimsCall_claim_attest | ClaimsCall_mint_claim | ClaimsCall_move_claim + +/** + * Attest to a statement, needed to finalize the claims process. + * + * WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`. + * + * Unsigned Validation: + * A call to attest is deemed valid if the sender has a `Preclaim` registered + * and provides a `statement` which is expected for the account. + * + * Parameters: + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to do pre-validation on `attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_attest { + __kind: 'attest' + statement: Bytes +} + +/** + * Make a claim to collect your DOTs. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to claim is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address) + * + * and `address` matches the `dest` account. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim { + __kind: 'claim' + dest: AccountId32 + ethereumSignature: EcdsaSignature +} + +/** + * Make a claim to collect your DOTs by signing a statement. + * + * The dispatch origin for this call must be _None_. + * + * Unsigned Validation: + * A call to `claim_attest` is deemed valid if the signature provided matches + * the expected signed message of: + * + * > Ethereum Signed Message: + * > (configured prefix string)(address)(statement) + * + * and `address` matches the `dest` account; the `statement` must match that which is + * expected according to your purchase arrangement. + * + * Parameters: + * - `dest`: The destination account to payout the claim. + * - `ethereum_signature`: The signature of an ethereum signed message + * matching the format described above. + * - `statement`: The identity of the statement which is being attested to in the signature. + * + * + * The weight of this call is invariant over the input parameters. + * Weight includes logic to validate unsigned `claim_attest` call. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_claim_attest { + __kind: 'claim_attest' + dest: AccountId32 + ethereumSignature: EcdsaSignature + statement: Bytes +} + +/** + * Mint a new claim to collect DOTs. + * + * The dispatch origin for this call must be _Root_. + * + * Parameters: + * - `who`: The Ethereum address allowed to collect this claim. + * - `value`: The number of DOTs that will be claimed. + * - `vesting_schedule`: An optional vesting schedule for these DOTs. + * + * + * The weight of this call is invariant over the input parameters. + * We assume worst case that both vesting and statement is being inserted. + * + * Total Complexity: O(1) + * + */ +export interface ClaimsCall_mint_claim { + __kind: 'mint_claim' + who: EthereumAddress + value: bigint + vestingSchedule?: ([bigint, bigint, number] | undefined) + statement?: (StatementKind | undefined) +} + +export interface ClaimsCall_move_claim { + __kind: 'move_claim' + old: EthereumAddress + new: EthereumAddress + maybePreclaim?: (AccountId32 | undefined) +} + +export type EthereumAddress = Bytes + +export type EcdsaSignature = Bytes + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const ChildBountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + add_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + value: sts.bigint(), + description: sts.bytes(), + }), + award_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + close_child_bounty: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + propose_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + parentBountyId: sts.number(), + childBountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type ChildBountiesCall = ChildBountiesCall_accept_curator | ChildBountiesCall_add_child_bounty | ChildBountiesCall_award_child_bounty | ChildBountiesCall_claim_child_bounty | ChildBountiesCall_close_child_bounty | ChildBountiesCall_propose_curator | ChildBountiesCall_unassign_curator + +/** + * Accept the curator role for the child-bounty. + * + * The dispatch origin for this call must be the curator of this + * child-bounty. + * + * A deposit will be reserved from the curator and refund upon + * successful payout or cancellation. + * + * Fee for curator is deducted from curator fee of parent bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in "CuratorProposed" state, for processing the + * call. And state of child-bounty is moved to "Active" on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_accept_curator { + __kind: 'accept_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Add a new child-bounty. + * + * The dispatch origin for this call must be the curator of parent + * bounty and the parent bounty must be in "active" state. + * + * Child-bounty gets added successfully & fund gets transferred from + * parent bounty to child-bounty account, if parent bounty has enough + * funds, else the call fails. + * + * Upper bound to maximum number of active child bounties that can be + * added are managed via runtime trait config + * [`Config::MaxActiveChildBountyCount`]. + * + * If the call is success, the status of child-bounty is updated to + * "Added". + * + * - `parent_bounty_id`: Index of parent bounty for which child-bounty is being added. + * - `value`: Value for executing the proposal. + * - `description`: Text description for the child-bounty. + */ +export interface ChildBountiesCall_add_child_bounty { + __kind: 'add_child_bounty' + parentBountyId: number + value: bigint + description: Bytes +} + +/** + * Award child-bounty to a beneficiary. + * + * The beneficiary will be able to claim the funds after a delay. + * + * The dispatch origin for this call must be the parent curator or + * curator of this child-bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in active state, for processing the call. And + * state of child-bounty is moved to "PendingPayout" on successful call + * completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + * - `beneficiary`: Beneficiary account. + */ +export interface ChildBountiesCall_award_child_bounty { + __kind: 'award_child_bounty' + parentBountyId: number + childBountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded child-bounty after payout delay. + * + * The dispatch origin for this call may be any signed origin. + * + * Call works independent of parent bounty state, No need for parent + * bounty to be in active state. + * + * The Beneficiary is paid out with agreed bounty value. Curator fee is + * paid & curator deposit is unreserved. + * + * Child-bounty must be in "PendingPayout" state, for processing the + * call. And instance of child-bounty is removed from the state on + * successful call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_claim_child_bounty { + __kind: 'claim_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * Cancel a proposed or active child-bounty. Child-bounty account funds + * are transferred to parent bounty account. The child-bounty curator + * deposit may be unreserved if possible. + * + * The dispatch origin for this call must be either parent curator or + * `T::RejectOrigin`. + * + * If the state of child-bounty is `Active`, curator deposit is + * unreserved. + * + * If the state of child-bounty is `PendingPayout`, call fails & + * returns `PendingPayout` error. + * + * For the origin other than T::RejectOrigin, parent bounty must be in + * active state, for this child-bounty call to work. For origin + * T::RejectOrigin execution is forced. + * + * Instance of child-bounty is removed from the state on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_close_child_bounty { + __kind: 'close_child_bounty' + parentBountyId: number + childBountyId: number +} + +/** + * Propose curator for funded child-bounty. + * + * The dispatch origin for this call must be curator of parent bounty. + * + * Parent bounty must be in active state, for this child-bounty call to + * work. + * + * Child-bounty must be in "Added" state, for processing the call. And + * state of child-bounty is moved to "CuratorProposed" on successful + * call completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + * - `curator`: Address of child-bounty curator. + * - `fee`: payment fee to child-bounty curator for execution. + */ +export interface ChildBountiesCall_propose_curator { + __kind: 'propose_curator' + parentBountyId: number + childBountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a child-bounty. + * + * The dispatch origin for this call can be either `RejectOrigin`, or + * the curator of the parent bounty, or any signed origin. + * + * For the origin other than T::RejectOrigin and the child-bounty + * curator, parent bounty must be in active state, for this call to + * work. We allow child-bounty curator and T::RejectOrigin to execute + * this call irrespective of the parent bounty state. + * + * If this function is called by the `RejectOrigin` or the + * parent bounty curator, we assume that the child-bounty curator is + * malicious or inactive. As a result, child-bounty curator deposit is + * slashed. + * + * If the origin is the child-bounty curator, we take this as a sign + * that they are unable to do their job, and are willingly giving up. + * We could slash the deposit, but for now we allow them to unreserve + * their deposit and exit without issue. (We may want to change this if + * it is abused.) + * + * Finally, the origin can be anyone iff the child-bounty curator is + * "inactive". Expiry update due of parent bounty is used to estimate + * inactive state of child-bounty curator. + * + * This allows anyone in the community to call out that a child-bounty + * curator is not doing their due diligence, and we should pick a new + * one. In this case the child-bounty curator deposit is slashed. + * + * State of child-bounty is moved to Added state on successful call + * completion. + * + * - `parent_bounty_id`: Index of parent bounty. + * - `child_bounty_id`: Index of child bounty. + */ +export interface ChildBountiesCall_unassign_curator { + __kind: 'unassign_curator' + parentBountyId: number + childBountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BountiesCall: sts.Type = sts.closedEnum(() => { + return { + accept_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + approve_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + award_bounty: sts.enumStruct({ + bountyId: sts.number(), + beneficiary: MultiAddress, + }), + claim_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + close_bounty: sts.enumStruct({ + bountyId: sts.number(), + }), + extend_bounty_expiry: sts.enumStruct({ + bountyId: sts.number(), + remark: sts.bytes(), + }), + propose_bounty: sts.enumStruct({ + value: sts.bigint(), + description: sts.bytes(), + }), + propose_curator: sts.enumStruct({ + bountyId: sts.number(), + curator: MultiAddress, + fee: sts.bigint(), + }), + unassign_curator: sts.enumStruct({ + bountyId: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BountiesCall = BountiesCall_accept_curator | BountiesCall_approve_bounty | BountiesCall_award_bounty | BountiesCall_claim_bounty | BountiesCall_close_bounty | BountiesCall_extend_bounty_expiry | BountiesCall_propose_bounty | BountiesCall_propose_curator | BountiesCall_unassign_curator + +/** + * Accept the curator role for a bounty. + * A deposit will be reserved from curator and refund upon successful payout. + * + * May only be called from the curator. + * + * ## Complexity + * - O(1). + */ +export interface BountiesCall_accept_curator { + __kind: 'accept_curator' + bountyId: number +} + +/** + * Approve a bounty proposal. At a later time, the bounty will be funded and become active + * and the original deposit will be returned. + * + * May only be called from `T::SpendOrigin`. + * + * ## Complexity + * - O(1). + */ +export interface BountiesCall_approve_bounty { + __kind: 'approve_bounty' + bountyId: number +} + +/** + * Award bounty to a beneficiary account. The beneficiary will be able to claim the funds + * after a delay. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to award. + * - `beneficiary`: The beneficiary account whom will receive the payout. + * + * ## Complexity + * - O(1). + */ +export interface BountiesCall_award_bounty { + __kind: 'award_bounty' + bountyId: number + beneficiary: MultiAddress +} + +/** + * Claim the payout from an awarded bounty after payout delay. + * + * The dispatch origin for this call must be the beneficiary of this bounty. + * + * - `bounty_id`: Bounty ID to claim. + * + * ## Complexity + * - O(1). + */ +export interface BountiesCall_claim_bounty { + __kind: 'claim_bounty' + bountyId: number +} + +/** + * Cancel a proposed or active bounty. All the funds will be sent to treasury and + * the curator deposit will be unreserved if possible. + * + * Only `T::RejectOrigin` is able to cancel a bounty. + * + * - `bounty_id`: Bounty ID to cancel. + * + * ## Complexity + * - O(1). + */ +export interface BountiesCall_close_bounty { + __kind: 'close_bounty' + bountyId: number +} + +/** + * Extend the expiry time of an active bounty. + * + * The dispatch origin for this call must be the curator of this bounty. + * + * - `bounty_id`: Bounty ID to extend. + * - `remark`: additional information. + * + * ## Complexity + * - O(1). + */ +export interface BountiesCall_extend_bounty_expiry { + __kind: 'extend_bounty_expiry' + bountyId: number + remark: Bytes +} + +/** + * Propose a new bounty. + * + * The dispatch origin for this call must be _Signed_. + * + * Payment: `TipReportDepositBase` will be reserved from the origin account, as well as + * `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, + * or slashed when rejected. + * + * - `curator`: The curator account whom will manage this bounty. + * - `fee`: The curator fee. + * - `value`: The total payment amount of this bounty, curator fee included. + * - `description`: The description of this bounty. + */ +export interface BountiesCall_propose_bounty { + __kind: 'propose_bounty' + value: bigint + description: Bytes +} + +/** + * Assign a curator to a funded bounty. + * + * May only be called from `T::SpendOrigin`. + * + * ## Complexity + * - O(1). + */ +export interface BountiesCall_propose_curator { + __kind: 'propose_curator' + bountyId: number + curator: MultiAddress + fee: bigint +} + +/** + * Unassign curator from a bounty. + * + * This function can only be called by the `RejectOrigin` a signed origin. + * + * If this function is called by the `RejectOrigin`, we assume that the curator is + * malicious or inactive. As a result, we will slash the curator when possible. + * + * If the origin is the curator, we take this as a sign they are unable to do their job and + * they willingly give up. We could slash them, but for now we allow them to recover their + * deposit and exit without issue. (We may want to change this if it is abused.) + * + * Finally, the origin can be anyone if and only if the curator is "inactive". This allows + * anyone in the community to call out that a curator is not doing their due diligence, and + * we should pick a new curator. In this case the curator should also be slashed. + * + * ## Complexity + * - O(1). + */ +export interface BountiesCall_unassign_curator { + __kind: 'unassign_curator' + bountyId: number +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BalancesCall: sts.Type = sts.closedEnum(() => { + return { + force_set_balance: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + }), + force_transfer: sts.enumStruct({ + source: MultiAddress, + dest: MultiAddress, + value: sts.bigint(), + }), + force_unreserve: sts.enumStruct({ + who: MultiAddress, + amount: sts.bigint(), + }), + set_balance_deprecated: sts.enumStruct({ + who: MultiAddress, + newFree: sts.bigint(), + oldReserved: sts.bigint(), + }), + transfer: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_all: sts.enumStruct({ + dest: MultiAddress, + keepAlive: sts.boolean(), + }), + transfer_allow_death: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + transfer_keep_alive: sts.enumStruct({ + dest: MultiAddress, + value: sts.bigint(), + }), + upgrade_accounts: sts.enumStruct({ + who: sts.array(() => AccountId32), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BalancesCall = BalancesCall_force_set_balance | BalancesCall_force_transfer | BalancesCall_force_unreserve | BalancesCall_set_balance_deprecated | BalancesCall_transfer | BalancesCall_transfer_all | BalancesCall_transfer_allow_death | BalancesCall_transfer_keep_alive | BalancesCall_upgrade_accounts + +/** + * Set the regular balance of a given account. + * + * The dispatch origin for this call is `root`. + */ +export interface BalancesCall_force_set_balance { + __kind: 'force_set_balance' + who: MultiAddress + newFree: bigint +} + +/** + * Exactly as `transfer_allow_death`, except the origin must be root and the source account + * may be specified. + */ +export interface BalancesCall_force_transfer { + __kind: 'force_transfer' + source: MultiAddress + dest: MultiAddress + value: bigint +} + +/** + * Unreserve some balance from a user by force. + * + * Can only be called by ROOT. + */ +export interface BalancesCall_force_unreserve { + __kind: 'force_unreserve' + who: MultiAddress + amount: bigint +} + +/** + * Set the regular balance of a given account; it also takes a reserved balance but this + * must be the same as the account's current reserved balance. + * + * The dispatch origin for this call is `root`. + * + * WARNING: This call is DEPRECATED! Use `force_set_balance` instead. + */ +export interface BalancesCall_set_balance_deprecated { + __kind: 'set_balance_deprecated' + who: MultiAddress + newFree: bigint + oldReserved: bigint +} + +/** + * Alias for `transfer_allow_death`, provided only for name-wise compatibility. + * + * WARNING: DEPRECATED! Will be released in approximately 3 months. + */ +export interface BalancesCall_transfer { + __kind: 'transfer' + dest: MultiAddress + value: bigint +} + +/** + * Transfer the entire transferable balance from the caller account. + * + * NOTE: This function only attempts to transfer _transferable_ balances. This means that + * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be + * transferred by this function. To ensure that this function results in a killed account, + * you might need to prepare the account by removing any reference counters, storage + * deposits, etc... + * + * The dispatch origin of this call must be Signed. + * + * - `dest`: The recipient of the transfer. + * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + * of the funds the account has, causing the sender account to be killed (false), or + * transfer everything except at least the existential deposit, which will guarantee to + * keep the sender account alive (true). + */ +export interface BalancesCall_transfer_all { + __kind: 'transfer_all' + dest: MultiAddress + keepAlive: boolean +} + +/** + * Transfer some liquid free balance to another account. + * + * `transfer_allow_death` will set the `FreeBalance` of the sender and receiver. + * If the sender's account is below the existential deposit as a result + * of the transfer, the account will be reaped. + * + * The dispatch origin for this call must be `Signed` by the transactor. + */ +export interface BalancesCall_transfer_allow_death { + __kind: 'transfer_allow_death' + dest: MultiAddress + value: bigint +} + +/** + * Same as the [`transfer_allow_death`] call, but with a check that the transfer will not + * kill the origin account. + * + * 99% of the time you want [`transfer_allow_death`] instead. + * + * [`transfer_allow_death`]: struct.Pallet.html#method.transfer + */ +export interface BalancesCall_transfer_keep_alive { + __kind: 'transfer_keep_alive' + dest: MultiAddress + value: bigint +} + +/** + * Upgrade a specified account. + * + * - `origin`: Must be `Signed`. + * - `who`: The account to be upgraded. + * + * This will waive the transaction fee if at least all but 10% of the accounts needed to + * be upgraded. (We let some not have to be upgraded just in order to allow for the + * possibililty of churn). + */ +export interface BalancesCall_upgrade_accounts { + __kind: 'upgrade_accounts' + who: AccountId32[] +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const BabeCall: sts.Type = sts.closedEnum(() => { + return { + plan_config_change: sts.enumStruct({ + config: NextConfigDescriptor, + }), + report_equivocation: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + report_equivocation_unsigned: sts.enumStruct({ + equivocationProof: EquivocationProof, + keyOwnerProof: MembershipProof, + }), + } +}) + +export const EquivocationProof: sts.Type = sts.struct(() => { + return { + offender: sts.bytes(), + slot: Slot, + firstHeader: Header, + secondHeader: Header, + } +}) + +export const Slot = sts.bigint() + +export interface EquivocationProof { + offender: Bytes + slot: Slot + firstHeader: Header + secondHeader: Header +} + +export type Slot = bigint + +export const NextConfigDescriptor: sts.Type = sts.closedEnum(() => { + return { + V1: sts.enumStruct({ + c: sts.tuple(() => [sts.bigint(), sts.bigint()]), + allowedSlots: AllowedSlots, + }), + } +}) + +export const AllowedSlots: sts.Type = sts.closedEnum(() => { + return { + PrimaryAndSecondaryPlainSlots: sts.unit(), + PrimaryAndSecondaryVRFSlots: sts.unit(), + PrimarySlots: sts.unit(), + } +}) + +export type AllowedSlots = AllowedSlots_PrimaryAndSecondaryPlainSlots | AllowedSlots_PrimaryAndSecondaryVRFSlots | AllowedSlots_PrimarySlots + +export interface AllowedSlots_PrimaryAndSecondaryPlainSlots { + __kind: 'PrimaryAndSecondaryPlainSlots' +} + +export interface AllowedSlots_PrimaryAndSecondaryVRFSlots { + __kind: 'PrimaryAndSecondaryVRFSlots' +} + +export interface AllowedSlots_PrimarySlots { + __kind: 'PrimarySlots' +} + +export type NextConfigDescriptor = NextConfigDescriptor_V1 + +export interface NextConfigDescriptor_V1 { + __kind: 'V1' + c: [bigint, bigint] + allowedSlots: AllowedSlots +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type BabeCall = BabeCall_plan_config_change | BabeCall_report_equivocation | BabeCall_report_equivocation_unsigned + +/** + * Plan an epoch config change. The epoch config change is recorded and will be enacted on + * the next call to `enact_epoch_change`. The config will be activated one epoch after. + * Multiple calls to this method will replace any existing planned config change that had + * not been enacted yet. + */ +export interface BabeCall_plan_config_change { + __kind: 'plan_config_change' + config: NextConfigDescriptor +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + */ +export interface BabeCall_report_equivocation { + __kind: 'report_equivocation' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Report authority equivocation/misbehavior. This method will verify + * the equivocation proof and validate the given key ownership proof + * against the extracted offender. If both are valid, the offence will + * be reported. + * This extrinsic must be called unsigned and it is expected that only + * block authors will call it (validated in `ValidateUnsigned`), as such + * if the block author is defined it will be defined as the equivocation + * reporter. + */ +export interface BabeCall_report_equivocation_unsigned { + __kind: 'report_equivocation_unsigned' + equivocationProof: EquivocationProof + keyOwnerProof: MembershipProof +} + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export const AuctionsCall: sts.Type = sts.closedEnum(() => { + return { + bid: sts.enumStruct({ + para: sts.number(), + auctionIndex: sts.number(), + firstSlot: sts.number(), + lastSlot: sts.number(), + amount: sts.bigint(), + }), + cancel_auction: sts.unit(), + new_auction: sts.enumStruct({ + duration: sts.number(), + leasePeriodIndex: sts.number(), + }), + } +}) + +/** + * Contains one variant per dispatchable that can be called by an extrinsic. + */ +export type AuctionsCall = AuctionsCall_bid | AuctionsCall_cancel_auction | AuctionsCall_new_auction + +/** + * Make a new bid from an account (including a parachain account) for deploying a new + * parachain. + * + * Multiple simultaneous bids from the same bidder are allowed only as long as all active + * bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted. + * + * - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and + * funded by) the same account. + * - `auction_index` is the index of the auction to bid on. Should just be the present + * value of `AuctionCounter`. + * - `first_slot` is the first lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `last_slot` is the last lease period index of the range to bid on. This is the + * absolute lease period index value, not an auction-specific offset. + * - `amount` is the amount to bid to be held as deposit for the parachain should the + * bid win. This amount is held throughout the range. + */ +export interface AuctionsCall_bid { + __kind: 'bid' + para: number + auctionIndex: number + firstSlot: number + lastSlot: number + amount: bigint +} + +/** + * Cancel an in-progress auction. + * + * Can only be called by Root origin. + */ +export interface AuctionsCall_cancel_auction { + __kind: 'cancel_auction' +} + +/** + * Create a new auction. + * + * This can only happen when there isn't already an auction in progress and may only be + * called by the root origin. Accepts the `duration` of this auction and the + * `lease_period_index` of the initial lease period of the four that are to be auctioned. + */ +export interface AuctionsCall_new_auction { + __kind: 'new_auction' + duration: number + leasePeriodIndex: number +} + +export type Call = Call_Auctions | Call_Babe | Call_Balances | Call_Bounties | Call_ChildBounties | Call_Claims | Call_Configuration | Call_ConvictionVoting | Call_Crowdloan | Call_ElectionProviderMultiPhase | Call_FastUnstake | Call_FellowshipCollective | Call_FellowshipReferenda | Call_Grandpa | Call_Hrmp | Call_Identity | Call_ImOnline | Call_Indices | Call_Initializer | Call_MessageQueue | Call_Multisig | Call_Nis | Call_NisCounterpartBalances | Call_NominationPools | Call_ParaInclusion | Call_ParaInherent | Call_Paras | Call_ParasDisputes | Call_ParasShared | Call_ParasSlashing | Call_Preimage | Call_Proxy | Call_Recovery | Call_Referenda | Call_Registrar | Call_Scheduler | Call_Session | Call_Slots | Call_Society | Call_Staking | Call_System | Call_Timestamp | Call_Treasury | Call_Utility | Call_Vesting | Call_VoterList | Call_Whitelist | Call_XcmPallet + +export interface Call_Auctions { + __kind: 'Auctions' + value: AuctionsCall +} + +export interface Call_Babe { + __kind: 'Babe' + value: BabeCall +} + +export interface Call_Balances { + __kind: 'Balances' + value: BalancesCall +} + +export interface Call_Bounties { + __kind: 'Bounties' + value: BountiesCall +} + +export interface Call_ChildBounties { + __kind: 'ChildBounties' + value: ChildBountiesCall +} + +export interface Call_Claims { + __kind: 'Claims' + value: ClaimsCall +} + +export interface Call_Configuration { + __kind: 'Configuration' + value: ConfigurationCall +} + +export interface Call_ConvictionVoting { + __kind: 'ConvictionVoting' + value: ConvictionVotingCall +} + +export interface Call_Crowdloan { + __kind: 'Crowdloan' + value: CrowdloanCall +} + +export interface Call_ElectionProviderMultiPhase { + __kind: 'ElectionProviderMultiPhase' + value: ElectionProviderMultiPhaseCall +} + +export interface Call_FastUnstake { + __kind: 'FastUnstake' + value: FastUnstakeCall +} + +export interface Call_FellowshipCollective { + __kind: 'FellowshipCollective' + value: FellowshipCollectiveCall +} + +export interface Call_FellowshipReferenda { + __kind: 'FellowshipReferenda' + value: FellowshipReferendaCall +} + +export interface Call_Grandpa { + __kind: 'Grandpa' + value: GrandpaCall +} + +export interface Call_Hrmp { + __kind: 'Hrmp' + value: HrmpCall +} + +export interface Call_Identity { + __kind: 'Identity' + value: IdentityCall +} + +export interface Call_ImOnline { + __kind: 'ImOnline' + value: ImOnlineCall +} + +export interface Call_Indices { + __kind: 'Indices' + value: IndicesCall +} + +export interface Call_Initializer { + __kind: 'Initializer' + value: InitializerCall +} + +export interface Call_MessageQueue { + __kind: 'MessageQueue' + value: MessageQueueCall +} + +export interface Call_Multisig { + __kind: 'Multisig' + value: MultisigCall +} + +export interface Call_Nis { + __kind: 'Nis' + value: NisCall +} + +export interface Call_NisCounterpartBalances { + __kind: 'NisCounterpartBalances' + value: NisCounterpartBalancesCall +} + +export interface Call_NominationPools { + __kind: 'NominationPools' + value: NominationPoolsCall +} + +export interface Call_ParaInclusion { + __kind: 'ParaInclusion' + value: ParaInclusionCall +} + +export interface Call_ParaInherent { + __kind: 'ParaInherent' + value: ParaInherentCall +} + +export interface Call_Paras { + __kind: 'Paras' + value: ParasCall +} + +export interface Call_ParasDisputes { + __kind: 'ParasDisputes' + value: ParasDisputesCall +} + +export interface Call_ParasShared { + __kind: 'ParasShared' + value: ParasSharedCall +} + +export interface Call_ParasSlashing { + __kind: 'ParasSlashing' + value: ParasSlashingCall +} + +export interface Call_Preimage { + __kind: 'Preimage' + value: PreimageCall +} + +export interface Call_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Call_Recovery { + __kind: 'Recovery' + value: RecoveryCall +} + +export interface Call_Referenda { + __kind: 'Referenda' + value: ReferendaCall +} + +export interface Call_Registrar { + __kind: 'Registrar' + value: RegistrarCall +} + +export interface Call_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Call_Session { + __kind: 'Session' + value: SessionCall +} + +export interface Call_Slots { + __kind: 'Slots' + value: SlotsCall +} + +export interface Call_Society { + __kind: 'Society' + value: SocietyCall +} + +export interface Call_Staking { + __kind: 'Staking' + value: StakingCall +} + +export interface Call_System { + __kind: 'System' + value: SystemCall +} + +export interface Call_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} + +export interface Call_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Call_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Call_Vesting { + __kind: 'Vesting' + value: VestingCall +} + +export interface Call_VoterList { + __kind: 'VoterList' + value: VoterListCall +} + +export interface Call_Whitelist { + __kind: 'Whitelist' + value: WhitelistCall +} + +export interface Call_XcmPallet { + __kind: 'XcmPallet' + value: XcmPalletCall +} + +export const ProxyType: sts.Type = sts.closedEnum(() => { + return { + Any: sts.unit(), + Auction: sts.unit(), + CancelProxy: sts.unit(), + Governance: sts.unit(), + IdentityJudgement: sts.unit(), + NominationPools: sts.unit(), + NonTransfer: sts.unit(), + Society: sts.unit(), + Staking: sts.unit(), + } +}) + +export const MultiAddress: sts.Type = sts.closedEnum(() => { + return { + Address20: sts.bytes(), + Address32: sts.bytes(), + Id: AccountId32, + Index: sts.unit(), + Raw: sts.bytes(), + } +})